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": "河狸![AV²](hipy)", - "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} 分享Token数据 */ async getShareToken(shareData) { - if (this.shareTokenCache[shareData.shareId]) { - return this.shareTokenCache[shareData.shareId]; - } + if (this.shareTokenCache[shareData.shareId]) return this.shareTokenCache[shareData.shareId]; try { const shareVerify = await this.verifyShare(shareData); const headers = { @@ -123533,9 +112067,7 @@ var BaiduHandler = class { num: 100 }, { headers }, "get"); if (listData.errno !== 0) { - if (listData.errno === -9) { - console.log("提取码错误"); - } + if (listData.errno === -9) console.log("提取码错误"); console.log("获取文件列表失败"); } this.shareTokenCache[shareData.shareId] = { @@ -123560,8 +112092,7 @@ var BaiduHandler = class { * @returns {string} MD5签名字符串 */ generateSign(shareId, sharePwd) { - const timestamp = Date.now(); - const str = `${shareId}${sharePwd}${timestamp}${this.cookie || ""}`; + const str = `${shareId}${sharePwd}${Date.now()}${this.cookie || ""}`; return import_crypto_js.default.MD5(str).toString(); } /** @@ -123591,73 +112122,56 @@ var BaiduHandler = class { num: 100, dir: shareDir }, headers, "get"); - if (dirListData.errno !== 0 || !dirListData.list) { - return; - } - for (const item of dirListData.list) { - if (item.isdir === 1 || item.isdir === "1") { - const subDirPath = `${dirPath}/${item.server_filename}`; - const subDrpyPath = `${parentDrpyPath}/${item.server_filename}`; - await processDirectory(subDirPath, item.fs_id, subDrpyPath); - } else { - const ext = item.server_filename.substring(item.server_filename.lastIndexOf(".") || 0).toLowerCase(); - const fileInfo = { - fid: item.fs_id, - file_name: item.server_filename, - size: item.size, - path: parentDrpyPath, - full_path: `/${this.saveDirName}${parentDrpyPath}/${item.server_filename}`, - file: true - }; - if (this.subvideoExts.includes(ext)) { - videos.push(fileInfo); - } else if (this.subtitleExts.includes(ext)) { - subtitles.push(fileInfo); - } - } + if (dirListData.errno !== 0 || !dirListData.list) return; + for (const item of dirListData.list) if (item.isdir === 1 || item.isdir === "1") { + const subDirPath = `${dirPath}/${item.server_filename}`; + const subDrpyPath = `${parentDrpyPath}/${item.server_filename}`; + await processDirectory(subDirPath, item.fs_id, subDrpyPath); + } else { + const ext = item.server_filename.substring(item.server_filename.lastIndexOf(".") || 0).toLowerCase(); + const fileInfo = { + fid: item.fs_id, + file_name: item.server_filename, + size: item.size, + path: parentDrpyPath, + full_path: `/${this.saveDirName}${parentDrpyPath}/${item.server_filename}`, + file: true + }; + if (this.subvideoExts.includes(ext)) videos.push(fileInfo); + else if (this.subtitleExts.includes(ext)) subtitles.push(fileInfo); } }; - if (cachedData.list) { - for (const item of cachedData.list) { - if (item.isdir === 1 || item.isdir === "1") { - const dirPath = `/${item.server_filename}`; - const drpyPath = `/${item.server_filename}`; - await processDirectory(dirPath, item.fs_id, drpyPath); - } else { - const ext = item.server_filename.substring(item.server_filename.lastIndexOf(".") || 0).toLowerCase(); - const fileInfo = { - fid: item.fs_id, - file_name: item.server_filename, - size: item.size, - path: "", - full_path: `/${this.saveDirName}/${item.server_filename}`, - file: true - }; - if (this.subvideoExts.includes(ext)) { - videos.push(fileInfo); - } else if (this.subtitleExts.includes(ext)) { - subtitles.push(fileInfo); - } - } - } + if (cachedData.list) for (const item of cachedData.list) if (item.isdir === 1 || item.isdir === "1") { + const dirPath = `/${item.server_filename}`; + const drpyPath = `/${item.server_filename}`; + await processDirectory(dirPath, item.fs_id, drpyPath); + } else { + const ext = item.server_filename.substring(item.server_filename.lastIndexOf(".") || 0).toLowerCase(); + const fileInfo = { + fid: item.fs_id, + file_name: item.server_filename, + size: item.size, + path: "", + full_path: `/${this.saveDirName}/${item.server_filename}`, + file: true + }; + if (this.subvideoExts.includes(ext)) videos.push(fileInfo); + else if (this.subtitleExts.includes(ext)) subtitles.push(fileInfo); } const getBaseName = (fileName) => { const lastDotIndex = fileName.lastIndexOf("."); return lastDotIndex === -1 ? fileName : fileName.slice(0, lastDotIndex); }; - const subtitleMap = new Map(); + const subtitleMap = /* @__PURE__ */ new Map(); subtitles.forEach((sub) => { const baseName = getBaseName(sub.file_name); - if (!subtitleMap.has(baseName)) { - subtitleMap.set(baseName, []); - } + if (!subtitleMap.has(baseName)) subtitleMap.set(baseName, []); subtitleMap.get(baseName).push(sub); }); - const videosWithSubtitles = videos.map((video) => ({ + return { videos: videos.map((video) => ({ ...video, subtitles: subtitleMap.get(getBaseName(video.file_name)) || [] - })); - return { videos: videosWithSubtitles }; + })) }; } /** * 获取文件下载链接 @@ -123667,65 +112181,48 @@ var BaiduHandler = class { * @returns {Promise} 下载信息对象,失败时返回null */ async getDownload(shareId, fileId, filename) { - if (!this.shareTokenCache[shareId]) { - return null; - } - if (!fileId || !filename) { - return null; - } - if (!this.cookie) { - return null; - } + if (!this.shareTokenCache[shareId]) return null; + if (!fileId || !filename) return null; + if (!this.cookie) return null; const shareData = { shareId, sharePwd: this.shareTokenCache[shareId].sharePwd || "" }; - const isSaved = await this.save(shareData, fileId); - if (!isSaved) { - return null; - } + if (!await this.save(shareData, fileId)) return null; const headers = { ...this.baseHeader, Cookie: this.cookie || "" }; let retryCount = 1; const fullPath = `/${this.saveDirName}/${filename}`; - while (retryCount >= 0) { - try { - const mediaInfo = await this.api(`api/mediainfo`, { - type: "M3U8_FLV_264_480", - path: fullPath, - clienttype: 80, - origin: "dlna" - }, headers, "get"); - if (mediaInfo.info?.dlink) { - return { - dlink: mediaInfo.info.dlink, - headers, - full_path: fullPath - }; - } - const downloadInfo = await this.api(`api/download`, { - type: "download", - path: fullPath, - app_id: 250528 - }, headers, "get"); - if (downloadInfo.info?.dlink) { - return { - dlink: downloadInfo.info.dlink, - headers, - is_direct: true, - full_path: fullPath - }; - } - retryCount--; - if (retryCount >= 0) { - await this.delay(1e3); - } - } catch (error) { - retryCount--; - if (retryCount >= 0) await this.delay(1e3); - } + while (retryCount >= 0) try { + const mediaInfo = await this.api(`api/mediainfo`, { + type: "M3U8_FLV_264_480", + path: fullPath, + clienttype: 80, + origin: "dlna" + }, headers, "get"); + if (mediaInfo.info?.dlink) return { + dlink: mediaInfo.info.dlink, + headers, + full_path: fullPath + }; + const downloadInfo = await this.api(`api/download`, { + type: "download", + path: fullPath, + app_id: 250528 + }, headers, "get"); + if (downloadInfo.info?.dlink) return { + dlink: downloadInfo.info.dlink, + headers, + is_direct: true, + full_path: fullPath + }; + retryCount--; + if (retryCount >= 0) await this.delay(1e3); + } catch (error) { + retryCount--; + if (retryCount >= 0) await this.delay(1e3); } return null; } @@ -123736,20 +112233,14 @@ var BaiduHandler = class { * @returns {Promise} 保存是否成功 */ async save(shareData, fileFsId) { - if (!this.cookie) { - return false; - } + if (!this.cookie) return false; if (!this.saveDirId) { this.saveDirId = await this.createSaveDir(); - if (!this.saveDirId) { - return false; - } + if (!this.saveDirId) return false; } if (!this.shareTokenCache[shareData.shareId]) { await this.getShareToken(shareData); - if (!this.shareTokenCache[shareData.shareId]) { - return false; - } + if (!this.shareTokenCache[shareData.shareId]) return false; } const headers = { ...this.baseHeader, @@ -123761,16 +112252,12 @@ var BaiduHandler = class { path: `/${this.saveDirName}`, fsidlist: JSON.stringify([fileFsId]) }, { headers }, "post"); - if (transferResp.errno === 0) { - return true; - } else if (transferResp.errno === 113) { - return true; - } else if (transferResp.errno === -62 || transferResp.errno === -9) { + if (transferResp.errno === 0) return true; + else if (transferResp.errno === 113) return true; + else if (transferResp.errno === -62 || transferResp.errno === -9) { delete this.shareTokenCache[shareData.shareId]; return false; - } else { - return false; - } + } else return false; } catch (error) { return false; } @@ -123789,14 +112276,10 @@ var BaiduHandler = class { * @returns {Promise} Promise对象 */ async clearSaveDir() { - if (!this.cookie) { - return; - } + if (!this.cookie) return; if (!this.saveDirId) { this.saveDirId = await this.createSaveDir(); - if (!this.saveDirId) { - return; - } + if (!this.saveDirId) return; } const getBdstoken = () => { const fullCookie = this.cookie; @@ -123804,26 +112287,18 @@ var BaiduHandler = class { const cookieParts = fullCookie.split(";"); for (const part of cookieParts) { const trimmed = part.trim(); - if (trimmed.startsWith("bdstoken=")) { - return trimmed.substring("bdstoken=".length); - } + if (trimmed.startsWith("bdstoken=")) return trimmed.substring(9); } return null; }; let bdstoken = getBdstoken(); - if (!bdstoken) { - try { - const userInfo = await this.api("api/gettemplatevariable?clienttype=0&app_id=250528&web=1&fields=[\"bdstoken\",\"token\",\"uk\",\"isdocuser\",\"servertime\"]", {}, { Cookie: this.cookie }, "get"); - if (userInfo && userInfo.result && userInfo.result.bdstoken) { - bdstoken = userInfo.result.bdstoken; - } - } catch (error) { - return; - } - } - if (!bdstoken) { + if (!bdstoken) try { + const userInfo = await this.api("api/gettemplatevariable?clienttype=0&app_id=250528&web=1&fields=[\"bdstoken\",\"token\",\"uk\",\"isdocuser\",\"servertime\"]", {}, { Cookie: this.cookie }, "get"); + if (userInfo && userInfo.result && userInfo.result.bdstoken) bdstoken = userInfo.result.bdstoken; + } catch (error) { return; } + if (!bdstoken) return; try { const listResp = await this.api("api/list", { dir: `/${this.saveDirName}`, @@ -123834,24 +112309,17 @@ var BaiduHandler = class { app_id: 250528, channel: "chunlei" }, { Cookie: this.cookie }, "get"); - if (listResp.errno !== 0) { - return; - } - if (!listResp.list || listResp.list.length === 0) { - return; - } + if (listResp.errno !== 0) return; + if (!listResp.list || listResp.list.length === 0) return; const headers = { "User-Agent": "netdisk;1.4.2;22021211RC;android-android;12;JSbridge4.4.0;jointBridge;1.1.0;", Cookie: this.cookie || "" }; const filePaths = listResp.list.map((item) => `/${this.saveDirName}/${item.server_filename}`); - const deleteResp = await this.api("api/filemanager?opera=delete", { + if ((await this.api("api/filemanager?opera=delete", { filelist: JSON.stringify(filePaths), bdstoken - }, headers, "post"); - if (deleteResp.errno === 0) { - console.log("清理保存目录成功"); - } + }, headers, "post")).errno === 0) console.log("清理保存目录成功"); } catch (error) { console.log("清理保存目录失败:", error.message); return; @@ -123859,13 +112327,11 @@ var BaiduHandler = class { } }; const Baidu$1 = new BaiduHandler(); - //#endregion //#region ../node_modules/object-inspect/util.inspect.js var require_util_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = __require("util").inspect; })); - //#endregion //#region ../node_modules/object-inspect/index.js var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -123877,12 +112343,9 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null; var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null; var setForEach = hasSet && Set.prototype.forEach; - var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype; - var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null; - var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype; - var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null; - var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype; - var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null; + var weakMapHas = typeof WeakMap === "function" && WeakMap.prototype ? WeakMap.prototype.has : null; + var weakSetHas = typeof WeakSet === "function" && WeakSet.prototype ? WeakSet.prototype.has : null; + var weakRefDeref = typeof WeakRef === "function" && WeakRef.prototype ? WeakRef.prototype.deref : null; var booleanValueOf = Boolean.prototype.valueOf; var objectToString = Object.prototype.toString; var functionToString = Function.prototype.toString; @@ -123906,9 +112369,7 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => return O.__proto__; } : null); function addNumericSeparator(num, str) { - if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) { - return str; - } + if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) return str; var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g; if (typeof num === "number") { var int = num < 0 ? -$floor(-num) : $floor(num); @@ -123935,39 +112396,19 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => }; module.exports = function inspect_(obj, options, depth, seen) { var opts = options || {}; - if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) { - throw new TypeError("option \"quoteStyle\" must be \"single\" or \"double\""); - } - if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) { - throw new TypeError("option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`"); - } + if (has(opts, "quoteStyle") && !has(quotes, opts.quoteStyle)) throw new TypeError("option \"quoteStyle\" must be \"single\" or \"double\""); + if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) throw new TypeError("option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`"); var customInspect = has(opts, "customInspect") ? opts.customInspect : true; - if (typeof customInspect !== "boolean" && customInspect !== "symbol") { - throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"); - } - if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) { - throw new TypeError("option \"indent\" must be \"\\t\", an integer > 0, or `null`"); - } - if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") { - throw new TypeError("option \"numericSeparator\", if provided, must be `true` or `false`"); - } + if (typeof customInspect !== "boolean" && customInspect !== "symbol") throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`"); + if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) throw new TypeError("option \"indent\" must be \"\\t\", an integer > 0, or `null`"); + if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") throw new TypeError("option \"numericSeparator\", if provided, must be `true` or `false`"); var numericSeparator = opts.numericSeparator; - if (typeof obj === "undefined") { - return "undefined"; - } - if (obj === null) { - return "null"; - } - if (typeof obj === "boolean") { - return obj ? "true" : "false"; - } - if (typeof obj === "string") { - return inspectString(obj, opts); - } + if (typeof obj === "undefined") return "undefined"; + if (obj === null) return "null"; + if (typeof obj === "boolean") return obj ? "true" : "false"; + if (typeof obj === "string") return inspectString(obj, opts); if (typeof obj === "number") { - if (obj === 0) { - return Infinity / obj > 0 ? "0" : "-0"; - } + if (obj === 0) return Infinity / obj > 0 ? "0" : "-0"; var str = String(obj); return numericSeparator ? addNumericSeparator(obj, str) : str; } @@ -123976,18 +112417,11 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr; } var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth; - if (typeof depth === "undefined") { - depth = 0; - } - if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") { - return isArray(obj) ? "[Array]" : "[Object]"; - } + if (typeof depth === "undefined") depth = 0; + if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") return isArray(obj) ? "[Array]" : "[Object]"; var indent = getIndent(opts, depth); - if (typeof seen === "undefined") { - seen = []; - } else if (indexOf(seen, obj) >= 0) { - return "[Circular]"; - } + if (typeof seen === "undefined") seen = []; + else if (indexOf(seen, obj) >= 0) return "[Circular]"; function inspect(value, from, noIndent) { if (from) { seen = $arrSlice.call(seen); @@ -123995,9 +112429,7 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => } if (noIndent) { var newOpts = { depth: opts.depth }; - if (has(opts, "quoteStyle")) { - newOpts.quoteStyle = opts.quoteStyle; - } + if (has(opts, "quoteStyle")) newOpts.quoteStyle = opts.quoteStyle; return inspect_(value, newOpts, depth + 1, seen); } return inspect_(value, opts, depth + 1, seen); @@ -124014,108 +112446,65 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => if (isElement(obj)) { var s = "<" + $toLowerCase.call(String(obj.nodeName)); var attrs = obj.attributes || []; - for (var i = 0; i < attrs.length; i++) { - s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts); - } + for (var i = 0; i < attrs.length; i++) s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts); s += ">"; - if (obj.childNodes && obj.childNodes.length) { - s += "..."; - } + if (obj.childNodes && obj.childNodes.length) s += "..."; s += ""; return s; } if (isArray(obj)) { - if (obj.length === 0) { - return "[]"; - } + if (obj.length === 0) return "[]"; var xs = arrObjKeys(obj, inspect); - if (indent && !singleLineValues(xs)) { - return "[" + indentedJoin(xs, indent) + "]"; - } + if (indent && !singleLineValues(xs)) return "[" + indentedJoin(xs, indent) + "]"; return "[ " + $join.call(xs, ", ") + " ]"; } if (isError(obj)) { var parts = arrObjKeys(obj, inspect); - if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) { - return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }"; - } - if (parts.length === 0) { - return "[" + String(obj) + "]"; - } + if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }"; + if (parts.length === 0) return "[" + String(obj) + "]"; return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }"; } if (typeof obj === "object" && customInspect) { - if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) { - return utilInspect(obj, { depth: maxDepth - depth }); - } else if (customInspect !== "symbol" && typeof obj.inspect === "function") { - return obj.inspect(); - } + if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) return utilInspect(obj, { depth: maxDepth - depth }); + else if (customInspect !== "symbol" && typeof obj.inspect === "function") return obj.inspect(); } if (isMap(obj)) { var mapParts = []; - if (mapForEach) { - mapForEach.call(obj, function(value, key) { - mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj)); - }); - } + if (mapForEach) mapForEach.call(obj, function(value, key) { + mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj)); + }); return collectionOf("Map", mapSize.call(obj), mapParts, indent); } if (isSet(obj)) { var setParts = []; - if (setForEach) { - setForEach.call(obj, function(value) { - setParts.push(inspect(value, obj)); - }); - } + if (setForEach) setForEach.call(obj, function(value) { + setParts.push(inspect(value, obj)); + }); return collectionOf("Set", setSize.call(obj), setParts, indent); } - if (isWeakMap(obj)) { - return weakCollectionOf("WeakMap"); - } - if (isWeakSet(obj)) { - return weakCollectionOf("WeakSet"); - } - if (isWeakRef(obj)) { - return weakCollectionOf("WeakRef"); - } - if (isNumber(obj)) { - return markBoxed(inspect(Number(obj))); - } - if (isBigInt(obj)) { - return markBoxed(inspect(bigIntValueOf.call(obj))); - } - if (isBoolean(obj)) { - return markBoxed(booleanValueOf.call(obj)); - } - if (isString(obj)) { - return markBoxed(inspect(String(obj))); - } - if (typeof window !== "undefined" && obj === window) { - return "{ [object Window] }"; - } - if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) { - return "{ [object globalThis] }"; - } + if (isWeakMap(obj)) return weakCollectionOf("WeakMap"); + if (isWeakSet(obj)) return weakCollectionOf("WeakSet"); + if (isWeakRef(obj)) return weakCollectionOf("WeakRef"); + if (isNumber(obj)) return markBoxed(inspect(Number(obj))); + if (isBigInt(obj)) return markBoxed(inspect(bigIntValueOf.call(obj))); + if (isBoolean(obj)) return markBoxed(booleanValueOf.call(obj)); + if (isString(obj)) return markBoxed(inspect(String(obj))); + if (typeof window !== "undefined" && obj === window) return "{ [object Window] }"; + if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) return "{ [object globalThis] }"; if (!isDate(obj) && !isRegExp(obj)) { var ys = arrObjKeys(obj, inspect); var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object; var protoTag = obj instanceof Object ? "" : "null prototype"; var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : ""; - var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : ""; - var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : ""); - if (ys.length === 0) { - return tag + "{}"; - } - if (indent) { - return tag + "{" + indentedJoin(ys, indent) + "}"; - } + var tag = (isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "") + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : ""); + if (ys.length === 0) return tag + "{}"; + if (indent) return tag + "{" + indentedJoin(ys, indent) + "}"; return tag + "{ " + $join.call(ys, ", ") + " }"; } return String(obj); }; function wrapQuotes(s, defaultStyle, opts) { - var style = opts.quoteStyle || defaultStyle; - var quoteChar = quotes[style]; + var quoteChar = quotes[opts.quoteStyle || defaultStyle]; return quoteChar + s + quoteChar; } function quote(s) { @@ -124146,15 +112535,9 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => return toStr(obj) === "[object Boolean]" && canTrustToString(obj); } function isSymbol(obj) { - if (hasShammedSymbols) { - return obj && typeof obj === "object" && obj instanceof Symbol; - } - if (typeof obj === "symbol") { - return true; - } - if (!obj || typeof obj !== "object" || !symToString) { - return false; - } + if (hasShammedSymbols) return obj && typeof obj === "object" && obj instanceof Symbol; + if (typeof obj === "symbol") return true; + if (!obj || typeof obj !== "object" || !symToString) return false; try { symToString.call(obj); return true; @@ -124162,9 +112545,7 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => return false; } function isBigInt(obj) { - if (!obj || typeof obj !== "object" || !bigIntValueOf) { - return false; - } + if (!obj || typeof obj !== "object" || !bigIntValueOf) return false; try { bigIntValueOf.call(obj); return true; @@ -124181,30 +112562,18 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => return objectToString.call(obj); } function nameOf(f) { - if (f.name) { - return f.name; - } + if (f.name) return f.name; var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/); - if (m) { - return m[1]; - } + if (m) return m[1]; return null; } function indexOf(xs, x) { - if (xs.indexOf) { - return xs.indexOf(x); - } - for (var i = 0, l = xs.length; i < l; i++) { - if (xs[i] === x) { - return i; - } - } + if (xs.indexOf) return xs.indexOf(x); + for (var i = 0, l = xs.length; i < l; i++) if (xs[i] === x) return i; return -1; } function isMap(x) { - if (!mapSize || !x || typeof x !== "object") { - return false; - } + if (!mapSize || !x || typeof x !== "object") return false; try { mapSize.call(x); try { @@ -124217,9 +112586,7 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => return false; } function isWeakMap(x) { - if (!weakMapHas || !x || typeof x !== "object") { - return false; - } + if (!weakMapHas || !x || typeof x !== "object") return false; try { weakMapHas.call(x, weakMapHas); try { @@ -124232,9 +112599,7 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => return false; } function isWeakRef(x) { - if (!weakRefDeref || !x || typeof x !== "object") { - return false; - } + if (!weakRefDeref || !x || typeof x !== "object") return false; try { weakRefDeref.call(x); return true; @@ -124242,9 +112607,7 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => return false; } function isSet(x) { - if (!setSize || !x || typeof x !== "object") { - return false; - } + if (!setSize || !x || typeof x !== "object") return false; try { setSize.call(x); try { @@ -124257,9 +112620,7 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => return false; } function isWeakSet(x) { - if (!weakSetHas || !x || typeof x !== "object") { - return false; - } + if (!weakSetHas || !x || typeof x !== "object") return false; try { weakSetHas.call(x, weakSetHas); try { @@ -124272,12 +112633,8 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => return false; } function isElement(x) { - if (!x || typeof x !== "object") { - return false; - } - if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) { - return true; - } + if (!x || typeof x !== "object") return false; + if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) return true; return typeof x.nodeName === "string" && typeof x.getAttribute === "function"; } function inspectString(str, opts) { @@ -124288,8 +112645,7 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => } var quoteRE = quoteREs[opts.quoteStyle || "single"]; quoteRE.lastIndex = 0; - var s = $replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte); - return wrapQuotes(s, "single", opts); + return wrapQuotes($replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte), "single", opts); } function lowbyte(c) { var n = c.charCodeAt(0); @@ -124300,9 +112656,7 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => 12: "f", 13: "r" }[n]; - if (x) { - return "\\" + x; - } + if (x) return "\\" + x; return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16)); } function markBoxed(str) { @@ -124316,31 +112670,21 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => return type + " (" + size + ") {" + joinedEntries + "}"; } function singleLineValues(xs) { - for (var i = 0; i < xs.length; i++) { - if (indexOf(xs[i], "\n") >= 0) { - return false; - } - } + for (var i = 0; i < xs.length; i++) if (indexOf(xs[i], "\n") >= 0) return false; return true; } function getIndent(opts, depth) { var baseIndent; - if (opts.indent === " ") { - baseIndent = " "; - } else if (typeof opts.indent === "number" && opts.indent > 0) { - baseIndent = $join.call(Array(opts.indent + 1), " "); - } else { - return null; - } + if (opts.indent === " ") baseIndent = " "; + else if (typeof opts.indent === "number" && opts.indent > 0) baseIndent = $join.call(Array(opts.indent + 1), " "); + else return null; return { base: baseIndent, prev: $join.call(Array(depth + 1), baseIndent) }; } function indentedJoin(xs, indent) { - if (xs.length === 0) { - return ""; - } + if (xs.length === 0) return ""; var lineJoiner = "\n" + indent.prev + indent.base; return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev; } @@ -124349,44 +112693,27 @@ var require_object_inspect = /* @__PURE__ */ __commonJSMin(((exports, module) => var xs = []; if (isArr) { xs.length = obj.length; - for (var i = 0; i < obj.length; i++) { - xs[i] = has(obj, i) ? inspect(obj[i], obj) : ""; - } + for (var i = 0; i < obj.length; i++) xs[i] = has(obj, i) ? inspect(obj[i], obj) : ""; } var syms = typeof gOPS === "function" ? gOPS(obj) : []; var symMap; if (hasShammedSymbols) { symMap = {}; - for (var k = 0; k < syms.length; k++) { - symMap["$" + syms[k]] = syms[k]; - } + for (var k = 0; k < syms.length; k++) symMap["$" + syms[k]] = syms[k]; } for (var key in obj) { - if (!has(obj, key)) { - continue; - } - if (isArr && String(Number(key)) === key && key < obj.length) { - continue; - } - if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) { - continue; - } else if ($test.call(/[^\w$]/, key)) { - xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj)); - } else { - xs.push(key + ": " + inspect(obj[key], obj)); - } + if (!has(obj, key)) continue; + if (isArr && String(Number(key)) === key && key < obj.length) continue; + if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) continue; + else if ($test.call(/[^\w$]/, key)) xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj)); + else xs.push(key + ": " + inspect(obj[key], obj)); } if (typeof gOPS === "function") { - for (var j = 0; j < syms.length; j++) { - if (isEnumerable.call(obj, syms[j])) { - xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj)); - } - } + for (var j = 0; j < syms.length; j++) if (isEnumerable.call(obj, syms[j])) xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj)); } return xs; } })); - //#endregion //#region ../node_modules/side-channel-list/index.js var require_side_channel_list = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -124398,50 +112725,39 @@ var require_side_channel_list = /* @__PURE__ */ __commonJSMin(((exports, module) var prev = list; /** @type {(typeof list)['next']} */ var curr; - for (; (curr = prev.next) != null; prev = curr) { - if (curr.key === key) { - prev.next = curr.next; - if (!isDelete) { - curr.next = list.next; - list.next = curr; - } - return curr; + for (; (curr = prev.next) != null; prev = curr) if (curr.key === key) { + prev.next = curr.next; + if (!isDelete) { + curr.next = list.next; + list.next = curr; } + return curr; } }; /** @type {import('./list.d.ts').listGet} */ var listGet = function(objects, key) { - if (!objects) { - return void undefined; - } + if (!objects) return; var node = listGetNode(objects, key); return node && node.value; }; /** @type {import('./list.d.ts').listSet} */ var listSet = function(objects, key, value) { var node = listGetNode(objects, key); - if (node) { - node.value = value; - } else { - objects.next = { - key, - next: objects.next, - value - }; - } + if (node) node.value = value; + else objects.next = { + key, + next: objects.next, + value + }; }; /** @type {import('./list.d.ts').listHas} */ var listHas = function(objects, key) { - if (!objects) { - return false; - } + if (!objects) return false; return !!listGetNode(objects, key); }; /** @type {import('./list.d.ts').listDelete} */ var listDelete = function(objects, key) { - if (objects) { - return listGetNode(objects, key, true); - } + if (objects) return listGetNode(objects, key, true); }; /** @type {import('.')} */ module.exports = function getSideChannelList() { @@ -124452,16 +112768,12 @@ var require_side_channel_list = /* @__PURE__ */ __commonJSMin(((exports, module) /** @type {Channel} */ var channel = { assert: function(key) { - if (!channel.has(key)) { - throw new $TypeError("Side channel does not contain " + inspect(key)); - } + if (!channel.has(key)) throw new $TypeError("Side channel does not contain " + inspect(key)); }, "delete": function(key) { var root = $o && $o.next; var deletedNode = listDelete($o, key); - if (deletedNode && root && root === deletedNode) { - $o = void undefined; - } + if (deletedNode && root && root === deletedNode) $o = void 0; return !!deletedNode; }, get: function(key) { @@ -124471,9 +112783,7 @@ var require_side_channel_list = /* @__PURE__ */ __commonJSMin(((exports, module) return listHas($o, key); }, set: function(key, value) { - if (!$o) { - $o = { next: void undefined }; - } + if (!$o) $o = { next: void 0 }; listSet( /** @type {NonNullable} */ $o, @@ -124485,7 +112795,6 @@ var require_side_channel_list = /* @__PURE__ */ __commonJSMin(((exports, module) return channel; }; })); - //#endregion //#region ../node_modules/call-bound/index.js var require_call_bound = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -124496,16 +112805,13 @@ var require_call_bound = /* @__PURE__ */ __commonJSMin(((exports, module) => { /** @type {import('.')} */ module.exports = function callBoundIntrinsic(name, allowMissing) { var intrinsic = GetIntrinsic(name, !!allowMissing); - if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) { - return callBindBasic( - /** @type {const} */ - [intrinsic] - ); - } + if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) return callBindBasic( + /** @type {const} */ + [intrinsic] + ); return intrinsic; }; })); - //#endregion //#region ../node_modules/side-channel-map/index.js var require_side_channel_map = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -124533,42 +112839,31 @@ var require_side_channel_map = /* @__PURE__ */ __commonJSMin(((exports, module) /** @type {Channel} */ var channel = { assert: function(key) { - if (!channel.has(key)) { - throw new $TypeError("Side channel does not contain " + inspect(key)); - } + if (!channel.has(key)) throw new $TypeError("Side channel does not contain " + inspect(key)); }, "delete": function(key) { if ($m) { var result = $mapDelete($m, key); - if ($mapSize($m) === 0) { - $m = void undefined; - } + if ($mapSize($m) === 0) $m = void 0; return result; } return false; }, get: function(key) { - if ($m) { - return $mapGet($m, key); - } + if ($m) return $mapGet($m, key); }, has: function(key) { - if ($m) { - return $mapHas($m, key); - } + if ($m) return $mapHas($m, key); return false; }, set: function(key, value) { - if (!$m) { - $m = new $Map(); - } + if (!$m) $m = new $Map(); $mapSet($m, key, value); } }; return channel; }; })); - //#endregion //#region ../node_modules/side-channel-weakmap/index.js var require_side_channel_weakmap = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -124596,48 +112891,34 @@ var require_side_channel_weakmap = /* @__PURE__ */ __commonJSMin(((exports, modu /** @type {Channel} */ var channel = { assert: function(key) { - if (!channel.has(key)) { - throw new $TypeError("Side channel does not contain " + inspect(key)); - } + if (!channel.has(key)) throw new $TypeError("Side channel does not contain " + inspect(key)); }, "delete": function(key) { if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { - if ($wm) { - return $weakMapDelete($wm, key); - } + if ($wm) return $weakMapDelete($wm, key); } else if (getSideChannelMap) { - if ($m) { - return $m["delete"](key); - } + if ($m) return $m["delete"](key); } return false; }, get: function(key) { if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { - if ($wm) { - return $weakMapGet($wm, key); - } + if ($wm) return $weakMapGet($wm, key); } return $m && $m.get(key); }, has: function(key) { if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { - if ($wm) { - return $weakMapHas($wm, key); - } + if ($wm) return $weakMapHas($wm, key); } return !!$m && $m.has(key); }, set: function(key, value) { if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) { - if (!$wm) { - $wm = new $WeakMap(); - } + if (!$wm) $wm = new $WeakMap(); $weakMapSet($wm, key, value); } else if (getSideChannelMap) { - if (!$m) { - $m = getSideChannelMap(); - } + if (!$m) $m = getSideChannelMap(); /** @type {NonNullable} */ $m.set(key, value); } } @@ -124645,7 +112926,6 @@ var require_side_channel_weakmap = /* @__PURE__ */ __commonJSMin(((exports, modu return channel; } : getSideChannelMap; })); - //#endregion //#region ../node_modules/side-channel/index.js var require_side_channel = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -124653,8 +112933,7 @@ var require_side_channel = /* @__PURE__ */ __commonJSMin(((exports, module) => { var inspect = require_object_inspect(); var getSideChannelList = require_side_channel_list(); var getSideChannelMap = require_side_channel_map(); - var getSideChannelWeakMap = require_side_channel_weakmap(); - var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList; + var makeChannel = require_side_channel_weakmap() || getSideChannelMap || getSideChannelList; /** @type {import('.')} */ module.exports = function getSideChannel() { /** @typedef {ReturnType} Channel */ @@ -124662,9 +112941,7 @@ var require_side_channel = /* @__PURE__ */ __commonJSMin(((exports, module) => { /** @type {Channel} */ var channel = { assert: function(key) { - if (!channel.has(key)) { - throw new $TypeError("Side channel does not contain " + inspect(key)); - } + if (!channel.has(key)) throw new $TypeError("Side channel does not contain " + inspect(key)); }, "delete": function(key) { return !!$channelData && $channelData["delete"](key); @@ -124676,16 +112953,13 @@ var require_side_channel = /* @__PURE__ */ __commonJSMin(((exports, module) => { return !!$channelData && $channelData.has(key); }, set: function(key, value) { - if (!$channelData) { - $channelData = makeChannel(); - } + if (!$channelData) $channelData = makeChannel(); $channelData.set(key, value); } }; return channel; }; })); - //#endregion //#region ../node_modules/qs/lib/formats.js var require_formats = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -124709,7 +112983,6 @@ var require_formats = /* @__PURE__ */ __commonJSMin(((exports, module) => { RFC3986: Format.RFC3986 }; })); - //#endregion //#region ../node_modules/qs/lib/utils.js var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -124718,9 +112991,7 @@ var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { var isArray = Array.isArray; var hexTable = function() { var array = []; - for (var i = 0; i < 256; ++i) { - array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase()); - } + for (var i = 0; i < 256; ++i) array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase()); return array; }(); var compactQueue = function compactQueue(queue) { @@ -124729,69 +113000,42 @@ var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { var obj = item.obj[item.prop]; if (isArray(obj)) { var compacted = []; - for (var j = 0; j < obj.length; ++j) { - if (typeof obj[j] !== "undefined") { - compacted.push(obj[j]); - } - } + for (var j = 0; j < obj.length; ++j) if (typeof obj[j] !== "undefined") compacted.push(obj[j]); item.obj[item.prop] = compacted; } } }; var arrayToObject = function arrayToObject(source, options) { var obj = options && options.plainObjects ? { __proto__: null } : {}; - for (var i = 0; i < source.length; ++i) { - if (typeof source[i] !== "undefined") { - obj[i] = source[i]; - } - } + for (var i = 0; i < source.length; ++i) if (typeof source[i] !== "undefined") obj[i] = source[i]; return obj; }; var merge = function merge(target, source, options) { - if (!source) { - return target; - } + if (!source) return target; if (typeof source !== "object" && typeof source !== "function") { - if (isArray(target)) { - target.push(source); - } else if (target && typeof target === "object") { - if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) { - target[source] = true; - } - } else { - return [target, source]; - } + if (isArray(target)) target.push(source); + else if (target && typeof target === "object") { + if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) target[source] = true; + } else return [target, source]; return target; } - if (!target || typeof target !== "object") { - return [target].concat(source); - } + if (!target || typeof target !== "object") return [target].concat(source); var mergeTarget = target; - if (isArray(target) && !isArray(source)) { - mergeTarget = arrayToObject(target, options); - } + if (isArray(target) && !isArray(source)) mergeTarget = arrayToObject(target, options); if (isArray(target) && isArray(source)) { source.forEach(function(item, i) { if (has.call(target, i)) { var targetItem = target[i]; - if (targetItem && typeof targetItem === "object" && item && typeof item === "object") { - target[i] = merge(targetItem, item, options); - } else { - target.push(item); - } - } else { - target[i] = item; - } + if (targetItem && typeof targetItem === "object" && item && typeof item === "object") target[i] = merge(targetItem, item, options); + else target.push(item); + } else target[i] = item; }); return target; } return Object.keys(source).reduce(function(acc, key) { var value = source[key]; - if (has.call(acc, key)) { - acc[key] = merge(acc[key], value, options); - } else { - acc[key] = value; - } + if (has.call(acc, key)) acc[key] = merge(acc[key], value, options); + else acc[key] = value; return acc; }, mergeTarget); }; @@ -124803,9 +113047,7 @@ var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; var decode = function(str, defaultDecoder, charset) { var strWithoutPlus = str.replace(/\+/g, " "); - if (charset === "iso-8859-1") { - return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); - } + if (charset === "iso-8859-1") return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape); try { return decodeURIComponent(strWithoutPlus); } catch (e) { @@ -124813,112 +113055,94 @@ var require_utils$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } }; var limit = 1024; - var encode = function encode(str, defaultEncoder, charset, kind, format) { - if (str.length === 0) { - return str; - } - var string = str; - if (typeof str === "symbol") { - string = Symbol.prototype.toString.call(str); - } else if (typeof str !== "string") { - string = String(str); - } - if (charset === "iso-8859-1") { - return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) { - return "%26%23" + parseInt($0.slice(2), 16) + "%3B"; - }); - } - var out = ""; - for (var j = 0; j < string.length; j += limit) { - var segment = string.length >= limit ? string.slice(j, j + limit) : string; - var arr = []; - for (var i = 0; i < segment.length; ++i) { - var c = segment.charCodeAt(i); - if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats.RFC1738 && (c === 40 || c === 41)) { - arr[arr.length] = segment.charAt(i); - continue; - } - if (c < 128) { - arr[arr.length] = hexTable[c]; - continue; - } - if (c < 2048) { - arr[arr.length] = hexTable[192 | c >> 6] + hexTable[128 | c & 63]; - continue; - } - if (c < 55296 || c >= 57344) { - arr[arr.length] = hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]; - continue; + module.exports = { + arrayToObject, + assign, + combine: function combine(a, b) { + return [].concat(a, b); + }, + compact: function compact(value) { + var queue = [{ + obj: { o: value }, + prop: "o" + }]; + var refs = []; + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj = item.obj[item.prop]; + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) { + queue.push({ + obj, + prop: key + }); + refs.push(val); + } } - i += 1; - c = 65536 + ((c & 1023) << 10 | segment.charCodeAt(i) & 1023); - arr[arr.length] = hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]; } - out += arr.join(""); - } - return out; - }; - var compact = function compact(value) { - var queue = [{ - obj: { o: value }, - prop: "o" - }]; - var refs = []; - for (var i = 0; i < queue.length; ++i) { - var item = queue[i]; - var obj = item.obj[item.prop]; - var keys = Object.keys(obj); - for (var j = 0; j < keys.length; ++j) { - var key = keys[j]; - var val = obj[key]; - if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) { - queue.push({ - obj, - prop: key - }); - refs.push(val); + compactQueue(queue); + return value; + }, + decode, + encode: function encode(str, defaultEncoder, charset, kind, format) { + if (str.length === 0) return str; + var string = str; + if (typeof str === "symbol") string = Symbol.prototype.toString.call(str); + else if (typeof str !== "string") string = String(str); + if (charset === "iso-8859-1") return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) { + return "%26%23" + parseInt($0.slice(2), 16) + "%3B"; + }); + var out = ""; + for (var j = 0; j < string.length; j += limit) { + var segment = string.length >= limit ? string.slice(j, j + limit) : string; + var arr = []; + for (var i = 0; i < segment.length; ++i) { + var c = segment.charCodeAt(i); + if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats.RFC1738 && (c === 40 || c === 41)) { + arr[arr.length] = segment.charAt(i); + continue; + } + if (c < 128) { + arr[arr.length] = hexTable[c]; + continue; + } + if (c < 2048) { + arr[arr.length] = hexTable[192 | c >> 6] + hexTable[128 | c & 63]; + continue; + } + if (c < 55296 || c >= 57344) { + arr[arr.length] = hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]; + continue; + } + i += 1; + c = 65536 + ((c & 1023) << 10 | segment.charCodeAt(i) & 1023); + arr[arr.length] = hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]; } + out += arr.join(""); } - } - compactQueue(queue); - return value; - }; - var isRegExp = function isRegExp(obj) { - return Object.prototype.toString.call(obj) === "[object RegExp]"; - }; - var isBuffer = function isBuffer(obj) { - if (!obj || typeof obj !== "object") { - return false; - } - return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); - }; - var combine = function combine(a, b) { - return [].concat(a, b); - }; - var maybeMap = function maybeMap(val, fn) { - if (isArray(val)) { - var mapped = []; - for (var i = 0; i < val.length; i += 1) { - mapped.push(fn(val[i])); + return out; + }, + isBuffer: function isBuffer(obj) { + if (!obj || typeof obj !== "object") return false; + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); + }, + isRegExp: function isRegExp(obj) { + return Object.prototype.toString.call(obj) === "[object RegExp]"; + }, + maybeMap: function maybeMap(val, fn) { + if (isArray(val)) { + var mapped = []; + for (var i = 0; i < val.length; i += 1) mapped.push(fn(val[i])); + return mapped; } - return mapped; - } - return fn(val); - }; - module.exports = { - arrayToObject, - assign, - combine, - compact, - decode, - encode, - isBuffer, - isRegExp, - maybeMap, + return fn(val); + }, merge }; })); - //#endregion //#region ../node_modules/qs/lib/stringify.js var require_stringify$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -124958,7 +113182,7 @@ var require_stringify$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { encodeDotInKeys: false, encoder: utils.encode, encodeValuesOnly: false, - filter: void undefined, + filter: void 0, format: defaultFormat, formatter: formats.formatters[defaultFormat], indices: false, @@ -124977,72 +113201,45 @@ var require_stringify$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { var tmpSc = sideChannel; var step = 0; var findFlag = false; - while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) { + while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) { var pos = tmpSc.get(object); step += 1; - if (typeof pos !== "undefined") { - if (pos === step) { - throw new RangeError("Cyclic object value"); - } else { - findFlag = true; - } - } - if (typeof tmpSc.get(sentinel) === "undefined") { - step = 0; - } - } - if (typeof filter === "function") { - obj = filter(prefix, obj); - } else if (obj instanceof Date) { - obj = serializeDate(obj); - } else if (generateArrayPrefix === "comma" && isArray(obj)) { - obj = utils.maybeMap(obj, function(value) { - if (value instanceof Date) { - return serializeDate(value); - } - return value; - }); - } + if (typeof pos !== "undefined") if (pos === step) throw new RangeError("Cyclic object value"); + else findFlag = true; + if (typeof tmpSc.get(sentinel) === "undefined") step = 0; + } + if (typeof filter === "function") obj = filter(prefix, obj); + else if (obj instanceof Date) obj = serializeDate(obj); + else if (generateArrayPrefix === "comma" && isArray(obj)) obj = utils.maybeMap(obj, function(value) { + if (value instanceof Date) return serializeDate(value); + return value; + }); if (obj === null) { - if (strictNullHandling) { - return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix; - } + if (strictNullHandling) return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, "key", format) : prefix; obj = ""; } if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) { - if (encoder) { - var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format); - return [formatter(keyValue) + "=" + formatter(encoder(obj, defaults.encoder, charset, "value", format))]; - } + if (encoder) return [formatter(encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, "key", format)) + "=" + formatter(encoder(obj, defaults.encoder, charset, "value", format))]; return [formatter(prefix) + "=" + formatter(String(obj))]; } var values = []; - if (typeof obj === "undefined") { - return values; - } + if (typeof obj === "undefined") return values; var objKeys; if (generateArrayPrefix === "comma" && isArray(obj)) { - if (encodeValuesOnly && encoder) { - obj = utils.maybeMap(obj, encoder); - } - objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void undefined }]; - } else if (isArray(filter)) { - objKeys = filter; - } else { + if (encodeValuesOnly && encoder) obj = utils.maybeMap(obj, encoder); + objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }]; + } else if (isArray(filter)) objKeys = filter; + else { var keys = Object.keys(obj); objKeys = sort ? keys.sort(sort) : keys; } var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, "%2E") : String(prefix); var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + "[]" : encodedPrefix; - if (allowEmptyArrays && isArray(obj) && obj.length === 0) { - return adjustedPrefix + "[]"; - } + if (allowEmptyArrays && isArray(obj) && obj.length === 0) return adjustedPrefix + "[]"; for (var j = 0; j < objKeys.length; ++j) { var key = objKeys[j]; var value = typeof key === "object" && key && typeof key.value !== "undefined" ? key.value : obj[key]; - if (skipNulls && value === null) { - continue; - } + if (skipNulls && value === null) continue; var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, "%2E") : String(key); var keyPrefix = isArray(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + encodedKey : "[" + encodedKey + "]"); sideChannel.set(object, step); @@ -125053,45 +113250,25 @@ var require_stringify$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { return values; }; var normalizeStringifyOptions = function normalizeStringifyOptions(opts) { - if (!opts) { - return defaults; - } - if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") { - throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided"); - } - if (typeof opts.encodeDotInKeys !== "undefined" && typeof opts.encodeDotInKeys !== "boolean") { - throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided"); - } - if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") { - throw new TypeError("Encoder has to be a function."); - } + if (!opts) return defaults; + if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided"); + if (typeof opts.encodeDotInKeys !== "undefined" && typeof opts.encodeDotInKeys !== "boolean") throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided"); + if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") throw new TypeError("Encoder has to be a function."); var charset = opts.charset || defaults.charset; - if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") { - throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); - } + if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); var format = formats["default"]; if (typeof opts.format !== "undefined") { - if (!has.call(formats.formatters, opts.format)) { - throw new TypeError("Unknown format option provided."); - } + if (!has.call(formats.formatters, opts.format)) throw new TypeError("Unknown format option provided."); format = opts.format; } var formatter = formats.formatters[format]; var filter = defaults.filter; - if (typeof opts.filter === "function" || isArray(opts.filter)) { - filter = opts.filter; - } + if (typeof opts.filter === "function" || isArray(opts.filter)) filter = opts.filter; var arrayFormat; - if (opts.arrayFormat in arrayPrefixGenerators) { - arrayFormat = opts.arrayFormat; - } else if ("indices" in opts) { - arrayFormat = opts.indices ? "indices" : "repeat"; - } else { - arrayFormat = defaults.arrayFormat; - } - if ("commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") { - throw new TypeError("`commaRoundTrip` must be a boolean, or absent"); - } + if (opts.arrayFormat in arrayPrefixGenerators) arrayFormat = opts.arrayFormat; + else if ("indices" in opts) arrayFormat = opts.indices ? "indices" : "repeat"; + else arrayFormat = defaults.arrayFormat; + if ("commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") throw new TypeError("`commaRoundTrip` must be a boolean, or absent"); var allowDots = typeof opts.allowDots === "undefined" ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; return { addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults.addQueryPrefix, @@ -125128,39 +113305,25 @@ var require_stringify$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { objKeys = filter; } var keys = []; - if (typeof obj !== "object" || obj === null) { - return ""; - } + if (typeof obj !== "object" || obj === null) return ""; var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat]; var commaRoundTrip = generateArrayPrefix === "comma" && options.commaRoundTrip; - if (!objKeys) { - objKeys = Object.keys(obj); - } - if (options.sort) { - objKeys.sort(options.sort); - } + if (!objKeys) objKeys = Object.keys(obj); + if (options.sort) objKeys.sort(options.sort); var sideChannel = getSideChannel(); for (var i = 0; i < objKeys.length; ++i) { var key = objKeys[i]; var value = obj[key]; - if (options.skipNulls && value === null) { - continue; - } + if (options.skipNulls && value === null) continue; pushToArray(keys, stringify(value, key, generateArrayPrefix, commaRoundTrip, options.allowEmptyArrays, options.strictNullHandling, options.skipNulls, options.encodeDotInKeys, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel)); } var joined = keys.join(options.delimiter); var prefix = options.addQueryPrefix === true ? "?" : ""; - if (options.charsetSentinel) { - if (options.charset === "iso-8859-1") { - prefix += "utf8=%26%2310003%3B&"; - } else { - prefix += "utf8=%E2%9C%93&"; - } - } + if (options.charsetSentinel) if (options.charset === "iso-8859-1") prefix += "utf8=%26%2310003%3B&"; + else prefix += "utf8=%E2%9C%93&"; return joined.length > 0 ? prefix + joined : ""; }; })); - //#endregion //#region ../node_modules/qs/lib/parse.js var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -125196,12 +113359,8 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { }); }; var parseArrayValue = function(val, options, currentArrayLength) { - if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) { - return val.split(","); - } - if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) { - throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array."); - } + if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) return val.split(","); + if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array."); return val; }; var isoSentinel = "utf8=%26%2310003%3B"; @@ -125210,31 +113369,22 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { var obj = { __proto__: null }; var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str; cleanStr = cleanStr.replace(/%5B/gi, "[").replace(/%5D/gi, "]"); - var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; + var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit; var parts = cleanStr.split(options.delimiter, options.throwOnLimitExceeded ? limit + 1 : limit); - if (options.throwOnLimitExceeded && parts.length > limit) { - throw new RangeError("Parameter limit exceeded. Only " + limit + " parameter" + (limit === 1 ? "" : "s") + " allowed."); - } + if (options.throwOnLimitExceeded && parts.length > limit) throw new RangeError("Parameter limit exceeded. Only " + limit + " parameter" + (limit === 1 ? "" : "s") + " allowed."); var skipIndex = -1; var i; var charset = options.charset; if (options.charsetSentinel) { - for (i = 0; i < parts.length; ++i) { - if (parts[i].indexOf("utf8=") === 0) { - if (parts[i] === charsetSentinel) { - charset = "utf-8"; - } else if (parts[i] === isoSentinel) { - charset = "iso-8859-1"; - } - skipIndex = i; - i = parts.length; - } + for (i = 0; i < parts.length; ++i) if (parts[i].indexOf("utf8=") === 0) { + if (parts[i] === charsetSentinel) charset = "utf-8"; + else if (parts[i] === isoSentinel) charset = "iso-8859-1"; + skipIndex = i; + i = parts.length; } } for (i = 0; i < parts.length; ++i) { - if (i === skipIndex) { - continue; - } + if (i === skipIndex) continue; var part = parts[i]; var bracketEqualsPos = part.indexOf("]="); var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1; @@ -125249,18 +113399,11 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { return options.decoder(encodedVal, defaults.decoder, charset, "value"); }); } - if (val && options.interpretNumericEntities && charset === "iso-8859-1") { - val = interpretNumericEntities(String(val)); - } - if (part.indexOf("[]=") > -1) { - val = isArray(val) ? [val] : val; - } + if (val && options.interpretNumericEntities && charset === "iso-8859-1") val = interpretNumericEntities(String(val)); + if (part.indexOf("[]=") > -1) val = isArray(val) ? [val] : val; var existing = has.call(obj, key); - if (existing && options.duplicates === "combine") { - obj[key] = utils.combine(obj[key], val); - } else if (!existing || options.duplicates === "last") { - obj[key] = val; - } + if (existing && options.duplicates === "combine") obj[key] = utils.combine(obj[key], val); + else if (!existing || options.duplicates === "last") obj[key] = val; } return obj; }; @@ -125274,30 +113417,24 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { for (var i = chain.length - 1; i >= 0; --i) { var obj; var root = chain[i]; - if (root === "[]" && options.parseArrays) { - obj = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : utils.combine([], leaf); - } else { + if (root === "[]" && options.parseArrays) obj = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : utils.combine([], leaf); + else { obj = options.plainObjects ? { __proto__: null } : {}; var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root; var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, ".") : cleanRoot; var index = parseInt(decodedRoot, 10); - if (!options.parseArrays && decodedRoot === "") { - obj = { 0: leaf }; - } else if (!isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && options.parseArrays && index <= options.arrayLimit) { + if (!options.parseArrays && decodedRoot === "") obj = { 0: leaf }; + else if (!isNaN(index) && root !== decodedRoot && String(index) === decodedRoot && index >= 0 && options.parseArrays && index <= options.arrayLimit) { obj = []; obj[index] = leaf; - } else if (decodedRoot !== "__proto__") { - obj[decodedRoot] = leaf; - } + } else if (decodedRoot !== "__proto__") obj[decodedRoot] = leaf; } leaf = obj; } return leaf; }; var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) { - if (!givenKey) { - return; - } + if (!givenKey) return; var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey; var brackets = /(\[[^[\]]*])/; var child = /(\[[^[\]]*])/g; @@ -125306,9 +113443,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { var keys = []; if (parent) { if (!options.plainObjects && has.call(Object.prototype, parent)) { - if (!options.allowPrototypes) { - return; - } + if (!options.allowPrototypes) return; } keys.push(parent); } @@ -125316,47 +113451,28 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) { i += 1; if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { - if (!options.allowPrototypes) { - return; - } + if (!options.allowPrototypes) return; } keys.push(segment[1]); } if (segment) { - if (options.strictDepth === true) { - throw new RangeError("Input depth exceeded depth option of " + options.depth + " and strictDepth is true"); - } + if (options.strictDepth === true) throw new RangeError("Input depth exceeded depth option of " + options.depth + " and strictDepth is true"); keys.push("[" + key.slice(segment.index) + "]"); } return parseObject(keys, val, options, valuesParsed); }; var normalizeParseOptions = function normalizeParseOptions(opts) { - if (!opts) { - return defaults; - } - if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") { - throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided"); - } - if (typeof opts.decodeDotInKeys !== "undefined" && typeof opts.decodeDotInKeys !== "boolean") { - throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided"); - } - if (opts.decoder !== null && typeof opts.decoder !== "undefined" && typeof opts.decoder !== "function") { - throw new TypeError("Decoder has to be a function."); - } - if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") { - throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); - } - if (typeof opts.throwOnLimitExceeded !== "undefined" && typeof opts.throwOnLimitExceeded !== "boolean") { - throw new TypeError("`throwOnLimitExceeded` option must be a boolean"); - } + if (!opts) return defaults; + if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided"); + if (typeof opts.decodeDotInKeys !== "undefined" && typeof opts.decodeDotInKeys !== "boolean") throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided"); + if (opts.decoder !== null && typeof opts.decoder !== "undefined" && typeof opts.decoder !== "function") throw new TypeError("Decoder has to be a function."); + if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined"); + if (typeof opts.throwOnLimitExceeded !== "undefined" && typeof opts.throwOnLimitExceeded !== "boolean") throw new TypeError("`throwOnLimitExceeded` option must be a boolean"); var charset = typeof opts.charset === "undefined" ? defaults.charset : opts.charset; var duplicates = typeof opts.duplicates === "undefined" ? defaults.duplicates : opts.duplicates; - if (duplicates !== "combine" && duplicates !== "first" && duplicates !== "last") { - throw new TypeError("The duplicates option must be either combine, first, or last"); - } - var allowDots = typeof opts.allowDots === "undefined" ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots; + if (duplicates !== "combine" && duplicates !== "first" && duplicates !== "last") throw new TypeError("The duplicates option must be either combine, first, or last"); return { - allowDots, + allowDots: typeof opts.allowDots === "undefined" ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots, allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays, allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults.allowPrototypes, allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults.allowSparse, @@ -125381,9 +113497,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; module.exports = function(str, opts) { var options = normalizeParseOptions(opts); - if (str === "" || str === null || typeof str === "undefined") { - return options.plainObjects ? { __proto__: null } : {}; - } + if (str === "" || str === null || typeof str === "undefined") return options.plainObjects ? { __proto__: null } : {}; var tempObj = typeof str === "string" ? parseValues(str, options) : str; var obj = options.plainObjects ? { __proto__: null } : {}; var keys = Object.keys(tempObj); @@ -125392,26 +113506,21 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { var newObj = parseKeys(key, tempObj[key], options, typeof str === "string"); obj = utils.merge(obj, newObj, options); } - if (options.allowSparse === true) { - return obj; - } + if (options.allowSparse === true) return obj; return utils.compact(obj); }; })); - //#endregion //#region ../node_modules/qs/lib/index.js var require_lib$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { var stringify = require_stringify$1(); var parse = require_parse$2(); - var formats = require_formats(); module.exports = { - formats, + formats: require_formats(), parse, stringify }; })); - //#endregion //#region ../utils/pan/baidu2.js /** @@ -125459,9 +113568,7 @@ var BaiduDrive = class { * @returns {Promise} */ async init() { - if (this.cookie) { - console.log("百度网盘cookie获取成功" + this.cookie); - } + if (this.cookie) console.log("百度网盘cookie获取成功" + this.cookie); } /** * 获取百度网盘Cookie @@ -125489,8 +113596,7 @@ var BaiduDrive = class { * @returns {Promise} 签名字符串 */ async getSign() { - let data = (await axios$1.get(`${this.api}/share/tplconfig?surl=${this.surl}&fields=Espace_info,card_info,sign,timestamp&view_mode=${this.view_mode}&channel=${this.channel}&web=1&app_id=${this.app_id}`, { headers: this.headers })).data; - return data.data.sign; + return (await axios$1.get(`${this.api}/share/tplconfig?surl=${this.surl}&fields=Espace_info,card_info,sign,timestamp&view_mode=${this.view_mode}&channel=${this.channel}&web=1&app_id=${this.app_id}`, { headers: this.headers })).data.data.sign; } /** * 获取分享数据的主入口方法 @@ -125522,14 +113628,10 @@ var BaiduDrive = class { return randsk; } else { let cookie = this.cookie.split(";").map((it) => { - if (/BDCLND/.test(it)) { - it = BDCLND; - } + if (/BDCLND/.test(it)) it = BDCLND; return it; }).join(";"); - if (cookie !== this.cookie) { - ENV.set("baidu_cookie", cookie); - } + if (cookie !== this.cookie) ENV.set("baidu_cookie", cookie); return randsk; } } @@ -125548,9 +113650,7 @@ var BaiduDrive = class { this.uk = data.uk; this.shareid = data.share_id; data.list.map((item) => { - if (item.category === "6" || item.category === 6) { - dirs.push(item.path); - } + if (item.category === "6" || item.category === 6) dirs.push(item.path); if (item.category === "1" || item.category === 1) { const fileName = item.server_filename || item.path.split("/").pop(); videos.push({ @@ -125562,19 +113662,13 @@ var BaiduDrive = class { }); } }); - if (!(data.title in file) && data.title !== undefined) { - file[data.title] = []; - } - if (videos.length >= 0 && data.title !== undefined) { - file[data.title] = [...videos]; - } + if (!(data.title in file) && data.title !== void 0) file[data.title] = []; + if (videos.length >= 0 && data.title !== void 0) file[data.title] = [...videos]; let result = await Promise.all(dirs.map(async (path) => this.getSharepath(path))); - result = result.filter((item) => item !== undefined && item !== null).flat(); + result = result.filter((item) => item !== void 0 && item !== null).flat(); if (result.length >= 0) { const processedResult = result.map((item) => { - if (item.name && item.name.includes("/")) { - item.name = item.name.split("/").pop(); - } + if (item.name && item.name.includes("/")) item.name = item.name.split("/").pop(); return item; }); file[data.title].push(...processedResult); @@ -125595,9 +113689,7 @@ var BaiduDrive = class { let dirs = []; let videos = []; data.list.map((item) => { - if (item.category === "6" || item.category === 6) { - dirs.push(item.path); - } + if (item.category === "6" || item.category === 6) dirs.push(item.path); if (item.category === "1" || item.category === 1) { const fileName = item.server_filename || item.path.split("/").pop(); videos.push({ @@ -125610,11 +113702,9 @@ var BaiduDrive = class { } }); let result = await Promise.all(dirs.map(async (path) => this.getSharepath(path))); - result = result.filter((item) => item !== undefined && item !== null); + result = result.filter((item) => item !== void 0 && item !== null); const processedResult = result.map((item) => { - if (item.name && item.name.includes("/")) { - item.name = item.name.split("/").pop(); - } + if (item.name && item.name.includes("/")) item.name = item.name.split("/").pop(); return item; }); return [...videos, ...processedResult.flat()]; @@ -125633,7 +113723,7 @@ var BaiduDrive = class { log("[baidu2][getShareUrl] path:", path); let sign = await this.getSign(); let urls = []; - let t = Math.floor(new Date() / 1e3); + let t = Math.floor(/* @__PURE__ */ new Date() / 1e3); this.type.map((it) => { urls.push({ name: it.replace("M3U8_AUTO_", ""), @@ -125647,8 +113737,7 @@ var BaiduDrive = class { * @returns {Promise} 用户UID */ async getUid() { - let data = (await axios$1.get("https://mbd.baidu.com/userx/v1/info/get?appname=baiduboxapp&fields=%20%20%20%20%20%20%20%20%5B%22bg_image%22,%22member%22,%22uid%22,%22avatar%22,%20%22avatar_member%22%5D&client&clientfrom&lang=zh-cn&tpl&ttt", { headers: this.headers })).data; - return data.data.fields.uid; + return (await axios$1.get("https://mbd.baidu.com/userx/v1/info/get?appname=baiduboxapp&fields=%20%20%20%20%20%20%20%20%5B%22bg_image%22,%22member%22,%22uid%22,%22avatar%22,%20%22avatar_member%22%5D&client&clientfrom&lang=zh-cn&tpl&ttt", { headers: this.headers })).data.data.fields.uid; } /** * SHA1哈希计算 @@ -125673,17 +113762,14 @@ var BaiduDrive = class { let uid = await this.getUid(); let header = Object.assign({}, this.headers, { "User-Agent": "netdisk;P2SP;2.2.91.136;android-android;" }); let devuid = "73CED981D0F186D12BC18CAE1684FFD5|VSRCQTF6W"; - let time = String(new Date().getTime()); + let time = String((/* @__PURE__ */ new Date()).getTime()); let rand = this.sha1(this.sha1(this.cookie.match(/BDUSS=(.+?);/)[1]) + uid + "ebrcUYiuxaZv2XGu7KIYKxUrqfnOfpDF" + time + devuid + "11.30.2ae5821440fab5e1a61a025f014bd8972"); - let url = this.api + "/share/list?shareid=" + shareid + "&uk=" + uk + "&fid=" + fsid + "&sekey=" + BDCLND + "&origin=dlna&devuid=" + devuid + "&clienttype=1&channel=android_12_zhao_bd-netdisk_1024266h&version=11.30.2&time=" + time + "&rand=" + rand; + let url = this.api + "/share/list?shareid=" + shareid + "&uk=" + uk + "&fid=" + fsid + "&sekey=" + BDCLND + "&origin=dlna&devuid=73CED981D0F186D12BC18CAE1684FFD5|VSRCQTF6W&clienttype=1&channel=android_12_zhao_bd-netdisk_1024266h&version=11.30.2&time=" + time + "&rand=" + rand; let data = (await axios$1.get(url, { headers: header })).data; - if (data.errno === 0 && data.list.length > 0) { - return data.list[0].dlink; - } + if (data.errno === 0 && data.list.length > 0) return data.list[0].dlink; } }; const Baidu2$1 = new BaiduDrive(); - //#endregion //#region ../utils/pan/cloud.js /** @@ -125724,17 +113810,10 @@ var CloudDrive = class { * 检查账号、密码、Cookie配置,如果Cookie不存在则自动登录 */ async init() { - if (this.account) { - console.log("天翼账号获取成功:" + this.account); - } - if (this.password) { - console.log("天翼密码获取成功:" + this.password); - } - if (this.cookie) { - console.log("天翼cookie获取成功" + this.cookie); - } else { - ENV.set("cloud_cookie", await this.login(this.account, this.password)); - } + if (this.account) console.log("天翼账号获取成功:" + this.account); + if (this.password) console.log("天翼密码获取成功:" + this.password); + if (this.cookie) console.log("天翼cookie获取成功" + this.cookie); + else ENV.set("cloud_cookie", await this.login(this.account, this.password)); } /** * 获取天翼云盘账号 @@ -125821,9 +113900,7 @@ var CloudDrive = class { }); cookies += "; " + resp.headers["set-cookie"].map((it) => it.split(";")[0]).join(";"); ENV.set("cloud_cookie", cookies); - } else { - console.error("Error during login:", resp.data); - } + } else console.error("Error during login:", resp.data); } catch (error) { console.error("Error during login:", error); } @@ -125845,9 +113922,7 @@ var CloudDrive = class { const accessCodeMatch = this.shareCode.match(/访问码:([a-zA-Z0-9]+)/); this.accessCode = accessCodeMatch ? accessCodeMatch[1] : ""; } - if (accessCode) { - this.accessCode = accessCode; - } + if (accessCode) this.accessCode = accessCode; } /** * 获取分享数据 @@ -125861,30 +113936,17 @@ var CloudDrive = class { let fileId = await this.getShareInfo(shareUrl, accessCode); if (fileId) { let fileList = await this.getShareList(fileId); - if (fileList && Array.isArray(fileList)) { - await Promise.all(fileList.map(async (item) => { - if (!(item.name in file)) { - file[item.name] = []; - } - let fileData = await this.getShareFile(item.id); - if (fileData && fileData.length > 0) { - file[item.name].push(...fileData); - } - })); - } else { - file["root"] = await this.getShareFile(fileId); - } - } - for (let key in file) { - if (file[key].length === 0) { - delete file[key]; - } + if (fileList && Array.isArray(fileList)) await Promise.all(fileList.map(async (item) => { + if (!(item.name in file)) file[item.name] = []; + let fileData = await this.getShareFile(item.id); + if (fileData && fileData.length > 0) file[item.name].push(...fileData); + })); + else file["root"] = await this.getShareFile(fileId); } + for (let key in file) if (file[key].length === 0) delete file[key]; if (Object.keys(file).length === 0) { file["root"] = await this.getShareFile(fileId); - if (file["root"] && Array.isArray(file["root"])) { - file["root"] = file["root"].filter((item) => item && Object.keys(item).length > 0); - } + if (file["root"] && Array.isArray(file["root"])) file["root"] = file["root"].filter((item) => item && Object.keys(item).length > 0); } return file; } @@ -125904,11 +113966,8 @@ var CloudDrive = class { * @returns {Promise} 文件ID */ async getShareInfo(shareUrl, accessCode) { - if (shareUrl.startsWith("http")) { - await this.getShareID(shareUrl, accessCode); - } else { - this.shareCode = shareUrl; - } + if (shareUrl.startsWith("http")) await this.getShareID(shareUrl, accessCode); + else this.shareCode = shareUrl; try { if (accessCode) { let check = await axios$1.get(`${this.api}/open/share/checkAccessCode.action?shareCode=${this.shareCode}&accessCode=${this.accessCode}`, { headers: { @@ -125917,9 +113976,7 @@ var CloudDrive = class { "accept-encoding": "gzip, deflate, br, zstd", "accept-language": "zh-CN,zh;q=0.9" } }); - if (check.status === 200) { - this.shareId = check.data.shareId; - } + if (check.status === 200) this.shareId = check.data.shareId; let resp = await axios$1.get(`${this.api}/open/share/getShareInfoByCodeV2.action?key=noCache&shareCode=${this.shareCode}`, { headers: { "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36", "accept": "application/json;charset=UTF-8", @@ -125964,12 +114021,8 @@ var CloudDrive = class { headers }; let resp = await _fetch(`${this.api}/open/share/listShareDir.action?key=noCache&pageNum=1&pageSize=120&fileId=${fileId}&shareDirFileId=${fileId}&isFolder=${this.isFolder}&shareId=${this.shareId}&shareMode=${this.shareMode}&iconOption=5&orderBy=filename&descending=false&accessCode=${this.accessCode}&noCache=${Math.random()}`, options); - let json = JsonBig.parse(await resp.text()); - const data = json?.fileListAO; - let folderList = data?.folderList; - if (!folderList) { - return null; - } + let folderList = (JsonBig.parse(await resp.text())?.fileListAO)?.folderList; + if (!folderList) return null; let names = folderList.map((item) => item.name); let ids = folderList.map((item) => item.id); if (folderList && folderList.length > 0) { @@ -125981,7 +114034,7 @@ var CloudDrive = class { }); }); let result = await Promise.all(ids.map(async (id) => this.getShareList(id))); - result = result.filter((item) => item !== undefined && item !== null); + result = result.filter((item) => item !== void 0 && item !== null); return [...videos, ...result.flat()]; } } catch (e) { @@ -126008,22 +114061,16 @@ var CloudDrive = class { let videos = []; const data = json?.fileListAO; let fileList = data?.fileList; - if (!fileList) { - return null; - } + if (!fileList) return null; let filename = fileList.map((item) => item.name); let ids = fileList.map((item) => item.id); let count = data.fileListSize; if (count >= 0) { - for (let i = 0; i < count; i++) { - if (fileList[i].mediaType === 3) { - videos.push({ - name: filename[i], - fileId: ids[i], - shareId: this.shareId - }); - } - } + for (let i = 0; i < count; i++) if (fileList[i].mediaType === 3) videos.push({ + name: filename[i], + fileId: ids[i], + shareId: this.shareId + }); } return videos; } catch (e) { @@ -126057,11 +114104,8 @@ var CloudDrive = class { } }); let link = ""; - if (location.status >= 300 && location.status < 400 && location.headers.location) { - link = location.headers.location; - } else { - link = resp.data.normal.url; - } + if (location.status >= 300 && location.status < 400 && location.headers.location) link = location.headers.location; + else link = resp.data.normal.url; return link; } catch (error) { if (error.response && error.response.status === 400 && this.index < 2) { @@ -126070,306 +114114,13 @@ var CloudDrive = class { ENV.set("cloud_cookie", ""); this.index += 1; return await this.getShareUrl(fileId, shareId); - } else { - console.error("Error during getShareUrl:", error.message, error.response ? error.response.status : "N/A"); - } + } else console.error("Error during getShareUrl:", error.message, error.response ? error.response.status : "N/A"); } finally { - if (this.index >= 2) { - this.index = 0; - } + if (this.index >= 2) this.index = 0; } } }; const Cloud$1 = new CloudDrive(); - -//#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, out; - len = str.length; - 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); - const decrypted = CryptoJS.RC4.decrypt({ ciphertext }, key_data, { - mode: CryptoJS.mode.ECB, - padding: CryptoJS.pad.Pkcs7 - }); - return decrypted.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/pan/pan123.js /** @@ -126391,12 +114142,10 @@ var Pan123 = class { * 初始化方法,检查登录状态 */ async init() { - if (!this.auth) { - try { - await this.login(); - } catch (error) { - console.error("登录失败:", error.message); - } + if (!this.auth) try { + await this.login(); + } catch (error) { + console.error("登录失败:", error.message); } } get passport() { @@ -126440,32 +114189,19 @@ var Pan123 = class { this.SharePwd = ""; url = url.replace(/^`|`$/g, ""); url = decodeURIComponent(url); - if (url.indexOf("提取码") > 0 && url.indexOf("?") < 0) { - url = url.replace(/提取码:|提取码|提取码:/g, "?"); - } - if (url.indexOf("提取码") > 0 && url.indexOf("?") > 0) { - url = url.replace(/提取码:|提取码|提取码:/g, ""); - } - if (url.indexOf(":") > 0) { - url = url.replace(":", ""); - } + if (url.indexOf("提取码") > 0 && url.indexOf("?") < 0) url = url.replace(/提取码:|提取码|提取码:/g, "?"); + if (url.indexOf("提取码") > 0 && url.indexOf("?") > 0) url = url.replace(/提取码:|提取码|提取码:/g, ""); + if (url.indexOf(":") > 0) url = url.replace(":", ""); const matches = this.regex.exec(url); if (url.indexOf("?") > 0) { - const queryString = url.split("?")[1]; - const pwdMatch = queryString.match(/pwd=([^&]+)/i); - if (pwdMatch && pwdMatch[1]) { - this.SharePwd = pwdMatch[1]; - } + const pwdMatch = url.split("?")[1].match(/pwd=([^&]+)/i); + if (pwdMatch && pwdMatch[1]) this.SharePwd = pwdMatch[1]; } if (matches) { let shareKey = ""; - if (matches[2].indexOf("?") > 0) { - shareKey = matches[2].split("?")[0]; - } else if (matches[2].indexOf("html") > 0) { - shareKey = matches[2].replace(".html", ""); - } else { - shareKey = matches[2].match(/www/g) ? matches[1] : matches[2]; - } + if (matches[2].indexOf("?") > 0) shareKey = matches[2].split("?")[0]; + else if (matches[2].indexOf("html") > 0) shareKey = matches[2].replace(".html", ""); + else shareKey = matches[2].match(/www/g) ? matches[1] : matches[2]; return shareKey; } return null; @@ -126479,16 +114215,12 @@ var Pan123 = class { let file = {}; try { let videos = await this.getShareInfo(shareKey, this.SharePwd, 0, 0); - if (videos && Array.isArray(videos)) { - videos.forEach((video) => { - if (video.Category === 2) { - if (!(video.FileName in file)) { - file[video.FileName] = []; - } - file[video.FileName].push(video); - } - }); - } + if (videos && Array.isArray(videos)) videos.forEach((video) => { + if (video.Category === 2) { + if (!(video.FileName in file)) file[video.FileName] = []; + file[video.FileName].push(video); + } + }); } catch (error) { console.error("获取文件列表失败:", error.message); } @@ -126513,16 +114245,10 @@ var Pan123 = class { let infoList = info.InfoList; let folders = infoList.filter((item) => item.Category === 0); let videos = infoList.filter((item) => item.Category === 2); - if (videos.length > 0) { - cate.push(...videos); - } - if (folders.length > 0) { - for (let item of folders) { - let subCate = await this.getShareInfo(shareKey, SharePwd, 0, item.FileId); - if (subCate && subCate.length > 0) { - cate.push(...subCate); - } - } + if (videos.length > 0) cate.push(...videos); + if (folders.length > 0) for (let item of folders) { + let subCate = await this.getShareInfo(shareKey, SharePwd, 0, item.FileId); + if (subCate && subCate.length > 0) cate.push(...subCate); } } } catch (error) { @@ -126547,20 +114273,16 @@ var Pan123 = class { url: link, headers: {} })).data; - if (infoList.code === 0 && infoList.data) { - infoList.data.InfoList.forEach((it) => { - if (it.Category === 2) { - video.push({ - ShareKey: shareKey, - FileId: it.FileId, - S3KeyFlag: it.S3KeyFlag, - Size: it.Size, - Etag: it.Etag, - FileName: it.FileName - }); - } + if (infoList.code === 0 && infoList.data) infoList.data.InfoList.forEach((it) => { + if (it.Category === 2) video.push({ + ShareKey: shareKey, + FileId: it.FileId, + S3KeyFlag: it.S3KeyFlag, + Size: it.Size, + Etag: it.Etag, + FileName: it.FileName }); - } + }); } catch (error) { console.error("获取分享文件列表失败:", error.message); } @@ -126598,14 +114320,10 @@ var Pan123 = class { }; let response = await axios$1.request(config); if (response.data && response.data.code === 0 && response.data.data && response.data.data.DownloadURL) { - let down = response.data.data; - let downloadUrl = down.DownloadURL; - let url = new URL(downloadUrl); - let params = url.searchParams.get("params"); - if (params) { - let decodedUrl = base64Decode$2(params); - return decodedUrl; - } else { + let downloadUrl = response.data.data.DownloadURL; + let params = new URL(downloadUrl).searchParams.get("params"); + if (params) return base64Decode$2(params); + else { console.error("下载链接缺少params参数"); return downloadUrl; } @@ -126650,12 +114368,10 @@ var Pan123 = class { if (down?.video_play_info) { let videoinfo = []; down.video_play_info.forEach((item) => { - if (item.url !== "") { - videoinfo.push({ - name: item.resolution, - url: item.url - }); - } + if (item.url !== "") videoinfo.push({ + name: item.resolution, + url: item.url + }); }); return videoinfo; } @@ -126666,7 +114382,6 @@ var Pan123 = class { } }; const Pan$1 = new Pan123(); - //#endregion //#region ../utils/pan/quark.js /** @@ -126767,15 +114482,11 @@ var QuarkHandler = class { */ getShareData(url) { let matches = this.regex.exec(url); - if (matches.indexOf("?") > 0) { - matches = matches.split("?")[0]; - } - if (matches) { - return { - shareId: matches[1], - folderId: "0" - }; - } + if (matches.indexOf("?") > 0) matches = matches.split("?")[0]; + if (matches) return { + shareId: matches[1], + folderId: "0" + }; return null; } /** @@ -126788,21 +114499,8 @@ var QuarkHandler = class { * @returns {Promise} */ async initQuark() { - if (this.token) { - let exp = JSON.parse(import_crypto_js.default.enc.Base64.parse(this.token.split(".")[1]).toString(import_crypto_js.default.enc.Utf8)); - let now = Math.floor(Date.now() / 1e3); - if (exp.exp < now) { - console.log("登录状态已过期,重新登录,请及时更换Token"); - } else { - console.log("登录成功,继续使用,可使用时间截止到:" + new Date(exp.exp * 1e3).toLocaleString()); - console.log("QuarkTV token获取成功:" + this.token); - } - } - if (this.cookie) { - console.log("cookie 获取成功"); - } else { - console.log("cookie 获取失败"); - } + if (this.cookie) console.log("cookie 获取成功"); + else console.log("cookie 获取失败"); } /** * 最长公共子序列算法(LCS) @@ -126822,13 +114520,11 @@ var QuarkHandler = class { * // 返回: { length: 7, sequence: 'hello ', offset: 0 } */ lcs(str1, str2) { - if (!str1 || !str2) { - return { - length: 0, - sequence: "", - offset: 0 - }; - } + if (!str1 || !str2) return { + length: 0, + sequence: "", + offset: 0 + }; var sequence = ""; var str1Length = str1.length; var str2Length = str2.length; @@ -126837,33 +114533,22 @@ var QuarkHandler = class { var lastSubsBegin = 0; for (var i = 0; i < str1Length; i++) { var subArray = new Array(str2Length); - for (var j = 0; j < str2Length; j++) { - subArray[j] = 0; - } + for (var j = 0; j < str2Length; j++) subArray[j] = 0; num[i] = subArray; } var thisSubsBegin = null; - for (i = 0; i < str1Length; i++) { - for (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 (i = 0; i < str1Length; i++) for (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); } } } @@ -126906,14 +114591,11 @@ var QuarkHandler = 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 }; } @@ -126954,13 +114636,13 @@ var QuarkHandler = class { Object.assign(headers, { Cookie: cookie }); method = method || "post"; let link = `${this.apiUrl}/${url}`; - const resp = method === "get" ? await req$1.get(link, { headers }).catch((err) => { + const resp = method === "get" ? await reqs.get(link, { headers }).catch((err) => { console.error(err.message); return err.response || { status: 500, data: {} }; - }) : await req$1.post(link, data, { headers }).catch((err) => { + }) : await reqs.post(link, data, { headers }).catch((err) => { console.error(err.message); return err.response || { status: 500, @@ -127023,8 +114705,8 @@ var QuarkHandler = class { return; } const listData = await this.api(`file/sort?${this.pr}&pdir_fid=0&_page=1&_size=200&_sort=file_type:asc,updated_at:desc`, {}, {}, "get"); - if (listData.data && listData.data.list) for (const item of listData.data.list) { - if (item.file_name === this.saveDirName) { + if (listData.data && listData.data.list) { + for (const item of listData.data.list) if (item.file_name === this.saveDirName) { this.saveDirId = item.fid; await this.clearSaveDir(); break; @@ -127038,9 +114720,7 @@ var QuarkHandler = class { dir_init_lock: false }); console.log(create); - if (create.data && create.data.fid) { - this.saveDirId = create.data.fid; - } + if (create.data && create.data.fid) this.saveDirId = create.data.fid; } } /** @@ -127064,9 +114744,7 @@ var QuarkHandler = class { pwd_id: shareData.shareId, passcode: shareData.sharePwd || "" }); - if (shareToken.data && shareToken.data.stoken) { - this.shareTokenCache[shareData.shareId] = shareToken.data; - } + if (shareToken.data && shareToken.data.stoken) this.shareTokenCache[shareData.shareId] = shareToken.data; } } /** @@ -127105,42 +114783,29 @@ var QuarkHandler = class { const items = listData.data.list; if (!items) return []; const subDir = []; - for (const item of items) { - if (item.dir === true) { - subDir.push(item); - } else if (item.file === true && item?.video_height) { - let text = /[#|'"\[\]&<>]/g; - if (item.size < 1024 * 1024 * 5) continue; - item.stoken = this.shareTokenCache[shareData.shareId].stoken; - item.file_name = text.test(item.file_name) ? item.file_name.replace(text, "") : item.file_name; - videos.push(item); - } else if (item.type === "file" && this.subtitleExts.some((x) => item.file_name.endsWith(x))) { - subtitles.push(item); - } - } + for (const item of items) if (item.dir === true) subDir.push(item); + else if (item.file === true && item?.video_height) { + let text = /[#|'"\[\]&<>]/g; + if (item.size < 1024 * 1024 * 5) continue; + item.stoken = this.shareTokenCache[shareData.shareId].stoken; + item.file_name = text.test(item.file_name) ? item.file_name.replace(text, "") : item.file_name; + videos.push(item); + } else if (item.type === "file" && this.subtitleExts.some((x) => item.file_name.endsWith(x))) subtitles.push(item); if (page < Math.ceil(listData.metadata._total / prePage)) { const nextItems = await listFile(shareId, folderId, page + 1); - for (const item of nextItems) { - items.push(item); - } + for (const item of nextItems) items.push(item); } for (const dir of subDir) { const subItems = await listFile(shareId, dir.fid); - 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) => { - var matchSubtitle = this.findBestLCS(item, subtitles); - if (matchSubtitle.bestMatch) { - item.subtitle = matchSubtitle.bestMatch.target; - } - }); - } + if (subtitles.length > 0) videos.forEach((item) => { + var matchSubtitle = this.findBestLCS(item, subtitles); + if (matchSubtitle.bestMatch) item.subtitle = matchSubtitle.bestMatch.target; + }); return videos; } /** @@ -127163,9 +114828,7 @@ var QuarkHandler = 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; if (!stoken) { @@ -127181,20 +114844,15 @@ var QuarkHandler = class { pdir_fid: "0", scene: "link" }); - if (saveResult.data && saveResult.data.task_id) { - if (saveResult.data.task_resp.data.save_as.save_as_top_fids.length > 0) { - return saveResult.data.task_resp.data.save_as.save_as_top_fids[0]; - } else { - let retry = 0; - while (true) { - const taskResult = await this.api(`task?${this.pr}&task_id=${saveResult.data.task_id}&retry_index=${retry}`, {}, {}, "get"); - if (taskResult.data && taskResult.data.save_as && taskResult.data.save_as.save_as_top_fids && taskResult.data.save_as.save_as_top_fids.length > 0) { - return taskResult.data.save_as.save_as_top_fids[0]; - } - retry++; - if (retry > 5) break; - await this.delay(1e3); - } + if (saveResult.data && saveResult.data.task_id) if (saveResult.data.task_resp.data.save_as.save_as_top_fids.length > 0) return saveResult.data.task_resp.data.save_as.save_as_top_fids[0]; + else { + let retry = 0; + while (true) { + const taskResult = await this.api(`task?${this.pr}&task_id=${saveResult.data.task_id}&retry_index=${retry}`, {}, {}, "get"); + if (taskResult.data && taskResult.data.save_as && taskResult.data.save_as.save_as_top_fids && taskResult.data.save_as.save_as_top_fids.length > 0) return taskResult.data.save_as.save_as_top_fids[0]; + retry++; + if (retry > 5) break; + await this.delay(1e3); } } return true; @@ -127213,7 +114871,7 @@ var QuarkHandler = class { */ async refreshQuarkCookie(from = "") { const nowCookie = this.cookie; - const cookieSelfRes = await axios({ + const resCookie = (await axios({ url: "https://drive-pc.quark.cn/1/clouddrive/file/sort?pr=ucpro&fr=pc&uc_param_str=&pdir_fid=0&_page=1&_size=50&_fetch_total=1&_fetch_sub_dirs=0&_sort=file_type:asc,updated_at:desc", method: "GET", headers: { @@ -127222,9 +114880,7 @@ var QuarkHandler = class { Referer: "https://pan.quark.cn/", Cookie: nowCookie } - }); - const cookieResDataSelf = cookieSelfRes.headers; - const resCookie = cookieResDataSelf["set-cookie"]; + })).headers["set-cookie"]; if (!resCookie) { console.log(`${from}自动更新夸克 cookie: 没返回新的cookie`); return; @@ -127260,14 +114916,11 @@ var QuarkHandler = class { "referer": "https://pan.quark.cn/", "Cookie": low_cookie }; - const test_result = await this.testSupport(low_url, low_headers); - if (!test_result[0]) { - try { - await this.refreshQuarkCookie("getLiveTranscoding"); - } catch (e) { - console.log(`getLiveTranscoding:自动刷新夸克cookie失败:${e.message}`); - console.error(e); - } + if (!(await this.testSupport(low_url, low_headers))[0]) try { + await this.refreshQuarkCookie("getLiveTranscoding"); + } catch (e) { + console.log(`getLiveTranscoding:自动刷新夸克cookie失败:${e.message}`); + console.error(e); } return transcoding.data.video_list; } @@ -127283,40 +114936,6 @@ var QuarkHandler = class { const data = method + "&" + pathname + "&" + timestamp + "&" + key; return import_crypto_js.default.SHA256(data).toString(); } - async refreshToken() { - let data = JSON.stringify({ - "req_id": reqId, - "app_ver": this.conf.appVer, - "device_id": deviceID, - "device_brand": "OPPO", - "platform": "tv", - "device_name": "PCRT00", - "device_model": "PCRT00", - "build_device": "aosp", - "build_product": "PCRT00", - "device_gpu": "Adreno%20(TM)%20640", - "activity_rect": "%7B%7D", - "channel": this.conf.channel, - "refresh_token": this.token - }); - let config = { - method: "POST", - url: "http://api.extscreen.com/quarkdrive", - headers: { - "User-Agent": "Mozilla/5.0 (Linux; U; Android 7.1.2; zh-cn; PCRT00 Build/N2G47O) AppleWebKit/533.1 (KHTML, like Gecko) Mobile Safari/533.1", - "Connection": "Keep-Alive", - "Accept-Encoding": "gzip", - "Content-Type": "application/json", - "Cookie": "sl-session=VIaxTAKF8mdJBhU2uda0zA==" - }, - data - }; - let req = await axios.request(config); - if (req.status === 200) { - ENV.set("uc_token_cookie", req.data.data.refresh_token); - return await this.getDownload(shareId, stoken, fileId, fileToken, clean); - } - } async getDownload(shareId, stoken, fileId, fileToken, clean) { await this.initQuark(); if (!this.saveFileIdCaches[fileId]) { @@ -127391,8 +115010,7 @@ var QuarkHandler = class { }], "return_msg_as_list": 1 }; - let shareData = (await axios.post(`https://drive-social-api.quark.cn/1/clouddrive/chat/conv/msg/batch_send?${fr}`, send_data, { headers: header })).data; - if (shareData.data.send_msg_list.length > 0) { + if ((await axios.post(`https://drive-social-api.quark.cn/1/clouddrive/chat/conv/msg/batch_send?${fr}`, send_data, { headers: header })).data.data.send_msg_list.length > 0) { let data = JSON.stringify({ "fids": [this.saveFileIdCaches[fileId]], "speedup_session": "" @@ -127410,17 +115028,79 @@ var QuarkHandler = class { } return video; } - } else { - return [{ - name: "", - url: undefined - }]; - } + } else return [{ + name: "", + url: void 0 + }]; } return null; } + async getToken() { + let t = Math.floor((/* @__PURE__ */ new Date()).getTime() / 1e3); + let data = JSON.stringify({ + "conversation_id": "300000" + t, + "conversation_type": 3, + "msg_id": t + "000" + }); + let config = { + method: "POST", + url: "https://drive-social-api.quark.cn/1/clouddrive/chat/conv/file/acquire_dl_token?pr=ucpro&fr=pc&sys=darwin&ve=3.19", + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) quark-cloud-drive/3.23.2 Chrome/112.0.5615.165 Electron/24.1.3.8 Safari/537.36 Channel/pckk_other_ch", + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Content-Type": "application/json", + "accept-language": "zh-CN", + "origin": "https://pan.quark.cn", + "sec-fetch-dest": "empty", + "sec-fetch-mode": "cors", + "sec-fetch-site": "cross-site", + "sec-ch-ua": "\"Not:A-Brand\";v=\"99\", \"Chromium\";v=\"112\"", + "sec-ch-ua-mobile": "?0", + "sec-ch-ua-platform": "\"Windows\"", + "referer": "https://pan.quark.cn/", + "Cookie": "_UP_A4A_11_=wb9ce1f8a7f74209b248cb5877a6a876; _UP_D_=pc; tfstk=gy2rZY6dQTBPmYbgblDFQOhX71M-pv7_ZJgIxkqnV40oVYZ3gkZN2Da7x2PEoyIJFYbJK2qTkbguRYTFLrko97gIP2kUvPSf5O6_2uHKEN_1C6GsZ4kK-9MhGxcbeD-R5O6_quHKKN__NjmeBVnnK0co-Ejq2qmoxy0oiEmZXv03-yj4mqnnK24nKirmkDDn-ycsi2063cllqNA0iO9nAbugqqJU2-ooaQEoupv33dGrSyg2Kp2q2kJ_DBpNOVVtPfguot9rLomUufNP7LzUxlFngJ8lVP40TymYMwRE7Wq76-GXxG0geo2tnj6Gbo2YPue4AHXncPg028DFIGHrE4DqDJ_vE2P0t8G-pUbEJ-r0EWSz_enc4z2LaeAEZmnq5iSVbveZi_88v3Rp9bFx0VsR2BdKZmnq5iS29BhoDmu10i5..; __uid=AARfyLe8Bke3UGL2FjhvNQn6; __sdid=AATHIp7rA8mvfKhhMvPnt0milUEzXi1ReJN0CjChc4LeUA6qYUdYA32jmaL/Lk2AA4s=; __pus=bd604e2725229c945e994c227de77f1cAASVpc7pXsTooap3JBI0XiJI9JU/JUngO9SJCOIRNOLXngLdOfozAiiwF9CnY/xOiEgE8NvKDDg1ZAwX7nVqe9H2ib5aMTAi+a2DfaPE6/6Won1vUOAfKCNELRmJOeYhVn3/eQUYx6B9EIw9HCYjQoKVh76daPI2lnp3QBTK/5zWGya9rVul08y86xpY3APre7I=; __kp=eb241d80-1ee6-11f1-85bf-6167dfcf1acd; __kuus=NenaSYNIw/O9SzABV2HtnjTDoH5aJthk7nOgDdt9pHeaJmMkCD/TY+jVFIrCn+WeFaQVR9h+E/YoStTBZAtB9va0ghzlZCgNuddki8Z8WOnYug==; __puus=2baf96cce907422be5e242bb1d280977AATi54Q/fKnsA5nM/iG/TZHL12hYZj/ELuUFbEwO/2jIXaSGwmvXppDKCITu73rdsZ1hRR0cY2QRpWdM0o+nFv65fCf5ZwPIaGHvUK9BOg3653jTngpTAj41u8kq5vTIDnPDPGWlYPYiUehDbyYBwxKYl12BFSjonkfKybr3Fpc2TYQcm566OQTrPzsupcOkOoa8CQllYvsoVyEBF2ZpiX/5" + }, + data + }; + let html = await axios.request(config); + if (html.status === 200) return html.data.data.token; + } + async getUrl(shareId, stoken, fileId, fileToken) { + await this.initQuark(); + let token = await this.getToken(); + let data = JSON.stringify({ + "fids": [fileId], + "fids_token": [fileToken], + "pwd_id": shareId, + "stoken": stoken, + "speedup_session": "", + "token": token + }); + let config = { + method: "POST", + url: "https://drive-pc.quark.cn/1/clouddrive/file/download?pr=ucpro&fr=pc", + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) quark-cloud-drive/3.20.0 Chrome/112.0.5615.165 Electron/24.1.3.8 Safari/537.36 Channel/pckk_other_ch", + "Connection": "keep-alive", + "Accept": "*/*,application/json;charset=utf-8", + "Accept-Encoding": "gzip, deflate, br, zstd", + "Content-Type": "application/json", + "Cookie": "b-user-id=7a421e0c-2ff4-1251-4069-cdfbfedcaf8d; _UP_A4A_11_=wb9cf15ce78d47ed921a9fab3faa85e8; xlly_s=1; __sdid=AAQCvlprpJtHMDSTmliW7CTXaxFJONVhZZyKc8NgJ6Y+XH4iO1v3Q8gYFeEi2hqeV4U=; _UP_D_=pc; __pus=97012d074b8d70d6eeaeb7dbe3fcb05dAAQB4QUahCaghYFA9y/NYud63QbrjWpcO/mp4OgGcA2UZ5O+VMUlfCpacaDzbRBV2O/DK9y9iAFBUL7iPmzdj2d9; __kp=ea759a90-1ed1-11f1-8f67-e7e56f2ee996; __kps=AARfyLe8Bke3UGL2FjhvNQn6; __ktd=axb8KS+96BcSmmEd+gddqg==; __uid=AARfyLe8Bke3UGL2FjhvNQn6; __puus=c6ca8123ab4024f139092c58678de061AATi54Q/fKnsA5nM/iG/TZHLzf8buD1i2D3OKKcgKFxmYvTq9ypLK3mbAQlXFlJz6zEGV7aROE4eXsRbMGviOH4EpwIMv8HZ3UUDPfRoIVsx+mV9xMqXujCxpQR96l9Alpe2B15pFBZl94/lBMSORn+M/cocX9mAe2wX82JvYhQYO46JRC1evvevyyyzaai9ItKcf72BRC6QzioBIic/XHI8; isg=BDg4TjMppS-k-Mk0_qdGtZTlCebKoZwrBz4YK3KgQXMmjdJ3GrWXu63lQY093VQD; tfstk=gTJiuT2wCC5_fZaEErWsOziN8jlKBO6X3EeAktQqTw7Ckctv0ty2knBOgVtv-Z7F2SJA0f_cTUs7_CCZSemDWnwA7NpAns8RR5Rx5qtFmULRuiSqcMkeuUYcGc_AuZYv0CnKeYK6ft62o4H-emTk0mLcbsyaLmScDPod_tj5i4Wqy4HL9k5sWt-TUIxGLH7CmiyNuEWULi7Ubl8V76zFqg6VuE8VTWSRcGPN7N-UTwsV3Z8V3DXFRiXVuEWqxHllpf763pJErkLuNeO_cCsGsa-N7nKvLPWT1nQ33-JHt1brQw243pjM09gPi8cAzQ_Owa8EpRXDYiYhwC0uIEx2VI5HnPo9zeRDuMOIoSbkghdWp6E4_HvcS_JNtoiJ4hs2usAIr8IGBBfkICib8h8RSQW6Du09x_AhNM5Um5W9w3pfadkgPwC5mefJs42MzglbT7y5t-sEDpPbG1SCxapyAdOShopf3Dm3am1NAG_-xDVbG1SCxannx7kf_Ms1y" + }, + data + }; + let html = await axios.request(config).catch((e) => e); + if (html.status === 200) return html.data.data.map((it) => { + return { + name: it.video_max_resolution, + url: it.download_url + }; + }); + } async testSupport(url, headers) { - const resp = await req$1.get(url, { + const resp = await reqs.get(url, { responseType: "stream", headers }).catch((err) => { @@ -127452,15 +115132,11 @@ var QuarkHandler = class { if (file === keepKey) continue; const dir = join(this.cacheRoot, file); fs.stat(dir, (_, stats) => { - if (stats && stats.isDirectory()) { - fs.readdir(dir, (_, subFiles) => { - if (subFiles) for (const subFile of subFiles) { - if (!subFile.endsWith(".p")) { - fs.rm(join(dir, subFile), { recursive: true }, () => {}); - } - } - }); - } + if (stats && stats.isDirectory()) fs.readdir(dir, (_, subFiles) => { + if (subFiles) { + for (const subFile of subFiles) if (!subFile.endsWith(".p")) fs.rm(join(dir, subFile), { recursive: true }, () => {}); + } + }); }); } }); @@ -127484,18 +115160,14 @@ var QuarkHandler = class { } let exist = true; await fs.promises.access(join(this.cacheRoot, urlKey)).catch((_) => exist = false); - if (!exist) { - await fs.promises.mkdir(join(this.cacheRoot, urlKey), { recursive: true }); - } + if (!exist) await fs.promises.mkdir(join(this.cacheRoot, urlKey), { recursive: true }); const contentLength = parseInt(this.urlHeadCache[urlKey]["content-length"]); let byteStart = 0; let byteEnd = contentLength - 1; const streamHeader = {}; if (inReq.headers.range) { const ranges = inReq.headers.range.trim().split(/=|-/); - if (ranges.length > 2 && ranges[2]) { - byteEnd = parseInt(ranges[2]); - } + if (ranges.length > 2 && ranges[2]) byteEnd = parseInt(ranges[2]); byteStart = parseInt(ranges[1]); Object.assign(streamHeader, this.urlHeadCache[urlKey]); streamHeader["content-length"] = (byteEnd - byteStart + 1).toString(); @@ -127518,73 +115190,70 @@ var QuarkHandler = class { let chunkReadIdx = chunkDownIdx; let stop = false; const dlFiles = {}; - for (let i = 0; i < poolSize && i < chunkCount; i++) { - new Promise((resolve) => { - (async function doDLTask(spChunkIdx) { - if (stop || chunkDownIdx >= chunkCount) { - resolve(); - return; - } - if (spChunkIdx === undefined && (chunkDownIdx - chunkReadIdx) * chunkSize >= this.maxCache) { - setTimeout(doDLTask, 5); - return; - } - const chunkIdx = spChunkIdx || chunkDownIdx++; - const taskId = `${inReq.id}-${chunkIdx}`; - try { - const dlFile = join(this.cacheRoot, urlKey, `${inReq.id}-${chunkIdx}.p`); - let exist = true; - await fs.promises.access(dlFile).catch((_) => exist = false); - if (!exist) { - const start = chunkIdx * chunkSize; - const end = Math.min(contentLength - 1, (chunkIdx + 1) * chunkSize - 1); - console.log(inReq.id, chunkIdx); - const dlResp = await req$1.get(url, { - responseType: "stream", - timeout, - headers: Object.assign({ Range: `bytes=${start}-${end}` }, headers) + for (let i = 0; i < poolSize && i < chunkCount; i++) new Promise((resolve) => { + (async function doDLTask(spChunkIdx) { + if (stop || chunkDownIdx >= chunkCount) { + resolve(); + return; + } + if (spChunkIdx === void 0 && (chunkDownIdx - chunkReadIdx) * chunkSize >= this.maxCache) { + setTimeout(doDLTask, 5); + return; + } + const chunkIdx = spChunkIdx || chunkDownIdx++; + const taskId = `${inReq.id}-${chunkIdx}`; + try { + const dlFile = join(this.cacheRoot, urlKey, `${inReq.id}-${chunkIdx}.p`); + let exist = true; + await fs.promises.access(dlFile).catch((_) => exist = false); + if (!exist) { + const start = chunkIdx * chunkSize; + const end = Math.min(contentLength - 1, (chunkIdx + 1) * chunkSize - 1); + console.log(inReq.id, chunkIdx); + const dlResp = await reqs.get(url, { + responseType: "stream", + timeout, + headers: Object.assign({ Range: `bytes=${start}-${end}` }, headers) + }); + const dlCache = join(this.cacheRoot, urlKey, `${inReq.id}-${chunkIdx}.dl`); + const writer = fs.createWriteStream(dlCache); + const readTimeout = setTimeout(() => { + writer.destroy(/* @__PURE__ */ new Error(`${taskId} read timeout`)); + }, timeout); + const downloaded = new Promise((resolve) => { + writer.on("finish", async () => { + if (stop) await fs.promises.rm(dlCache).catch((e) => console.error(e)); + else { + await fs.promises.rename(dlCache, dlFile).catch((e) => console.error(e)); + dlFiles[taskId] = dlFile; + } + resolve(true); }); - const dlCache = join(this.cacheRoot, urlKey, `${inReq.id}-${chunkIdx}.dl`); - const writer = fs.createWriteStream(dlCache); - const readTimeout = setTimeout(() => { - writer.destroy(new Error(`${taskId} read timeout`)); - }, timeout); - const downloaded = new Promise((resolve) => { - writer.on("finish", async () => { - if (stop) { - await fs.promises.rm(dlCache).catch((e) => console.error(e)); - } else { - await fs.promises.rename(dlCache, dlFile).catch((e) => console.error(e)); - dlFiles[taskId] = dlFile; - } - resolve(true); - }); - writer.on("error", async (e) => { - console.error(e); - await fs.promises.rm(dlCache).catch((e1) => console.error(e1)); - resolve(false); - }); + writer.on("error", async (e) => { + console.error(e); + await fs.promises.rm(dlCache).catch((e1) => console.error(e1)); + resolve(false); }); - dlResp.data.pipe(writer); - const result = await downloaded; - clearTimeout(readTimeout); - if (!result) { - setTimeout(() => { - doDLTask(chunkIdx); - }, 15); - return; - } + }); + dlResp.data.pipe(writer); + const result = await downloaded; + clearTimeout(readTimeout); + if (!result) { + setTimeout(() => { + doDLTask(chunkIdx); + }, 15); + return; } - setTimeout(doDLTask, 5); - } catch (error) { - console.error(error); - setTimeout(() => { - doDLTask(chunkIdx); - }, 15); } - })(); - }); - } + setTimeout(doDLTask, 5); + } catch (error) { + console.error(error); + setTimeout(() => { + doDLTask(chunkIdx); + }, 15); + } + })(); + }); outResp.headers(streamHeader); const stream = new PassThrough(); new Promise((resolve) => { @@ -127616,11 +115285,9 @@ var QuarkHandler = class { await fd.close().catch((e) => console.error(e)); await fs.promises.rm(dlFile).catch((e) => console.error(e)); writeMore = stream.write(buffer); - if (!writeMore) { - stream.once("drain", () => { - writeMore = true; - }); - } + if (!writeMore) stream.once("drain", () => { + writeMore = true; + }); chunkReadIdx++; setTimeout(waitReadFile, 5); } catch (error) { @@ -127641,15 +115308,9 @@ var QuarkHandler = class { } }; const Quark$1 = new QuarkHandler(); - //#endregion //#region ../utils/pan/uc.js /** -* UC网盘处理器模块 -* 提供UC网盘分享链接解析、文件下载、转存等功能 -* @module uc-handler -*/ -/** * UC网盘处理器类 * 负责处理UC网盘的各种操作,包括分享链接解析、文件下载、转存等 */ @@ -127717,15 +115378,11 @@ var UCHandler = class { */ getShareData(url) { let matches = this.regex.exec(url); - if (matches[1].indexOf("?") > 0) { - matches[1] = matches[1].split("?")[0]; - } - if (matches) { - return { - shareId: matches[1], - folderId: "0" - }; - } + if (matches[1].indexOf("?") > 0) matches[1] = matches[1].split("?")[0]; + if (matches) return { + shareId: matches[1], + folderId: "0" + }; return null; } /** @@ -127734,11 +115391,19 @@ var UCHandler = class { * @param {Object} cfg - 配置对象 */ async initUC(db, cfg) { - if (this.cookie) { - console.log("cookie 获取成功"); - } else { - console.log("cookie 获取失败"); + if (this.token) { + let exp = JSON.parse(import_crypto_js.default.enc.Base64.parse(this.token.split(".")[1]).toString(import_crypto_js.default.enc.Utf8)); + let now = Math.floor(Date.now() / 1e3); + if (exp.exp < now) { + console.log("登录状态已过期,尝试刷新Token"); + await this.refreshUcToken(); + } else { + console.log("登录成功,继续使用,可使用时间截止到:" + (/* @__PURE__ */ new Date(exp.exp * 1e3)).toLocaleString()); + console.log("UC TV token获取成功:" + this.token); + } } + if (this.cookie) console.log("cookie 获取成功"); + else console.log("cookie 获取失败"); } /** * 最长公共子序列算法 @@ -127748,13 +115413,11 @@ var UCHandler = class { * @returns {Object} 包含长度、序列和偏移量的对象 */ lcs(str1, str2) { - if (!str1 || !str2) { - return { - length: 0, - sequence: "", - offset: 0 - }; - } + if (!str1 || !str2) return { + length: 0, + sequence: "", + offset: 0 + }; var sequence = ""; var str1Length = str1.length; var str2Length = str2.length; @@ -127763,33 +115426,22 @@ var UCHandler = class { var lastSubsBegin = 0; for (var i = 0; i < str1Length; i++) { var subArray = new Array(str2Length); - for (var j = 0; j < str2Length; j++) { - subArray[j] = 0; - } + for (var j = 0; j < str2Length; j++) subArray[j] = 0; num[i] = subArray; } var thisSubsBegin = null; - for (i = 0; i < str1Length; i++) { - for (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 (i = 0; i < str1Length; i++) for (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); } } } @@ -127815,14 +115467,11 @@ var UCHandler = 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 }; } @@ -127853,13 +115502,13 @@ var UCHandler = class { Cookie: this.cookie || "" }); method = method || "post"; - const resp = method === "get" ? await req$1.get(`${this.apiUrl}/${url}`, { headers }).catch((err) => { + const resp = method === "get" ? await reqs.get(`${this.apiUrl}/${url}`, { headers }).catch((err) => { console.error(err); return err.response || { status: 500, data: {} }; - }) : await req$1.post(`${this.apiUrl}/${url}`, data, { headers }).catch((err) => { + }) : await reqs.post(`${this.apiUrl}/${url}`, data, { headers }).catch((err) => { console.error(err); return err.response || { status: 500, @@ -127899,8 +115548,8 @@ var UCHandler = class { return; } const listData = await this.api(`file/sort?${this.pr}&pdir_fid=0&_page=1&_size=200&_sort=file_type:asc,updated_at:desc`, {}, {}, "get"); - if (listData.data && listData.data.list) for (const item of listData.data.list) { - if (item.file_name === this.saveDirName) { + if (listData.data && listData.data.list) { + for (const item of listData.data.list) if (item.file_name === this.saveDirName) { this.saveDirId = item.fid; await this.clearSaveDir(); break; @@ -127914,9 +115563,7 @@ var UCHandler = class { dir_init_lock: false }); console.log(create); - if (create.data && create.data.fid) { - this.saveDirId = create.data.fid; - } + if (create.data && create.data.fid) this.saveDirId = create.data.fid; } } /** @@ -127931,9 +115578,7 @@ var UCHandler = class { pwd_id: shareData.shareId, passcode: shareData.sharePwd || "" }); - if (shareToken.data && shareToken.data.stoken) { - this.shareTokenCache[shareData.shareId] = shareToken.data; - } + if (shareToken.data && shareToken.data.stoken) this.shareTokenCache[shareData.shareId] = shareToken.data; } } /** @@ -127964,40 +115609,29 @@ var UCHandler = class { const items = listData.data.list; if (!items) return []; const subDir = []; - for (const item of items) { - if (item.dir === true) { - subDir.push(item); - } else if (item.file === true && item.obj_category === "video") { - if (item.size < 1024 * 1024 * 5) continue; - item.stoken = this.shareTokenCache[shareData.shareId].stoken; - videos.push(item); - } else if (item.type === "file" && this.subtitleExts.some((x) => item.file_name.endsWith(x))) { - subtitles.push(item); - } - } + for (const item of items) if (item.dir === true) subDir.push(item); + else if (item.file === true && item.obj_category === "video") { + let text = /[#|'"\[\]&<>]/g; + if (item.size < 1024 * 1024 * 5) continue; + item.stoken = this.shareTokenCache[shareData.shareId].stoken; + item.file_name = text.test(item.file_name) ? item.file_name.replace(text, "") : item.file_name; + videos.push(item); + } else if (item.type === "file" && this.subtitleExts.some((x) => item.file_name.endsWith(x))) subtitles.push(item); if (page < Math.ceil(listData.metadata._total / prePage)) { const nextItems = await listFile(shareId, folderId, page + 1); - for (const item of nextItems) { - items.push(item); - } + for (const item of nextItems) items.push(item); } for (const dir of subDir) { const subItems = await listFile(shareId, dir.fid); - 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) => { - var matchSubtitle = this.findBestLCS(item, subtitles); - if (matchSubtitle.bestMatch) { - item.subtitle = matchSubtitle.bestMatch.target; - } - }); - } + if (subtitles.length > 0) videos.forEach((item) => { + var matchSubtitle = this.findBestLCS(item, subtitles); + if (matchSubtitle.bestMatch) item.subtitle = matchSubtitle.bestMatch.target; + }); return videos; } /** @@ -128014,9 +115648,7 @@ var UCHandler = 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; if (!stoken) { @@ -128036,9 +115668,7 @@ var UCHandler = class { let retry = 0; while (true) { const taskResult = await this.api(`task?${this.pr}&task_id=${saveResult.data.task_id}&retry_index=${retry}`, {}, {}, "get"); - if (taskResult.data && taskResult.data.save_as && taskResult.data.save_as.save_as_top_fids && taskResult.data.save_as.save_as_top_fids.length > 0) { - return taskResult.data.save_as.save_as_top_fids[0]; - } + if (taskResult.data && taskResult.data.save_as && taskResult.data.save_as.save_as_top_fids && taskResult.data.save_as.save_as_top_fids.length > 0) return taskResult.data.save_as.save_as_top_fids[0]; retry++; if (retry > 5) break; await this.delay(1e3); @@ -128057,14 +115687,12 @@ var UCHandler = class { resolutions: "normal,low,high,super,2k,4k", supports: "fmp4" }); - if (transcoding.data && transcoding.data.video_list) { - return transcoding.data.video_list; - } + if (transcoding.data && transcoding.data.video_list) return transcoding.data.video_list; return null; } async refreshUcCookie(from = "") { const nowCookie = this.cookie; - const cookieSelfRes = await axios({ + const resCookie = (await axios({ url: "https://pc-api.uc.cn/1/clouddrive/config?pr=UCBrowser&fr=pc", method: "GET", headers: { @@ -128073,9 +115701,7 @@ var UCHandler = class { Referer: "https://drive.uc.cn/", Cookie: nowCookie } - }); - const cookieResDataSelf = cookieSelfRes.headers; - const resCookie = cookieResDataSelf["set-cookie"]; + })).headers["set-cookie"]; if (!resCookie) { console.log(`${from}自动更新UC cookie: 没返回新的cookie`); return; @@ -128101,7 +115727,48 @@ var UCHandler = class { const data = method + "&" + pathname + "&" + timestamp + "&" + key; return import_crypto_js.default.SHA256(data).toString(); } + async refreshUcToken() { + const timestamp = Math.floor(Date.now() / 1e3).toString() + "000"; + const deviceID = this.Addition.DeviceID || this.generateDeviceID(timestamp); + const reqId = this.generateReqId(deviceID, timestamp); + let data = JSON.stringify({ + "req_id": reqId, + "app_ver": this.conf.appVer, + "device_id": deviceID, + "device_brand": "OPPO", + "platform": "tv", + "device_name": "PCRT00", + "device_model": "PCRT00", + "build_device": "aosp", + "build_product": "PCRT00", + "device_gpu": "Adreno%20(TM)%20640", + "activity_rect": "%7B%7D", + "channel": this.conf.channel, + "refresh_token": this.token + }); + let config = { + method: "POST", + url: "http://api.extscreen.com/ucdrive/token", + headers: { + "User-Agent": "Mozilla/5.0 (Linux; U; Android 7.1.2; zh-cn; PCRT00 Build/N2G47O) AppleWebKit/533.1 (KHTML, like Gecko) Mobile Safari/533.1", + "Connection": "Keep-Alive", + "Accept-Encoding": "gzip", + "Content-Type": "application/json", + "Cookie": "sl-session=VIaxTAKF8mdJBhU2uda0zA==" + }, + data + }; + let req = await axios.request(config); + if (req.status === 200) { + console.log("刷新token成功"); + const token = req.data.data.access_token; + let exp = JSON.parse(import_crypto_js.default.enc.Base64.parse(token.split(".")[1]).toString(import_crypto_js.default.enc.Utf8)); + console.log("登录成功,继续使用,可使用时间截止到:" + (/* @__PURE__ */ new Date(exp.exp * 1e3)).toLocaleString()); + ENV.set("uc_token_cookie", token); + } + } async getDownload(shareId, stoken, fileId, fileToken, clean) { + await this.initUC(); if (!this.saveFileIdCaches[fileId]) { const saveFileId = await this.save(shareId, stoken, fileId, fileToken, clean); if (!saveFileId) return null; @@ -128149,8 +115816,7 @@ var UCHandler = class { }; let req = await axios.request(config).catch((err) => err.response); if (req.status === 200) { - let videoInfo = req.data.data.video_info; - videoInfo.forEach((item) => { + req.data.data.video_info.forEach((item) => { video.push({ name: item.resolution, url: item.url @@ -128159,38 +115825,8 @@ var UCHandler = class { return video; } if (req.data.status === -1 || req.data.errno === 10001) { - let data = JSON.stringify({ - "req_id": reqId, - "app_ver": this.conf.appVer, - "device_id": deviceID, - "device_brand": "OPPO", - "platform": "tv", - "device_name": "PCRT00", - "device_model": "PCRT00", - "build_device": "aosp", - "build_product": "PCRT00", - "device_gpu": "Adreno%20(TM)%20640", - "activity_rect": "%7B%7D", - "channel": this.conf.channel, - "refresh_token": this.token - }); - let config = { - method: "POST", - url: "http://api.extscreen.com/ucdrive/token", - headers: { - "User-Agent": "Mozilla/5.0 (Linux; U; Android 7.1.2; zh-cn; PCRT00 Build/N2G47O) AppleWebKit/533.1 (KHTML, like Gecko) Mobile Safari/533.1", - "Connection": "Keep-Alive", - "Accept-Encoding": "gzip", - "Content-Type": "application/json", - "Cookie": "sl-session=VIaxTAKF8mdJBhU2uda0zA==" - }, - data - }; - let req = await axios.request(config); - if (req.status === 200) { - ENV.set("uc_token_cookie", req.data.data.refresh_token); - return await this.getDownload(shareId, stoken, fileId, fileToken, clean); - } + await this.refreshUcToken(); + return await this.getDownload(shareId, stoken, fileId, fileToken, clean); } } else { const down = await this.api(`file/download?${this.pr}`, { fids: [this.saveFileIdCaches[fileId]] }); @@ -128203,12 +115839,12 @@ var UCHandler = class { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) quark-cloud-drive/2.5.20 Chrome/100.0.4896.160 Electron/18.3.5.4-b478491100 Safari/537.36 Channel/pckk_other_ch" }; const test_result = await this.testSupport(low_url, low_headers); - if (!test_result[0]) { - try { - await this.refreshUcCookie("getDownload"); - } catch (e) { - console.log(`getDownload:自动刷新UC cookie失败:${e.message}`); - } + console.log("test_result:", test_result); + if (!test_result[0]) try { + console.log(`getDownload:自动刷新UC cookie`); + await this.refreshUcCookie("getDownload"); + } catch (e) { + console.log(`getDownload:自动刷新UC cookie失败:${e.message}`); } return down.data[0]; } @@ -128217,18 +115853,16 @@ var UCHandler = class { } async getLazyResult(downCache, mediaProxyUrl) { const urls = []; - if (Array.isArray(downCache)) { - downCache.forEach((it) => { - urls.push(it.name, it.url); - }); - } + if (Array.isArray(downCache)) downCache.forEach((it) => { + urls.push(it.name, it.url + "#isVideo=true##fastPlayMode##threads=10#"); + }); return { parse: 0, url: urls }; } async testSupport(url, headers) { - const resp = await req$1.get(url, { + const resp = await reqs.get(url, { responseType: "stream", headers: Object.assign({ Range: "bytes=0-0" }, headers) }).catch((err) => { @@ -128260,15 +115894,11 @@ var UCHandler = class { if (file === keepKey) continue; const dir = join(this.cacheRoot, file); fs.stat(dir, (_, stats) => { - if (stats && stats.isDirectory()) { - fs.readdir(dir, (_, subFiles) => { - if (subFiles) for (const subFile of subFiles) { - if (!subFile.endsWith(".p")) { - fs.rm(join(dir, subFile), { recursive: true }, () => {}); - } - } - }); - } + if (stats && stats.isDirectory()) fs.readdir(dir, (_, subFiles) => { + if (subFiles) { + for (const subFile of subFiles) if (!subFile.endsWith(".p")) fs.rm(join(dir, subFile), { recursive: true }, () => {}); + } + }); }); } }); @@ -128292,18 +115922,14 @@ var UCHandler = class { } let exist = true; await fs.promises.access(join(this.cacheRoot, urlKey)).catch((_) => exist = false); - if (!exist) { - await fs.promises.mkdir(join(this.cacheRoot, urlKey), { recursive: true }); - } + if (!exist) await fs.promises.mkdir(join(this.cacheRoot, urlKey), { recursive: true }); const contentLength = parseInt(this.urlHeadCache[urlKey]["content-length"]); let byteStart = 0; let byteEnd = contentLength - 1; const streamHeader = {}; if (inReq.headers.range) { const ranges = inReq.headers.range.trim().split(/=|-/); - if (ranges.length > 2 && ranges[2]) { - byteEnd = parseInt(ranges[2]); - } + if (ranges.length > 2 && ranges[2]) byteEnd = parseInt(ranges[2]); byteStart = parseInt(ranges[1]); Object.assign(streamHeader, this.urlHeadCache[urlKey]); streamHeader["content-length"] = (byteEnd - byteStart + 1).toString(); @@ -128326,73 +115952,70 @@ var UCHandler = class { let chunkReadIdx = chunkDownIdx; let stop = false; const dlFiles = {}; - for (let i = 0; i < poolSize && i < chunkCount; i++) { - new Promise((resolve) => { - (async function doDLTask(spChunkIdx) { - if (stop || chunkDownIdx >= chunkCount) { - resolve(); - return; - } - if (spChunkIdx === undefined && (chunkDownIdx - chunkReadIdx) * chunkSize >= this.maxCache) { - setTimeout(doDLTask, 5); - return; - } - const chunkIdx = spChunkIdx || chunkDownIdx++; - const taskId = `${inReq.id}-${chunkIdx}`; - try { - const dlFile = join(this.cacheRoot, urlKey, `${inReq.id}-${chunkIdx}.p`); - let exist = true; - await fs.promises.access(dlFile).catch((_) => exist = false); - if (!exist) { - const start = chunkIdx * chunkSize; - const end = Math.min(contentLength - 1, (chunkIdx + 1) * chunkSize - 1); - console.log(inReq.id, chunkIdx); - const dlResp = await req$1.get(url, { - responseType: "stream", - timeout, - headers: Object.assign({ Range: `bytes=${start}-${end}` }, headers) + for (let i = 0; i < poolSize && i < chunkCount; i++) new Promise((resolve) => { + (async function doDLTask(spChunkIdx) { + if (stop || chunkDownIdx >= chunkCount) { + resolve(); + return; + } + if (spChunkIdx === void 0 && (chunkDownIdx - chunkReadIdx) * chunkSize >= this.maxCache) { + setTimeout(doDLTask, 5); + return; + } + const chunkIdx = spChunkIdx || chunkDownIdx++; + const taskId = `${inReq.id}-${chunkIdx}`; + try { + const dlFile = join(this.cacheRoot, urlKey, `${inReq.id}-${chunkIdx}.p`); + let exist = true; + await fs.promises.access(dlFile).catch((_) => exist = false); + if (!exist) { + const start = chunkIdx * chunkSize; + const end = Math.min(contentLength - 1, (chunkIdx + 1) * chunkSize - 1); + console.log(inReq.id, chunkIdx); + const dlResp = await reqs.get(url, { + responseType: "stream", + timeout, + headers: Object.assign({ Range: `bytes=${start}-${end}` }, headers) + }); + const dlCache = join(this.cacheRoot, urlKey, `${inReq.id}-${chunkIdx}.dl`); + const writer = fs.createWriteStream(dlCache); + const readTimeout = setTimeout(() => { + writer.destroy(/* @__PURE__ */ new Error(`${taskId} read timeout`)); + }, timeout); + const downloaded = new Promise((resolve) => { + writer.on("finish", async () => { + if (stop) await fs.promises.rm(dlCache).catch((e) => console.error(e)); + else { + await fs.promises.rename(dlCache, dlFile).catch((e) => console.error(e)); + dlFiles[taskId] = dlFile; + } + resolve(true); }); - const dlCache = join(this.cacheRoot, urlKey, `${inReq.id}-${chunkIdx}.dl`); - const writer = fs.createWriteStream(dlCache); - const readTimeout = setTimeout(() => { - writer.destroy(new Error(`${taskId} read timeout`)); - }, timeout); - const downloaded = new Promise((resolve) => { - writer.on("finish", async () => { - if (stop) { - await fs.promises.rm(dlCache).catch((e) => console.error(e)); - } else { - await fs.promises.rename(dlCache, dlFile).catch((e) => console.error(e)); - dlFiles[taskId] = dlFile; - } - resolve(true); - }); - writer.on("error", async (e) => { - console.error(e); - await fs.promises.rm(dlCache).catch((e1) => console.error(e1)); - resolve(false); - }); + writer.on("error", async (e) => { + console.error(e); + await fs.promises.rm(dlCache).catch((e1) => console.error(e1)); + resolve(false); }); - dlResp.data.pipe(writer); - const result = await downloaded; - clearTimeout(readTimeout); - if (!result) { - setTimeout(() => { - doDLTask(chunkIdx); - }, 15); - return; - } + }); + dlResp.data.pipe(writer); + const result = await downloaded; + clearTimeout(readTimeout); + if (!result) { + setTimeout(() => { + doDLTask(chunkIdx); + }, 15); + return; } - setTimeout(doDLTask, 5); - } catch (error) { - console.error(error); - setTimeout(() => { - doDLTask(chunkIdx); - }, 15); } - })(); - }); - } + setTimeout(doDLTask, 5); + } catch (error) { + console.error(error); + setTimeout(() => { + doDLTask(chunkIdx); + }, 15); + } + })(); + }); outResp.headers(streamHeader); const stream = new PassThrough(); new Promise((resolve) => { @@ -128424,11 +116047,9 @@ var UCHandler = class { await fd.close().catch((e) => console.error(e)); await fs.promises.rm(dlFile).catch((e) => console.error(e)); writeMore = stream.write(buffer); - if (!writeMore) { - stream.once("drain", () => { - writeMore = true; - }); - } + if (!writeMore) stream.once("drain", () => { + writeMore = true; + }); chunkReadIdx++; setTimeout(waitReadFile, 5); } catch (error) { @@ -128454,7 +116075,6 @@ var UCHandler = class { * @type {UCHandler} */ const UC$1 = new UCHandler(); - //#endregion //#region ../utils/pan/yun.js /** @@ -128507,20 +116127,14 @@ var YunDrive = class { if (this.cookie) { console.log("移动cookie获取成功" + this.cookie); const cookie = this.cookie.split(";"); - if (this.authorization === "") { - cookie.forEach((item) => { - if (item.indexOf("authorization") !== -1) { - this.authorization = item.replace("authorization=", ""); - console.log("authorization获取成功:" + this.authorization); - } - }); - } - } else { - console.error("请先获取移动cookie"); - } - if (this.account) { - console.log("移动账号获取成功"); - } + if (this.authorization === "") cookie.forEach((item) => { + if (item.indexOf("authorization") !== -1) { + this.authorization = item.replace("authorization=", ""); + console.log("authorization获取成功:" + this.authorization); + } + }); + } else console.error("请先获取移动cookie"); + if (this.account) console.log("移动账号获取成功"); } /** * 获取移动云盘cookie @@ -128576,12 +116190,12 @@ var YunDrive = class { decrypt(data) { const t = import_crypto_js.default.enc.Base64.parse(data), n = t.clone(), i = n.words.splice(4); n.init(n.words), t.init(i); - const o = import_crypto_js.default.enc.Base64.stringify(t), a = import_crypto_js.default.AES.decrypt(o, this.x, { + const o = import_crypto_js.default.enc.Base64.stringify(t); + return import_crypto_js.default.AES.decrypt(o, this.x, { iv: n, mode: import_crypto_js.default.mode.CBC, padding: import_crypto_js.default.pad.Pkcs7 - }), s = a.toString(import_crypto_js.default.enc.Utf8); - return s.toString(); + }).toString(import_crypto_js.default.enc.Utf8).toString(); } /** * 从分享URL中提取分享ID @@ -128601,9 +116215,7 @@ var YunDrive = class { return; } } - if (matches && matches[3]) { - this.linkID = matches[3]; - } + if (matches && matches[3]) this.linkID = matches[3]; } /** * 获取分享信息 @@ -128620,9 +116232,7 @@ var YunDrive = class { return null; } const cacheKey = `${this.linkID}-${pCaID}`; - if (this.cache[cacheKey]) { - return this.cache[cacheKey]; - } + if (this.cache[cacheKey]) return this.cache[cacheKey]; let data = JSON.stringify(this.encrypt(JSON.stringify({ "getOutLinkInfoReq": { "account": "", @@ -128642,9 +116252,7 @@ var YunDrive = class { }))); try { const resp = await axios$1.post(this.baseUrl + "getOutLinkInfoV6", data, { headers: this.baseHeader }); - if (resp.status !== 200) { - return null; - } + if (resp.status !== 200) return null; const json = JSON.parse(this.decrypt(resp.data)).data; this.cache[cacheKey] = json; return json; @@ -128663,37 +116271,21 @@ var YunDrive = class { * @returns {Promise} 文件结构对象,按目录名分组 */ async getShareData(url) { - if (!url) { - return {}; - } + if (!url) return {}; const isValidUrl = url.startsWith("http"); let pCaID = isValidUrl ? "root" : url; - if (isValidUrl) { - await this.getShareID(url); - } + if (isValidUrl) await this.getShareID(url); let file = {}; let fileInfo = await this.getShareFile(pCaID); - if (fileInfo && Array.isArray(fileInfo)) { - await Promise.all(fileInfo.map(async (item) => { - if (!(item.name in file)) { - file[item.name] = []; - } - let filelist = await this.getShareUrl(item.path); - if (filelist && filelist.length > 0) { - file[item.name].push(...filelist); - } - })); - } - for (let key in file) { - if (file[key].length === 0) { - delete file[key]; - } - } + if (fileInfo && Array.isArray(fileInfo)) await Promise.all(fileInfo.map(async (item) => { + if (!(item.name in file)) file[item.name] = []; + let filelist = await this.getShareUrl(item.path); + if (filelist && filelist.length > 0) file[item.name].push(...filelist); + })); + for (let key in file) if (file[key].length === 0) delete file[key]; if (Object.keys(file).length === 0) { file["root"] = await this.getShareFile(url); - if (file["root"] && Array.isArray(file["root"])) { - file["root"] = file["root"].filter((item) => item && Object.keys(item).length > 0); - } + if (file["root"] && Array.isArray(file["root"])) file["root"] = file["root"].filter((item) => item && Object.keys(item).length > 0); } return file; } @@ -128707,16 +116299,11 @@ var YunDrive = class { * @returns {Promise} 文件列表数组,失败时返回null */ async getShareFile(pCaID) { - if (!pCaID) { - return null; - } + if (!pCaID) return null; try { - const isValidUrl = pCaID.startsWith("http"); - pCaID = isValidUrl ? "root" : pCaID; + pCaID = pCaID.startsWith("http") ? "root" : pCaID; const json = await this.getShareInfo(pCaID); - if (!json || !json.caLst) { - return null; - } + if (!json || !json.caLst) return null; const caLst = json?.caLst; const names = caLst.map((it) => it.caName); const rootPaths = caLst.map((it) => it.path); @@ -128724,15 +116311,13 @@ var YunDrive = class { const videos = []; if (caLst && caLst.length > 0) { names.forEach((name, index) => { - if (!filterRegex.test(name)) { - videos.push({ - name, - path: rootPaths[index] - }); - } + if (!filterRegex.test(name)) videos.push({ + name, + path: rootPaths[index] + }); }); let result = await Promise.all(rootPaths.map(async (path) => this.getShareFile(path))); - result = result.filter((item) => item !== undefined && item !== null); + result = result.filter((item) => item !== void 0 && item !== null); return [...videos, ...result.flat()]; } } catch (error) { @@ -128752,18 +116337,14 @@ var YunDrive = class { async getShareUrl(pCaID) { try { const json = await this.getShareInfo(pCaID); - if (!json || !("coLst" in json)) { - return null; - } + if (!json || !("coLst" in json)) return null; const coLst = json.coLst; - if (coLst !== null) { - const filteredItems = coLst.filter((it) => it && it.coType === 3); - return filteredItems.map((it) => ({ - name: it.coName, - contentId: it.path, - linkID: this.linkID - })); - } else if (json.caLst !== null) { + if (coLst !== null) return coLst.filter((it) => it && it.coType === 3).map((it) => ({ + name: it.coName, + contentId: it.path, + linkID: this.linkID + })); + else if (json.caLst !== null) { const rootPaths = json.caLst.map((it) => it.path); let result = await Promise.all(rootPaths.map((path) => this.getShareUrl(path))); result = result.filter((item) => item && item.length > 0); @@ -128802,10 +116383,7 @@ var YunDrive = class { "Accept-Encoding": "gzip, deflate, br, zstd", "Content-Type": "application/json" } }); - if (resp.status === 200 && resp.data.data !== null) { - let data = resp.data; - return data.data.contentInfo.presentURL; - } + if (resp.status === 200 && resp.data.data !== null) return resp.data.data.contentInfo.presentURL; } /** * 获取文件下载链接 @@ -128842,20 +116420,693 @@ var YunDrive = class { "hcy-cool-flag": "1", "x-deviceinfo": "||3|12.27.0|chrome|136.0.0.0|189f4426ca008b9cbe9bf9bd79723d77||windows 10|1536X695|zh|||" } }); - if (resp.status === 200) { - let json = JSON.parse(this.decrypt(resp.data)); - return json.data.redrUrl; - } + if (resp.status === 200) return JSON.parse(this.decrypt(resp.data)).data.redrUrl; } }; const Yun$1 = new YunDrive(); - +//#endregion +//#region ../utils/pan/xun.js +var XunDriver = class { + constructor() { + this.regex = /https:\/\/pan.xunlei.com\/s\/(.*)\?.*?pwd=([^&]+)/; + this.headers = { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6" + }; + this.api = "https://xluser-ssl.xunlei.com/"; + this.xun_api = "https://api-pan.xunlei.com/"; + this.captcha_token = ""; + this.parent_id = ""; + this.share_id = ""; + this.pass_code = ""; + this.pass_code_token = ""; + this.filename = "ds"; + this.fileId = ""; + this.vodID = ""; + this.client_id = "XW5SkOhLDjnOZP7J"; + this.x_client_id = "XW-G4v1H72tgfJym"; + this.device_id = "652c6bb3cacdb4b80e852dfc3cb3cca4"; + this.i = 0; + } + async init() { + if (this.auth) if (JSON.parse(import_crypto_js.default.enc.Base64.parse(this.auth.split(".")[1]).toString(import_crypto_js.default.enc.Utf8)).exp > Math.floor(Date.now() / 1e3)) console.log("登录成功"); + else console.log("登录过期,重新登录"); + else await this.getAuth(); + } + get username() { + return ENV.get("xun_username"); + } + get password() { + return ENV.get("xun_password"); + } + get auth() { + return ENV.get("xun_auth"); + } + get app_auth() { + return ENV.get("xun_app_auth"); + } + get refresh_token() { + return ENV.get("xun_refresh_token"); + } + get userId() { + return ENV.get("xun_user_id"); + } + /** + * 延时函数 + * + * 创建一个Promise,在指定毫秒数后resolve,用于控制请求频率。 + * + * @param {number} ms - 延时毫秒数 + * @returns {Promise} 延时Promise + * + * @example + * await delay(1000); // 延时1秒 + */ + delay(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); + } + async execUrl(url) { + this.link = url; + const matches = this.regex.exec(url); + if (matches && matches[1]) { + this.share_id = matches[1]; + this.pass_code = matches[2] || ""; + } + } + async login() { + let data = JSON.stringify({ + "protocolVersion": "301", + "sequenceNo": "1000001", + "platformVersion": "10", + "isCompressed": "0", + "appid": "40", + "clientVersion": "8.03.0.9067", + "peerID": "c9b076a446517969dff638cd37fa9ff1", + "appName": "ANDROID-com.xunlei.downloadprovider", + "sdkVersion": "231500", + "devicesign": "div101.b71a923eb0e2239842599a3c016b4098612f6cf6d6e9fd1925845ec59285716c", + "netWorkType": "2G", + "providerName": "NONE", + "deviceModel": "22021211RC", + "deviceName": "Xiaomi_22021211Rc", + "OSVersion": "12", + "creditkey": "", + "hl": "zh-CN", + "userName": this.username, + "passWord": this.password, + "verifyKey": "", + "verifyCode": "", + "isMd5Pwd": "0" + }); + let config = { + method: "POST", + url: `${this.api}xluser.core.login/v3/login`, + headers: { "Content-Type": "application/json" }, + data + }; + let login_data = await axios$1.request(config); + if (login_data.status === 200) { + console.log("登录成功"); + return login_data.data.sessionID; + } + } + async getSignCaptcha() { + let data = JSON.stringify({ + "client_id": this.x_client_id, + "action": "POST:/v1/auth/signin", + "device_id": this.device_id, + "captcha_token": "", + "meta": { "phone_number": `+86 ${this.username}` } + }); + let config = { + method: "POST", + url: `${this.api}v1/shield/captcha/init`, + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "Content-Type": "application/json" + }, + data + }; + let signin = await axios$1.request(config); + if (signin.status === 200) return signin.data.captcha_token; + } + async getAuth() { + let need_auth = 1; + if (this.auth) { + if (JSON.parse(import_crypto_js.default.enc.Base64.parse(this.auth.split(".")[1]).toString(import_crypto_js.default.enc.Utf8)).exp > Math.floor(Date.now() / 1e3)) { + console.log("登录成功"); + need_auth = 0; + } + } + if (need_auth) { + console.log("登录过期,重新登录"); + let captcha_token = await this.getSignCaptcha(); + let data = JSON.stringify({ + "username": `+86 ${this.username}`, + "password": this.password, + "client_id": this.x_client_id + }); + let config = { + method: "POST", + url: `${this.api}v1/auth/signin`, + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "Content-Type": "application/json", + "accept-language": "zh-cn", + "x-captcha-token": captcha_token, + "x-client-id": this.x_client_id, + "x-device-id": this.device_id + }, + data + }; + let auth_data = await axios$1.request(config); + if (auth_data.status === 200) { + ENV.set("xun_auth", auth_data.data.token_type + " " + auth_data.data.access_token); + ENV.set("xun_user_id", auth_data.data.user_id); + } + await this.safecaptcha(); + } + } + async safecaptcha() { + let data = JSON.stringify({ + "client_id": this.x_client_id, + "action": "get:/drive/v1/privilege/USER_SECURITY_TOKEN", + "device_id": this.device_id, + "captcha_token": "", + "meta": { + "username": "", + "phone_number": "", + "email": "", + "package_name": "pan.xunlei.com", + "client_version": "1.92.9", + "captcha_sign": "1.98cda33124387df2c03dea12799af2af", + "timestamp": "1757397551603", + "user_id": this.userId + } + }); + let config = { + method: "POST", + url: "https://xluser-ssl.xunlei.com/v1/shield/captcha/init", + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "Content-Type": "application/json", + "accept-language": "zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6", + "content-type": "text/plain;charset=UTF-8" + }, + data + }; + let captcha_token = (await axios$1.request(config)).data.captcha_token; + let safe_data = (await axios$1({ + method: "GET", + url: "https://api-pan.xunlei.com/drive/v1/privilege/USER_SECURITY_TOKEN", + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "accept-language": "zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6", + "authorization": this.auth, + "content-type": "application/json", + "x-captcha-token": captcha_token, + "x-client-id": this.x_client_id, + "x-device-id": this.device_id + } + })).data; + } + async getCaptcha_token(path, mth) { + let action = `${mth}:${path}`; + let data = JSON.stringify({ + "client_id": "Xqp0kJBXWhwaTpB6", + "action": action, + "device_id": "1bf91caf40093318e8040916eb7ad16a", + "captcha_token": "", + "meta": { + "username": "", + "phone_number": "", + "email": "", + "package_name": "pan.xunlei.com", + "client_version": "1.92.9", + "captcha_sign": "1.cbc20fd633c54023baab5b816228bf90", + "timestamp": "1757383155459", + "user_id": this.userId + } + }); + let config = { + method: "POST", + url: `${this.api}v1/shield/captcha/init`, + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "Content-Type": "application/json" + }, + data + }; + let captcha_data = await axios$1.request(config); + if (captcha_data.status === 200) return captcha_data.data.captcha_token; + } + async getAppCaptcha_token(path, mth) { + let action = `${mth}:${path}`; + let data = JSON.stringify({ + "client_id": "XW-G4v1H72tgfJym", + "action": action, + "device_id": "652c6bb3cacdb4b80e852dfc3cb3cca4", + "captcha_token": "", + "meta": { + "package_name": "ThunderPanPlugin", + "client_version": "3.1.5", + "captcha_sign": "1.ee2cef5f061a7cdf4374df81b370d2ec", + "timestamp": "1773293019719", + "user_id": this.userId + } + }); + let config = { + method: "POST", + url: `${this.api}v1/shield/captcha/init`, + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "Content-Type": "application/json" + }, + data + }; + let captcha_data = await axios$1.request(config); + if (captcha_data.status === 200) return captcha_data.data.captcha_token; + } + sign() { + let x = [ + "QG3/GhopO+5+T", + "1Sv94+ANND3lDmmw", + "q2eTxRva8b3B5d", + "m2", + "VIc5CZRBMU71ENfbOh0+RgWIuzLy", + "66M8Wpw6nkBEekOtL6e", + "N0rucK7S8W/vrRkfPto5urIJJS8dVY0S", + "oLAR7pdUVUAp9xcuHWzrU057aUhdCJrt", + "6lxcykBSsfI//GR9", + "r50cz+1I4gbU/fk8", + "tdwzrTc4SNFC4marNGTgf05flC85A", + "qvNVUDFjfsOMqvdi2gB8gCvtaJAIqxXs" + ]; + const c = { + ClientID: "Xqp0kJBXWhwaTpB6", + ClientVersion: "1.92.9", + PackageName: "pan.xunlei.com", + DeviceID: "1bf91caf40093318e8040916eb7ad16a" + }; + const timestamp = Date.now(); + let w = c.ClientID + c.ClientVersion + c.PackageName + c.DeviceID + "1757338961011"; + for (let i = 0; i < x.length; i++) w = import_crypto_js.default.MD5(w + x[i]).toString(); + return "1." + w; + } + async getShareList() { + let captcha_data = await this.getCaptcha_token("/drive/v1/share", "get"); + let config = { + method: "GET", + url: `${this.xun_api}drive/v1/share?share_id=${this.share_id}&pass_code=${this.pass_code}&limit=100&page_token=&thumbnail_size=SIZE_SMALL`, + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "accept-language": "zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6", + "authorization": "", + "x-captcha-token": captcha_data, + "x-client-id": "Xqp0kJBXWhwaTpB6", + "x-device-id": "1bf91caf40093318e8040916eb7ad16a" + } + }; + let sharelist = await axios$1.request(config); + if (sharelist.status === 200) { + let file = {}; + let dirs = []; + let videos = []; + this.pass_code_token = sharelist.data.pass_code_token; + sharelist.data.files.map((it) => { + if (it.mime_type === "") dirs.push(it.id); + else { + let text = /[#|'"\[\]&<>]/g; + let name = text.test(it.name) ? it.name.replace(text, "") : it.name; + videos.push({ + name, + fileId: it.id, + share_id: this.share_id, + parent_id: it.parent_id, + pass_code_token: encodeURIComponent(this.pass_code_token) + }); + } + }); + if (!(sharelist.data.title in file) && sharelist.data.title !== void 0) file[sharelist.data.title] = []; + if (videos.length > 0 && sharelist.data.title !== void 0) file[sharelist.data.title] = [...videos]; + let result = await Promise.all(dirs.map(async (id) => this.getShareDetail(id))); + result = result.filter((item) => item !== void 0 && item !== null).flat(); + if (result.length >= 0) file[sharelist.data.title].push(...result); + return file; + } + } + async getShareDetail(id) { + let captcha_data = await this.getCaptcha_token("/drive/v1/share", "get"); + let config = { + method: "GET", + url: `${this.xun_api}drive/v1/share/detail?share_id=${this.share_id}&parent_id=${id}&pass_code_token=${encodeURIComponent(this.pass_code_token)}&limit=100&page_token=&thumbnail_size=SIZE_SMALL`, + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "accept-language": "zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6", + "authorization": "", + "content-type": "application/json", + "x-captcha-token": captcha_data, + "x-client-id": "Xqp0kJBXWhwaTpB6", + "x-device-id": "1bf91caf40093318e8040916eb7ad16a" + } + }; + let detail_data = await axios$1.request(config); + if (detail_data.status === 200) { + let dirs = []; + let videos = []; + detail_data.data.files.map((it) => { + if (it.mime_type === "") dirs.push(it.id); + else { + let text = /[#|'"\[\]&<>]/g; + let name = text.test(it.name) ? it.name.replace(text, "") : it.name; + videos.push({ + name, + fileId: it.id, + share_id: this.share_id, + parent_id: it.parent_id, + pass_code_token: encodeURIComponent(this.pass_code_token) + }); + } + }); + let result = await Promise.all(dirs.map(async (id) => this.getShareDetail(id))); + result = result.filter((item) => item !== void 0 && item !== null); + return [...videos, ...result.flat()]; + } + } + async getShareUrl(fileId, share_id, pass_code_token) { + let captcha_data = await this.getCaptcha_token("/drive/v1/share", "get"); + let config = { + method: "GET", + url: `${this.xun_api}drive/v1/share/file_info?pass_code_token=${encodeURIComponent(pass_code_token)}&space=&file_id=${fileId}&share_id=${share_id}&&pass_code=${this.pass_code}`, + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "accept-language": "zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6", + "authorization": "", + "cache-control": "no-cache", + "content-type": "application/json", + "x-captcha-token": captcha_data, + "x-client-id": "Xqp0kJBXWhwaTpB6", + "x-device-id": "1bf91caf40093318e8040916eb7ad16a" + } + }; + let url_list = await axios$1.request(config); + if (url_list.status === 200) { + let urls = []; + url_list.data.file_info.medias.map((it) => { + if (it.link !== null) { + urls.push(it.media_name, it.link.url + "#isVideo=true##fastPlayMode##threads=20#"); + urls.push("猫画" + it.media_name, `http://127.0.0.1:5575/proxy?thread=${ENV.get("thread") || 6}&chunkSize=256&url=` + encodeURIComponent(it.link.url)); + } + }); + return urls; + } + } + async getShareData(url) { + if (url.startsWith("https://")) { + await this.execUrl(url); + return await this.getShareList(); + } + } + async saveResult(fileId, share_id, pass_code_token) { + let captcha_data = await this.getAppCaptcha_token("drive/v1/files", "get"); + let data = JSON.stringify({ + "parent_id": this.fileId, + "share_id": share_id, + "pass_code_token": decodeURIComponent(pass_code_token), + "ancestor_ids": [], + "file_ids": [fileId], + "specify_parent_id": true + }); + let config = { + method: "POST", + url: `${this.xun_api}drive/v1/share/restore`, + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "Content-Type": "application/json", + "accept-language": "zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6", + "authorization": this.auth, + "x-captcha-token": captcha_data, + "x-client-id": "XW-G4v1H72tgfJym", + "x-device-id": "652c6bb3cacdb4b80e852dfc3cb3cca4" + }, + data + }; + let file_data = await axios$1.request(config).catch((e) => e.response); + if (file_data.status === 200) console.log("转存文件成功"); + if (file_data.status === 404) { + this.i++; + if (this.i < 3) await this.saveResult(fileId, share_id, pass_code_token); + else { + this.i = 0; + console.log("转存失败:" + file_data.data); + } + } + } + async saveFile(fileId, share_id, pass_code_token) { + await this.createFile(); + if (this.fileId !== "" && this.fileId !== void 0) { + await this.delay(5e3); + await this.saveResult(fileId, share_id, pass_code_token); + } + } + async getFile() { + if (this.auth === void 0 || this.auth === "") await this.getAuth(); + let captcha_data = await this.getAppCaptcha_token("drive/v1/files", "get"); + let config = { + method: "GET", + url: `${this.xun_api}drive/v1/files?parent_id=&filters=%7B%22phase%22%3A%7B%22eq%22%3A%22PHASE_TYPE_COMPLETE%22%7D%2C%22trashed%22%3A%7B%22eq%22%3Afalse%7D%7D&with_audit=true&thumbnail_size=SIZE_SMALL&limit=50`, + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "accept-language": "zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6", + "authorization": this.auth, + "content-type": "application/json", + "x-captcha-token": captcha_data, + "x-client-id": "XW-G4v1H72tgfJym", + "x-device-id": "652c6bb3cacdb4b80e852dfc3cb3cca4" + } + }; + let file_data = await axios$1.request(config); + if (file_data.status === 200) file_data.data.files.map((it) => { + if (it.name === this.filename) this.fileId = it.id; + }); + } + async createFile() { + await this.getFile(); + let captcha_data = await this.getAppCaptcha_token("drive/v1/files", "get"); + let data = JSON.stringify({ + "parent_id": "", + "name": this.filename, + "kind": "drive#folder", + "space": "" + }); + let config = { + method: "POST", + url: `${this.xun_api}drive/v1/files`, + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "Content-Type": "application/json", + "accept-language": "zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6", + "authorization": this.auth, + "x-captcha-token": captcha_data, + "x-client-id": "XW-G4v1H72tgfJym", + "x-device-id": "652c6bb3cacdb4b80e852dfc3cb3cca4" + }, + data + }; + let file_data = await axios$1.request(config).catch((e) => e.response); + if (file_data.status === 200) this.fileId = file_data.data.file.id; + } + async getVodId() { + let captcha_data = await this.getAppCaptcha_token("drive/v1/files", "get"); + let config = { + method: "GET", + url: `${this.xun_api}drive/v1/files?parent_id=${this.fileId}&filters=%7B%22phase%22%3A%7B%22eq%22%3A%22PHASE_TYPE_COMPLETE%22%7D%2C%22trashed%22%3A%7B%22eq%22%3Afalse%7D%7D&with_audit=true&thumbnail_size=SIZE_SMALL&limit=50`, + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "accept-language": "zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6", + "authorization": this.auth, + "content-type": "application/json", + "x-captcha-token": captcha_data, + "x-client-id": "XW-G4v1H72tgfJym", + "x-device-id": "652c6bb3cacdb4b80e852dfc3cb3cca4" + } + }; + let file_data = await axios$1.request(config); + if (file_data.status === 200) file_data.data.files.map((it) => { + this.vodID = it.id; + }); + return this.vodID; + } + async deleteFile() { + await this.getFile(); + if (this.fileId !== "" && this.fileId !== void 0) { + let captcha_data = await this.getAppCaptcha_token("drive/v1/files", "get"); + let data = JSON.stringify({ + "ids": [this.fileId], + "space": "" + }); + let config = { + method: "POST", + url: `${this.xun_api}drive/v1/files:batchDelete`, + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "Content-Type": "application/json", + "accept-language": "zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6", + "authorization": this.auth, + "x-captcha-token": captcha_data, + "x-client-id": "XW-G4v1H72tgfJym", + "x-device-id": "652c6bb3cacdb4b80e852dfc3cb3cca4" + }, + data + }; + let delete_data = await axios$1.request(config).catch((e) => e.response); + if (delete_data.status === 200) console.log("删除文件成功"); + else if (delete_data.status === 404) console.log("文件未找到,删除失败"); + } + } + async getDownload_CAPTCHA_TOKEN() { + let data = { + "client_id": "XW-G4v1H72tgfJym", + "action": "GET:CAPTCHA_TOKEN", + "device_id": "652c6bb3cacdb4b80e852dfc3cb3cca4", + "captcha_token": "", + "meta": { + "package_name": "ThunderPanPlugin", + "client_version": "3.1.1", + "captcha_sign": "1.0eada0deeeaac52a6376f2e167fa9f29", + "timestamp": "1757378771289", + "user_id": this.userId + } + }; + let config = { + method: "POST", + url: `${this.api}v1/shield/captcha/init`, + headers: { + "User-Agent": "thunder/12.4.4.3740 Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.215 XDASKernel/22.3.27 Safari/537.36", + "Accept-Encoding": "gzip, deflate, br", + "Content-Type": "application/json" + }, + data + }; + let captcha_data = await axios$1.request(config); + if (captcha_data.status === 200) return captcha_data.data.captcha_token; + } + async getAppCaptcha() { + let data = JSON.stringify({ + "client_id": "Xqp0kJBXWhwaTpB6", + "action": "POST:/v1/auth/signin", + "device_id": "652c6bb3cacdb4b80e852dfc3cb3cca4", + "captcha_token": "", + "meta": { "phone_number": `+86 ${this.username}` } + }); + let config = { + method: "POST", + url: `${this.api}v1/shield/captcha/init`, + headers: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "Content-Type": "application/json" + }, + data + }; + let signin = await axios$1.request(config); + if (signin.status === 200) return signin.data.captcha_token; + } + async AppAuth() { + if (this.app_auth) if (JSON.parse(import_crypto_js.default.enc.Base64.parse(this.app_auth.split(".")[1]).toString(import_crypto_js.default.enc.Utf8)).exp > Math.floor(Date.now() / 1e3)) console.log("登录成功"); + else { + console.log("登录过期,重新登录"); + let captcha_token = await this.getAppCaptcha(); + let data = JSON.stringify({ + "username": `+86 ${this.username}`, + "password": this.password, + "client_id": "XW-G4v1H72tgfJym" + }); + let config = { + method: "POST", + url: `${this.api}v1/auth/signin`, + headers: { + "User-Agent": "thunder/12.4.4.3740 Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.215 XDASKernel/22.3.27 Safari/537.36", + "Content-Type": "application/json", + "x-captcha-token": captcha_token, + "x-client-id": "XW-G4v1H72tgfJym", + "x-device-id": "652c6bb3cacdb4b80e852dfc3cb3cca4" + }, + data + }; + let auth_data = await axios$1.request(config); + if (auth_data.status === 200) { + ENV.set("xun_refresh_token", auth_data.data.refresh_token); + ENV.set("xun_app_auth", auth_data.data.token_type + " " + auth_data.data.access_token); + } + } + } + async getDownload_auth() { + await this.AppAuth(); + let data = JSON.stringify({ + "client_id": "XW-G4v1H72tgfJym", + "client_secret": "Qbaferw2knfQKqxa25EYJGtZ2_6755CMwzXBN3ctW54", + "grant_type": "refresh_token", + "refresh_token": this.refresh_token + }); + let dwon_data = await axios$1({ + method: "POST", + url: "https://xluser-ssl.xunlei.com/v1/auth/token", + headers: { + "User-Agent": "thunder/12.4.4.3740 Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.215 XDASKernel/22.3.27 Safari/537.36", + "Content-Type": "application/json", + "x-client-id": "XW-G4v1H72tgfJym", + "x-device-id": "652c6bb3cacdb4b80e852dfc3cb3cca4" + }, + data + }).catch((e) => e.response); + if (dwon_data.status === 200) { + ENV.set("xun_retoken", dwon_data.data.refresh_token); + ENV.set("xun_App_auth", dwon_data.data.token_type + " " + dwon_data.data.access_token); + } + } + async getDownloadUrl(fileId, share_id, pass_code_token) { + try { + await this.getDownload_auth(); + await this.deleteFile(); + await this.delay(1e3); + await this.saveFile(fileId, share_id, pass_code_token); + let vodID = await this.getVodId(); + let x_captcha_token = await this.getDownload_CAPTCHA_TOKEN(); + let config = { + method: "GET", + url: `${this.xun_api}drive/v1/files/${vodID}?space=&with[0]=public_share_tag&usage=FETCH`, + headers: { + "User-Agent": "thunder/12.4.4.3740 Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.215 XDASKernel/22.3.27 Safari/537.36", + "Connection": "keep-alive", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "x-captcha-token": x_captcha_token, + "authorization": this.app_auth, + "content-type": "application/json", + "x-device-id": "652c6bb3cacdb4b80e852dfc3cb3cca4" + } + }; + let file_data = await axios$1.request(config); + if (file_data.status === 200) { + console.log("下载地址:" + file_data.data.links["application/octet-stream"].url || file_data.data["web_content_link"]); + return file_data.data.links["application/octet-stream"].url || file_data.data["web_content_link"]; + } + } catch (e) { + console.log(e); + return ""; + } + } +}; +const Xun$1 = new XunDriver(); //#endregion //#region ../utils/pans.js /** * 网盘服务模块集合 * 统一导入和导出各种网盘服务提供商的实现 -* +* * 支持的网盘服务: * - Ali: 阿里云盘服务 * - Baidu: 百度网盘服务 @@ -128865,7 +117116,7 @@ const Yun$1 = new YunDrive(); * - Quark: 夸克网盘服务 * - UC: UC网盘服务 * - Yun: 115网盘服务 -* +* * @example * import pans from './pans.js'; * const aliPan = new pans.Ali(config); @@ -128879,9 +117130,9 @@ var pans_default = { Pan: Pan$1, Quark: Quark$1, UC: UC$1, - Yun: Yun$1 + Yun: Yun$1, + Xun: Xun$1 }; - //#endregion //#region ../node_modules/cheerio/dist/esm/options.js const defaultOpts$2 = { _useHtmlParser2: false }; @@ -128895,9 +117146,7 @@ const defaultOpts$2 = { _useHtmlParser2: false }; * @returns The flattened options. */ function flattenOptions(options, baseOptions) { - if (!options) { - return baseOptions !== null && baseOptions !== void 0 ? baseOptions : defaultOpts$2; - } + if (!options) return baseOptions !== null && baseOptions !== void 0 ? baseOptions : defaultOpts$2; const opts = { _useHtmlParser2: !!options.xmlMode, ...baseOptions, @@ -128906,15 +117155,10 @@ function flattenOptions(options, baseOptions) { if (options.xml) { opts._useHtmlParser2 = true; opts.xmlMode = true; - if (options.xml !== true) { - Object.assign(opts, options.xml); - } - } else if (options.xmlMode) { - opts._useHtmlParser2 = true; - } + if (options.xml !== true) Object.assign(opts, options.xml); + } else if (options.xmlMode) opts._useHtmlParser2 = true; return opts; } - //#endregion //#region ../node_modules/domelementtype/lib/esm/index.js /** Types of elements found in htmlparser2's DOM */ @@ -128965,7 +117209,6 @@ const Tag = ElementType.Tag; const CDATA$1 = ElementType.CDATA; /** Type for */ const Doctype = ElementType.Doctype; - //#endregion //#region ../node_modules/domhandler/lib/esm/node.js /** @@ -129233,23 +117476,15 @@ function hasChildren(node) { */ function cloneNode(node, recursive = false) { let result; - if (isText(node)) { - result = new Text(node.data); - } else if (isComment(node)) { - result = new Comment(node.data); - } else if (isTag(node)) { + if (isText(node)) result = new Text(node.data); + else if (isComment(node)) result = new Comment(node.data); + else if (isTag(node)) { const children = recursive ? cloneChildren(node.children) : []; const clone = new Element(node.name, { ...node.attribs }, children); children.forEach((child) => child.parent = clone); - if (node.namespace != null) { - clone.namespace = node.namespace; - } - if (node["x-attribsNamespace"]) { - clone["x-attribsNamespace"] = { ...node["x-attribsNamespace"] }; - } - if (node["x-attribsPrefix"]) { - clone["x-attribsPrefix"] = { ...node["x-attribsPrefix"] }; - } + if (node.namespace != null) clone.namespace = node.namespace; + if (node["x-attribsNamespace"]) clone["x-attribsNamespace"] = { ...node["x-attribsNamespace"] }; + if (node["x-attribsPrefix"]) clone["x-attribsPrefix"] = { ...node["x-attribsPrefix"] }; result = clone; } else if (isCDATA(node)) { const children = recursive ? cloneChildren(node.children) : []; @@ -129260,9 +117495,7 @@ function cloneNode(node, recursive = false) { const children = recursive ? cloneChildren(node.children) : []; const clone = new Document(children); children.forEach((child) => child.parent = clone); - if (node["x-mode"]) { - clone["x-mode"] = node["x-mode"]; - } + if (node["x-mode"]) clone["x-mode"] = node["x-mode"]; result = clone; } else if (isDirective(node)) { const instruction = new ProcessingInstruction(node.name, node.data); @@ -129272,14 +117505,10 @@ function cloneNode(node, recursive = false) { instruction["x-systemId"] = node["x-systemId"]; } result = instruction; - } else { - throw new Error(`Not implemented yet: ${node.type}`); - } + } else throw new Error(`Not implemented yet: ${node.type}`); result.startIndex = node.startIndex; result.endIndex = node.endIndex; - if (node.sourceCodeLocation != null) { - result.sourceCodeLocation = node.sourceCodeLocation; - } + if (node.sourceCodeLocation != null) result.sourceCodeLocation = node.sourceCodeLocation; return result; } function cloneChildren(childs) { @@ -129290,7 +117519,6 @@ function cloneChildren(childs) { } return children; } - //#endregion //#region ../node_modules/domhandler/lib/esm/index.js const defaultOpts$1 = { @@ -129323,7 +117551,7 @@ var DomHandler = class { } if (typeof callback === "object") { options = callback; - callback = undefined; + callback = void 0; } this.callback = callback !== null && callback !== void 0 ? callback : null; this.options = options !== null && options !== void 0 ? options : defaultOpts$1; @@ -129352,14 +117580,11 @@ var DomHandler = class { onclosetag() { this.lastNode = null; const elem = this.tagStack.pop(); - if (this.options.withEndIndices) { - elem.endIndex = this.parser.endIndex; - } + if (this.options.withEndIndices) elem.endIndex = this.parser.endIndex; if (this.elementCB) this.elementCB(elem); } onopentag(name, attribs) { - const type = this.options.xmlMode ? ElementType.Tag : undefined; - const element = new Element(name, attribs, undefined, type); + const element = new Element(name, attribs, void 0, this.options.xmlMode ? ElementType.Tag : void 0); this.addNode(element); this.tagStack.push(element); } @@ -129367,9 +117592,7 @@ var DomHandler = class { const { lastNode } = this; if (lastNode && lastNode.type === ElementType.Text) { lastNode.data += data; - if (this.options.withEndIndices) { - lastNode.endIndex = this.parser.endIndex; - } + if (this.options.withEndIndices) lastNode.endIndex = this.parser.endIndex; } else { const node = new Text(data); this.addNode(node); @@ -129403,21 +117626,14 @@ var DomHandler = class { this.addNode(node); } handleCallback(error) { - if (typeof this.callback === "function") { - this.callback(error, this.dom); - } else if (error) { - throw error; - } + if (typeof this.callback === "function") this.callback(error, this.dom); + else if (error) throw error; } addNode(node) { const parent = this.tagStack[this.tagStack.length - 1]; const previousSibling = parent.children[parent.children.length - 1]; - if (this.options.withStartIndices) { - node.startIndex = this.parser.startIndex; - } - if (this.options.withEndIndices) { - node.endIndex = this.parser.endIndex; - } + if (this.options.withStartIndices) node.startIndex = this.parser.startIndex; + if (this.options.withEndIndices) node.endIndex = this.parser.endIndex; parent.children.push(node); if (previousSibling) { node.prev = previousSibling; @@ -129427,15 +117643,12 @@ var DomHandler = class { this.lastNode = null; } }; - //#endregion //#region ../node_modules/entities/lib/esm/generated/decode-data-html.js var decode_data_html_default = new Uint16Array("ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻\"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌".split("").map((c) => c.charCodeAt(0))); - //#endregion //#region ../node_modules/entities/lib/esm/generated/decode-data-xml.js var decode_data_xml_default = new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((c) => c.charCodeAt(0))); - //#endregion //#region ../node_modules/entities/lib/esm/decode_codepoint.js var _a$3; @@ -129489,9 +117702,7 @@ const fromCodePoint$2 = (_a$3 = String.fromCodePoint) !== null && _a$3 !== void */ function replaceCodePoint$2(codePoint) { var _a; - if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) { - return 65533; - } + if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) return 65533; return (_a = decodeMap$2.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint; } /** @@ -129504,7 +117715,6 @@ function replaceCodePoint$2(codePoint) { function decodeCodePoint$2(codePoint) { return fromCodePoint$2(replaceCodePoint$2(codePoint)); } - //#endregion //#region ../node_modules/entities/lib/esm/decode.js var CharCodes$3; @@ -129613,7 +117823,7 @@ var EntityDecoder$2 = class { */ write(str, offset) { switch (this.state) { - case EntityDecoderState$2.EntityStart: { + case EntityDecoderState$2.EntityStart: if (str.charCodeAt(offset) === CharCodes$3.NUM) { this.state = EntityDecoderState$2.NumericStart; this.consumed += 1; @@ -129621,19 +117831,10 @@ var EntityDecoder$2 = class { } this.state = EntityDecoderState$2.NamedEntity; return this.stateNamedEntity(str, offset); - } - case EntityDecoderState$2.NumericStart: { - return this.stateNumericStart(str, offset); - } - case EntityDecoderState$2.NumericDecimal: { - return this.stateNumericDecimal(str, offset); - } - case EntityDecoderState$2.NumericHex: { - return this.stateNumericHex(str, offset); - } - case EntityDecoderState$2.NamedEntity: { - return this.stateNamedEntity(str, offset); - } + case EntityDecoderState$2.NumericStart: return this.stateNumericStart(str, offset); + case EntityDecoderState$2.NumericDecimal: return this.stateNumericDecimal(str, offset); + case EntityDecoderState$2.NumericHex: return this.stateNumericHex(str, offset); + case EntityDecoderState$2.NamedEntity: return this.stateNamedEntity(str, offset); } } /** @@ -129646,9 +117847,7 @@ var EntityDecoder$2 = class { * @returns The number of characters that were consumed, or -1 if the entity is incomplete. */ stateNumericStart(str, offset) { - if (offset >= str.length) { - return -1; - } + if (offset >= str.length) return -1; if ((str.charCodeAt(offset) | TO_LOWER_BIT$2) === CharCodes$3.LOWER_X) { this.state = EntityDecoderState$2.NumericHex; this.consumed += 1; @@ -129677,9 +117876,8 @@ var EntityDecoder$2 = class { const startIdx = offset; while (offset < str.length) { const char = str.charCodeAt(offset); - if (isNumber$3(char) || isHexadecimalCharacter$2(char)) { - offset += 1; - } else { + if (isNumber$3(char) || isHexadecimalCharacter$2(char)) offset += 1; + else { this.addToNumericResult(str, startIdx, offset, 16); return this.emitNumericEntity(char, 3); } @@ -129700,9 +117898,8 @@ var EntityDecoder$2 = class { const startIdx = offset; while (offset < str.length) { const char = str.charCodeAt(offset); - if (isNumber$3(char)) { - offset += 1; - } else { + if (isNumber$3(char)) offset += 1; + else { this.addToNumericResult(str, startIdx, offset, 10); return this.emitNumericEntity(char, 2); } @@ -129726,19 +117923,14 @@ var EntityDecoder$2 = class { emitNumericEntity(lastCp, expectedLength) { var _a; if (this.consumed <= expectedLength) { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - if (lastCp === CharCodes$3.SEMI) { - this.consumed += 1; - } else if (this.decodeMode === DecodingMode$2.Strict) { + (_a = this.errors) === null || _a === void 0 || _a.absenceOfDigitsInNumericCharacterReference(this.consumed); return 0; } + if (lastCp === CharCodes$3.SEMI) this.consumed += 1; + else if (this.decodeMode === DecodingMode$2.Strict) return 0; this.emitCodePoint(replaceCodePoint$2(this.result), this.consumed); if (this.errors) { - if (lastCp !== CharCodes$3.SEMI) { - this.errors.missingSemicolonAfterCharacterReference(); - } + if (lastCp !== CharCodes$3.SEMI) this.errors.missingSemicolonAfterCharacterReference(); this.errors.validateNumericCharacterReference(this.result); } return this.consumed; @@ -129759,15 +117951,11 @@ var EntityDecoder$2 = class { for (; offset < str.length; offset++, this.excess++) { const char = str.charCodeAt(offset); this.treeIndex = determineBranch$2(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); - if (this.treeIndex < 0) { - return this.result === 0 || this.decodeMode === DecodingMode$2.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd$2(char)) ? 0 : this.emitNotTerminatedNamedEntity(); - } + if (this.treeIndex < 0) return this.result === 0 || this.decodeMode === DecodingMode$2.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd$2(char)) ? 0 : this.emitNotTerminatedNamedEntity(); current = decodeTree[this.treeIndex]; valueLength = (current & BinTrieFlags$2.VALUE_LENGTH) >> 14; if (valueLength !== 0) { - if (char === CharCodes$3.SEMI) { - return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); - } + if (char === CharCodes$3.SEMI) return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); if (this.decodeMode !== DecodingMode$2.Strict) { this.result = this.treeIndex; this.consumed += this.excess; @@ -129787,7 +117975,7 @@ var EntityDecoder$2 = class { const { result, decodeTree } = this; const valueLength = (decodeTree[result] & BinTrieFlags$2.VALUE_LENGTH) >> 14; this.emitNamedEntityData(result, valueLength, this.consumed); - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference(); + (_a = this.errors) === null || _a === void 0 || _a.missingSemicolonAfterCharacterReference(); return this.consumed; } /** @@ -129802,9 +117990,7 @@ var EntityDecoder$2 = class { emitNamedEntityData(result, valueLength, consumed) { const { decodeTree } = this; this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags$2.VALUE_LENGTH : decodeTree[result + 1], consumed); - if (valueLength === 3) { - this.emitCodePoint(decodeTree[result + 2], consumed); - } + if (valueLength === 3) this.emitCodePoint(decodeTree[result + 2], consumed); return consumed; } /** @@ -129817,22 +118003,13 @@ var EntityDecoder$2 = class { end() { var _a; switch (this.state) { - case EntityDecoderState$2.NamedEntity: { - return this.result !== 0 && (this.decodeMode !== DecodingMode$2.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0; - } - case EntityDecoderState$2.NumericDecimal: { - return this.emitNumericEntity(0, 2); - } - case EntityDecoderState$2.NumericHex: { - return this.emitNumericEntity(0, 3); - } - case EntityDecoderState$2.NumericStart: { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - case EntityDecoderState$2.EntityStart: { + case EntityDecoderState$2.NamedEntity: return this.result !== 0 && (this.decodeMode !== DecodingMode$2.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0; + case EntityDecoderState$2.NumericDecimal: return this.emitNumericEntity(0, 2); + case EntityDecoderState$2.NumericHex: return this.emitNumericEntity(0, 3); + case EntityDecoderState$2.NumericStart: + (_a = this.errors) === null || _a === void 0 || _a.absenceOfDigitsInNumericCharacterReference(this.consumed); return 0; - } + case EntityDecoderState$2.EntityStart: return 0; } } }; @@ -129877,9 +118054,7 @@ function getDecoder$2(decodeTree) { function determineBranch$2(decodeTree, current, nodeIdx, char) { const branchCount = (current & BinTrieFlags$2.BRANCH_LENGTH) >> 7; const jumpOffset = current & BinTrieFlags$2.JUMP_TABLE; - if (branchCount === 0) { - return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1; - } + if (branchCount === 0) return jumpOffset !== 0 && char === jumpOffset ? nodeIdx : -1; if (jumpOffset) { const value = char - jumpOffset; return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIdx + value] - 1; @@ -129889,13 +118064,9 @@ function determineBranch$2(decodeTree, current, nodeIdx, char) { while (lo <= hi) { const mid = lo + hi >>> 1; const midVal = decodeTree[mid]; - if (midVal < char) { - lo = mid + 1; - } else if (midVal > char) { - hi = mid - 1; - } else { - return decodeTree[mid + branchCount]; - } + if (midVal < char) lo = mid + 1; + else if (midVal > char) hi = mid - 1; + else return decodeTree[mid + branchCount]; } return -1; } @@ -129938,13 +118109,10 @@ function decodeHTMLStrict$2(str) { function decodeXML$2(str) { return xmlDecoder$2(str, DecodingMode$2.Strict); } - //#endregion //#region ../node_modules/entities/lib/esm/generated/encode-html.js function restoreDiff(arr) { - for (let i = 1; i < arr.length; i++) { - arr[i][0] += arr[i - 1][0] + 1; - } + for (let i = 1; i < arr.length; i++) arr[i][0] += arr[i - 1][0] + 1; return arr; } var encode_html_default = new Map(/* @__PURE__ */ restoreDiff([ @@ -131647,7 +119815,6 @@ var encode_html_default = new Map(/* @__PURE__ */ restoreDiff([ [0, "ffi"], [0, "ffl"] ])); - //#endregion //#region ../node_modules/entities/lib/esm/escape.js const xmlReplacer$1 = /["&'<>$\x80-\uFFFF]/g; @@ -131674,7 +119841,7 @@ function encodeXML$1(str) { const i = match.index; const char = str.charCodeAt(i); const next = xmlCodeMap$1.get(char); - if (next !== undefined) { + if (next !== void 0) { ret += str.substring(lastIdx, i) + next; lastIdx = i + 1; } else { @@ -131710,9 +119877,7 @@ function getEscaper$1(regex, map) { let lastIdx = 0; let result = ""; while (match = regex.exec(data)) { - if (lastIdx !== match.index) { - result += data.substring(lastIdx, match.index); - } + if (lastIdx !== match.index) result += data.substring(lastIdx, match.index); result += map.get(match[0].charCodeAt(0)); lastIdx = match.index + 1; } @@ -131750,7 +119915,6 @@ const escapeText$1 = getEscaper$1(/[&<>\u00A0]/g, new Map([ [62, ">"], [160, " "] ])); - //#endregion //#region ../node_modules/entities/lib/esm/encode.js const htmlReplacer = /[\t\n!-,./:-@[-`\f{-}$\x80-\uFFFF]/g; @@ -131791,8 +119955,8 @@ function encodeHTMLTrieRe(regExp, str) { if (typeof next === "object") { if (i + 1 < str.length) { const nextChar = str.charCodeAt(i + 1); - const value = typeof next.n === "number" ? next.n === nextChar ? next.o : undefined : next.n.get(nextChar); - if (value !== undefined) { + const value = typeof next.n === "number" ? next.n === nextChar ? next.o : void 0 : next.n.get(nextChar); + if (value !== void 0) { ret += value; lastIdx = regExp.lastIndex += 1; continue; @@ -131800,7 +119964,7 @@ function encodeHTMLTrieRe(regExp, str) { } next = next.v; } - if (next !== undefined) { + if (next !== void 0) { ret += next; lastIdx = i + 1; } else { @@ -131811,7 +119975,6 @@ function encodeHTMLTrieRe(regExp, str) { } return ret + str.substr(lastIdx); } - //#endregion //#region ../node_modules/entities/lib/esm/index.js /** The level of entities to support. */ @@ -131858,11 +120021,7 @@ var EncodingMode; * @param options Decoding options. */ function decode(data, options = EntityLevel.XML) { - const level = typeof options === "number" ? options : options.level; - if (level === EntityLevel.HTML) { - const mode = typeof options === "object" ? options.mode : undefined; - return decodeHTML$2(data, mode); - } + if ((typeof options === "number" ? options : options.level) === EntityLevel.HTML) return decodeHTML$2(data, typeof options === "object" ? options.mode : void 0); return decodeXML$2(data); } /** @@ -131875,7 +120034,7 @@ function decode(data, options = EntityLevel.XML) { function decodeStrict(data, options = EntityLevel.XML) { var _a; const opts = typeof options === "number" ? { level: options } : options; - (_a = opts.mode) !== null && _a !== void 0 ? _a : opts.mode = DecodingMode$2.Strict; + (_a = opts.mode) !== null && _a !== void 0 || (opts.mode = DecodingMode$2.Strict); return decode(data, opts); } /** @@ -131890,14 +120049,11 @@ function encode(data, options = EntityLevel.XML) { if (opts.mode === EncodingMode.Attribute) return escapeAttribute$1(data); if (opts.mode === EncodingMode.Text) return escapeText$1(data); if (opts.level === EntityLevel.HTML) { - if (opts.mode === EncodingMode.ASCII) { - return encodeNonAsciiHTML(data); - } + if (opts.mode === EncodingMode.ASCII) return encodeNonAsciiHTML(data); return encodeHTML(data); } return encodeXML$1(data); } - //#endregion //#region ../node_modules/dom-serializer/lib/esm/foreignNames.js const elementNames = new Map([ @@ -132000,7 +120156,6 @@ const attributeNames = new Map([ "yChannelSelector", "zoomAndPan" ].map((val) => [val.toLowerCase(), val])); - //#endregion //#region ../node_modules/dom-serializer/lib/esm/index.js /** @@ -132032,12 +120187,8 @@ function formatAttributes(attributes, opts) { return Object.keys(attributes).map((key) => { var _a, _b; const value = (_a = attributes[key]) !== null && _a !== void 0 ? _a : ""; - if (opts.xmlMode === "foreign") { - key = (_b = attributeNames.get(key)) !== null && _b !== void 0 ? _b : key; - } - if (!opts.emptyAttrs && !opts.xmlMode && value === "") { - return key; - } + if (opts.xmlMode === "foreign") key = (_b = attributeNames.get(key)) !== null && _b !== void 0 ? _b : key; + if (!opts.emptyAttrs && !opts.xmlMode && value === "") return key; return `${key}="${encode(value)}"`; }).join(" "); } @@ -132076,9 +120227,7 @@ const singleTag = new Set([ function render$1(node, options = {}) { const nodes = "length" in node ? node : [node]; let output = ""; - for (let i = 0; i < nodes.length; i++) { - output += renderNode(nodes[i], options); - } + for (let i = 0; i < nodes.length; i++) output += renderNode(nodes[i], options); return output; } function renderNode(node, options) { @@ -132110,35 +120259,25 @@ function renderTag(elem, opts) { var _a; if (opts.xmlMode === "foreign") { elem.name = (_a = elementNames.get(elem.name)) !== null && _a !== void 0 ? _a : elem.name; - if (elem.parent && foreignModeIntegrationPoints.has(elem.parent.name)) { - opts = { - ...opts, - xmlMode: false - }; - } - } - if (!opts.xmlMode && foreignElements.has(elem.name)) { - opts = { + if (elem.parent && foreignModeIntegrationPoints.has(elem.parent.name)) opts = { ...opts, - xmlMode: "foreign" + xmlMode: false }; } + if (!opts.xmlMode && foreignElements.has(elem.name)) opts = { + ...opts, + xmlMode: "foreign" + }; let tag = `<${elem.name}`; const attribs = formatAttributes(elem.attribs, opts); - if (attribs) { - tag += ` ${attribs}`; - } + if (attribs) tag += ` ${attribs}`; if (elem.children.length === 0 && (opts.xmlMode ? opts.selfClosingTags !== false : opts.selfClosingTags && singleTag.has(elem.name))) { if (!opts.xmlMode) tag += " "; tag += "/>"; } else { tag += ">"; - if (elem.children.length > 0) { - tag += render$1(elem.children, opts); - } - if (opts.xmlMode || !singleTag.has(elem.name)) { - tag += ``; - } + if (elem.children.length > 0) tag += render$1(elem.children, opts); + if (opts.xmlMode || !singleTag.has(elem.name)) tag += ``; } return tag; } @@ -132148,9 +120287,7 @@ function renderDirective(elem) { function renderText(elem, opts) { var _a; let data = elem.data || ""; - if (((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) !== false && !(!opts.xmlMode && elem.parent && unencodedElements.has(elem.parent.name))) { - data = opts.xmlMode || opts.encodeEntities !== "utf8" ? encodeXML$1(data) : escapeText$1(data); - } + if (((_a = opts.encodeEntities) !== null && _a !== void 0 ? _a : opts.decodeEntities) !== false && !(!opts.xmlMode && elem.parent && unencodedElements.has(elem.parent.name))) data = opts.xmlMode || opts.encodeEntities !== "utf8" ? encodeXML$1(data) : escapeText$1(data); return data; } function renderCdata(elem) { @@ -132159,7 +120296,6 @@ function renderCdata(elem) { function renderComment(elem) { return ``; } - //#endregion //#region ../node_modules/domutils/lib/esm/stringify.js /** @@ -132207,9 +120343,7 @@ function getText(node) { */ function textContent(node) { if (Array.isArray(node)) return node.map(textContent).join(""); - if (hasChildren(node) && !isComment(node)) { - return textContent(node.children); - } + if (hasChildren(node) && !isComment(node)) return textContent(node.children); if (isText(node)) return node.data; return ""; } @@ -132223,13 +120357,10 @@ function textContent(node) { */ function innerText(node) { if (Array.isArray(node)) return node.map(innerText).join(""); - if (hasChildren(node) && (node.type === ElementType.Tag || isCDATA(node))) { - return innerText(node.children); - } + if (hasChildren(node) && (node.type === ElementType.Tag || isCDATA(node))) return innerText(node.children); if (isText(node)) return node.data; return ""; } - //#endregion //#region ../node_modules/domutils/lib/esm/traversal.js /** @@ -132337,7 +120468,6 @@ function prevElementSibling(elem) { while (prev !== null && !isTag(prev)) ({prev} = prev); return prev; } - //#endregion //#region ../node_modules/domutils/lib/esm/manipulation.js /** @@ -132352,9 +120482,7 @@ function removeElement(elem) { if (elem.parent) { const childs = elem.parent.children; const childsIndex = childs.lastIndexOf(elem); - if (childsIndex >= 0) { - childs.splice(childsIndex, 1); - } + if (childsIndex >= 0) childs.splice(childsIndex, 1); } elem.next = null; elem.prev = null; @@ -132369,13 +120497,9 @@ function removeElement(elem) { */ function replaceElement(elem, replacement) { const prev = replacement.prev = elem.prev; - if (prev) { - prev.next = replacement; - } + if (prev) prev.next = replacement; const next = replacement.next = elem.next; - if (next) { - next.prev = replacement; - } + if (next) next.prev = replacement; const parent = replacement.parent = elem.parent; if (parent) { const childs = parent.children; @@ -132398,9 +120522,7 @@ function appendChild(parent, child) { const sibling = parent.children[parent.children.length - 2]; sibling.next = child; child.prev = sibling; - } else { - child.prev = null; - } + } else child.prev = null; } /** * Append an element after another. @@ -132423,9 +120545,7 @@ function append$1(elem, next) { const childs = parent.children; childs.splice(childs.lastIndexOf(currNext), 0, next); } - } else if (parent) { - parent.children.push(next); - } + } else if (parent) parent.children.push(next); } /** * Prepend a child to an element. @@ -132442,9 +120562,7 @@ function prependChild(parent, child) { const sibling = parent.children[1]; sibling.prev = child; child.next = sibling; - } else { - child.next = null; - } + } else child.next = null; } /** * Prepend an element before another. @@ -132460,15 +120578,12 @@ function prepend$1(elem, prev) { const childs = parent.children; childs.splice(childs.indexOf(elem), 0, prev); } - if (elem.prev) { - elem.prev.next = prev; - } + if (elem.prev) elem.prev.next = prev; prev.parent = parent; prev.prev = elem.prev; prev.next = elem; elem.prev = prev; } - //#endregion //#region ../node_modules/domutils/lib/esm/querying.js /** @@ -132502,9 +120617,7 @@ function find$3(test, nodes, recurse, limit) { const indexStack = [0]; for (;;) { if (indexStack[0] >= nodeStack[0].length) { - if (indexStack.length === 1) { - return result; - } + if (indexStack.length === 1) return result; nodeStack.shift(); indexStack.shift(); continue; @@ -132545,9 +120658,7 @@ function findOne(test, nodes, recurse = true) { const searchedNodes = Array.isArray(nodes) ? nodes : [nodes]; for (let i = 0; i < searchedNodes.length; i++) { const node = searchedNodes[i]; - if (isTag(node) && test(node)) { - return node; - } + if (isTag(node) && test(node)) return node; if (recurse && hasChildren(node) && node.children.length > 0) { const found = findOne(test, node.children, true); if (found) return found; @@ -132582,9 +120693,7 @@ function findAll(test, nodes) { const indexStack = [0]; for (;;) { if (indexStack[0] >= nodeStack[0].length) { - if (nodeStack.length === 1) { - return result; - } + if (nodeStack.length === 1) return result; nodeStack.shift(); indexStack.shift(); continue; @@ -132597,7 +120706,6 @@ function findAll(test, nodes) { } } } - //#endregion //#region ../node_modules/domutils/lib/esm/legacy.js /** @@ -132605,23 +120713,16 @@ function findAll(test, nodes) { */ const Checks = { tag_name(name) { - if (typeof name === "function") { - return (elem) => isTag(elem) && name(elem.name); - } else if (name === "*") { - return isTag; - } + if (typeof name === "function") return (elem) => isTag(elem) && name(elem.name); + else if (name === "*") return isTag; return (elem) => isTag(elem) && elem.name === name; }, tag_type(type) { - if (typeof type === "function") { - return (elem) => type(elem.type); - } + if (typeof type === "function") return (elem) => type(elem.type); return (elem) => elem.type === type; }, tag_contains(data) { - if (typeof data === "function") { - return (elem) => isText(elem) && data(elem.data); - } + if (typeof data === "function") return (elem) => isText(elem) && data(elem.data); return (elem) => isText(elem) && elem.data === data; } }; @@ -132635,9 +120736,7 @@ const Checks = { * particular value. */ function getAttribCheck(attrib, value) { - if (typeof value === "function") { - return (elem) => isTag(elem) && value(elem.attribs[attrib]); - } + if (typeof value === "function") return (elem) => isTag(elem) && value(elem.attribs[attrib]); return (elem) => isTag(elem) && elem.attribs[attrib] === value; } /** @@ -132745,7 +120844,6 @@ function getElementsByClassName(className, nodes, recurse = true, limit = Infini function getElementsByTagType(type, nodes, recurse = true, limit = Infinity) { return filter$3(Checks["tag_type"](type), nodes, recurse, limit); } - //#endregion //#region ../node_modules/domutils/lib/esm/helpers.js /** @@ -132764,11 +120862,9 @@ function removeSubsets(nodes) { nodes.splice(idx, 1); continue; } - for (let ancestor = node.parent; ancestor; ancestor = ancestor.parent) { - if (nodes.includes(ancestor)) { - nodes.splice(idx, 1); - break; - } + for (let ancestor = node.parent; ancestor; ancestor = ancestor.parent) if (nodes.includes(ancestor)) { + nodes.splice(idx, 1); + break; } } return nodes; @@ -132814,9 +120910,7 @@ var DocumentPosition; function compareDocumentPosition(nodeA, nodeB) { const aParents = []; const bParents = []; - if (nodeA === nodeB) { - return 0; - } + if (nodeA === nodeB) return 0; let current = hasChildren(nodeA) ? nodeA : nodeA.parent; while (current) { aParents.unshift(current); @@ -132829,25 +120923,17 @@ function compareDocumentPosition(nodeA, nodeB) { } const maxIdx = Math.min(aParents.length, bParents.length); let idx = 0; - while (idx < maxIdx && aParents[idx] === bParents[idx]) { - idx++; - } - if (idx === 0) { - return DocumentPosition.DISCONNECTED; - } + while (idx < maxIdx && aParents[idx] === bParents[idx]) idx++; + if (idx === 0) return DocumentPosition.DISCONNECTED; const sharedParent = aParents[idx - 1]; const siblings = sharedParent.children; const aSibling = aParents[idx]; const bSibling = bParents[idx]; if (siblings.indexOf(aSibling) > siblings.indexOf(bSibling)) { - if (sharedParent === nodeB) { - return DocumentPosition.FOLLOWING | DocumentPosition.CONTAINED_BY; - } + if (sharedParent === nodeB) return DocumentPosition.FOLLOWING | DocumentPosition.CONTAINED_BY; return DocumentPosition.FOLLOWING; } - if (sharedParent === nodeA) { - return DocumentPosition.PRECEDING | DocumentPosition.CONTAINS; - } + if (sharedParent === nodeA) return DocumentPosition.PRECEDING | DocumentPosition.CONTAINS; return DocumentPosition.PRECEDING; } /** @@ -132863,16 +120949,12 @@ function uniqueSort(nodes) { nodes = nodes.filter((node, i, arr) => !arr.includes(node, i + 1)); nodes.sort((a, b) => { const relative = compareDocumentPosition(a, b); - if (relative & DocumentPosition.PRECEDING) { - return -1; - } else if (relative & DocumentPosition.FOLLOWING) { - return 1; - } + if (relative & DocumentPosition.PRECEDING) return -1; + else if (relative & DocumentPosition.FOLLOWING) return 1; return 0; }); return nodes; } - //#endregion //#region ../node_modules/domutils/lib/esm/feeds.js /** @@ -132904,31 +120986,21 @@ function getAtomFeed(feedRoot) { addConditionally(entry, "id", "id", children); addConditionally(entry, "title", "title", children); const href = (_a = getOneElement("link", children)) === null || _a === void 0 ? void 0 : _a.attribs["href"]; - if (href) { - entry.link = href; - } + if (href) entry.link = href; const description = fetch$1("summary", children) || fetch$1("content", children); - if (description) { - entry.description = description; - } + if (description) entry.description = description; const pubDate = fetch$1("updated", children); - if (pubDate) { - entry.pubDate = new Date(pubDate); - } + if (pubDate) entry.pubDate = new Date(pubDate); return entry; }) }; addConditionally(feed, "id", "id", childs); addConditionally(feed, "title", "title", childs); const href = (_a = getOneElement("link", childs)) === null || _a === void 0 ? void 0 : _a.attribs["href"]; - if (href) { - feed.link = href; - } + if (href) feed.link = href; addConditionally(feed, "description", "subtitle", childs); const updated = fetch$1("updated", childs); - if (updated) { - feed.updated = new Date(updated); - } + if (updated) feed.updated = new Date(updated); addConditionally(feed, "author", "email", childs, true); return feed; } @@ -132960,9 +121032,7 @@ function getRssFeed(feedRoot) { addConditionally(feed, "link", "link", childs); addConditionally(feed, "description", "description", childs); const updated = fetch$1("lastBuildDate", childs); - if (updated) { - feed.updated = new Date(updated); - } + if (updated) feed.updated = new Date(updated); addConditionally(feed, "author", "managingEditor", childs, true); return feed; } @@ -132994,19 +121064,9 @@ function getMediaElements(where) { medium: attribs["medium"], isDefault: !!attribs["isDefault"] }; - for (const attrib of MEDIA_KEYS_STRING) { - if (attribs[attrib]) { - media[attrib] = attribs[attrib]; - } - } - for (const attrib of MEDIA_KEYS_INT) { - if (attribs[attrib]) { - media[attrib] = parseInt(attribs[attrib], 10); - } - } - if (attribs["expression"]) { - media.expression = attribs["expression"]; - } + for (const attrib of MEDIA_KEYS_STRING) if (attribs[attrib]) media[attrib] = attribs[attrib]; + for (const attrib of MEDIA_KEYS_INT) if (attribs[attrib]) media[attrib] = parseInt(attribs[attrib], 10); + if (attribs["expression"]) media.expression = attribs["expression"]; return media; }); } @@ -133053,10 +121113,9 @@ function addConditionally(obj, prop, tagName, where, recurse = false) { function isValidFeed(value) { return value === "rss" || value === "feed" || value === "rdf:RDF"; } - //#endregion //#region ../node_modules/domutils/lib/esm/index.js -var esm_exports = /* @__PURE__ */ __exportAll({ +var esm_exports$1 = /* @__PURE__ */ __exportAll({ DocumentPosition: () => DocumentPosition, append: () => append$1, appendChild: () => appendChild, @@ -133100,7 +121159,6 @@ var esm_exports = /* @__PURE__ */ __exportAll({ textContent: () => textContent, uniqueSort: () => uniqueSort }); - //#endregion //#region ../node_modules/cheerio/dist/esm/static.js var static_exports = /* @__PURE__ */ __exportAll({ @@ -133123,7 +121181,7 @@ var static_exports = /* @__PURE__ */ __exportAll({ */ function render(that, dom, options) { if (!that) return ""; - return that(dom !== null && dom !== void 0 ? dom : that._root.children, null, undefined, options).toString(); + return that(dom !== null && dom !== void 0 ? dom : that._root.children, null, void 0, options).toString(); } /** * Checks if a passed object is an options object. @@ -133136,7 +121194,7 @@ function isOptions(dom, options) { return !options && typeof dom === "object" && dom != null && !("length" in dom) && !("type" in dom); } function html$1(dom, options) { - const toRender = isOptions(dom) ? (options = dom, undefined) : dom; + const toRender = isOptions(dom) ? (options = dom, void 0) : dom; const opts = { ...this === null || this === void 0 ? void 0 : this._options, ...flattenOptions(options) @@ -133171,22 +121229,14 @@ function xml(dom) { function text$1(elements) { const elems = elements !== null && elements !== void 0 ? elements : this ? this.root() : []; let ret = ""; - for (let i = 0; i < elems.length; i++) { - ret += textContent(elems[i]); - } + for (let i = 0; i < elems.length; i++) ret += textContent(elems[i]); return ret; } function parseHTML(data, context, keepScripts = typeof context === "boolean" ? context : false) { - if (!data || typeof data !== "string") { - return null; - } - if (typeof context === "boolean") { - keepScripts = context; - } + if (!data || typeof data !== "string") return null; + if (typeof context === "boolean") keepScripts = context; const parsed = this.load(data, this._options, false); - if (!keepScripts) { - parsed("script").remove(); - } + if (!keepScripts) parsed("script").remove(); return [...parsed.root()[0].children]; } /** @@ -133219,15 +121269,11 @@ function root$1() { * @see {@link https://api.jquery.com/jQuery.contains/} */ function contains$1(container, contained) { - if (contained === container) { - return false; - } + if (contained === container) return false; let next = contained; while (next && next !== next.parent) { next = next.parent; - if (next === container) { - return true; - } + if (next === container) return true; } return false; } @@ -133254,14 +121300,10 @@ function extract$1(map) { * @see {@link https://api.jquery.com/jQuery.merge/} */ function merge(arr1, arr2) { - if (!isArrayLike$1(arr1) || !isArrayLike$1(arr2)) { - return; - } + if (!isArrayLike$1(arr1) || !isArrayLike$1(arr2)) return; let newLength = arr1.length; const len = +arr2.length; - for (let i = 0; i < len; i++) { - arr1[newLength++] = arr2[i]; - } + for (let i = 0; i < len; i++) arr1[newLength++] = arr2[i]; arr1.length = newLength; return arr1; } @@ -133273,20 +121315,11 @@ function merge(arr1, arr2) { * @returns Indicates if the item is array-like. */ function isArrayLike$1(item) { - if (Array.isArray(item)) { - return true; - } - if (typeof item !== "object" || item === null || !("length" in item) || typeof item.length !== "number" || item.length < 0) { - return false; - } - for (let i = 0; i < item.length; i++) { - if (!(i in item)) { - return false; - } - } + if (Array.isArray(item)) return true; + if (typeof item !== "object" || item === null || !("length" in item) || typeof item.length !== "number" || item.length < 0) return false; + for (let i = 0; i < item.length; i++) if (!(i in item)) return false; return true; } - //#endregion //#region ../node_modules/cheerio/dist/esm/utils.js /** @@ -133359,15 +121392,12 @@ var CharacterCode; * @returns Indicates if `str` is HTML. */ function isHtml(str) { - if (typeof str !== "string") { - return false; - } + if (typeof str !== "string") return false; const tagStart = str.indexOf("<"); if (tagStart === -1 || tagStart > str.length - 3) return false; const tagChar = str.charCodeAt(tagStart + 1); return (tagChar >= CharacterCode.LowerA && tagChar <= CharacterCode.LowerZ || tagChar >= CharacterCode.UpperA && tagChar <= CharacterCode.UpperZ || tagChar === CharacterCode.Exclamation) && str.includes(">", tagStart + 2); } - //#endregion //#region ../node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js var _a$2; @@ -133421,9 +121451,7 @@ const fromCodePoint$1 = (_a$2 = String.fromCodePoint) !== null && _a$2 !== void */ function replaceCodePoint$1(codePoint) { var _a; - if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) { - return 65533; - } + if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) return 65533; return (_a = decodeMap$1.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint; } /** @@ -133436,12 +121464,11 @@ function replaceCodePoint$1(codePoint) { function decodeCodePoint$1(codePoint) { return fromCodePoint$1(replaceCodePoint$1(codePoint)); } - //#endregion //#region ../node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.js function decodeBase64(input) { const binary = typeof atob === "function" ? atob(input) : typeof Buffer.from === "function" ? Buffer.from(input, "base64").toString("binary") : new Buffer(input, "base64").toString("binary"); - const evenLength = binary.length & ~1; + const evenLength = binary.length & -2; const out = new Uint16Array(evenLength / 2); for (let index = 0, outIndex = 0; index < evenLength; index += 2) { const lo = binary.charCodeAt(index); @@ -133450,15 +121477,12 @@ function decodeBase64(input) { } return out; } - //#endregion //#region ../node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.js const htmlDecodeTree$1 = /* @__PURE__ */ decodeBase64("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAtIQACYWVpb0EBRAFKAU0B8iFvbgxhZABpAGwAO4DHAMdAcgBjAAhhbiJpbnQAAKAwIm8AdAAKYQABZG5ZAV0BaSJsbGEAuGB0I2VyRG90ALdg8gA5AWkAp2NyImNsZQAAAkRNUFRwAXQBeQF9AW8AdAAAoJkiaSJudXMAAKCWIuwhdXMAoJUiaSJtZXMAAKCXIm8AAAFjc4cBlAFrKndpc2VDb250b3VySW50ZWdyYWwAAKAyImUjQ3VybHkAAAFEUZwBpAFvJXVibGVRdW90ZQAAoB0gdSJvdGUAAKAZIAACbG5wdbABtgHNAdgBbwBuAGWgNyIAoHQqgAFnaXQAvAHBAcUB8iJ1ZW50AKBhIm4AdAAAoC8i7yV1ckludGVncmFsAKAuIgABZnLRAdMBAKACIe8iZHVjdACgECJuLnRlckNsb2Nrd2lzZUNvbnRvdXJJbnRlZ3JhbAAAoDMi7yFzcwCgLypjAHIAAOA12J7ccABDoNMiYQBwAACgTSKABURKU1phY2VmaW9zAAsCEgIVAhgCGwIsAjQCOQI9AnMCfwNvoEUh9CJyYWhkAKARKWMAeQACZGMAeQAFZGMAeQAPZIABZ3JzACECJQIoAuchZXIAoCEgcgAAoKEhaAB2AACg5CoAAWF5MAIzAvIhb24OYRRkbAB0oAciYQCUY3IAAOA12AfdAAFhZkECawIAAWNtRQJnAvIjaXRpY2FsAAJBREdUUAJUAl8CYwJjInV0ZQC0YG8AdAFZAloC2WJiJGxlQWN1dGUA3WJyImF2ZQBgYGkibGRlANxi7yFuZACgxCJmJWVyZW50aWFsRAAAoEYhcAR9AgAAAAAAAIECjgIAABoDZgAA4DXYO91EoagAhQKJAm8AdAAAoNwgcSJ1YWwAAKBQIuIhbGUAA0NETFJVVpkCqAK1Au8C/wIRA28AbgB0AG8AdQByAEkAbgB0AGUAZwByAGEA7ADEAW8AdAKvAgAAAACwAqhgbiNBcnJvdwAAoNMhAAFlb7kC0AJmAHQAgAFBUlQAwQLGAs0CciJyb3cAAKDQIekkZ2h0QXJyb3cAoNQhZQDlACsCbgBnAAABTFLWAugC5SFmdAABQVLcAuECciJyb3cAAKD4J+kkZ2h0QXJyb3cAoPon6SRnaHRBcnJvdwCg+SdpImdodAAAAUFU9gL7AnIicm93AACg0iFlAGUAAKCoInAAQQIGAwAAAAALA3Iicm93AACg0SFvJHduQXJyb3cAAKDVIWUlcnRpY2FsQmFyAACgJSJuAAADQUJMUlRhJAM2AzoDWgNxA3oDciJyb3cAAKGTIUJVLAMwA2EAcgAAoBMpcCNBcnJvdwAAoPUhciJldmUAEWPlIWZ00gJDAwAASwMAAFIDaSVnaHRWZWN0b3IAAKBQKWUkZVZlY3RvcgAAoF4p5SJjdG9yQqC9IWEAcgAAoFYpaSJnaHQA1AFiAwAAaQNlJGVWZWN0b3IAAKBfKeUiY3RvckKgwSFhAHIAAKBXKWUAZQBBoKQiciJyb3cAAKCnIXIAcgBvAPcAtAIAAWN0gwOHA3IA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YwAAoN8i4SFycnCgtiEAoD0pgKIqImJjZG9zACsVMBU6FT4VQRVyImNhcAAAoEgqAAFhdTQVNxVwAACgRipwAACgSipvAHQAAKCNInIAAKBFKgDgKiIA/gACYWxydksVURVuFXMVcgByAG2gtyEAoDwpeQCAAWV2dwBYFWUVaRVxAHACXxUAAAAAYxVyAGUA4wAXFXUA4wAZFWUAZQAAoM4iZSJkZ2UAAKDPImUAbgA7gKQApEBlI2Fycm93AAABbHJ7FX8V5SFmdACgtiFpImdodAAAoLchZQDkAG0VAAFjaYsVkRVvAG4AaQBuAPQAkwFuAHQAAKAxImwiY3R5AACgLSOACUFIYWJjZGVmaGlqbG9yc3R1d3oAuBW7Fb8V1RXgFegV+RUKFhUWHxZUFlcWZRbFFtsW7xb7FgUXChdyAPIAtAJhAHIAAKBlKQACZ2xyc8YVyhXOFdAV5yFlcgCgICDlIXRoAKA4IfIA9QxoAHagECAAoKMiawHZFd4VYSJyb3cAAKAPKWEA4wBfAgABYXnkFecV8iFvbg9hNGQAoUYhYW/tFfQVAAFnciEC8RVyAACgyiF0InNlcQAAoHcqgAFnbG0A/xUCFgUWO4CwALBAdABhALRjcCJ0eXYAAKCxKQABaXIOFhIW8yFodACgfykA4DXYId1hAHIAAAFschsWHRYAoMMhAKDCIYACYWVnc3YAKBauAjYWOhY+Fm0AAKHEIm9zLhY0Fm4AZABzoMQi9SFpdACgZiZhIm1tYQDdY2kAbgAAoPIiAKH3AGlvQxZRFmQAZQAAgfcAO29KFksW90BuI3RpbWVzAACgxyJuAPgAUBZjAHkAUmRjAG8CXhYAAAAAYhZyAG4AAKAeI28AcAAAoA0jgAJscHR1dwBuFnEWdRaSFp4W7CFhciRgZgAA4DXYVd0AotkCZW1wc30WhBaJFo0WcQBkoFAibwB0AACgUSJpIm51cwAAoDgi7CF1cwCgFCLxInVhcmUAoKEiYgBsAGUAYgBhAHIAdwBlAGQAZwDlANcAbgCAAWFkaAClFqoWtBZyAHIAbwD3APUMbwB3AG4AYQByAHIAbwB3APMA8xVhI3Jwb29uAAABbHK8FsAWZQBmAPQAHBZpAGcAaAD0AB4WYgHJFs8WawBhAHIAbwD3AJILbwLUFgAAAADYFnIAbgAAoB8jbwBwAACgDCOAAWNvdADhFukW7BYAAXJ55RboFgDgNdi53FVkbAAAoPYp8iFvaxFhAAFkcvMW9xZvAHQAAKDxImkA5qC/JVsSAAFhaP8WAhdyAPIANQNhAPIA1wvhIm5nbGUAoKYpAAFjaQ4XEBd5AF9k5yJyYXJyAKD/JwAJRGFjZGVmZ2xtbm9wcXJzdHV4MRc4F0YXWxcyBF4XaRd5F40XrBe0F78X2RcVGCEYLRg1GEAYAAFEbzUXgRZvAPQA+BUAAWNzPBdCF3UAdABlADuA6QDpQPQhZXIAoG4qAAJhaW95TRdQF1YXWhfyIW9uG2FyAGOgViI7gOoA6kDsIW9uAKBVIk1kbwB0ABdhAAFEcmIXZhdvAHQAAKBSIgDgNdgi3XKhmipuF3QXYQB2AGUAO4DoAOhAZKCWKm8AdAAAoJgqgKGZKmlscwCAF4UXhxfuInRlcnMAoOcjAKATIWSglSpvAHQAAKCXKoABYXBzAJMXlheiF2MAcgATYXQAeQBzogUinxcAAAAAoRdlAHQAAKAFInAAMaADIDMBqRerFwCgBCAAoAUgAAFnc7AXsRdLYXAAAKACIAABZ3C4F7sXbwBuABlhZgAA4DXYVt2AAWFscwDFF8sXzxdyAHOg1SJsAACg4yl1AHMAAKBxKmkAAKG1A2x21RfYF28AbgC1Y/VjAAJjc3V24BfoF/0XEBgAAWlv5BdWF3IAYwAAoFYiaQLuFwAAAADwF+0ADQThIW50AAFnbPUX+Rd0AHIAAKCWKuUhc3MAoJUqgAFhZWkAAxgGGAoYbABzAD1gcwB0AACgXyJ2AESgYSJEAACgeCrwImFyc2wAoOUpAAFEYRkYHRhvAHQAAKBTInIAcgAAoHEpgAFjZGkAJxgqGO0XcgAAoC8hbwD0AIwCAAFhaDEYMhi3YzuA8ADwQAABbXI5GD0YbAA7gOsA60BvAACgrCCAAWNpcABGGEgYSxhsACFgcwD0ACwEAAFlb08YVxhjAHQAYQB0AGkAbwDuABoEbgBlAG4AdABpAGEAbADlADME4Ql1GAAAgRgAAIMYiBgAAAAAoRilGAAAqhgAALsYvhjRGAAA1xgnGWwAbABpAG4AZwBkAG8AdABzAGUA8QBlF3kARGRtImFsZQAAoEAmgAFpbHIAjRiRGJ0Y7CFpZwCgA/tpApcYAAAAAJoYZwAAoAD7aQBnAACgBPsA4DXYI93sIWlnAKAB++whaWcA4GYAagCAAWFsdACvGLIYthh0AACgbSZpAGcAAKAC+24AcwAAoLElbwBmAJJh8AHCGAAAxhhmAADgNdhX3QABYWvJGMwYbADsAGsEdqDUIgCg2SphI3J0aW50AACgDSoAAWFv2hgiGQABY3PeGB8ZsQPnGP0YBRkSGRUZAAAdGbID7xjyGPQY9xj5GAAA+xg7gL0AvUAAoFMhO4C8ALxAAKBVIQCgWSEAoFshswEBGQAAAxkAoFQhAKBWIbQCCxkOGQAAAAAQGTuAvgC+QACgVyEAoFwhNQAAoFghtgEZGQAAGxkAoFohAKBdITgAAKBeIWwAAKBEIHcAbgAAoCIjYwByAADgNdi73IAIRWFiY2RlZmdpamxub3JzdHYARhlKGVoZXhlmGWkZkhmWGZkZnRmgGa0ZxhnLGc8Z4BkjGmygZyIAoIwqgAFjbXAAUBlTGVgZ9SF0ZfVhbQBhAOSgswM6FgCghipyImV2ZQAfYQABaXliGWUZcgBjAB1hM2RvAHQAIWGAoWUibHFzAMYEcBl6GfGhZSLOBAAAdhlsAGEAbgD0AN8EgKF+KmNkbACBGYQZjBljAACgqSpvAHQAb6CAKmyggioAoIQqZeDbIgD+cwAAoJQqcgAA4DXYJN3noGsirATtIWVsAKA3IWMAeQBTZIChdyJFYWoApxmpGasZAKCSKgCgpSoAoKQqAAJFYWVztBm2Gb0ZwhkAoGkicABwoIoq8iFveACgiipxoIgq8aCIKrUZaQBtAACg5yJwAGYAAOA12FjdYQB2AOUAYwIAAWNp0xnWGXIAAKAKIW0AAKFzImVs3BneGQCgjioAoJAqAIM+ADtjZGxxco0E6xn0GfgZ/BkBGgABY2nvGfEZAKCnKnIAAKB6Km8AdAAAoNci0CFhcgCglSl1ImVzdAAAoHwqgAJhZGVscwAKGvQZFhrVBCAa8AEPGgAAFBpwAHIAbwD4AFkZcgAAoHgpcQAAAWxxxAQbGmwAZQBzAPMASRlpAO0A5AQAAWVuJxouGnIjdG5lcXEAAOBpIgD+xQAsGgAFQWFiY2Vma29zeUAaQxpmGmoabRqDGocalhrCGtMacgDyAMwCAAJpbG1yShpOGlAaVBpyAHMA8ABxD2YAvWBpAGwA9AASBQABZHJYGlsaYwB5AEpkAKGUIWN3YBpkGmkAcgAAoEgpAKCtIWEAcgAAoA8h6SFyYyVhgAFhbHIAcxp7Gn8a8iF0c3WgZSZpAHQAAKBlJuwhaXAAoCYg4yFvbgCguSJyAADgNdgl3XMAAAFld4wakRphInJvdwAAoCUpYSJyb3cAAKAmKYACYW1vcHIAnxqjGqcauhq+GnIAcgAAoP8h9CFodACgOyJrAAABbHKsGrMaZSRmdGFycm93AACgqSHpJGdodGFycm93AKCqIWYAAOA12Fnd4iFhcgCgFSCAAWNsdADIGswa0BpyAADgNdi93GEAcwDoAGka8iFvaydhAAFicNca2xr1IWxsAKBDIOghZW4AoBAg4Qr2GgAA/RoAAAgbExsaGwAAIRs7GwAAAAA+G2IbmRuVG6sbAACyG80b0htjAHUAdABlADuA7QDtQAChYyBpeQEbBhtyAGMAO4DuAO5AOGQAAWN4CxsNG3kANWRjAGwAO4ChAKFAAAFmcssCFhsA4DXYJt1yAGEAdgBlADuA7ADsQIChSCFpbm8AJxsyGzYbAAFpbisbLxtuAHQAAKAMKnQAAKAtIuYhaW4AoNwpdABhAACgKSHsIWlnM2GAAWFvcABDG1sbXhuAAWNndABJG0sbWRtyACthgAFlbHAAcQVRG1UbaQBuAOUAyAVhAHIA9AByBWgAMWFmAACgtyJlAGQAtWEAoggiY2ZvdGkbbRt1G3kb4SFyZQCgBSFpAG4AdKAeImkAZQAAoN0pZABvAPQAWxsAoisiY2VscIEbhRuPG5QbYQBsAACguiIAAWdyiRuNG2UAcgDzACMQ4wCCG2EicmhrAACgFyryIW9kAKA8KgACY2dwdJ8boRukG6gbeQBRZG8AbgAvYWYAAOA12FrdYQC5Y3UAZQBzAHQAO4C/AL9AAAFjabUbuRtyAADgNdi+3G4AAKIIIkVkc3bCG8QbyBvQAwCg+SJvAHQAAKD1Inag9CIAoPMiaaBiIOwhZGUpYesB1hsAANkbYwB5AFZkbAA7gO8A70AAA2NmbW9zdeYb7hvyG/Ub+hsFHAABaXnqG+0bcgBjADVhOWRyAADgNdgn3eEhdGg3YnAAZgAA4DXYW93jAf8bAAADHHIAAOA12L/c8iFjeVhk6yFjeVRkAARhY2ZnaGpvcxUcGhwiHCYcKhwtHDAcNRzwIXBhdqC6A/BjAAFleR4cIRzkIWlsN2E6ZHIAAOA12CjdciJlZW4AOGFjAHkARWRjAHkAXGRwAGYAAOA12FzdYwByAADgNdjA3IALQUJFSGFiY2RlZmdoamxtbm9wcnN0dXYAXhxtHHEcdRx5HN8cBx0dHTwd3B3tHfEdAR4EHh0eLB5FHrwewx7hHgkfPR9LH4ABYXJ0AGQcZxxpHHIA8gBvB/IAxQLhIWlsAKAbKeEhcnIAoA4pZ6BmIgCgiyphAHIAAKBiKWMJjRwAAJAcAACVHAAAAAAAAAAAAACZHJwcAACmHKgcrRwAANIc9SF0ZTph7SJwdHl2AKC0KXIAYQDuAFoG4iFkYbtjZwAAoegnZGyhHKMcAKCRKeUAiwYAoIUqdQBvADuAqwCrQHIAgKOQIWJmaGxwc3QAuhy/HMIcxBzHHMoczhxmoOQhcwAAoB8pcwAAoB0p6wCyGnAAAKCrIWwAAKA5KWkAbQAAoHMpbAAAoKIhAKGrKmFl1hzaHGkAbAAAoBkpc6CtKgDgrSoA/oABYWJyAOUc6RztHHIAcgAAoAwpcgBrAACgcicAAWFr8Rz4HGMAAAFla/Yc9xx7YFtgAAFlc/wc/hwAoIspbAAAAWR1Ax0FHQCgjykAoI0pAAJhZXV5Dh0RHRodHB3yIW9uPmEAAWRpFR0YHWkAbAA8YewAowbiAPccO2QAAmNxcnMkHScdLB05HWEAAKA2KXUAbwDyoBwgqhEAAWR1MB00HeghYXIAoGcpcyJoYXIAAKBLKWgAAKCyIQCiZCJmZ3FzRB1FB5Qdnh10AIACYWhscnQATh1WHWUdbB2NHXIicm93AHSgkCFhAOkAzxxhI3Jwb29uAAABZHVeHWId7yF3bgCgvSFwAACgvCHlJGZ0YXJyb3dzAKDHIWkiZ2h0AIABYWhzAHUdex2DHXIicm93APOglCGdBmEAcgBwAG8AbwBuAPMAzgtxAHUAaQBnAGEAcgByAG8A9wBlGugkcmVldGltZXMAoMsi8aFkIk0HAACaHWwAYQBuAPQAXgcAon0qY2Rnc6YdqR2xHbcdYwAAoKgqbwB0AG+gfypyoIEqAKCDKmXg2iIA/nMAAKCTKoACYWRlZ3MAwB3GHcod1h3ZHXAAcAByAG8A+ACmHG8AdAAAoNYicQAAAWdxzx3SHXQA8gBGB2cAdADyAHQcdADyAFMHaQDtAGMHgAFpbHIA4h3mHeod8yFodACgfClvAG8A8gDKBgDgNdgp3UWgdiIAoJEqYQH1Hf4dcgAAAWR1YB35HWygvCEAoGopbABrAACghCVjAHkAWWQAomoiYWNodAweDx4VHhkecgDyAGsdbwByAG4AZQDyAGAW4SFyZACgaylyAGkAAKD6JQABaW8hHiQe5CFvdEBh9SFzdGGgsCPjIWhlAKCwIwACRWFlczMeNR48HkEeAKBoInAAcKCJKvIhb3gAoIkqcaCHKvGghyo0HmkAbQAAoOYiAARhYm5vcHR3elIeXB5fHoUelh6mHqsetB4AAW5yVh5ZHmcAAKDsJ3IAAKD9IXIA6wCwBmcAgAFsbXIAZh52Hnse5SFmdAABYXKIB2weaQBnAGgAdABhAHIAcgBvAPcAkwfhInBzdG8AoPwnaQBnAGgAdABhAHIAcgBvAPcAmgdwI2Fycm93AAABbHKNHpEeZQBmAPQAxhxpImdodAAAoKwhgAFhZmwAnB6fHqIecgAAoIUpAOA12F3ddQBzAACgLSppIm1lcwAAoDQqYQGvHrMecwB0AACgFyLhAIoOZaHKJbkeRhLuIWdlAKDKJWEAcgBsoCgAdAAAoJMpgAJhY2htdADMHs8e1R7bHt0ecgDyAJ0GbwByAG4AZQDyANYWYQByAGSgyyEAoG0pAKAOIHIAaQAAoL8iAANhY2hpcXTrHu8e1QfzHv0eBh/xIXVvAKA5IHIAAOA12MHcbQDloXIi+h4AAPweAKCNKgCgjyoAAWJ19xwBH28AcqAYIACgGiDyIW9rQmEAhDwAO2NkaGlscXJCBhcfxh0gHyQfKB8sHzEfAAFjaRsfHR8AoKYqcgAAoHkqcgBlAOUAkx3tIWVzAKDJIuEhcnIAoHYpdSJlc3QAAKB7KgABUGk1HzkfYQByAACglillocMlAgdfEnIAAAFkdUIfRx9zImhhcgAAoEop6CFhcgCgZikAAWVuTx9WH3IjdG5lcXEAAOBoIgD+xQBUHwAHRGFjZGVmaGlsbm9wc3VuH3Ifoh+rH68ftx+7H74f5h/uH/MfBwj/HwsgxCFvdACgOiIAAmNscHJ5H30fiR+eH3IAO4CvAK9AAAFldIEfgx8AoEImZaAgJ3MAZQAAoCAnc6CmIXQAbwCAoaYhZGx1AJQfmB+cH28AdwDuAHkDZQBmAPQA6gbwAOkO6yFlcgCgriUAAW95ph+qH+0hbWEAoCkqPGThIXNoAKAUIOElc3VyZWRhbmdsZQCgISJyAADgNdgq3W8AAKAnIYABY2RuAMQfyR/bH3IAbwA7gLUAtUBhoiMi0B8AANMf1x9zAPQAKxFpAHIAAKDwKm8AdAA7gLcAt0B1AHMA4qESIh4TAADjH3WgOCIAoCoqYwHqH+0fcAAAoNsq8gB+GnAAbAB1APMACAgAAWRw9x/7H+UhbHMAoKciZgAA4DXYXt0AAWN0AyAHIHIAAOA12MLc8CFvcwCgPiJsobwDECAVIPQiaW1hcACguCJhAPAAEyAADEdMUlZhYmNkZWZnaGlqbG1vcHJzdHV2dzwgRyBmIG0geSCqILgg2iDeIBEhFSEyIUMhTSFQIZwhnyHSIQAiIyKLIrEivyIUIwABZ3RAIEMgAODZIjgD9uBrItIgBwmAAWVsdABNIF8gYiBmAHQAAAFhclMgWCByInJvdwAAoM0h6SRnaHRhcnJvdwCgziEA4NgiOAP24Goi0iBfCekkZ2h0YXJyb3cAoM8hAAFEZHEgdSDhIXNoAKCvIuEhc2gAoK4igAJiY25wdACCIIYgiSCNIKIgbABhAACgByL1IXRlRGFnAADgICLSIACiSSJFaW9wlSCYIJwgniAA4HAqOANkAADgSyI4A3MASWFyAG8A+AAyCnUAcgBhoG4mbADzoG4mmwjzAa8gAACzIHAAO4CgAKBAbQBwAOXgTiI4AyoJgAJhZW91eQDBIMogzSDWINkg8AHGIAAAyCAAoEMqbwBuAEhh5CFpbEZhbgBnAGSgRyJvAHQAAOBtKjgDcAAAoEIqPWThIXNoAKATIACjYCJBYWRxc3jpIO0g+SD+IAIhDCFyAHIAAKDXIXIAAAFocvIg9SBrAACgJClvoJch9wAGD28AdAAA4FAiOAN1AGkA9gC7CAABZWkGIQohYQByAACgKCntAN8I6SFzdPOgBCLlCHIAAOA12CvdAAJFZXN0/wgcISshLiHxoXEiIiEAABMJ8aFxIgAJAAAnIWwAYQBuAPQAEwlpAO0AGQlyoG8iAKBvIoABQWFwADghOyE/IXIA8gBeIHIAcgAAoK4hYQByAACg8ipzogsiSiEAAAAAxwtkoPwiAKD6ImMAeQBaZIADQUVhZGVzdABcIV8hYiFmIWkhkyGWIXIA8gBXIADgZiI4A3IAcgAAoJohcgAAoCUggKFwImZxcwBwIYQhjiF0AAABYXJ1IXohcgByAG8A9wBlIWkAZwBoAHQAYQByAHIAbwD3AD4h8aFwImAhAACKIWwAYQBuAPQAZwlz4H0qOAMAoG4iaQDtAG0JcqBuImkA5aDqIkUJaQDkADoKAAFwdKMhpyFmAADgNdhf3YCBrAA7aW4AriGvIcchrEBuAIChCSJFZHYAtyG6Ib8hAOD5IjgDbwB0AADg9SI4A+EB1gjEIcYhAKD3IgCg9iJpAHagDCLhAagJzyHRIQCg/iIAoP0igAFhb3IA2CHsIfEhcgCAoSYiYXN0AOAh5SHpIWwAbABlAOwAywhsAADg/SrlIADgAiI4A2wiaW50AACgFCrjoYAi9yEAAPohdQDlAJsJY+CvKjgDZaCAIvEAkwkAAkFhaXQHIgoiFyIeInIA8gBsIHIAcgAAoZshY3cRIhQiAOAzKTgDAOCdITgDZyRodGFycm93AACgmyFyAGkA5aDrIr4JgANjaGltcHF1AC8iPCJHIpwhTSJQIloigKGBImNlcgA2Iv0JOSJ1AOUABgoA4DXYw9zvIXJ0bQKdIQAAAABEImEAcgDhAOEhbQBloEEi8aBEIiYKYQDyAMsIcwB1AAABYnBWIlgi5QDUCeUA3wmAAWJjcABgInMieCKAoYQiRWVzAGci7glqIgDgxSo4A2UAdABl4IIi0iBxAPGgiCJoImMAZaCBIvEA/gmAoYUiRWVzAH8iFgqCIgDgxio4A2UAdABl4IMi0iBxAPGgiSKAIgACZ2lscpIilCKaIpwi7AAMCWwAZABlADuA8QDxQOcAWwlpI2FuZ2xlAAABbHKkIqoi5SFmdGWg6iLxAEUJaSJnaHQAZaDrIvEAvgltoL0DAKEjAGVzuCK8InIAbwAAoBYhcAAAoAcggARESGFkZ2lscnMAziLSItYi2iLeIugi7SICIw8j4SFzaACgrSLhIXJyAKAEKXAAAOBNItIg4SFzaACgrCIAAWV04iLlIgDgZSLSIADgPgDSIG4iZmluAACg3imAAUFldADzIvci+iJyAHIAAKACKQDgZCLSIHLgPADSIGkAZQAA4LQi0iAAAUF0BiMKI3IAcgAAoAMp8iFpZQDgtSLSIGkAbQAA4Dwi0iCAAUFhbgAaIx4jKiNyAHIAAKDWIXIAAAFociMjJiNrAACgIylvoJYh9wD/DuUhYXIAoCcpUxJqFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVCMAAF4jaSN/I4IjjSOeI8AUAAAAAKYjwCMAANoj3yMAAO8jHiQvJD8kRCQAAWNzVyNsFHUAdABlADuA8wDzQAABaXlhI2cjcgBjoJoiO4D0APRAPmSAAmFiaW9zAHEjdCN3I3EBeiNzAOgAdhTsIWFjUWF2AACgOCrvIWxkAKC8KewhaWdTYQABY3KFI4kjaQByAACgvykA4DXYLN1vA5QjAAAAAJYjAACcI24A22JhAHYAZQA7gPIA8kAAoMEpAAFibaEjjAphAHIAAKC1KQACYWNpdKwjryO6I70jcgDyAFkUAAFpcrMjtiNyAACgvinvIXNzAKC7KW4A5QDZCgCgwCmAAWFlaQDFI8gjyyNjAHIATWFnAGEAyWOAAWNkbgDRI9Qj1iPyIW9uv2MAoLYpdQDzAHgBcABmAADgNdhg3YABYWVsAOQj5yPrI3IAAKC3KXIAcAAAoLkpdQDzAHwBAKMoImFkaW9zdvkj/CMPJBMkFiQbJHIA8gBeFIChXSplZm0AAyQJJAwkcgBvoDQhZgAAoDQhO4CqAKpAO4C6ALpA5yFvZgCgtiJyAACgVipsIm9wZQAAoFcqAKBbKoABY2xvACMkJSQrJPIACCRhAHMAaAA7gPgA+EBsAACgmCJpAGwBMyQ4JGQAZQA7gPUA9UBlAHMAYaCXInMAAKA2Km0AbAA7gPYA9kDiIWFyAKA9I+EKXiQAAHokAAB8JJQkAACYJKkkAAAAALUkEQsAAPAkAAAAAAQleiUAAIMlcgCAoSUiYXN0AGUkbyQBCwCBtgA7bGokayS2QGwAZQDsABgDaQJ1JAAAAAB4JG0AAKDzKgCg/Sp5AD9kcgCAAmNpbXB0AIUkiCSLJJkSjyRuAHQAJWBvAGQALmBpAGwAAKAwIOUhbmsAoDEgcgAA4DXYLd2AAWltbwCdJKAkpCR2oMYD1WNtAGEA9AD+B24AZQAAoA4m9KHAA64kAAC0JGMjaGZvcmsAAKDUItZjAAFhdbgkxCRuAAABY2u9JMIkawBooA8hAKAOIfYAaRpzAACkKwBhYmNkZW1zdNMkIRPXJNsk4STjJOck6yTjIWlyAKAjKmkAcgAAoCIqAAFvdYsW3yQAoCUqAKByKm4AO4CxALFAaQBtAACgJip3AG8AAKAnKoABaXB1APUk+iT+JO4idGludACgFSpmAADgNdhh3W4AZAA7gKMAo0CApHoiRWFjZWlub3N1ABMlFSUYJRslTCVRJVklSSV1JQCgsypwAACgtyp1AOUAPwtjoK8qgKJ6ImFjZW5zACclLSU0JTYlSSVwAHAAcgBvAPgAFyV1AHIAbAB5AGUA8QA/C/EAOAuAAWFlcwA8JUElRSXwInByb3gAoLkqcQBxAACgtSppAG0AAKDoImkA7QBEC20AZQDzoDIgIguAAUVhcwBDJVclRSXwAEAlgAFkZnAATwtfJXElgAFhbHMAZSVpJW0l7CFhcgCgLiPpIW5lAKASI/UhcmYAoBMjdKAdIu8AWQvyIWVsAKCwIgABY2l9JYElcgAA4DXYxdzIY24iY3NwAACgCCAAA2Zpb3BzdZElKxuVJZolnyWkJXIAAOA12C7dcABmAADgNdhi3XIiaW1lAACgVyBjAHIAAOA12MbcgAFhZW8AqiW6JcAldAAAAWVpryW2JXIAbgBpAG8AbgDzABkFbgB0AACgFipzAHQAZaA/APEACRj0AG0LgApBQkhhYmNkZWZoaWxtbm9wcnN0dXgA4yXyJfYl+iVpJpAmpia9JtUm5ib4JlonaCdxJ3UnnietJ7EnyCfiJ+cngAFhcnQA6SXsJe4lcgDyAJkM8gD6AuEhaWwAoBwpYQByAPIA3BVhAHIAAKBkKYADY2RlbnFydAAGJhAmEyYYJiYmKyZaJgABZXUKJg0mAOA9IjEDdABlAFVhaQDjACAN7SJwdHl2AKCzKWcAgKHpJ2RlbAAgJiImJCYAoJIpAKClKeUA9wt1AG8AO4C7ALtAcgAApZIhYWJjZmhscHN0dz0mQCZFJkcmSiZMJk4mUSZVJlgmcAAAoHUpZqDlIXMAAKAgKQCgMylzAACgHinrALka8ACVHmwAAKBFKWkAbQAAoHQpbAAAoKMhAKCdIQABYWleJmImaQBsAACgGilvAG6gNiJhAGwA8wB2C4ABYWJyAG8mciZ2JnIA8gAvEnIAawAAoHMnAAFha3omgSZjAAABZWt/JoAmfWBdYAABZXOFJocmAKCMKWwAAAFkdYwmjiYAoI4pAKCQKQACYWV1eZcmmiajJqUm8iFvbllhAAFkaZ4moSZpAGwAV2HsAA8M4gCAJkBkAAJjbHFzrSawJrUmuiZhAACgNylkImhhcgAAoGkpdQBvAPKgHSCjAWgAAKCzIYABYWNnAMMm0iaUC2wAgKEcIWlwcwDLJs4migxuAOUAoAxhAHIA9ADaC3QAAKCtJYABaWxyANsm3ybjJvMhaHQAoH0pbwBvAPIANgwA4DXYL90AAWFv6ib1JnIAAAFkde8m8SYAoMEhbKDAIQCgbCl2oMED8WOAAWducwD+Jk4nUCdoAHQAAANhaGxyc3QKJxInISc1Jz0nRydyInJvdwB0oJIhYQDpAFYmYSNycG9vbgAAAWR1GiceJ28AdwDuAPAmcAAAoMAh5SFmdAABYWgnJy0ncgByAG8AdwDzAAkMYQByAHAAbwBvAG4A8wATBGklZ2h0YXJyb3dzAACgySFxAHUAaQBnAGEAcgByAG8A9wBZJugkcmVldGltZXMAoMwiZwDaYmkAbgBnAGQAbwB0AHMAZQDxABwYgAFhaG0AYCdjJ2YncgDyAAkMYQDyABMEAKAPIG8idXN0AGGgsSPjIWhlAKCxI+0haWQAoO4qAAJhYnB0fCeGJ4knmScAAW5ygCeDJ2cAAKDtJ3IAAKD+IXIA6wAcDIABYWZsAI8nkieVJ3IAAKCGKQDgNdhj3XUAcwAAoC4qaSJtZXMAAKA1KgABYXCiJ6gncgBnoCkAdAAAoJQp7yJsaW50AKASKmEAcgDyADwnAAJhY2hxuCe8J6EMwCfxIXVvAKA6IHIAAOA12MfcAAFidYAmxCdvAPKgGSCoAYABaGlyAM4n0ifWJ3IAZQDlAE0n7SFlcwCgyiJpAIChuSVlZmwAXAxjEt4n9CFyaQCgzinsInVoYXIAoGgpAKAeIWENBSgJKA0oSyhVKIYoAACLKLAoAAAAAOMo5ygAABApJCkxKW0pcSmHKaYpAACYKgAAAACxKmMidXRlAFthcQB1AO8ABR+ApHsiRWFjZWlucHN5ABwoHignKCooLygyKEEoRihJKACgtCrwASMoAAAlKACguCpvAG4AYWF1AOUAgw1koLAqaQBsAF9hcgBjAF1hgAFFYXMAOCg6KD0oAKC2KnAAAKC6KmkAbQAAoOki7yJsaW50AKATKmkA7QCIDUFkbwB0AGKixSKRFgAAAABTKACgZiqAA0FhY21zdHgAYChkKG8ocyh1KHkogihyAHIAAKDYIXIAAAFocmkoayjrAJAab6CYIfcAzAd0ADuApwCnQGkAO2D3IWFyAKApKW0AAAFpbn4ozQBuAHUA8wDOAHQAAKA2J3IA7+A12DDdIxkAAmFjb3mRKJUonSisKHIAcAAAoG8mAAFoeZkonChjAHkASWRIZHIAdABtAqUoAAAAAKgoaQDkAFsPYQByAGEA7ABsJDuArQCtQAABZ22zKLsobQBhAAChwwNmdroouijCY4CjPCJkZWdsbnByAMgozCjPKNMo1yjaKN4obwB0AACgairxoEMiCw5FoJ4qAKCgKkWgnSoAoJ8qZQAAoEYi7CF1cwCgJCrhIXJyAKByKWEAcgDyAPwMAAJhZWl07Sj8KAEpCCkAAWxz8Sj4KGwAcwBlAHQAbQDpAH8oaABwAACgMyrwImFyc2wAoOQpAAFkbFoPBSllAACgIyNloKoqc6CsKgDgrCoA/oABZmxwABUpGCkfKfQhY3lMZGKgLwBhoMQpcgAAoD8jZgAA4DXYZN1hAAABZHIoKRcDZQBzAHWgYCZpAHQAAKBgJoABY3N1ADYpRilhKQABYXU6KUApcABzoJMiAOCTIgD+cABzoJQiAOCUIgD+dQAAAWJwSylWKQChjyJlcz4NUCllAHQAZaCPIvEAPw0AoZAiZXNIDVspZQB0AGWgkCLxAEkNAKGhJWFmZilbBHIAZQFrKVwEAKChJWEAcgDyAAMNAAJjZW10dyl7KX8pgilyAADgNdjI3HQAbQDuAM4AaQDsAAYpYQByAOYAVw0AAWFyiimOKXIA5qAGJhESAAFhbpIpoylpImdodAAAAWVwmSmgKXAAcwBpAGwAbwDuANkXaADpAKAkcwCvYIACYmNtbnAArin8KY4NJSooKgCkgiJFZGVtbnByc7wpvinCKcgpzCnUKdgp3CkAoMUqbwB0AACgvSpkoIYibwB0AACgwyr1IWx0AKDBKgABRWXQKdIpAKDLKgCgiiLsIXVzAKC/KuEhcnIAoHkpgAFlaXUA4inxKfQpdAAAoYIiZW7oKewpcQDxoIYivSllAHEA8aCKItEpbQAAoMcqAAFicPgp+ikAoNUqAKDTKmMAgKJ7ImFjZW5zAAcqDSoUKhYqRihwAHAAcgBvAPgAIyh1AHIAbAB5AGUA8QCDDfEAfA2AAWFlcwAcKiIqPShwAHAAcgBvAPgAPChxAPEAOShnAACgaiYApoMiMTIzRWRlaGxtbnBzPCo/KkIqRSpHKlIqWCpjKmcqaypzKncqO4C5ALlAO4CyALJAO4CzALNAAKDGKgABb3NLKk4qdAAAoL4qdQBiAACg2CpkoIcibwB0AACgxCpzAAABb3VdKmAqbAAAoMknYgAAoNcq4SFycgCgeyn1IWx0AKDCKgABRWVvKnEqAKDMKgCgiyLsIXVzAKDAKoABZWl1AH0qjCqPKnQAAKGDImVugyqHKnEA8aCHIkYqZQBxAPGgiyJwKm0AAKDIKgABYnCTKpUqAKDUKgCg1iqAAUFhbgCdKqEqrCpyAHIAAKDZIXIAAAFocqYqqCrrAJUab6CZIfcAxQf3IWFyAKAqKWwAaQBnADuA3wDfQOELzyrZKtwq6SrsKvEqAAD1KjQrAAAAAAAAAAAAAEwrbCsAAHErvSsAAAAAAADRK3IC1CoAAAAA2CrnIWV0AKAWI8RjcgDrAOUKgAFhZXkA4SrkKucq8iFvbmVh5CFpbGNhQmRvAPQAIg5sInJlYwAAoBUjcgAA4DXYMd0AAmVpa2/7KhIrKCsuK/IBACsAAAkrZQAAATRm6g0EK28AcgDlAOsNYQBzorgDECsAAAAAEit5AG0A0WMAAWNuFislK2sAAAFhcxsrIStwAHAAcgBvAPgAFw5pAG0AAKA8InMA8AD9DQABYXMsKyEr8AAXDnIAbgA7gP4A/kDsATgrOyswG2QA5QBnAmUAcwCAgdcAO2JkAEMrRCtJK9dAYaCgInIAAKAxKgCgMCqAAWVwcwBRK1MraSvhAAkh4qKkIlsrXysAAAAAYytvAHQAAKA2I2kAcgAAoPEqb+A12GXdcgBrAACg2irhAHgociJpbWUAAKA0IIABYWlwAHYreSu3K2QA5QC+DYADYWRlbXBzdACFK6MrmiunK6wrsCuzK24iZ2xlAACitSVkbHFykCuUK5ornCvvIXduAKC/JeUhZnRloMMl8QACBwCgXCJpImdodABloLkl8QBdDG8AdAAAoOwlaSJudXMAAKA6KuwhdXMAoDkqYgAAoM0p6SFtZQCgOyrlInppdW0AoOIjgAFjaHQAwivKK80rAAFyecYrySsA4DXYydxGZGMAeQBbZPIhb2tnYQABaW/UK9creAD0ANERaCJlYWQAAAFsct4r5ytlAGYAdABhAHIAcgBvAPcAXQbpJGdodGFycm93AKCgIQAJQUhhYmNkZmdobG1vcHJzdHV3CiwNLBEsHSwnLDEsQCxLLFIsYix6LIQsjyzLLOgs7Sz/LAotcgDyAAkDYQByAACgYykAAWNyFSwbLHUAdABlADuA+gD6QPIACQ1yAOMBIywAACUseQBeZHYAZQBtYQABaXkrLDAscgBjADuA+wD7QENkgAFhYmgANyw6LD0scgDyANEO7CFhY3FhYQDyAOAOAAFpckQsSCzzIWh0AKB+KQDgNdgy3XIAYQB2AGUAO4D5APlAYQFWLF8scgAAAWxyWixcLACgvyEAoL4hbABrAACggCUAAWN0Zix2LG8CbCwAAAAAcyxyAG4AZaAcI3IAAKAcI28AcAAAoA8jcgBpAACg+CUAAWFsfiyBLGMAcgBrYTuAqACoQAABZ3CILIssbwBuAHNhZgAA4DXYZt0AA2FkaGxzdZksniynLLgsuyzFLHIAcgBvAPcACQ1vAHcAbgBhAHIAcgBvAPcA2A5hI3Jwb29uAAABbHKvLLMsZQBmAPQAWyxpAGcAaAD0AF0sdQDzAKYOaQAAocUDaGzBLMIs0mNvAG4AxWPwI2Fycm93cwCgyCGAAWNpdADRLOEs5CxvAtcsAAAAAN4scgBuAGWgHSNyAACgHSNvAHAAAKAOI24AZwBvYXIAaQAAoPklYwByAADgNdjK3IABZGlyAPMs9yz6LG8AdAAAoPAi7CFkZWlhaQBmoLUlAKC0JQABYW0DLQYtcgDyAMosbAA7gPwA/EDhIm5nbGUAoKcpgAdBQkRhY2RlZmxub3Byc3oAJy0qLTAtNC2bLZ0toS2/LcMtxy3TLdgt3C3gLfwtcgDyABADYQByAHag6CoAoOkqYQBzAOgA/gIAAW5yOC08LechcnQAoJwpgANla25wcnN0AJkpSC1NLVQtXi1iLYItYQBwAHAA4QAaHG8AdABoAGkAbgDnAKEXgAFoaXIAoSmzJFotbwBwAPQAdCVooJUh7wD4JgABaXVmLWotZwBtAOEAuygAAWJwbi14LXMjZXRuZXEAceCKIgD+AODLKgD+cyNldG5lcQBx4IsiAP4A4MwqAP4AAWhyhi2KLWUAdADhABIraSNhbmdsZQAAAWxyki2WLeUhZnQAoLIiaSJnaHQAAKCzInkAMmThIXNoAKCiIoABZWxyAKcttC24LWKiKCKuLQAAAACyLWEAcgAAoLsicQAAoFoi7CFpcACg7iIAAWJ0vC1eD2EA8gBfD3IAAOA12DPddAByAOkAlS1zAHUAAAFicM0t0C0A4IIi0iAA4IMi0iBwAGYAAOA12GfdcgBvAPAAWQt0AHIA6QCaLQABY3XkLegtcgAA4DXYy9wAAWJw7C30LW4AAAFFZXUt8S0A4IoiAP5uAAABRWV/LfktAOCLIgD+6SJnemFnAKCaKYADY2Vmb3BycwANLhAuJS4pLiMuLi40LukhcmN1YQABZGkULiEuAAFiZxguHC5hAHIAAKBfKmUAcaAnIgCgWSLlIXJwAKAYIXIAAOA12DTdcABmAADgNdho3WWgQCJhAHQA6ABqD2MAcgAA4DXYzNzjCuQRUC4AAFQuAABYLmIuAAAAAGMubS5wLnQuAAAAAIguki4AAJouJxIqEnQAcgDpAB0ScgAA4DXYNd0AAUFhWy5eLnIA8gDnAnIA8gCTB75jAAFBYWYuaS5yAPIA4AJyAPIAjAdhAPAAeh5pAHMAAKD7IoABZHB0APgReS6DLgABZmx9LoAuAOA12GnddQDzAP8RaQBtAOUABBIAAUFhiy6OLnIA8gDuAnIA8gCaBwABY3GVLgoScgAA4DXYzdwAAXB0nS6hLmwAdQDzACUScgDpACASAARhY2VmaW9zdbEuvC7ELsguzC7PLtQu2S5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg"); - //#endregion //#region ../node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.js const xmlDecodeTree$1 = /* @__PURE__ */ decodeBase64("AAJhZ2xxBwARABMAFQBtAg0AAAAAAA8AcAAmYG8AcwAnYHQAPmB0ADxg9SFvdCJg"); - //#endregion //#region ../node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.js /** @@ -133478,7 +121502,6 @@ var BinTrieFlags$1; BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 8064] = "BRANCH_LENGTH"; BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE"; })(BinTrieFlags$1 || (BinTrieFlags$1 = {})); - //#endregion //#region ../node_modules/htmlparser2/node_modules/entities/dist/esm/decode.js var CharCodes$2; @@ -133584,7 +121607,7 @@ var EntityDecoder$1 = class { */ write(input, offset) { switch (this.state) { - case EntityDecoderState$1.EntityStart: { + case EntityDecoderState$1.EntityStart: if (input.charCodeAt(offset) === CharCodes$2.NUM) { this.state = EntityDecoderState$1.NumericStart; this.consumed += 1; @@ -133592,19 +121615,10 @@ var EntityDecoder$1 = class { } this.state = EntityDecoderState$1.NamedEntity; return this.stateNamedEntity(input, offset); - } - case EntityDecoderState$1.NumericStart: { - return this.stateNumericStart(input, offset); - } - case EntityDecoderState$1.NumericDecimal: { - return this.stateNumericDecimal(input, offset); - } - case EntityDecoderState$1.NumericHex: { - return this.stateNumericHex(input, offset); - } - case EntityDecoderState$1.NamedEntity: { - return this.stateNamedEntity(input, offset); - } + case EntityDecoderState$1.NumericStart: return this.stateNumericStart(input, offset); + case EntityDecoderState$1.NumericDecimal: return this.stateNumericDecimal(input, offset); + case EntityDecoderState$1.NumericHex: return this.stateNumericHex(input, offset); + case EntityDecoderState$1.NamedEntity: return this.stateNamedEntity(input, offset); } } /** @@ -133617,9 +121631,7 @@ var EntityDecoder$1 = class { * @returns The number of characters that were consumed, or -1 if the entity is incomplete. */ stateNumericStart(input, offset) { - if (offset >= input.length) { - return -1; - } + if (offset >= input.length) return -1; if ((input.charCodeAt(offset) | TO_LOWER_BIT$1) === CharCodes$2.LOWER_X) { this.state = EntityDecoderState$1.NumericHex; this.consumed += 1; @@ -133645,9 +121657,7 @@ var EntityDecoder$1 = class { this.result = this.result * 16 + digit; this.consumed++; offset++; - } else { - return this.emitNumericEntity(char, 3); - } + } else return this.emitNumericEntity(char, 3); } return -1; } @@ -133667,9 +121677,7 @@ var EntityDecoder$1 = class { this.result = this.result * 10 + (char - CharCodes$2.ZERO); this.consumed++; offset++; - } else { - return this.emitNumericEntity(char, 2); - } + } else return this.emitNumericEntity(char, 2); } return -1; } @@ -133689,19 +121697,14 @@ var EntityDecoder$1 = class { emitNumericEntity(lastCp, expectedLength) { var _a; if (this.consumed <= expectedLength) { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - if (lastCp === CharCodes$2.SEMI) { - this.consumed += 1; - } else if (this.decodeMode === DecodingMode$1.Strict) { + (_a = this.errors) === null || _a === void 0 || _a.absenceOfDigitsInNumericCharacterReference(this.consumed); return 0; } + if (lastCp === CharCodes$2.SEMI) this.consumed += 1; + else if (this.decodeMode === DecodingMode$1.Strict) return 0; this.emitCodePoint(replaceCodePoint$1(this.result), this.consumed); if (this.errors) { - if (lastCp !== CharCodes$2.SEMI) { - this.errors.missingSemicolonAfterCharacterReference(); - } + if (lastCp !== CharCodes$2.SEMI) this.errors.missingSemicolonAfterCharacterReference(); this.errors.validateNumericCharacterReference(this.result); } return this.consumed; @@ -133724,17 +121727,13 @@ var EntityDecoder$1 = class { const runLength = (current & BinTrieFlags$1.BRANCH_LENGTH) >> 7; if (this.runConsumed === 0) { const firstChar = current & BinTrieFlags$1.JUMP_TABLE; - if (input.charCodeAt(offset) !== firstChar) { - return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity(); - } + if (input.charCodeAt(offset) !== firstChar) return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity(); offset++; this.excess++; this.runConsumed++; } while (this.runConsumed < runLength) { - if (offset >= input.length) { - return -1; - } + if (offset >= input.length) return -1; const charIndexInPacked = this.runConsumed - 1; const packedWord = decodeTree[this.treeIndex + 1 + (charIndexInPacked >> 1)]; const expectedChar = charIndexInPacked % 2 === 0 ? packedWord & 255 : packedWord >> 8 & 255; @@ -133753,19 +121752,13 @@ var EntityDecoder$1 = class { } if (offset >= input.length) break; const char = input.charCodeAt(offset); - if (char === CharCodes$2.SEMI && valueLength !== 0 && (current & BinTrieFlags$1.FLAG13) !== 0) { - return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); - } + if (char === CharCodes$2.SEMI && valueLength !== 0 && (current & BinTrieFlags$1.FLAG13) !== 0) return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); this.treeIndex = determineBranch$1(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); - if (this.treeIndex < 0) { - return this.result === 0 || this.decodeMode === DecodingMode$1.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd$1(char)) ? 0 : this.emitNotTerminatedNamedEntity(); - } + if (this.treeIndex < 0) return this.result === 0 || this.decodeMode === DecodingMode$1.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd$1(char)) ? 0 : this.emitNotTerminatedNamedEntity(); current = decodeTree[this.treeIndex]; valueLength = (current & BinTrieFlags$1.VALUE_LENGTH) >> 14; if (valueLength !== 0) { - if (char === CharCodes$2.SEMI) { - return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); - } + if (char === CharCodes$2.SEMI) return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); if (this.decodeMode !== DecodingMode$1.Strict && (current & BinTrieFlags$1.FLAG13) === 0) { this.result = this.treeIndex; this.consumed += this.excess; @@ -133787,7 +121780,7 @@ var EntityDecoder$1 = class { const { result, decodeTree } = this; const valueLength = (decodeTree[result] & BinTrieFlags$1.VALUE_LENGTH) >> 14; this.emitNamedEntityData(result, valueLength, this.consumed); - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference(); + (_a = this.errors) === null || _a === void 0 || _a.missingSemicolonAfterCharacterReference(); return this.consumed; } /** @@ -133802,9 +121795,7 @@ var EntityDecoder$1 = class { emitNamedEntityData(result, valueLength, consumed) { const { decodeTree } = this; this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~(BinTrieFlags$1.VALUE_LENGTH | BinTrieFlags$1.FLAG13) : decodeTree[result + 1], consumed); - if (valueLength === 3) { - this.emitCodePoint(decodeTree[result + 2], consumed); - } + if (valueLength === 3) this.emitCodePoint(decodeTree[result + 2], consumed); return consumed; } /** @@ -133817,22 +121808,13 @@ var EntityDecoder$1 = class { end() { var _a; switch (this.state) { - case EntityDecoderState$1.NamedEntity: { - return this.result !== 0 && (this.decodeMode !== DecodingMode$1.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0; - } - case EntityDecoderState$1.NumericDecimal: { - return this.emitNumericEntity(0, 2); - } - case EntityDecoderState$1.NumericHex: { - return this.emitNumericEntity(0, 3); - } - case EntityDecoderState$1.NumericStart: { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - case EntityDecoderState$1.EntityStart: { + case EntityDecoderState$1.NamedEntity: return this.result !== 0 && (this.decodeMode !== DecodingMode$1.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0; + case EntityDecoderState$1.NumericDecimal: return this.emitNumericEntity(0, 2); + case EntityDecoderState$1.NumericHex: return this.emitNumericEntity(0, 3); + case EntityDecoderState$1.NumericStart: + (_a = this.errors) === null || _a === void 0 || _a.absenceOfDigitsInNumericCharacterReference(this.consumed); return 0; - } + case EntityDecoderState$1.EntityStart: return 0; } } }; @@ -133877,9 +121859,7 @@ function getDecoder$1(decodeTree) { function determineBranch$1(decodeTree, current, nodeIndex, char) { const branchCount = (current & BinTrieFlags$1.BRANCH_LENGTH) >> 7; const jumpOffset = current & BinTrieFlags$1.JUMP_TABLE; - if (branchCount === 0) { - return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1; - } + if (branchCount === 0) return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1; if (jumpOffset) { const value = char - jumpOffset; return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIndex + value] - 1; @@ -133889,16 +121869,10 @@ function determineBranch$1(decodeTree, current, nodeIndex, char) { let hi = branchCount - 1; while (lo <= hi) { const mid = lo + hi >>> 1; - const slot = mid >> 1; - const packed = decodeTree[nodeIndex + slot]; - const midKey = packed >> (mid & 1) * 8 & 255; - if (midKey < char) { - lo = mid + 1; - } else if (midKey > char) { - hi = mid - 1; - } else { - return decodeTree[nodeIndex + packedKeySlots + mid]; - } + const midKey = decodeTree[nodeIndex + (mid >> 1)] >> (mid & 1) * 8 & 255; + if (midKey < char) lo = mid + 1; + else if (midKey > char) hi = mid - 1; + else return decodeTree[nodeIndex + packedKeySlots + mid]; } return -1; } @@ -133941,7 +121915,6 @@ function decodeHTMLStrict$1(htmlString) { function decodeXML$1(xmlString) { return xmlDecoder$1(xmlString, DecodingMode$1.Strict); } - //#endregion //#region ../node_modules/htmlparser2/dist/esm/Tokenizer.js var CharCodes$1; @@ -134114,7 +122087,7 @@ var Tokenizer$1 = class { this.running = true; /** The offset of the current buffer. */ this.offset = 0; - this.currentSequence = undefined; + this.currentSequence = void 0; this.sequenceIndex = 0; this.xmlMode = xmlMode; this.decodeEntities = decodeEntities; @@ -134126,7 +122099,7 @@ var Tokenizer$1 = class { this.sectionStart = 0; this.index = 0; this.baseState = State$2.Text; - this.currentSequence = undefined; + this.currentSequence = void 0; this.running = true; this.offset = 0; } @@ -134143,27 +122116,19 @@ var Tokenizer$1 = class { } resume() { this.running = true; - if (this.index < this.buffer.length + this.offset) { - this.parse(); - } + if (this.index < this.buffer.length + this.offset) this.parse(); } stateText(c) { if (c === CharCodes$1.Lt || !this.decodeEntities && this.fastForwardTo(CharCodes$1.Lt)) { - if (this.index > this.sectionStart) { - this.cbs.ontext(this.sectionStart, this.index); - } + if (this.index > this.sectionStart) this.cbs.ontext(this.sectionStart, this.index); this.state = State$2.BeforeTagName; this.sectionStart = this.index; - } else if (this.decodeEntities && c === CharCodes$1.Amp) { - this.startEntity(); - } + } else if (this.decodeEntities && c === CharCodes$1.Amp) this.startEntity(); } stateSpecialStartSequence(c) { const isEnd = this.sequenceIndex === this.currentSequence.length; - const isMatch = isEnd ? isEndOfTagSection(c) : (c | 32) === this.currentSequence[this.sequenceIndex]; - if (!isMatch) { - this.isSpecial = false; - } else if (!isEnd) { + if (!(isEnd ? isEndOfTagSection(c) : (c | 32) === this.currentSequence[this.sequenceIndex])) this.isSpecial = false; + else if (!isEnd) { this.sequenceIndex++; return; } @@ -134189,19 +122154,12 @@ var Tokenizer$1 = class { } this.sequenceIndex = 0; } - if ((c | 32) === this.currentSequence[this.sequenceIndex]) { - this.sequenceIndex += 1; - } else if (this.sequenceIndex === 0) { + if ((c | 32) === this.currentSequence[this.sequenceIndex]) this.sequenceIndex += 1; + else if (this.sequenceIndex === 0) { if (this.currentSequence === Sequences.TitleEnd) { - if (this.decodeEntities && c === CharCodes$1.Amp) { - this.startEntity(); - } - } else if (this.fastForwardTo(CharCodes$1.Lt)) { - this.sequenceIndex = 1; - } - } else { - this.sequenceIndex = Number(c === CharCodes$1.Lt); - } + if (this.decodeEntities && c === CharCodes$1.Amp) this.startEntity(); + } else if (this.fastForwardTo(CharCodes$1.Lt)) this.sequenceIndex = 1; + } else this.sequenceIndex = Number(c === CharCodes$1.Lt); } stateCDATASequence(c) { if (c === Sequences.Cdata[this.sequenceIndex]) { @@ -134224,11 +122182,7 @@ var Tokenizer$1 = class { * @returns Whether the character was found. */ fastForwardTo(c) { - while (++this.index < this.buffer.length + this.offset) { - if (this.buffer.charCodeAt(this.index - this.offset) === c) { - return true; - } - } + while (++this.index < this.buffer.length + this.offset) if (this.buffer.charCodeAt(this.index - this.offset) === c) return true; this.index = this.buffer.length + this.offset - 1; return false; } @@ -134243,22 +122197,15 @@ var Tokenizer$1 = class { stateInCommentLike(c) { if (c === this.currentSequence[this.sequenceIndex]) { if (++this.sequenceIndex === this.currentSequence.length) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, this.index, 2); - } else { - this.cbs.oncomment(this.sectionStart, this.index, 2); - } + if (this.currentSequence === Sequences.CdataEnd) this.cbs.oncdata(this.sectionStart, this.index, 2); + else this.cbs.oncomment(this.sectionStart, this.index, 2); this.sequenceIndex = 0; this.sectionStart = this.index + 1; this.state = State$2.Text; } } else if (this.sequenceIndex === 0) { - if (this.fastForwardTo(this.currentSequence[0])) { - this.sequenceIndex = 1; - } - } else if (c !== this.currentSequence[this.sequenceIndex - 1]) { - this.sequenceIndex = 0; - } + if (this.fastForwardTo(this.currentSequence[0])) this.sequenceIndex = 1; + } else if (c !== this.currentSequence[this.sequenceIndex - 1]) this.sequenceIndex = 0; } /** * HTML only allows ASCII alpha characters (a-z and A-Z) at the beginning of a tag name. @@ -134285,18 +122232,12 @@ var Tokenizer$1 = class { } else if (this.isTagStartChar(c)) { const lower = c | 32; this.sectionStart = this.index; - if (this.xmlMode) { - this.state = State$2.InTagName; - } else if (lower === Sequences.ScriptEnd[2]) { - this.state = State$2.BeforeSpecialS; - } else if (lower === Sequences.TitleEnd[2] || lower === Sequences.XmpEnd[2]) { - this.state = State$2.BeforeSpecialT; - } else { - this.state = State$2.InTagName; - } - } else if (c === CharCodes$1.Slash) { - this.state = State$2.BeforeClosingTagName; - } else { + if (this.xmlMode) this.state = State$2.InTagName; + else if (lower === Sequences.ScriptEnd[2]) this.state = State$2.BeforeSpecialS; + else if (lower === Sequences.TitleEnd[2] || lower === Sequences.XmpEnd[2]) this.state = State$2.BeforeSpecialT; + else this.state = State$2.InTagName; + } else if (c === CharCodes$1.Slash) this.state = State$2.BeforeClosingTagName; + else { this.state = State$2.Text; this.stateText(c); } @@ -134310,9 +122251,8 @@ var Tokenizer$1 = class { } } stateBeforeClosingTagName(c) { - if (isWhitespace$1(c)) {} else if (c === CharCodes$1.Gt) { - this.state = State$2.Text; - } else { + if (isWhitespace$1(c)) {} else if (c === CharCodes$1.Gt) this.state = State$2.Text; + else { this.state = this.isTagStartChar(c) ? State$2.InClosingTagName : State$2.InSpecialComment; this.sectionStart = this.index; } @@ -134337,13 +122277,10 @@ var Tokenizer$1 = class { if (this.isSpecial) { this.state = State$2.InSpecialTag; this.sequenceIndex = 0; - } else { - this.state = State$2.Text; - } + } else this.state = State$2.Text; this.sectionStart = this.index + 1; - } else if (c === CharCodes$1.Slash) { - this.state = State$2.InSelfClosingTag; - } else if (!isWhitespace$1(c)) { + } else if (c === CharCodes$1.Slash) this.state = State$2.InSelfClosingTag; + else if (!isWhitespace$1(c)) { this.state = State$2.InAttributeName; this.sectionStart = this.index; } @@ -134368,9 +122305,8 @@ var Tokenizer$1 = class { } } stateAfterAttributeName(c) { - if (c === CharCodes$1.Eq) { - this.state = State$2.BeforeAttributeValue; - } else if (c === CharCodes$1.Slash || c === CharCodes$1.Gt) { + if (c === CharCodes$1.Eq) this.state = State$2.BeforeAttributeValue; + else if (c === CharCodes$1.Slash || c === CharCodes$1.Gt) { this.cbs.onattribend(QuoteType.NoValue, this.sectionStart); this.sectionStart = -1; this.state = State$2.BeforeAttributeName; @@ -134400,9 +122336,7 @@ var Tokenizer$1 = class { this.sectionStart = -1; this.cbs.onattribend(quote === CharCodes$1.DoubleQuote ? QuoteType.Double : QuoteType.Single, this.index + 1); this.state = State$2.BeforeAttributeName; - } else if (this.decodeEntities && c === CharCodes$1.Amp) { - this.startEntity(); - } + } else if (this.decodeEntities && c === CharCodes$1.Amp) this.startEntity(); } stateInAttributeValueDoubleQuotes(c) { this.handleInAttributeValue(c, CharCodes$1.DoubleQuote); @@ -134417,17 +122351,13 @@ var Tokenizer$1 = class { this.cbs.onattribend(QuoteType.Unquoted, this.index); this.state = State$2.BeforeAttributeName; this.stateBeforeAttributeName(c); - } else if (this.decodeEntities && c === CharCodes$1.Amp) { - this.startEntity(); - } + } else if (this.decodeEntities && c === CharCodes$1.Amp) this.startEntity(); } stateBeforeDeclaration(c) { if (c === CharCodes$1.OpeningSquareBracket) { this.state = State$2.CDATASequence; this.sequenceIndex = 0; - } else { - this.state = c === CharCodes$1.Dash ? State$2.BeforeComment : State$2.InDeclaration; - } + } else this.state = c === CharCodes$1.Dash ? State$2.BeforeComment : State$2.InDeclaration; } stateInDeclaration(c) { if (c === CharCodes$1.Gt || this.fastForwardTo(CharCodes$1.Gt)) { @@ -134449,9 +122379,7 @@ var Tokenizer$1 = class { this.currentSequence = Sequences.CommentEnd; this.sequenceIndex = 2; this.sectionStart = this.index + 1; - } else { - this.state = State$2.InDeclaration; - } + } else this.state = State$2.InDeclaration; } stateInSpecialComment(c) { if (c === CharCodes$1.Gt || this.fastForwardTo(CharCodes$1.Gt)) { @@ -134462,34 +122390,27 @@ var Tokenizer$1 = class { } stateBeforeSpecialS(c) { const lower = c | 32; - if (lower === Sequences.ScriptEnd[3]) { - this.startSpecial(Sequences.ScriptEnd, 4); - } else if (lower === Sequences.StyleEnd[3]) { - this.startSpecial(Sequences.StyleEnd, 4); - } else { + if (lower === Sequences.ScriptEnd[3]) this.startSpecial(Sequences.ScriptEnd, 4); + else if (lower === Sequences.StyleEnd[3]) this.startSpecial(Sequences.StyleEnd, 4); + else { this.state = State$2.InTagName; this.stateInTagName(c); } } stateBeforeSpecialT(c) { - const lower = c | 32; - switch (lower) { - case Sequences.TitleEnd[3]: { + switch (c | 32) { + case Sequences.TitleEnd[3]: this.startSpecial(Sequences.TitleEnd, 4); break; - } - case Sequences.TextareaEnd[3]: { + case Sequences.TextareaEnd[3]: this.startSpecial(Sequences.TextareaEnd, 4); break; - } - case Sequences.XmpEnd[3]: { + case Sequences.XmpEnd[3]: this.startSpecial(Sequences.XmpEnd, 4); break; - } - default: { + default: this.state = State$2.InTagName; this.stateInTagName(c); - } } } startEntity() { @@ -134503,9 +122424,7 @@ var Tokenizer$1 = class { const length = this.entityDecoder.write(this.buffer, indexInBuffer); if (length >= 0) { this.state = this.baseState; - if (length === 0) { - this.index -= 1; - } + if (length === 0) this.index -= 1; } else { if (indexInBuffer < this.buffer.length && this.buffer.charCodeAt(indexInBuffer) === CharCodes$1.Amp) { this.state = this.baseState; @@ -134541,110 +122460,84 @@ var Tokenizer$1 = class { while (this.shouldContinue()) { const c = this.buffer.charCodeAt(this.index - this.offset); switch (this.state) { - case State$2.Text: { + case State$2.Text: this.stateText(c); break; - } - case State$2.SpecialStartSequence: { + case State$2.SpecialStartSequence: this.stateSpecialStartSequence(c); break; - } - case State$2.InSpecialTag: { + case State$2.InSpecialTag: this.stateInSpecialTag(c); break; - } - case State$2.CDATASequence: { + case State$2.CDATASequence: this.stateCDATASequence(c); break; - } - case State$2.InAttributeValueDq: { + case State$2.InAttributeValueDq: this.stateInAttributeValueDoubleQuotes(c); break; - } - case State$2.InAttributeName: { + case State$2.InAttributeName: this.stateInAttributeName(c); break; - } - case State$2.InCommentLike: { + case State$2.InCommentLike: this.stateInCommentLike(c); break; - } - case State$2.InSpecialComment: { + case State$2.InSpecialComment: this.stateInSpecialComment(c); break; - } - case State$2.BeforeAttributeName: { + case State$2.BeforeAttributeName: this.stateBeforeAttributeName(c); break; - } - case State$2.InTagName: { + case State$2.InTagName: this.stateInTagName(c); break; - } - case State$2.InClosingTagName: { + case State$2.InClosingTagName: this.stateInClosingTagName(c); break; - } - case State$2.BeforeTagName: { + case State$2.BeforeTagName: this.stateBeforeTagName(c); break; - } - case State$2.AfterAttributeName: { + case State$2.AfterAttributeName: this.stateAfterAttributeName(c); break; - } - case State$2.InAttributeValueSq: { + case State$2.InAttributeValueSq: this.stateInAttributeValueSingleQuotes(c); break; - } - case State$2.BeforeAttributeValue: { + case State$2.BeforeAttributeValue: this.stateBeforeAttributeValue(c); break; - } - case State$2.BeforeClosingTagName: { + case State$2.BeforeClosingTagName: this.stateBeforeClosingTagName(c); break; - } - case State$2.AfterClosingTagName: { + case State$2.AfterClosingTagName: this.stateAfterClosingTagName(c); break; - } - case State$2.BeforeSpecialS: { + case State$2.BeforeSpecialS: this.stateBeforeSpecialS(c); break; - } - case State$2.BeforeSpecialT: { + case State$2.BeforeSpecialT: this.stateBeforeSpecialT(c); break; - } - case State$2.InAttributeValueNq: { + case State$2.InAttributeValueNq: this.stateInAttributeValueNoQuotes(c); break; - } - case State$2.InSelfClosingTag: { + case State$2.InSelfClosingTag: this.stateInSelfClosingTag(c); break; - } - case State$2.InDeclaration: { + case State$2.InDeclaration: this.stateInDeclaration(c); break; - } - case State$2.BeforeDeclaration: { + case State$2.BeforeDeclaration: this.stateBeforeDeclaration(c); break; - } - case State$2.BeforeComment: { + case State$2.BeforeComment: this.stateBeforeComment(c); break; - } - case State$2.InProcessingInstruction: { + case State$2.InProcessingInstruction: this.stateInProcessingInstruction(c); break; - } - case State$2.InEntity: { + case State$2.InEntity: this.stateInEntity(); break; - } } this.index++; } @@ -134661,38 +122554,25 @@ var Tokenizer$1 = class { /** Handle any trailing data. */ handleTrailingData() { const endIndex = this.buffer.length + this.offset; - if (this.sectionStart >= endIndex) { - return; - } - if (this.state === State$2.InCommentLike) { - if (this.currentSequence === Sequences.CdataEnd) { - this.cbs.oncdata(this.sectionStart, endIndex, 0); - } else { - this.cbs.oncomment(this.sectionStart, endIndex, 0); - } - } else if (this.state === State$2.InTagName || this.state === State$2.BeforeAttributeName || this.state === State$2.BeforeAttributeValue || this.state === State$2.AfterAttributeName || this.state === State$2.InAttributeName || this.state === State$2.InAttributeValueSq || this.state === State$2.InAttributeValueDq || this.state === State$2.InAttributeValueNq || this.state === State$2.InClosingTagName) {} else { - this.cbs.ontext(this.sectionStart, endIndex); - } + if (this.sectionStart >= endIndex) return; + if (this.state === State$2.InCommentLike) if (this.currentSequence === Sequences.CdataEnd) this.cbs.oncdata(this.sectionStart, endIndex, 0); + else this.cbs.oncomment(this.sectionStart, endIndex, 0); + else if (this.state === State$2.InTagName || this.state === State$2.BeforeAttributeName || this.state === State$2.BeforeAttributeValue || this.state === State$2.AfterAttributeName || this.state === State$2.InAttributeName || this.state === State$2.InAttributeValueSq || this.state === State$2.InAttributeValueDq || this.state === State$2.InAttributeValueNq || this.state === State$2.InClosingTagName) {} else this.cbs.ontext(this.sectionStart, endIndex); } emitCodePoint(cp, consumed) { if (this.baseState !== State$2.Text && this.baseState !== State$2.InSpecialTag) { - if (this.sectionStart < this.entityStart) { - this.cbs.onattribdata(this.sectionStart, this.entityStart); - } + if (this.sectionStart < this.entityStart) this.cbs.onattribdata(this.sectionStart, this.entityStart); this.sectionStart = this.entityStart + consumed; this.index = this.sectionStart - 1; this.cbs.onattribentity(cp); } else { - if (this.sectionStart < this.entityStart) { - this.cbs.ontext(this.sectionStart, this.entityStart); - } + if (this.sectionStart < this.entityStart) this.cbs.ontext(this.sectionStart, this.entityStart); this.sectionStart = this.entityStart + consumed; this.index = this.sectionStart - 1; this.cbs.ontextentity(cp, this.sectionStart); } } }; - //#endregion //#region ../node_modules/htmlparser2/dist/esm/Parser.js const formTags = new Set([ @@ -134834,21 +122714,21 @@ var Parser$1 = class { this.recognizeSelfClosing = (_c = options.recognizeSelfClosing) !== null && _c !== void 0 ? _c : !this.htmlMode; this.tokenizer = new ((_d = options.Tokenizer) !== null && _d !== void 0 ? _d : Tokenizer$1)(this.options, this); this.foreignContext = [!this.htmlMode]; - (_f = (_e = this.cbs).onparserinit) === null || _f === void 0 ? void 0 : _f.call(_e, this); + (_f = (_e = this.cbs).onparserinit) === null || _f === void 0 || _f.call(_e, this); } /** @internal */ ontext(start, endIndex) { var _a, _b; const data = this.getSlice(start, endIndex); this.endIndex = endIndex - 1; - (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, data); + (_b = (_a = this.cbs).ontext) === null || _b === void 0 || _b.call(_a, data); this.startIndex = endIndex; } /** @internal */ ontextentity(cp, endIndex) { var _a, _b; this.endIndex = endIndex - 1; - (_b = (_a = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a, fromCodePoint$1(cp)); + (_b = (_a = this.cbs).ontext) === null || _b === void 0 || _b.call(_a, fromCodePoint$1(cp)); this.startIndex = endIndex; } /** @@ -134862,9 +122742,7 @@ var Parser$1 = class { onopentagname(start, endIndex) { this.endIndex = endIndex; let name = this.getSlice(start, endIndex); - if (this.lowerCaseTagNames) { - name = name.toLowerCase(); - } + if (this.lowerCaseTagNames) name = name.toLowerCase(); this.emitOpenTag(name); } emitOpenTag(name) { @@ -134872,35 +122750,28 @@ var Parser$1 = class { this.openTagStart = this.startIndex; this.tagname = name; const impliesClose = this.htmlMode && openImpliesClose.get(name); - if (impliesClose) { - while (this.stack.length > 0 && impliesClose.has(this.stack[0])) { - const element = this.stack.shift(); - (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, element, true); - } + if (impliesClose) while (this.stack.length > 0 && impliesClose.has(this.stack[0])) { + const element = this.stack.shift(); + (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 || _b.call(_a, element, true); } if (!this.isVoidElement(name)) { this.stack.unshift(name); if (this.htmlMode) { - if (foreignContextElements.has(name)) { - this.foreignContext.unshift(true); - } else if (htmlIntegrationElements.has(name)) { - this.foreignContext.unshift(false); - } + if (foreignContextElements.has(name)) this.foreignContext.unshift(true); + else if (htmlIntegrationElements.has(name)) this.foreignContext.unshift(false); } } - (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, name); + (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 || _d.call(_c, name); if (this.cbs.onopentag) this.attribs = {}; } endOpenTag(isImplied) { var _a, _b; this.startIndex = this.openTagStart; if (this.attribs) { - (_b = (_a = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a, this.tagname, this.attribs, isImplied); + (_b = (_a = this.cbs).onopentag) === null || _b === void 0 || _b.call(_a, this.tagname, this.attribs, isImplied); this.attribs = null; } - if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) { - this.cbs.onclosetag(this.tagname, true); - } + if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) this.cbs.onclosetag(this.tagname, true); this.tagname = ""; } /** @internal */ @@ -134914,27 +122785,22 @@ var Parser$1 = class { var _a, _b, _c, _d, _e, _f, _g, _h; this.endIndex = endIndex; let name = this.getSlice(start, endIndex); - if (this.lowerCaseTagNames) { - name = name.toLowerCase(); - } - if (this.htmlMode && (foreignContextElements.has(name) || htmlIntegrationElements.has(name))) { - this.foreignContext.shift(); - } + if (this.lowerCaseTagNames) name = name.toLowerCase(); + if (this.htmlMode && (foreignContextElements.has(name) || htmlIntegrationElements.has(name))) this.foreignContext.shift(); if (!this.isVoidElement(name)) { const pos = this.stack.indexOf(name); - if (pos !== -1) { - for (let index = 0; index <= pos; index++) { - const element = this.stack.shift(); - (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, element, index !== pos); - } - } else if (this.htmlMode && name === "p") { + if (pos !== -1) for (let index = 0; index <= pos; index++) { + const element = this.stack.shift(); + (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 || _b.call(_a, element, index !== pos); + } + else if (this.htmlMode && name === "p") { this.emitOpenTag("p"); this.closeCurrentTag(true); } } else if (this.htmlMode && name === "br") { - (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 ? void 0 : _d.call(_c, "br"); - (_f = (_e = this.cbs).onopentag) === null || _f === void 0 ? void 0 : _f.call(_e, "br", {}, true); - (_h = (_g = this.cbs).onclosetag) === null || _h === void 0 ? void 0 : _h.call(_g, "br", false); + (_d = (_c = this.cbs).onopentagname) === null || _d === void 0 || _d.call(_c, "br"); + (_f = (_e = this.cbs).onopentag) === null || _f === void 0 || _f.call(_e, "br", {}, true); + (_h = (_g = this.cbs).onclosetag) === null || _h === void 0 || _h.call(_g, "br", false); } this.startIndex = endIndex + 1; } @@ -134944,16 +122810,14 @@ var Parser$1 = class { if (this.recognizeSelfClosing || this.foreignContext[0]) { this.closeCurrentTag(false); this.startIndex = endIndex + 1; - } else { - this.onopentagend(endIndex); - } + } else this.onopentagend(endIndex); } closeCurrentTag(isOpenImplied) { var _a, _b; const name = this.tagname; this.endOpenTag(isOpenImplied); if (this.stack[0] === name) { - (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a, name, !isOpenImplied); + (_b = (_a = this.cbs).onclosetag) === null || _b === void 0 || _b.call(_a, name, !isOpenImplied); this.stack.shift(); } } @@ -134975,18 +122839,14 @@ var Parser$1 = class { onattribend(quote, endIndex) { var _a, _b; this.endIndex = endIndex; - (_b = (_a = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a, this.attribname, this.attribvalue, quote === QuoteType.Double ? "\"" : quote === QuoteType.Single ? "'" : quote === QuoteType.NoValue ? undefined : null); - if (this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) { - this.attribs[this.attribname] = this.attribvalue; - } + (_b = (_a = this.cbs).onattribute) === null || _b === void 0 || _b.call(_a, this.attribname, this.attribvalue, quote === QuoteType.Double ? "\"" : quote === QuoteType.Single ? "'" : quote === QuoteType.NoValue ? void 0 : null); + if (this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) this.attribs[this.attribname] = this.attribvalue; this.attribvalue = ""; } getInstructionName(value) { const index = value.search(reNameEnd); let name = index < 0 ? value : value.substr(0, index); - if (this.lowerCaseTagNames) { - name = name.toLowerCase(); - } + if (this.lowerCaseTagNames) name = name.toLowerCase(); return name; } /** @internal */ @@ -135013,8 +122873,8 @@ var Parser$1 = class { oncomment(start, endIndex, offset) { var _a, _b, _c, _d; this.endIndex = endIndex; - (_b = (_a = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a, this.getSlice(start, endIndex - offset)); - (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c); + (_b = (_a = this.cbs).oncomment) === null || _b === void 0 || _b.call(_a, this.getSlice(start, endIndex - offset)); + (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 || _d.call(_c); this.startIndex = endIndex + 1; } /** @internal */ @@ -135023,12 +122883,12 @@ var Parser$1 = class { this.endIndex = endIndex; const value = this.getSlice(start, endIndex - offset); if (!this.htmlMode || this.options.recognizeCDATA) { - (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a); - (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value); - (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e); + (_b = (_a = this.cbs).oncdatastart) === null || _b === void 0 || _b.call(_a); + (_d = (_c = this.cbs).ontext) === null || _d === void 0 || _d.call(_c, value); + (_f = (_e = this.cbs).oncdataend) === null || _f === void 0 || _f.call(_e); } else { - (_h = (_g = this.cbs).oncomment) === null || _h === void 0 ? void 0 : _h.call(_g, `[CDATA[${value}]]`); - (_k = (_j = this.cbs).oncommentend) === null || _k === void 0 ? void 0 : _k.call(_j); + (_h = (_g = this.cbs).oncomment) === null || _h === void 0 || _h.call(_g, `[CDATA[${value}]]`); + (_k = (_j = this.cbs).oncommentend) === null || _k === void 0 || _k.call(_j); } this.startIndex = endIndex + 1; } @@ -135037,18 +122897,16 @@ var Parser$1 = class { var _a, _b; if (this.cbs.onclosetag) { this.endIndex = this.startIndex; - for (let index = 0; index < this.stack.length; index++) { - this.cbs.onclosetag(this.stack[index], true); - } + for (let index = 0; index < this.stack.length; index++) this.cbs.onclosetag(this.stack[index], true); } - (_b = (_a = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a); + (_b = (_a = this.cbs).onend) === null || _b === void 0 || _b.call(_a); } /** * Resets the parser to a blank state, ready to parse a new HTML document */ reset() { var _a, _b, _c, _d; - (_b = (_a = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a); + (_b = (_a = this.cbs).onreset) === null || _b === void 0 || _b.call(_a); this.tokenizer.reset(); this.tagname = ""; this.attribname = ""; @@ -135056,7 +122914,7 @@ var Parser$1 = class { this.stack.length = 0; this.startIndex = 0; this.endIndex = 0; - (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 ? void 0 : _d.call(_c, this); + (_d = (_c = this.cbs).onparserinit) === null || _d === void 0 || _d.call(_c, this); this.buffers.length = 0; this.foreignContext.length = 0; this.foreignContext.unshift(!this.htmlMode); @@ -135075,9 +122933,7 @@ var Parser$1 = class { this.end(data); } getSlice(start, end) { - while (start - this.bufferOffset >= this.buffers[0].length) { - this.shiftBuffer(); - } + while (start - this.bufferOffset >= this.buffers[0].length) this.shiftBuffer(); let slice = this.buffers[0].slice(start - this.bufferOffset, end - this.bufferOffset); while (end - this.bufferOffset > this.buffers[0].length) { this.shiftBuffer(); @@ -135098,7 +122954,7 @@ var Parser$1 = class { write(chunk) { var _a, _b; if (this.ended) { - (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(".write() after done!")); + (_b = (_a = this.cbs).onerror) === null || _b === void 0 || _b.call(_a, /* @__PURE__ */ new Error(".write() after done!")); return; } this.buffers.push(chunk); @@ -135115,7 +122971,7 @@ var Parser$1 = class { end(chunk) { var _a, _b; if (this.ended) { - (_b = (_a = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a, new Error(".end() after done!")); + (_b = (_a = this.cbs).onerror) === null || _b === void 0 || _b.call(_a, /* @__PURE__ */ new Error(".end() after done!")); return; } if (chunk) this.write(chunk); @@ -135133,9 +122989,7 @@ var Parser$1 = class { */ resume() { this.tokenizer.resume(); - while (this.tokenizer.running && this.writeIndex < this.buffers.length) { - this.tokenizer.write(this.buffers[this.writeIndex++]); - } + while (this.tokenizer.running && this.writeIndex < this.buffers.length) this.tokenizer.write(this.buffers[this.writeIndex++]); if (this.ended) this.tokenizer.end(); } /** @@ -135157,7 +123011,6 @@ var Parser$1 = class { this.end(chunk); } }; - //#endregion //#region ../node_modules/htmlparser2/dist/esm/index.js /** @@ -135167,7 +123020,7 @@ var Parser$1 = class { * @param options Optional options for the parser and DOM handler. */ function parseDocument(data, options) { - const handler = new DomHandler(undefined, options); + const handler = new DomHandler(void 0, options); new Parser$1(handler, options).end(data); return handler.root; } @@ -135204,8 +123057,7 @@ function createDocumentStream(callback, options, elementCallback) { * @deprecated Use `createDocumentStream` instead. */ function createDomStream(callback, options, elementCallback) { - const handler = new DomHandler(callback, options, elementCallback); - return new Parser$1(handler, options); + return new Parser$1(new DomHandler(callback, options, elementCallback), options); } const parseFeedDefaultOptions = { xmlMode: true }; /** @@ -135217,7 +123069,6 @@ const parseFeedDefaultOptions = { xmlMode: true }; function parseFeed(feed, options = parseFeedDefaultOptions) { return getFeed(parseDOM(feed, options)); } - //#endregion //#region ../node_modules/cheerio/dist/esm/api/attributes.js var attributes_exports = /* @__PURE__ */ __exportAll({ @@ -135244,21 +123095,12 @@ const rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|h const rbrace = /^{[^]*}$|^\[[^]*]$/; function getAttr(elem, name, xmlMode) { var _a; - if (!elem || !isTag(elem)) return undefined; - (_a = elem.attribs) !== null && _a !== void 0 ? _a : elem.attribs = {}; - if (!name) { - return elem.attribs; - } - if (hasOwn(elem.attribs, name)) { - return !xmlMode && rboolean.test(name) ? name : elem.attribs[name]; - } - if (elem.name === "option" && name === "value") { - return text$1(elem.children); - } - if (elem.name === "input" && (elem.attribs["type"] === "radio" || elem.attribs["type"] === "checkbox") && name === "value") { - return "on"; - } - return undefined; + if (!elem || !isTag(elem)) return void 0; + (_a = elem.attribs) !== null && _a !== void 0 || (elem.attribs = {}); + if (!name) return elem.attribs; + if (hasOwn(elem.attribs, name)) return !xmlMode && rboolean.test(name) ? name : elem.attribs[name]; + if (elem.name === "option" && name === "value") return text$1(elem.children); + if (elem.name === "input" && (elem.attribs["type"] === "radio" || elem.attribs["type"] === "checkbox") && name === "value") return "on"; } /** * Sets the value of an attribute. The attribute will be deleted if the value is @@ -135270,34 +123112,24 @@ function getAttr(elem, name, xmlMode) { * @param value - The attribute's value. */ function setAttr(el, name, value) { - if (value === null) { - removeAttribute(el, name); - } else { - el.attribs[name] = `${value}`; - } + if (value === null) removeAttribute(el, name); + else el.attribs[name] = `${value}`; } function attr(name, value) { - if (typeof name === "object" || value !== undefined) { + if (typeof name === "object" || value !== void 0) { if (typeof value === "function") { - if (typeof name !== "string") { - { - throw new Error("Bad combination of arguments."); - } - } + if (typeof name !== "string") throw new Error("Bad combination of arguments."); return domEach(this, (el, i) => { if (isTag(el)) setAttr(el, name, value.call(el, i, el.attribs[name])); }); } return domEach(this, (el) => { if (!isTag(el)) return; - if (typeof name === "object") { - for (const objName of Object.keys(name)) { - const objValue = name[objName]; - setAttr(el, objName, objValue); - } - } else { - setAttr(el, name, value); + if (typeof name === "object") for (const objName of Object.keys(name)) { + const objValue = name[objName]; + setAttr(el, objName, objValue); } + else setAttr(el, name, value); }); } return arguments.length > 1 ? this : getAttr(this[0], name, this.options.xmlMode); @@ -135313,7 +123145,7 @@ function attr(name, value) { * @returns The prop's value. */ function getProp(el, name, xmlMode) { - return name in el ? el[name] : !xmlMode && rboolean.test(name) ? getAttr(el, name, false) !== undefined : getAttr(el, name, xmlMode); + return name in el ? el[name] : !xmlMode && rboolean.test(name) ? getAttr(el, name, false) !== void 0 : getAttr(el, name, xmlMode); } /** * Sets the value of a prop. @@ -135325,84 +123157,60 @@ function getProp(el, name, xmlMode) { * @param xmlMode - Disable handling of special HTML attributes. */ function setProp(el, name, value, xmlMode) { - if (name in el) { - el[name] = value; - } else { - setAttr(el, name, !xmlMode && rboolean.test(name) ? value ? "" : null : `${value}`); - } + if (name in el) el[name] = value; + else setAttr(el, name, !xmlMode && rboolean.test(name) ? value ? "" : null : `${value}`); } function prop(name, value) { var _a; - if (typeof name === "string" && value === undefined) { + if (typeof name === "string" && value === void 0) { const el = this[0]; - if (!el) return undefined; + if (!el) return void 0; switch (name) { case "style": { const property = this.css(); const keys = Object.keys(property); - for (let i = 0; i < keys.length; i++) { - property[i] = keys[i]; - } + for (let i = 0; i < keys.length; i++) property[i] = keys[i]; property.length = keys.length; return property; } case "tagName": - case "nodeName": { - if (!isTag(el)) return undefined; + case "nodeName": + if (!isTag(el)) return void 0; return el.name.toUpperCase(); - } case "href": case "src": { - if (!isTag(el)) return undefined; + if (!isTag(el)) return void 0; const prop = (_a = el.attribs) === null || _a === void 0 ? void 0 : _a[name]; - if (typeof URL !== "undefined" && (name === "href" && (el.tagName === "a" || el.tagName === "link") || name === "src" && (el.tagName === "img" || el.tagName === "iframe" || el.tagName === "audio" || el.tagName === "video" || el.tagName === "source")) && prop !== undefined && this.options.baseURI) { - return new URL(prop, this.options.baseURI).href; - } + if (typeof URL !== "undefined" && (name === "href" && (el.tagName === "a" || el.tagName === "link") || name === "src" && (el.tagName === "img" || el.tagName === "iframe" || el.tagName === "audio" || el.tagName === "video" || el.tagName === "source")) && prop !== void 0 && this.options.baseURI) return new URL(prop, this.options.baseURI).href; return prop; } - case "innerText": { - return innerText(el); - } - case "textContent": { - return textContent(el); - } - case "outerHTML": { + case "innerText": return innerText(el); + case "textContent": return textContent(el); + case "outerHTML": if (el.type === Root) return this.html(); return this.clone().wrap("").parent().html(); - } - case "innerHTML": { - return this.html(); - } - default: { - if (!isTag(el)) return undefined; + case "innerHTML": return this.html(); + default: + if (!isTag(el)) return void 0; return getProp(el, name, this.options.xmlMode); - } } } - if (typeof name === "object" || value !== undefined) { + if (typeof name === "object" || value !== void 0) { if (typeof value === "function") { - if (typeof name === "object") { - throw new TypeError("Bad combination of arguments."); - } + if (typeof name === "object") throw new TypeError("Bad combination of arguments."); return domEach(this, (el, i) => { - if (isTag(el)) { - setProp(el, name, value.call(el, i, getProp(el, name, this.options.xmlMode)), this.options.xmlMode); - } + if (isTag(el)) setProp(el, name, value.call(el, i, getProp(el, name, this.options.xmlMode)), this.options.xmlMode); }); } return domEach(this, (el) => { if (!isTag(el)) return; - if (typeof name === "object") { - for (const key of Object.keys(name)) { - const val = name[key]; - setProp(el, key, val, this.options.xmlMode); - } - } else { - setProp(el, name, value, this.options.xmlMode); + if (typeof name === "object") for (const key of Object.keys(name)) { + const val = name[key]; + setProp(el, key, val, this.options.xmlMode); } + else setProp(el, name, value, this.options.xmlMode); }); } - return undefined; } /** * Sets the value of a data attribute. @@ -135414,11 +123222,9 @@ function prop(name, value) { */ function setData(elem, name, value) { var _a; - (_a = elem.data) !== null && _a !== void 0 ? _a : elem.data = {}; + (_a = elem.data) !== null && _a !== void 0 || (elem.data = {}); if (typeof name === "object") Object.assign(elem.data, name); - else if (typeof name === "string" && value !== undefined) { - elem.data[name] = value; - } + else if (typeof name === "string" && value !== void 0) elem.data[name] = value; } /** * Read _all_ HTML5 `data-*` attributes from the equivalent HTML5 `data-*` @@ -135431,13 +123237,9 @@ function setData(elem, name, value) { */ function readAllData(el) { for (const domName of Object.keys(el.attribs)) { - if (!domName.startsWith(dataAttrPrefix)) { - continue; - } + if (!domName.startsWith(dataAttrPrefix)) continue; const jsName = camelCase(domName.slice(dataAttrPrefix.length)); - if (!hasOwn(el.data, jsName)) { - el.data[jsName] = parseDataValue(el.attribs[domName]); - } + if (!hasOwn(el.data, jsName)) el.data[jsName] = parseDataValue(el.attribs[domName]); } return el.data; } @@ -135454,13 +123256,8 @@ function readAllData(el) { function readData(el, name) { const domName = dataAttrPrefix + cssCase(name); const data = el.data; - if (hasOwn(data, name)) { - return data[name]; - } - if (hasOwn(el.attribs, domName)) { - return data[name] = parseDataValue(el.attribs[domName]); - } - return undefined; + if (hasOwn(data, name)) return data[name]; + if (hasOwn(el.attribs, domName)) return data[name] = parseDataValue(el.attribs[domName]); } /** * Coerce string data-* attributes to their corresponding JavaScript primitives. @@ -135476,11 +123273,9 @@ function parseDataValue(value) { if (value === "false") return false; const num = Number(value); if (value === String(num)) return num; - if (rbrace.test(value)) { - try { - return JSON.parse(value); - } catch {} - } + if (rbrace.test(value)) try { + return JSON.parse(value); + } catch {} return value; } function data(name, value) { @@ -135488,16 +123283,12 @@ function data(name, value) { const elem = this[0]; if (!elem || !isTag(elem)) return; const dataEl = elem; - (_a = dataEl.data) !== null && _a !== void 0 ? _a : dataEl.data = {}; - if (name == null) { - return readAllData(dataEl); - } - if (typeof name === "object" || value !== undefined) { + (_a = dataEl.data) !== null && _a !== void 0 || (dataEl.data = {}); + if (name == null) return readAllData(dataEl); + if (typeof name === "object" || value !== void 0) { domEach(this, (el) => { - if (isTag(el)) { - if (typeof name === "object") setData(el, name); - else setData(el, name, value); - } + if (isTag(el)) if (typeof name === "object") setData(el, name); + else setData(el, name, value); }); return this; } @@ -135506,33 +123297,24 @@ function data(name, value) { function val(value) { const querying = arguments.length === 0; const element = this[0]; - if (!element || !isTag(element)) return querying ? undefined : this; + if (!element || !isTag(element)) return querying ? void 0 : this; switch (element.name) { - case "textarea": { - return this.text(value); - } + case "textarea": return this.text(value); case "select": { const option = this.find("option:selected"); if (!querying) { - if (this.attr("multiple") == null && typeof value === "object") { - return this; - } + if (this.attr("multiple") == null && typeof value === "object") return this; this.find("option").removeAttr("selected"); const values = typeof value === "object" ? value : [value]; - for (const val of values) { - this.find(`option[value="${val}"]`).attr("selected", ""); - } + for (const val of values) this.find(`option[value="${val}"]`).attr("selected", ""); return this; } return this.attr("multiple") ? option.toArray().map((el) => text$1(el.children)) : option.attr("value"); } case "button": case "input": - case "option": { - return querying ? this.attr("value") : this.attr("value", value); - } + case "option": return querying ? this.attr("value") : this.attr("value", value); } - return undefined; } /** * Remove an attribute. @@ -135576,11 +123358,9 @@ function splitNames(names) { */ function removeAttr(name) { const attrNames = splitNames(name); - for (const attrName of attrNames) { - domEach(this, (elem) => { - if (isTag(elem)) removeAttribute(elem, attrName); - }); - } + for (const attrName of attrNames) domEach(this, (elem) => { + if (isTag(elem)) removeAttribute(elem, attrName); + }); return this; } /** @@ -135608,13 +123388,9 @@ function hasClass(className) { return this.toArray().some((elem) => { const clazz = isTag(elem) && elem.attribs["class"]; let idx = -1; - if (clazz && className.length > 0) { - while ((idx = clazz.indexOf(className, idx + 1)) > -1) { - const end = idx + className.length; - if ((idx === 0 || rspace.test(clazz[idx - 1])) && (end === clazz.length || rspace.test(clazz[end]))) { - return true; - } - } + if (clazz && className.length > 0) while ((idx = clazz.indexOf(className, idx + 1)) > -1) { + const end = idx + className.length; + if ((idx === 0 || rspace.test(clazz[idx - 1])) && (end === clazz.length || rspace.test(clazz[end]))) return true; } return false; }); @@ -135638,14 +123414,12 @@ function hasClass(className) { * @see {@link https://api.jquery.com/addClass/} */ function addClass(value) { - if (typeof value === "function") { - return domEach(this, (el, i) => { - if (isTag(el)) { - const className = el.attribs["class"] || ""; - addClass.call([el], value.call(el, i, className)); - } - }); - } + if (typeof value === "function") return domEach(this, (el, i) => { + if (isTag(el)) { + const className = el.attribs["class"] || ""; + addClass.call([el], value.call(el, i, className)); + } + }); if (!value || typeof value !== "string") return this; const classNames = value.split(rspace); const numElements = this.length; @@ -135660,9 +123434,7 @@ function addClass(value) { if (!setClass.includes(` ${appendClass}`)) setClass += appendClass; } setAttr(el, "class", setClass.trim()); - } else { - setAttr(el, "class", classNames.join(" ").trim()); - } + } else setAttr(el, "class", classNames.join(" ").trim()); } return this; } @@ -135687,21 +123459,16 @@ function addClass(value) { * @see {@link https://api.jquery.com/removeClass/} */ function removeClass(name) { - if (typeof name === "function") { - return domEach(this, (el, i) => { - if (isTag(el)) { - removeClass.call([el], name.call(el, i, el.attribs["class"] || "")); - } - }); - } + if (typeof name === "function") return domEach(this, (el, i) => { + if (isTag(el)) removeClass.call([el], name.call(el, i, el.attribs["class"] || "")); + }); const classes = splitNames(name); const numClasses = classes.length; const removeAll = arguments.length === 0; return domEach(this, (el) => { if (!isTag(el)) return; - if (removeAll) { - el.attribs["class"] = ""; - } else { + if (removeAll) el.attribs["class"] = ""; + else { const elClasses = splitNames(el.attribs["class"]); let changed = false; for (let j = 0; j < numClasses; j++) { @@ -135712,9 +123479,7 @@ function removeClass(name) { j--; } } - if (changed) { - el.attribs["class"] = elClasses.join(" "); - } + if (changed) el.attribs["class"] = elClasses.join(" "); } }); } @@ -135740,13 +123505,9 @@ function removeClass(name) { * @see {@link https://api.jquery.com/toggleClass/} */ function toggleClass(value, stateVal) { - if (typeof value === "function") { - return domEach(this, (el, i) => { - if (isTag(el)) { - toggleClass.call([el], value.call(el, i, el.attribs["class"] || "", stateVal), stateVal); - } - }); - } + if (typeof value === "function") return domEach(this, (el, i) => { + if (isTag(el)) toggleClass.call([el], value.call(el, i, el.attribs["class"] || "", stateVal), stateVal); + }); if (!value || typeof value !== "string") return this; const classNames = value.split(rspace); const numClasses = classNames.length; @@ -135758,17 +123519,13 @@ function toggleClass(value, stateVal) { const elementClasses = splitNames(el.attribs["class"]); for (let j = 0; j < numClasses; j++) { const index = elementClasses.indexOf(classNames[j]); - if (state >= 0 && index === -1) { - elementClasses.push(classNames[j]); - } else if (state <= 0 && index !== -1) { - elementClasses.splice(index, 1); - } + if (state >= 0 && index === -1) elementClasses.push(classNames[j]); + else if (state <= 0 && index !== -1) elementClasses.splice(index, 1); } el.attribs["class"] = elementClasses.join(" "); } return this; } - //#endregion //#region ../node_modules/css-what/lib/commonjs/types.js var require_types = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -135787,7 +123544,7 @@ var require_types = /* @__PURE__ */ __commonJSMin(((exports) => { SelectorType["Parent"] = "parent"; SelectorType["Sibling"] = "sibling"; SelectorType["ColumnCombinator"] = "column-combinator"; - })(SelectorType = exports.SelectorType || (exports.SelectorType = {})); + })(exports.SelectorType || (exports.SelectorType = {})); /** * Modes for ignore case. * @@ -135811,9 +123568,8 @@ var require_types = /* @__PURE__ */ __commonJSMin(((exports) => { AttributeAction["Hyphen"] = "hyphen"; AttributeAction["Not"] = "not"; AttributeAction["Start"] = "start"; - })(AttributeAction = exports.AttributeAction || (exports.AttributeAction = {})); + })(exports.AttributeAction || (exports.AttributeAction = {})); })); - //#endregion //#region ../node_modules/css-what/lib/commonjs/parse.js var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -135884,9 +123640,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => { function parse(selector) { var subselects = []; var endIndex = parseSelector(subselects, "".concat(selector), 0); - if (endIndex < selector.length) { - throw new Error("Unmatched selector: ".concat(selector.slice(endIndex))); - } + if (endIndex < selector.length) throw new Error("Unmatched selector: ".concat(selector.slice(endIndex))); return subselects; } exports.parse = parse; @@ -135894,33 +123648,22 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => { var tokens = []; function getName(offset) { var match = selector.slice(selectorIndex + offset).match(reName); - if (!match) { - throw new Error("Expected name, found ".concat(selector.slice(selectorIndex))); - } + if (!match) throw new Error("Expected name, found ".concat(selector.slice(selectorIndex))); var name = match[0]; selectorIndex += offset + name.length; return unescapeCSS(name); } function stripWhitespace(offset) { selectorIndex += offset; - while (selectorIndex < selector.length && isWhitespace(selector.charCodeAt(selectorIndex))) { - selectorIndex++; - } + while (selectorIndex < selector.length && isWhitespace(selector.charCodeAt(selectorIndex))) selectorIndex++; } function readValueWithParenthesis() { selectorIndex += 1; var start = selectorIndex; var counter = 1; - for (; counter > 0 && selectorIndex < selector.length; selectorIndex++) { - if (selector.charCodeAt(selectorIndex) === 40 && !isEscaped(selectorIndex)) { - counter++; - } else if (selector.charCodeAt(selectorIndex) === 41 && !isEscaped(selectorIndex)) { - counter--; - } - } - if (counter) { - throw new Error("Parenthesis not matched"); - } + for (; counter > 0 && selectorIndex < selector.length; selectorIndex++) if (selector.charCodeAt(selectorIndex) === 40 && !isEscaped(selectorIndex)) counter++; + else if (selector.charCodeAt(selectorIndex) === 41 && !isEscaped(selectorIndex)) counter--; + if (counter) throw new Error("Parenthesis not matched"); return unescapeCSS(selector.slice(start, selectorIndex - 1)); } function isEscaped(pos) { @@ -135929,9 +123672,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => { return (slashCount & 1) === 1; } function ensureNotTraversal() { - if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) { - throw new Error("Did not expect successive traversals."); - } + if (tokens.length > 0 && isTraversal(tokens[tokens.length - 1])) throw new Error("Did not expect successive traversals."); } function addTraversal(type) { if (tokens.length > 0 && tokens[tokens.length - 1].type === types_1.SelectorType.Descendant) { @@ -135959,18 +123700,12 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => { * picked up from here. */ function finalizeSubselector() { - if (tokens.length && tokens[tokens.length - 1].type === types_1.SelectorType.Descendant) { - tokens.pop(); - } - if (tokens.length === 0) { - throw new Error("Empty sub-selector"); - } + if (tokens.length && tokens[tokens.length - 1].type === types_1.SelectorType.Descendant) tokens.pop(); + if (tokens.length === 0) throw new Error("Empty sub-selector"); subselects.push(tokens); } stripWhitespace(0); - if (selector.length === selectorIndex) { - return selectorIndex; - } + if (selector.length === selectorIndex) return selectorIndex; loop: while (selectorIndex < selector.length) { var firstChar = selector.charCodeAt(selectorIndex); switch (firstChar) { @@ -135978,49 +123713,41 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => { case 9: case 10: case 12: - case 13: { + case 13: if (tokens.length === 0 || tokens[0].type !== types_1.SelectorType.Descendant) { ensureNotTraversal(); tokens.push({ type: types_1.SelectorType.Descendant }); } stripWhitespace(1); break; - } - case 62: { + case 62: addTraversal(types_1.SelectorType.Child); stripWhitespace(1); break; - } - case 60: { + case 60: addTraversal(types_1.SelectorType.Parent); stripWhitespace(1); break; - } - case 126: { + case 126: addTraversal(types_1.SelectorType.Sibling); stripWhitespace(1); break; - } - case 43: { + case 43: addTraversal(types_1.SelectorType.Adjacent); stripWhitespace(1); break; - } - case 46: { + case 46: addSpecialAttribute("class", types_1.AttributeAction.Element); break; - } - case 35: { + case 35: addSpecialAttribute("id", types_1.AttributeAction.Equals); break; - } - case 91: { + case 91: stripWhitespace(1); var name_1 = void 0; var namespace = null; - if (selector.charCodeAt(selectorIndex) === 124) { - name_1 = getName(1); - } else if (selector.startsWith("*|", selectorIndex)) { + if (selector.charCodeAt(selectorIndex) === 124) name_1 = getName(1); + else if (selector.startsWith("*|", selectorIndex)) { namespace = "*"; name_1 = getName(2); } else { @@ -136035,9 +123762,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => { var possibleAction = actionTypes.get(selector.charCodeAt(selectorIndex)); if (possibleAction) { action = possibleAction; - if (selector.charCodeAt(selectorIndex + 1) !== 61) { - throw new Error("Expected `=`"); - } + if (selector.charCodeAt(selectorIndex + 1) !== 61) throw new Error("Expected `=`"); stripWhitespace(2); } else if (selector.charCodeAt(selectorIndex) === 61) { action = types_1.AttributeAction.Equals; @@ -136049,19 +123774,13 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => { if (isQuote(selector.charCodeAt(selectorIndex))) { var quote = selector.charCodeAt(selectorIndex); var sectionEnd = selectorIndex + 1; - while (sectionEnd < selector.length && (selector.charCodeAt(sectionEnd) !== quote || isEscaped(sectionEnd))) { - sectionEnd += 1; - } - if (selector.charCodeAt(sectionEnd) !== quote) { - throw new Error("Attribute value didn't end"); - } + while (sectionEnd < selector.length && (selector.charCodeAt(sectionEnd) !== quote || isEscaped(sectionEnd))) sectionEnd += 1; + if (selector.charCodeAt(sectionEnd) !== quote) throw new Error("Attribute value didn't end"); value = unescapeCSS(selector.slice(selectorIndex + 1, sectionEnd)); selectorIndex = sectionEnd + 1; } else { var valueStart = selectorIndex; - while (selectorIndex < selector.length && (!isWhitespace(selector.charCodeAt(selectorIndex)) && selector.charCodeAt(selectorIndex) !== 93 || isEscaped(selectorIndex))) { - selectorIndex += 1; - } + while (selectorIndex < selector.length && (!isWhitespace(selector.charCodeAt(selectorIndex)) && selector.charCodeAt(selectorIndex) !== 93 || isEscaped(selectorIndex))) selectorIndex += 1; value = unescapeCSS(selector.slice(valueStart, selectorIndex)); } stripWhitespace(0); @@ -136074,9 +123793,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => { stripWhitespace(1); } } - if (selector.charCodeAt(selectorIndex) !== 93) { - throw new Error("Attribute selector didn't terminate"); - } + if (selector.charCodeAt(selectorIndex) !== 93) throw new Error("Attribute selector didn't terminate"); selectorIndex += 1; var attributeSelector = { type: types_1.SelectorType.Attribute, @@ -136088,8 +123805,7 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => { }; tokens.push(attributeSelector); break; - } - case 58: { + case 58: if (selector.charCodeAt(selectorIndex + 1) === 58) { tokens.push({ type: types_1.SelectorType.PseudoElement, @@ -136100,27 +123816,19 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => { } var name_2 = getName(1).toLowerCase(); var data = null; - if (selector.charCodeAt(selectorIndex) === 40) { - if (unpackPseudos.has(name_2)) { - if (isQuote(selector.charCodeAt(selectorIndex + 1))) { - throw new Error("Pseudo-selector ".concat(name_2, " cannot be quoted")); - } - data = []; - selectorIndex = parseSelector(data, selector, selectorIndex + 1); - if (selector.charCodeAt(selectorIndex) !== 41) { - throw new Error("Missing closing parenthesis in :".concat(name_2, " (").concat(selector, ")")); - } - selectorIndex += 1; - } else { - data = readValueWithParenthesis(); - if (stripQuotesFromPseudos.has(name_2)) { - var quot = data.charCodeAt(0); - if (quot === data.charCodeAt(data.length - 1) && isQuote(quot)) { - data = data.slice(1, -1); - } - } - data = unescapeCSS(data); + if (selector.charCodeAt(selectorIndex) === 40) if (unpackPseudos.has(name_2)) { + if (isQuote(selector.charCodeAt(selectorIndex + 1))) throw new Error("Pseudo-selector ".concat(name_2, " cannot be quoted")); + data = []; + selectorIndex = parseSelector(data, selector, selectorIndex + 1); + if (selector.charCodeAt(selectorIndex) !== 41) throw new Error("Missing closing parenthesis in :".concat(name_2, " (").concat(selector, ")")); + selectorIndex += 1; + } else { + data = readValueWithParenthesis(); + if (stripQuotesFromPseudos.has(name_2)) { + var quot = data.charCodeAt(0); + if (quot === data.charCodeAt(data.length - 1) && isQuote(quot)) data = data.slice(1, -1); } + data = unescapeCSS(data); } tokens.push({ type: types_1.SelectorType.Pseudo, @@ -136128,23 +123836,17 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => { data }); break; - } - case 44: { + case 44: finalizeSubselector(); tokens = []; stripWhitespace(1); break; - } - default: { + default: if (selector.startsWith("/*", selectorIndex)) { var endIndex = selector.indexOf("*/", selectorIndex + 2); - if (endIndex < 0) { - throw new Error("Comment was not terminated"); - } + if (endIndex < 0) throw new Error("Comment was not terminated"); selectorIndex = endIndex + 2; - if (tokens.length === 0) { - stripWhitespace(0); - } + if (tokens.length === 0) stripWhitespace(0); break; } var namespace = null; @@ -136159,19 +123861,14 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => { stripWhitespace(2); break; } - } else if (reName.test(selector.slice(selectorIndex))) { - name_3 = getName(0); - } else { - break loop; - } + } else if (reName.test(selector.slice(selectorIndex))) name_3 = getName(0); + else break loop; if (selector.charCodeAt(selectorIndex) === 124 && selector.charCodeAt(selectorIndex + 1) !== 124) { namespace = name_3; if (selector.charCodeAt(selectorIndex + 1) === 42) { name_3 = "*"; selectorIndex += 2; - } else { - name_3 = getName(1); - } + } else name_3 = getName(1); } tokens.push(name_3 === "*" ? { type: types_1.SelectorType.Universal, @@ -136181,20 +123878,18 @@ var require_parse$1 = /* @__PURE__ */ __commonJSMin(((exports) => { name: name_3, namespace }); - } } } finalizeSubselector(); return selectorIndex; } })); - //#endregion //#region ../node_modules/css-what/lib/commonjs/stringify.js var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => { var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) { - if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { - if (ar || !(i in from)) { + if (pack || arguments.length === 2) { + for (var i = 0, l = from.length, ar; i < l; i++) if (ar || !(i in from)) { if (!ar) ar = Array.prototype.slice.call(from, 0, i); ar[i] = from[i]; } @@ -136251,19 +123946,12 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => { case types_1.SelectorType.Tag: return getNamespacedName(token); case types_1.SelectorType.PseudoElement: return "::".concat(escapeName(token.name, charsToEscapeInName)).concat(token.data === null ? "" : "(".concat(escapeName(token.data, charsToEscapeInPseudoValue), ")")); case types_1.SelectorType.Pseudo: return ":".concat(escapeName(token.name, charsToEscapeInName)).concat(token.data === null ? "" : "(".concat(typeof token.data === "string" ? escapeName(token.data, charsToEscapeInPseudoValue) : stringify(token.data), ")")); - case types_1.SelectorType.Attribute: { - if (token.name === "id" && token.action === types_1.AttributeAction.Equals && token.ignoreCase === "quirks" && !token.namespace) { - return "#".concat(escapeName(token.value, charsToEscapeInName)); - } - if (token.name === "class" && token.action === types_1.AttributeAction.Element && token.ignoreCase === "quirks" && !token.namespace) { - return ".".concat(escapeName(token.value, charsToEscapeInName)); - } + case types_1.SelectorType.Attribute: + if (token.name === "id" && token.action === types_1.AttributeAction.Equals && token.ignoreCase === "quirks" && !token.namespace) return "#".concat(escapeName(token.value, charsToEscapeInName)); + if (token.name === "class" && token.action === types_1.AttributeAction.Element && token.ignoreCase === "quirks" && !token.namespace) return ".".concat(escapeName(token.value, charsToEscapeInName)); var name_1 = getNamespacedName(token); - if (token.action === types_1.AttributeAction.Exists) { - return "[".concat(name_1, "]"); - } + if (token.action === types_1.AttributeAction.Exists) return "[".concat(name_1, "]"); return "[".concat(name_1).concat(getActionValue(token.action), "=\"").concat(escapeName(token.value, charsToEscapeInAttributeValue), "\"").concat(token.ignoreCase === null ? "" : token.ignoreCase ? " i" : " s", "]"); - } } } function getActionValue(action) { @@ -136287,33 +123975,28 @@ var require_stringify = /* @__PURE__ */ __commonJSMin(((exports) => { function escapeName(str, charsToEscape) { var lastIdx = 0; var ret = ""; - for (var i = 0; i < str.length; i++) { - if (charsToEscape.has(str.charCodeAt(i))) { - ret += "".concat(str.slice(lastIdx, i), "\\").concat(str.charAt(i)); - lastIdx = i + 1; - } + for (var i = 0; i < str.length; i++) if (charsToEscape.has(str.charCodeAt(i))) { + ret += "".concat(str.slice(lastIdx, i), "\\").concat(str.charAt(i)); + lastIdx = i + 1; } return ret.length > 0 ? ret + str.slice(lastIdx) : str; } })); - //#endregion //#region ../node_modules/css-what/lib/commonjs/index.js var require_commonjs = /* @__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; 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]; - } - }; - } + 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; + if (k2 === void 0) k2 = k; o[k2] = m[k]; })); var __exportStar = exports && exports.__exportStar || function(m, exports$3) { @@ -136343,7 +124026,6 @@ var require_commonjs = /* @__PURE__ */ __commonJSMin(((exports) => { } }); })); - //#endregion //#region ../node_modules/boolbase/index.js var require_boolbase = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -136356,7 +124038,6 @@ var require_boolbase = /* @__PURE__ */ __commonJSMin(((exports, module) => { } }; })); - //#endregion //#region ../node_modules/css-select/lib/esm/sort.js var import_boolbase = /* @__PURE__ */ __toESM(require_boolbase(), 1); @@ -136404,29 +124085,16 @@ function getProcedure(token) { let proc = (_a = procedure.get(token.type)) !== null && _a !== void 0 ? _a : -1; if (token.type === import_commonjs.SelectorType.Attribute) { proc = (_b = attributes.get(token.action)) !== null && _b !== void 0 ? _b : 4; - if (token.action === import_commonjs.AttributeAction.Equals && token.name === "id") { - proc = 9; - } - if (token.ignoreCase) { - proc >>= 1; - } - } else if (token.type === import_commonjs.SelectorType.Pseudo) { - if (!token.data) { - proc = 3; - } else if (token.name === "has" || token.name === "contains") { - proc = 0; - } else if (Array.isArray(token.data)) { - proc = Math.min(...token.data.map((d) => Math.min(...d.map(getProcedure)))); - if (proc < 0) { - proc = 0; - } - } else { - proc = 2; - } - } + if (token.action === import_commonjs.AttributeAction.Equals && token.name === "id") proc = 9; + if (token.ignoreCase) proc >>= 1; + } else if (token.type === import_commonjs.SelectorType.Pseudo) if (!token.data) proc = 3; + else if (token.name === "has" || token.name === "contains") proc = 0; + else if (Array.isArray(token.data)) { + proc = Math.min(...token.data.map((d) => Math.min(...d.map(getProcedure)))); + if (proc < 0) proc = 0; + } else proc = 2; return proc; } - //#endregion //#region ../node_modules/css-select/lib/esm/attributes.js /** @@ -136533,9 +124201,7 @@ const attributeRules = { element(next, data, options) { const { adapter } = options; const { name, value } = data; - if (/\s/.test(value)) { - return import_boolbase.default.falseFunc; - } + if (/\s/.test(value)) return import_boolbase.default.falseFunc; const regex = new RegExp(`(?:^|\\s)${escapeRegex(value)}(?:$|\\s)`, shouldIgnoreCase(data, options) ? "i" : ""); return function element(elem) { const attr = adapter.getAttributeValue(elem, name); @@ -136550,9 +124216,7 @@ const attributeRules = { const { name } = data; let { value } = data; const len = value.length; - if (len === 0) { - return import_boolbase.default.falseFunc; - } + if (len === 0) return import_boolbase.default.falseFunc; if (shouldIgnoreCase(data, options)) { value = value.toLowerCase(); return (elem) => { @@ -136570,9 +124234,7 @@ const attributeRules = { const { name } = data; let { value } = data; const len = -value.length; - if (len === 0) { - return import_boolbase.default.falseFunc; - } + if (len === 0) return import_boolbase.default.falseFunc; if (shouldIgnoreCase(data, options)) { value = value.toLowerCase(); return (elem) => { @@ -136588,9 +124250,7 @@ const attributeRules = { any(next, data, options) { const { adapter } = options; const { name, value } = data; - if (value === "") { - return import_boolbase.default.falseFunc; - } + if (value === "") return import_boolbase.default.falseFunc; if (shouldIgnoreCase(data, options)) { const regex = new RegExp(escapeRegex(value), "i"); return function anyIC(elem) { @@ -136607,9 +124267,8 @@ const attributeRules = { const { adapter } = options; const { name } = data; let { value } = data; - if (value === "") { - return (elem) => !!adapter.getAttributeValue(elem, name) && next(elem); - } else if (shouldIgnoreCase(data, options)) { + if (value === "") return (elem) => !!adapter.getAttributeValue(elem, name) && next(elem); + else if (shouldIgnoreCase(data, options)) { value = value.toLowerCase(); return (elem) => { const attr = adapter.getAttributeValue(elem, name); @@ -136619,7 +124278,6 @@ const attributeRules = { return (elem) => adapter.getAttributeValue(elem, name) !== value && next(elem); } }; - //#endregion //#region ../node_modules/nth-check/lib/esm/parse.js const whitespace = new Set([ @@ -136640,11 +124298,8 @@ const NINE = "9".charCodeAt(0); */ function parse$6(formula) { formula = formula.trim().toLowerCase(); - if (formula === "even") { - return [2, 0]; - } else if (formula === "odd") { - return [2, 1]; - } + if (formula === "even") return [2, 0]; + else if (formula === "odd") return [2, 1]; let idx = 0; let a = 0; let sign = readSign(); @@ -136657,22 +124312,16 @@ function parse$6(formula) { sign = readSign(); skipWhitespace(); number = readNumber(); - } else { - sign = number = 0; - } - } - if (number === null || idx < formula.length) { - throw new Error(`n-th rule couldn't be parsed ('${formula}')`); + } else sign = number = 0; } + if (number === null || idx < formula.length) throw new Error(`n-th rule couldn't be parsed ('${formula}')`); return [a, sign * number]; function readSign() { if (formula.charAt(idx) === "-") { idx++; return -1; } - if (formula.charAt(idx) === "+") { - idx++; - } + if (formula.charAt(idx) === "+") idx++; return 1; } function readNumber() { @@ -136685,12 +124334,9 @@ function parse$6(formula) { return idx === start ? null : value; } function skipWhitespace() { - while (idx < formula.length && whitespace.has(formula.charCodeAt(idx))) { - idx++; - } + while (idx < formula.length && whitespace.has(formula.charCodeAt(idx))) idx++; } } - //#endregion //#region ../node_modules/nth-check/lib/esm/compile.js /** @@ -136769,12 +124415,9 @@ function generate(parsed) { }; } if (a === 0) return b < 0 ? () => null : () => n++ === 0 ? b : null; - if (b < 0) { - b += a * Math.ceil(-b / a); - } + if (b < 0) b += a * Math.ceil(-b / a); return () => a * n++ + b; } - //#endregion //#region ../node_modules/nth-check/lib/esm/index.js /** @@ -136836,7 +124479,6 @@ function nthCheck(formula) { function sequence(formula) { return generate(parse$6(formula)); } - //#endregion //#region ../node_modules/css-select/lib/esm/pseudo-selectors/filters.js function getChildFunc(next, adapter) { @@ -136866,9 +124508,7 @@ const filters = { let pos = 0; for (let i = 0; i < siblings.length; i++) { if (equals(elem, siblings[i])) break; - if (adapter.isTag(siblings[i])) { - pos++; - } + if (adapter.isTag(siblings[i])) pos++; } return func(pos) && next(elem); }; @@ -136882,9 +124522,7 @@ const filters = { let pos = 0; for (let i = siblings.length - 1; i >= 0; i--) { if (equals(elem, siblings[i])) break; - if (adapter.isTag(siblings[i])) { - pos++; - } + if (adapter.isTag(siblings[i])) pos++; } return func(pos) && next(elem); }; @@ -136899,9 +124537,7 @@ const filters = { for (let i = 0; i < siblings.length; i++) { const currentSibling = siblings[i]; if (equals(elem, currentSibling)) break; - if (adapter.isTag(currentSibling) && adapter.getName(currentSibling) === adapter.getName(elem)) { - pos++; - } + if (adapter.isTag(currentSibling) && adapter.getName(currentSibling) === adapter.getName(elem)) pos++; } return func(pos) && next(elem); }; @@ -136916,9 +124552,7 @@ const filters = { for (let i = siblings.length - 1; i >= 0; i--) { const currentSibling = siblings[i]; if (equals(elem, currentSibling)) break; - if (adapter.isTag(currentSibling) && adapter.getName(currentSibling) === adapter.getName(elem)) { - pos++; - } + if (adapter.isTag(currentSibling) && adapter.getName(currentSibling) === adapter.getName(elem)) pos++; } return func(pos) && next(elem); }; @@ -136931,12 +124565,8 @@ const filters = { }, scope(next, rule, options, context) { const { equals } = options; - if (!context || context.length === 0) { - return filters["root"](next, rule, options); - } - if (context.length === 1) { - return (elem) => equals(context[0], elem) && next(elem); - } + if (!context || context.length === 0) return filters["root"](next, rule, options); + if (context.length === 1) return (elem) => equals(context[0], elem) && next(elem); return (elem) => context.includes(elem) && next(elem); }, hover: dynamicStatePseudo("isHovered"), @@ -136952,15 +124582,12 @@ const filters = { function dynamicStatePseudo(name) { return function dynamicPseudo(next, _rule, { adapter }) { const func = adapter[name]; - if (typeof func !== "function") { - return import_boolbase.default.falseFunc; - } + if (typeof func !== "function") return import_boolbase.default.falseFunc; return function active(elem) { return func(elem) && next(elem); }; }; } - //#endregion //#region ../node_modules/css-select/lib/esm/pseudo-selectors/pseudos.js const pseudos = { @@ -136968,9 +124595,7 @@ const pseudos = { return !adapter.getChildren(elem).some((elem) => adapter.isTag(elem) || adapter.getText(elem) !== ""); }, "first-child"(elem, { adapter, equals }) { - if (adapter.prevElementSibling) { - return adapter.prevElementSibling(elem) == null; - } + if (adapter.prevElementSibling) return adapter.prevElementSibling(elem) == null; const firstChild = adapter.getSiblings(elem).find((elem) => adapter.isTag(elem)); return firstChild != null && equals(elem, firstChild); }, @@ -136988,9 +124613,7 @@ const pseudos = { for (let i = 0; i < siblings.length; i++) { const currentSibling = siblings[i]; if (equals(elem, currentSibling)) return true; - if (adapter.isTag(currentSibling) && adapter.getName(currentSibling) === elemName) { - break; - } + if (adapter.isTag(currentSibling) && adapter.getName(currentSibling) === elemName) break; } return false; }, @@ -137000,9 +124623,7 @@ const pseudos = { for (let i = siblings.length - 1; i >= 0; i--) { const currentSibling = siblings[i]; if (equals(elem, currentSibling)) return true; - if (adapter.isTag(currentSibling) && adapter.getName(currentSibling) === elemName) { - break; - } + if (adapter.isTag(currentSibling) && adapter.getName(currentSibling) === elemName) break; } return false; }, @@ -137016,14 +124637,9 @@ const pseudos = { }; function verifyPseudoArgs(func, name, subselect, argIndex) { if (subselect === null) { - if (func.length > argIndex) { - throw new Error(`Pseudo-class :${name} requires an argument`); - } - } else if (func.length === argIndex) { - throw new Error(`Pseudo-class :${name} doesn't have any arguments`); - } + if (func.length > argIndex) throw new Error(`Pseudo-class :${name} requires an argument`); + } else if (func.length === argIndex) throw new Error(`Pseudo-class :${name} doesn't have any arguments`); } - //#endregion //#region ../node_modules/css-select/lib/esm/pseudo-selectors/aliases.js /** @@ -137055,7 +124671,6 @@ const aliases = { input: ":is(input, textarea, select, button)", text: "input:is(:not([type!='']), [type=text])" }; - //#endregion //#region ../node_modules/css-select/lib/esm/pseudo-selectors/subselects.js /** Used as a placeholder for :has. Will be replaced with the actual element. */ @@ -137099,7 +124714,7 @@ const subselects = { const { adapter } = options; const opts = copyOptions(options); opts.relativeSelector = true; - const context = subselect.some((s) => s.some(isTraversal$1)) ? [PLACEHOLDER_ELEMENT] : undefined; + const context = subselect.some((s) => s.some(isTraversal$1)) ? [PLACEHOLDER_ELEMENT] : void 0; const compiled = compileToken(subselect, opts, context); if (compiled === import_boolbase.default.falseFunc) return import_boolbase.default.falseFunc; const hasElement = ensureIsTag(compiled, adapter); @@ -137116,24 +124731,19 @@ const subselects = { return (elem) => next(elem) && adapter.existsOne(hasElement, adapter.getChildren(elem)); } }; - //#endregion //#region ../node_modules/css-select/lib/esm/pseudo-selectors/index.js function compilePseudoSelector(next, selector, options, context, compileToken) { var _a; const { name, data } = selector; if (Array.isArray(data)) { - if (!(name in subselects)) { - throw new Error(`Unknown pseudo-class :${name}(${data})`); - } + if (!(name in subselects)) throw new Error(`Unknown pseudo-class :${name}(${data})`); return subselects[name](next, data, options, context, compileToken); } const userPseudo = (_a = options.pseudos) === null || _a === void 0 ? void 0 : _a[name]; const stringPseudo = typeof userPseudo === "string" ? userPseudo : aliases[name]; if (typeof stringPseudo === "string") { - if (data != null) { - throw new Error(`Pseudo ${name} doesn't have any arguments`); - } + if (data != null) throw new Error(`Pseudo ${name} doesn't have any arguments`); const alias = (0, import_commonjs.parse)(stringPseudo); return subselects["is"](next, alias, options, context, compileToken); } @@ -137141,9 +124751,7 @@ function compilePseudoSelector(next, selector, options, context, compileToken) { verifyPseudoArgs(userPseudo, name, data, 1); return (elem) => userPseudo(elem, data) && next(elem); } - if (name in filters) { - return filters[name](next, data, options, context); - } + if (name in filters) return filters[name](next, data, options, context); if (name in pseudos) { const pseudo = pseudos[name]; verifyPseudoArgs(pseudo, name, data, 2); @@ -137151,137 +124759,90 @@ function compilePseudoSelector(next, selector, options, context, compileToken) { } throw new Error(`Unknown pseudo-class :${name}`); } - //#endregion //#region ../node_modules/css-select/lib/esm/general.js function getElementParent(node, adapter) { const parent = adapter.getParent(node); - if (parent && adapter.isTag(parent)) { - return parent; - } + if (parent && adapter.isTag(parent)) return parent; return null; } function compileGeneralSelector(next, selector, options, context, compileToken) { const { adapter, equals } = options; switch (selector.type) { - case import_commonjs.SelectorType.PseudoElement: { - throw new Error("Pseudo-elements are not supported by css-select"); - } - case import_commonjs.SelectorType.ColumnCombinator: { - throw new Error("Column combinators are not yet supported by css-select"); - } - case import_commonjs.SelectorType.Attribute: { - if (selector.namespace != null) { - throw new Error("Namespaced attributes are not yet supported by css-select"); - } - if (!options.xmlMode || options.lowerCaseAttributeNames) { - selector.name = selector.name.toLowerCase(); - } + case import_commonjs.SelectorType.PseudoElement: throw new Error("Pseudo-elements are not supported by css-select"); + case import_commonjs.SelectorType.ColumnCombinator: throw new Error("Column combinators are not yet supported by css-select"); + case import_commonjs.SelectorType.Attribute: + if (selector.namespace != null) throw new Error("Namespaced attributes are not yet supported by css-select"); + if (!options.xmlMode || options.lowerCaseAttributeNames) selector.name = selector.name.toLowerCase(); return attributeRules[selector.action](next, selector, options); - } - case import_commonjs.SelectorType.Pseudo: { - return compilePseudoSelector(next, selector, options, context, compileToken); - } + case import_commonjs.SelectorType.Pseudo: return compilePseudoSelector(next, selector, options, context, compileToken); case import_commonjs.SelectorType.Tag: { - if (selector.namespace != null) { - throw new Error("Namespaced tag names are not yet supported by css-select"); - } + if (selector.namespace != null) throw new Error("Namespaced tag names are not yet supported by css-select"); let { name } = selector; - if (!options.xmlMode || options.lowerCaseTags) { - name = name.toLowerCase(); - } + if (!options.xmlMode || options.lowerCaseTags) name = name.toLowerCase(); return function tag(elem) { return adapter.getName(elem) === name && next(elem); }; } case import_commonjs.SelectorType.Descendant: { - if (options.cacheResults === false || typeof WeakSet === "undefined") { - return function descendant(elem) { - let current = elem; - while (current = getElementParent(current, adapter)) { - if (next(current)) { - return true; - } - } - return false; - }; - } - const isFalseCache = new WeakSet(); - return function cachedDescendant(elem) { + if (options.cacheResults === false || typeof WeakSet === "undefined") return function descendant(elem) { let current = elem; - while (current = getElementParent(current, adapter)) { - if (!isFalseCache.has(current)) { - if (adapter.isTag(current) && next(current)) { - return true; - } - isFalseCache.add(current); - } - } + while (current = getElementParent(current, adapter)) if (next(current)) return true; return false; }; - } - case "_flexibleDescendant": { - return function flexibleDescendant(elem) { + const isFalseCache = /* @__PURE__ */ new WeakSet(); + return function cachedDescendant(elem) { let current = elem; - do { - if (next(current)) return true; - } while (current = getElementParent(current, adapter)); - return false; - }; - } - case import_commonjs.SelectorType.Parent: { - return function parent(elem) { - return adapter.getChildren(elem).some((elem) => adapter.isTag(elem) && next(elem)); - }; - } - case import_commonjs.SelectorType.Child: { - return function child(elem) { - const parent = adapter.getParent(elem); - return parent != null && adapter.isTag(parent) && next(parent); - }; - } - case import_commonjs.SelectorType.Sibling: { - return function sibling(elem) { - const siblings = adapter.getSiblings(elem); - for (let i = 0; i < siblings.length; i++) { - const currentSibling = siblings[i]; - if (equals(elem, currentSibling)) break; - if (adapter.isTag(currentSibling) && next(currentSibling)) { - return true; - } + while (current = getElementParent(current, adapter)) if (!isFalseCache.has(current)) { + if (adapter.isTag(current) && next(current)) return true; + isFalseCache.add(current); } return false; }; } - case import_commonjs.SelectorType.Adjacent: { - if (adapter.prevElementSibling) { - return function adjacent(elem) { - const previous = adapter.prevElementSibling(elem); - return previous != null && next(previous); - }; + case "_flexibleDescendant": return function flexibleDescendant(elem) { + let current = elem; + do + if (next(current)) return true; + while (current = getElementParent(current, adapter)); + return false; + }; + case import_commonjs.SelectorType.Parent: return function parent(elem) { + return adapter.getChildren(elem).some((elem) => adapter.isTag(elem) && next(elem)); + }; + case import_commonjs.SelectorType.Child: return function child(elem) { + const parent = adapter.getParent(elem); + return parent != null && adapter.isTag(parent) && next(parent); + }; + case import_commonjs.SelectorType.Sibling: return function sibling(elem) { + const siblings = adapter.getSiblings(elem); + for (let i = 0; i < siblings.length; i++) { + const currentSibling = siblings[i]; + if (equals(elem, currentSibling)) break; + if (adapter.isTag(currentSibling) && next(currentSibling)) return true; } + return false; + }; + case import_commonjs.SelectorType.Adjacent: + if (adapter.prevElementSibling) return function adjacent(elem) { + const previous = adapter.prevElementSibling(elem); + return previous != null && next(previous); + }; return function adjacent(elem) { const siblings = adapter.getSiblings(elem); let lastElement; for (let i = 0; i < siblings.length; i++) { const currentSibling = siblings[i]; if (equals(elem, currentSibling)) break; - if (adapter.isTag(currentSibling)) { - lastElement = currentSibling; - } + if (adapter.isTag(currentSibling)) lastElement = currentSibling; } return !!lastElement && next(lastElement); }; - } - case import_commonjs.SelectorType.Universal: { - if (selector.namespace != null && selector.namespace !== "*") { - throw new Error("Namespaced universal selectors are not yet supported by css-select"); - } + case import_commonjs.SelectorType.Universal: + if (selector.namespace != null && selector.namespace !== "*") throw new Error("Namespaced universal selectors are not yet supported by css-select"); return next; - } } } - //#endregion //#region ../node_modules/css-select/lib/esm/compile.js /** @@ -137292,12 +124853,10 @@ function compileGeneralSelector(next, selector, options, context, compileToken) * @param context Optional context for the selector. */ function compile$1(selector, options, context) { - const next = compileUnsafe(selector, options, context); - return ensureIsTag(next, options.adapter); + return ensureIsTag(compileUnsafe(selector, options, context), options.adapter); } function compileUnsafe(selector, options, context) { - const token = typeof selector === "string" ? (0, import_commonjs.parse)(selector) : selector; - return compileToken(token, options, context); + return compileToken(typeof selector === "string" ? (0, import_commonjs.parse)(selector) : selector, options, context); } function includesScopePseudo(t) { return t.type === import_commonjs.SelectorType.Pseudo && (t.name === "scope" || Array.isArray(t.data) && t.data.some((data) => data.some(includesScopePseudo))); @@ -137315,11 +124874,8 @@ function absolutize(token, { adapter }, context) { return e === PLACEHOLDER_ELEMENT || parent && adapter.isTag(parent); })); for (const t of token) { - if (t.length > 0 && isTraversal$1(t[0]) && t[0].type !== import_commonjs.SelectorType.Descendant) {} else if (hasContext && !t.some(includesScopePseudo)) { - t.unshift(DESCENDANT_TOKEN); - } else { - continue; - } + if (t.length > 0 && isTraversal$1(t[0]) && t[0].type !== import_commonjs.SelectorType.Descendant) {} else if (hasContext && !t.some(includesScopePseudo)) t.unshift(DESCENDANT_TOKEN); + else continue; t.unshift(SCOPE_TOKEN); } } @@ -137329,20 +124885,14 @@ function compileToken(token, options, context) { context = (_a = options.context) !== null && _a !== void 0 ? _a : context; const isArrayContext = Array.isArray(context); const finalContext = context && (Array.isArray(context) ? context : [context]); - if (options.relativeSelector !== false) { - absolutize(token, options, finalContext); - } else if (token.some((t) => t.length > 0 && isTraversal$1(t[0]))) { - throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled"); - } + if (options.relativeSelector !== false) absolutize(token, options, finalContext); + else if (token.some((t) => t.length > 0 && isTraversal$1(t[0]))) throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled"); let shouldTestNextSiblings = false; const query = token.map((rules) => { if (rules.length >= 2) { const [first, second] = rules; - if (first.type !== import_commonjs.SelectorType.Pseudo || first.name !== "scope") {} else if (isArrayContext && second.type === import_commonjs.SelectorType.Descendant) { - rules[1] = FLEXIBLE_DESCENDANT_TOKEN; - } else if (second.type === import_commonjs.SelectorType.Adjacent || second.type === import_commonjs.SelectorType.Sibling) { - shouldTestNextSiblings = true; - } + if (first.type !== import_commonjs.SelectorType.Pseudo || first.name !== "scope") {} else if (isArrayContext && second.type === import_commonjs.SelectorType.Descendant) rules[1] = FLEXIBLE_DESCENDANT_TOKEN; + else if (second.type === import_commonjs.SelectorType.Adjacent || second.type === import_commonjs.SelectorType.Sibling) shouldTestNextSiblings = true; } return compileRules(rules, options, finalContext); }).reduce(reduceRules, import_boolbase.default.falseFunc); @@ -137354,35 +124904,29 @@ function compileRules(rules, options, context) { return rules.reduce((previous, rule) => previous === import_boolbase.default.falseFunc ? import_boolbase.default.falseFunc : compileGeneralSelector(previous, rule, options, context, compileToken), (_a = options.rootFunc) !== null && _a !== void 0 ? _a : import_boolbase.default.trueFunc); } function reduceRules(a, b) { - if (b === import_boolbase.default.falseFunc || a === import_boolbase.default.trueFunc) { - return a; - } - if (a === import_boolbase.default.falseFunc || b === import_boolbase.default.trueFunc) { - return b; - } + if (b === import_boolbase.default.falseFunc || a === import_boolbase.default.trueFunc) return a; + if (a === import_boolbase.default.falseFunc || b === import_boolbase.default.trueFunc) return b; return function combine(elem) { return a(elem) || b(elem); }; } - //#endregion //#region ../node_modules/css-select/lib/esm/index.js const defaultEquals = (a, b) => a === b; const defaultOptions = { - adapter: esm_exports, + adapter: esm_exports$1, equals: defaultEquals }; function convertOptionFormats(options) { var _a, _b, _c, _d; const opts = options !== null && options !== void 0 ? options : defaultOptions; - (_a = opts.adapter) !== null && _a !== void 0 ? _a : opts.adapter = esm_exports; - (_b = opts.equals) !== null && _b !== void 0 ? _b : opts.equals = (_d = (_c = opts.adapter) === null || _c === void 0 ? void 0 : _c.equals) !== null && _d !== void 0 ? _d : defaultEquals; + (_a = opts.adapter) !== null && _a !== void 0 || (opts.adapter = esm_exports$1); + (_b = opts.equals) !== null && _b !== void 0 || (opts.equals = (_d = (_c = opts.adapter) === null || _c === void 0 ? void 0 : _c.equals) !== null && _d !== void 0 ? _d : defaultEquals); return opts; } function wrapCompile(func) { return function addAdapter(selector, options, context) { - const opts = convertOptionFormats(options); - return func(selector, opts, context); + return func(selector, convertOptionFormats(options), context); }; } /** @@ -137394,17 +124938,13 @@ const _compileToken = wrapCompile(compileToken); function getSelectorFunc(searchFunc) { return function select(query, elements, options) { const opts = convertOptionFormats(options); - if (typeof query !== "function") { - query = compileUnsafe(query, opts, elements); - } + if (typeof query !== "function") query = compileUnsafe(query, opts, elements); const filteredElements = prepareContext(elements, opts.adapter, query.shouldTestNextSiblings); return searchFunc(query, filteredElements, opts); }; } function prepareContext(elems, adapter, shouldTestNextSiblings = false) { - if (shouldTestNextSiblings) { - elems = appendNextSiblings(elems, adapter); - } + if (shouldTestNextSiblings) elems = appendNextSiblings(elems, adapter); return Array.isArray(elems) ? adapter.removeSubsets(elems) : adapter.getChildren(elems); } function appendNextSiblings(elem, adapter) { @@ -137452,7 +124992,6 @@ function is$2(elem, query, options) { const opts = convertOptionFormats(options); return (typeof query === "function" ? query : compile$1(query, opts))(elem); } - //#endregion //#region ../node_modules/cheerio-select/lib/esm/positionals.js const filterNames = new Set([ @@ -137468,9 +125007,7 @@ const filterNames = new Set([ function isFilter(s) { if (s.type !== "pseudo") return false; if (filterNames.has(s.name)) return true; - if (s.name === "not" && Array.isArray(s.data)) { - return s.data.some((s) => s.some(isFilter)); - } + if (s.name === "not" && Array.isArray(s.data)) return s.data.some((s) => s.some(isFilter)); return false; } function getLimit(filter, data, partLimit) { @@ -137487,7 +125024,6 @@ function getLimit(filter, data, partLimit) { case "not": return Infinity; } } - //#endregion //#region ../node_modules/cheerio-select/lib/esm/helpers.js function getDocumentRoot(node) { @@ -137497,16 +125033,10 @@ function getDocumentRoot(node) { function groupSelectors(selectors) { const filteredSelectors = []; const plainSelectors = []; - for (const selector of selectors) { - if (selector.some(isFilter)) { - filteredSelectors.push(selector); - } else { - plainSelectors.push(selector); - } - } + for (const selector of selectors) if (selector.some(isFilter)) filteredSelectors.push(selector); + else plainSelectors.push(selector); return [plainSelectors, filteredSelectors]; } - //#endregion //#region ../node_modules/cheerio-select/lib/esm/index.js const UNIVERSAL_SELECTOR = { @@ -137561,28 +125091,17 @@ function filterParsed(selector, elements, options) { let found; if (plainSelectors.length) { const filtered = filterElements(elements, plainSelectors, options); - if (filteredSelectors.length === 0) { - return filtered; - } - if (filtered.length) { - found = new Set(filtered); - } + if (filteredSelectors.length === 0) return filtered; + if (filtered.length) found = new Set(filtered); } for (let i = 0; i < filteredSelectors.length && (found === null || found === void 0 ? void 0 : found.size) !== elements.length; i++) { const filteredSelector = filteredSelectors[i]; - const missing = found ? elements.filter((e) => isTag(e) && !found.has(e)) : elements; - if (missing.length === 0) break; + if ((found ? elements.filter((e) => isTag(e) && !found.has(e)) : elements).length === 0) break; const filtered = filterBySelector(filteredSelector, elements, options); - if (filtered.length) { - if (!found) { - if (i === filteredSelectors.length - 1) { - return filtered; - } - found = new Set(filtered); - } else { - filtered.forEach((el) => found.add(el)); - } - } + if (filtered.length) if (!found) { + if (i === filteredSelectors.length - 1) return filtered; + found = new Set(filtered); + } else filtered.forEach((el) => found.add(el)); } return typeof found !== "undefined" ? found.size === elements.length ? elements : elements.filter((el) => found.has(el)) : []; } @@ -137601,20 +125120,12 @@ function filterBySelector(selector, elements, options) { return findFilterElements(elements, selector, options, false, elements.length); } function select(selector, root, options = {}, limit = Infinity) { - if (typeof selector === "function") { - return find$2(root, selector); - } + if (typeof selector === "function") return find$2(root, selector); const [plain, filtered] = groupSelectors((0, import_commonjs.parse)(selector)); const results = filtered.map((sel) => findFilterElements(root, sel, options, true, limit)); - if (plain.length) { - results.push(findElements(root, plain, options, limit)); - } - if (results.length === 0) { - return []; - } - if (results.length === 1) { - return results[0]; - } + if (plain.length) results.push(findElements(root, plain, options, limit)); + if (results.length === 0) return []; + if (results.length === 1) return results[0]; return uniqueSort(results.reduce((a, b) => [...a, ...b])); } /** @@ -137631,20 +125142,15 @@ function findFilterElements(root, selector, options, queryForSelector, totalLimi const partLimit = selector.length - 1 === filterIndex ? totalLimit : Infinity; const limit = getLimit(filter.name, filter.data, partLimit); if (limit === 0) return []; - const elemsNoLimit = sub.length === 0 && !Array.isArray(root) ? getChildren(root).filter(isTag) : sub.length === 0 ? (Array.isArray(root) ? root : [root]).filter(isTag) : queryForSelector || sub.some(import_commonjs.isTraversal) ? findElements(root, [sub], options, limit) : filterElements(root, [sub], options); - const elems = elemsNoLimit.slice(0, limit); + const elems = (sub.length === 0 && !Array.isArray(root) ? getChildren(root).filter(isTag) : sub.length === 0 ? (Array.isArray(root) ? root : [root]).filter(isTag) : queryForSelector || sub.some(import_commonjs.isTraversal) ? findElements(root, [sub], options, limit) : filterElements(root, [sub], options)).slice(0, limit); let result = filterByPosition(filter.name, elems, filter.data, options); - if (result.length === 0 || selector.length === filterIndex + 1) { - return result; - } + if (result.length === 0 || selector.length === filterIndex + 1) return result; const remainingSelector = selector.slice(filterIndex + 1); const remainingHasTraversal = remainingSelector.some(import_commonjs.isTraversal); if (remainingHasTraversal) { if ((0, import_commonjs.isTraversal)(remainingSelector[0])) { const { type } = remainingSelector[0]; - if (type === import_commonjs.SelectorType.Sibling || type === import_commonjs.SelectorType.Adjacent) { - result = prepareContext(result, esm_exports, true); - } + if (type === import_commonjs.SelectorType.Sibling || type === import_commonjs.SelectorType.Adjacent) result = prepareContext(result, esm_exports$1, true); remainingSelector.unshift(UNIVERSAL_SELECTOR); } options = { @@ -137652,21 +125158,17 @@ function findFilterElements(root, selector, options, queryForSelector, totalLimi relativeSelector: false, rootFunc: (el) => result.includes(el) }; - } else if (options.rootFunc && options.rootFunc !== import_boolbase.trueFunc) { - options = { - ...options, - rootFunc: import_boolbase.trueFunc - }; - } + } else if (options.rootFunc && options.rootFunc !== import_boolbase.trueFunc) options = { + ...options, + rootFunc: import_boolbase.trueFunc + }; return remainingSelector.some(isFilter) ? findFilterElements(result, remainingSelector, options, false, totalLimit) : remainingHasTraversal ? findElements(result, [remainingSelector], options, totalLimit) : filterElements(result, [remainingSelector], options); } function findElements(root, sel, options, limit) { - const query = _compileToken(sel, options, root); - return find$2(root, query, limit); + return find$2(root, _compileToken(sel, options, root), limit); } function find$2(root, query, limit = Infinity) { - const elems = prepareContext(root, esm_exports, query.shouldTestNextSiblings); - return find$3((node) => isTag(node) && query(node), elems, true, limit); + return find$3((node) => isTag(node) && query(node), prepareContext(root, esm_exports$1, query.shouldTestNextSiblings), true, limit); } function filterElements(elements, sel, options) { const els = (Array.isArray(elements) ? elements : [elements]).filter(isTag); @@ -137674,7 +125176,6 @@ function filterElements(elements, sel, options) { const query = _compileToken(sel, options); return query === import_boolbase.trueFunc ? els : els.filter(query); } - //#endregion //#region ../node_modules/cheerio/dist/esm/api/traversing.js /** @@ -137736,9 +125237,7 @@ const reContextSelector = /^\s*(?:[+~]|:scope\b)/; * @see {@link https://api.jquery.com/find/} */ function find$1(selectorOrHaystack) { - if (!selectorOrHaystack) { - return this._make([]); - } + if (!selectorOrHaystack) return this._make([]); if (typeof selectorOrHaystack !== "string") { const haystack = isCheerio(selectorOrHaystack) ? selectorOrHaystack.toArray() : [selectorOrHaystack]; const context = this.toArray(); @@ -137784,9 +125283,7 @@ function _getMatcher(matchMap) { return function(selector) { var _a; let matched = matchMap(fn, this); - if (selector) { - matched = filterArray(matched, selector, this.options.xmlMode, (_a = this._root) === null || _a === void 0 ? void 0 : _a[0]); - } + if (selector) matched = filterArray(matched, selector, this.options.xmlMode, (_a = this._root) === null || _a === void 0 ? void 0 : _a[0]); return this._make(this.length > 1 && matched.length > 1 ? postFns.reduce((elems, fn) => fn(elems), matched) : matched); }; }; @@ -137805,9 +125302,7 @@ const _singleMatcher = _getMatcher((fn, elems) => { const ret = []; for (let i = 0; i < elems.length; i++) { const value = fn(elems[i]); - if (value !== null) { - ret.push(value); - } + if (value !== null) ret.push(value); } return ret; }); @@ -137931,23 +125426,17 @@ const parentsUntil = _matchUntil(({ parent }) => parent && !isDocument(parent) ? function closest(selector) { var _a; const set = []; - if (!selector) { - return this._make(set); - } + if (!selector) return this._make(set); const selectOpts = { xmlMode: this.options.xmlMode, root: (_a = this._root) === null || _a === void 0 ? void 0 : _a[0] }; const selectFn = typeof selector === "string" ? (elem) => is$1(elem, selector, selectOpts) : getFilterFn(selector); domEach(this, (elem) => { - if (elem && !isDocument(elem) && !isTag(elem)) { - elem = elem.parent; - } + if (elem && !isDocument(elem) && !isTag(elem)) elem = elem.parent; while (elem && isTag(elem)) { if (selectFn(elem, 0)) { - if (!set.includes(elem)) { - set.push(elem); - } + if (!set.includes(elem)) set.push(elem); break; } elem = elem.parent; @@ -138198,9 +125687,7 @@ function map$1(fn) { for (let i = 0; i < this.length; i++) { const el = this[i]; const val = fn.call(el, i, el); - if (val != null) { - elems = elems.concat(val); - } + if (val != null) elems = elems.concat(val); } return this._make(elems); } @@ -138211,12 +125698,8 @@ function map$1(fn) { * @returns A function that determines if a filter has been matched. */ function getFilterFn(match) { - if (typeof match === "function") { - return (el, i) => match.call(el, i, el); - } - if (isCheerio(match)) { - return (el) => Array.prototype.includes.call(match, el); - } + if (typeof match === "function") return (el, i) => match.call(el, i, el); + if (isCheerio(match)) return (el) => Array.prototype.includes.call(match, el); return function(el) { return match === el; }; @@ -138378,9 +125861,7 @@ function eq$1(i) { return this._make((_a = this[i]) !== null && _a !== void 0 ? _a : []); } function get$1(i) { - if (i == null) { - return this.toArray(); - } + if (i == null) return this.toArray(); return this[i < 0 ? this.length + i : i]; } /** @@ -138515,7 +125996,6 @@ function add(other, context) { function addBack(selector) { return this.prevObject ? this.add(selector ? this.prevObject.filter(selector) : this.prevObject) : this; } - //#endregion //#region ../node_modules/cheerio/dist/esm/parse.js /** @@ -138535,16 +126015,10 @@ function getParse(parser) { * @returns The parsed document node. */ return function parse(content, options, isDocument$1, context) { - if (typeof Buffer !== "undefined" && Buffer.isBuffer(content)) { - content = content.toString(); - } - if (typeof content === "string") { - return parser(content, options, isDocument$1, context); - } + if (typeof Buffer !== "undefined" && Buffer.isBuffer(content)) content = content.toString(); + if (typeof content === "string") return parser(content, options, isDocument$1, context); const doc = content; - if (!Array.isArray(doc) && isDocument(doc)) { - return doc; - } + if (!Array.isArray(doc) && isDocument(doc)) return doc; const root = new Document([]); update(doc, root); return root; @@ -138559,27 +126033,19 @@ function getParse(parser) { */ function update(newChilds, parent) { const arr = Array.isArray(newChilds) ? newChilds : [newChilds]; - if (parent) { - parent.children = arr; - } else { - parent = null; - } + if (parent) parent.children = arr; + else parent = null; for (let i = 0; i < arr.length; i++) { const node = arr[i]; - if (node.parent && node.parent.children !== arr) { - removeElement(node); - } + if (node.parent && node.parent.children !== arr) removeElement(node); if (parent) { node.prev = arr[i - 1] || null; node.next = arr[i + 1] || null; - } else { - node.prev = node.next = null; - } + } else node.prev = node.next = null; node.parent = parent; } return parent; } - //#endregion //#region ../node_modules/cheerio/dist/esm/api/manipulation.js /** @@ -138620,23 +126086,15 @@ var manipulation_exports = /* @__PURE__ */ __exportAll({ * @returns The array of nodes. */ function _makeDomArray(elem, clone) { - if (elem == null) { - return []; - } - if (typeof elem === "string") { - return this._parse(elem, this.options, false, null).children.slice(0); - } + if (elem == null) return []; + if (typeof elem === "string") return this._parse(elem, this.options, false, null).children.slice(0); if ("length" in elem) { - if (elem.length === 1) { - return this._makeDomArray(elem[0], clone); - } + if (elem.length === 1) return this._makeDomArray(elem[0], clone); const result = []; for (let i = 0; i < elem.length; i++) { const el = elem[i]; if (typeof el === "object") { - if (el == null) { - continue; - } + if (el == null) continue; if (!("length" in el)) { result.push(clone ? cloneNode(el, true) : el); continue; @@ -138654,8 +126112,7 @@ function _insert(concatenator) { return domEach(this, (el, i) => { if (!hasChildren(el)) return; const domSrc = typeof elems[0] === "function" ? elems[0].call(el, i, this._render(el.children)) : elems; - const dom = this._makeDomArray(domSrc, i < lastIdx); - concatenator(dom, el.children, el); + concatenator(this._makeDomArray(domSrc, i < lastIdx), el.children, el); }); }; } @@ -138685,31 +126142,20 @@ function uniqueSplice(array, spliceIdx, spliceCount, newElems, parent) { const node = newElems[idx]; const oldParent = node.parent; if (oldParent) { - const oldSiblings = oldParent.children; - const prevIdx = oldSiblings.indexOf(node); + const prevIdx = oldParent.children.indexOf(node); if (prevIdx !== -1) { oldParent.children.splice(prevIdx, 1); - if (parent === oldParent && spliceIdx > prevIdx) { - spliceArgs[0]--; - } + if (parent === oldParent && spliceIdx > prevIdx) spliceArgs[0]--; } } node.parent = parent; - if (node.prev) { - node.prev.next = (_a = node.next) !== null && _a !== void 0 ? _a : null; - } - if (node.next) { - node.next.prev = (_b = node.prev) !== null && _b !== void 0 ? _b : null; - } + if (node.prev) node.prev.next = (_a = node.next) !== null && _a !== void 0 ? _a : null; + if (node.next) node.next.prev = (_b = node.prev) !== null && _b !== void 0 ? _b : null; node.prev = idx === 0 ? prev : newElems[idx - 1]; node.next = idx === newElems.length - 1 ? next : newElems[idx + 1]; } - if (prev) { - prev.next = newElems[0]; - } - if (next) { - next.prev = newElems[newElems.length - 1]; - } + if (prev) prev.next = newElems[0]; + if (next) next.prev = newElems[newElems.length - 1]; return array.splice(...spliceArgs); } /** @@ -138734,8 +126180,7 @@ function uniqueSplice(array, spliceIdx, spliceCount, newElems, parent) { * @see {@link https://api.jquery.com/appendTo/} */ function appendTo(target) { - const appendTarget = isCheerio(target) ? target : this._make(target); - appendTarget.append(this); + (isCheerio(target) ? target : this._make(target)).append(this); return this; } /** @@ -138761,8 +126206,7 @@ function appendTo(target) { * @see {@link https://api.jquery.com/prependTo/} */ function prependTo(target) { - const prependTarget = isCheerio(target) ? target : this._make(target); - prependTarget.prepend(this); + (isCheerio(target) ? target : this._make(target)).prepend(this); return this; } /** @@ -138825,9 +126269,7 @@ function _wrap(insert) { if (isTag(child)) { elInsertLocation = child; j = 0; - } else { - j++; - } + } else j++; } insert(el, elInsertLocation, [wrapperDom]); } @@ -139034,20 +126476,14 @@ function wrapAll(wrapper) { if (el) { const wrap = this._make(typeof wrapper === "function" ? wrapper.call(el, 0, el) : wrapper).insertBefore(el); let elInsertLocation; - for (let i = 0; i < wrap.length; i++) { - if (wrap[i].type === Tag) { - elInsertLocation = wrap[i]; - } - } + for (let i = 0; i < wrap.length; i++) if (wrap[i].type === Tag) elInsertLocation = wrap[i]; let j = 0; while (elInsertLocation && j < elInsertLocation.children.length) { const child = elInsertLocation.children[j]; if (child.type === Tag) { elInsertLocation = child; j = 0; - } else { - j++; - } + } else j++; } if (elInsertLocation) this._make(elInsertLocation).append(this); } @@ -139078,9 +126514,7 @@ function wrapAll(wrapper) { function after$1(...elems) { const lastIdx = this.length - 1; return domEach(this, (el, i) => { - if (!hasChildren(el) || !el.parent) { - return; - } + if (!hasChildren(el) || !el.parent) return; const siblings = el.parent.children; const index = siblings.indexOf(el); /* istanbul ignore next */ @@ -139112,17 +126546,13 @@ function after$1(...elems) { * @see {@link https://api.jquery.com/insertAfter/} */ function insertAfter(target) { - if (typeof target === "string") { - target = this._make(target); - } + if (typeof target === "string") target = this._make(target); this.remove(); const clones = []; for (const el of this._makeDomArray(target)) { const clonedSelf = this.clone().toArray(); const { parent } = el; - if (!parent) { - continue; - } + if (!parent) continue; const siblings = parent.children; const index = siblings.indexOf(el); /* istanbul ignore next */ @@ -139157,16 +126587,13 @@ function insertAfter(target) { function before$1(...elems) { const lastIdx = this.length - 1; return domEach(this, (el, i) => { - if (!hasChildren(el) || !el.parent) { - return; - } + if (!hasChildren(el) || !el.parent) return; const siblings = el.parent.children; const index = siblings.indexOf(el); /* istanbul ignore next */ if (index === -1) return; const domSrc = typeof elems[0] === "function" ? elems[0].call(el, i, this._render(el.children)) : elems; - const dom = this._makeDomArray(domSrc, i < lastIdx); - uniqueSplice(siblings, index, 0, dom, el.parent); + uniqueSplice(siblings, index, 0, this._makeDomArray(domSrc, i < lastIdx), el.parent); }); } /** @@ -139197,9 +126624,7 @@ function insertBefore(target) { domEach(targetArr, (el) => { const clonedSelf = this.clone().toArray(); const { parent } = el; - if (!parent) { - return; - } + if (!parent) return; const siblings = parent.children; const index = siblings.indexOf(el); /* istanbul ignore next */ @@ -139230,8 +126655,7 @@ function insertBefore(target) { * @see {@link https://api.jquery.com/remove/} */ function remove(selector) { - const elems = selector ? this.filter(selector) : this; - domEach(elems, (el) => { + domEach(selector ? this.filter(selector) : this, (el) => { removeElement(el); el.prev = el.next = el.parent = null; }); @@ -139261,18 +126685,13 @@ function remove(selector) { function replaceWith(content) { return domEach(this, (el, i) => { const { parent } = el; - if (!parent) { - return; - } + if (!parent) return; const siblings = parent.children; const cont = typeof content === "function" ? content.call(el, i, el) : content; const dom = this._makeDomArray(cont); update(dom, null); - const index = siblings.indexOf(el); - uniqueSplice(siblings, index, 1, dom, parent); - if (!dom.includes(el)) { - el.parent = el.prev = el.next = null; - } + uniqueSplice(siblings, siblings.indexOf(el), 1, dom, parent); + if (!dom.includes(el)) el.parent = el.prev = el.next = null; }); } /** @@ -139294,25 +126713,20 @@ function replaceWith(content) { function empty() { return domEach(this, (el) => { if (!hasChildren(el)) return; - for (const child of el.children) { - child.next = child.prev = child.parent = null; - } + for (const child of el.children) child.next = child.prev = child.parent = null; el.children.length = 0; }); } function html(str) { - if (str === undefined) { + if (str === void 0) { const el = this[0]; if (!el || !hasChildren(el)) return null; return this._render(el.children); } return domEach(this, (el) => { if (!hasChildren(el)) return; - for (const child of el.children) { - child.next = child.prev = child.parent = null; - } - const content = isCheerio(str) ? str.toArray() : this._parse(`${str}`, this.options, false, el).children; - update(content, el); + for (const child of el.children) child.next = child.prev = child.parent = null; + update(isCheerio(str) ? str.toArray() : this._parse(`${str}`, this.options, false, el).children, el); }); } /** @@ -139325,19 +126739,12 @@ function toString$2() { return this._render(this); } function text(str) { - if (str === undefined) { - return text$1(this); - } - if (typeof str === "function") { - return domEach(this, (el, i) => this._make(el).text(str.call(el, i, text$1([el])))); - } + if (str === void 0) return text$1(this); + if (typeof str === "function") return domEach(this, (el, i) => this._make(el).text(str.call(el, i, text$1([el])))); return domEach(this, (el) => { if (!hasChildren(el)) return; - for (const child of el.children) { - child.next = child.prev = child.parent = null; - } - const textNode = new Text(`${str}`); - update(textNode, el); + for (const child of el.children) child.next = child.prev = child.parent = null; + update(new Text(`${str}`), el); }); } /** @@ -139356,12 +126763,9 @@ function text(str) { function clone$1() { const clone = Array.prototype.map.call(this.get(), (el) => cloneNode(el, true)); const root = new Document(clone); - for (const node of clone) { - node.parent = root; - } + for (const node of clone) node.parent = root; return this._make(clone); } - //#endregion //#region ../node_modules/cheerio/dist/esm/api/css.js var css_exports = /* @__PURE__ */ __exportAll({ css: () => css }); @@ -139375,16 +126779,10 @@ var css_exports = /* @__PURE__ */ __exportAll({ css: () => css }); * @see {@link https://api.jquery.com/css/} */ function css(prop, val) { - if (prop != null && val != null || typeof prop === "object" && !Array.isArray(prop)) { - return domEach(this, (el, i) => { - if (isTag(el)) { - setCss(el, prop, val, i); - } - }); - } - if (this.length === 0) { - return undefined; - } + if (prop != null && val != null || typeof prop === "object" && !Array.isArray(prop)) return domEach(this, (el, i) => { + if (isTag(el)) setCss(el, prop, val, i); + }); + if (this.length === 0) return; return getCss(this[0], prop); } /** @@ -139400,11 +126798,8 @@ function setCss(el, prop, value, idx) { if (typeof prop === "string") { const styles = getCss(el); const val = typeof value === "function" ? value.call(el, idx, styles[prop]) : value; - if (val === "") { - delete styles[prop]; - } else if (val != null) { - styles[prop] = val; - } + if (val === "") delete styles[prop]; + else if (val != null) styles[prop] = val; el.attribs["style"] = stringify$3(styles); } else if (typeof prop === "object") { const keys = Object.keys(prop); @@ -139417,16 +126812,10 @@ function setCss(el, prop, value, idx) { function getCss(el, prop) { if (!el || !isTag(el)) return; const styles = parse$2(el.attribs["style"]); - if (typeof prop === "string") { - return styles[prop]; - } + if (typeof prop === "string") return styles[prop]; if (Array.isArray(prop)) { const newStyles = {}; - for (const item of prop) { - if (styles[item] != null) { - newStyles[item] = styles[item]; - } - } + for (const item of prop) if (styles[item] != null) newStyles[item] = styles[item]; return newStyles; } return styles; @@ -139459,9 +126848,7 @@ function parse$2(styles) { const n = str.indexOf(":"); if (n < 1 || n === str.length - 1) { const trimmed = str.trimEnd(); - if (trimmed.length > 0 && key !== undefined) { - obj[key] += `;${trimmed}`; - } + if (trimmed.length > 0 && key !== void 0) obj[key] += `;${trimmed}`; } else { key = str.slice(0, n).trim(); obj[key] = str.slice(n + 1).trim(); @@ -139469,7 +126856,6 @@ function parse$2(styles) { } return obj; } - //#endregion //#region ../node_modules/cheerio/dist/esm/api/forms.js var forms_exports = /* @__PURE__ */ __exportAll({ @@ -139494,9 +126880,7 @@ const rCRLF = /\r?\n/g; * @see {@link https://api.jquery.com/serialize/} */ function serialize$1() { - const arr = this.serializeArray(); - const retArr = arr.map((data) => `${encodeURIComponent(data.name)}=${encodeURIComponent(data.value)}`); - return retArr.join("&").replace(r20, "+"); + return this.serializeArray().map((data) => `${encodeURIComponent(data.name)}=${encodeURIComponent(data.value)}`).join("&").replace(r20, "+"); } /** * Encode a set of form elements as an array of names and values. @@ -139515,39 +126899,32 @@ function serialize$1() { function serializeArray() { return this.map((_, elem) => { const $elem = this._make(elem); - if (isTag(elem) && elem.name === "form") { - return $elem.find(submittableSelector).toArray(); - } + if (isTag(elem) && elem.name === "form") return $elem.find(submittableSelector).toArray(); return $elem.filter(submittableSelector).toArray(); - }).filter("[name!=\"\"]:enabled" + ":not(:submit, :button, :image, :reset, :file)" + ":matches([checked], :not(:checkbox, :radio))").map((_, elem) => { + }).filter("[name!=\"\"]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))").map((_, elem) => { var _a; const $elem = this._make(elem); const name = $elem.attr("name"); const value = (_a = $elem.val()) !== null && _a !== void 0 ? _a : ""; - if (Array.isArray(value)) { - return value.map((val) => ({ - name, - value: val.replace(rCRLF, "\r\n") - })); - } + if (Array.isArray(value)) return value.map((val) => ({ + name, + value: val.replace(rCRLF, "\r\n") + })); return { name, value: value.replace(rCRLF, "\r\n") }; }).toArray(); } - //#endregion //#region ../node_modules/cheerio/dist/esm/api/extract.js var extract_exports = /* @__PURE__ */ __exportAll({ extract: () => extract }); function getExtractDescr(descr) { var _a; - if (typeof descr === "string") { - return { - selector: descr, - value: "textContent" - }; - } + if (typeof descr === "string") return { + selector: descr, + value: "textContent" + }; return { selector: descr.selector, value: (_a = descr.value) !== null && _a !== void 0 ? _a : "textContent" @@ -139568,16 +126945,14 @@ function extract(map) { const isArray = Array.isArray(descr); const { selector, value } = getExtractDescr(isArray ? descr[0] : descr); const fn = typeof value === "function" ? value : typeof value === "string" ? (el) => this._make(el).prop(value) : (el) => this._make(el).extract(value); - if (isArray) { - ret[key] = this._findBySelector(selector, Number.POSITIVE_INFINITY).map((_, el) => fn(el, key, ret)).get(); - } else { + if (isArray) ret[key] = this._findBySelector(selector, Number.POSITIVE_INFINITY).map((_, el) => fn(el, key, ret)).get(); + else { const $ = this._findBySelector(selector, 1); - ret[key] = $.length > 0 ? fn($[0], key, ret) : undefined; + ret[key] = $.length > 0 ? fn($[0], key, ret) : void 0; } } return ret; } - //#endregion //#region ../node_modules/cheerio/dist/esm/cheerio.js /** @@ -139614,9 +126989,7 @@ var Cheerio = class { this.options = options; this._root = root; if (elements) { - for (let idx = 0; idx < elements.length; idx++) { - this[idx] = elements[idx]; - } + for (let idx = 0; idx < elements.length; idx++) this[idx] = elements[idx]; this.length = elements.length; } } @@ -139626,7 +126999,6 @@ Cheerio.prototype.cheerio = "[cheerio object]"; Cheerio.prototype.splice = Array.prototype.splice; Cheerio.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator]; Object.assign(Cheerio.prototype, attributes_exports, traversing_exports, manipulation_exports, css_exports, forms_exports, extract_exports); - //#endregion //#region ../node_modules/cheerio/dist/esm/load.js function getLoad(parse, render) { @@ -139645,9 +127017,7 @@ function getLoad(parse, render) { * @see {@link https://cheerio.js.org/docs/basics/loading#load} for additional usage information. */ return function load(content, options, isDocument = true) { - if (content == null) { - throw new Error("cheerio.load() expects a string"); - } + if (content == null) throw new Error("cheerio.load() expects a string"); const internalOpts = flattenOptions(options); const initialRoot = parse(content, internalOpts, isDocument, null); /** @@ -139673,17 +127043,11 @@ function getLoad(parse, render) { const r = typeof root === "string" ? [parse(root, options, false, null)] : "length" in root ? root : [root]; const rootInstance = isCheerio(r) ? r : new LoadedCheerio(r, null, options); rootInstance._root = rootInstance; - if (!selector) { - return new LoadedCheerio(undefined, rootInstance, options); - } - const elements = typeof selector === "string" && isHtml(selector) ? parse(selector, options, false, null).children : isNode(selector) ? [selector] : Array.isArray(selector) ? selector : undefined; + if (!selector) return new LoadedCheerio(void 0, rootInstance, options); + const elements = typeof selector === "string" && isHtml(selector) ? parse(selector, options, false, null).children : isNode(selector) ? [selector] : Array.isArray(selector) ? selector : void 0; const instance = new LoadedCheerio(elements, rootInstance, options); - if (elements) { - return instance; - } - if (typeof selector !== "string") { - throw new TypeError("Unexpected type of selector"); - } + if (elements) return instance; + if (typeof selector !== "string") throw new TypeError("Unexpected type of selector"); let search = selector; const searchContext = context ? typeof context === "string" ? isHtml(context) ? new LoadedCheerio([parse(context, options, false, null)], rootInstance, options) : (search = `${context} ${search}`, rootInstance) : isCheerio(context) ? context : new LoadedCheerio(Array.isArray(context) ? context : [context], rootInstance, options) : rootInstance; if (!searchContext) return instance; @@ -139702,7 +127066,6 @@ function getLoad(parse, render) { function isNode(obj) { return !!obj.name || obj.type === Root || obj.type === Text$1 || obj.type === Comment$1; } - //#endregion //#region ../node_modules/parse5/dist/common/unicode.js const UNDEFINED_CODE_POINTS = new Set([ @@ -139794,7 +127157,6 @@ function isControlCodePoint(cp) { function isUndefinedCodePoint(cp) { return cp >= 64976 && cp <= 65007 || UNDEFINED_CODE_POINTS.has(cp); } - //#endregion //#region ../node_modules/parse5/dist/common/error-codes.js var ERR; @@ -139860,10 +127222,9 @@ var ERR; ERR["nestedNoscriptInHead"] = "nested-noscript-in-head"; ERR["eofInElementThatCanContainOnlyText"] = "eof-in-element-that-can-contain-only-text"; })(ERR || (ERR = {})); - //#endregion //#region ../node_modules/parse5/dist/tokenizer/preprocessor.js -const DEFAULT_BUFFER_WATERLINE = 1 << 16; +const DEFAULT_BUFFER_WATERLINE = 65536; var Preprocessor = class { constructor(handler) { this.handler = handler; @@ -139941,11 +127302,8 @@ var Preprocessor = class { } } write(chunk, isLastChunk) { - if (this.html.length > 0) { - this.html += chunk; - } else { - this.html = chunk; - } + if (this.html.length > 0) this.html += chunk; + else this.html = chunk; this.endOfChunkHit = false; this.lastChunkWritten = isLastChunk; } @@ -139958,15 +127316,8 @@ var Preprocessor = class { this.endOfChunkHit = !this.lastChunkWritten; return false; } - if (caseSensitive) { - return this.html.startsWith(pattern, this.pos); - } - for (let i = 0; i < pattern.length; i++) { - const cp = this.html.charCodeAt(this.pos + i) | 32; - if (cp !== pattern.charCodeAt(i)) { - return false; - } - } + if (caseSensitive) return this.html.startsWith(pattern, this.pos); + for (let i = 0; i < pattern.length; i++) if ((this.html.charCodeAt(this.pos + i) | 32) !== pattern.charCodeAt(i)) return false; return true; } peek(offset) { @@ -140005,21 +127356,13 @@ var Preprocessor = class { } } this.skipNextNewLine = false; - if (isSurrogate(cp)) { - cp = this._processSurrogate(cp); - } - const isCommonValidRange = this.handler.onParseError === null || cp > 31 && cp < 127 || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.CARRIAGE_RETURN || cp > 159 && cp < 64976; - if (!isCommonValidRange) { - this._checkForProblematicCharacters(cp); - } + if (isSurrogate(cp)) cp = this._processSurrogate(cp); + if (!(this.handler.onParseError === null || cp > 31 && cp < 127 || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.CARRIAGE_RETURN || cp > 159 && cp < 64976)) this._checkForProblematicCharacters(cp); return cp; } _checkForProblematicCharacters(cp) { - if (isControlCodePoint(cp)) { - this._err(ERR.controlCharacterInInputStream); - } else if (isUndefinedCodePoint(cp)) { - this._err(ERR.noncharacterInInputStream); - } + if (isControlCodePoint(cp)) this._err(ERR.controlCharacterInInputStream); + else if (isUndefinedCodePoint(cp)) this._err(ERR.noncharacterInInputStream); } retreat(count) { this.pos -= count; @@ -140030,7 +127373,6 @@ var Preprocessor = class { this.isEol = false; } }; - //#endregion //#region ../node_modules/parse5/dist/common/token.js var TokenType; @@ -140046,22 +127388,15 @@ var TokenType; TokenType[TokenType["HIBERNATION"] = 8] = "HIBERNATION"; })(TokenType || (TokenType = {})); function getTokenAttr(token, attrName) { - for (let i = token.attrs.length - 1; i >= 0; i--) { - if (token.attrs[i].name === attrName) { - return token.attrs[i].value; - } - } + for (let i = token.attrs.length - 1; i >= 0; i--) if (token.attrs[i].name === attrName) return token.attrs[i].value; return null; } - //#endregion //#region ../node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-html.js const htmlDecodeTree = /* @__PURE__ */ new Uint16Array(/* @__PURE__ */ "ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻\"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻\xA0ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌".split("").map((c) => c.charCodeAt(0))); - //#endregion //#region ../node_modules/parse5/node_modules/entities/dist/esm/generated/decode-data-xml.js const xmlDecodeTree = /* @__PURE__ */ new Uint16Array(/* @__PURE__ */ "Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map((c) => c.charCodeAt(0))); - //#endregion //#region ../node_modules/parse5/node_modules/entities/dist/esm/decode-codepoint.js var _a; @@ -140115,9 +127450,7 @@ const fromCodePoint = (_a = String.fromCodePoint) !== null && _a !== void 0 ? _a */ function replaceCodePoint(codePoint) { var _a; - if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) { - return 65533; - } + if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) return 65533; return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint; } /** @@ -140130,7 +127463,6 @@ function replaceCodePoint(codePoint) { function decodeCodePoint(codePoint) { return fromCodePoint(replaceCodePoint(codePoint)); } - //#endregion //#region ../node_modules/parse5/node_modules/entities/dist/esm/decode.js var CharCodes; @@ -140239,7 +127571,7 @@ var EntityDecoder = class { */ write(input, offset) { switch (this.state) { - case EntityDecoderState.EntityStart: { + case EntityDecoderState.EntityStart: if (input.charCodeAt(offset) === CharCodes.NUM) { this.state = EntityDecoderState.NumericStart; this.consumed += 1; @@ -140247,19 +127579,10 @@ var EntityDecoder = class { } this.state = EntityDecoderState.NamedEntity; return this.stateNamedEntity(input, offset); - } - case EntityDecoderState.NumericStart: { - return this.stateNumericStart(input, offset); - } - case EntityDecoderState.NumericDecimal: { - return this.stateNumericDecimal(input, offset); - } - case EntityDecoderState.NumericHex: { - return this.stateNumericHex(input, offset); - } - case EntityDecoderState.NamedEntity: { - return this.stateNamedEntity(input, offset); - } + case EntityDecoderState.NumericStart: return this.stateNumericStart(input, offset); + case EntityDecoderState.NumericDecimal: return this.stateNumericDecimal(input, offset); + case EntityDecoderState.NumericHex: return this.stateNumericHex(input, offset); + case EntityDecoderState.NamedEntity: return this.stateNamedEntity(input, offset); } } /** @@ -140272,9 +127595,7 @@ var EntityDecoder = class { * @returns The number of characters that were consumed, or -1 if the entity is incomplete. */ stateNumericStart(input, offset) { - if (offset >= input.length) { - return -1; - } + if (offset >= input.length) return -1; if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) { this.state = EntityDecoderState.NumericHex; this.consumed += 1; @@ -140303,9 +127624,8 @@ var EntityDecoder = class { const startIndex = offset; while (offset < input.length) { const char = input.charCodeAt(offset); - if (isNumber$1(char) || isHexadecimalCharacter(char)) { - offset += 1; - } else { + if (isNumber$1(char) || isHexadecimalCharacter(char)) offset += 1; + else { this.addToNumericResult(input, startIndex, offset, 16); return this.emitNumericEntity(char, 3); } @@ -140326,9 +127646,8 @@ var EntityDecoder = class { const startIndex = offset; while (offset < input.length) { const char = input.charCodeAt(offset); - if (isNumber$1(char)) { - offset += 1; - } else { + if (isNumber$1(char)) offset += 1; + else { this.addToNumericResult(input, startIndex, offset, 10); return this.emitNumericEntity(char, 2); } @@ -140352,19 +127671,14 @@ var EntityDecoder = class { emitNumericEntity(lastCp, expectedLength) { var _a; if (this.consumed <= expectedLength) { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); - return 0; - } - if (lastCp === CharCodes.SEMI) { - this.consumed += 1; - } else if (this.decodeMode === DecodingMode.Strict) { + (_a = this.errors) === null || _a === void 0 || _a.absenceOfDigitsInNumericCharacterReference(this.consumed); return 0; } + if (lastCp === CharCodes.SEMI) this.consumed += 1; + else if (this.decodeMode === DecodingMode.Strict) return 0; this.emitCodePoint(replaceCodePoint(this.result), this.consumed); if (this.errors) { - if (lastCp !== CharCodes.SEMI) { - this.errors.missingSemicolonAfterCharacterReference(); - } + if (lastCp !== CharCodes.SEMI) this.errors.missingSemicolonAfterCharacterReference(); this.errors.validateNumericCharacterReference(this.result); } return this.consumed; @@ -140385,15 +127699,11 @@ var EntityDecoder = class { for (; offset < input.length; offset++, this.excess++) { const char = input.charCodeAt(offset); this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char); - if (this.treeIndex < 0) { - return this.result === 0 || this.decodeMode === DecodingMode.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity(); - } + if (this.treeIndex < 0) return this.result === 0 || this.decodeMode === DecodingMode.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity(); current = decodeTree[this.treeIndex]; valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14; if (valueLength !== 0) { - if (char === CharCodes.SEMI) { - return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); - } + if (char === CharCodes.SEMI) return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess); if (this.decodeMode !== DecodingMode.Strict) { this.result = this.treeIndex; this.consumed += this.excess; @@ -140413,7 +127723,7 @@ var EntityDecoder = class { const { result, decodeTree } = this; const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14; this.emitNamedEntityData(result, valueLength, this.consumed); - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.missingSemicolonAfterCharacterReference(); + (_a = this.errors) === null || _a === void 0 || _a.missingSemicolonAfterCharacterReference(); return this.consumed; } /** @@ -140428,9 +127738,7 @@ var EntityDecoder = class { emitNamedEntityData(result, valueLength, consumed) { const { decodeTree } = this; this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~BinTrieFlags.VALUE_LENGTH : decodeTree[result + 1], consumed); - if (valueLength === 3) { - this.emitCodePoint(decodeTree[result + 2], consumed); - } + if (valueLength === 3) this.emitCodePoint(decodeTree[result + 2], consumed); return consumed; } /** @@ -140443,22 +127751,13 @@ var EntityDecoder = class { end() { var _a; switch (this.state) { - case EntityDecoderState.NamedEntity: { - return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0; - } - case EntityDecoderState.NumericDecimal: { - return this.emitNumericEntity(0, 2); - } - case EntityDecoderState.NumericHex: { - return this.emitNumericEntity(0, 3); - } - case EntityDecoderState.NumericStart: { - (_a = this.errors) === null || _a === void 0 ? void 0 : _a.absenceOfDigitsInNumericCharacterReference(this.consumed); + case EntityDecoderState.NamedEntity: return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0; + case EntityDecoderState.NumericDecimal: return this.emitNumericEntity(0, 2); + case EntityDecoderState.NumericHex: return this.emitNumericEntity(0, 3); + case EntityDecoderState.NumericStart: + (_a = this.errors) === null || _a === void 0 || _a.absenceOfDigitsInNumericCharacterReference(this.consumed); return 0; - } - case EntityDecoderState.EntityStart: { - return 0; - } + case EntityDecoderState.EntityStart: return 0; } } }; @@ -140503,9 +127802,7 @@ function getDecoder(decodeTree) { function determineBranch(decodeTree, current, nodeIndex, char) { const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7; const jumpOffset = current & BinTrieFlags.JUMP_TABLE; - if (branchCount === 0) { - return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1; - } + if (branchCount === 0) return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1; if (jumpOffset) { const value = char - jumpOffset; return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIndex + value] - 1; @@ -140515,13 +127812,9 @@ function determineBranch(decodeTree, current, nodeIndex, char) { while (lo <= hi) { const mid = lo + hi >>> 1; const midValue = decodeTree[mid]; - if (midValue < char) { - lo = mid + 1; - } else if (midValue > char) { - hi = mid - 1; - } else { - return decodeTree[mid + branchCount]; - } + if (midValue < char) lo = mid + 1; + else if (midValue > char) hi = mid - 1; + else return decodeTree[mid + branchCount]; } return -1; } @@ -140564,7 +127857,6 @@ function decodeHTMLStrict(htmlString) { function decodeXML(xmlString) { return xmlDecoder(xmlString, DecodingMode.Strict); } - //#endregion //#region ../node_modules/parse5/dist/common/html.js /** All valid namespaces in HTML. */ @@ -141084,9 +128376,9 @@ const SPECIAL_ELEMENTS = { $$2.FOREIGN_OBJECT, $$2.DESC ]), - [NS.XLINK]: new Set(), - [NS.XML]: new Set(), - [NS.XMLNS]: new Set() + [NS.XLINK]: /* @__PURE__ */ new Set(), + [NS.XML]: /* @__PURE__ */ new Set(), + [NS.XMLNS]: /* @__PURE__ */ new Set() }; const NUMBERED_HEADERS = new Set([ $$2.H1, @@ -141108,7 +128400,6 @@ const UNESCAPED_TEXT = new Set([ function hasUnescapedText(tn, scriptingEnabled) { return UNESCAPED_TEXT.has(tn) || scriptingEnabled && tn === TAG_NAMES.NOSCRIPT; } - //#endregion //#region ../node_modules/parse5/dist/tokenizer/index.js var State$1; @@ -141220,17 +128511,11 @@ function isScriptDataDoubleEscapeSequenceEnd(cp) { return isWhitespace(cp) || cp === CODE_POINTS.SOLIDUS || cp === CODE_POINTS.GREATER_THAN_SIGN; } function getErrorForNumericCharacterReference(code) { - if (code === CODE_POINTS.NULL) { - return ERR.nullCharacterReference; - } else if (code > 1114111) { - return ERR.characterReferenceOutsideUnicodeRange; - } else if (isSurrogate(code)) { - return ERR.surrogateCharacterReference; - } else if (isUndefinedCodePoint(code)) { - return ERR.noncharacterCharacterReference; - } else if (isControlCodePoint(code) || code === CODE_POINTS.CARRIAGE_RETURN) { - return ERR.controlCharacterReference; - } + if (code === CODE_POINTS.NULL) return ERR.nullCharacterReference; + else if (code > 1114111) return ERR.characterReferenceOutsideUnicodeRange; + else if (isSurrogate(code)) return ERR.surrogateCharacterReference; + else if (isUndefinedCodePoint(code)) return ERR.noncharacterCharacterReference; + else if (isControlCodePoint(code) || code === CODE_POINTS.CARRIAGE_RETURN) return ERR.controlCharacterReference; return null; } var Tokenizer = class { @@ -141275,16 +128560,14 @@ var Tokenizer = class { const error = getErrorForNumericCharacterReference(code); if (error) this._err(error, 1); } - } : undefined); + } : void 0); } _err(code, cpOffset = 0) { var _a, _b; - (_b = (_a = this.handler).onParseError) === null || _b === void 0 ? void 0 : _b.call(_a, this.preprocessor.getError(code, cpOffset)); + (_b = (_a = this.handler).onParseError) === null || _b === void 0 || _b.call(_a, this.preprocessor.getError(code, cpOffset)); } getCurrentLocation(offset) { - if (!this.options.sourceCodeLocationInfo) { - return null; - } + if (!this.options.sourceCodeLocationInfo) return null; return { startLine: this.preprocessor.line, startCol: this.preprocessor.col - offset, @@ -141300,9 +128583,7 @@ var Tokenizer = class { while (this.active && !this.paused) { this.consumedAfterSnapshot = 0; const cp = this._consume(); - if (!this._ensureHibernation()) { - this._callState(cp); - } + if (!this._ensureHibernation()) this._callState(cp); } this.inLoop = false; } @@ -141310,23 +128591,17 @@ var Tokenizer = class { this.paused = true; } resume(writeCallback) { - if (!this.paused) { - throw new Error("Parser was already resumed"); - } + if (!this.paused) throw new Error("Parser was already resumed"); this.paused = false; if (this.inLoop) return; this._runParsingLoop(); - if (!this.paused) { - writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback(); - } + if (!this.paused) writeCallback === null || writeCallback === void 0 || writeCallback(); } write(chunk, isLastChunk, writeCallback) { this.active = true; this.preprocessor.write(chunk, isLastChunk); this._runParsingLoop(); - if (!this.paused) { - writeCallback === null || writeCallback === void 0 ? void 0 : writeCallback(); - } + if (!this.paused) writeCallback === null || writeCallback === void 0 || writeCallback(); } insertHtmlAtCurrentPos(chunk) { this.active = true; @@ -141348,9 +128623,7 @@ var Tokenizer = class { } _advanceBy(count) { this.consumedAfterSnapshot += count; - for (let i = 0; i < count; i++) { - this.preprocessor.advance(); - } + for (let i = 0; i < count; i++) this.preprocessor.advance(); } _consumeSequenceIfMatch(pattern, caseSensitive) { if (this.preprocessor.startsWith(pattern, caseSensitive)) { @@ -141423,9 +128696,7 @@ var Tokenizer = class { attrLocations[this.currentAttr.name] = this.currentLocation; this._leaveAttrValue(); } - } else { - this._err(ERR.duplicateAttribute); - } + } else this._err(ERR.duplicateAttribute); } _leaveAttrValue() { if (this.currentLocation) { @@ -141452,12 +128723,8 @@ var Tokenizer = class { this.lastStartTagName = ct.tagName; this.handler.onStartTag(ct); } else { - if (ct.attrs.length > 0) { - this._err(ERR.endTagWithAttributes); - } - if (ct.selfClosing) { - this._err(ERR.endTagWithTrailingSolidus); - } + if (ct.attrs.length > 0) this._err(ERR.endTagWithAttributes); + if (ct.selfClosing) this._err(ERR.endTagWithTrailingSolidus); this.handler.onEndTag(ct); } this.preprocessor.dropParsedChunk(); @@ -141480,18 +128747,15 @@ var Tokenizer = class { this.currentCharacterToken.location.endOffset = nextLocation.startOffset; } switch (this.currentCharacterToken.type) { - case TokenType.CHARACTER: { + case TokenType.CHARACTER: this.handler.onCharacter(this.currentCharacterToken); break; - } - case TokenType.NULL_CHARACTER: { + case TokenType.NULL_CHARACTER: this.handler.onNullCharacter(this.currentCharacterToken); break; - } - case TokenType.WHITESPACE_CHARACTER: { + case TokenType.WHITESPACE_CHARACTER: this.handler.onWhitespaceCharacter(this.currentCharacterToken); break; - } } this.currentCharacterToken = null; } @@ -141511,15 +128775,13 @@ var Tokenizer = class { this.active = false; } _appendCharToCurrentCharacterToken(type, ch) { - if (this.currentCharacterToken) { - if (this.currentCharacterToken.type === type) { - this.currentCharacterToken.chars += ch; - return; - } else { - this.currentLocation = this.getCurrentLocation(0); - this._emitCurrentCharacterToken(this.currentLocation); - this.preprocessor.dropParsedChunk(); - } + if (this.currentCharacterToken) if (this.currentCharacterToken.type === type) { + this.currentCharacterToken.chars += ch; + return; + } else { + this.currentLocation = this.getCurrentLocation(0); + this._emitCurrentCharacterToken(this.currentLocation); + this.preprocessor.dropParsedChunk(); } this._createCharacterToken(type, ch); } @@ -141540,413 +128802,309 @@ var Tokenizer = class { return this.returnState === State$1.ATTRIBUTE_VALUE_DOUBLE_QUOTED || this.returnState === State$1.ATTRIBUTE_VALUE_SINGLE_QUOTED || this.returnState === State$1.ATTRIBUTE_VALUE_UNQUOTED; } _flushCodePointConsumedAsCharacterReference(cp) { - if (this._isCharacterReferenceInAttribute()) { - this.currentAttr.value += String.fromCodePoint(cp); - } else { - this._emitCodePoint(cp); - } + if (this._isCharacterReferenceInAttribute()) this.currentAttr.value += String.fromCodePoint(cp); + else this._emitCodePoint(cp); } _callState(cp) { switch (this.state) { - case State$1.DATA: { + case State$1.DATA: this._stateData(cp); break; - } - case State$1.RCDATA: { + case State$1.RCDATA: this._stateRcdata(cp); break; - } - case State$1.RAWTEXT: { + case State$1.RAWTEXT: this._stateRawtext(cp); break; - } - case State$1.SCRIPT_DATA: { + case State$1.SCRIPT_DATA: this._stateScriptData(cp); break; - } - case State$1.PLAINTEXT: { + case State$1.PLAINTEXT: this._statePlaintext(cp); break; - } - case State$1.TAG_OPEN: { + case State$1.TAG_OPEN: this._stateTagOpen(cp); break; - } - case State$1.END_TAG_OPEN: { + case State$1.END_TAG_OPEN: this._stateEndTagOpen(cp); break; - } - case State$1.TAG_NAME: { + case State$1.TAG_NAME: this._stateTagName(cp); break; - } - case State$1.RCDATA_LESS_THAN_SIGN: { + case State$1.RCDATA_LESS_THAN_SIGN: this._stateRcdataLessThanSign(cp); break; - } - case State$1.RCDATA_END_TAG_OPEN: { + case State$1.RCDATA_END_TAG_OPEN: this._stateRcdataEndTagOpen(cp); break; - } - case State$1.RCDATA_END_TAG_NAME: { + case State$1.RCDATA_END_TAG_NAME: this._stateRcdataEndTagName(cp); break; - } - case State$1.RAWTEXT_LESS_THAN_SIGN: { + case State$1.RAWTEXT_LESS_THAN_SIGN: this._stateRawtextLessThanSign(cp); break; - } - case State$1.RAWTEXT_END_TAG_OPEN: { + case State$1.RAWTEXT_END_TAG_OPEN: this._stateRawtextEndTagOpen(cp); break; - } - case State$1.RAWTEXT_END_TAG_NAME: { + case State$1.RAWTEXT_END_TAG_NAME: this._stateRawtextEndTagName(cp); break; - } - case State$1.SCRIPT_DATA_LESS_THAN_SIGN: { + case State$1.SCRIPT_DATA_LESS_THAN_SIGN: this._stateScriptDataLessThanSign(cp); break; - } - case State$1.SCRIPT_DATA_END_TAG_OPEN: { + case State$1.SCRIPT_DATA_END_TAG_OPEN: this._stateScriptDataEndTagOpen(cp); break; - } - case State$1.SCRIPT_DATA_END_TAG_NAME: { + case State$1.SCRIPT_DATA_END_TAG_NAME: this._stateScriptDataEndTagName(cp); break; - } - case State$1.SCRIPT_DATA_ESCAPE_START: { + case State$1.SCRIPT_DATA_ESCAPE_START: this._stateScriptDataEscapeStart(cp); break; - } - case State$1.SCRIPT_DATA_ESCAPE_START_DASH: { + case State$1.SCRIPT_DATA_ESCAPE_START_DASH: this._stateScriptDataEscapeStartDash(cp); break; - } - case State$1.SCRIPT_DATA_ESCAPED: { + case State$1.SCRIPT_DATA_ESCAPED: this._stateScriptDataEscaped(cp); break; - } - case State$1.SCRIPT_DATA_ESCAPED_DASH: { + case State$1.SCRIPT_DATA_ESCAPED_DASH: this._stateScriptDataEscapedDash(cp); break; - } - case State$1.SCRIPT_DATA_ESCAPED_DASH_DASH: { + case State$1.SCRIPT_DATA_ESCAPED_DASH_DASH: this._stateScriptDataEscapedDashDash(cp); break; - } - case State$1.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: { + case State$1.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN: this._stateScriptDataEscapedLessThanSign(cp); break; - } - case State$1.SCRIPT_DATA_ESCAPED_END_TAG_OPEN: { + case State$1.SCRIPT_DATA_ESCAPED_END_TAG_OPEN: this._stateScriptDataEscapedEndTagOpen(cp); break; - } - case State$1.SCRIPT_DATA_ESCAPED_END_TAG_NAME: { + case State$1.SCRIPT_DATA_ESCAPED_END_TAG_NAME: this._stateScriptDataEscapedEndTagName(cp); break; - } - case State$1.SCRIPT_DATA_DOUBLE_ESCAPE_START: { + case State$1.SCRIPT_DATA_DOUBLE_ESCAPE_START: this._stateScriptDataDoubleEscapeStart(cp); break; - } - case State$1.SCRIPT_DATA_DOUBLE_ESCAPED: { + case State$1.SCRIPT_DATA_DOUBLE_ESCAPED: this._stateScriptDataDoubleEscaped(cp); break; - } - case State$1.SCRIPT_DATA_DOUBLE_ESCAPED_DASH: { + case State$1.SCRIPT_DATA_DOUBLE_ESCAPED_DASH: this._stateScriptDataDoubleEscapedDash(cp); break; - } - case State$1.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: { + case State$1.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH: this._stateScriptDataDoubleEscapedDashDash(cp); break; - } - case State$1.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: { + case State$1.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN: this._stateScriptDataDoubleEscapedLessThanSign(cp); break; - } - case State$1.SCRIPT_DATA_DOUBLE_ESCAPE_END: { + case State$1.SCRIPT_DATA_DOUBLE_ESCAPE_END: this._stateScriptDataDoubleEscapeEnd(cp); break; - } - case State$1.BEFORE_ATTRIBUTE_NAME: { + case State$1.BEFORE_ATTRIBUTE_NAME: this._stateBeforeAttributeName(cp); break; - } - case State$1.ATTRIBUTE_NAME: { + case State$1.ATTRIBUTE_NAME: this._stateAttributeName(cp); break; - } - case State$1.AFTER_ATTRIBUTE_NAME: { + case State$1.AFTER_ATTRIBUTE_NAME: this._stateAfterAttributeName(cp); break; - } - case State$1.BEFORE_ATTRIBUTE_VALUE: { + case State$1.BEFORE_ATTRIBUTE_VALUE: this._stateBeforeAttributeValue(cp); break; - } - case State$1.ATTRIBUTE_VALUE_DOUBLE_QUOTED: { + case State$1.ATTRIBUTE_VALUE_DOUBLE_QUOTED: this._stateAttributeValueDoubleQuoted(cp); break; - } - case State$1.ATTRIBUTE_VALUE_SINGLE_QUOTED: { + case State$1.ATTRIBUTE_VALUE_SINGLE_QUOTED: this._stateAttributeValueSingleQuoted(cp); break; - } - case State$1.ATTRIBUTE_VALUE_UNQUOTED: { + case State$1.ATTRIBUTE_VALUE_UNQUOTED: this._stateAttributeValueUnquoted(cp); break; - } - case State$1.AFTER_ATTRIBUTE_VALUE_QUOTED: { + case State$1.AFTER_ATTRIBUTE_VALUE_QUOTED: this._stateAfterAttributeValueQuoted(cp); break; - } - case State$1.SELF_CLOSING_START_TAG: { + case State$1.SELF_CLOSING_START_TAG: this._stateSelfClosingStartTag(cp); break; - } - case State$1.BOGUS_COMMENT: { + case State$1.BOGUS_COMMENT: this._stateBogusComment(cp); break; - } - case State$1.MARKUP_DECLARATION_OPEN: { + case State$1.MARKUP_DECLARATION_OPEN: this._stateMarkupDeclarationOpen(cp); break; - } - case State$1.COMMENT_START: { + case State$1.COMMENT_START: this._stateCommentStart(cp); break; - } - case State$1.COMMENT_START_DASH: { + case State$1.COMMENT_START_DASH: this._stateCommentStartDash(cp); break; - } - case State$1.COMMENT: { + case State$1.COMMENT: this._stateComment(cp); break; - } - case State$1.COMMENT_LESS_THAN_SIGN: { + case State$1.COMMENT_LESS_THAN_SIGN: this._stateCommentLessThanSign(cp); break; - } - case State$1.COMMENT_LESS_THAN_SIGN_BANG: { + case State$1.COMMENT_LESS_THAN_SIGN_BANG: this._stateCommentLessThanSignBang(cp); break; - } - case State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH: { + case State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH: this._stateCommentLessThanSignBangDash(cp); break; - } - case State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH: { + case State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH: this._stateCommentLessThanSignBangDashDash(cp); break; - } - case State$1.COMMENT_END_DASH: { + case State$1.COMMENT_END_DASH: this._stateCommentEndDash(cp); break; - } - case State$1.COMMENT_END: { + case State$1.COMMENT_END: this._stateCommentEnd(cp); break; - } - case State$1.COMMENT_END_BANG: { + case State$1.COMMENT_END_BANG: this._stateCommentEndBang(cp); break; - } - case State$1.DOCTYPE: { + case State$1.DOCTYPE: this._stateDoctype(cp); break; - } - case State$1.BEFORE_DOCTYPE_NAME: { + case State$1.BEFORE_DOCTYPE_NAME: this._stateBeforeDoctypeName(cp); break; - } - case State$1.DOCTYPE_NAME: { + case State$1.DOCTYPE_NAME: this._stateDoctypeName(cp); break; - } - case State$1.AFTER_DOCTYPE_NAME: { + case State$1.AFTER_DOCTYPE_NAME: this._stateAfterDoctypeName(cp); break; - } - case State$1.AFTER_DOCTYPE_PUBLIC_KEYWORD: { + case State$1.AFTER_DOCTYPE_PUBLIC_KEYWORD: this._stateAfterDoctypePublicKeyword(cp); break; - } - case State$1.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: { + case State$1.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER: this._stateBeforeDoctypePublicIdentifier(cp); break; - } - case State$1.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: { + case State$1.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED: this._stateDoctypePublicIdentifierDoubleQuoted(cp); break; - } - case State$1.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: { + case State$1.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED: this._stateDoctypePublicIdentifierSingleQuoted(cp); break; - } - case State$1.AFTER_DOCTYPE_PUBLIC_IDENTIFIER: { + case State$1.AFTER_DOCTYPE_PUBLIC_IDENTIFIER: this._stateAfterDoctypePublicIdentifier(cp); break; - } - case State$1.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: { + case State$1.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS: this._stateBetweenDoctypePublicAndSystemIdentifiers(cp); break; - } - case State$1.AFTER_DOCTYPE_SYSTEM_KEYWORD: { + case State$1.AFTER_DOCTYPE_SYSTEM_KEYWORD: this._stateAfterDoctypeSystemKeyword(cp); break; - } - case State$1.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: { + case State$1.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER: this._stateBeforeDoctypeSystemIdentifier(cp); break; - } - case State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: { + case State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED: this._stateDoctypeSystemIdentifierDoubleQuoted(cp); break; - } - case State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: { + case State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED: this._stateDoctypeSystemIdentifierSingleQuoted(cp); break; - } - case State$1.AFTER_DOCTYPE_SYSTEM_IDENTIFIER: { + case State$1.AFTER_DOCTYPE_SYSTEM_IDENTIFIER: this._stateAfterDoctypeSystemIdentifier(cp); break; - } - case State$1.BOGUS_DOCTYPE: { + case State$1.BOGUS_DOCTYPE: this._stateBogusDoctype(cp); break; - } - case State$1.CDATA_SECTION: { + case State$1.CDATA_SECTION: this._stateCdataSection(cp); break; - } - case State$1.CDATA_SECTION_BRACKET: { + case State$1.CDATA_SECTION_BRACKET: this._stateCdataSectionBracket(cp); break; - } - case State$1.CDATA_SECTION_END: { + case State$1.CDATA_SECTION_END: this._stateCdataSectionEnd(cp); break; - } - case State$1.CHARACTER_REFERENCE: { + case State$1.CHARACTER_REFERENCE: this._stateCharacterReference(); break; - } - case State$1.AMBIGUOUS_AMPERSAND: { + case State$1.AMBIGUOUS_AMPERSAND: this._stateAmbiguousAmpersand(cp); break; - } - default: { - throw new Error("Unknown state"); - } + default: throw new Error("Unknown state"); } } _stateData(cp) { switch (cp) { - case CODE_POINTS.LESS_THAN_SIGN: { + case CODE_POINTS.LESS_THAN_SIGN: this.state = State$1.TAG_OPEN; break; - } - case CODE_POINTS.AMPERSAND: { + case CODE_POINTS.AMPERSAND: this._startCharacterReference(); break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); this._emitCodePoint(cp); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._emitEOFToken(); break; - } - default: { - this._emitCodePoint(cp); - } + default: this._emitCodePoint(cp); } } _stateRcdata(cp) { switch (cp) { - case CODE_POINTS.AMPERSAND: { + case CODE_POINTS.AMPERSAND: this._startCharacterReference(); break; - } - case CODE_POINTS.LESS_THAN_SIGN: { + case CODE_POINTS.LESS_THAN_SIGN: this.state = State$1.RCDATA_LESS_THAN_SIGN; break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - this._emitChars(REPLACEMENT_CHARACTER); + this._emitChars("�"); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._emitEOFToken(); break; - } - default: { - this._emitCodePoint(cp); - } + default: this._emitCodePoint(cp); } } _stateRawtext(cp) { switch (cp) { - case CODE_POINTS.LESS_THAN_SIGN: { + case CODE_POINTS.LESS_THAN_SIGN: this.state = State$1.RAWTEXT_LESS_THAN_SIGN; break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - this._emitChars(REPLACEMENT_CHARACTER); + this._emitChars("�"); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._emitEOFToken(); break; - } - default: { - this._emitCodePoint(cp); - } + default: this._emitCodePoint(cp); } } _stateScriptData(cp) { switch (cp) { - case CODE_POINTS.LESS_THAN_SIGN: { + case CODE_POINTS.LESS_THAN_SIGN: this.state = State$1.SCRIPT_DATA_LESS_THAN_SIGN; break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - this._emitChars(REPLACEMENT_CHARACTER); + this._emitChars("�"); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._emitEOFToken(); break; - } - default: { - this._emitCodePoint(cp); - } + default: this._emitCodePoint(cp); } } _statePlaintext(cp) { switch (cp) { - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - this._emitChars(REPLACEMENT_CHARACTER); + this._emitChars("�"); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._emitEOFToken(); break; - } - default: { - this._emitCodePoint(cp); - } + default: this._emitCodePoint(cp); } } _stateTagOpen(cp) { @@ -141955,33 +129113,28 @@ var Tokenizer = class { this.state = State$1.TAG_NAME; this._stateTagName(cp); } else switch (cp) { - case CODE_POINTS.EXCLAMATION_MARK: { + case CODE_POINTS.EXCLAMATION_MARK: this.state = State$1.MARKUP_DECLARATION_OPEN; break; - } - case CODE_POINTS.SOLIDUS: { + case CODE_POINTS.SOLIDUS: this.state = State$1.END_TAG_OPEN; break; - } - case CODE_POINTS.QUESTION_MARK: { + case CODE_POINTS.QUESTION_MARK: this._err(ERR.unexpectedQuestionMarkInsteadOfTagName); this._createCommentToken(1); this.state = State$1.BOGUS_COMMENT; this._stateBogusComment(cp); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofBeforeTagName); this._emitChars("<"); this._emitEOFToken(); break; - } - default: { + default: this._err(ERR.invalidFirstCharacterOfTagName); this._emitChars("<"); this.state = State$1.DATA; this._stateData(cp); - } } } _stateEndTagOpen(cp) { @@ -141990,23 +129143,20 @@ var Tokenizer = class { this.state = State$1.TAG_NAME; this._stateTagName(cp); } else switch (cp) { - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this._err(ERR.missingEndTagName); this.state = State$1.DATA; break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofBeforeTagName); this._emitChars(""); break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); this.state = State$1.SCRIPT_DATA_ESCAPED; - this._emitChars(REPLACEMENT_CHARACTER); + this._emitChars("�"); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInScriptHtmlCommentLikeText); this._emitEOFToken(); break; - } - default: { + default: this.state = State$1.SCRIPT_DATA_ESCAPED; this._emitCodePoint(cp); - } } } _stateScriptDataEscapedLessThanSign(cp) { - if (cp === CODE_POINTS.SOLIDUS) { - this.state = State$1.SCRIPT_DATA_ESCAPED_END_TAG_OPEN; - } else if (isAsciiLetter(cp)) { + if (cp === CODE_POINTS.SOLIDUS) this.state = State$1.SCRIPT_DATA_ESCAPED_END_TAG_OPEN; + else if (isAsciiLetter(cp)) { this._emitChars("<"); this.state = State$1.SCRIPT_DATA_DOUBLE_ESCAPE_START; this._stateScriptDataDoubleEscapeStart(cp); @@ -142300,9 +129412,7 @@ var Tokenizer = class { _stateScriptDataDoubleEscapeStart(cp) { if (this.preprocessor.startsWith(SEQUENCES.SCRIPT, false) && isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))) { this._emitCodePoint(cp); - for (let i = 0; i < SEQUENCES.SCRIPT.length; i++) { - this._emitCodePoint(this._consume()); - } + for (let i = 0; i < SEQUENCES.SCRIPT.length; i++) this._emitCodePoint(this._consume()); this.state = State$1.SCRIPT_DATA_DOUBLE_ESCAPED; } else if (!this._ensureHibernation()) { this.state = State$1.SCRIPT_DATA_ESCAPED; @@ -142311,91 +129421,74 @@ var Tokenizer = class { } _stateScriptDataDoubleEscaped(cp) { switch (cp) { - case CODE_POINTS.HYPHEN_MINUS: { + case CODE_POINTS.HYPHEN_MINUS: this.state = State$1.SCRIPT_DATA_DOUBLE_ESCAPED_DASH; this._emitChars("-"); break; - } - case CODE_POINTS.LESS_THAN_SIGN: { + case CODE_POINTS.LESS_THAN_SIGN: this.state = State$1.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN; this._emitChars("<"); break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - this._emitChars(REPLACEMENT_CHARACTER); + this._emitChars("�"); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInScriptHtmlCommentLikeText); this._emitEOFToken(); break; - } - default: { - this._emitCodePoint(cp); - } + default: this._emitCodePoint(cp); } } _stateScriptDataDoubleEscapedDash(cp) { switch (cp) { - case CODE_POINTS.HYPHEN_MINUS: { + case CODE_POINTS.HYPHEN_MINUS: this.state = State$1.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH; this._emitChars("-"); break; - } - case CODE_POINTS.LESS_THAN_SIGN: { + case CODE_POINTS.LESS_THAN_SIGN: this.state = State$1.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN; this._emitChars("<"); break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); this.state = State$1.SCRIPT_DATA_DOUBLE_ESCAPED; - this._emitChars(REPLACEMENT_CHARACTER); + this._emitChars("�"); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInScriptHtmlCommentLikeText); this._emitEOFToken(); break; - } - default: { + default: this.state = State$1.SCRIPT_DATA_DOUBLE_ESCAPED; this._emitCodePoint(cp); - } } } _stateScriptDataDoubleEscapedDashDash(cp) { switch (cp) { - case CODE_POINTS.HYPHEN_MINUS: { + case CODE_POINTS.HYPHEN_MINUS: this._emitChars("-"); break; - } - case CODE_POINTS.LESS_THAN_SIGN: { + case CODE_POINTS.LESS_THAN_SIGN: this.state = State$1.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN; this._emitChars("<"); break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this.state = State$1.SCRIPT_DATA; this._emitChars(">"); break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); this.state = State$1.SCRIPT_DATA_DOUBLE_ESCAPED; - this._emitChars(REPLACEMENT_CHARACTER); + this._emitChars("�"); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInScriptHtmlCommentLikeText); this._emitEOFToken(); break; - } - default: { + default: this.state = State$1.SCRIPT_DATA_DOUBLE_ESCAPED; this._emitCodePoint(cp); - } } } _stateScriptDataDoubleEscapedLessThanSign(cp) { @@ -142410,9 +129503,7 @@ var Tokenizer = class { _stateScriptDataDoubleEscapeEnd(cp) { if (this.preprocessor.startsWith(SEQUENCES.SCRIPT, false) && isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))) { this._emitCodePoint(cp); - for (let i = 0; i < SEQUENCES.SCRIPT.length; i++) { - this._emitCodePoint(this._consume()); - } + for (let i = 0; i < SEQUENCES.SCRIPT.length; i++) this._emitCodePoint(this._consume()); this.state = State$1.SCRIPT_DATA_ESCAPED; } else if (!this._ensureHibernation()) { this.state = State$1.SCRIPT_DATA_DOUBLE_ESCAPED; @@ -142424,27 +129515,22 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { - break; - } + case CODE_POINTS.FORM_FEED: break; case CODE_POINTS.SOLIDUS: case CODE_POINTS.GREATER_THAN_SIGN: - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this.state = State$1.AFTER_ATTRIBUTE_NAME; this._stateAfterAttributeName(cp); break; - } - case CODE_POINTS.EQUALS_SIGN: { + case CODE_POINTS.EQUALS_SIGN: this._err(ERR.unexpectedEqualsSignBeforeAttributeName); this._createAttr("="); this.state = State$1.ATTRIBUTE_NAME; break; - } - default: { + default: this._createAttr(""); this.state = State$1.ATTRIBUTE_NAME; this._stateAttributeName(cp); - } } } _stateAttributeName(cp) { @@ -142455,32 +129541,26 @@ var Tokenizer = class { case CODE_POINTS.FORM_FEED: case CODE_POINTS.SOLIDUS: case CODE_POINTS.GREATER_THAN_SIGN: - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._leaveAttrName(); this.state = State$1.AFTER_ATTRIBUTE_NAME; this._stateAfterAttributeName(cp); break; - } - case CODE_POINTS.EQUALS_SIGN: { + case CODE_POINTS.EQUALS_SIGN: this._leaveAttrName(); this.state = State$1.BEFORE_ATTRIBUTE_VALUE; break; - } case CODE_POINTS.QUOTATION_MARK: case CODE_POINTS.APOSTROPHE: - case CODE_POINTS.LESS_THAN_SIGN: { + case CODE_POINTS.LESS_THAN_SIGN: this._err(ERR.unexpectedCharacterInAttributeName); this.currentAttr.name += String.fromCodePoint(cp); break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - this.currentAttr.name += REPLACEMENT_CHARACTER; + this.currentAttr.name += "�"; break; - } - default: { - this.currentAttr.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp); - } + default: this.currentAttr.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp); } } _stateAfterAttributeName(cp) { @@ -142488,32 +129568,25 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { - break; - } - case CODE_POINTS.SOLIDUS: { + case CODE_POINTS.FORM_FEED: break; + case CODE_POINTS.SOLIDUS: this.state = State$1.SELF_CLOSING_START_TAG; break; - } - case CODE_POINTS.EQUALS_SIGN: { + case CODE_POINTS.EQUALS_SIGN: this.state = State$1.BEFORE_ATTRIBUTE_VALUE; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this.state = State$1.DATA; this.emitCurrentTagToken(); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInTag); this._emitEOFToken(); break; - } - default: { + default: this._createAttr(""); this.state = State$1.ATTRIBUTE_NAME; this._stateAttributeName(cp); - } } } _stateBeforeAttributeValue(cp) { @@ -142521,77 +129594,59 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { - break; - } - case CODE_POINTS.QUOTATION_MARK: { + case CODE_POINTS.FORM_FEED: break; + case CODE_POINTS.QUOTATION_MARK: this.state = State$1.ATTRIBUTE_VALUE_DOUBLE_QUOTED; break; - } - case CODE_POINTS.APOSTROPHE: { + case CODE_POINTS.APOSTROPHE: this.state = State$1.ATTRIBUTE_VALUE_SINGLE_QUOTED; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this._err(ERR.missingAttributeValue); this.state = State$1.DATA; this.emitCurrentTagToken(); break; - } - default: { + default: this.state = State$1.ATTRIBUTE_VALUE_UNQUOTED; this._stateAttributeValueUnquoted(cp); - } } } _stateAttributeValueDoubleQuoted(cp) { switch (cp) { - case CODE_POINTS.QUOTATION_MARK: { + case CODE_POINTS.QUOTATION_MARK: this.state = State$1.AFTER_ATTRIBUTE_VALUE_QUOTED; break; - } - case CODE_POINTS.AMPERSAND: { + case CODE_POINTS.AMPERSAND: this._startCharacterReference(); break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - this.currentAttr.value += REPLACEMENT_CHARACTER; + this.currentAttr.value += "�"; break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInTag); this._emitEOFToken(); break; - } - default: { - this.currentAttr.value += String.fromCodePoint(cp); - } + default: this.currentAttr.value += String.fromCodePoint(cp); } } _stateAttributeValueSingleQuoted(cp) { switch (cp) { - case CODE_POINTS.APOSTROPHE: { + case CODE_POINTS.APOSTROPHE: this.state = State$1.AFTER_ATTRIBUTE_VALUE_QUOTED; break; - } - case CODE_POINTS.AMPERSAND: { + case CODE_POINTS.AMPERSAND: this._startCharacterReference(); break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - this.currentAttr.value += REPLACEMENT_CHARACTER; + this.currentAttr.value += "�"; break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInTag); this._emitEOFToken(); break; - } - default: { - this.currentAttr.value += String.fromCodePoint(cp); - } + default: this.currentAttr.value += String.fromCodePoint(cp); } } _stateAttributeValueUnquoted(cp) { @@ -142599,43 +129654,35 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { + case CODE_POINTS.FORM_FEED: this._leaveAttrValue(); this.state = State$1.BEFORE_ATTRIBUTE_NAME; break; - } - case CODE_POINTS.AMPERSAND: { + case CODE_POINTS.AMPERSAND: this._startCharacterReference(); break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this._leaveAttrValue(); this.state = State$1.DATA; this.emitCurrentTagToken(); break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - this.currentAttr.value += REPLACEMENT_CHARACTER; + this.currentAttr.value += "�"; break; - } case CODE_POINTS.QUOTATION_MARK: case CODE_POINTS.APOSTROPHE: case CODE_POINTS.LESS_THAN_SIGN: case CODE_POINTS.EQUALS_SIGN: - case CODE_POINTS.GRAVE_ACCENT: { + case CODE_POINTS.GRAVE_ACCENT: this._err(ERR.unexpectedCharacterInUnquotedAttributeValue); this.currentAttr.value += String.fromCodePoint(cp); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInTag); this._emitEOFToken(); break; - } - default: { - this.currentAttr.value += String.fromCodePoint(cp); - } + default: this.currentAttr.value += String.fromCodePoint(cp); } } _stateAfterAttributeValueQuoted(cp) { @@ -142643,32 +129690,27 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { + case CODE_POINTS.FORM_FEED: this._leaveAttrValue(); this.state = State$1.BEFORE_ATTRIBUTE_NAME; break; - } - case CODE_POINTS.SOLIDUS: { + case CODE_POINTS.SOLIDUS: this._leaveAttrValue(); this.state = State$1.SELF_CLOSING_START_TAG; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this._leaveAttrValue(); this.state = State$1.DATA; this.emitCurrentTagToken(); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInTag); this._emitEOFToken(); break; - } - default: { + default: this._err(ERR.missingWhitespaceBetweenAttributes); this.state = State$1.BEFORE_ATTRIBUTE_NAME; this._stateBeforeAttributeName(cp); - } } } _stateSelfClosingStartTag(cp) { @@ -142680,39 +129722,32 @@ var Tokenizer = class { this.emitCurrentTagToken(); break; } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInTag); this._emitEOFToken(); break; - } - default: { + default: this._err(ERR.unexpectedSolidusInTag); this.state = State$1.BEFORE_ATTRIBUTE_NAME; this._stateBeforeAttributeName(cp); - } } } _stateBogusComment(cp) { const token = this.currentToken; switch (cp) { - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this.state = State$1.DATA; this.emitCurrentComment(token); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this.emitCurrentComment(token); this._emitEOFToken(); break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - token.data += REPLACEMENT_CHARACTER; + token.data += "�"; break; - } - default: { - token.data += String.fromCodePoint(cp); - } + default: token.data += String.fromCodePoint(cp); } } _stateMarkupDeclarationOpen(cp) { @@ -142722,16 +129757,14 @@ var Tokenizer = class { } else if (this._consumeSequenceIfMatch(SEQUENCES.DOCTYPE, false)) { this.currentLocation = this.getCurrentLocation(SEQUENCES.DOCTYPE.length + 1); this.state = State$1.DOCTYPE; - } else if (this._consumeSequenceIfMatch(SEQUENCES.CDATA_START, true)) { - if (this.inForeignNode) { - this.state = State$1.CDATA_SECTION; - } else { - this._err(ERR.cdataInHtmlContent); - this._createCommentToken(SEQUENCES.CDATA_START.length + 1); - this.currentToken.data = "[CDATA["; - this.state = State$1.BOGUS_COMMENT; - } - } else if (!this._ensureHibernation()) { + } else if (this._consumeSequenceIfMatch(SEQUENCES.CDATA_START, true)) if (this.inForeignNode) this.state = State$1.CDATA_SECTION; + else { + this._err(ERR.cdataInHtmlContent); + this._createCommentToken(SEQUENCES.CDATA_START.length + 1); + this.currentToken.data = "[CDATA["; + this.state = State$1.BOGUS_COMMENT; + } + else if (!this._ensureHibernation()) { this._err(ERR.incorrectlyOpenedComment); this._createCommentToken(2); this.state = State$1.BOGUS_COMMENT; @@ -142740,10 +129773,9 @@ var Tokenizer = class { } _stateCommentStart(cp) { switch (cp) { - case CODE_POINTS.HYPHEN_MINUS: { + case CODE_POINTS.HYPHEN_MINUS: this.state = State$1.COMMENT_START_DASH; break; - } case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.abruptClosingOfEmptyComment); this.state = State$1.DATA; @@ -142751,181 +129783,151 @@ var Tokenizer = class { this.emitCurrentComment(token); break; } - default: { + default: this.state = State$1.COMMENT; this._stateComment(cp); - } } } _stateCommentStartDash(cp) { const token = this.currentToken; switch (cp) { - case CODE_POINTS.HYPHEN_MINUS: { + case CODE_POINTS.HYPHEN_MINUS: this.state = State$1.COMMENT_END; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this._err(ERR.abruptClosingOfEmptyComment); this.state = State$1.DATA; this.emitCurrentComment(token); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInComment); this.emitCurrentComment(token); this._emitEOFToken(); break; - } - default: { + default: token.data += "-"; this.state = State$1.COMMENT; this._stateComment(cp); - } } } _stateComment(cp) { const token = this.currentToken; switch (cp) { - case CODE_POINTS.HYPHEN_MINUS: { + case CODE_POINTS.HYPHEN_MINUS: this.state = State$1.COMMENT_END_DASH; break; - } - case CODE_POINTS.LESS_THAN_SIGN: { + case CODE_POINTS.LESS_THAN_SIGN: token.data += "<"; this.state = State$1.COMMENT_LESS_THAN_SIGN; break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - token.data += REPLACEMENT_CHARACTER; + token.data += "�"; break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInComment); this.emitCurrentComment(token); this._emitEOFToken(); break; - } - default: { - token.data += String.fromCodePoint(cp); - } + default: token.data += String.fromCodePoint(cp); } } _stateCommentLessThanSign(cp) { const token = this.currentToken; switch (cp) { - case CODE_POINTS.EXCLAMATION_MARK: { + case CODE_POINTS.EXCLAMATION_MARK: token.data += "!"; this.state = State$1.COMMENT_LESS_THAN_SIGN_BANG; break; - } - case CODE_POINTS.LESS_THAN_SIGN: { + case CODE_POINTS.LESS_THAN_SIGN: token.data += "<"; break; - } - default: { + default: this.state = State$1.COMMENT; this._stateComment(cp); - } } } _stateCommentLessThanSignBang(cp) { - if (cp === CODE_POINTS.HYPHEN_MINUS) { - this.state = State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH; - } else { + if (cp === CODE_POINTS.HYPHEN_MINUS) this.state = State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH; + else { this.state = State$1.COMMENT; this._stateComment(cp); } } _stateCommentLessThanSignBangDash(cp) { - if (cp === CODE_POINTS.HYPHEN_MINUS) { - this.state = State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH; - } else { + if (cp === CODE_POINTS.HYPHEN_MINUS) this.state = State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH; + else { this.state = State$1.COMMENT_END_DASH; this._stateCommentEndDash(cp); } } _stateCommentLessThanSignBangDashDash(cp) { - if (cp !== CODE_POINTS.GREATER_THAN_SIGN && cp !== CODE_POINTS.EOF) { - this._err(ERR.nestedComment); - } + if (cp !== CODE_POINTS.GREATER_THAN_SIGN && cp !== CODE_POINTS.EOF) this._err(ERR.nestedComment); this.state = State$1.COMMENT_END; this._stateCommentEnd(cp); } _stateCommentEndDash(cp) { const token = this.currentToken; switch (cp) { - case CODE_POINTS.HYPHEN_MINUS: { + case CODE_POINTS.HYPHEN_MINUS: this.state = State$1.COMMENT_END; break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInComment); this.emitCurrentComment(token); this._emitEOFToken(); break; - } - default: { + default: token.data += "-"; this.state = State$1.COMMENT; this._stateComment(cp); - } } } _stateCommentEnd(cp) { const token = this.currentToken; switch (cp) { - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this.state = State$1.DATA; this.emitCurrentComment(token); break; - } - case CODE_POINTS.EXCLAMATION_MARK: { + case CODE_POINTS.EXCLAMATION_MARK: this.state = State$1.COMMENT_END_BANG; break; - } - case CODE_POINTS.HYPHEN_MINUS: { + case CODE_POINTS.HYPHEN_MINUS: token.data += "-"; break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInComment); this.emitCurrentComment(token); this._emitEOFToken(); break; - } - default: { + default: token.data += "--"; this.state = State$1.COMMENT; this._stateComment(cp); - } } } _stateCommentEndBang(cp) { const token = this.currentToken; switch (cp) { - case CODE_POINTS.HYPHEN_MINUS: { + case CODE_POINTS.HYPHEN_MINUS: token.data += "--!"; this.state = State$1.COMMENT_END_DASH; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this._err(ERR.incorrectlyClosedComment); this.state = State$1.DATA; this.emitCurrentComment(token); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInComment); this.emitCurrentComment(token); this._emitEOFToken(); break; - } - default: { + default: token.data += "--!"; this.state = State$1.COMMENT; this._stateComment(cp); - } } } _stateDoctype(cp) { @@ -142933,15 +129935,13 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { + case CODE_POINTS.FORM_FEED: this.state = State$1.BEFORE_DOCTYPE_NAME; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this.state = State$1.BEFORE_DOCTYPE_NAME; this._stateBeforeDoctypeName(cp); break; - } case CODE_POINTS.EOF: { this._err(ERR.eofInDoctype); this._createDoctypeToken(null); @@ -142951,11 +129951,10 @@ var Tokenizer = class { this._emitEOFToken(); break; } - default: { + default: this._err(ERR.missingWhitespaceBeforeDoctypeName); this.state = State$1.BEFORE_DOCTYPE_NAME; this._stateBeforeDoctypeName(cp); - } } } _stateBeforeDoctypeName(cp) { @@ -142966,15 +129965,12 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { - break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.FORM_FEED: break; + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - this._createDoctypeToken(REPLACEMENT_CHARACTER); + this._createDoctypeToken("�"); this.state = State$1.DOCTYPE_NAME; break; - } case CODE_POINTS.GREATER_THAN_SIGN: { this._err(ERR.missingDoctypeName); this._createDoctypeToken(null); @@ -142993,10 +129989,9 @@ var Tokenizer = class { this._emitEOFToken(); break; } - default: { + default: this._createDoctypeToken(String.fromCodePoint(cp)); this.state = State$1.DOCTYPE_NAME; - } } } _stateDoctypeName(cp) { @@ -143005,30 +130000,24 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { + case CODE_POINTS.FORM_FEED: this.state = State$1.AFTER_DOCTYPE_NAME; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this.state = State$1.DATA; this.emitCurrentDoctype(token); break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - token.name += REPLACEMENT_CHARACTER; + token.name += "�"; break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; - } - default: { - token.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp); - } + default: token.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp); } } _stateAfterDoctypeName(cp) { @@ -143037,32 +130026,24 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { - break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.FORM_FEED: break; + case CODE_POINTS.GREATER_THAN_SIGN: this.state = State$1.DATA; this.emitCurrentDoctype(token); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; - } - default: { - if (this._consumeSequenceIfMatch(SEQUENCES.PUBLIC, false)) { - this.state = State$1.AFTER_DOCTYPE_PUBLIC_KEYWORD; - } else if (this._consumeSequenceIfMatch(SEQUENCES.SYSTEM, false)) { - this.state = State$1.AFTER_DOCTYPE_SYSTEM_KEYWORD; - } else if (!this._ensureHibernation()) { - this._err(ERR.invalidCharacterSequenceAfterDoctypeName); - token.forceQuirks = true; - this.state = State$1.BOGUS_DOCTYPE; - this._stateBogusDoctype(cp); - } + default: if (this._consumeSequenceIfMatch(SEQUENCES.PUBLIC, false)) this.state = State$1.AFTER_DOCTYPE_PUBLIC_KEYWORD; + else if (this._consumeSequenceIfMatch(SEQUENCES.SYSTEM, false)) this.state = State$1.AFTER_DOCTYPE_SYSTEM_KEYWORD; + else if (!this._ensureHibernation()) { + this._err(ERR.invalidCharacterSequenceAfterDoctypeName); + token.forceQuirks = true; + this.state = State$1.BOGUS_DOCTYPE; + this._stateBogusDoctype(cp); } } } @@ -143072,42 +130053,36 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { + case CODE_POINTS.FORM_FEED: this.state = State$1.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER; break; - } - case CODE_POINTS.QUOTATION_MARK: { + case CODE_POINTS.QUOTATION_MARK: this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword); token.publicId = ""; this.state = State$1.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED; break; - } - case CODE_POINTS.APOSTROPHE: { + case CODE_POINTS.APOSTROPHE: this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword); token.publicId = ""; this.state = State$1.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this._err(ERR.missingDoctypePublicIdentifier); token.forceQuirks = true; this.state = State$1.DATA; this.emitCurrentDoctype(token); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; - } - default: { + default: this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier); token.forceQuirks = true; this.state = State$1.BOGUS_DOCTYPE; this._stateBogusDoctype(cp); - } } } _stateBeforeDoctypePublicIdentifier(cp) { @@ -143116,101 +130091,82 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { - break; - } - case CODE_POINTS.QUOTATION_MARK: { + case CODE_POINTS.FORM_FEED: break; + case CODE_POINTS.QUOTATION_MARK: token.publicId = ""; this.state = State$1.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED; break; - } - case CODE_POINTS.APOSTROPHE: { + case CODE_POINTS.APOSTROPHE: token.publicId = ""; this.state = State$1.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this._err(ERR.missingDoctypePublicIdentifier); token.forceQuirks = true; this.state = State$1.DATA; this.emitCurrentDoctype(token); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; - } - default: { + default: this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier); token.forceQuirks = true; this.state = State$1.BOGUS_DOCTYPE; this._stateBogusDoctype(cp); - } } } _stateDoctypePublicIdentifierDoubleQuoted(cp) { const token = this.currentToken; switch (cp) { - case CODE_POINTS.QUOTATION_MARK: { + case CODE_POINTS.QUOTATION_MARK: this.state = State$1.AFTER_DOCTYPE_PUBLIC_IDENTIFIER; break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - token.publicId += REPLACEMENT_CHARACTER; + token.publicId += "�"; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this._err(ERR.abruptDoctypePublicIdentifier); token.forceQuirks = true; this.emitCurrentDoctype(token); this.state = State$1.DATA; break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; - } - default: { - token.publicId += String.fromCodePoint(cp); - } + default: token.publicId += String.fromCodePoint(cp); } } _stateDoctypePublicIdentifierSingleQuoted(cp) { const token = this.currentToken; switch (cp) { - case CODE_POINTS.APOSTROPHE: { + case CODE_POINTS.APOSTROPHE: this.state = State$1.AFTER_DOCTYPE_PUBLIC_IDENTIFIER; break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - token.publicId += REPLACEMENT_CHARACTER; + token.publicId += "�"; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this._err(ERR.abruptDoctypePublicIdentifier); token.forceQuirks = true; this.emitCurrentDoctype(token); this.state = State$1.DATA; break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; - } - default: { - token.publicId += String.fromCodePoint(cp); - } + default: token.publicId += String.fromCodePoint(cp); } } _stateAfterDoctypePublicIdentifier(cp) { @@ -143219,40 +130175,34 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { + case CODE_POINTS.FORM_FEED: this.state = State$1.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this.state = State$1.DATA; this.emitCurrentDoctype(token); break; - } - case CODE_POINTS.QUOTATION_MARK: { + case CODE_POINTS.QUOTATION_MARK: this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers); token.systemId = ""; this.state = State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; break; - } - case CODE_POINTS.APOSTROPHE: { + case CODE_POINTS.APOSTROPHE: this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers); token.systemId = ""; this.state = State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; - } - default: { + default: this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier); token.forceQuirks = true; this.state = State$1.BOGUS_DOCTYPE; this._stateBogusDoctype(cp); - } } } _stateBetweenDoctypePublicAndSystemIdentifiers(cp) { @@ -143261,37 +130211,30 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { - break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.FORM_FEED: break; + case CODE_POINTS.GREATER_THAN_SIGN: this.emitCurrentDoctype(token); this.state = State$1.DATA; break; - } - case CODE_POINTS.QUOTATION_MARK: { + case CODE_POINTS.QUOTATION_MARK: token.systemId = ""; this.state = State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; break; - } - case CODE_POINTS.APOSTROPHE: { + case CODE_POINTS.APOSTROPHE: token.systemId = ""; this.state = State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; - } - default: { + default: this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier); token.forceQuirks = true; this.state = State$1.BOGUS_DOCTYPE; this._stateBogusDoctype(cp); - } } } _stateAfterDoctypeSystemKeyword(cp) { @@ -143300,42 +130243,36 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { + case CODE_POINTS.FORM_FEED: this.state = State$1.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER; break; - } - case CODE_POINTS.QUOTATION_MARK: { + case CODE_POINTS.QUOTATION_MARK: this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword); token.systemId = ""; this.state = State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; break; - } - case CODE_POINTS.APOSTROPHE: { + case CODE_POINTS.APOSTROPHE: this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword); token.systemId = ""; this.state = State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this._err(ERR.missingDoctypeSystemIdentifier); token.forceQuirks = true; this.state = State$1.DATA; this.emitCurrentDoctype(token); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; - } - default: { + default: this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier); token.forceQuirks = true; this.state = State$1.BOGUS_DOCTYPE; this._stateBogusDoctype(cp); - } } } _stateBeforeDoctypeSystemIdentifier(cp) { @@ -143344,101 +130281,82 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { - break; - } - case CODE_POINTS.QUOTATION_MARK: { + case CODE_POINTS.FORM_FEED: break; + case CODE_POINTS.QUOTATION_MARK: token.systemId = ""; this.state = State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED; break; - } - case CODE_POINTS.APOSTROPHE: { + case CODE_POINTS.APOSTROPHE: token.systemId = ""; this.state = State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this._err(ERR.missingDoctypeSystemIdentifier); token.forceQuirks = true; this.state = State$1.DATA; this.emitCurrentDoctype(token); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; - } - default: { + default: this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier); token.forceQuirks = true; this.state = State$1.BOGUS_DOCTYPE; this._stateBogusDoctype(cp); - } } } _stateDoctypeSystemIdentifierDoubleQuoted(cp) { const token = this.currentToken; switch (cp) { - case CODE_POINTS.QUOTATION_MARK: { + case CODE_POINTS.QUOTATION_MARK: this.state = State$1.AFTER_DOCTYPE_SYSTEM_IDENTIFIER; break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - token.systemId += REPLACEMENT_CHARACTER; + token.systemId += "�"; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this._err(ERR.abruptDoctypeSystemIdentifier); token.forceQuirks = true; this.emitCurrentDoctype(token); this.state = State$1.DATA; break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; - } - default: { - token.systemId += String.fromCodePoint(cp); - } + default: token.systemId += String.fromCodePoint(cp); } } _stateDoctypeSystemIdentifierSingleQuoted(cp) { const token = this.currentToken; switch (cp) { - case CODE_POINTS.APOSTROPHE: { + case CODE_POINTS.APOSTROPHE: this.state = State$1.AFTER_DOCTYPE_SYSTEM_IDENTIFIER; break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); - token.systemId += REPLACEMENT_CHARACTER; + token.systemId += "�"; break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this._err(ERR.abruptDoctypeSystemIdentifier); token.forceQuirks = true; this.emitCurrentDoctype(token); this.state = State$1.DATA; break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; - } - default: { - token.systemId += String.fromCodePoint(cp); - } + default: token.systemId += String.fromCodePoint(cp); } } _stateAfterDoctypeSystemIdentifier(cp) { @@ -143447,68 +130365,55 @@ var Tokenizer = class { case CODE_POINTS.SPACE: case CODE_POINTS.LINE_FEED: case CODE_POINTS.TABULATION: - case CODE_POINTS.FORM_FEED: { - break; - } - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.FORM_FEED: break; + case CODE_POINTS.GREATER_THAN_SIGN: this.emitCurrentDoctype(token); this.state = State$1.DATA; break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInDoctype); token.forceQuirks = true; this.emitCurrentDoctype(token); this._emitEOFToken(); break; - } - default: { + default: this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier); this.state = State$1.BOGUS_DOCTYPE; this._stateBogusDoctype(cp); - } } } _stateBogusDoctype(cp) { const token = this.currentToken; switch (cp) { - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this.emitCurrentDoctype(token); this.state = State$1.DATA; break; - } - case CODE_POINTS.NULL: { + case CODE_POINTS.NULL: this._err(ERR.unexpectedNullCharacter); break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this.emitCurrentDoctype(token); this._emitEOFToken(); break; - } default: } } _stateCdataSection(cp) { switch (cp) { - case CODE_POINTS.RIGHT_SQUARE_BRACKET: { + case CODE_POINTS.RIGHT_SQUARE_BRACKET: this.state = State$1.CDATA_SECTION_BRACKET; break; - } - case CODE_POINTS.EOF: { + case CODE_POINTS.EOF: this._err(ERR.eofInCdata); this._emitEOFToken(); break; - } - default: { - this._emitCodePoint(cp); - } + default: this._emitCodePoint(cp); } } _stateCdataSectionBracket(cp) { - if (cp === CODE_POINTS.RIGHT_SQUARE_BRACKET) { - this.state = State$1.CDATA_SECTION_END; - } else { + if (cp === CODE_POINTS.RIGHT_SQUARE_BRACKET) this.state = State$1.CDATA_SECTION_END; + else { this._emitChars("]"); this.state = State$1.CDATA_SECTION; this._stateCdataSection(cp); @@ -143516,55 +130421,43 @@ var Tokenizer = class { } _stateCdataSectionEnd(cp) { switch (cp) { - case CODE_POINTS.GREATER_THAN_SIGN: { + case CODE_POINTS.GREATER_THAN_SIGN: this.state = State$1.DATA; break; - } - case CODE_POINTS.RIGHT_SQUARE_BRACKET: { + case CODE_POINTS.RIGHT_SQUARE_BRACKET: this._emitChars("]"); break; - } - default: { + default: this._emitChars("]]"); this.state = State$1.CDATA_SECTION; this._stateCdataSection(cp); - } } } _stateCharacterReference() { let length = this.entityDecoder.write(this.preprocessor.html, this.preprocessor.pos); - if (length < 0) { - if (this.preprocessor.lastChunkWritten) { - length = this.entityDecoder.end(); - } else { - this.active = false; - this.preprocessor.pos = this.preprocessor.html.length - 1; - this.consumedAfterSnapshot = 0; - this.preprocessor.endOfChunkHit = true; - return; - } + if (length < 0) if (this.preprocessor.lastChunkWritten) length = this.entityDecoder.end(); + else { + this.active = false; + this.preprocessor.pos = this.preprocessor.html.length - 1; + this.consumedAfterSnapshot = 0; + this.preprocessor.endOfChunkHit = true; + return; } if (length === 0) { this.preprocessor.pos = this.entityStartPos; this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND); this.state = !this._isCharacterReferenceInAttribute() && isAsciiAlphaNumeric(this.preprocessor.peek(1)) ? State$1.AMBIGUOUS_AMPERSAND : this.returnState; - } else { - this.state = this.returnState; - } + } else this.state = this.returnState; } _stateAmbiguousAmpersand(cp) { - if (isAsciiAlphaNumeric(cp)) { - this._flushCodePointConsumedAsCharacterReference(cp); - } else { - if (cp === CODE_POINTS.SEMICOLON) { - this._err(ERR.unknownNamedCharacterReference); - } + if (isAsciiAlphaNumeric(cp)) this._flushCodePointConsumedAsCharacterReference(cp); + else { + if (cp === CODE_POINTS.SEMICOLON) this._err(ERR.unknownNamedCharacterReference); this.state = this.returnState; this._callState(cp); } } }; - //#endregion //#region ../node_modules/parse5/dist/parser/open-element-stack.js const IMPLICIT_END_TAG_REQUIRED = new Set([ @@ -143668,16 +130561,12 @@ var OpenElementStack = class { this.current = element; this.tagIDs[this.stackTop] = tagID; this.currentTagId = tagID; - if (this._isInTemplate()) { - this.tmplCount++; - } + if (this._isInTemplate()) this.tmplCount++; this.handler.onItemPush(element, tagID, true); } pop() { const popped = this.current; - if (this.tmplCount > 0 && this._isInTemplate()) { - this.tmplCount--; - } + if (this.tmplCount > 0 && this._isInTemplate()) this.tmplCount--; this.stackTop--; this._updateCurrentElement(); this.handler.onItemPop(popped, true); @@ -143685,35 +130574,27 @@ var OpenElementStack = class { replace(oldElement, newElement) { const idx = this._indexOf(oldElement); this.items[idx] = newElement; - if (idx === this.stackTop) { - this.current = newElement; - } + if (idx === this.stackTop) this.current = newElement; } insertAfter(referenceElement, newElement, newElementID) { const insertionIdx = this._indexOf(referenceElement) + 1; this.items.splice(insertionIdx, 0, newElement); this.tagIDs.splice(insertionIdx, 0, newElementID); this.stackTop++; - if (insertionIdx === this.stackTop) { - this._updateCurrentElement(); - } - if (this.current && this.currentTagId !== undefined) { - this.handler.onItemPush(this.current, this.currentTagId, insertionIdx === this.stackTop); - } + if (insertionIdx === this.stackTop) this._updateCurrentElement(); + if (this.current && this.currentTagId !== void 0) this.handler.onItemPush(this.current, this.currentTagId, insertionIdx === this.stackTop); } popUntilTagNamePopped(tagName) { let targetIdx = this.stackTop + 1; - do { + do targetIdx = this.tagIDs.lastIndexOf(tagName, targetIdx - 1); - } while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== NS.HTML); + while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== NS.HTML); this.shortenToLength(Math.max(targetIdx, 0)); } shortenToLength(idx) { while (this.stackTop >= idx) { const popped = this.current; - if (this.tmplCount > 0 && this._isInTemplate()) { - this.tmplCount -= 1; - } + if (this.tmplCount > 0 && this._isInTemplate()) this.tmplCount -= 1; this.stackTop--; this._updateCurrentElement(); this.handler.onItemPop(popped, this.stackTop < idx); @@ -143738,11 +130619,7 @@ var OpenElementStack = class { this.shortenToLength(1); } _indexOfTagNames(tagNames, namespace) { - for (let i = this.stackTop; i >= 0; i--) { - if (tagNames.has(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === namespace) { - return i; - } - } + for (let i = this.stackTop; i >= 0; i--) if (tagNames.has(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === namespace) return i; return -1; } clearBackTo(tagNames, targetNS) { @@ -143760,16 +130637,13 @@ var OpenElementStack = class { } remove(element) { const idx = this._indexOf(element); - if (idx >= 0) { - if (idx === this.stackTop) { - this.pop(); - } else { - this.items.splice(idx, 1); - this.tagIDs.splice(idx, 1); - this.stackTop--; - this._updateCurrentElement(); - this.handler.onItemPop(element, false); - } + if (idx >= 0) if (idx === this.stackTop) this.pop(); + else { + this.items.splice(idx, 1); + this.tagIDs.splice(idx, 1); + this.stackTop--; + this._updateCurrentElement(); + this.handler.onItemPop(element, false); } } tryPeekProperlyNestedBodyElement() { @@ -143789,19 +130663,16 @@ var OpenElementStack = class { for (let i = this.stackTop; i >= 0; i--) { const tn = this.tagIDs[i]; switch (this.treeAdapter.getNamespaceURI(this.items[i])) { - case NS.HTML: { + case NS.HTML: if (tn === tagName) return true; if (htmlScope.has(tn)) return false; break; - } - case NS.SVG: { + case NS.SVG: if (SCOPING_ELEMENTS_SVG.has(tn)) return false; break; - } - case NS.MATHML: { + case NS.MATHML: if (SCOPING_ELEMENTS_MATHML.has(tn)) return false; break; - } } } return true; @@ -143819,96 +130690,66 @@ var OpenElementStack = class { for (let i = this.stackTop; i >= 0; i--) { const tn = this.tagIDs[i]; switch (this.treeAdapter.getNamespaceURI(this.items[i])) { - case NS.HTML: { + case NS.HTML: if (NUMBERED_HEADERS.has(tn)) return true; if (SCOPING_ELEMENTS_HTML.has(tn)) return false; break; - } - case NS.SVG: { + case NS.SVG: if (SCOPING_ELEMENTS_SVG.has(tn)) return false; break; - } - case NS.MATHML: { + case NS.MATHML: if (SCOPING_ELEMENTS_MATHML.has(tn)) return false; break; - } } } return true; } hasInTableScope(tagName) { for (let i = this.stackTop; i >= 0; i--) { - if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) { - continue; - } + if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) continue; switch (this.tagIDs[i]) { - case tagName: { - return true; - } + case tagName: return true; case TAG_ID.TABLE: - case TAG_ID.HTML: { - return false; - } + case TAG_ID.HTML: return false; } } return true; } hasTableBodyContextInTableScope() { for (let i = this.stackTop; i >= 0; i--) { - if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) { - continue; - } + if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) continue; switch (this.tagIDs[i]) { case TAG_ID.TBODY: case TAG_ID.THEAD: - case TAG_ID.TFOOT: { - return true; - } + case TAG_ID.TFOOT: return true; case TAG_ID.TABLE: - case TAG_ID.HTML: { - return false; - } + case TAG_ID.HTML: return false; } } return true; } hasInSelectScope(tagName) { for (let i = this.stackTop; i >= 0; i--) { - if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) { - continue; - } + if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) continue; switch (this.tagIDs[i]) { - case tagName: { - return true; - } + case tagName: return true; case TAG_ID.OPTION: - case TAG_ID.OPTGROUP: { - break; - } - default: { - return false; - } + case TAG_ID.OPTGROUP: break; + default: return false; } } return true; } generateImpliedEndTags() { - while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId)) { - this.pop(); - } + while (this.currentTagId !== void 0 && IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId)) this.pop(); } generateImpliedEndTagsThoroughly() { - while (this.currentTagId !== undefined && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) { - this.pop(); - } + while (this.currentTagId !== void 0 && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) this.pop(); } generateImpliedEndTagsWithExclusion(exclusionId) { - while (this.currentTagId !== undefined && this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) { - this.pop(); - } + while (this.currentTagId !== void 0 && this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) this.pop(); } }; - //#endregion //#region ../node_modules/parse5/dist/parser/formatting-element-list.js const NOAH_ARK_CAPACITY = 3; @@ -143931,18 +130772,14 @@ var FormattingElementList = class { const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement); for (let i = 0; i < this.entries.length; i++) { const entry = this.entries[i]; - if (entry.type === EntryType.Marker) { - break; - } + if (entry.type === EntryType.Marker) break; const { element } = entry; if (this.treeAdapter.getTagName(element) === neTagName && this.treeAdapter.getNamespaceURI(element) === neNamespaceURI) { const elementAttrs = this.treeAdapter.getAttrList(element); - if (elementAttrs.length === neAttrsLength) { - candidates.push({ - idx: i, - attrs: elementAttrs - }); - } + if (elementAttrs.length === neAttrsLength) candidates.push({ + idx: i, + attrs: elementAttrs + }); } } return candidates; @@ -143958,9 +130795,7 @@ var FormattingElementList = class { const candidate = candidates[i]; if (candidate.attrs.every((cAttr) => neAttrsMap.get(cAttr.name) === cAttr.value)) { validCandidates += 1; - if (validCandidates >= NOAH_ARK_CAPACITY) { - this.entries.splice(candidate.idx, 1); - } + if (validCandidates >= NOAH_ARK_CAPACITY) this.entries.splice(candidate.idx, 1); } } } @@ -143985,9 +130820,7 @@ var FormattingElementList = class { } removeEntry(entry) { const entryIndex = this.entries.indexOf(entry); - if (entryIndex !== -1) { - this.entries.splice(entryIndex, 1); - } + if (entryIndex !== -1) this.entries.splice(entryIndex, 1); } /** * Clears the list of formatting elements up to the last marker. @@ -143996,11 +130829,8 @@ var FormattingElementList = class { */ clearToLastMarker() { const markerIdx = this.entries.indexOf(MARKER); - if (markerIdx === -1) { - this.entries.length = 0; - } else { - this.entries.splice(0, markerIdx + 1); - } + if (markerIdx === -1) this.entries.length = 0; + else this.entries.splice(0, markerIdx + 1); } getElementEntryInScopeWithTagName(tagName) { const entry = this.entries.find((entry) => entry.type === EntryType.Marker || this.treeAdapter.getTagName(entry.element) === tagName); @@ -144010,7 +130840,6 @@ var FormattingElementList = class { return this.entries.find((entry) => entry.type === EntryType.Element && entry.element === element); } }; - //#endregion //#region ../node_modules/parse5/dist/tree-adapters/default.js const defaultTreeAdapter = { @@ -144108,19 +130937,12 @@ const defaultTreeAdapter = { }, insertTextBefore(parentNode, text, referenceNode) { const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1]; - if (prevNode && defaultTreeAdapter.isTextNode(prevNode)) { - prevNode.value += text; - } else { - defaultTreeAdapter.insertBefore(parentNode, defaultTreeAdapter.createTextNode(text), referenceNode); - } + if (prevNode && defaultTreeAdapter.isTextNode(prevNode)) prevNode.value += text; + else defaultTreeAdapter.insertBefore(parentNode, defaultTreeAdapter.createTextNode(text), referenceNode); }, adoptAttributes(recipient, attrs) { const recipientAttrsMap = new Set(recipient.attrs.map((attr) => attr.name)); - for (let j = 0; j < attrs.length; j++) { - if (!recipientAttrsMap.has(attrs[j].name)) { - recipient.attrs.push(attrs[j]); - } - } + for (let j = 0; j < attrs.length; j++) if (!recipientAttrsMap.has(attrs[j].name)) recipient.attrs.push(attrs[j]); }, getFirstChild(node) { return node.childNodes[0]; @@ -144180,7 +131002,6 @@ const defaultTreeAdapter = { }; } }; - //#endregion //#region ../node_modules/parse5/dist/common/doctype.js const VALID_DOCTYPE_NAME = "html"; @@ -144266,31 +131087,20 @@ function isConforming(token) { return token.name === VALID_DOCTYPE_NAME && token.publicId === null && (token.systemId === null || token.systemId === VALID_SYSTEM_ID); } function getDocumentMode(token) { - if (token.name !== VALID_DOCTYPE_NAME) { - return DOCUMENT_MODE.QUIRKS; - } + if (token.name !== VALID_DOCTYPE_NAME) return DOCUMENT_MODE.QUIRKS; const { systemId } = token; - if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) { - return DOCUMENT_MODE.QUIRKS; - } + if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) return DOCUMENT_MODE.QUIRKS; let { publicId } = token; if (publicId !== null) { publicId = publicId.toLowerCase(); - if (QUIRKS_MODE_PUBLIC_IDS.has(publicId)) { - return DOCUMENT_MODE.QUIRKS; - } + if (QUIRKS_MODE_PUBLIC_IDS.has(publicId)) return DOCUMENT_MODE.QUIRKS; let prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES; - if (hasPrefix(publicId, prefixes)) { - return DOCUMENT_MODE.QUIRKS; - } + if (hasPrefix(publicId, prefixes)) return DOCUMENT_MODE.QUIRKS; prefixes = systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES; - if (hasPrefix(publicId, prefixes)) { - return DOCUMENT_MODE.LIMITED_QUIRKS; - } + if (hasPrefix(publicId, prefixes)) return DOCUMENT_MODE.LIMITED_QUIRKS; } return DOCUMENT_MODE.NO_QUIRKS; } - //#endregion //#region ../node_modules/parse5/dist/common/foreign-content.js const MIME_TYPES = { @@ -144502,23 +131312,18 @@ const EXITS_FOREIGN_CONTENT = new Set([ ]); function causesExit(startTagToken) { const tn = startTagToken.tagID; - const isFontWithAttrs = tn === TAG_ID.FONT && startTagToken.attrs.some(({ name }) => name === ATTRS.COLOR || name === ATTRS.SIZE || name === ATTRS.FACE); - return isFontWithAttrs || EXITS_FOREIGN_CONTENT.has(tn); + return tn === TAG_ID.FONT && startTagToken.attrs.some(({ name }) => name === ATTRS.COLOR || name === ATTRS.SIZE || name === ATTRS.FACE) || EXITS_FOREIGN_CONTENT.has(tn); } function adjustTokenMathMLAttrs(token) { - for (let i = 0; i < token.attrs.length; i++) { - if (token.attrs[i].name === DEFINITION_URL_ATTR) { - token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR; - break; - } + for (let i = 0; i < token.attrs.length; i++) if (token.attrs[i].name === DEFINITION_URL_ATTR) { + token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR; + break; } } function adjustTokenSVGAttrs(token) { for (let i = 0; i < token.attrs.length; i++) { const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name); - if (adjustedAttrName != null) { - token.attrs[i].name = adjustedAttrName; - } + if (adjustedAttrName != null) token.attrs[i].name = adjustedAttrName; } } function adjustTokenXMLAttrs(token) { @@ -144543,11 +131348,9 @@ function isMathMLTextIntegrationPoint(tn, ns) { } function isHtmlIntegrationPoint(tn, ns, attrs) { if (ns === NS.MATHML && tn === TAG_ID.ANNOTATION_XML) { - for (let i = 0; i < attrs.length; i++) { - if (attrs[i].name === ATTRS.ENCODING) { - const value = attrs[i].value.toLowerCase(); - return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML; - } + for (let i = 0; i < attrs.length; i++) if (attrs[i].name === ATTRS.ENCODING) { + const value = attrs[i].value.toLowerCase(); + return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML; } } return ns === NS.SVG && (tn === TAG_ID.FOREIGN_OBJECT || tn === TAG_ID.DESC || tn === TAG_ID.TITLE); @@ -144555,7 +131358,6 @@ function isHtmlIntegrationPoint(tn, ns, attrs) { function isIntegrationPoint(tn, ns, attrs, foreignNS) { return (!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs) || (!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns); } - //#endregion //#region ../node_modules/parse5/dist/parser/index.js const HIDDEN_INPUT_TYPE = "hidden"; @@ -144647,9 +131449,7 @@ var Parser = class { }; this.treeAdapter = this.options.treeAdapter; this.onParseError = this.options.onParseError; - if (this.onParseError) { - this.options.sourceCodeLocationInfo = true; - } + if (this.onParseError) this.options.sourceCodeLocationInfo = true; this.document = document !== null && document !== void 0 ? document : this.treeAdapter.createDocument(); this.tokenizer = new Tokenizer(this.options, this); this.activeFormattingElements = new FormattingElementList(this.treeAdapter); @@ -144667,12 +131467,10 @@ var Parser = class { ...defaultParserOptions, ...options }; - fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : fragmentContext = opts.treeAdapter.createElement(TAG_NAMES.TEMPLATE, NS.HTML, []); + fragmentContext !== null && fragmentContext !== void 0 || (fragmentContext = opts.treeAdapter.createElement(TAG_NAMES.TEMPLATE, NS.HTML, [])); const documentMock = opts.treeAdapter.createElement("documentmock", NS.HTML, []); const parser = new this(opts, documentMock, fragmentContext); - if (parser.fragmentContextID === TAG_ID.TEMPLATE) { - parser.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE); - } + if (parser.fragmentContextID === TAG_ID.TEMPLATE) parser.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE); parser._initTokenizerForFragmentParsing(); parser._insertFakeRootElement(); parser._resetInsertionMode(); @@ -144704,32 +131502,28 @@ var Parser = class { /** @internal */ onItemPush(node, tid, isTop) { var _a, _b; - (_b = (_a = this.treeAdapter).onItemPush) === null || _b === void 0 ? void 0 : _b.call(_a, node); + (_b = (_a = this.treeAdapter).onItemPush) === null || _b === void 0 || _b.call(_a, node); if (isTop && this.openElements.stackTop > 0) this._setContextModes(node, tid); } /** @internal */ onItemPop(node, isTop) { var _a, _b; - if (this.options.sourceCodeLocationInfo) { - this._setEndLocation(node, this.currentToken); - } - (_b = (_a = this.treeAdapter).onItemPop) === null || _b === void 0 ? void 0 : _b.call(_a, node, this.openElements.current); + if (this.options.sourceCodeLocationInfo) this._setEndLocation(node, this.currentToken); + (_b = (_a = this.treeAdapter).onItemPop) === null || _b === void 0 || _b.call(_a, node, this.openElements.current); if (isTop) { let current; let currentTagId; if (this.openElements.stackTop === 0 && this.fragmentContext) { current = this.fragmentContext; currentTagId = this.fragmentContextID; - } else { - ({current, currentTagId} = this.openElements); - } + } else ({current, currentTagId} = this.openElements); this._setContextModes(current, currentTagId); } } _setContextModes(current, tid) { const isHTML = current === this.document || current && this.treeAdapter.getNamespaceURI(current) === NS.HTML; this.currentNotInHTML = !isHTML; - this.tokenizer.inForeignNode = !isHTML && current !== undefined && tid !== undefined && !this._isIntegrationPoint(tid, current); + this.tokenizer.inForeignNode = !isHTML && current !== void 0 && tid !== void 0 && !this._isIntegrationPoint(tid, current); } /** @protected */ _switchToTextParsing(currentToken, nextTokenizerState) { @@ -144759,32 +131553,26 @@ var Parser = class { } } _initTokenizerForFragmentParsing() { - if (!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== NS.HTML) { - return; - } + if (!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== NS.HTML) return; switch (this.fragmentContextID) { case TAG_ID.TITLE: - case TAG_ID.TEXTAREA: { + case TAG_ID.TEXTAREA: this.tokenizer.state = TokenizerMode.RCDATA; break; - } case TAG_ID.STYLE: case TAG_ID.XMP: case TAG_ID.IFRAME: case TAG_ID.NOEMBED: case TAG_ID.NOFRAMES: - case TAG_ID.NOSCRIPT: { + case TAG_ID.NOSCRIPT: this.tokenizer.state = TokenizerMode.RAWTEXT; break; - } - case TAG_ID.SCRIPT: { + case TAG_ID.SCRIPT: this.tokenizer.state = TokenizerMode.SCRIPT_DATA; break; - } - case TAG_ID.PLAINTEXT: { + case TAG_ID.PLAINTEXT: this.tokenizer.state = TokenizerMode.PLAINTEXT; break; - } default: } } @@ -144795,11 +131583,8 @@ var Parser = class { const systemId = token.systemId || ""; this.treeAdapter.setDocumentType(this.document, name, publicId, systemId); if (token.location) { - const documentChildren = this.treeAdapter.getChildNodes(this.document); - const docTypeNode = documentChildren.find((node) => this.treeAdapter.isDocumentTypeNode(node)); - if (docTypeNode) { - this.treeAdapter.setNodeSourceCodeLocation(docTypeNode, token.location); - } + const docTypeNode = this.treeAdapter.getChildNodes(this.document).find((node) => this.treeAdapter.isDocumentTypeNode(node)); + if (docTypeNode) this.treeAdapter.setNodeSourceCodeLocation(docTypeNode, token.location); } } /** @protected */ @@ -144811,9 +131596,8 @@ var Parser = class { }; this.treeAdapter.setNodeSourceCodeLocation(element, loc); } - if (this._shouldFosterParentOnInsertion()) { - this._fosterParentElement(element); - } else { + if (this._shouldFosterParentOnInsertion()) this._fosterParentElement(element); + else { const parent = this.openElements.currentTmplContentOrNode; this.treeAdapter.appendChild(parent !== null && parent !== void 0 ? parent : this.document, element); } @@ -144859,9 +131643,7 @@ var Parser = class { _appendCommentNode(token, parent) { const commentNode = this.treeAdapter.createCommentNode(token.data); this.treeAdapter.appendChild(parent, commentNode); - if (this.options.sourceCodeLocationInfo) { - this.treeAdapter.setNodeSourceCodeLocation(commentNode, token.location); - } + if (this.options.sourceCodeLocationInfo) this.treeAdapter.setNodeSourceCodeLocation(commentNode, token.location); } /** @protected */ _insertCharacters(token) { @@ -144869,30 +131651,23 @@ var Parser = class { let beforeElement; if (this._shouldFosterParentOnInsertion()) { ({parent, beforeElement} = this._findFosterParentingLocation()); - if (beforeElement) { - this.treeAdapter.insertTextBefore(parent, token.chars, beforeElement); - } else { - this.treeAdapter.insertText(parent, token.chars); - } + if (beforeElement) this.treeAdapter.insertTextBefore(parent, token.chars, beforeElement); + else this.treeAdapter.insertText(parent, token.chars); } else { parent = this.openElements.currentTmplContentOrNode; this.treeAdapter.insertText(parent, token.chars); } if (!token.location) return; const siblings = this.treeAdapter.getChildNodes(parent); - const textNodeIdx = beforeElement ? siblings.lastIndexOf(beforeElement) : siblings.length; - const textNode = siblings[textNodeIdx - 1]; - const tnLoc = this.treeAdapter.getNodeSourceCodeLocation(textNode); - if (tnLoc) { + const textNode = siblings[(beforeElement ? siblings.lastIndexOf(beforeElement) : siblings.length) - 1]; + if (this.treeAdapter.getNodeSourceCodeLocation(textNode)) { const { endLine, endCol, endOffset } = token.location; this.treeAdapter.updateNodeSourceCodeLocation(textNode, { endLine, endCol, endOffset }); - } else if (this.options.sourceCodeLocationInfo) { - this.treeAdapter.setNodeSourceCodeLocation(textNode, token.location); - } + } else if (this.options.sourceCodeLocationInfo) this.treeAdapter.setNodeSourceCodeLocation(textNode, token.location); } /** @protected */ _adoptNodes(donor, recipient) { @@ -144926,56 +131701,42 @@ var Parser = class { if (this.openElements.stackTop === 0 && this.fragmentContext) { current = this.fragmentContext; currentTagId = this.fragmentContextID; - } else { - ({current, currentTagId} = this.openElements); - } - if (token.tagID === TAG_ID.SVG && this.treeAdapter.getTagName(current) === TAG_NAMES.ANNOTATION_XML && this.treeAdapter.getNamespaceURI(current) === NS.MATHML) { - return false; - } - return this.tokenizer.inForeignNode || (token.tagID === TAG_ID.MGLYPH || token.tagID === TAG_ID.MALIGNMARK) && currentTagId !== undefined && !this._isIntegrationPoint(currentTagId, current, NS.HTML); + } else ({current, currentTagId} = this.openElements); + if (token.tagID === TAG_ID.SVG && this.treeAdapter.getTagName(current) === TAG_NAMES.ANNOTATION_XML && this.treeAdapter.getNamespaceURI(current) === NS.MATHML) return false; + return this.tokenizer.inForeignNode || (token.tagID === TAG_ID.MGLYPH || token.tagID === TAG_ID.MALIGNMARK) && currentTagId !== void 0 && !this._isIntegrationPoint(currentTagId, current, NS.HTML); } /** @protected */ _processToken(token) { switch (token.type) { - case TokenType.CHARACTER: { + case TokenType.CHARACTER: this.onCharacter(token); break; - } - case TokenType.NULL_CHARACTER: { + case TokenType.NULL_CHARACTER: this.onNullCharacter(token); break; - } - case TokenType.COMMENT: { + case TokenType.COMMENT: this.onComment(token); break; - } - case TokenType.DOCTYPE: { + case TokenType.DOCTYPE: this.onDoctype(token); break; - } - case TokenType.START_TAG: { + case TokenType.START_TAG: this._processStartTag(token); break; - } - case TokenType.END_TAG: { + case TokenType.END_TAG: this.onEndTag(token); break; - } - case TokenType.EOF: { + case TokenType.EOF: this.onEof(token); break; - } - case TokenType.WHITESPACE_CHARACTER: { + case TokenType.WHITESPACE_CHARACTER: this.onWhitespaceCharacter(token); break; - } } } /** @protected */ _isIntegrationPoint(tid, element, foreignNS) { - const ns = this.treeAdapter.getNamespaceURI(element); - const attrs = this.treeAdapter.getAttrList(element); - return isIntegrationPoint(tid, ns, attrs, foreignNS); + return isIntegrationPoint(tid, this.treeAdapter.getNamespaceURI(element), this.treeAdapter.getAttrList(element), foreignNS); } /** @protected */ _reconstructActiveFormattingElements() { @@ -145004,80 +131765,63 @@ var Parser = class { } /** @protected */ _resetInsertionMode() { - for (let i = this.openElements.stackTop; i >= 0; i--) { - switch (i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i]) { - case TAG_ID.TR: { - this.insertionMode = InsertionMode.IN_ROW; - return; - } - case TAG_ID.TBODY: - case TAG_ID.THEAD: - case TAG_ID.TFOOT: { - this.insertionMode = InsertionMode.IN_TABLE_BODY; - return; - } - case TAG_ID.CAPTION: { - this.insertionMode = InsertionMode.IN_CAPTION; - return; - } - case TAG_ID.COLGROUP: { - this.insertionMode = InsertionMode.IN_COLUMN_GROUP; - return; - } - case TAG_ID.TABLE: { - this.insertionMode = InsertionMode.IN_TABLE; - return; - } - case TAG_ID.BODY: { - this.insertionMode = InsertionMode.IN_BODY; - return; - } - case TAG_ID.FRAMESET: { - this.insertionMode = InsertionMode.IN_FRAMESET; - return; - } - case TAG_ID.SELECT: { - this._resetInsertionModeForSelect(i); - return; - } - case TAG_ID.TEMPLATE: { - this.insertionMode = this.tmplInsertionModeStack[0]; + for (let i = this.openElements.stackTop; i >= 0; i--) switch (i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i]) { + case TAG_ID.TR: + this.insertionMode = InsertionMode.IN_ROW; + return; + case TAG_ID.TBODY: + case TAG_ID.THEAD: + case TAG_ID.TFOOT: + this.insertionMode = InsertionMode.IN_TABLE_BODY; + return; + case TAG_ID.CAPTION: + this.insertionMode = InsertionMode.IN_CAPTION; + return; + case TAG_ID.COLGROUP: + this.insertionMode = InsertionMode.IN_COLUMN_GROUP; + return; + case TAG_ID.TABLE: + this.insertionMode = InsertionMode.IN_TABLE; + return; + case TAG_ID.BODY: + this.insertionMode = InsertionMode.IN_BODY; + return; + case TAG_ID.FRAMESET: + this.insertionMode = InsertionMode.IN_FRAMESET; + return; + case TAG_ID.SELECT: + this._resetInsertionModeForSelect(i); + return; + case TAG_ID.TEMPLATE: + this.insertionMode = this.tmplInsertionModeStack[0]; + return; + case TAG_ID.HTML: + this.insertionMode = this.headElement ? InsertionMode.AFTER_HEAD : InsertionMode.BEFORE_HEAD; + return; + case TAG_ID.TD: + case TAG_ID.TH: + if (i > 0) { + this.insertionMode = InsertionMode.IN_CELL; return; } - case TAG_ID.HTML: { - this.insertionMode = this.headElement ? InsertionMode.AFTER_HEAD : InsertionMode.BEFORE_HEAD; + break; + case TAG_ID.HEAD: + if (i > 0) { + this.insertionMode = InsertionMode.IN_HEAD; return; } - case TAG_ID.TD: - case TAG_ID.TH: { - if (i > 0) { - this.insertionMode = InsertionMode.IN_CELL; - return; - } - break; - } - case TAG_ID.HEAD: { - if (i > 0) { - this.insertionMode = InsertionMode.IN_HEAD; - return; - } - break; - } - } + break; } this.insertionMode = InsertionMode.IN_BODY; } /** @protected */ _resetInsertionModeForSelect(selectIdx) { - if (selectIdx > 0) { - for (let i = selectIdx - 1; i > 0; i--) { - const tn = this.openElements.tagIDs[i]; - if (tn === TAG_ID.TEMPLATE) { - break; - } else if (tn === TAG_ID.TABLE) { - this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE; - return; - } + if (selectIdx > 0) for (let i = selectIdx - 1; i > 0; i--) { + const tn = this.openElements.tagIDs[i]; + if (tn === TAG_ID.TEMPLATE) break; + else if (tn === TAG_ID.TABLE) { + this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE; + return; } } this.insertionMode = InsertionMode.IN_SELECT; @@ -145088,30 +131832,25 @@ var Parser = class { } /** @protected */ _shouldFosterParentOnInsertion() { - return this.fosterParentingEnabled && this.openElements.currentTagId !== undefined && this._isElementCausesFosterParenting(this.openElements.currentTagId); + return this.fosterParentingEnabled && this.openElements.currentTagId !== void 0 && this._isElementCausesFosterParenting(this.openElements.currentTagId); } /** @protected */ _findFosterParentingLocation() { for (let i = this.openElements.stackTop; i >= 0; i--) { const openElement = this.openElements.items[i]; switch (this.openElements.tagIDs[i]) { - case TAG_ID.TEMPLATE: { - if (this.treeAdapter.getNamespaceURI(openElement) === NS.HTML) { - return { - parent: this.treeAdapter.getTemplateContent(openElement), - beforeElement: null - }; - } + case TAG_ID.TEMPLATE: + if (this.treeAdapter.getNamespaceURI(openElement) === NS.HTML) return { + parent: this.treeAdapter.getTemplateContent(openElement), + beforeElement: null + }; break; - } case TAG_ID.TABLE: { const parent = this.treeAdapter.getParentNode(openElement); - if (parent) { - return { - parent, - beforeElement: openElement - }; - } + if (parent) return { + parent, + beforeElement: openElement + }; return { parent: this.openElements.items[i - 1], beforeElement: null @@ -145128,16 +131867,12 @@ var Parser = class { /** @protected */ _fosterParentElement(element) { const location = this._findFosterParentingLocation(); - if (location.beforeElement) { - this.treeAdapter.insertBefore(location.parent, element, location.beforeElement); - } else { - this.treeAdapter.appendChild(location.parent, element); - } + if (location.beforeElement) this.treeAdapter.insertBefore(location.parent, element, location.beforeElement); + else this.treeAdapter.appendChild(location.parent, element); } /** @protected */ _isSpecialElement(element, id) { - const ns = this.treeAdapter.getNamespaceURI(element); - return SPECIAL_ELEMENTS[ns].has(id); + return SPECIAL_ELEMENTS[this.treeAdapter.getNamespaceURI(element)].has(id); } /** @internal */ onCharacter(token) { @@ -145147,65 +131882,52 @@ var Parser = class { return; } switch (this.insertionMode) { - case InsertionMode.INITIAL: { + case InsertionMode.INITIAL: tokenInInitialMode(this, token); break; - } - case InsertionMode.BEFORE_HTML: { + case InsertionMode.BEFORE_HTML: tokenBeforeHtml(this, token); break; - } - case InsertionMode.BEFORE_HEAD: { + case InsertionMode.BEFORE_HEAD: tokenBeforeHead(this, token); break; - } - case InsertionMode.IN_HEAD: { + case InsertionMode.IN_HEAD: tokenInHead(this, token); break; - } - case InsertionMode.IN_HEAD_NO_SCRIPT: { + case InsertionMode.IN_HEAD_NO_SCRIPT: tokenInHeadNoScript(this, token); break; - } - case InsertionMode.AFTER_HEAD: { + case InsertionMode.AFTER_HEAD: tokenAfterHead(this, token); break; - } case InsertionMode.IN_BODY: case InsertionMode.IN_CAPTION: case InsertionMode.IN_CELL: - case InsertionMode.IN_TEMPLATE: { + case InsertionMode.IN_TEMPLATE: characterInBody(this, token); break; - } case InsertionMode.TEXT: case InsertionMode.IN_SELECT: - case InsertionMode.IN_SELECT_IN_TABLE: { + case InsertionMode.IN_SELECT_IN_TABLE: this._insertCharacters(token); break; - } case InsertionMode.IN_TABLE: case InsertionMode.IN_TABLE_BODY: - case InsertionMode.IN_ROW: { + case InsertionMode.IN_ROW: characterInTable(this, token); break; - } - case InsertionMode.IN_TABLE_TEXT: { + case InsertionMode.IN_TABLE_TEXT: characterInTableText(this, token); break; - } - case InsertionMode.IN_COLUMN_GROUP: { + case InsertionMode.IN_COLUMN_GROUP: tokenInColumnGroup(this, token); break; - } - case InsertionMode.AFTER_BODY: { + case InsertionMode.AFTER_BODY: tokenAfterBody(this, token); break; - } - case InsertionMode.AFTER_AFTER_BODY: { + case InsertionMode.AFTER_AFTER_BODY: tokenAfterAfterBody(this, token); break; - } default: } } @@ -145217,52 +131939,41 @@ var Parser = class { return; } switch (this.insertionMode) { - case InsertionMode.INITIAL: { + case InsertionMode.INITIAL: tokenInInitialMode(this, token); break; - } - case InsertionMode.BEFORE_HTML: { + case InsertionMode.BEFORE_HTML: tokenBeforeHtml(this, token); break; - } - case InsertionMode.BEFORE_HEAD: { + case InsertionMode.BEFORE_HEAD: tokenBeforeHead(this, token); break; - } - case InsertionMode.IN_HEAD: { + case InsertionMode.IN_HEAD: tokenInHead(this, token); break; - } - case InsertionMode.IN_HEAD_NO_SCRIPT: { + case InsertionMode.IN_HEAD_NO_SCRIPT: tokenInHeadNoScript(this, token); break; - } - case InsertionMode.AFTER_HEAD: { + case InsertionMode.AFTER_HEAD: tokenAfterHead(this, token); break; - } - case InsertionMode.TEXT: { + case InsertionMode.TEXT: this._insertCharacters(token); break; - } case InsertionMode.IN_TABLE: case InsertionMode.IN_TABLE_BODY: - case InsertionMode.IN_ROW: { + case InsertionMode.IN_ROW: characterInTable(this, token); break; - } - case InsertionMode.IN_COLUMN_GROUP: { + case InsertionMode.IN_COLUMN_GROUP: tokenInColumnGroup(this, token); break; - } - case InsertionMode.AFTER_BODY: { + case InsertionMode.AFTER_BODY: tokenAfterBody(this, token); break; - } - case InsertionMode.AFTER_AFTER_BODY: { + case InsertionMode.AFTER_AFTER_BODY: tokenAfterAfterBody(this, token); break; - } default: } } @@ -145291,23 +132002,19 @@ var Parser = class { case InsertionMode.IN_SELECT_IN_TABLE: case InsertionMode.IN_TEMPLATE: case InsertionMode.IN_FRAMESET: - case InsertionMode.AFTER_FRAMESET: { + case InsertionMode.AFTER_FRAMESET: appendComment(this, token); break; - } - case InsertionMode.IN_TABLE_TEXT: { + case InsertionMode.IN_TABLE_TEXT: tokenInTableText(this, token); break; - } - case InsertionMode.AFTER_BODY: { + case InsertionMode.AFTER_BODY: appendCommentToRootHtmlElement(this, token); break; - } case InsertionMode.AFTER_AFTER_BODY: - case InsertionMode.AFTER_AFTER_FRAMESET: { + case InsertionMode.AFTER_AFTER_FRAMESET: appendCommentToDocument(this, token); break; - } default: } } @@ -145315,21 +132022,18 @@ var Parser = class { onDoctype(token) { this.skipNextNewLine = false; switch (this.insertionMode) { - case InsertionMode.INITIAL: { + case InsertionMode.INITIAL: doctypeInInitialMode(this, token); break; - } case InsertionMode.BEFORE_HEAD: case InsertionMode.IN_HEAD: case InsertionMode.IN_HEAD_NO_SCRIPT: - case InsertionMode.AFTER_HEAD: { + case InsertionMode.AFTER_HEAD: this._err(token, ERR.misplacedDoctype); break; - } - case InsertionMode.IN_TABLE_TEXT: { + case InsertionMode.IN_TABLE_TEXT: tokenInTableText(this, token); break; - } default: } } @@ -145338,9 +132042,7 @@ var Parser = class { this.skipNextNewLine = false; this.currentToken = token; this._processStartTag(token); - if (token.selfClosing && !token.ackSelfClosing) { - this._err(token, ERR.nonVoidHtmlElementStartTagWithTrailingSolidus); - } + if (token.selfClosing && !token.ackSelfClosing) this._err(token, ERR.nonVoidHtmlElementStartTagWithTrailingSolidus); } /** * Processes a given start tag. @@ -145354,103 +132056,78 @@ var Parser = class { * @protected */ _processStartTag(token) { - if (this.shouldProcessStartTagTokenInForeignContent(token)) { - startTagInForeignContent(this, token); - } else { - this._startTagOutsideForeignContent(token); - } + if (this.shouldProcessStartTagTokenInForeignContent(token)) startTagInForeignContent(this, token); + else this._startTagOutsideForeignContent(token); } /** @protected */ _startTagOutsideForeignContent(token) { switch (this.insertionMode) { - case InsertionMode.INITIAL: { + case InsertionMode.INITIAL: tokenInInitialMode(this, token); break; - } - case InsertionMode.BEFORE_HTML: { + case InsertionMode.BEFORE_HTML: startTagBeforeHtml(this, token); break; - } - case InsertionMode.BEFORE_HEAD: { + case InsertionMode.BEFORE_HEAD: startTagBeforeHead(this, token); break; - } - case InsertionMode.IN_HEAD: { + case InsertionMode.IN_HEAD: startTagInHead(this, token); break; - } - case InsertionMode.IN_HEAD_NO_SCRIPT: { + case InsertionMode.IN_HEAD_NO_SCRIPT: startTagInHeadNoScript(this, token); break; - } - case InsertionMode.AFTER_HEAD: { + case InsertionMode.AFTER_HEAD: startTagAfterHead(this, token); break; - } - case InsertionMode.IN_BODY: { + case InsertionMode.IN_BODY: startTagInBody(this, token); break; - } - case InsertionMode.IN_TABLE: { + case InsertionMode.IN_TABLE: startTagInTable(this, token); break; - } - case InsertionMode.IN_TABLE_TEXT: { + case InsertionMode.IN_TABLE_TEXT: tokenInTableText(this, token); break; - } - case InsertionMode.IN_CAPTION: { + case InsertionMode.IN_CAPTION: startTagInCaption(this, token); break; - } - case InsertionMode.IN_COLUMN_GROUP: { + case InsertionMode.IN_COLUMN_GROUP: startTagInColumnGroup(this, token); break; - } - case InsertionMode.IN_TABLE_BODY: { + case InsertionMode.IN_TABLE_BODY: startTagInTableBody(this, token); break; - } - case InsertionMode.IN_ROW: { + case InsertionMode.IN_ROW: startTagInRow(this, token); break; - } - case InsertionMode.IN_CELL: { + case InsertionMode.IN_CELL: startTagInCell(this, token); break; - } - case InsertionMode.IN_SELECT: { + case InsertionMode.IN_SELECT: startTagInSelect(this, token); break; - } - case InsertionMode.IN_SELECT_IN_TABLE: { + case InsertionMode.IN_SELECT_IN_TABLE: startTagInSelectInTable(this, token); break; - } - case InsertionMode.IN_TEMPLATE: { + case InsertionMode.IN_TEMPLATE: startTagInTemplate(this, token); break; - } - case InsertionMode.AFTER_BODY: { + case InsertionMode.AFTER_BODY: startTagAfterBody(this, token); break; - } - case InsertionMode.IN_FRAMESET: { + case InsertionMode.IN_FRAMESET: startTagInFrameset(this, token); break; - } - case InsertionMode.AFTER_FRAMESET: { + case InsertionMode.AFTER_FRAMESET: startTagAfterFrameset(this, token); break; - } - case InsertionMode.AFTER_AFTER_BODY: { + case InsertionMode.AFTER_AFTER_BODY: startTagAfterAfterBody(this, token); break; - } - case InsertionMode.AFTER_AFTER_FRAMESET: { + case InsertionMode.AFTER_AFTER_FRAMESET: startTagAfterAfterFrameset(this, token); break; - } default: } } @@ -145458,133 +132135,102 @@ var Parser = class { onEndTag(token) { this.skipNextNewLine = false; this.currentToken = token; - if (this.currentNotInHTML) { - endTagInForeignContent(this, token); - } else { - this._endTagOutsideForeignContent(token); - } + if (this.currentNotInHTML) endTagInForeignContent(this, token); + else this._endTagOutsideForeignContent(token); } /** @protected */ _endTagOutsideForeignContent(token) { switch (this.insertionMode) { - case InsertionMode.INITIAL: { + case InsertionMode.INITIAL: tokenInInitialMode(this, token); break; - } - case InsertionMode.BEFORE_HTML: { + case InsertionMode.BEFORE_HTML: endTagBeforeHtml(this, token); break; - } - case InsertionMode.BEFORE_HEAD: { + case InsertionMode.BEFORE_HEAD: endTagBeforeHead(this, token); break; - } - case InsertionMode.IN_HEAD: { + case InsertionMode.IN_HEAD: endTagInHead(this, token); break; - } - case InsertionMode.IN_HEAD_NO_SCRIPT: { + case InsertionMode.IN_HEAD_NO_SCRIPT: endTagInHeadNoScript(this, token); break; - } - case InsertionMode.AFTER_HEAD: { + case InsertionMode.AFTER_HEAD: endTagAfterHead(this, token); break; - } - case InsertionMode.IN_BODY: { + case InsertionMode.IN_BODY: endTagInBody(this, token); break; - } - case InsertionMode.TEXT: { + case InsertionMode.TEXT: endTagInText(this, token); break; - } - case InsertionMode.IN_TABLE: { + case InsertionMode.IN_TABLE: endTagInTable(this, token); break; - } - case InsertionMode.IN_TABLE_TEXT: { + case InsertionMode.IN_TABLE_TEXT: tokenInTableText(this, token); break; - } - case InsertionMode.IN_CAPTION: { + case InsertionMode.IN_CAPTION: endTagInCaption(this, token); break; - } - case InsertionMode.IN_COLUMN_GROUP: { + case InsertionMode.IN_COLUMN_GROUP: endTagInColumnGroup(this, token); break; - } - case InsertionMode.IN_TABLE_BODY: { + case InsertionMode.IN_TABLE_BODY: endTagInTableBody(this, token); break; - } - case InsertionMode.IN_ROW: { + case InsertionMode.IN_ROW: endTagInRow(this, token); break; - } - case InsertionMode.IN_CELL: { + case InsertionMode.IN_CELL: endTagInCell(this, token); break; - } - case InsertionMode.IN_SELECT: { + case InsertionMode.IN_SELECT: endTagInSelect(this, token); break; - } - case InsertionMode.IN_SELECT_IN_TABLE: { + case InsertionMode.IN_SELECT_IN_TABLE: endTagInSelectInTable(this, token); break; - } - case InsertionMode.IN_TEMPLATE: { + case InsertionMode.IN_TEMPLATE: endTagInTemplate(this, token); break; - } - case InsertionMode.AFTER_BODY: { + case InsertionMode.AFTER_BODY: endTagAfterBody(this, token); break; - } - case InsertionMode.IN_FRAMESET: { + case InsertionMode.IN_FRAMESET: endTagInFrameset(this, token); break; - } - case InsertionMode.AFTER_FRAMESET: { + case InsertionMode.AFTER_FRAMESET: endTagAfterFrameset(this, token); break; - } - case InsertionMode.AFTER_AFTER_BODY: { + case InsertionMode.AFTER_AFTER_BODY: tokenAfterAfterBody(this, token); break; - } default: } } /** @internal */ onEof(token) { switch (this.insertionMode) { - case InsertionMode.INITIAL: { + case InsertionMode.INITIAL: tokenInInitialMode(this, token); break; - } - case InsertionMode.BEFORE_HTML: { + case InsertionMode.BEFORE_HTML: tokenBeforeHtml(this, token); break; - } - case InsertionMode.BEFORE_HEAD: { + case InsertionMode.BEFORE_HEAD: tokenBeforeHead(this, token); break; - } - case InsertionMode.IN_HEAD: { + case InsertionMode.IN_HEAD: tokenInHead(this, token); break; - } - case InsertionMode.IN_HEAD_NO_SCRIPT: { + case InsertionMode.IN_HEAD_NO_SCRIPT: tokenInHeadNoScript(this, token); break; - } - case InsertionMode.AFTER_HEAD: { + case InsertionMode.AFTER_HEAD: tokenAfterHead(this, token); break; - } case InsertionMode.IN_BODY: case InsertionMode.IN_TABLE: case InsertionMode.IN_CAPTION: @@ -145593,30 +132239,25 @@ var Parser = class { case InsertionMode.IN_ROW: case InsertionMode.IN_CELL: case InsertionMode.IN_SELECT: - case InsertionMode.IN_SELECT_IN_TABLE: { + case InsertionMode.IN_SELECT_IN_TABLE: eofInBody(this, token); break; - } - case InsertionMode.TEXT: { + case InsertionMode.TEXT: eofInText(this, token); break; - } - case InsertionMode.IN_TABLE_TEXT: { + case InsertionMode.IN_TABLE_TEXT: tokenInTableText(this, token); break; - } - case InsertionMode.IN_TEMPLATE: { + case InsertionMode.IN_TEMPLATE: eofInTemplate(this, token); break; - } case InsertionMode.AFTER_BODY: case InsertionMode.IN_FRAMESET: case InsertionMode.AFTER_FRAMESET: case InsertionMode.AFTER_AFTER_BODY: - case InsertionMode.AFTER_AFTER_FRAMESET: { + case InsertionMode.AFTER_AFTER_FRAMESET: stopParsing(this, token); break; - } default: } } @@ -145625,9 +132266,7 @@ var Parser = class { if (this.skipNextNewLine) { this.skipNextNewLine = false; if (token.chars.charCodeAt(0) === CODE_POINTS.LINE_FEED) { - if (token.chars.length === 1) { - return; - } + if (token.chars.length === 1) return; token.chars = token.chars.substr(1); } } @@ -145644,30 +132283,26 @@ var Parser = class { case InsertionMode.IN_SELECT: case InsertionMode.IN_SELECT_IN_TABLE: case InsertionMode.IN_FRAMESET: - case InsertionMode.AFTER_FRAMESET: { + case InsertionMode.AFTER_FRAMESET: this._insertCharacters(token); break; - } case InsertionMode.IN_BODY: case InsertionMode.IN_CAPTION: case InsertionMode.IN_CELL: case InsertionMode.IN_TEMPLATE: case InsertionMode.AFTER_BODY: case InsertionMode.AFTER_AFTER_BODY: - case InsertionMode.AFTER_AFTER_FRAMESET: { + case InsertionMode.AFTER_AFTER_FRAMESET: whitespaceCharacterInBody(this, token); break; - } case InsertionMode.IN_TABLE: case InsertionMode.IN_TABLE_BODY: - case InsertionMode.IN_ROW: { + case InsertionMode.IN_ROW: characterInTable(this, token); break; - } - case InsertionMode.IN_TABLE_TEXT: { + case InsertionMode.IN_TABLE_TEXT: whitespaceCharacterInTableText(this, token); break; - } default: } } @@ -145678,12 +132313,8 @@ function aaObtainFormattingElementEntry(p, token) { if (!p.openElements.contains(formattingElementEntry.element)) { p.activeFormattingElements.removeEntry(formattingElementEntry); formattingElementEntry = null; - } else if (!p.openElements.hasInScope(token.tagID)) { - formattingElementEntry = null; - } - } else { - genericEndTagInBody(p, token); - } + } else if (!p.openElements.hasInScope(token.tagID)) formattingElementEntry = null; + } else genericEndTagInBody(p, token); return formattingElementEntry; } function aaObtainFurthestBlock(p, formattingElementEntry) { @@ -145691,12 +132322,8 @@ function aaObtainFurthestBlock(p, formattingElementEntry) { let idx = p.openElements.stackTop; for (; idx >= 0; idx--) { const element = p.openElements.items[idx]; - if (element === formattingElementEntry.element) { - break; - } - if (p._isSpecialElement(element, p.openElements.tagIDs[idx])) { - furthestBlock = element; - } + if (element === formattingElementEntry.element) break; + if (p._isSpecialElement(element, p.openElements.tagIDs[idx])) furthestBlock = element; } if (!furthestBlock) { p.openElements.shortenToLength(Math.max(idx, 0)); @@ -145711,17 +132338,12 @@ function aaInnerLoop(p, furthestBlock, formattingElement) { nextElement = p.openElements.getCommonAncestor(element); const elementEntry = p.activeFormattingElements.getElementEntry(element); const counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER; - const shouldRemoveFromOpenElements = !elementEntry || counterOverflow; - if (shouldRemoveFromOpenElements) { - if (counterOverflow) { - p.activeFormattingElements.removeEntry(elementEntry); - } + if (!elementEntry || counterOverflow) { + if (counterOverflow) p.activeFormattingElements.removeEntry(elementEntry); p.openElements.remove(element); } else { element = aaRecreateElementFromEntry(p, elementEntry); - if (lastElement === furthestBlock) { - p.activeFormattingElements.bookmark = elementEntry; - } + if (lastElement === furthestBlock) p.activeFormattingElements.bookmark = elementEntry; p.treeAdapter.detachNode(lastElement); p.treeAdapter.appendChild(element, lastElement); lastElement = element; @@ -145737,15 +132359,11 @@ function aaRecreateElementFromEntry(p, elementEntry) { return newElement; } function aaInsertLastNodeInCommonAncestor(p, commonAncestor, lastElement) { - const tn = p.treeAdapter.getTagName(commonAncestor); - const tid = getTagID(tn); - if (p._isElementCausesFosterParenting(tid)) { - p._fosterParentElement(lastElement); - } else { + const tid = getTagID(p.treeAdapter.getTagName(commonAncestor)); + if (p._isElementCausesFosterParenting(tid)) p._fosterParentElement(lastElement); + else { const ns = p.treeAdapter.getNamespaceURI(commonAncestor); - if (tid === TAG_ID.TEMPLATE && ns === NS.HTML) { - commonAncestor = p.treeAdapter.getTemplateContent(commonAncestor); - } + if (tid === TAG_ID.TEMPLATE && ns === NS.HTML) commonAncestor = p.treeAdapter.getTemplateContent(commonAncestor); p.treeAdapter.appendChild(commonAncestor, lastElement); } } @@ -145763,13 +132381,9 @@ function aaReplaceFormattingElement(p, furthestBlock, formattingElementEntry) { function callAdoptionAgency(p, token) { for (let i = 0; i < AA_OUTER_LOOP_ITER; i++) { const formattingElementEntry = aaObtainFormattingElementEntry(p, token); - if (!formattingElementEntry) { - break; - } + if (!formattingElementEntry) break; const furthestBlock = aaObtainFurthestBlock(p, formattingElementEntry); - if (!furthestBlock) { - break; - } + if (!furthestBlock) break; p.activeFormattingElements.bookmark = formattingElementEntry; const lastElement = aaInnerLoop(p, furthestBlock, formattingElementEntry.element); const commonAncestor = p.openElements.getCommonAncestor(formattingElementEntry.element); @@ -145791,9 +132405,7 @@ function stopParsing(p, token) { p.stopped = true; if (token.location) { const target = p.fragmentContext ? 0 : 2; - for (let i = p.openElements.stackTop; i >= target; i--) { - p._setEndLocation(p.openElements.items[i], token); - } + for (let i = p.openElements.stackTop; i >= target; i--) p._setEndLocation(p.openElements.items[i], token); if (!p.fragmentContext && p.openElements.stackTop >= 0) { const htmlElement = p.openElements.items[0]; const htmlLocation = p.treeAdapter.getNodeSourceCodeLocation(htmlElement); @@ -145802,9 +132414,7 @@ function stopParsing(p, token) { if (p.openElements.stackTop >= 1) { const bodyElement = p.openElements.items[1]; const bodyLocation = p.treeAdapter.getNodeSourceCodeLocation(bodyElement); - if (bodyLocation && !bodyLocation.endTag) { - p._setEndLocation(bodyElement, token); - } + if (bodyLocation && !bodyLocation.endTag) p._setEndLocation(bodyElement, token); } } } @@ -145813,9 +132423,7 @@ function stopParsing(p, token) { function doctypeInInitialMode(p, token) { p._setDocumentType(token); const mode = token.forceQuirks ? DOCUMENT_MODE.QUIRKS : getDocumentMode(token); - if (!isConforming(token)) { - p._err(token, ERR.nonConformingDoctype); - } + if (!isConforming(token)) p._err(token, ERR.nonConformingDoctype); p.treeAdapter.setDocumentMode(p.document, mode); p.insertionMode = InsertionMode.BEFORE_HTML; } @@ -145829,15 +132437,11 @@ function startTagBeforeHtml(p, token) { if (token.tagID === TAG_ID.HTML) { p._insertElement(token, NS.HTML); p.insertionMode = InsertionMode.BEFORE_HEAD; - } else { - tokenBeforeHtml(p, token); - } + } else tokenBeforeHtml(p, token); } function endTagBeforeHtml(p, token) { const tn = token.tagID; - if (tn === TAG_ID.HTML || tn === TAG_ID.HEAD || tn === TAG_ID.BODY || tn === TAG_ID.BR) { - tokenBeforeHtml(p, token); - } + if (tn === TAG_ID.HTML || tn === TAG_ID.HEAD || tn === TAG_ID.BODY || tn === TAG_ID.BR) tokenBeforeHtml(p, token); } function tokenBeforeHtml(p, token) { p._insertFakeRootElement(); @@ -145846,28 +132450,21 @@ function tokenBeforeHtml(p, token) { } function startTagBeforeHead(p, token) { switch (token.tagID) { - case TAG_ID.HTML: { + case TAG_ID.HTML: startTagInBody(p, token); break; - } - case TAG_ID.HEAD: { + case TAG_ID.HEAD: p._insertElement(token, NS.HTML); p.headElement = p.openElements.current; p.insertionMode = InsertionMode.IN_HEAD; break; - } - default: { - tokenBeforeHead(p, token); - } + default: tokenBeforeHead(p, token); } } function endTagBeforeHead(p, token) { const tn = token.tagID; - if (tn === TAG_ID.HEAD || tn === TAG_ID.BODY || tn === TAG_ID.HTML || tn === TAG_ID.BR) { - tokenBeforeHead(p, token); - } else { - p._err(token, ERR.endTagWithoutMatchingOpenElement); - } + if (tn === TAG_ID.HEAD || tn === TAG_ID.BODY || tn === TAG_ID.HTML || tn === TAG_ID.BR) tokenBeforeHead(p, token); + else p._err(token, ERR.endTagWithoutMatchingOpenElement); } function tokenBeforeHead(p, token) { p._insertFakeElement(TAG_NAMES.HEAD, TAG_ID.HEAD); @@ -145877,93 +132474,73 @@ function tokenBeforeHead(p, token) { } function startTagInHead(p, token) { switch (token.tagID) { - case TAG_ID.HTML: { + case TAG_ID.HTML: startTagInBody(p, token); break; - } case TAG_ID.BASE: case TAG_ID.BASEFONT: case TAG_ID.BGSOUND: case TAG_ID.LINK: - case TAG_ID.META: { + case TAG_ID.META: p._appendElement(token, NS.HTML); token.ackSelfClosing = true; break; - } - case TAG_ID.TITLE: { + case TAG_ID.TITLE: p._switchToTextParsing(token, TokenizerMode.RCDATA); break; - } - case TAG_ID.NOSCRIPT: { - if (p.options.scriptingEnabled) { - p._switchToTextParsing(token, TokenizerMode.RAWTEXT); - } else { + case TAG_ID.NOSCRIPT: + if (p.options.scriptingEnabled) p._switchToTextParsing(token, TokenizerMode.RAWTEXT); + else { p._insertElement(token, NS.HTML); p.insertionMode = InsertionMode.IN_HEAD_NO_SCRIPT; } break; - } case TAG_ID.NOFRAMES: - case TAG_ID.STYLE: { + case TAG_ID.STYLE: p._switchToTextParsing(token, TokenizerMode.RAWTEXT); break; - } - case TAG_ID.SCRIPT: { + case TAG_ID.SCRIPT: p._switchToTextParsing(token, TokenizerMode.SCRIPT_DATA); break; - } - case TAG_ID.TEMPLATE: { + case TAG_ID.TEMPLATE: p._insertTemplate(token); p.activeFormattingElements.insertMarker(); p.framesetOk = false; p.insertionMode = InsertionMode.IN_TEMPLATE; p.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE); break; - } - case TAG_ID.HEAD: { + case TAG_ID.HEAD: p._err(token, ERR.misplacedStartTagForHeadElement); break; - } - default: { - tokenInHead(p, token); - } + default: tokenInHead(p, token); } } function endTagInHead(p, token) { switch (token.tagID) { - case TAG_ID.HEAD: { + case TAG_ID.HEAD: p.openElements.pop(); p.insertionMode = InsertionMode.AFTER_HEAD; break; - } case TAG_ID.BODY: case TAG_ID.BR: - case TAG_ID.HTML: { + case TAG_ID.HTML: tokenInHead(p, token); break; - } - case TAG_ID.TEMPLATE: { + case TAG_ID.TEMPLATE: templateEndTagInHead(p, token); break; - } - default: { - p._err(token, ERR.endTagWithoutMatchingOpenElement); - } + default: p._err(token, ERR.endTagWithoutMatchingOpenElement); } } function templateEndTagInHead(p, token) { if (p.openElements.tmplCount > 0) { p.openElements.generateImpliedEndTagsThoroughly(); - if (p.openElements.currentTagId !== TAG_ID.TEMPLATE) { - p._err(token, ERR.closingOfElementWithOpenChildElements); - } + if (p.openElements.currentTagId !== TAG_ID.TEMPLATE) p._err(token, ERR.closingOfElementWithOpenChildElements); p.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE); p.activeFormattingElements.clearToLastMarker(); p.tmplInsertionModeStack.shift(); p._resetInsertionMode(); - } else { - p._err(token, ERR.endTagWithoutMatchingOpenElement); - } + } else p._err(token, ERR.endTagWithoutMatchingOpenElement); } function tokenInHead(p, token) { p.openElements.pop(); @@ -145972,43 +132549,34 @@ function tokenInHead(p, token) { } function startTagInHeadNoScript(p, token) { switch (token.tagID) { - case TAG_ID.HTML: { + case TAG_ID.HTML: startTagInBody(p, token); break; - } case TAG_ID.BASEFONT: case TAG_ID.BGSOUND: case TAG_ID.HEAD: case TAG_ID.LINK: case TAG_ID.META: case TAG_ID.NOFRAMES: - case TAG_ID.STYLE: { + case TAG_ID.STYLE: startTagInHead(p, token); break; - } - case TAG_ID.NOSCRIPT: { + case TAG_ID.NOSCRIPT: p._err(token, ERR.nestedNoscriptInHead); break; - } - default: { - tokenInHeadNoScript(p, token); - } + default: tokenInHeadNoScript(p, token); } } function endTagInHeadNoScript(p, token) { switch (token.tagID) { - case TAG_ID.NOSCRIPT: { + case TAG_ID.NOSCRIPT: p.openElements.pop(); p.insertionMode = InsertionMode.IN_HEAD; break; - } - case TAG_ID.BR: { + case TAG_ID.BR: tokenInHeadNoScript(p, token); break; - } - default: { - p._err(token, ERR.endTagWithoutMatchingOpenElement); - } + default: p._err(token, ERR.endTagWithoutMatchingOpenElement); } } function tokenInHeadNoScript(p, token) { @@ -146020,21 +132588,18 @@ function tokenInHeadNoScript(p, token) { } function startTagAfterHead(p, token) { switch (token.tagID) { - case TAG_ID.HTML: { + case TAG_ID.HTML: startTagInBody(p, token); break; - } - case TAG_ID.BODY: { + case TAG_ID.BODY: p._insertElement(token, NS.HTML); p.framesetOk = false; p.insertionMode = InsertionMode.IN_BODY; break; - } - case TAG_ID.FRAMESET: { + case TAG_ID.FRAMESET: p._insertElement(token, NS.HTML); p.insertionMode = InsertionMode.IN_FRAMESET; break; - } case TAG_ID.BASE: case TAG_ID.BASEFONT: case TAG_ID.BGSOUND: @@ -146044,37 +132609,29 @@ function startTagAfterHead(p, token) { case TAG_ID.SCRIPT: case TAG_ID.STYLE: case TAG_ID.TEMPLATE: - case TAG_ID.TITLE: { + case TAG_ID.TITLE: p._err(token, ERR.abandonedHeadElementChild); p.openElements.push(p.headElement, TAG_ID.HEAD); startTagInHead(p, token); p.openElements.remove(p.headElement); break; - } - case TAG_ID.HEAD: { + case TAG_ID.HEAD: p._err(token, ERR.misplacedStartTagForHeadElement); break; - } - default: { - tokenAfterHead(p, token); - } + default: tokenAfterHead(p, token); } } function endTagAfterHead(p, token) { switch (token.tagID) { case TAG_ID.BODY: case TAG_ID.HTML: - case TAG_ID.BR: { + case TAG_ID.BR: tokenAfterHead(p, token); break; - } - case TAG_ID.TEMPLATE: { + case TAG_ID.TEMPLATE: templateEndTagInHead(p, token); break; - } - default: { - p._err(token, ERR.endTagWithoutMatchingOpenElement); - } + default: p._err(token, ERR.endTagWithoutMatchingOpenElement); } } function tokenAfterHead(p, token) { @@ -146084,30 +132641,24 @@ function tokenAfterHead(p, token) { } function modeInBody(p, token) { switch (token.type) { - case TokenType.CHARACTER: { + case TokenType.CHARACTER: characterInBody(p, token); break; - } - case TokenType.WHITESPACE_CHARACTER: { + case TokenType.WHITESPACE_CHARACTER: whitespaceCharacterInBody(p, token); break; - } - case TokenType.COMMENT: { + case TokenType.COMMENT: appendComment(p, token); break; - } - case TokenType.START_TAG: { + case TokenType.START_TAG: startTagInBody(p, token); break; - } - case TokenType.END_TAG: { + case TokenType.END_TAG: endTagInBody(p, token); break; - } - case TokenType.EOF: { + case TokenType.EOF: eofInBody(p, token); break; - } default: } } @@ -146121,9 +132672,7 @@ function characterInBody(p, token) { p.framesetOk = false; } function htmlStartTagInBody(p, token) { - if (p.openElements.tmplCount === 0) { - p.treeAdapter.adoptAttributes(p.openElements.items[0], token.attrs); - } + if (p.openElements.tmplCount === 0) p.treeAdapter.adoptAttributes(p.openElements.items[0], token.attrs); } function bodyStartTagInBody(p, token) { const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement(); @@ -146142,24 +132691,16 @@ function framesetStartTagInBody(p, token) { } } function addressStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope(TAG_ID.P)) { - p._closePElement(); - } + if (p.openElements.hasInButtonScope(TAG_ID.P)) p._closePElement(); p._insertElement(token, NS.HTML); } function numberedHeaderStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope(TAG_ID.P)) { - p._closePElement(); - } - if (p.openElements.currentTagId !== undefined && NUMBERED_HEADERS.has(p.openElements.currentTagId)) { - p.openElements.pop(); - } + if (p.openElements.hasInButtonScope(TAG_ID.P)) p._closePElement(); + if (p.openElements.currentTagId !== void 0 && NUMBERED_HEADERS.has(p.openElements.currentTagId)) p.openElements.pop(); p._insertElement(token, NS.HTML); } function preStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope(TAG_ID.P)) { - p._closePElement(); - } + if (p.openElements.hasInButtonScope(TAG_ID.P)) p._closePElement(); p._insertElement(token, NS.HTML); p.skipNextNewLine = true; p.framesetOk = false; @@ -146167,13 +132708,9 @@ function preStartTagInBody(p, token) { function formStartTagInBody(p, token) { const inTemplate = p.openElements.tmplCount > 0; if (!p.formElement || inTemplate) { - if (p.openElements.hasInButtonScope(TAG_ID.P)) { - p._closePElement(); - } + if (p.openElements.hasInButtonScope(TAG_ID.P)) p._closePElement(); p._insertElement(token, NS.HTML); - if (!inTemplate) { - p.formElement = p.openElements.current; - } + if (!inTemplate) p.formElement = p.openElements.current; } } function listItemStartTagInBody(p, token) { @@ -146186,19 +132723,13 @@ function listItemStartTagInBody(p, token) { p.openElements.popUntilTagNamePopped(elementId); break; } - if (elementId !== TAG_ID.ADDRESS && elementId !== TAG_ID.DIV && elementId !== TAG_ID.P && p._isSpecialElement(p.openElements.items[i], elementId)) { - break; - } - } - if (p.openElements.hasInButtonScope(TAG_ID.P)) { - p._closePElement(); + if (elementId !== TAG_ID.ADDRESS && elementId !== TAG_ID.DIV && elementId !== TAG_ID.P && p._isSpecialElement(p.openElements.items[i], elementId)) break; } + if (p.openElements.hasInButtonScope(TAG_ID.P)) p._closePElement(); p._insertElement(token, NS.HTML); } function plaintextStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope(TAG_ID.P)) { - p._closePElement(); - } + if (p.openElements.hasInButtonScope(TAG_ID.P)) p._closePElement(); p._insertElement(token, NS.HTML); p.tokenizer.state = TokenizerMode.PLAINTEXT; } @@ -146243,9 +132774,7 @@ function appletStartTagInBody(p, token) { p.framesetOk = false; } function tableStartTagInBody(p, token) { - if (p.treeAdapter.getDocumentMode(p.document) !== DOCUMENT_MODE.QUIRKS && p.openElements.hasInButtonScope(TAG_ID.P)) { - p._closePElement(); - } + if (p.treeAdapter.getDocumentMode(p.document) !== DOCUMENT_MODE.QUIRKS && p.openElements.hasInButtonScope(TAG_ID.P)) p._closePElement(); p._insertElement(token, NS.HTML); p.framesetOk = false; p.insertionMode = InsertionMode.IN_TABLE; @@ -146263,9 +132792,7 @@ function isHiddenInput(token) { function inputStartTagInBody(p, token) { p._reconstructActiveFormattingElements(); p._appendElement(token, NS.HTML); - if (!isHiddenInput(token)) { - p.framesetOk = false; - } + if (!isHiddenInput(token)) p.framesetOk = false; token.ackSelfClosing = true; } function paramStartTagInBody(p, token) { @@ -146273,9 +132800,7 @@ function paramStartTagInBody(p, token) { token.ackSelfClosing = true; } function hrStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope(TAG_ID.P)) { - p._closePElement(); - } + if (p.openElements.hasInButtonScope(TAG_ID.P)) p._closePElement(); p._appendElement(token, NS.HTML); p.framesetOk = false; token.ackSelfClosing = true; @@ -146294,9 +132819,7 @@ function textareaStartTagInBody(p, token) { p.insertionMode = InsertionMode.TEXT; } function xmpStartTagInBody(p, token) { - if (p.openElements.hasInButtonScope(TAG_ID.P)) { - p._closePElement(); - } + if (p.openElements.hasInButtonScope(TAG_ID.P)) p._closePElement(); p._reconstructActiveFormattingElements(); p.framesetOk = false; p._switchToTextParsing(token, TokenizerMode.RAWTEXT); @@ -146315,44 +132838,32 @@ function selectStartTagInBody(p, token) { p.insertionMode = p.insertionMode === InsertionMode.IN_TABLE || p.insertionMode === InsertionMode.IN_CAPTION || p.insertionMode === InsertionMode.IN_TABLE_BODY || p.insertionMode === InsertionMode.IN_ROW || p.insertionMode === InsertionMode.IN_CELL ? InsertionMode.IN_SELECT_IN_TABLE : InsertionMode.IN_SELECT; } function optgroupStartTagInBody(p, token) { - if (p.openElements.currentTagId === TAG_ID.OPTION) { - p.openElements.pop(); - } + if (p.openElements.currentTagId === TAG_ID.OPTION) p.openElements.pop(); p._reconstructActiveFormattingElements(); p._insertElement(token, NS.HTML); } function rbStartTagInBody(p, token) { - if (p.openElements.hasInScope(TAG_ID.RUBY)) { - p.openElements.generateImpliedEndTags(); - } + if (p.openElements.hasInScope(TAG_ID.RUBY)) p.openElements.generateImpliedEndTags(); p._insertElement(token, NS.HTML); } function rtStartTagInBody(p, token) { - if (p.openElements.hasInScope(TAG_ID.RUBY)) { - p.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.RTC); - } + if (p.openElements.hasInScope(TAG_ID.RUBY)) p.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.RTC); p._insertElement(token, NS.HTML); } function mathStartTagInBody(p, token) { p._reconstructActiveFormattingElements(); adjustTokenMathMLAttrs(token); adjustTokenXMLAttrs(token); - if (token.selfClosing) { - p._appendElement(token, NS.MATHML); - } else { - p._insertElement(token, NS.MATHML); - } + if (token.selfClosing) p._appendElement(token, NS.MATHML); + else p._insertElement(token, NS.MATHML); token.ackSelfClosing = true; } function svgStartTagInBody(p, token) { p._reconstructActiveFormattingElements(); adjustTokenSVGAttrs(token); adjustTokenXMLAttrs(token); - if (token.selfClosing) { - p._appendElement(token, NS.SVG); - } else { - p._insertElement(token, NS.SVG); - } + if (token.selfClosing) p._appendElement(token, NS.SVG); + else p._insertElement(token, NS.SVG); token.ackSelfClosing = true; } function genericStartTagInBody(p, token) { @@ -146372,23 +132883,20 @@ function startTagInBody(p, token) { case TAG_ID.FONT: case TAG_ID.SMALL: case TAG_ID.STRIKE: - case TAG_ID.STRONG: { + case TAG_ID.STRONG: bStartTagInBody(p, token); break; - } - case TAG_ID.A: { + case TAG_ID.A: aStartTagInBody(p, token); break; - } case TAG_ID.H1: case TAG_ID.H2: case TAG_ID.H3: case TAG_ID.H4: case TAG_ID.H5: - case TAG_ID.H6: { + case TAG_ID.H6: numberedHeaderStartTagInBody(p, token); break; - } case TAG_ID.P: case TAG_ID.DL: case TAG_ID.OL: @@ -146413,56 +132921,46 @@ function startTagInBody(p, token) { case TAG_ID.SUMMARY: case TAG_ID.FIELDSET: case TAG_ID.BLOCKQUOTE: - case TAG_ID.FIGCAPTION: { + case TAG_ID.FIGCAPTION: addressStartTagInBody(p, token); break; - } case TAG_ID.LI: case TAG_ID.DD: - case TAG_ID.DT: { + case TAG_ID.DT: listItemStartTagInBody(p, token); break; - } case TAG_ID.BR: case TAG_ID.IMG: case TAG_ID.WBR: case TAG_ID.AREA: case TAG_ID.EMBED: - case TAG_ID.KEYGEN: { + case TAG_ID.KEYGEN: areaStartTagInBody(p, token); break; - } - case TAG_ID.HR: { + case TAG_ID.HR: hrStartTagInBody(p, token); break; - } case TAG_ID.RB: - case TAG_ID.RTC: { + case TAG_ID.RTC: rbStartTagInBody(p, token); break; - } case TAG_ID.RT: - case TAG_ID.RP: { + case TAG_ID.RP: rtStartTagInBody(p, token); break; - } case TAG_ID.PRE: - case TAG_ID.LISTING: { + case TAG_ID.LISTING: preStartTagInBody(p, token); break; - } - case TAG_ID.XMP: { + case TAG_ID.XMP: xmpStartTagInBody(p, token); break; - } - case TAG_ID.SVG: { + case TAG_ID.SVG: svgStartTagInBody(p, token); break; - } - case TAG_ID.HTML: { + case TAG_ID.HTML: htmlStartTagInBody(p, token); break; - } case TAG_ID.BASE: case TAG_ID.LINK: case TAG_ID.META: @@ -146471,92 +132969,70 @@ function startTagInBody(p, token) { case TAG_ID.SCRIPT: case TAG_ID.BGSOUND: case TAG_ID.BASEFONT: - case TAG_ID.TEMPLATE: { + case TAG_ID.TEMPLATE: startTagInHead(p, token); break; - } - case TAG_ID.BODY: { + case TAG_ID.BODY: bodyStartTagInBody(p, token); break; - } - case TAG_ID.FORM: { + case TAG_ID.FORM: formStartTagInBody(p, token); break; - } - case TAG_ID.NOBR: { + case TAG_ID.NOBR: nobrStartTagInBody(p, token); break; - } - case TAG_ID.MATH: { + case TAG_ID.MATH: mathStartTagInBody(p, token); break; - } - case TAG_ID.TABLE: { + case TAG_ID.TABLE: tableStartTagInBody(p, token); break; - } - case TAG_ID.INPUT: { + case TAG_ID.INPUT: inputStartTagInBody(p, token); break; - } case TAG_ID.PARAM: case TAG_ID.TRACK: - case TAG_ID.SOURCE: { + case TAG_ID.SOURCE: paramStartTagInBody(p, token); break; - } - case TAG_ID.IMAGE: { + case TAG_ID.IMAGE: imageStartTagInBody(p, token); break; - } - case TAG_ID.BUTTON: { + case TAG_ID.BUTTON: buttonStartTagInBody(p, token); break; - } case TAG_ID.APPLET: case TAG_ID.OBJECT: - case TAG_ID.MARQUEE: { + case TAG_ID.MARQUEE: appletStartTagInBody(p, token); break; - } - case TAG_ID.IFRAME: { + case TAG_ID.IFRAME: iframeStartTagInBody(p, token); break; - } - case TAG_ID.SELECT: { + case TAG_ID.SELECT: selectStartTagInBody(p, token); break; - } case TAG_ID.OPTION: - case TAG_ID.OPTGROUP: { + case TAG_ID.OPTGROUP: optgroupStartTagInBody(p, token); break; - } case TAG_ID.NOEMBED: - case TAG_ID.NOFRAMES: { + case TAG_ID.NOFRAMES: rawTextStartTagInBody(p, token); break; - } - case TAG_ID.FRAMESET: { + case TAG_ID.FRAMESET: framesetStartTagInBody(p, token); break; - } - case TAG_ID.TEXTAREA: { + case TAG_ID.TEXTAREA: textareaStartTagInBody(p, token); break; - } - case TAG_ID.NOSCRIPT: { - if (p.options.scriptingEnabled) { - rawTextStartTagInBody(p, token); - } else { - genericStartTagInBody(p, token); - } + case TAG_ID.NOSCRIPT: + if (p.options.scriptingEnabled) rawTextStartTagInBody(p, token); + else genericStartTagInBody(p, token); break; - } - case TAG_ID.PLAINTEXT: { + case TAG_ID.PLAINTEXT: plaintextStartTagInBody(p, token); break; - } case TAG_ID.COL: case TAG_ID.TH: case TAG_ID.TD: @@ -146567,12 +133043,8 @@ function startTagInBody(p, token) { case TAG_ID.TFOOT: case TAG_ID.THEAD: case TAG_ID.CAPTION: - case TAG_ID.COLGROUP: { - break; - } - default: { - genericStartTagInBody(p, token); - } + case TAG_ID.COLGROUP: break; + default: genericStartTagInBody(p, token); } } function bodyEndTagInBody(p, token) { @@ -146580,9 +133052,7 @@ function bodyEndTagInBody(p, token) { p.insertionMode = InsertionMode.AFTER_BODY; if (p.options.sourceCodeLocationInfo) { const bodyElement = p.openElements.tryPeekProperlyNestedBodyElement(); - if (bodyElement) { - p._setEndLocation(bodyElement, token); - } + if (bodyElement) p._setEndLocation(bodyElement, token); } } } @@ -146602,22 +133072,15 @@ function addressEndTagInBody(p, token) { function formEndTagInBody(p) { const inTemplate = p.openElements.tmplCount > 0; const { formElement } = p; - if (!inTemplate) { - p.formElement = null; - } + if (!inTemplate) p.formElement = null; if ((formElement || inTemplate) && p.openElements.hasInScope(TAG_ID.FORM)) { p.openElements.generateImpliedEndTags(); - if (inTemplate) { - p.openElements.popUntilTagNamePopped(TAG_ID.FORM); - } else if (formElement) { - p.openElements.remove(formElement); - } + if (inTemplate) p.openElements.popUntilTagNamePopped(TAG_ID.FORM); + else if (formElement) p.openElements.remove(formElement); } } function pEndTagInBody(p) { - if (!p.openElements.hasInButtonScope(TAG_ID.P)) { - p._insertFakeElement(TAG_NAMES.P, TAG_ID.P); - } + if (!p.openElements.hasInButtonScope(TAG_ID.P)) p._insertFakeElement(TAG_NAMES.P, TAG_ID.P); p._closePElement(); } function liEndTagInBody(p) { @@ -146664,9 +133127,7 @@ function genericEndTagInBody(p, token) { if (p.openElements.stackTop >= i) p.openElements.shortenToLength(i); break; } - if (p._isSpecialElement(element, elementId)) { - break; - } + if (p._isSpecialElement(element, elementId)) break; } } function endTagInBody(p, token) { @@ -146684,14 +133145,12 @@ function endTagInBody(p, token) { case TAG_ID.NOBR: case TAG_ID.SMALL: case TAG_ID.STRIKE: - case TAG_ID.STRONG: { + case TAG_ID.STRONG: callAdoptionAgency(p, token); break; - } - case TAG_ID.P: { + case TAG_ID.P: pEndTagInBody(p); break; - } case TAG_ID.DL: case TAG_ID.UL: case TAG_ID.OL: @@ -146718,71 +133177,54 @@ function endTagInBody(p, token) { case TAG_ID.LISTING: case TAG_ID.FIELDSET: case TAG_ID.BLOCKQUOTE: - case TAG_ID.FIGCAPTION: { + case TAG_ID.FIGCAPTION: addressEndTagInBody(p, token); break; - } - case TAG_ID.LI: { + case TAG_ID.LI: liEndTagInBody(p); break; - } case TAG_ID.DD: - case TAG_ID.DT: { + case TAG_ID.DT: ddEndTagInBody(p, token); break; - } case TAG_ID.H1: case TAG_ID.H2: case TAG_ID.H3: case TAG_ID.H4: case TAG_ID.H5: - case TAG_ID.H6: { + case TAG_ID.H6: numberedHeaderEndTagInBody(p); break; - } - case TAG_ID.BR: { + case TAG_ID.BR: brEndTagInBody(p); break; - } - case TAG_ID.BODY: { + case TAG_ID.BODY: bodyEndTagInBody(p, token); break; - } - case TAG_ID.HTML: { + case TAG_ID.HTML: htmlEndTagInBody(p, token); break; - } - case TAG_ID.FORM: { + case TAG_ID.FORM: formEndTagInBody(p); break; - } case TAG_ID.APPLET: case TAG_ID.OBJECT: - case TAG_ID.MARQUEE: { + case TAG_ID.MARQUEE: appletEndTagInBody(p, token); break; - } - case TAG_ID.TEMPLATE: { + case TAG_ID.TEMPLATE: templateEndTagInHead(p, token); break; - } - default: { - genericEndTagInBody(p, token); - } + default: genericEndTagInBody(p, token); } } function eofInBody(p, token) { - if (p.tmplInsertionModeStack.length > 0) { - eofInTemplate(p, token); - } else { - stopParsing(p, token); - } + if (p.tmplInsertionModeStack.length > 0) eofInTemplate(p, token); + else stopParsing(p, token); } function endTagInText(p, token) { var _a; - if (token.tagID === TAG_ID.SCRIPT) { - (_a = p.scriptHandler) === null || _a === void 0 ? void 0 : _a.call(p, p.openElements.current); - } + if (token.tagID === TAG_ID.SCRIPT) (_a = p.scriptHandler) === null || _a === void 0 || _a.call(p, p.openElements.current); p.openElements.pop(); p.insertionMode = p.originalInsertionMode; } @@ -146793,24 +133235,20 @@ function eofInText(p, token) { p.onEof(token); } function characterInTable(p, token) { - if (p.openElements.currentTagId !== undefined && TABLE_STRUCTURE_TAGS.has(p.openElements.currentTagId)) { + if (p.openElements.currentTagId !== void 0 && TABLE_STRUCTURE_TAGS.has(p.openElements.currentTagId)) { p.pendingCharacterTokens.length = 0; p.hasNonWhitespacePendingCharacterToken = false; p.originalInsertionMode = p.insertionMode; p.insertionMode = InsertionMode.IN_TABLE_TEXT; switch (token.type) { - case TokenType.CHARACTER: { + case TokenType.CHARACTER: characterInTableText(p, token); break; - } - case TokenType.WHITESPACE_CHARACTER: { + case TokenType.WHITESPACE_CHARACTER: whitespaceCharacterInTableText(p, token); break; - } } - } else { - tokenInTable(p, token); - } + } else tokenInTable(p, token); } function captionStartTagInTable(p, token) { p.openElements.clearBackToTableContext(); @@ -146848,11 +133286,8 @@ function tableStartTagInTable(p, token) { } } function inputStartTagInTable(p, token) { - if (isHiddenInput(token)) { - p._appendElement(token, NS.HTML); - } else { - tokenInTable(p, token); - } + if (isHiddenInput(token)) p._appendElement(token, NS.HTML); + else tokenInTable(p, token); token.ackSelfClosing = true; } function formStartTagInTable(p, token) { @@ -146866,64 +133301,51 @@ function startTagInTable(p, token) { switch (token.tagID) { case TAG_ID.TD: case TAG_ID.TH: - case TAG_ID.TR: { + case TAG_ID.TR: tdStartTagInTable(p, token); break; - } case TAG_ID.STYLE: case TAG_ID.SCRIPT: - case TAG_ID.TEMPLATE: { + case TAG_ID.TEMPLATE: startTagInHead(p, token); break; - } - case TAG_ID.COL: { + case TAG_ID.COL: colStartTagInTable(p, token); break; - } - case TAG_ID.FORM: { + case TAG_ID.FORM: formStartTagInTable(p, token); break; - } - case TAG_ID.TABLE: { + case TAG_ID.TABLE: tableStartTagInTable(p, token); break; - } case TAG_ID.TBODY: case TAG_ID.TFOOT: - case TAG_ID.THEAD: { + case TAG_ID.THEAD: tbodyStartTagInTable(p, token); break; - } - case TAG_ID.INPUT: { + case TAG_ID.INPUT: inputStartTagInTable(p, token); break; - } - case TAG_ID.CAPTION: { + case TAG_ID.CAPTION: captionStartTagInTable(p, token); break; - } - case TAG_ID.COLGROUP: { + case TAG_ID.COLGROUP: colgroupStartTagInTable(p, token); break; - } - default: { - tokenInTable(p, token); - } + default: tokenInTable(p, token); } } function endTagInTable(p, token) { switch (token.tagID) { - case TAG_ID.TABLE: { + case TAG_ID.TABLE: if (p.openElements.hasInTableScope(TAG_ID.TABLE)) { p.openElements.popUntilTagNamePopped(TAG_ID.TABLE); p._resetInsertionMode(); } break; - } - case TAG_ID.TEMPLATE: { + case TAG_ID.TEMPLATE: templateEndTagInHead(p, token); break; - } case TAG_ID.BODY: case TAG_ID.CAPTION: case TAG_ID.COL: @@ -146934,12 +133356,8 @@ function endTagInTable(p, token) { case TAG_ID.TFOOT: case TAG_ID.TH: case TAG_ID.THEAD: - case TAG_ID.TR: { - break; - } - default: { - tokenInTable(p, token); - } + case TAG_ID.TR: break; + default: tokenInTable(p, token); } } function tokenInTable(p, token) { @@ -146957,15 +133375,8 @@ function characterInTableText(p, token) { } function tokenInTableText(p, token) { let i = 0; - if (p.hasNonWhitespacePendingCharacterToken) { - for (; i < p.pendingCharacterTokens.length; i++) { - tokenInTable(p, p.pendingCharacterTokens[i]); - } - } else { - for (; i < p.pendingCharacterTokens.length; i++) { - p._insertCharacters(p.pendingCharacterTokens[i]); - } - } + if (p.hasNonWhitespacePendingCharacterToken) for (; i < p.pendingCharacterTokens.length; i++) tokenInTable(p, p.pendingCharacterTokens[i]); + else for (; i < p.pendingCharacterTokens.length; i++) p._insertCharacters(p.pendingCharacterTokens[i]); p.insertionMode = p.originalInsertionMode; p._processToken(token); } @@ -146990,26 +133401,21 @@ function startTagInCaption(p, token) { p.insertionMode = InsertionMode.IN_TABLE; startTagInTable(p, token); } - } else { - startTagInBody(p, token); - } + } else startTagInBody(p, token); } function endTagInCaption(p, token) { const tn = token.tagID; switch (tn) { case TAG_ID.CAPTION: - case TAG_ID.TABLE: { + case TAG_ID.TABLE: if (p.openElements.hasInTableScope(TAG_ID.CAPTION)) { p.openElements.generateImpliedEndTags(); p.openElements.popUntilTagNamePopped(TAG_ID.CAPTION); p.activeFormattingElements.clearToLastMarker(); p.insertionMode = InsertionMode.IN_TABLE; - if (tn === TAG_ID.TABLE) { - endTagInTable(p, token); - } + if (tn === TAG_ID.TABLE) endTagInTable(p, token); } break; - } case TAG_ID.BODY: case TAG_ID.COL: case TAG_ID.COLGROUP: @@ -147019,53 +133425,38 @@ function endTagInCaption(p, token) { case TAG_ID.TFOOT: case TAG_ID.TH: case TAG_ID.THEAD: - case TAG_ID.TR: { - break; - } - default: { - endTagInBody(p, token); - } + case TAG_ID.TR: break; + default: endTagInBody(p, token); } } function startTagInColumnGroup(p, token) { switch (token.tagID) { - case TAG_ID.HTML: { + case TAG_ID.HTML: startTagInBody(p, token); break; - } - case TAG_ID.COL: { + case TAG_ID.COL: p._appendElement(token, NS.HTML); token.ackSelfClosing = true; break; - } - case TAG_ID.TEMPLATE: { + case TAG_ID.TEMPLATE: startTagInHead(p, token); break; - } - default: { - tokenInColumnGroup(p, token); - } + default: tokenInColumnGroup(p, token); } } function endTagInColumnGroup(p, token) { switch (token.tagID) { - case TAG_ID.COLGROUP: { + case TAG_ID.COLGROUP: if (p.openElements.currentTagId === TAG_ID.COLGROUP) { p.openElements.pop(); p.insertionMode = InsertionMode.IN_TABLE; } break; - } - case TAG_ID.TEMPLATE: { + case TAG_ID.TEMPLATE: templateEndTagInHead(p, token); break; - } - case TAG_ID.COL: { - break; - } - default: { - tokenInColumnGroup(p, token); - } + case TAG_ID.COL: break; + default: tokenInColumnGroup(p, token); } } function tokenInColumnGroup(p, token) { @@ -147077,26 +133468,24 @@ function tokenInColumnGroup(p, token) { } function startTagInTableBody(p, token) { switch (token.tagID) { - case TAG_ID.TR: { + case TAG_ID.TR: p.openElements.clearBackToTableBodyContext(); p._insertElement(token, NS.HTML); p.insertionMode = InsertionMode.IN_ROW; break; - } case TAG_ID.TH: - case TAG_ID.TD: { + case TAG_ID.TD: p.openElements.clearBackToTableBodyContext(); p._insertFakeElement(TAG_NAMES.TR, TAG_ID.TR); p.insertionMode = InsertionMode.IN_ROW; startTagInRow(p, token); break; - } case TAG_ID.CAPTION: case TAG_ID.COL: case TAG_ID.COLGROUP: case TAG_ID.TBODY: case TAG_ID.TFOOT: - case TAG_ID.THEAD: { + case TAG_ID.THEAD: if (p.openElements.hasTableBodyContextInTableScope()) { p.openElements.clearBackToTableBodyContext(); p.openElements.pop(); @@ -147104,10 +133493,7 @@ function startTagInTableBody(p, token) { startTagInTable(p, token); } break; - } - default: { - startTagInTable(p, token); - } + default: startTagInTable(p, token); } } function endTagInTableBody(p, token) { @@ -147115,15 +133501,14 @@ function endTagInTableBody(p, token) { switch (token.tagID) { case TAG_ID.TBODY: case TAG_ID.TFOOT: - case TAG_ID.THEAD: { + case TAG_ID.THEAD: if (p.openElements.hasInTableScope(tn)) { p.openElements.clearBackToTableBodyContext(); p.openElements.pop(); p.insertionMode = InsertionMode.IN_TABLE; } break; - } - case TAG_ID.TABLE: { + case TAG_ID.TABLE: if (p.openElements.hasTableBodyContextInTableScope()) { p.openElements.clearBackToTableBodyContext(); p.openElements.pop(); @@ -147131,7 +133516,6 @@ function endTagInTableBody(p, token) { endTagInTable(p, token); } break; - } case TAG_ID.BODY: case TAG_ID.CAPTION: case TAG_ID.COL: @@ -147139,31 +133523,26 @@ function endTagInTableBody(p, token) { case TAG_ID.HTML: case TAG_ID.TD: case TAG_ID.TH: - case TAG_ID.TR: { - break; - } - default: { - endTagInTable(p, token); - } + case TAG_ID.TR: break; + default: endTagInTable(p, token); } } function startTagInRow(p, token) { switch (token.tagID) { case TAG_ID.TH: - case TAG_ID.TD: { + case TAG_ID.TD: p.openElements.clearBackToTableRowContext(); p._insertElement(token, NS.HTML); p.insertionMode = InsertionMode.IN_CELL; p.activeFormattingElements.insertMarker(); break; - } case TAG_ID.CAPTION: case TAG_ID.COL: case TAG_ID.COLGROUP: case TAG_ID.TBODY: case TAG_ID.TFOOT: case TAG_ID.THEAD: - case TAG_ID.TR: { + case TAG_ID.TR: if (p.openElements.hasInTableScope(TAG_ID.TR)) { p.openElements.clearBackToTableRowContext(); p.openElements.pop(); @@ -147171,23 +133550,19 @@ function startTagInRow(p, token) { startTagInTableBody(p, token); } break; - } - default: { - startTagInTable(p, token); - } + default: startTagInTable(p, token); } } function endTagInRow(p, token) { switch (token.tagID) { - case TAG_ID.TR: { + case TAG_ID.TR: if (p.openElements.hasInTableScope(TAG_ID.TR)) { p.openElements.clearBackToTableRowContext(); p.openElements.pop(); p.insertionMode = InsertionMode.IN_TABLE_BODY; } break; - } - case TAG_ID.TABLE: { + case TAG_ID.TABLE: if (p.openElements.hasInTableScope(TAG_ID.TR)) { p.openElements.clearBackToTableRowContext(); p.openElements.pop(); @@ -147195,10 +133570,9 @@ function endTagInRow(p, token) { endTagInTableBody(p, token); } break; - } case TAG_ID.TBODY: case TAG_ID.TFOOT: - case TAG_ID.THEAD: { + case TAG_ID.THEAD: if (p.openElements.hasInTableScope(token.tagID) || p.openElements.hasInTableScope(TAG_ID.TR)) { p.openElements.clearBackToTableRowContext(); p.openElements.pop(); @@ -147206,19 +133580,14 @@ function endTagInRow(p, token) { endTagInTableBody(p, token); } break; - } case TAG_ID.BODY: case TAG_ID.CAPTION: case TAG_ID.COL: case TAG_ID.COLGROUP: case TAG_ID.HTML: case TAG_ID.TD: - case TAG_ID.TH: { - break; - } - default: { - endTagInTable(p, token); - } + case TAG_ID.TH: break; + default: endTagInTable(p, token); } } function startTagInCell(p, token) { @@ -147228,15 +133597,13 @@ function startTagInCell(p, token) { p._closeTableCell(); startTagInRow(p, token); } - } else { - startTagInBody(p, token); - } + } else startTagInBody(p, token); } function endTagInCell(p, token) { const tn = token.tagID; switch (tn) { case TAG_ID.TD: - case TAG_ID.TH: { + case TAG_ID.TH: if (p.openElements.hasInTableScope(tn)) { p.openElements.generateImpliedEndTags(); p.openElements.popUntilTagNamePopped(tn); @@ -147244,113 +133611,79 @@ function endTagInCell(p, token) { p.insertionMode = InsertionMode.IN_ROW; } break; - } case TAG_ID.TABLE: case TAG_ID.TBODY: case TAG_ID.TFOOT: case TAG_ID.THEAD: - case TAG_ID.TR: { + case TAG_ID.TR: if (p.openElements.hasInTableScope(tn)) { p._closeTableCell(); endTagInRow(p, token); } break; - } case TAG_ID.BODY: case TAG_ID.CAPTION: case TAG_ID.COL: case TAG_ID.COLGROUP: - case TAG_ID.HTML: { - break; - } - default: { - endTagInBody(p, token); - } + case TAG_ID.HTML: break; + default: endTagInBody(p, token); } } function startTagInSelect(p, token) { switch (token.tagID) { - case TAG_ID.HTML: { + case TAG_ID.HTML: startTagInBody(p, token); break; - } - case TAG_ID.OPTION: { - if (p.openElements.currentTagId === TAG_ID.OPTION) { - p.openElements.pop(); - } + case TAG_ID.OPTION: + if (p.openElements.currentTagId === TAG_ID.OPTION) p.openElements.pop(); p._insertElement(token, NS.HTML); break; - } - case TAG_ID.OPTGROUP: { - if (p.openElements.currentTagId === TAG_ID.OPTION) { - p.openElements.pop(); - } - if (p.openElements.currentTagId === TAG_ID.OPTGROUP) { - p.openElements.pop(); - } + case TAG_ID.OPTGROUP: + if (p.openElements.currentTagId === TAG_ID.OPTION) p.openElements.pop(); + if (p.openElements.currentTagId === TAG_ID.OPTGROUP) p.openElements.pop(); p._insertElement(token, NS.HTML); break; - } - case TAG_ID.HR: { - if (p.openElements.currentTagId === TAG_ID.OPTION) { - p.openElements.pop(); - } - if (p.openElements.currentTagId === TAG_ID.OPTGROUP) { - p.openElements.pop(); - } + case TAG_ID.HR: + if (p.openElements.currentTagId === TAG_ID.OPTION) p.openElements.pop(); + if (p.openElements.currentTagId === TAG_ID.OPTGROUP) p.openElements.pop(); p._appendElement(token, NS.HTML); token.ackSelfClosing = true; break; - } case TAG_ID.INPUT: case TAG_ID.KEYGEN: case TAG_ID.TEXTAREA: - case TAG_ID.SELECT: { + case TAG_ID.SELECT: if (p.openElements.hasInSelectScope(TAG_ID.SELECT)) { p.openElements.popUntilTagNamePopped(TAG_ID.SELECT); p._resetInsertionMode(); - if (token.tagID !== TAG_ID.SELECT) { - p._processStartTag(token); - } + if (token.tagID !== TAG_ID.SELECT) p._processStartTag(token); } break; - } case TAG_ID.SCRIPT: - case TAG_ID.TEMPLATE: { + case TAG_ID.TEMPLATE: startTagInHead(p, token); break; - } default: } } function endTagInSelect(p, token) { switch (token.tagID) { - case TAG_ID.OPTGROUP: { - if (p.openElements.stackTop > 0 && p.openElements.currentTagId === TAG_ID.OPTION && p.openElements.tagIDs[p.openElements.stackTop - 1] === TAG_ID.OPTGROUP) { - p.openElements.pop(); - } - if (p.openElements.currentTagId === TAG_ID.OPTGROUP) { - p.openElements.pop(); - } + case TAG_ID.OPTGROUP: + if (p.openElements.stackTop > 0 && p.openElements.currentTagId === TAG_ID.OPTION && p.openElements.tagIDs[p.openElements.stackTop - 1] === TAG_ID.OPTGROUP) p.openElements.pop(); + if (p.openElements.currentTagId === TAG_ID.OPTGROUP) p.openElements.pop(); break; - } - case TAG_ID.OPTION: { - if (p.openElements.currentTagId === TAG_ID.OPTION) { - p.openElements.pop(); - } + case TAG_ID.OPTION: + if (p.openElements.currentTagId === TAG_ID.OPTION) p.openElements.pop(); break; - } - case TAG_ID.SELECT: { + case TAG_ID.SELECT: if (p.openElements.hasInSelectScope(TAG_ID.SELECT)) { p.openElements.popUntilTagNamePopped(TAG_ID.SELECT); p._resetInsertionMode(); } break; - } - case TAG_ID.TEMPLATE: { + case TAG_ID.TEMPLATE: templateEndTagInHead(p, token); break; - } default: } } @@ -147360,9 +133693,7 @@ function startTagInSelectInTable(p, token) { p.openElements.popUntilTagNamePopped(TAG_ID.SELECT); p._resetInsertionMode(); p._processStartTag(token); - } else { - startTagInSelect(p, token); - } + } else startTagInSelect(p, token); } function endTagInSelectInTable(p, token) { const tn = token.tagID; @@ -147372,9 +133703,7 @@ function endTagInSelectInTable(p, token) { p._resetInsertionMode(); p.onEndTag(token); } - } else { - endTagInSelect(p, token); - } + } else endTagInSelect(p, token); } function startTagInTemplate(p, token) { switch (token.tagID) { @@ -147387,50 +133716,42 @@ function startTagInTemplate(p, token) { case TAG_ID.SCRIPT: case TAG_ID.STYLE: case TAG_ID.TEMPLATE: - case TAG_ID.TITLE: { + case TAG_ID.TITLE: startTagInHead(p, token); break; - } case TAG_ID.CAPTION: case TAG_ID.COLGROUP: case TAG_ID.TBODY: case TAG_ID.TFOOT: - case TAG_ID.THEAD: { + case TAG_ID.THEAD: p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE; p.insertionMode = InsertionMode.IN_TABLE; startTagInTable(p, token); break; - } - case TAG_ID.COL: { + case TAG_ID.COL: p.tmplInsertionModeStack[0] = InsertionMode.IN_COLUMN_GROUP; p.insertionMode = InsertionMode.IN_COLUMN_GROUP; startTagInColumnGroup(p, token); break; - } - case TAG_ID.TR: { + case TAG_ID.TR: p.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE_BODY; p.insertionMode = InsertionMode.IN_TABLE_BODY; startTagInTableBody(p, token); break; - } case TAG_ID.TD: - case TAG_ID.TH: { + case TAG_ID.TH: p.tmplInsertionModeStack[0] = InsertionMode.IN_ROW; p.insertionMode = InsertionMode.IN_ROW; startTagInRow(p, token); break; - } - default: { + default: p.tmplInsertionModeStack[0] = InsertionMode.IN_BODY; p.insertionMode = InsertionMode.IN_BODY; startTagInBody(p, token); - } } } function endTagInTemplate(p, token) { - if (token.tagID === TAG_ID.TEMPLATE) { - templateEndTagInHead(p, token); - } + if (token.tagID === TAG_ID.TEMPLATE) templateEndTagInHead(p, token); } function eofInTemplate(p, token) { if (p.openElements.tmplCount > 0) { @@ -147439,33 +133760,22 @@ function eofInTemplate(p, token) { p.tmplInsertionModeStack.shift(); p._resetInsertionMode(); p.onEof(token); - } else { - stopParsing(p, token); - } + } else stopParsing(p, token); } function startTagAfterBody(p, token) { - if (token.tagID === TAG_ID.HTML) { - startTagInBody(p, token); - } else { - tokenAfterBody(p, token); - } + if (token.tagID === TAG_ID.HTML) startTagInBody(p, token); + else tokenAfterBody(p, token); } function endTagAfterBody(p, token) { var _a; if (token.tagID === TAG_ID.HTML) { - if (!p.fragmentContext) { - p.insertionMode = InsertionMode.AFTER_AFTER_BODY; - } + if (!p.fragmentContext) p.insertionMode = InsertionMode.AFTER_AFTER_BODY; if (p.options.sourceCodeLocationInfo && p.openElements.tagIDs[0] === TAG_ID.HTML) { p._setEndLocation(p.openElements.items[0], token); const bodyElement = p.openElements.items[1]; - if (bodyElement && !((_a = p.treeAdapter.getNodeSourceCodeLocation(bodyElement)) === null || _a === void 0 ? void 0 : _a.endTag)) { - p._setEndLocation(bodyElement, token); - } + if (bodyElement && !((_a = p.treeAdapter.getNodeSourceCodeLocation(bodyElement)) === null || _a === void 0 ? void 0 : _a.endTag)) p._setEndLocation(bodyElement, token); } - } else { - tokenAfterBody(p, token); - } + } else tokenAfterBody(p, token); } function tokenAfterBody(p, token) { p.insertionMode = InsertionMode.IN_BODY; @@ -147473,58 +133783,45 @@ function tokenAfterBody(p, token) { } function startTagInFrameset(p, token) { switch (token.tagID) { - case TAG_ID.HTML: { + case TAG_ID.HTML: startTagInBody(p, token); break; - } - case TAG_ID.FRAMESET: { + case TAG_ID.FRAMESET: p._insertElement(token, NS.HTML); break; - } - case TAG_ID.FRAME: { + case TAG_ID.FRAME: p._appendElement(token, NS.HTML); token.ackSelfClosing = true; break; - } - case TAG_ID.NOFRAMES: { + case TAG_ID.NOFRAMES: startTagInHead(p, token); break; - } default: } } function endTagInFrameset(p, token) { if (token.tagID === TAG_ID.FRAMESET && !p.openElements.isRootHtmlElementCurrent()) { p.openElements.pop(); - if (!p.fragmentContext && p.openElements.currentTagId !== TAG_ID.FRAMESET) { - p.insertionMode = InsertionMode.AFTER_FRAMESET; - } + if (!p.fragmentContext && p.openElements.currentTagId !== TAG_ID.FRAMESET) p.insertionMode = InsertionMode.AFTER_FRAMESET; } } function startTagAfterFrameset(p, token) { switch (token.tagID) { - case TAG_ID.HTML: { + case TAG_ID.HTML: startTagInBody(p, token); break; - } - case TAG_ID.NOFRAMES: { + case TAG_ID.NOFRAMES: startTagInHead(p, token); break; - } default: } } function endTagAfterFrameset(p, token) { - if (token.tagID === TAG_ID.HTML) { - p.insertionMode = InsertionMode.AFTER_AFTER_FRAMESET; - } + if (token.tagID === TAG_ID.HTML) p.insertionMode = InsertionMode.AFTER_AFTER_FRAMESET; } function startTagAfterAfterBody(p, token) { - if (token.tagID === TAG_ID.HTML) { - startTagInBody(p, token); - } else { - tokenAfterAfterBody(p, token); - } + if (token.tagID === TAG_ID.HTML) startTagInBody(p, token); + else tokenAfterAfterBody(p, token); } function tokenAfterAfterBody(p, token) { p.insertionMode = InsertionMode.IN_BODY; @@ -147532,19 +133829,17 @@ function tokenAfterAfterBody(p, token) { } function startTagAfterAfterFrameset(p, token) { switch (token.tagID) { - case TAG_ID.HTML: { + case TAG_ID.HTML: startTagInBody(p, token); break; - } - case TAG_ID.NOFRAMES: { + case TAG_ID.NOFRAMES: startTagInHead(p, token); break; - } default: } } function nullCharacterInForeignContent(p, token) { - token.chars = REPLACEMENT_CHARACTER; + token.chars = "�"; p._insertCharacters(token); } function characterInForeignContent(p, token) { @@ -147552,9 +133847,7 @@ function characterInForeignContent(p, token) { p.framesetOk = false; } function popUntilHtmlOrIntegrationPoint(p) { - while (p.treeAdapter.getNamespaceURI(p.openElements.current) !== NS.HTML && p.openElements.currentTagId !== undefined && !p._isIntegrationPoint(p.openElements.currentTagId, p.openElements.current)) { - p.openElements.pop(); - } + while (p.treeAdapter.getNamespaceURI(p.openElements.current) !== NS.HTML && p.openElements.currentTagId !== void 0 && !p._isIntegrationPoint(p.openElements.currentTagId, p.openElements.current)) p.openElements.pop(); } function startTagInForeignContent(p, token) { if (causesExit(token)) { @@ -147563,18 +133856,14 @@ function startTagInForeignContent(p, token) { } else { const current = p._getAdjustedCurrentElement(); const currentNs = p.treeAdapter.getNamespaceURI(current); - if (currentNs === NS.MATHML) { - adjustTokenMathMLAttrs(token); - } else if (currentNs === NS.SVG) { + if (currentNs === NS.MATHML) adjustTokenMathMLAttrs(token); + else if (currentNs === NS.SVG) { adjustTokenSVGTagName(token); adjustTokenSVGAttrs(token); } adjustTokenXMLAttrs(token); - if (token.selfClosing) { - p._appendElement(token, currentNs); - } else { - p._insertElement(token, currentNs); - } + if (token.selfClosing) p._appendElement(token, currentNs); + else p._insertElement(token, currentNs); token.ackSelfClosing = true; } } @@ -147598,7 +133887,6 @@ function endTagInForeignContent(p, token) { } } } - //#endregion //#region ../node_modules/parse5/node_modules/entities/dist/esm/escape.js const xmlReplacer = /["$&'<>\u0080-\uFFFF]/g; @@ -147625,7 +133913,7 @@ function encodeXML(input) { const { index } = match; const char = input.charCodeAt(index); const next = xmlCodeMap.get(char); - if (next === undefined) { + if (next === void 0) { returnValue += `${input.substring(lastIndex, index)}&#x${getCodePoint(input, index).toString(16)};`; lastIndex = xmlReplacer.lastIndex += Number((char & 64512) === 55296); } else { @@ -147661,9 +133949,7 @@ function getEscaper(regex, map) { let lastIndex = 0; let result = ""; while (match = regex.exec(data)) { - if (lastIndex !== match.index) { - result += data.substring(lastIndex, match.index); - } + if (lastIndex !== match.index) result += data.substring(lastIndex, match.index); result += map.get(match[0].charCodeAt(0)); lastIndex = match.index + 1; } @@ -147701,7 +133987,6 @@ const escapeText = /* @__PURE__ */ getEscaper(/[&<>\u00A0]/g, new Map([ [62, ">"], [160, " "] ])); - //#endregion //#region ../node_modules/parse5/dist/serializer/index.js const VOID_ELEMENTS = new Set([ @@ -147758,9 +134043,7 @@ function serialize(node, options) { ...defaultOpts, ...options }; - if (isVoidElement(node, opts)) { - return ""; - } + if (isVoidElement(node, opts)) return ""; return serializeChildNodes(node, opts); } /** @@ -147783,36 +134066,23 @@ function serialize(node, options) { * @param options Serialization options. */ function serializeOuter(node, options) { - const opts = { + return serializeNode(node, { ...defaultOpts, ...options - }; - return serializeNode(node, opts); + }); } function serializeChildNodes(parentNode, options) { let html = ""; const container = options.treeAdapter.isElementNode(parentNode) && options.treeAdapter.getTagName(parentNode) === TAG_NAMES.TEMPLATE && options.treeAdapter.getNamespaceURI(parentNode) === NS.HTML ? options.treeAdapter.getTemplateContent(parentNode) : parentNode; const childNodes = options.treeAdapter.getChildNodes(container); - if (childNodes) { - for (const currentNode of childNodes) { - html += serializeNode(currentNode, options); - } - } + if (childNodes) for (const currentNode of childNodes) html += serializeNode(currentNode, options); return html; } function serializeNode(node, options) { - if (options.treeAdapter.isElementNode(node)) { - return serializeElement(node, options); - } - if (options.treeAdapter.isTextNode(node)) { - return serializeTextNode(node, options); - } - if (options.treeAdapter.isCommentNode(node)) { - return serializeCommentNode(node, options); - } - if (options.treeAdapter.isDocumentTypeNode(node)) { - return serializeDocumentTypeNode(node, options); - } + if (options.treeAdapter.isElementNode(node)) return serializeElement(node, options); + if (options.treeAdapter.isTextNode(node)) return serializeTextNode(node, options); + if (options.treeAdapter.isCommentNode(node)) return serializeCommentNode(node, options); + if (options.treeAdapter.isDocumentTypeNode(node)) return serializeDocumentTypeNode(node, options); return ""; } function serializeElement(node, options) { @@ -147823,30 +134093,20 @@ function serializeAttributes(node, { treeAdapter }) { let html = ""; for (const attr of treeAdapter.getAttrList(node)) { html += " "; - if (attr.namespace) { - switch (attr.namespace) { - case NS.XML: { - html += `xml:${attr.name}`; - break; - } - case NS.XMLNS: { - if (attr.name !== "xmlns") { - html += "xmlns:"; - } - html += attr.name; - break; - } - case NS.XLINK: { - html += `xlink:${attr.name}`; - break; - } - default: { - html += `${attr.prefix}:${attr.name}`; - } - } - } else { - html += attr.name; + if (attr.namespace) switch (attr.namespace) { + case NS.XML: + html += `xml:${attr.name}`; + break; + case NS.XMLNS: + if (attr.name !== "xmlns") html += "xmlns:"; + html += attr.name; + break; + case NS.XLINK: + html += `xlink:${attr.name}`; + break; + default: html += `${attr.prefix}:${attr.name}`; } + else html += attr.name; html += `="${escapeAttribute(attr.value)}"`; } return html; @@ -147864,7 +134124,6 @@ function serializeCommentNode(node, { treeAdapter }) { function serializeDocumentTypeNode(node, { treeAdapter }) { return ``; } - //#endregion //#region ../node_modules/parse5/dist/index.js /** @@ -147897,7 +134156,6 @@ function parseFragment(fragmentContext, html, options) { parser.tokenizer.write(html, true); return parser.getFragment(); } - //#endregion //#region ../node_modules/parse5-htmlparser2-tree-adapter/dist/index.js function enquoteDoctypeId(id) { @@ -147907,17 +134165,10 @@ function enquoteDoctypeId(id) { /** @internal */ function serializeDoctypeContent(name, publicId, systemId) { let str = "!DOCTYPE "; - if (name) { - str += name; - } - if (publicId) { - str += ` PUBLIC ${enquoteDoctypeId(publicId)}`; - } else if (systemId) { - str += " SYSTEM"; - } - if (systemId) { - str += ` ${enquoteDoctypeId(systemId)}`; - } + if (name) str += name; + if (publicId) str += ` PUBLIC ${enquoteDoctypeId(publicId)}`; + else if (systemId) str += " SYSTEM"; + if (systemId) str += ` ${enquoteDoctypeId(systemId)}`; return str; } const adapter = { @@ -147984,9 +134235,8 @@ const adapter = { setDocumentType(document, name, publicId, systemId) { const data = serializeDoctypeContent(name, publicId, systemId); let doctypeNode = document.children.find((node) => isDirective(node) && node.name === "!doctype"); - if (doctypeNode) { - doctypeNode.data = data !== null && data !== void 0 ? data : null; - } else { + if (doctypeNode) doctypeNode.data = data !== null && data !== void 0 ? data : null; + else { doctypeNode = new ProcessingInstruction("!doctype", data); adapter.appendChild(document, doctypeNode); } @@ -148006,36 +134256,26 @@ const adapter = { const { prev, next } = node; node.prev = null; node.next = null; - if (prev) { - prev.next = next; - } - if (next) { - next.prev = prev; - } + if (prev) prev.next = next; + if (next) next.prev = prev; node.parent.children.splice(idx, 1); node.parent = null; } }, insertText(parentNode, text) { const lastChild = parentNode.children[parentNode.children.length - 1]; - if (lastChild && isText(lastChild)) { - lastChild.data += text; - } else { - adapter.appendChild(parentNode, adapter.createTextNode(text)); - } + if (lastChild && isText(lastChild)) lastChild.data += text; + else adapter.appendChild(parentNode, adapter.createTextNode(text)); }, insertTextBefore(parentNode, text, referenceNode) { const prevNode = parentNode.children[parentNode.children.indexOf(referenceNode) - 1]; - if (prevNode && isText(prevNode)) { - prevNode.data += text; - } else { - adapter.insertBefore(parentNode, adapter.createTextNode(text), referenceNode); - } + if (prevNode && isText(prevNode)) prevNode.data += text; + else adapter.insertBefore(parentNode, adapter.createTextNode(text), referenceNode); }, adoptAttributes(recipient, attrs) { for (let i = 0; i < attrs.length; i++) { const attrName = attrs[i].name; - if (recipient.attribs[attrName] === undefined) { + if (recipient.attribs[attrName] === void 0) { recipient.attribs[attrName] = attrs[i].value; recipient["x-attribsNamespace"][attrName] = attrs[i].namespace; recipient["x-attribsPrefix"][attrName] = attrs[i].prefix; @@ -148099,7 +134339,6 @@ const adapter = { }; } }; - //#endregion //#region ../node_modules/cheerio/dist/esm/parsers/parse5-adapter.js /** @@ -148113,10 +134352,8 @@ const adapter = { */ function parseWithParse5(content, options, isDocument, context) { var _a; - (_a = options.treeAdapter) !== null && _a !== void 0 ? _a : options.treeAdapter = adapter; - if (options.scriptingEnabled !== false) { - options.scriptingEnabled = true; - } + (_a = options.treeAdapter) !== null && _a !== void 0 || (options.treeAdapter = adapter); + if (options.scriptingEnabled !== false) options.scriptingEnabled = true; return isDocument ? parse$1(content, options) : parseFragment(context, content, options); } const renderOpts = { treeAdapter: adapter }; @@ -148130,9 +134367,7 @@ function renderWithParse5(dom) { const nodes = "length" in dom ? dom : [dom]; for (let index = 0; index < nodes.length; index += 1) { const node = nodes[index]; - if (isDocument(node)) { - Array.prototype.splice.call(nodes, index, 1, ...node.children); - } + if (isDocument(node)) Array.prototype.splice.call(nodes, index, 1, ...node.children); } let result = ""; for (let index = 0; index < nodes.length; index += 1) { @@ -148141,7 +134376,6 @@ function renderWithParse5(dom) { } return result; } - //#endregion //#region ../node_modules/cheerio/dist/esm/load-parse.js const parse = getParse((content, options, isDocument, context) => options._useHtmlParser2 ? parseDocument(content, options) : parseWithParse5(content, options, isDocument, context)); @@ -148161,7 +134395,6 @@ const parse = getParse((content, options, isDocument, context) => options._useHt * @see {@link https://cheerio.js.org/docs/basics/loading#load} for additional usage information. */ const load = getLoad(parse, (dom, options) => options._useHtmlParser2 ? render$1(dom, options) : renderWithParse5(dom)); - //#endregion //#region ../node_modules/parse5-parser-stream/dist/index.js /** @@ -148190,9 +134423,7 @@ const load = getLoad(parse, (dom, options) => options._useHtmlParser2 ? render$1 */ var ParserStream = class ParserStream extends Writable$1 { static getFragmentStream(fragmentContext, options) { - const parser = Parser.getFragmentParser(fragmentContext, options); - const stream = new ParserStream(options, parser); - return stream; + return new ParserStream(options, Parser.getFragmentParser(fragmentContext, options)); } /** The resulting document node. */ get document() { @@ -148208,19 +134439,15 @@ var ParserStream = class ParserStream extends Writable$1 { super({ decodeStrings: false }); this.parser = parser; this.lastChunkWritten = false; - this.writeCallback = undefined; + this.writeCallback = void 0; this.pendingHtmlInsertions = []; const resume = () => { - for (let i = this.pendingHtmlInsertions.length - 1; i >= 0; i--) { - this.parser.tokenizer.insertHtmlAtCurrentPos(this.pendingHtmlInsertions[i]); - } + for (let i = this.pendingHtmlInsertions.length - 1; i >= 0; i--) this.parser.tokenizer.insertHtmlAtCurrentPos(this.pendingHtmlInsertions[i]); this.pendingHtmlInsertions.length = 0; this.parser.tokenizer.resume(this.writeCallback); }; const documentWrite = (html) => { - if (!this.parser.stopped) { - this.pendingHtmlInsertions.push(html); - } + if (!this.parser.stopped) this.pendingHtmlInsertions.push(html); }; const scriptHandler = (scriptElement) => { if (this.listenerCount("script") > 0) { @@ -148231,9 +134458,7 @@ var ParserStream = class ParserStream extends Writable$1 { this.parser.scriptHandler = scriptHandler; } _write(chunk, _encoding, callback) { - if (typeof chunk !== "string") { - throw new TypeError("Parser can work only with string streams."); - } + if (typeof chunk !== "string") throw new TypeError("Parser can work only with string streams."); this.writeCallback = callback; this.parser.tokenizer.write(chunk, this.lastChunkWritten, this.writeCallback); } @@ -148242,7 +134467,6 @@ var ParserStream = class ParserStream extends Writable$1 { super.end(chunk || "", encoding, callback); } }; - //#endregion //#region ../node_modules/safer-buffer/safer.js var require_safer = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -148262,50 +134486,29 @@ var require_safer = /* @__PURE__ */ __commonJSMin(((exports, module) => { Safer[key] = Buffer[key]; } safer.Buffer.prototype = Buffer.prototype; - if (!Safer.from || Safer.from === Uint8Array.from) { - Safer.from = function(value, encodingOrOffset, length) { - if (typeof value === "number") { - throw new TypeError("The \"value\" argument must not be of type number. Received type " + typeof value); - } - if (value && typeof value.length === "undefined") { - throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value); - } - return Buffer(value, encodingOrOffset, length); - }; - } - if (!Safer.alloc) { - Safer.alloc = function(size, fill, encoding) { - if (typeof size !== "number") { - throw new TypeError("The \"size\" argument must be of type number. Received type " + typeof size); - } - if (size < 0 || size >= 2 * (1 << 30)) { - throw new RangeError("The value \"" + size + "\" is invalid for option \"size\""); - } - var buf = Buffer(size); - if (!fill || fill.length === 0) { - buf.fill(0); - } else if (typeof encoding === "string") { - buf.fill(fill, encoding); - } else { - buf.fill(fill); - } - return buf; - }; - } - if (!safer.kStringMaxLength) { - try { - safer.kStringMaxLength = process.binding("buffer").kStringMaxLength; - } catch (e) {} - } + if (!Safer.from || Safer.from === Uint8Array.from) Safer.from = function(value, encodingOrOffset, length) { + if (typeof value === "number") throw new TypeError("The \"value\" argument must not be of type number. Received type " + typeof value); + if (value && typeof value.length === "undefined") throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof value); + return Buffer(value, encodingOrOffset, length); + }; + if (!Safer.alloc) Safer.alloc = function(size, fill, encoding) { + if (typeof size !== "number") throw new TypeError("The \"size\" argument must be of type number. Received type " + typeof size); + if (size < 0 || size >= 2 * (1 << 30)) throw new RangeError("The value \"" + size + "\" is invalid for option \"size\""); + var buf = Buffer(size); + if (!fill || fill.length === 0) buf.fill(0); + else if (typeof encoding === "string") buf.fill(fill, encoding); + else buf.fill(fill); + return buf; + }; + if (!safer.kStringMaxLength) try { + safer.kStringMaxLength = process.binding("buffer").kStringMaxLength; + } catch (e) {} if (!safer.constants) { safer.constants = { MAX_LENGTH: safer.kMaxLength }; - if (safer.kStringMaxLength) { - safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength; - } + if (safer.kStringMaxLength) safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength; } module.exports = safer; })); - //#endregion //#region ../node_modules/iconv-lite/lib/bom-handling.js var require_bom_handling = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -148345,7 +134548,6 @@ var require_bom_handling = /* @__PURE__ */ __commonJSMin(((exports) => { return this.decoder.end(); }; })); - //#endregion //#region ../node_modules/iconv-lite/encodings/internal.js var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -148391,9 +134593,7 @@ var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => { this.decoder = new StringDecoder$1(codec.enc); } InternalDecoder.prototype.write = function(buf) { - if (!Buffer.isBuffer(buf)) { - buf = Buffer.from(buf); - } + if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf); return this.decoder.write(buf); }; InternalDecoder.prototype.end = function() { @@ -148452,9 +134652,8 @@ var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => { res += this.defaultCharUnicode; contBytes = 0; } - if (curByte < 128) { - res += String.fromCharCode(curByte); - } else if (curByte < 224) { + if (curByte < 128) res += String.fromCharCode(curByte); + else if (curByte < 224) { acc = curByte & 31; contBytes = 1; accBytes = 1; @@ -148462,23 +134661,15 @@ var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => { acc = curByte & 15; contBytes = 2; accBytes = 1; - } else { - res += this.defaultCharUnicode; - } - } else { - if (contBytes > 0) { - acc = acc << 6 | curByte & 63; - contBytes--; - accBytes++; - if (contBytes === 0) { - if (accBytes === 2 && acc < 128 && acc > 0) res += this.defaultCharUnicode; - else if (accBytes === 3 && acc < 2048) res += this.defaultCharUnicode; - else res += String.fromCharCode(acc); - } - } else { - res += this.defaultCharUnicode; - } - } + } else res += this.defaultCharUnicode; + } else if (contBytes > 0) { + acc = acc << 6 | curByte & 63; + contBytes--; + accBytes++; + if (contBytes === 0) if (accBytes === 2 && acc < 128 && acc > 0) res += this.defaultCharUnicode; + else if (accBytes === 3 && acc < 2048) res += this.defaultCharUnicode; + else res += String.fromCharCode(acc); + } else res += this.defaultCharUnicode; } this.acc = acc; this.contBytes = contBytes; @@ -148491,7 +134682,6 @@ var require_internal = /* @__PURE__ */ __commonJSMin(((exports, module) => { return res; }; })); - //#endregion //#region ../node_modules/iconv-lite/encodings/utf32.js var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -148527,17 +134717,15 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => { var code = src.readUInt16LE(i); var isHighSurrogate = 55296 <= code && code < 56320; var isLowSurrogate = 56320 <= code && code < 57344; - if (this.highSurrogate) { - if (isHighSurrogate || !isLowSurrogate) { - write32.call(dst, this.highSurrogate, offset); - offset += 4; - } else { - var codepoint = (this.highSurrogate - 55296 << 10 | code - 56320) + 65536; - write32.call(dst, codepoint, offset); - offset += 4; - this.highSurrogate = 0; - continue; - } + if (this.highSurrogate) if (isHighSurrogate || !isLowSurrogate) { + write32.call(dst, this.highSurrogate, offset); + offset += 4; + } else { + var codepoint = (this.highSurrogate - 55296 << 10 | code - 56320) + 65536; + write32.call(dst, codepoint, offset); + offset += 4; + this.highSurrogate = 0; + continue; } if (isHighSurrogate) this.highSurrogate = code; else { @@ -148574,32 +134762,22 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => { if (overflow.length > 0) { for (; i < src.length && overflow.length < 4; i++) overflow.push(src[i]); if (overflow.length === 4) { - if (isLE) { - codepoint = overflow[i] | overflow[i + 1] << 8 | overflow[i + 2] << 16 | overflow[i + 3] << 24; - } else { - codepoint = overflow[i + 3] | overflow[i + 2] << 8 | overflow[i + 1] << 16 | overflow[i] << 24; - } + if (isLE) codepoint = overflow[i] | overflow[i + 1] << 8 | overflow[i + 2] << 16 | overflow[i + 3] << 24; + else codepoint = overflow[i + 3] | overflow[i + 2] << 8 | overflow[i + 1] << 16 | overflow[i] << 24; overflow.length = 0; offset = _writeCodepoint(dst, offset, codepoint, badChar); } } for (; i < src.length - 3; i += 4) { - if (isLE) { - codepoint = src[i] | src[i + 1] << 8 | src[i + 2] << 16 | src[i + 3] << 24; - } else { - codepoint = src[i + 3] | src[i + 2] << 8 | src[i + 1] << 16 | src[i] << 24; - } + if (isLE) codepoint = src[i] | src[i + 1] << 8 | src[i + 2] << 16 | src[i + 3] << 24; + else codepoint = src[i + 3] | src[i + 2] << 8 | src[i + 1] << 16 | src[i] << 24; offset = _writeCodepoint(dst, offset, codepoint, badChar); } - for (; i < src.length; i++) { - overflow.push(src[i]); - } + for (; i < src.length; i++) overflow.push(src[i]); return dst.slice(0, offset).toString("ucs2"); }; function _writeCodepoint(dst, offset, codepoint, badChar) { - if (codepoint < 0 || codepoint > 1114111) { - codepoint = badChar; - } + if (codepoint < 0 || codepoint > 1114111) codepoint = badChar; if (codepoint >= 65536) { codepoint -= 65536; var high = 55296 | codepoint >> 10; @@ -148611,7 +134789,6 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => { dst[offset++] = codepoint >> 8; return offset; } - ; Utf32Decoder.prototype.end = function() { this.overflow.length = 0; }; @@ -148624,7 +134801,7 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => { Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder; function Utf32AutoEncoder(options, codec) { options = options || {}; - if (options.addBOM === undefined) options.addBOM = true; + if (options.addBOM === void 0) options.addBOM = true; this.encoder = codec.iconv.getEncoder(options.defaultEncoding || "utf-32le", options); } Utf32AutoEncoder.prototype.write = function(str) { @@ -148678,12 +134855,8 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => { b.push(buf[j]); if (b.length === 4) { if (charsProcessed === 0) { - if (b[0] === 255 && b[1] === 254 && b[2] === 0 && b[3] === 0) { - return "utf-32le"; - } - if (b[0] === 0 && b[1] === 0 && b[2] === 254 && b[3] === 255) { - return "utf-32be"; - } + if (b[0] === 255 && b[1] === 254 && b[2] === 0 && b[3] === 0) return "utf-32le"; + if (b[0] === 0 && b[1] === 0 && b[2] === 254 && b[3] === 255) return "utf-32be"; } if (b[0] !== 0 || b[1] > 16) invalidBE++; if (b[3] !== 0 || b[2] > 16) invalidLE++; @@ -148691,9 +134864,7 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => { if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++; b.length = 0; charsProcessed++; - if (charsProcessed >= 100) { - break outer_loop; - } + if (charsProcessed >= 100) break outer_loop; } } } @@ -148702,7 +134873,6 @@ var require_utf32 = /* @__PURE__ */ __commonJSMin(((exports) => { return defaultEncoding || "utf-32le"; } })); - //#endregion //#region ../node_modules/iconv-lite/encodings/utf16.js var require_utf16 = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -148753,7 +134923,7 @@ var require_utf16 = /* @__PURE__ */ __commonJSMin(((exports) => { Utf16Codec.prototype.decoder = Utf16Decoder; function Utf16Encoder(options, codec) { options = options || {}; - if (options.addBOM === undefined) options.addBOM = true; + if (options.addBOM === void 0) options.addBOM = true; this.encoder = codec.iconv.getEncoder("utf-16le", options); } Utf16Encoder.prototype.write = function(str) { @@ -148813,9 +134983,7 @@ var require_utf16 = /* @__PURE__ */ __commonJSMin(((exports) => { if (b[0] !== 0 && b[1] === 0) asciiCharsLE++; b.length = 0; charsProcessed++; - if (charsProcessed >= 100) { - break outer_loop; - } + if (charsProcessed >= 100) break outer_loop; } } } @@ -148824,7 +134992,6 @@ var require_utf16 = /* @__PURE__ */ __commonJSMin(((exports) => { return defaultEncoding || "utf-16le"; } })); - //#endregion //#region ../node_modules/iconv-lite/encodings/utf7.js var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -148834,7 +135001,6 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => { function Utf7Codec(codecOptions, iconv) { this.iconv = iconv; } - ; Utf7Codec.prototype.encoder = Utf7Encoder; Utf7Codec.prototype.decoder = Utf7Decoder; Utf7Codec.prototype.bomAware = true; @@ -148859,31 +135025,25 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => { var plusChar = "+".charCodeAt(0), minusChar = "-".charCodeAt(0), andChar = "&".charCodeAt(0); Utf7Decoder.prototype.write = function(buf) { var res = "", lastI = 0, inBase64 = this.inBase64, base64Accum = this.base64Accum; - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { - if (buf[i] == plusChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); - lastI = i + 1; - inBase64 = true; - } - } else { - if (!base64Chars[buf[i]]) { - if (i == lastI && buf[i] == minusChar) { - res += "+"; - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii"); - res += this.iconv.decode(Buffer.from(b64str, "base64"), "utf16-be"); - } - if (buf[i] != minusChar) i--; - lastI = i + 1; - inBase64 = false; - base64Accum = ""; - } + for (var i = 0; i < buf.length; i++) if (!inBase64) { + if (buf[i] == plusChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); + lastI = i + 1; + inBase64 = true; + } + } else if (!base64Chars[buf[i]]) { + if (i == lastI && buf[i] == minusChar) res += "+"; + else { + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii"); + res += this.iconv.decode(Buffer.from(b64str, "base64"), "utf16-be"); } + if (buf[i] != minusChar) i--; + lastI = i + 1; + inBase64 = false; + base64Accum = ""; } - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); - } else { + if (!inBase64) res += this.iconv.decode(buf.slice(lastI), "ascii"); + else { var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii"); var canBeDecoded = b64str.length - b64str.length % 8; base64Accum = b64str.slice(canBeDecoded); @@ -148905,7 +135065,6 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => { function Utf7IMAPCodec(codecOptions, iconv) { this.iconv = iconv; } - ; Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; Utf7IMAPCodec.prototype.bomAware = true; @@ -148972,31 +135131,25 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => { base64IMAPChars[",".charCodeAt(0)] = true; Utf7IMAPDecoder.prototype.write = function(buf) { var res = "", lastI = 0, inBase64 = this.inBase64, base64Accum = this.base64Accum; - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { - if (buf[i] == andChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); - lastI = i + 1; - inBase64 = true; - } - } else { - if (!base64IMAPChars[buf[i]]) { - if (i == lastI && buf[i] == minusChar) { - res += "&"; - } else { - var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, "/"); - res += this.iconv.decode(Buffer.from(b64str, "base64"), "utf16-be"); - } - if (buf[i] != minusChar) i--; - lastI = i + 1; - inBase64 = false; - base64Accum = ""; - } + for (var i = 0; i < buf.length; i++) if (!inBase64) { + if (buf[i] == andChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); + lastI = i + 1; + inBase64 = true; + } + } else if (!base64IMAPChars[buf[i]]) { + if (i == lastI && buf[i] == minusChar) res += "&"; + else { + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, "/"); + res += this.iconv.decode(Buffer.from(b64str, "base64"), "utf16-be"); } + if (buf[i] != minusChar) i--; + lastI = i + 1; + inBase64 = false; + base64Accum = ""; } - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); - } else { + if (!inBase64) res += this.iconv.decode(buf.slice(lastI), "ascii"); + else { var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, "/"); var canBeDecoded = b64str.length - b64str.length % 8; base64Accum = b64str.slice(canBeDecoded); @@ -149015,7 +135168,6 @@ var require_utf7 = /* @__PURE__ */ __commonJSMin(((exports) => { return res; }; })); - //#endregion //#region ../node_modules/iconv-lite/encodings/sbcs-codec.js var require_sbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -149062,7 +135214,6 @@ var require_sbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { }; SBCSDecoder.prototype.end = function() {}; })); - //#endregion //#region ../node_modules/iconv-lite/encodings/sbcs-data.js var require_sbcs_data = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -149211,7 +135362,6 @@ var require_sbcs_data = /* @__PURE__ */ __commonJSMin(((exports, module) => { "csmacintosh": "macintosh" }; })); - //#endregion //#region ../node_modules/iconv-lite/encodings/sbcs-data-generated.js var require_sbcs_data_generated = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -149664,7 +135814,6 @@ var require_sbcs_data_generated = /* @__PURE__ */ __commonJSMin(((exports, modul } }; })); - //#endregion //#region ../node_modules/iconv-lite/encodings/dbcs-codec.js var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -149691,24 +135840,15 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { for (var i = 129; i <= 254; i++) { var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]]; for (var j = 48; j <= 57; j++) { - if (secondByteNode[j] === UNASSIGNED) { - secondByteNode[j] = NODE_START - commonThirdByteNodeIdx; - } else if (secondByteNode[j] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 2"); - } + if (secondByteNode[j] === UNASSIGNED) secondByteNode[j] = NODE_START - commonThirdByteNodeIdx; + else if (secondByteNode[j] > NODE_START) throw new Error("gb18030 decode tables conflict at byte 2"); var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]]; for (var k = 129; k <= 254; k++) { - if (thirdByteNode[k] === UNASSIGNED) { - thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx; - } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) { - continue; - } else if (thirdByteNode[k] > NODE_START) { - throw new Error("gb18030 decode tables conflict at byte 3"); - } + if (thirdByteNode[k] === UNASSIGNED) thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx; + else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) continue; + else if (thirdByteNode[k] > NODE_START) throw new Error("gb18030 decode tables conflict at byte 3"); var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]]; - for (var l = 48; l <= 57; l++) { - if (fourthByteNode[l] === UNASSIGNED) fourthByteNode[l] = GB18030_CODE; - } + for (var l = 48; l <= 57; l++) if (fourthByteNode[l] === UNASSIGNED) fourthByteNode[l] = GB18030_CODE; } } } @@ -149742,9 +135882,8 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { if (val == UNASSIGNED) { node[bytes[i]] = NODE_START - this.decodeTables.length; this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); - } else if (val <= NODE_START) { - node = this.decodeTables[NODE_START - val]; - } else throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); + } else if (val <= NODE_START) node = this.decodeTables[NODE_START - val]; + else throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); } return node; }; @@ -149754,22 +135893,21 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { curAddr = curAddr & 255; for (var k = 1; k < chunk.length; k++) { var part = chunk[k]; - if (typeof part === "string") { - for (var l = 0; l < part.length;) { - var code = part.charCodeAt(l++); - if (55296 <= code && code < 56320) { - var codeTrail = part.charCodeAt(l++); - if (56320 <= codeTrail && codeTrail < 57344) writeTable[curAddr++] = 65536 + (code - 55296) * 1024 + (codeTrail - 56320); - else throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); - } else if (4080 < code && code <= 4095) { - var len = 4095 - code + 2; - var seq = []; - for (var m = 0; m < len; m++) seq.push(part.charCodeAt(l++)); - writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; - this.decodeTableSeq.push(seq); - } else writeTable[curAddr++] = code; - } - } else if (typeof part === "number") { + if (typeof part === "string") for (var l = 0; l < part.length;) { + var code = part.charCodeAt(l++); + if (55296 <= code && code < 56320) { + var codeTrail = part.charCodeAt(l++); + if (56320 <= codeTrail && codeTrail < 57344) writeTable[curAddr++] = 65536 + (code - 55296) * 1024 + (codeTrail - 56320); + else throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); + } else if (4080 < code && code <= 4095) { + var len = 4095 - code + 2; + var seq = []; + for (var m = 0; m < len; m++) seq.push(part.charCodeAt(l++)); + writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; + this.decodeTableSeq.push(seq); + } else writeTable[curAddr++] = code; + } + else if (typeof part === "number") { var charCode = writeTable[curAddr - 1] + 1; for (var l = 0; l < part; l++) writeTable[curAddr++] = charCode++; } else throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); @@ -149778,7 +135916,7 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { }; DBCSCodec.prototype._getEncodeBucket = function(uCode) { var high = uCode >> 8; - if (this.encodeTable[high] === undefined) this.encodeTable[high] = UNASSIGNED_NODE.slice(0); + if (this.encodeTable[high] === void 0) this.encodeTable[high] = UNASSIGNED_NODE.slice(0); return this.encodeTable[high]; }; DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { @@ -149792,9 +135930,8 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { var bucket = this._getEncodeBucket(uCode); var low = uCode & 255; var node; - if (bucket[low] <= SEQ_START) { - node = this.encodeTableSeq[SEQ_START - bucket[low]]; - } else { + if (bucket[low] <= SEQ_START) node = this.encodeTableSeq[SEQ_START - bucket[low]]; + else { node = {}; if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; bucket[low] = SEQ_START - this.encodeTableSeq.length; @@ -149805,7 +135942,7 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { if (typeof oldVal === "object") node = oldVal; else { node = node[uCode] = {}; - if (oldVal !== undefined) node[DEF_CHAR] = oldVal; + if (oldVal !== void 0) node[DEF_CHAR] = oldVal; } } uCode = seq[seq.length - 1]; @@ -149838,7 +135975,7 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { }; function DBCSEncoder(options, codec) { this.leadSurrogate = -1; - this.seqObj = undefined; + this.seqObj = void 0; this.encodeTable = codec.encodeTable; this.encodeTableSeq = codec.encodeTableSeq; this.defaultCharSingleByte = codec.defCharSB; @@ -149854,47 +135991,40 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { var uCode = nextChar; nextChar = -1; } - if (55296 <= uCode && uCode < 57344) { - if (uCode < 56320) { - if (leadSurrogate === -1) { - leadSurrogate = uCode; - continue; - } else { - leadSurrogate = uCode; - uCode = UNASSIGNED; - } - } else { - if (leadSurrogate !== -1) { - uCode = 65536 + (leadSurrogate - 55296) * 1024 + (uCode - 56320); - leadSurrogate = -1; - } else { - uCode = UNASSIGNED; - } - } - } else if (leadSurrogate !== -1) { + if (55296 <= uCode && uCode < 57344) if (uCode < 56320) if (leadSurrogate === -1) { + leadSurrogate = uCode; + continue; + } else { + leadSurrogate = uCode; + uCode = UNASSIGNED; + } + else if (leadSurrogate !== -1) { + uCode = 65536 + (leadSurrogate - 55296) * 1024 + (uCode - 56320); + leadSurrogate = -1; + } else uCode = UNASSIGNED; + else if (leadSurrogate !== -1) { nextChar = uCode; uCode = UNASSIGNED; leadSurrogate = -1; } var dbcsCode = UNASSIGNED; - if (seqObj !== undefined && uCode != UNASSIGNED) { + if (seqObj !== void 0 && uCode != UNASSIGNED) { var resCode = seqObj[uCode]; if (typeof resCode === "object") { seqObj = resCode; continue; - } else if (typeof resCode == "number") { - dbcsCode = resCode; - } else if (resCode == undefined) { + } else if (typeof resCode == "number") dbcsCode = resCode; + else if (resCode == void 0) { resCode = seqObj[DEF_CHAR]; - if (resCode !== undefined) { + if (resCode !== void 0) { dbcsCode = resCode; nextChar = uCode; - } else {} + } } - seqObj = undefined; + seqObj = void 0; } else if (uCode >= 0) { var subtable = this.encodeTable[uCode >> 8]; - if (subtable !== undefined) dbcsCode = subtable[uCode & 255]; + if (subtable !== void 0) dbcsCode = subtable[uCode & 255]; if (dbcsCode <= SEQ_START) { seqObj = this.encodeTableSeq[SEQ_START - dbcsCode]; continue; @@ -149915,9 +136045,8 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { } } if (dbcsCode === UNASSIGNED) dbcsCode = this.defaultCharSingleByte; - if (dbcsCode < 256) { - newBuf[j++] = dbcsCode; - } else if (dbcsCode < 65536) { + if (dbcsCode < 256) newBuf[j++] = dbcsCode; + else if (dbcsCode < 65536) { newBuf[j++] = dbcsCode >> 8; newBuf[j++] = dbcsCode & 255; } else if (dbcsCode < 16777216) { @@ -149936,19 +136065,16 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { return newBuf.slice(0, j); }; DBCSEncoder.prototype.end = function() { - if (this.leadSurrogate === -1 && this.seqObj === undefined) return; + if (this.leadSurrogate === -1 && this.seqObj === void 0) return; var newBuf = Buffer.alloc(10), j = 0; if (this.seqObj) { var dbcsCode = this.seqObj[DEF_CHAR]; - if (dbcsCode !== undefined) { - if (dbcsCode < 256) { - newBuf[j++] = dbcsCode; - } else { - newBuf[j++] = dbcsCode >> 8; - newBuf[j++] = dbcsCode & 255; - } - } else {} - this.seqObj = undefined; + if (dbcsCode !== void 0) if (dbcsCode < 256) newBuf[j++] = dbcsCode; + else { + newBuf[j++] = dbcsCode >> 8; + newBuf[j++] = dbcsCode & 255; + } + this.seqObj = void 0; } if (this.leadSurrogate !== -1) { newBuf[j++] = this.defaultCharSingleByte; @@ -149974,11 +136100,8 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { uCode = this.defaultCharUnicode.charCodeAt(0); i = seqStart; } else if (uCode === GB18030_CODE) { - if (i >= 3) { - var ptr = (buf[i - 3] - 129) * 12600 + (buf[i - 2] - 48) * 1260 + (buf[i - 1] - 129) * 10 + (curByte - 48); - } else { - var ptr = (prevBytes[i - 3 + prevOffset] - 129) * 12600 + ((i - 2 >= 0 ? buf[i - 2] : prevBytes[i - 2 + prevOffset]) - 48) * 1260 + ((i - 1 >= 0 ? buf[i - 1] : prevBytes[i - 1 + prevOffset]) - 129) * 10 + (curByte - 48); - } + if (i >= 3) var ptr = (buf[i - 3] - 129) * 12600 + (buf[i - 2] - 48) * 1260 + (buf[i - 1] - 129) * 10 + (curByte - 48); + else var ptr = (prevBytes[i - 3 + prevOffset] - 129) * 12600 + ((i - 2 >= 0 ? buf[i - 2] : prevBytes[i - 2 + prevOffset]) - 48) * 1260 + ((i - 1 >= 0 ? buf[i - 1] : prevBytes[i - 1 + prevOffset]) - 129) * 10 + (curByte - 48); var idx = findIdx(this.gb18030.gbChars, ptr); uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; } else if (uCode <= NODE_START) { @@ -150033,7 +136156,6 @@ var require_dbcs_codec = /* @__PURE__ */ __commonJSMin(((exports) => { return l; } })); - //#endregion //#region ../node_modules/iconv-lite/encodings/tables/shiftjis.json var require_shiftjis = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -150323,7 +136445,6 @@ var require_shiftjis = /* @__PURE__ */ __commonJSMin(((exports, module) => { ["fc40", "髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"] ]; })); - //#endregion //#region ../node_modules/iconv-lite/encodings/tables/eucjp.json var require_eucjp = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -150746,7 +136867,6 @@ var require_eucjp = /* @__PURE__ */ __commonJSMin(((exports, module) => { ] ]; })); - //#endregion //#region ../node_modules/iconv-lite/encodings/tables/cp936.json var require_cp936 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -153328,7 +139448,6 @@ var require_cp936 = /* @__PURE__ */ __commonJSMin(((exports, module) => { ["fe40", "兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"] ]; })); - //#endregion //#region ../node_modules/iconv-lite/encodings/tables/gbk-added.json var require_gbk_added = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -153556,7 +139675,6 @@ var require_gbk_added = /* @__PURE__ */ __commonJSMin(((exports, module) => { ["8135f437", ""] ]; })); - //#endregion //#region ../node_modules/iconv-lite/encodings/tables/gb18030-ranges.json var require_gb18030_ranges = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -153981,7 +140099,6 @@ var require_gb18030_ranges = /* @__PURE__ */ __commonJSMin(((exports, module) => ] }; })); - //#endregion //#region ../node_modules/iconv-lite/encodings/tables/cp949.json var require_cp949 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -156199,7 +142316,6 @@ var require_cp949 = /* @__PURE__ */ __commonJSMin(((exports, module) => { ["fda1", "爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"] ]; })); - //#endregion //#region ../node_modules/iconv-lite/encodings/tables/cp950.json var require_cp950 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -156424,7 +142540,6 @@ var require_cp950 = /* @__PURE__ */ __commonJSMin(((exports, module) => { ["f9a1", "龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"] ]; })); - //#endregion //#region ../node_modules/iconv-lite/encodings/tables/big5-added.json var require_big5_added = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -156591,7 +142706,6 @@ var require_big5_added = /* @__PURE__ */ __commonJSMin(((exports, module) => { ["fea1", "𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"] ]; })); - //#endregion //#region ../node_modules/iconv-lite/encodings/dbcs-data.js var require_dbcs_data = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -156772,7 +142886,6 @@ var require_dbcs_data = /* @__PURE__ */ __commonJSMin(((exports, module) => { "xxbig5": "big5hkscs" }; })); - //#endregion //#region ../node_modules/iconv-lite/encodings/index.js var require_encodings = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -156792,7 +142905,6 @@ var require_encodings = /* @__PURE__ */ __commonJSMin(((exports) => { for (var enc in module) if (Object.prototype.hasOwnProperty.call(module, enc)) exports[enc] = module[enc]; } })); - //#endregion //#region ../node_modules/iconv-lite/lib/streams.js var require_streams = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -156807,7 +142919,7 @@ var require_streams = /* @__PURE__ */ __commonJSMin(((exports, module) => { } IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { constructor: { value: IconvLiteEncoderStream } }); IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { - if (typeof chunk != "string") return done(new Error("Iconv encoding stream needs strings as its input.")); + if (typeof chunk != "string") return done(/* @__PURE__ */ new Error("Iconv encoding stream needs strings as its input.")); try { var res = this.conv.write(chunk); if (res && res.length) this.push(res); @@ -156844,7 +142956,7 @@ var require_streams = /* @__PURE__ */ __commonJSMin(((exports, module) => { } IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { constructor: { value: IconvLiteDecoderStream } }); IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { - if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array)) return done(new Error("Iconv decoding stream needs buffers as its input.")); + if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array)) return done(/* @__PURE__ */ new Error("Iconv decoding stream needs buffers as its input.")); try { var res = this.conv.write(chunk); if (res && res.length) this.push(res, this.encoding); @@ -156879,7 +142991,6 @@ var require_streams = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; }; })); - //#endregion //#region ../node_modules/iconv-lite/lib/index.js var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -156975,18 +143086,11 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports, module) => { try { stream_module = __require("stream"); } catch (e) {} - if (stream_module && stream_module.Transform) { - iconv.enableStreamingAPI(stream_module); - } else { - iconv.encodeStream = iconv.decodeStream = function() { - throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it."); - }; - } - if ("Ā" != "Ā") { - console.error("iconv-lite warning: js files use non-utf8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); - } + if (stream_module && stream_module.Transform) iconv.enableStreamingAPI(stream_module); + else iconv.encodeStream = iconv.decodeStream = function() { + throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it."); + }; })); - //#endregion //#region ../node_modules/whatwg-encoding/lib/supported-names.json var require_supported_names = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -157029,7 +143133,6 @@ var require_supported_names = /* @__PURE__ */ __commonJSMin(((exports, module) = "x-user-defined" ]; })); - //#endregion //#region ../node_modules/whatwg-encoding/lib/labels-to-names.json var require_labels_to_names = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -157251,7 +143354,6 @@ var require_labels_to_names = /* @__PURE__ */ __commonJSMin(((exports, module) = "x-user-defined": "x-user-defined" }; })); - //#endregion //#region ../node_modules/whatwg-encoding/lib/whatwg-encoding.js var require_whatwg_encoding = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -157265,41 +143367,27 @@ var require_whatwg_encoding = /* @__PURE__ */ __commonJSMin(((exports) => { }; exports.decode = (uint8Array, fallbackEncodingName) => { let encoding = fallbackEncodingName; - if (!exports.isSupported(encoding)) { - throw new RangeError(`"${encoding}" is not a supported encoding name`); - } + if (!exports.isSupported(encoding)) throw new RangeError(`"${encoding}" is not a supported encoding name`); const bomEncoding = exports.getBOMEncoding(uint8Array); - if (bomEncoding !== null) { - encoding = bomEncoding; - } + if (bomEncoding !== null) encoding = bomEncoding; if (encoding === "x-user-defined") { let result = ""; - for (const byte of uint8Array) { - if (byte <= 127) { - result += String.fromCodePoint(byte); - } else { - result += String.fromCodePoint(63360 + byte - 128); - } - } + for (const byte of uint8Array) if (byte <= 127) result += String.fromCodePoint(byte); + else result += String.fromCodePoint(63360 + byte - 128); return result; } return iconvLite.decode(uint8Array, encoding); }; exports.getBOMEncoding = (uint8Array) => { - if (uint8Array[0] === 254 && uint8Array[1] === 255) { - return "UTF-16BE"; - } else if (uint8Array[0] === 255 && uint8Array[1] === 254) { - return "UTF-16LE"; - } else if (uint8Array[0] === 239 && uint8Array[1] === 187 && uint8Array[2] === 191) { - return "UTF-8"; - } + if (uint8Array[0] === 254 && uint8Array[1] === 255) return "UTF-16BE"; + else if (uint8Array[0] === 255 && uint8Array[1] === 254) return "UTF-16LE"; + else if (uint8Array[0] === 239 && uint8Array[1] === 187 && uint8Array[2] === 191) return "UTF-8"; return null; }; exports.isSupported = (name) => { return supportedNamesSet.has(String(name)); }; })); - //#endregion //#region ../node_modules/encoding-sniffer/dist/esm/sniffer.js var import_lib$1 = /* @__PURE__ */ __toESM(require_lib(), 1); @@ -157401,9 +143489,7 @@ const END_OF_UNQUOTED_ATTRIBUTE_VALUE = new Set([ ]); function toUint8Array(str) { const arr = new Uint8Array(str.length); - for (let i = 0; i < str.length; i++) { - arr[i] = str.charCodeAt(i); - } + for (let i = 0; i < str.length; i++) arr[i] = str.charCodeAt(i); return arr; } const STRINGS = { @@ -157475,43 +143561,30 @@ var Sniffer = class { this.quoteCharacter = 0; this.attributeValue = []; this.maxBytes = maxBytes; - if (userEncoding) { - this.setResult(userEncoding, ResultType.PASSED); - } - if (transportLayerEncodingLabel) { - this.setResult(transportLayerEncodingLabel, ResultType.PASSED); - } - if (defaultEncoding) { - this.setResult(defaultEncoding, ResultType.DEFAULT); - } + if (userEncoding) this.setResult(userEncoding, ResultType.PASSED); + if (transportLayerEncodingLabel) this.setResult(transportLayerEncodingLabel, ResultType.PASSED); + if (defaultEncoding) this.setResult(defaultEncoding, ResultType.DEFAULT); } stateBegin(c) { switch (c) { - case STRINGS.UTF16BE_BOM[0]: { + case STRINGS.UTF16BE_BOM[0]: this.state = State.BOM16BE; break; - } - case STRINGS.UTF16LE_BOM[0]: { + case STRINGS.UTF16LE_BOM[0]: this.state = State.BOM16LE; break; - } - case STRINGS.UTF8_BOM[0]: { + case STRINGS.UTF8_BOM[0]: this.sectionIndex = 1; this.state = State.BOM8; break; - } - case Chars.NIL: { + case Chars.NIL: this.state = State.UTF16BE_XML_PREFIX; this.sectionIndex = 1; break; - } - case Chars.LT: { + case Chars.LT: this.state = State.BeginLT; break; - } - default: { - this.state = State.BeforeTag; - } + default: this.state = State.BeforeTag; } } stateBeginLT(c) { @@ -157528,9 +143601,7 @@ var Sniffer = class { } stateUTF16BE_XML_PREFIX(c) { if (this.advanceSection(STRINGS.UTF16BE_XML_PREFIX, c)) { - if (this.sectionIndex === STRINGS.UTF16BE_XML_PREFIX.length) { - this.setResult("utf-16be", ResultType.XML_PREFIX); - } + if (this.sectionIndex === STRINGS.UTF16BE_XML_PREFIX.length) this.setResult("utf-16be", ResultType.XML_PREFIX); } else { this.state = State.BeforeTag; this.stateBeforeTag(c); @@ -157538,34 +143609,28 @@ var Sniffer = class { } stateUTF16LE_XML_PREFIX(c) { if (this.advanceSection(STRINGS.UTF16LE_XML_PREFIX, c)) { - if (this.sectionIndex === STRINGS.UTF16LE_XML_PREFIX.length) { - this.setResult("utf-16le", ResultType.XML_PREFIX); - } + if (this.sectionIndex === STRINGS.UTF16LE_XML_PREFIX.length) this.setResult("utf-16le", ResultType.XML_PREFIX); } else { this.state = State.BeforeTag; this.stateBeforeTag(c); } } stateBOM16LE(c) { - if (c === STRINGS.UTF16LE_BOM[1]) { - this.setResult("utf-16le", ResultType.BOM); - } else { + if (c === STRINGS.UTF16LE_BOM[1]) this.setResult("utf-16le", ResultType.BOM); + else { this.state = State.BeforeTag; this.stateBeforeTag(c); } } stateBOM16BE(c) { - if (c === STRINGS.UTF16BE_BOM[1]) { - this.setResult("utf-16be", ResultType.BOM); - } else { + if (c === STRINGS.UTF16BE_BOM[1]) this.setResult("utf-16be", ResultType.BOM); + else { this.state = State.BeforeTag; this.stateBeforeTag(c); } } stateBOM8(c) { - if (this.advanceSection(STRINGS.UTF8_BOM, c) && this.sectionIndex === STRINGS.UTF8_BOM.length) { - this.setResult("utf-8", ResultType.BOM); - } + if (this.advanceSection(STRINGS.UTF8_BOM, c) && this.sectionIndex === STRINGS.UTF8_BOM.length) this.setResult("utf-8", ResultType.BOM); } stateBeforeTag(c) { if (c === Chars.LT) { @@ -157585,31 +143650,24 @@ var Sniffer = class { * */ stateBeforeTagName(c) { - if (isAsciiAlpha(c)) { - if ((c | 32) === STRINGS.META[0]) { - this.sectionIndex = 1; - this.state = State.TagNameMeta; - } else { - this.state = State.TagNameOther; - } - } else switch (c) { - case Chars.SLASH: { + if (isAsciiAlpha(c)) if ((c | 32) === STRINGS.META[0]) { + this.sectionIndex = 1; + this.state = State.TagNameMeta; + } else this.state = State.TagNameOther; + else switch (c) { + case Chars.SLASH: this.state = State.BeforeCloseTagName; break; - } - case Chars.EXCLAMATION: { + case Chars.EXCLAMATION: this.state = State.CommentStart; this.sectionIndex = 2; break; - } - case Chars.QUESTION: { + case Chars.QUESTION: this.state = State.WeirdTag; break; - } - default: { + default: this.state = State.BeforeTag; this.stateBeforeTag(c); - } } } stateBeforeCloseTagName(c) { @@ -157628,20 +143686,14 @@ var Sniffer = class { } stateCommentEnd(c) { if (this.advanceSection(STRINGS.COMMENT_END, c)) { - if (this.sectionIndex === STRINGS.COMMENT_END.length) { - this.state = State.BeforeTag; - } - } else if (c === Chars.DASH) { - this.sectionIndex = 2; - } + if (this.sectionIndex === STRINGS.COMMENT_END.length) this.state = State.BeforeTag; + } else if (c === Chars.DASH) this.sectionIndex = 2; } /** * Any section starting with `= 65 && c <= 90 ? 32 : 0)); - } + } else if (this.attribType === AttribType.Charset) this.attributeValue.push(c | (c >= 65 && c <= 90 ? 32 : 0)); } findMetaContentEncoding(c) { if (this.advanceSectionIC(STRINGS.CHARSET, c)) { - if (this.sectionIndex === STRINGS.CHARSET.length) { - return true; - } - } else { - this.sectionIndex = Number(c === STRINGS.CHARSET[0]); - } + if (this.sectionIndex === STRINGS.CHARSET.length) return true; + } else this.sectionIndex = Number(c === STRINGS.CHARSET[0]); return false; } stateMetaContentValueUnquotedBeforeEncoding(c) { - if (END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c)) { - this.stateAttributeValueUnquoted(c); - } else if (this.sectionIndex === STRINGS.CHARSET.length) { - if (c === Chars.EQUALS) { - this.state = State.MetaContentValueUnquotedBeforeValue; - } - } else { - this.findMetaContentEncoding(c); - } + if (END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c)) this.stateAttributeValueUnquoted(c); + else if (this.sectionIndex === STRINGS.CHARSET.length) { + if (c === Chars.EQUALS) this.state = State.MetaContentValueUnquotedBeforeValue; + } else this.findMetaContentEncoding(c); } stateMetaContentValueUnquotedBeforeValue(c) { if (isQuote(c)) { this.quoteCharacter = c; this.state = State.MetaContentValueUnquotedValueQuoted; - } else if (END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c)) { - this.stateAttributeValueUnquoted(c); - } else { + } else if (END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c)) this.stateAttributeValueUnquoted(c); + else { this.state = State.MetaContentValueUnquotedValueUnquoted; this.stateMetaContentValueUnquotedValueUnquoted(c); } } stateMetaContentValueUnquotedValueQuoted(c) { - if (END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c)) { - this.stateAttributeValueUnquoted(c); - } else if (c === this.quoteCharacter) { + if (END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c)) this.stateAttributeValueUnquoted(c); + else if (c === this.quoteCharacter) { this.handleMetaContentValue(); this.state = State.AttributeValueUnquoted; - } else { - this.attributeValue.push(c | (c >= 65 && c <= 90 ? 32 : 0)); - } + } else this.attributeValue.push(c | (c >= 65 && c <= 90 ? 32 : 0)); } stateMetaContentValueUnquotedValueUnquoted(c) { if (END_OF_UNQUOTED_ATTRIBUTE_VALUE.has(c) || c === Chars.SEMICOLON) { this.handleMetaContentValue(); this.state = State.AttributeValueUnquoted; this.stateAttributeValueUnquoted(c); - } else { - this.attributeValue.push(c | (c >= 65 && c <= 90 ? 32 : 0)); - } + } else this.attributeValue.push(c | (c >= 65 && c <= 90 ? 32 : 0)); } stateMetaContentValueQuotedValueUnquoted(c) { if (isQuote(c) || SPACE_CHARACTERS.has(c) || c === Chars.SEMICOLON) { this.handleMetaContentValue(); this.state = State.AttributeValueQuoted; this.stateAttributeValueQuoted(c); - } else { - this.attributeValue.push(c | (c >= 65 && c <= 90 ? 32 : 0)); - } + } else this.attributeValue.push(c | (c >= 65 && c <= 90 ? 32 : 0)); } stateMetaContentValueQuotedValueQuoted(c) { if (isQuote(c)) { - if (c !== this.quoteCharacter) { - this.handleMetaContentValue(); - } + if (c !== this.quoteCharacter) this.handleMetaContentValue(); this.state = State.AttributeValueQuoted; this.stateAttributeValueQuoted(c); - } else { - this.attributeValue.push(c | (c >= 65 && c <= 90 ? 32 : 0)); - } + } else this.attributeValue.push(c | (c >= 65 && c <= 90 ? 32 : 0)); } stateMetaContentValueQuotedBeforeEncoding(c) { - if (c === this.quoteCharacter) { - this.stateAttributeValueQuoted(c); - } else if (this.findMetaContentEncoding(c)) { - this.state = State.MetaContentValueQuotedAfterEncoding; - } + if (c === this.quoteCharacter) this.stateAttributeValueQuoted(c); + else if (this.findMetaContentEncoding(c)) this.state = State.MetaContentValueQuotedAfterEncoding; } stateMetaContentValueQuotedAfterEncoding(c) { - if (c === Chars.EQUALS) { - this.state = State.MetaContentValueQuotedBeforeValue; - } else if (!SPACE_CHARACTERS.has(c)) { + if (c === Chars.EQUALS) this.state = State.MetaContentValueQuotedBeforeValue; + else if (!SPACE_CHARACTERS.has(c)) { this.state = State.MetaContentValueQuotedBeforeEncoding; this.stateMetaContentValueQuotedBeforeEncoding(c); } } stateMetaContentValueQuotedBeforeValue(c) { - if (c === this.quoteCharacter) { - this.stateAttributeValueQuoted(c); - } else if (isQuote(c)) { - this.state = State.MetaContentValueQuotedValueQuoted; - } else if (!SPACE_CHARACTERS.has(c)) { + if (c === this.quoteCharacter) this.stateAttributeValueQuoted(c); + else if (isQuote(c)) this.state = State.MetaContentValueQuotedValueQuoted; + else if (!SPACE_CHARACTERS.has(c)) { this.state = State.MetaContentValueQuotedValueUnquoted; this.stateMetaContentValueQuotedValueUnquoted(c); } @@ -157936,9 +143940,7 @@ var Sniffer = class { if (c === this.quoteCharacter) { this.handleAttributeValue(); this.state = State.BeforeAttribute; - } else if (this.attribType === AttribType.Charset) { - this.attributeValue.push(c | (c >= 65 && c <= 90 ? 32 : 0)); - } + } else if (this.attribType === AttribType.Charset) this.attributeValue.push(c | (c >= 65 && c <= 90 ? 32 : 0)); } stateXMLDeclaration(c) { if (this.advanceSection(STRINGS.XML_DECLARATION, c)) { @@ -157946,25 +143948,17 @@ var Sniffer = class { this.sectionIndex = 0; this.state = State.XMLDeclarationBeforeEncoding; } - } else { - this.state = State.WeirdTag; - } + } else this.state = State.WeirdTag; } stateXMLDeclarationBeforeEncoding(c) { if (this.advanceSection(STRINGS.ENCODING, c)) { - if (this.sectionIndex === STRINGS.ENCODING.length) { - this.state = State.XMLDeclarationAfterEncoding; - } - } else if (c === Chars.GT) { - this.state = State.BeforeTag; - } else { - this.sectionIndex = Number(c === STRINGS.ENCODING[0]); - } + if (this.sectionIndex === STRINGS.ENCODING.length) this.state = State.XMLDeclarationAfterEncoding; + } else if (c === Chars.GT) this.state = State.BeforeTag; + else this.sectionIndex = Number(c === STRINGS.ENCODING[0]); } stateXMLDeclarationAfterEncoding(c) { - if (c === Chars.EQUALS) { - this.state = State.XMLDeclarationBeforeValue; - } else if (c > Chars.SPACE) { + if (c === Chars.EQUALS) this.state = State.XMLDeclarationBeforeValue; + else if (c > Chars.SPACE) { this.state = State.WeirdTag; this.stateWeirdTag(c); } @@ -157982,189 +143976,144 @@ var Sniffer = class { if (isQuote(c)) { this.setResult(String.fromCharCode(...this.attributeValue), ResultType.XML_ENCODING); this.state = State.WeirdTag; - } else if (c === Chars.GT) { - this.state = State.BeforeTag; - } else if (c <= Chars.SPACE) { - this.state = State.WeirdTag; - } else { - this.attributeValue.push(c | (c >= 65 && c <= 90 ? 32 : 0)); - } + } else if (c === Chars.GT) this.state = State.BeforeTag; + else if (c <= Chars.SPACE) this.state = State.WeirdTag; + else this.attributeValue.push(c | (c >= 65 && c <= 90 ? 32 : 0)); } write(buffer) { let index = 0; for (; index < buffer.length && this.offset + index < this.maxBytes; index++) { const c = buffer[index]; switch (this.state) { - case State.Begin: { + case State.Begin: this.stateBegin(c); break; - } - case State.BOM16BE: { + case State.BOM16BE: this.stateBOM16BE(c); break; - } - case State.BOM16LE: { + case State.BOM16LE: this.stateBOM16LE(c); break; - } - case State.BOM8: { + case State.BOM8: this.stateBOM8(c); break; - } - case State.UTF16LE_XML_PREFIX: { + case State.UTF16LE_XML_PREFIX: this.stateUTF16LE_XML_PREFIX(c); break; - } - case State.BeginLT: { + case State.BeginLT: this.stateBeginLT(c); break; - } - case State.UTF16BE_XML_PREFIX: { + case State.UTF16BE_XML_PREFIX: this.stateUTF16BE_XML_PREFIX(c); break; - } case State.BeforeTag: { const idx = buffer.indexOf(Chars.LT, index); - if (idx === -1) { - index = buffer.length; - } else { + if (idx === -1) index = buffer.length; + else { index = idx; this.stateBeforeTag(Chars.LT); } break; } - case State.BeforeTagName: { + case State.BeforeTagName: this.stateBeforeTagName(c); break; - } - case State.BeforeCloseTagName: { + case State.BeforeCloseTagName: this.stateBeforeCloseTagName(c); break; - } - case State.CommentStart: { + case State.CommentStart: this.stateCommentStart(c); break; - } - case State.CommentEnd: { + case State.CommentEnd: this.stateCommentEnd(c); break; - } - case State.TagNameMeta: { + case State.TagNameMeta: this.stateTagNameMeta(c); break; - } - case State.TagNameOther: { + case State.TagNameOther: this.stateTagNameOther(c); break; - } - case State.XMLDeclaration: { + case State.XMLDeclaration: this.stateXMLDeclaration(c); break; - } - case State.XMLDeclarationBeforeEncoding: { + case State.XMLDeclarationBeforeEncoding: this.stateXMLDeclarationBeforeEncoding(c); break; - } - case State.XMLDeclarationAfterEncoding: { + case State.XMLDeclarationAfterEncoding: this.stateXMLDeclarationAfterEncoding(c); break; - } - case State.XMLDeclarationBeforeValue: { + case State.XMLDeclarationBeforeValue: this.stateXMLDeclarationBeforeValue(c); break; - } - case State.XMLDeclarationValue: { + case State.XMLDeclarationValue: this.stateXMLDeclarationValue(c); break; - } - case State.WeirdTag: { + case State.WeirdTag: this.stateWeirdTag(c); break; - } - case State.BeforeAttribute: { + case State.BeforeAttribute: this.stateBeforeAttribute(c); break; - } - case State.MetaAttribHttpEquiv: { + case State.MetaAttribHttpEquiv: this.stateMetaAttribHttpEquiv(c); break; - } - case State.MetaAttribHttpEquivValue: { + case State.MetaAttribHttpEquivValue: this.stateMetaAttribHttpEquivValue(c); break; - } - case State.MetaAttribC: { + case State.MetaAttribC: this.stateMetaAttribC(c); break; - } - case State.MetaAttribContent: { + case State.MetaAttribContent: this.stateMetaAttribContent(c); break; - } - case State.MetaAttribCharset: { + case State.MetaAttribCharset: this.stateMetaAttribCharset(c); break; - } - case State.MetaAttribAfterName: { + case State.MetaAttribAfterName: this.stateMetaAttribAfterName(c); break; - } - case State.MetaContentValueQuotedBeforeEncoding: { + case State.MetaContentValueQuotedBeforeEncoding: this.stateMetaContentValueQuotedBeforeEncoding(c); break; - } - case State.MetaContentValueQuotedAfterEncoding: { + case State.MetaContentValueQuotedAfterEncoding: this.stateMetaContentValueQuotedAfterEncoding(c); break; - } - case State.MetaContentValueQuotedBeforeValue: { + case State.MetaContentValueQuotedBeforeValue: this.stateMetaContentValueQuotedBeforeValue(c); break; - } - case State.MetaContentValueQuotedValueQuoted: { + case State.MetaContentValueQuotedValueQuoted: this.stateMetaContentValueQuotedValueQuoted(c); break; - } - case State.MetaContentValueQuotedValueUnquoted: { + case State.MetaContentValueQuotedValueUnquoted: this.stateMetaContentValueQuotedValueUnquoted(c); break; - } - case State.MetaContentValueUnquotedBeforeEncoding: { + case State.MetaContentValueUnquotedBeforeEncoding: this.stateMetaContentValueUnquotedBeforeEncoding(c); break; - } - case State.MetaContentValueUnquotedBeforeValue: { + case State.MetaContentValueUnquotedBeforeValue: this.stateMetaContentValueUnquotedBeforeValue(c); break; - } - case State.MetaContentValueUnquotedValueQuoted: { + case State.MetaContentValueUnquotedValueQuoted: this.stateMetaContentValueUnquotedValueQuoted(c); break; - } - case State.MetaContentValueUnquotedValueUnquoted: { + case State.MetaContentValueUnquotedValueUnquoted: this.stateMetaContentValueUnquotedValueUnquoted(c); break; - } - case State.AnyAttribName: { + case State.AnyAttribName: this.stateAnyAttribName(c); break; - } - case State.AfterAttributeName: { + case State.AfterAttributeName: this.stateAfterAttributeName(c); break; - } - case State.BeforeAttributeValue: { + case State.BeforeAttributeValue: this.stateBeforeAttributeValue(c); break; - } - case State.AttributeValueQuoted: { + case State.AttributeValueQuoted: this.stateAttributeValueQuoted(c); break; - } - case State.AttributeValueUnquoted: { + case State.AttributeValueUnquoted: this.stateAttributeValueUnquoted(c); break; - } } } this.offset += index; @@ -158176,7 +144125,6 @@ function getEncoding(buffer, options) { sniffer.write(buffer); return sniffer.encoding; } - //#endregion //#region ../node_modules/encoding-sniffer/dist/esm/index.js /** @@ -158223,16 +144171,12 @@ var DecodeStream = class extends Transform { this.getIconvStream().write(chunk, callback); } getIconvStream() { - if (this.iconv) { - return this.iconv; - } + if (this.iconv) return this.iconv; const stream = import_lib$1.default.decodeStream(this.sniffer.encoding); stream.on("data", (chunk) => this.push(chunk, "utf-8")); stream.on("end", () => this.push(null)); this.iconv = stream; - for (const buffer of this.buffers) { - stream.write(buffer); - } + for (const buffer of this.buffers) stream.write(buffer); this.buffers.length = 0; return stream; } @@ -158240,7 +144184,6 @@ var DecodeStream = class extends Transform { this.getIconvStream().end(callback); } }; - //#endregion //#region ../node_modules/undici/lib/core/symbols.js var require_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -158317,7 +144260,6 @@ var require_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => { kHttpsProxyAgent: Symbol("https proxy agent") }; })); - //#endregion //#region ../node_modules/undici/lib/util/timers.js var require_timers = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -158461,22 +144403,15 @@ var require_timers = /* @__PURE__ */ __commonJSMin(((exports, module) => { } if (timer._state === TO_BE_CLEARED) { timer._state = NOT_IN_LIST; - if (--len !== 0) { - fastTimers[idx] = fastTimers[len]; - } - } else { - ++idx; - } + if (--len !== 0) fastTimers[idx] = fastTimers[len]; + } else ++idx; } fastTimers.length = len; - if (fastTimers.length !== 0) { - refreshTimeout(); - } + if (fastTimers.length !== 0) refreshTimeout(); } function refreshTimeout() { - if (fastNowTimeout?.refresh) { - fastNowTimeout.refresh(); - } else { + if (fastNowTimeout?.refresh) fastNowTimeout.refresh(); + else { clearTimeout(fastNowTimeout); fastNowTimeout = setTimeout(onTick, TICK_MS); fastNowTimeout?.unref(); @@ -158552,12 +144487,8 @@ var require_timers = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {void} */ refresh() { - if (this._state === NOT_IN_LIST) { - fastTimers.push(this); - } - if (!fastNowTimeout || fastTimers.length === 1) { - refreshTimeout(); - } + if (this._state === NOT_IN_LIST) fastTimers.push(this); + if (!fastNowTimeout || fastTimers.length === 1) refreshTimeout(); this._state = PENDING; } /** @@ -158580,14 +144511,12 @@ var require_timers = /* @__PURE__ */ __commonJSMin(((exports, module) => { return delay <= RESOLUTION_MS ? setTimeout(callback, delay, arg) : new FastTimer(callback, delay, arg); }, clearTimeout(timeout) { - if (timeout[kFastTimer]) { - /** - * @type {FastTimer} - */ - timeout.clear(); - } else { - clearTimeout(timeout); - } + if (timeout[kFastTimer]) + /** + * @type {FastTimer} + */ + timeout.clear(); + else clearTimeout(timeout); }, setFastTimeout(callback, delay, arg) { return new FastTimer(callback, delay, arg); @@ -158612,7 +144541,6 @@ var require_timers = /* @__PURE__ */ __commonJSMin(((exports, module) => { kFastTimer }; })); - //#endregion //#region ../node_modules/undici/lib/core/errors.js var require_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -158876,8 +144804,8 @@ var require_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => { constructor(message, code, data) { super(message); this.name = "HTTPParserError"; - this.code = code ? `HPE_${code}` : undefined; - this.data = data ? data.toString() : undefined; + this.code = code ? `HPE_${code}` : void 0; + this.data = data ? data.toString() : void 0; } static [Symbol.hasInstance](instance) { return instance && instance[kHTTPParserError] === true; @@ -158997,7 +144925,6 @@ var require_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => { MaxOriginsReachedError }; })); - //#endregion //#region ../node_modules/undici/lib/core/constants.js var require_constants$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -159115,9 +145042,7 @@ var require_constants$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function getHeaderNameAsBuffer(header) { let buffer = wellknownHeaderNameBuffers[header]; - if (buffer === undefined) { - buffer = Buffer.from(header); - } + if (buffer === void 0) buffer = Buffer.from(header); return buffer; } for (let i = 0; i < wellknownHeaderNames.length; ++i) { @@ -159131,7 +145056,6 @@ var require_constants$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { getHeaderNameAsBuffer }; })); - //#endregion //#region ../node_modules/undici/lib/core/tree.js var require_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -159153,18 +145077,10 @@ var require_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {number} index */ constructor(key, value, index) { - if (index === undefined || index >= key.length) { - throw new TypeError("Unreachable"); - } - const code = this.code = key.charCodeAt(index); - if (code > 127) { - throw new TypeError("key must be ascii string"); - } - if (key.length !== ++index) { - this.middle = new TstNode(key, value, index); - } else { - this.value = value; - } + if (index === void 0 || index >= key.length) throw new TypeError("Unreachable"); + if ((this.code = key.charCodeAt(index)) > 127) throw new TypeError("key must be ascii string"); + if (key.length !== ++index) this.middle = new TstNode(key, value, index); + else this.value = value; } /** * @param {string} key @@ -159173,9 +145089,7 @@ var require_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ add(key, value) { const length = key.length; - if (length === 0) { - throw new TypeError("Unreachable"); - } + if (length === 0) throw new TypeError("Unreachable"); let index = 0; /** * @type {TstNode} @@ -159183,29 +145097,22 @@ var require_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => { let node = this; while (true) { const code = key.charCodeAt(index); - if (code > 127) { - throw new TypeError("key must be ascii string"); + if (code > 127) throw new TypeError("key must be ascii string"); + if (node.code === code) if (length === ++index) { + node.value = value; + break; + } else if (node.middle !== null) node = node.middle; + else { + node.middle = new TstNode(key, value, index); + break; } - if (node.code === code) { - if (length === ++index) { - node.value = value; - break; - } else if (node.middle !== null) { - node = node.middle; - } else { - node.middle = new TstNode(key, value, index); - break; - } - } else if (node.code < code) { - if (node.left !== null) { - node = node.left; - } else { - node.left = new TstNode(key, value, index); - break; - } - } else if (node.right !== null) { - node = node.right; - } else { + else if (node.code < code) if (node.left !== null) node = node.left; + else { + node.left = new TstNode(key, value, index); + break; + } + else if (node.right !== null) node = node.right; + else { node.right = new TstNode(key, value, index); break; } @@ -159224,14 +145131,10 @@ var require_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => { let node = this; while (node !== null && index < keylength) { let code = key[index]; - if (code <= 90 && code >= 65) { - code |= 32; - } + if (code <= 90 && code >= 65) code |= 32; while (node !== null) { if (code === node.code) { - if (keylength === ++index) { - return node; - } + if (keylength === ++index) return node; node = node.middle; break; } @@ -159250,11 +145153,8 @@ var require_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {void} * */ insert(key, value) { - if (this.node === null) { - this.node = new TstNode(key, value, 0); - } else { - this.node.add(key, value); - } + if (this.node === null) this.node = new TstNode(key, value, 0); + else this.node.add(key, value); } /** * @param {Uint8Array} key @@ -159274,7 +145174,6 @@ var require_tree = /* @__PURE__ */ __commonJSMin(((exports, module) => { tree }; })); - //#endregion //#region ../node_modules/undici/lib/core/util.js var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -159308,11 +145207,9 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function wrapRequestBody(body) { if (isStream(body)) { - if (bodyLength(body) === 0) { - body.on("data", function() { - assert$34(false); - }); - } + if (bodyLength(body) === 0) body.on("data", function() { + assert$34(false); + }); if (typeof body.readableDidRead !== "boolean") { body[kBodyUsed] = false; EE$2.prototype.on.call(body, "data", function() { @@ -159320,15 +145217,10 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { }); } return body; - } else if (body && typeof body.pipeTo === "function") { - return new BodyAsyncIterable(body); - } else if (body && isFormDataLike(body)) { - return body; - } else if (body && typeof body !== "string" && !ArrayBuffer.isView(body) && isIterable(body)) { - return new BodyAsyncIterable(body); - } else { - return body; - } + } else if (body && typeof body.pipeTo === "function") return new BodyAsyncIterable(body); + else if (body && isFormDataLike(body)) return body; + else if (body && typeof body !== "string" && !ArrayBuffer.isView(body) && isIterable(body)) return new BodyAsyncIterable(body); + else return body; } /** * @param {*} obj @@ -159343,13 +145235,10 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * based on https://github.com/node-fetch/fetch-blob/blob/8ab587d34080de94140b54f07168451e7d0b655e/index.js#L229-L241 (MIT License) */ function isBlobLike(object) { - if (object === null) { - return false; - } else if (object instanceof Blob) { - return true; - } else if (typeof object !== "object") { - return false; - } else { + if (object === null) return false; + else if (object instanceof Blob) return true; + else if (typeof object !== "object") return false; + else { const sTag = object[Symbol.toStringTag]; return (sTag === "Blob" || sTag === "File") && ("stream" in object && typeof object.stream === "function" || "arrayBuffer" in object && typeof object.arrayBuffer === "function"); } @@ -159367,13 +145256,9 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {string} The URL with the query params added */ function serializePathWithQuery(url, queryParams) { - if (pathHasQueryOrFragment(url)) { - throw new Error("Query params cannot be passed when url already contains \"?\" or \"#\"."); - } + if (pathHasQueryOrFragment(url)) throw new Error("Query params cannot be passed when url already contains \"?\" or \"#\"."); const stringified = stringify$2(queryParams); - if (stringified) { - url += "?" + stringified; - } + if (stringified) url += "?" + stringified; return url; } /** @@ -159403,47 +145288,25 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @type {URL} */ url = new URL(url); - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); - } + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); return url; } - if (!url || typeof url !== "object") { - throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); - } + if (!url || typeof url !== "object") throw new InvalidArgumentError("Invalid URL: The URL argument must be a non-null object."); if (!(url instanceof URL)) { - if (url.port != null && url.port !== "" && isValidPort(url.port) === false) { - throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); - } - if (url.path != null && typeof url.path !== "string") { - throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); - } - if (url.pathname != null && typeof url.pathname !== "string") { - throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); - } - if (url.hostname != null && typeof url.hostname !== "string") { - throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); - } - if (url.origin != null && typeof url.origin !== "string") { - throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); - } - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); - } + if (url.port != null && url.port !== "" && isValidPort(url.port) === false) throw new InvalidArgumentError("Invalid URL: port must be a valid integer or a string representation of an integer."); + if (url.path != null && typeof url.path !== "string") throw new InvalidArgumentError("Invalid URL path: the path must be a string or null/undefined."); + if (url.pathname != null && typeof url.pathname !== "string") throw new InvalidArgumentError("Invalid URL pathname: the pathname must be a string or null/undefined."); + if (url.hostname != null && typeof url.hostname !== "string") throw new InvalidArgumentError("Invalid URL hostname: the hostname must be a string or null/undefined."); + if (url.origin != null && typeof url.origin !== "string") throw new InvalidArgumentError("Invalid URL origin: the origin must be a string or null/undefined."); + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); const port = url.port != null ? url.port : url.protocol === "https:" ? 443 : 80; let origin = url.origin != null ? url.origin : `${url.protocol || ""}//${url.hostname || ""}:${port}`; let path = url.path != null ? url.path : `${url.pathname || ""}${url.search || ""}`; - if (origin[origin.length - 1] === "/") { - origin = origin.slice(0, origin.length - 1); - } - if (path && path[0] !== "/") { - path = `/${path}`; - } + if (origin[origin.length - 1] === "/") origin = origin.slice(0, origin.length - 1); + if (path && path[0] !== "/") path = `/${path}`; return new URL(`${origin}${path}`); } - if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) { - throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); - } + if (!isHttpOrHttpsPrefixed(url.origin || url.protocol)) throw new InvalidArgumentError("Invalid URL protocol: the URL must start with `http:` or `https:`."); return url; } /** @@ -159452,9 +145315,7 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function parseOrigin(url) { url = parseURL(url); - if (url.pathname !== "/" || url.search || url.hash) { - throw new InvalidArgumentError("invalid url"); - } + if (url.pathname !== "/" || url.search || url.hash) throw new InvalidArgumentError("invalid url"); return url; } /** @@ -159478,14 +145339,10 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {string|null} */ function getServerName(host) { - if (!host) { - return null; - } + if (!host) return null; assert$34(typeof host === "string"); const servername = getHostname(host); - if (net$3.isIP(servername)) { - return ""; - } + if (net$3.isIP(servername)) return ""; return servername; } /** @@ -159516,16 +145373,12 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {number|null} */ function bodyLength(body) { - if (body == null) { - return 0; - } else if (isStream(body)) { + if (body == null) return 0; + else if (isStream(body)) { const state = body._readableState; return state && state.objectMode === false && state.ended === true && Number.isFinite(state.length) ? state.length : null; - } else if (isBlobLike(body)) { - return body.size != null ? body.size : null; - } else if (isBuffer(body)) { - return body.byteLength; - } + } else if (isBlobLike(body)) return body.size != null ? body.size : null; + else if (isBuffer(body)) return body.byteLength; return null; } /** @@ -159541,22 +145394,14 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {void} */ function destroy(stream, err) { - if (stream == null || !isStream(stream) || isDestroyed(stream)) { - return; - } + if (stream == null || !isStream(stream) || isDestroyed(stream)) return; if (typeof stream.destroy === "function") { - if (Object.getPrototypeOf(stream).constructor === IncomingMessage) { - stream.socket = null; - } + if (Object.getPrototypeOf(stream).constructor === IncomingMessage) stream.socket = null; stream.destroy(err); - } else if (err) { - queueMicrotask(() => { - stream.emit("error", err); - }); - } - if (stream.destroyed !== true) { - stream[kDestroyed] = true; - } + } else if (err) queueMicrotask(() => { + stream.emit("error", err); + }); + if (stream.destroyed !== true) stream[kDestroyed] = true; } const KEEPALIVE_TIMEOUT_EXPR = /timeout=(\d+)/; /** @@ -159589,7 +145434,7 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {Record} */ function parseHeaders(headers, obj) { - if (obj === undefined) obj = {}; + if (obj === void 0) obj = {}; for (let i = 0; i < headers.length; i += 2) { const key = headerNameToString(headers[i]); let val = obj[key]; @@ -159601,11 +145446,8 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { val.push(headers[i + 1].toString("latin1")); } else { const headersValue = headers[i + 1]; - if (typeof headersValue === "string") { - obj[key] = headersValue; - } else { - obj[key] = Array.isArray(headersValue) ? headersValue.map((x) => x.toString("latin1")) : headersValue.toString("latin1"); - } + if (typeof headersValue === "string") obj[key] = headersValue; + else obj[key] = Array.isArray(headersValue) ? headersValue.map((x) => x.toString("latin1")) : headersValue.toString("latin1"); } } return obj; @@ -159637,9 +145479,7 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {Buffer[]} headers */ function encodeRawHeaders(headers) { - if (!Array.isArray(headers)) { - throw new TypeError("expected headers to be an array"); - } + if (!Array.isArray(headers)) throw new TypeError("expected headers to be an array"); return headers.map((x) => Buffer.from(x)); } /** @@ -159658,35 +145498,17 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {asserts handler is import('../api/api-request').RequestHandler} */ function assertRequestHandler(handler, method, upgrade) { - if (!handler || typeof handler !== "object") { - throw new InvalidArgumentError("handler must be an object"); - } - if (typeof handler.onRequestStart === "function") { - return; - } - if (typeof handler.onConnect !== "function") { - throw new InvalidArgumentError("invalid onConnect method"); - } - if (typeof handler.onError !== "function") { - throw new InvalidArgumentError("invalid onError method"); - } - if (typeof handler.onBodySent !== "function" && handler.onBodySent !== undefined) { - throw new InvalidArgumentError("invalid onBodySent method"); - } + if (!handler || typeof handler !== "object") throw new InvalidArgumentError("handler must be an object"); + if (typeof handler.onRequestStart === "function") return; + if (typeof handler.onConnect !== "function") throw new InvalidArgumentError("invalid onConnect method"); + if (typeof handler.onError !== "function") throw new InvalidArgumentError("invalid onError method"); + if (typeof handler.onBodySent !== "function" && handler.onBodySent !== void 0) throw new InvalidArgumentError("invalid onBodySent method"); if (upgrade || method === "CONNECT") { - if (typeof handler.onUpgrade !== "function") { - throw new InvalidArgumentError("invalid onUpgrade method"); - } + if (typeof handler.onUpgrade !== "function") throw new InvalidArgumentError("invalid onUpgrade method"); } else { - if (typeof handler.onHeaders !== "function") { - throw new InvalidArgumentError("invalid onHeaders method"); - } - if (typeof handler.onData !== "function") { - throw new InvalidArgumentError("invalid onData method"); - } - if (typeof handler.onComplete !== "function") { - throw new InvalidArgumentError("invalid onComplete method"); - } + if (typeof handler.onHeaders !== "function") throw new InvalidArgumentError("invalid onHeaders method"); + if (typeof handler.onData !== "function") throw new InvalidArgumentError("invalid onData method"); + if (typeof handler.onComplete !== "function") throw new InvalidArgumentError("invalid onComplete method"); } } /** @@ -159737,18 +145559,14 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { }, pull(controller) { return iterator.next().then(({ done, value }) => { - if (done) { - return queueMicrotask(() => { - controller.close(); - controller.byobRequest?.respond(0); - }); - } else { + if (done) return queueMicrotask(() => { + controller.close(); + controller.byobRequest?.respond(0); + }); + else { const buf = Buffer.isBuffer(value) ? value : Buffer.from(value); - if (buf.byteLength) { - return controller.enqueue(new Uint8Array(buf)); - } else { - return this.pull(controller); - } + if (buf.byteLength) return controller.enqueue(new Uint8Array(buf)); + else return this.pull(controller); } }); }, @@ -160049,11 +145867,7 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { function isValidHTTPToken(characters) { if (characters.length >= 12) return tokenRegExp.test(characters); if (characters.length === 0) return false; - for (let i = 0; i < characters.length; i++) { - if (validTokenChars[characters.charCodeAt(i)] !== 1) { - return false; - } - } + for (let i = 0; i < characters.length; i++) if (validTokenChars[characters.charCodeAt(i)] !== 1) return false; return true; } /** @@ -160104,8 +145918,7 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {T} */ function addListener(obj, name, listener) { - const listeners = obj[kListeners] ??= []; - listeners.push([name, listener]); + (obj[kListeners] ??= []).push([name, listener]); obj.on(name, listener); return obj; } @@ -160116,9 +145929,7 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function removeAllListeners(obj) { if (obj[kListeners] != null) { - for (const [name, listener] of obj[kListeners]) { - obj.removeListener(name, listener); - } + for (const [name, listener] of obj[kListeners]) obj.removeListener(name, listener); obj[kListeners] = null; } return obj; @@ -160145,9 +145956,7 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {() => void} */ const setupConnectTimeout = process.platform === "win32" ? (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop; - } + if (!opts.timeout) return noop; let s1 = null; let s2 = null; const fastTimer = timers.setFastTimeout(() => { @@ -160161,9 +145970,7 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { clearImmediate(s2); }; } : (socketWeakRef, opts) => { - if (!opts.timeout) { - return noop; - } + if (!opts.timeout) return noop; let s1 = null; const fastTimer = timers.setFastTimeout(() => { s1 = setImmediate(() => { @@ -160183,15 +145990,10 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {number} opts.port */ function onConnectTimeout(socket, opts) { - if (socket == null) { - return; - } + if (socket == null) return; let message = "Connect Timeout Error"; - if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) { - message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`; - } else { - message += ` (attempted address: ${opts.hostname}:${opts.port},`; - } + if (Array.isArray(socket.autoSelectFamilyAttemptedAddresses)) message += ` (attempted addresses: ${socket.autoSelectFamilyAttemptedAddresses.join(", ")},`; + else message += ` (attempted address: ${opts.hostname}:${opts.port},`; message += ` timeout: ${opts.timeout}ms)`; destroy(socket, new ConnectTimeoutError(message)); } @@ -160200,13 +146002,9 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {string} */ function getProtocolFromUrlString(urlString) { - if (urlString[0] === "h" && urlString[1] === "t" && urlString[2] === "t" && urlString[3] === "p") { - switch (urlString[4]) { - case ":": return "http:"; - case "s": if (urlString[5] === ":") { - return "https:"; - } - } + if (urlString[0] === "h" && urlString[1] === "t" && urlString[2] === "t" && urlString[3] === "p") switch (urlString[4]) { + case ":": return "http:"; + case "s": if (urlString[5] === ":") return "https:"; } return urlString.slice(0, urlString.indexOf(":") + 1); } @@ -160285,7 +146083,6 @@ var require_util$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => { getProtocolFromUrlString }; })); - //#endregion //#region ../node_modules/undici/lib/util/stats.js var require_stats = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -160313,7 +146110,6 @@ var require_stats = /* @__PURE__ */ __commonJSMin(((exports, module) => { PoolStats }; })); - //#endregion //#region ../node_modules/undici/lib/core/diagnostics.js var require_diagnostics = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -160343,9 +146139,7 @@ var require_diagnostics = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; let isTrackingClientEvents = false; function trackClientEvents(debugLog = undiciDebugLog) { - if (isTrackingClientEvents) { - return; - } + if (isTrackingClientEvents) return; if (channels.beforeConnect.hasSubscribers || channels.connected.hasSubscribers || channels.connectError.hasSubscribers || channels.sendHeaders.hasSubscribers) { isTrackingClientEvents = true; return; @@ -160370,9 +146164,7 @@ var require_diagnostics = /* @__PURE__ */ __commonJSMin(((exports, module) => { } let isTrackingRequestEvents = false; function trackRequestEvents(debugLog = undiciDebugLog) { - if (isTrackingRequestEvents) { - return; - } + if (isTrackingRequestEvents) return; if (channels.headers.hasSubscribers || channels.trailers.hasSubscribers || channels.error.hasSubscribers) { isTrackingRequestEvents = true; return; @@ -160393,9 +146185,7 @@ var require_diagnostics = /* @__PURE__ */ __commonJSMin(((exports, module) => { } let isTrackingWebSocketEvents = false; function trackWebSocketEvents(debugLog = websocketDebuglog) { - if (isTrackingWebSocketEvents) { - return; - } + if (isTrackingWebSocketEvents) return; if (channels.open.hasSubscribers || channels.close.hasSubscribers || channels.socketError.hasSubscribers || channels.ping.hasSubscribers || channels.pong.hasSubscribers) { isTrackingWebSocketEvents = true; return; @@ -160429,7 +146219,6 @@ var require_diagnostics = /* @__PURE__ */ __commonJSMin(((exports, module) => { } module.exports = { channels }; })); - //#endregion //#region ../node_modules/undici/lib/core/request.js var require_request$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -160442,46 +146231,24 @@ var require_request$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { const kHandler = Symbol("handler"); var Request = class { constructor(origin, { path, method, body, headers, query, idempotent, blocking, upgrade, headersTimeout, bodyTimeout, reset, expectContinue, servername, throwOnError, maxRedirections }, handler) { - if (typeof path !== "string") { - throw new InvalidArgumentError("path must be a string"); - } else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") { - throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); - } else if (invalidPathRegex.test(path)) { - throw new InvalidArgumentError("invalid request path"); - } - if (typeof method !== "string") { - throw new InvalidArgumentError("method must be a string"); - } else if (normalizedMethodRecords[method] === undefined && !isValidHTTPToken(method)) { - throw new InvalidArgumentError("invalid request method"); - } - if (upgrade && typeof upgrade !== "string") { - throw new InvalidArgumentError("upgrade must be a string"); - } - if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError("invalid headersTimeout"); - } - if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError("invalid bodyTimeout"); - } - if (reset != null && typeof reset !== "boolean") { - throw new InvalidArgumentError("invalid reset"); - } - if (expectContinue != null && typeof expectContinue !== "boolean") { - throw new InvalidArgumentError("invalid expectContinue"); - } - if (throwOnError != null) { - throw new InvalidArgumentError("invalid throwOnError"); - } - if (maxRedirections != null && maxRedirections !== 0) { - throw new InvalidArgumentError("maxRedirections is not supported, use the redirect interceptor"); - } + if (typeof path !== "string") throw new InvalidArgumentError("path must be a string"); + else if (path[0] !== "/" && !(path.startsWith("http://") || path.startsWith("https://")) && method !== "CONNECT") throw new InvalidArgumentError("path must be an absolute URL or start with a slash"); + else if (invalidPathRegex.test(path)) throw new InvalidArgumentError("invalid request path"); + if (typeof method !== "string") throw new InvalidArgumentError("method must be a string"); + else if (normalizedMethodRecords[method] === void 0 && !isValidHTTPToken(method)) throw new InvalidArgumentError("invalid request method"); + if (upgrade && typeof upgrade !== "string") throw new InvalidArgumentError("upgrade must be a string"); + if (headersTimeout != null && (!Number.isFinite(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError("invalid headersTimeout"); + if (bodyTimeout != null && (!Number.isFinite(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError("invalid bodyTimeout"); + if (reset != null && typeof reset !== "boolean") throw new InvalidArgumentError("invalid reset"); + if (expectContinue != null && typeof expectContinue !== "boolean") throw new InvalidArgumentError("invalid expectContinue"); + if (throwOnError != null) throw new InvalidArgumentError("invalid throwOnError"); + if (maxRedirections != null && maxRedirections !== 0) throw new InvalidArgumentError("maxRedirections is not supported, use the redirect interceptor"); this.headersTimeout = headersTimeout; this.bodyTimeout = bodyTimeout; this.method = method; this.abort = null; - if (body == null) { - this.body = null; - } else if (isStream(body)) { + if (body == null) this.body = null; + else if (isStream(body)) { this.body = body; const rState = this.body._readableState; if (!rState || !rState.autoDestroy) { @@ -160491,26 +146258,16 @@ var require_request$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { this.body.on("end", this.endHandler); } this.errorHandler = (err) => { - if (this.abort) { - this.abort(err); - } else { - this.error = err; - } + if (this.abort) this.abort(err); + else this.error = err; }; this.body.on("error", this.errorHandler); - } else if (isBuffer(body)) { - this.body = body.byteLength ? body : null; - } else if (ArrayBuffer.isView(body)) { - this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; - } else if (body instanceof ArrayBuffer) { - this.body = body.byteLength ? Buffer.from(body) : null; - } else if (typeof body === "string") { - this.body = body.length ? Buffer.from(body) : null; - } else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) { - this.body = body; - } else { - throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); - } + } else if (isBuffer(body)) this.body = body.byteLength ? body : null; + else if (ArrayBuffer.isView(body)) this.body = body.buffer.byteLength ? Buffer.from(body.buffer, body.byteOffset, body.byteLength) : null; + else if (body instanceof ArrayBuffer) this.body = body.byteLength ? Buffer.from(body) : null; + else if (typeof body === "string") this.body = body.length ? Buffer.from(body) : null; + else if (isFormDataLike(body) || isIterable(body) || isBlobLike(body)) this.body = body; + else throw new InvalidArgumentError("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable"); this.completed = false; this.aborted = false; this.upgrade = upgrade || null; @@ -160526,69 +146283,46 @@ var require_request$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { this.headers = []; this.expectContinue = expectContinue != null ? expectContinue : false; if (Array.isArray(headers)) { - if (headers.length % 2 !== 0) { - throw new InvalidArgumentError("headers array must be even"); - } - for (let i = 0; i < headers.length; i += 2) { - processHeader(this, headers[i], headers[i + 1]); - } - } else if (headers && typeof headers === "object") { - if (headers[Symbol.iterator]) { - for (const header of headers) { - if (!Array.isArray(header) || header.length !== 2) { - throw new InvalidArgumentError("headers must be in key-value pair format"); - } - processHeader(this, header[0], header[1]); - } - } else { - const keys = Object.keys(headers); - for (let i = 0; i < keys.length; ++i) { - processHeader(this, keys[i], headers[keys[i]]); - } - } - } else if (headers != null) { - throw new InvalidArgumentError("headers must be an object or an array"); + if (headers.length % 2 !== 0) throw new InvalidArgumentError("headers array must be even"); + for (let i = 0; i < headers.length; i += 2) processHeader(this, headers[i], headers[i + 1]); + } else if (headers && typeof headers === "object") if (headers[Symbol.iterator]) for (const header of headers) { + if (!Array.isArray(header) || header.length !== 2) throw new InvalidArgumentError("headers must be in key-value pair format"); + processHeader(this, header[0], header[1]); + } + else { + const keys = Object.keys(headers); + for (let i = 0; i < keys.length; ++i) processHeader(this, keys[i], headers[keys[i]]); } + else if (headers != null) throw new InvalidArgumentError("headers must be an object or an array"); assertRequestHandler(handler, method, upgrade); this.servername = servername || getServerName(this.host) || null; this[kHandler] = handler; - if (channels.create.hasSubscribers) { - channels.create.publish({ request: this }); - } + if (channels.create.hasSubscribers) channels.create.publish({ request: this }); } onBodySent(chunk) { - if (channels.bodyChunkSent.hasSubscribers) { - channels.bodyChunkSent.publish({ - request: this, - chunk - }); - } - if (this[kHandler].onBodySent) { - try { - return this[kHandler].onBodySent(chunk); - } catch (err) { - this.abort(err); - } + if (channels.bodyChunkSent.hasSubscribers) channels.bodyChunkSent.publish({ + request: this, + chunk + }); + if (this[kHandler].onBodySent) try { + return this[kHandler].onBodySent(chunk); + } catch (err) { + this.abort(err); } } onRequestSent() { - if (channels.bodySent.hasSubscribers) { - channels.bodySent.publish({ request: this }); - } - if (this[kHandler].onRequestSent) { - try { - return this[kHandler].onRequestSent(); - } catch (err) { - this.abort(err); - } + if (channels.bodySent.hasSubscribers) channels.bodySent.publish({ request: this }); + if (this[kHandler].onRequestSent) try { + return this[kHandler].onRequestSent(); + } catch (err) { + this.abort(err); } } onConnect(abort) { assert$33(!this.aborted); assert$33(!this.completed); - if (this.error) { - abort(this.error); - } else { + if (this.error) abort(this.error); + else { this.abort = abort; return this[kHandler].onConnect(abort); } @@ -160599,16 +146333,14 @@ var require_request$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { onHeaders(statusCode, headers, resume, statusText) { assert$33(!this.aborted); assert$33(!this.completed); - if (channels.headers.hasSubscribers) { - channels.headers.publish({ - request: this, - response: { - statusCode, - headers, - statusText - } - }); - } + if (channels.headers.hasSubscribers) channels.headers.publish({ + request: this, + response: { + statusCode, + headers, + statusText + } + }); try { return this[kHandler].onHeaders(statusCode, headers, resume, statusText); } catch (err) { @@ -160618,12 +146350,10 @@ var require_request$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { onData(chunk) { assert$33(!this.aborted); assert$33(!this.completed); - if (channels.bodyChunkReceived.hasSubscribers) { - channels.bodyChunkReceived.publish({ - request: this, - chunk - }); - } + if (channels.bodyChunkReceived.hasSubscribers) channels.bodyChunkReceived.publish({ + request: this, + chunk + }); try { return this[kHandler].onData(chunk); } catch (err) { @@ -160641,12 +146371,10 @@ var require_request$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { assert$33(!this.aborted); assert$33(!this.completed); this.completed = true; - if (channels.trailers.hasSubscribers) { - channels.trailers.publish({ - request: this, - trailers - }); - } + if (channels.trailers.hasSubscribers) channels.trailers.publish({ + request: this, + trailers + }); try { return this[kHandler].onComplete(trailers); } catch (err) { @@ -160655,15 +146383,11 @@ var require_request$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } onError(error) { this.onFinally(); - if (channels.error.hasSubscribers) { - channels.error.publish({ - request: this, - error - }); - } - if (this.aborted) { - return; - } + if (channels.error.hasSubscribers) channels.error.publish({ + request: this, + error + }); + if (this.aborted) return; this.aborted = true; return this[kHandler].onError(error); } @@ -160683,76 +146407,45 @@ var require_request$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } }; function processHeader(request, key, val) { - if (val && typeof val === "object" && !Array.isArray(val)) { - throw new InvalidArgumentError(`invalid ${key} header`); - } else if (val === undefined) { - return; - } + if (val && typeof val === "object" && !Array.isArray(val)) throw new InvalidArgumentError(`invalid ${key} header`); + else if (val === void 0) return; let headerName = headerNameLowerCasedRecord[key]; - if (headerName === undefined) { + if (headerName === void 0) { headerName = key.toLowerCase(); - if (headerNameLowerCasedRecord[headerName] === undefined && !isValidHTTPToken(headerName)) { - throw new InvalidArgumentError("invalid header key"); - } + if (headerNameLowerCasedRecord[headerName] === void 0 && !isValidHTTPToken(headerName)) throw new InvalidArgumentError("invalid header key"); } if (Array.isArray(val)) { const arr = []; - for (let i = 0; i < val.length; i++) { - if (typeof val[i] === "string") { - if (!isValidHeaderValue(val[i])) { - throw new InvalidArgumentError(`invalid ${key} header`); - } - arr.push(val[i]); - } else if (val[i] === null) { - arr.push(""); - } else if (typeof val[i] === "object") { - throw new InvalidArgumentError(`invalid ${key} header`); - } else { - arr.push(`${val[i]}`); - } - } + for (let i = 0; i < val.length; i++) if (typeof val[i] === "string") { + if (!isValidHeaderValue(val[i])) throw new InvalidArgumentError(`invalid ${key} header`); + arr.push(val[i]); + } else if (val[i] === null) arr.push(""); + else if (typeof val[i] === "object") throw new InvalidArgumentError(`invalid ${key} header`); + else arr.push(`${val[i]}`); val = arr; } else if (typeof val === "string") { - if (!isValidHeaderValue(val)) { - throw new InvalidArgumentError(`invalid ${key} header`); - } - } else if (val === null) { - val = ""; - } else { - val = `${val}`; - } + if (!isValidHeaderValue(val)) throw new InvalidArgumentError(`invalid ${key} header`); + } else if (val === null) val = ""; + else val = `${val}`; if (request.host === null && headerName === "host") { - if (typeof val !== "string") { - throw new InvalidArgumentError("invalid host header"); - } + if (typeof val !== "string") throw new InvalidArgumentError("invalid host header"); request.host = val; } else if (request.contentLength === null && headerName === "content-length") { request.contentLength = parseInt(val, 10); - if (!Number.isFinite(request.contentLength)) { - throw new InvalidArgumentError("invalid content-length header"); - } + if (!Number.isFinite(request.contentLength)) throw new InvalidArgumentError("invalid content-length header"); } else if (request.contentType === null && headerName === "content-type") { request.contentType = val; request.headers.push(key, val); - } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") { - throw new InvalidArgumentError(`invalid ${headerName} header`); - } else if (headerName === "connection") { + } else if (headerName === "transfer-encoding" || headerName === "keep-alive" || headerName === "upgrade") throw new InvalidArgumentError(`invalid ${headerName} header`); + else if (headerName === "connection") { const value = typeof val === "string" ? val.toLowerCase() : null; - if (value !== "close" && value !== "keep-alive") { - throw new InvalidArgumentError("invalid connection header"); - } - if (value === "close") { - request.reset = true; - } - } else if (headerName === "expect") { - throw new NotSupportedError("expect header not supported"); - } else { - request.headers.push(key, val); - } + if (value !== "close" && value !== "keep-alive") throw new InvalidArgumentError("invalid connection header"); + if (value === "close") request.reset = true; + } else if (headerName === "expect") throw new NotSupportedError("expect header not supported"); + else request.headers.push(key, val); } module.exports = Request; })); - //#endregion //#region ../node_modules/undici/lib/handler/wrap-handler.js var require_wrap_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -160781,9 +146474,7 @@ var require_wrap_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { return this.#handler.onComplete?.(trailers); } onError(err) { - if (!this.#handler.onError) { - throw err; - } + if (!this.#handler.onError) throw err; return this.#handler.onError?.(err); } onRequestStart(controller, context) { @@ -160791,41 +146482,28 @@ var require_wrap_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { } onRequestUpgrade(controller, statusCode, headers, socket) { const rawHeaders = []; - for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); - } + for (const [key, val] of Object.entries(headers)) rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); this.#handler.onUpgrade?.(statusCode, rawHeaders, socket); } onResponseStart(controller, statusCode, headers, statusMessage) { const rawHeaders = []; - for (const [key, val] of Object.entries(headers)) { - rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); - } - if (this.#handler.onHeaders?.(statusCode, rawHeaders, () => controller.resume(), statusMessage) === false) { - controller.pause(); - } + for (const [key, val] of Object.entries(headers)) rawHeaders.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); + if (this.#handler.onHeaders?.(statusCode, rawHeaders, () => controller.resume(), statusMessage) === false) controller.pause(); } onResponseData(controller, data) { - if (this.#handler.onData?.(data) === false) { - controller.pause(); - } + if (this.#handler.onData?.(data) === false) controller.pause(); } onResponseEnd(controller, trailers) { const rawTrailers = []; - for (const [key, val] of Object.entries(trailers)) { - rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); - } + for (const [key, val] of Object.entries(trailers)) rawTrailers.push(Buffer.from(key), Array.isArray(val) ? val.map((v) => Buffer.from(v)) : Buffer.from(val)); this.#handler.onComplete?.(rawTrailers); } onResponseError(controller, err) { - if (!this.#handler.onError) { - throw new InvalidArgumentError("invalid onError method"); - } + if (!this.#handler.onError) throw new InvalidArgumentError("invalid onError method"); this.#handler.onError?.(err); } }; })); - //#endregion //#region ../node_modules/undici/lib/dispatcher/dispatcher.js var require_dispatcher = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -160846,24 +146524,17 @@ var require_dispatcher = /* @__PURE__ */ __commonJSMin(((exports, module) => { const interceptors = Array.isArray(args[0]) ? args[0] : args; let dispatch = this.dispatch.bind(this); for (const interceptor of interceptors) { - if (interceptor == null) { - continue; - } - if (typeof interceptor !== "function") { - throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`); - } + if (interceptor == null) continue; + if (typeof interceptor !== "function") throw new TypeError(`invalid interceptor, expected function received ${typeof interceptor}`); dispatch = interceptor(dispatch); dispatch = wrapInterceptor(dispatch); - if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) { - throw new TypeError("invalid interceptor"); - } + if (dispatch == null || typeof dispatch !== "function" || dispatch.length !== 2) throw new TypeError("invalid interceptor"); } return new Proxy(this, { get: (target, key) => key === "dispatch" ? dispatch : target[key] }); } }; module.exports = Dispatcher; })); - //#endregion //#region ../node_modules/undici/lib/handler/unwrap-handler.js var require_unwrap_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -160934,14 +146605,11 @@ var require_unwrap_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => this.#handler.onResponseEnd?.(this.#controller, parseHeaders(rawTrailers)); } onError(err) { - if (!this.#handler.onResponseError) { - throw new InvalidArgumentError("invalid onError method"); - } + if (!this.#handler.onResponseError) throw new InvalidArgumentError("invalid onError method"); this.#handler.onResponseError?.(this.#controller, err); } }; })); - //#endregion //#region ../node_modules/undici/lib/dispatcher/dispatcher-base.js var require_dispatcher_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -160969,27 +146637,20 @@ var require_dispatcher_base = /* @__PURE__ */ __commonJSMin(((exports, module) = return this[kClosed]; } close(callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.close((err, data) => { - return err ? reject(err) : resolve(data); - }); + if (callback === void 0) return new Promise((resolve, reject) => { + this.close((err, data) => { + return err ? reject(err) : resolve(data); }); - } - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } + }); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); if (this[kDestroyed]) { const err = new ClientDestroyedError(); queueMicrotask(() => callback(err, null)); return; } if (this[kClosed]) { - if (this[kOnClosed]) { - this[kOnClosed].push(callback); - } else { - queueMicrotask(() => callback(null, null)); - } + if (this[kOnClosed]) this[kOnClosed].push(callback); + else queueMicrotask(() => callback(null, null)); return; } this[kClosed] = true; @@ -160998,9 +146659,7 @@ var require_dispatcher_base = /* @__PURE__ */ __commonJSMin(((exports, module) = const onClosed = () => { const callbacks = this[kOnClosed]; this[kOnClosed] = null; - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null); - } + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); }; this[kClose]().then(() => this.destroy()).then(() => queueMicrotask(onClosed)); } @@ -161009,59 +146668,38 @@ var require_dispatcher_base = /* @__PURE__ */ __commonJSMin(((exports, module) = callback = err; err = null; } - if (callback === undefined) { - return new Promise((resolve, reject) => { - this.destroy(err, (err, data) => { - return err ? reject(err) : resolve(data); - }); + if (callback === void 0) return new Promise((resolve, reject) => { + this.destroy(err, (err, data) => { + return err ? reject(err) : resolve(data); }); - } - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } + }); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); if (this[kDestroyed]) { - if (this[kOnDestroyed]) { - this[kOnDestroyed].push(callback); - } else { - queueMicrotask(() => callback(null, null)); - } + if (this[kOnDestroyed]) this[kOnDestroyed].push(callback); + else queueMicrotask(() => callback(null, null)); return; } - if (!err) { - err = new ClientDestroyedError(); - } + if (!err) err = new ClientDestroyedError(); this[kDestroyed] = true; this[kOnDestroyed] ??= []; this[kOnDestroyed].push(callback); const onDestroyed = () => { const callbacks = this[kOnDestroyed]; this[kOnDestroyed] = null; - for (let i = 0; i < callbacks.length; i++) { - callbacks[i](null, null); - } + for (let i = 0; i < callbacks.length; i++) callbacks[i](null, null); }; this[kDestroy](err).then(() => queueMicrotask(onDestroyed)); } dispatch(opts, handler) { - if (!handler || typeof handler !== "object") { - throw new InvalidArgumentError("handler must be an object"); - } + if (!handler || typeof handler !== "object") throw new InvalidArgumentError("handler must be an object"); handler = UnwrapHandler.unwrap(handler); try { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("opts must be an object."); - } - if (this[kDestroyed] || this[kOnDestroyed]) { - throw new ClientDestroyedError(); - } - if (this[kClosed]) { - throw new ClientClosedError(); - } + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("opts must be an object."); + if (this[kDestroyed] || this[kOnDestroyed]) throw new ClientDestroyedError(); + if (this[kClosed]) throw new ClientClosedError(); return this[kDispatch](opts, handler); } catch (err) { - if (typeof handler.onError !== "function") { - throw err; - } + if (typeof handler.onError !== "function") throw err; handler.onError(err); return false; } @@ -161069,7 +146707,6 @@ var require_dispatcher_base = /* @__PURE__ */ __commonJSMin(((exports, module) = }; module.exports = DispatcherBase; })); - //#endregion //#region ../node_modules/undici/lib/core/connect.js var require_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -161081,15 +146718,11 @@ var require_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { const SessionCache = class WeakSessionCache { constructor(maxCachedSessions) { this._maxCachedSessions = maxCachedSessions; - this._sessionCache = new Map(); + this._sessionCache = /* @__PURE__ */ new Map(); this._sessionRegistry = new FinalizationRegistry((key) => { - if (this._sessionCache.size < this._maxCachedSessions) { - return; - } + if (this._sessionCache.size < this._maxCachedSessions) return; const ref = this._sessionCache.get(key); - if (ref !== undefined && ref.deref() === undefined) { - this._sessionCache.delete(key); - } + if (ref !== void 0 && ref.deref() === void 0) this._sessionCache.delete(key); }); } get(sessionKey) { @@ -161097,17 +146730,13 @@ var require_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { return ref ? ref.deref() : null; } set(sessionKey, session) { - if (this._maxCachedSessions === 0) { - return; - } + if (this._maxCachedSessions === 0) return; this._sessionCache.set(sessionKey, new WeakRef(session)); this._sessionRegistry.register(session, sessionKey); } }; function buildConnector({ allowH2, useH2c, maxCachedSessions, socketPath, timeout, session: customSession, ...opts }) { - if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) { - throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); - } + if (maxCachedSessions != null && (!Number.isInteger(maxCachedSessions) || maxCachedSessions < 0)) throw new InvalidArgumentError("maxCachedSessions must be a positive integer or zero"); const options = { path: socketPath, ...opts @@ -161118,9 +146747,7 @@ var require_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { return function connect({ hostname, host, protocol, port, servername, localAddress, httpSocket }, callback) { let socket; if (protocol === "https:") { - if (!tls) { - tls = __require("node:tls"); - } + if (!tls) tls = __require("node:tls"); servername = servername || options.servername || util.getServerName(host) || null; const sessionKey = servername || hostname; assert$32(sessionKey); @@ -161150,12 +146777,10 @@ var require_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { port, host: hostname }); - if (useH2c === true) { - socket.alpnProtocol = "h2"; - } + if (useH2c === true) socket.alpnProtocol = "h2"; } if (options.keepAlive == null || options.keepAlive) { - const keepAliveInitialDelay = options.keepAliveInitialDelay === undefined ? 6e4 : options.keepAliveInitialDelay; + const keepAliveInitialDelay = options.keepAliveInitialDelay === void 0 ? 6e4 : options.keepAliveInitialDelay; socket.setKeepAlive(true, keepAliveInitialDelay); } const clearConnectTimeout = util.setupConnectTimeout(new WeakRef(socket), { @@ -161183,7 +146808,6 @@ var require_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { } module.exports = buildConnector; })); - //#endregion //#region ../node_modules/undici/lib/llhttp/utils.js var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -161197,7 +146821,6 @@ var require_utils$1 = /* @__PURE__ */ __commonJSMin(((exports) => { })); } })); - //#endregion //#region ../node_modules/undici/lib/llhttp/constants.js var require_constants$3 = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -161249,27 +146872,27 @@ var require_constants$3 = /* @__PURE__ */ __commonJSMin(((exports) => { RESPONSE: 2 }; exports.FLAGS = { - CONNECTION_KEEP_ALIVE: 1 << 0, - CONNECTION_CLOSE: 1 << 1, - CONNECTION_UPGRADE: 1 << 2, - CHUNKED: 1 << 3, - UPGRADE: 1 << 4, - CONTENT_LENGTH: 1 << 5, - SKIPBODY: 1 << 6, - TRAILING: 1 << 7, - TRANSFER_ENCODING: 1 << 9 + CONNECTION_KEEP_ALIVE: 1, + CONNECTION_CLOSE: 2, + CONNECTION_UPGRADE: 4, + CHUNKED: 8, + UPGRADE: 16, + CONTENT_LENGTH: 32, + SKIPBODY: 64, + TRAILING: 128, + TRANSFER_ENCODING: 512 }; exports.LENIENT_FLAGS = { - HEADERS: 1 << 0, - CHUNKED_LENGTH: 1 << 1, - KEEP_ALIVE: 1 << 2, - TRANSFER_ENCODING: 1 << 3, - VERSION: 1 << 4, - DATA_AFTER_CLOSE: 1 << 5, - OPTIONAL_LF_AFTER_CR: 1 << 6, - OPTIONAL_CRLF_AFTER_CHUNK: 1 << 7, - OPTIONAL_CR_BEFORE_LF: 1 << 8, - SPACES_AFTER_CHUNK_SIZE: 1 << 9 + HEADERS: 1, + CHUNKED_LENGTH: 2, + KEEP_ALIVE: 4, + TRANSFER_ENCODING: 8, + VERSION: 16, + DATA_AFTER_CLOSE: 32, + OPTIONAL_LF_AFTER_CR: 64, + OPTIONAL_CRLF_AFTER_CHUNK: 128, + OPTIONAL_CR_BEFORE_LF: 256, + SPACES_AFTER_CHUNK_SIZE: 512 }; exports.METHODS = { "DELETE": 0, @@ -161734,25 +147357,13 @@ var require_constants$3 = /* @__PURE__ */ __commonJSMin(((exports) => { "~" ].concat(exports.ALPHANUM); exports.HEADER_CHARS = [" "]; - for (let i = 32; i <= 255; i++) { - if (i !== 127) { - exports.HEADER_CHARS.push(i); - } - } + for (let i = 32; i <= 255; i++) if (i !== 127) exports.HEADER_CHARS.push(i); exports.CONNECTION_TOKEN_CHARS = exports.HEADER_CHARS.filter((c) => c !== 44); exports.QUOTED_STRING = [" ", " "]; - for (let i = 33; i <= 255; i++) { - if (i !== 34 && i !== 92) { - exports.QUOTED_STRING.push(i); - } - } + for (let i = 33; i <= 255; i++) if (i !== 34 && i !== 92) exports.QUOTED_STRING.push(i); exports.HTAB_SP_VCHAR_OBS_TEXT = [" ", " "]; - for (let i = 33; i <= 126; i++) { - exports.HTAB_SP_VCHAR_OBS_TEXT.push(i); - } - for (let i = 128; i <= 255; i++) { - exports.HTAB_SP_VCHAR_OBS_TEXT.push(i); - } + for (let i = 33; i <= 126; i++) exports.HTAB_SP_VCHAR_OBS_TEXT.push(i); + for (let i = 128; i <= 255; i++) exports.HTAB_SP_VCHAR_OBS_TEXT.push(i); exports.MAJOR = exports.NUM_MAP; exports.MINOR = exports.MAJOR; exports.SPECIAL_HEADERS = { @@ -161796,7 +147407,6 @@ var require_constants$3 = /* @__PURE__ */ __commonJSMin(((exports) => { STATUSES_HTTP: exports.STATUSES_HTTP }; })); - //#endregion //#region ../node_modules/undici/lib/llhttp/llhttp-wasm.js var require_llhttp_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -161807,7 +147417,6 @@ var require_llhttp_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => { return wasmBuffer ? wasmBuffer : wasmBuffer = Buffer$3.from(wasmBase64, "base64"); } }); })); - //#endregion //#region ../node_modules/undici/lib/llhttp/llhttp_simd-wasm.js var require_llhttp_simd_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -161818,7 +147427,6 @@ var require_llhttp_simd_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) return wasmBuffer ? wasmBuffer : wasmBuffer = Buffer$2.from(wasmBase64, "base64"); } }); })); - //#endregion //#region ../node_modules/undici/lib/web/fetch/constants.js var require_constants$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -162016,7 +147624,6 @@ var require_constants$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { "xslt", "" ]; - const subresourceSet = new Set(subresource); module.exports = { subresource, forbiddenMethods, @@ -162032,7 +147639,7 @@ var require_constants$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { safeMethods, badPorts, requestDuplex, - subresourceSet, + subresourceSet: new Set(subresource), badPortsSet, redirectStatusSet, corsSafeListedMethodsSet, @@ -162041,7 +147648,6 @@ var require_constants$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { referrerPolicyTokens: referrerPolicyTokensSet }; })); - //#endregion //#region ../node_modules/undici/lib/web/fetch/global.js var require_global$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -162050,9 +147656,9 @@ var require_global$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { return globalThis[globalOrigin]; } function setGlobalOrigin(newOrigin) { - if (newOrigin === undefined) { + if (newOrigin === void 0) { Object.defineProperty(globalThis, globalOrigin, { - value: undefined, + value: void 0, writable: true, enumerable: false, configurable: false @@ -162060,9 +147666,7 @@ var require_global$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { return; } const parsedURL = new URL(newOrigin); - if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") { - throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); - } + if (parsedURL.protocol !== "http:" && parsedURL.protocol !== "https:") throw new TypeError(`Only http & https urls are allowed, received ${parsedURL.protocol}`); Object.defineProperty(globalThis, globalOrigin, { value: parsedURL, writable: true, @@ -162075,7 +147679,6 @@ var require_global$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { setGlobalOrigin }; })); - //#endregion //#region ../node_modules/undici/lib/encoding/index.js var require_encoding = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -162085,18 +147688,12 @@ var require_encoding = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {Uint8Array} buffer */ function utf8DecodeBytes(buffer) { - if (buffer.length === 0) { - return ""; - } - if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) { - buffer = buffer.subarray(3); - } - const output = textDecoder.decode(buffer); - return output; + if (buffer.length === 0) return ""; + if (buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191) buffer = buffer.subarray(3); + return textDecoder.decode(buffer); } module.exports = { utf8DecodeBytes }; })); - //#endregion //#region ../node_modules/undici/lib/web/infra/index.js var require_infra = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -162150,17 +147747,11 @@ var require_infra = /* @__PURE__ */ __commonJSMin(((exports, module) => { if (dataLength % 4 === 0) { if (data.charCodeAt(dataLength - 1) === 61) { --dataLength; - if (data.charCodeAt(dataLength - 1) === 61) { - --dataLength; - } + if (data.charCodeAt(dataLength - 1) === 61) --dataLength; } } - if (dataLength % 4 === 1) { - return "failure"; - } - if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) { - return "failure"; - } + if (dataLength % 4 === 1) return "failure"; + if (/[^+/0-9A-Za-z]/.test(data.length === dataLength ? data : data.substring(0, dataLength))) return "failure"; const buffer = Buffer.from(data, "base64"); return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); } @@ -162181,16 +147772,12 @@ var require_infra = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function isomorphicDecode(input) { const length = input.length; - if ((2 << 15) - 1 > length) { - return String.fromCharCode.apply(null, input); - } + if (65535 > length) return String.fromCharCode.apply(null, input); let result = ""; let i = 0; - let addition = (2 << 15) - 1; + let addition = 65535; while (i < length) { - if (i + addition > length) { - addition = length - i; - } + if (i + addition > length) addition = length - i; result += String.fromCharCode.apply(null, input.subarray(i, i += addition)); } return result; @@ -162234,19 +147821,13 @@ var require_infra = /* @__PURE__ */ __commonJSMin(((exports, module) => { function removeChars(str, leading, trailing, predicate) { let lead = 0; let trail = str.length - 1; - if (leading) { - while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; - } - if (trailing) { - while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; - } + if (leading) while (lead < str.length && predicate(str.charCodeAt(lead))) lead++; + if (trailing) while (trail > 0 && predicate(str.charCodeAt(trail))) trail--; return lead === 0 && trail === str.length - 1 ? str : str.slice(lead, trail + 1); } function serializeJavascriptValueToJSONString(value) { const result = JSON.stringify(value); - if (result === undefined) { - throw new TypeError("Value is not JSON serializable"); - } + if (result === void 0) throw new TypeError("Value is not JSON serializable"); assert$31(typeof result === "string"); return result; } @@ -162263,7 +147844,6 @@ var require_infra = /* @__PURE__ */ __commonJSMin(((exports, module) => { serializeJavascriptValueToJSONString }; })); - //#endregion //#region ../node_modules/undici/lib/web/fetch/data-url.js var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -162288,29 +147868,19 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { let mimeType = collectASequenceOfCodePointsFast(",", input, position); const mimeTypeLength = mimeType.length; mimeType = removeASCIIWhitespace(mimeType, true, true); - if (position.position >= input.length) { - return "failure"; - } + if (position.position >= input.length) return "failure"; position.position++; - const encodedBody = input.slice(mimeTypeLength + 1); - let body = stringPercentDecode(encodedBody); + let body = stringPercentDecode(input.slice(mimeTypeLength + 1)); if (/;(?:\u0020*)base64$/iu.test(mimeType)) { - const stringBody = isomorphicDecode(body); - body = forgivingBase64(stringBody); - if (body === "failure") { - return "failure"; - } + body = forgivingBase64(isomorphicDecode(body)); + if (body === "failure") return "failure"; mimeType = mimeType.slice(0, -6); mimeType = mimeType.replace(/(\u0020+)$/u, ""); mimeType = mimeType.slice(0, -1); } - if (mimeType.startsWith(";")) { - mimeType = "text/plain" + mimeType; - } + if (mimeType.startsWith(";")) mimeType = "text/plain" + mimeType; let mimeTypeRecord = parseMIMEType(mimeType); - if (mimeTypeRecord === "failure") { - mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); - } + if (mimeTypeRecord === "failure") mimeTypeRecord = parseMIMEType("text/plain;charset=US-ASCII"); return { mimeType: mimeTypeRecord, body @@ -162321,21 +147891,16 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {boolean} excludeFragment */ function URLSerializer(url, excludeFragment = false) { - if (!excludeFragment) { - return url.href; - } + if (!excludeFragment) return url.href; const href = url.href; const hashLength = url.hash.length; const serialized = hashLength === 0 ? href : href.substring(0, href.length - hashLength); - if (!hashLength && href.endsWith("#")) { - return serialized.slice(0, -1); - } + if (!hashLength && href.endsWith("#")) return serialized.slice(0, -1); return serialized; } /** @param {string} input */ function stringPercentDecode(input) { - const bytes = encoder.encode(input); - return percentDecode(bytes); + return percentDecode(encoder.encode(input)); } /** * @param {number} byte @@ -162358,11 +147923,9 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { let i = 0; while (i < length) { const byte = input[i]; - if (byte !== 37) { - output[j++] = byte; - } else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) { - output[j++] = 37; - } else { + if (byte !== 37) output[j++] = byte; + else if (byte === 37 && !(isHexCharByte(input[i + 1]) && isHexCharByte(input[i + 2]))) output[j++] = 37; + else { output[j++] = hexByteToNumber(input[i + 1]) << 4 | hexByteToNumber(input[i + 2]); i += 2; } @@ -162375,24 +147938,18 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { input = removeHTTPWhitespace(input, true, true); const position = { position: 0 }; const type = collectASequenceOfCodePointsFast("/", input, position); - if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) { - return "failure"; - } - if (position.position >= input.length) { - return "failure"; - } + if (type.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(type)) return "failure"; + if (position.position >= input.length) return "failure"; position.position++; let subtype = collectASequenceOfCodePointsFast(";", input, position); subtype = removeHTTPWhitespace(subtype, false, true); - if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) { - return "failure"; - } + if (subtype.length === 0 || !HTTP_TOKEN_CODEPOINTS.test(subtype)) return "failure"; const typeLowercase = type.toLowerCase(); const subtypeLowercase = subtype.toLowerCase(); const mimeType = { type: typeLowercase, subtype: subtypeLowercase, - parameters: new Map(), + parameters: /* @__PURE__ */ new Map(), essence: `${typeLowercase}/${subtypeLowercase}` }; while (position.position < input.length) { @@ -162401,14 +147958,10 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { let parameterName = collectASequenceOfCodePoints((char) => char !== ";" && char !== "=", input, position); parameterName = parameterName.toLowerCase(); if (position.position < input.length) { - if (input[position.position] === ";") { - continue; - } + if (input[position.position] === ";") continue; position.position++; } - if (position.position >= input.length) { - break; - } + if (position.position >= input.length) break; let parameterValue = null; if (input[position.position] === "\"") { parameterValue = collectAnHTTPQuotedString(input, position, true); @@ -162416,13 +147969,9 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { } else { parameterValue = collectASequenceOfCodePointsFast(";", input, position); parameterValue = removeHTTPWhitespace(parameterValue, false, true); - if (parameterValue.length === 0) { - continue; - } - } - if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) { - mimeType.parameters.set(parameterName, parameterValue); + if (parameterValue.length === 0) continue; } + if (parameterName.length !== 0 && HTTP_TOKEN_CODEPOINTS.test(parameterName) && (parameterValue.length === 0 || HTTP_QUOTED_STRING_TOKENS.test(parameterValue)) && !mimeType.parameters.has(parameterName)) mimeType.parameters.set(parameterName, parameterValue); } return mimeType; } @@ -162438,9 +147987,7 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { position.position++; while (true) { value += collectASequenceOfCodePoints((char) => char !== "\"" && char !== "\\", input, position); - if (position.position >= input.length) { - break; - } + if (position.position >= input.length) break; const quoteOrBackslash = input[position.position]; position.position++; if (quoteOrBackslash === "\\") { @@ -162455,9 +148002,7 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { break; } } - if (extractValue) { - return value; - } + if (extractValue) return value; return input.slice(positionStart, position.position); } /** @@ -162524,12 +148069,8 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { case "text/xml": case "application/xml": return "application/xml"; } - if (mimeType.subtype.endsWith("+json")) { - return "application/json"; - } - if (mimeType.subtype.endsWith("+xml")) { - return "application/xml"; - } + if (mimeType.subtype.endsWith("+json")) return "application/json"; + if (mimeType.subtype.endsWith("+xml")) return "application/xml"; return ""; } module.exports = { @@ -162544,7 +148085,6 @@ var require_data_url = /* @__PURE__ */ __commonJSMin(((exports, module) => { HTTP_TOKEN_CODEPOINTS }; })); - //#endregion //#region ../node_modules/undici/lib/util/runtime-features.js var require_runtime_features = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -162566,9 +148106,7 @@ var require_runtime_features = /* @__PURE__ */ __commonJSMin(((exports, module) lazyLoaders[moduleName](); return true; } catch (err) { - if (err.code !== "ERR_UNKNOWN_BUILTIN_MODULE" && err.code !== "ERR_NO_CRYPTO") { - throw err; - } + if (err.code !== "ERR_UNKNOWN_BUILTIN_MODULE" && err.code !== "ERR_NO_CRYPTO") throw err; return false; } } @@ -162578,8 +148116,7 @@ var require_runtime_features = /* @__PURE__ */ __commonJSMin(((exports, module) * @returns {boolean} */ function detectRuntimeFeatureByExportedProperty(moduleName, property) { - const module$7 = lazyLoaders[moduleName](); - return typeof module$7[property] !== "undefined"; + return typeof lazyLoaders[moduleName]()[property] !== "undefined"; } const runtimeFeaturesByExportedProperty = ["markAsUncloneable", "zstd"]; /** @type {Record} */ @@ -162600,9 +148137,8 @@ var require_runtime_features = /* @__PURE__ */ __commonJSMin(((exports, module) if (runtimeFeaturesAsNodeModule.includes( /** @type {RuntimeFeatureByNodeModule} */ feature - )) { - return detectRuntimeFeatureByNodeModule(`node:${feature}`); - } else if (runtimeFeaturesByExportedProperty.includes( + )) return detectRuntimeFeatureByNodeModule(`node:${feature}`); + else if (runtimeFeaturesByExportedProperty.includes( /** @type {RuntimeFeatureByExportedProperty} */ feature )) { @@ -162617,7 +148153,7 @@ var require_runtime_features = /* @__PURE__ */ __commonJSMin(((exports, module) */ var RuntimeFeatures = class { /** @type {Map} */ - #map = new Map(); + #map = /* @__PURE__ */ new Map(); /** * Clears all cached feature detections. */ @@ -162636,9 +148172,7 @@ var require_runtime_features = /* @__PURE__ */ __commonJSMin(((exports, module) * @param {boolean} value */ set(feature, value) { - if (features.includes(feature) === false) { - throw new TypeError(`unknown feature: ${feature}`); - } + if (features.includes(feature) === false) throw new TypeError(`unknown feature: ${feature}`); this.#map.set(feature, value); } /** @@ -162655,7 +148189,6 @@ var require_runtime_features = /* @__PURE__ */ __commonJSMin(((exports, module) module.exports.runtimeFeatures = instance; module.exports.default = instance; })); - //#endregion //#region ../node_modules/undici/lib/web/webidl/index.js var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -162687,7 +148220,7 @@ var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {TypeError} */ webidl.errors.exception = function(message) { - return new TypeError(`${message.header}: ${message.message}`); + return /* @__PURE__ */ new TypeError(`${message.header}: ${message.message}`); }; /** * @description Instantiate an error when conversion from one type to another has failed. @@ -162700,7 +148233,7 @@ var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ webidl.errors.conversionFailed = function(opts) { const plural = opts.types.length === 1 ? "" : " one of"; - const message = `${opts.argument} could not be converted to` + `${plural}: ${opts.types.join(", ")}.`; + const message = `${opts.argument} could not be converted to${plural}: ${opts.types.join(", ")}.`; return webidl.errors.exception({ header: opts.prefix, message @@ -162723,7 +148256,7 @@ var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; webidl.brandCheck = function(V, I) { if (!FunctionPrototypeSymbolHasInstance(I, V)) { - const err = new TypeError("Illegal invocation"); + const err = /* @__PURE__ */ new TypeError("Illegal invocation"); err.code = "ERR_INVALID_THIS"; throw err; } @@ -162732,19 +148265,17 @@ var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { const prototypes = List.map((c) => webidl.util.MakeTypeAssertion(c)); return (V) => { if (prototypes.every((typeCheck) => !typeCheck(V))) { - const err = new TypeError("Illegal invocation"); + const err = /* @__PURE__ */ new TypeError("Illegal invocation"); err.code = "ERR_INVALID_THIS"; throw err; } }; }; webidl.argumentLengthCheck = function({ length }, min, ctx) { - if (length < min) { - throw webidl.errors.exception({ - message: `${min} argument${min !== 1 ? "s" : ""} required, ` + `but${length ? " only" : ""} ${length} found.`, - header: ctx - }); - } + if (length < min) throw webidl.errors.exception({ + message: `${min} argument${min !== 1 ? "s" : ""} required, but${length ? " only" : ""} ${length} found.`, + header: ctx + }); }; webidl.illegalConstructor = function() { throw webidl.errors.exception({ @@ -162764,12 +148295,9 @@ var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { case "number": return NUMBER; case "bigint": return BIGINT; case "function": - case "object": { - if (V === null) { - return NULL; - } + case "object": + if (V === null) return NULL; return OBJECT; - } } }; webidl.util.Types = { @@ -162800,11 +148328,8 @@ var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { let lowerBound; if (bitLength === 64) { upperBound = Math.pow(2, 53) - 1; - if (signedness === "unsigned") { - lowerBound = 0; - } else { - lowerBound = Math.pow(-2, 53) + 1; - } + if (signedness === "unsigned") lowerBound = 0; + else lowerBound = Math.pow(-2, 53) + 1; } else if (signedness === "unsigned") { lowerBound = 0; upperBound = Math.pow(2, bitLength) - 1; @@ -162813,54 +148338,38 @@ var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { upperBound = Math.pow(2, bitLength - 1) - 1; } let x = Number(V); - if (x === 0) { - x = 0; - } + if (x === 0) x = 0; if (webidl.util.HasFlag(flags, webidl.attributes.EnforceRange)) { - if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { - throw webidl.errors.exception({ - header: "Integer conversion", - message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` - }); - } + if (Number.isNaN(x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) throw webidl.errors.exception({ + header: "Integer conversion", + message: `Could not convert ${webidl.util.Stringify(V)} to an integer.` + }); x = webidl.util.IntegerPart(x); - if (x < lowerBound || x > upperBound) { - throw webidl.errors.exception({ - header: "Integer conversion", - message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` - }); - } + if (x < lowerBound || x > upperBound) throw webidl.errors.exception({ + header: "Integer conversion", + message: `Value must be between ${lowerBound}-${upperBound}, got ${x}.` + }); return x; } if (!Number.isNaN(x) && webidl.util.HasFlag(flags, webidl.attributes.Clamp)) { x = Math.min(Math.max(x, lowerBound), upperBound); - if (Math.floor(x) % 2 === 0) { - x = Math.floor(x); - } else { - x = Math.ceil(x); - } + if (Math.floor(x) % 2 === 0) x = Math.floor(x); + else x = Math.ceil(x); return x; } - if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) { - return 0; - } + if (Number.isNaN(x) || x === 0 && Object.is(0, x) || x === Number.POSITIVE_INFINITY || x === Number.NEGATIVE_INFINITY) return 0; x = webidl.util.IntegerPart(x); x = x % Math.pow(2, bitLength); - if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) { - return x - Math.pow(2, bitLength); - } + if (signedness === "signed" && x >= Math.pow(2, bitLength) - 1) return x - Math.pow(2, bitLength); return x; }; webidl.util.IntegerPart = function(n) { const r = Math.floor(Math.abs(n)); - if (n < 0) { - return -1 * r; - } + if (n < 0) return -1 * r; return r; }; webidl.util.Stringify = function(V) { - const type = webidl.util.Type(V); - switch (type) { + switch (webidl.util.Type(V)) { case SYMBOL: return `Symbol(${V.description})`; case OBJECT: return inspect(V); case STRING: return `"${V}"`; @@ -162869,12 +148378,8 @@ var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { } }; webidl.util.IsResizableArrayBuffer = function(V) { - if (types.isArrayBuffer(V)) { - return V.resizable; - } - if (types.isSharedArrayBuffer(V)) { - return V.growable; - } + if (types.isArrayBuffer(V)) return V.resizable; + if (types.isSharedArrayBuffer(V)) return V.growable; throw webidl.errors.exception({ header: "IsResizableArrayBuffer", message: `"${webidl.util.Stringify(V)}" is not an array buffer.` @@ -162885,27 +148390,21 @@ var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; webidl.sequenceConverter = function(converter) { return (V, prefix, argument, Iterable) => { - if (webidl.util.Type(V) !== OBJECT) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` - }); - } + if (webidl.util.Type(V) !== OBJECT) throw webidl.errors.exception({ + header: prefix, + message: `${argument} (${webidl.util.Stringify(V)}) is not iterable.` + }); /** @type {Generator} */ const method = typeof Iterable === "function" ? Iterable() : V?.[Symbol.iterator]?.(); const seq = []; let index = 0; - if (method === undefined || typeof method.next !== "function") { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is not iterable.` - }); - } + if (method === void 0 || typeof method.next !== "function") throw webidl.errors.exception({ + header: prefix, + message: `${argument} is not iterable.` + }); while (true) { const { done, value } = method.next(); - if (done) { - break; - } + if (done) break; seq.push(converter(value, prefix, `${argument}[${index++}]`)); } return seq; @@ -162913,78 +148412,61 @@ var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; webidl.recordConverter = function(keyConverter, valueConverter) { return (O, prefix, argument) => { - if (webidl.util.Type(O) !== OBJECT) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} ("${webidl.util.TypeValueToString(O)}") is not an Object.` - }); - } + if (webidl.util.Type(O) !== OBJECT) throw webidl.errors.exception({ + header: prefix, + message: `${argument} ("${webidl.util.TypeValueToString(O)}") is not an Object.` + }); const result = {}; if (!types.isProxy(O)) { const keys = [...Object.getOwnPropertyNames(O), ...Object.getOwnPropertySymbols(O)]; for (const key of keys) { const keyName = webidl.util.Stringify(key); const typedKey = keyConverter(key, prefix, `Key ${keyName} in ${argument}`); - const typedValue = valueConverter(O[key], prefix, `${argument}[${keyName}]`); - result[typedKey] = typedValue; + result[typedKey] = valueConverter(O[key], prefix, `${argument}[${keyName}]`); } return result; } const keys = Reflect.ownKeys(O); - for (const key of keys) { - const desc = Reflect.getOwnPropertyDescriptor(O, key); - if (desc?.enumerable) { - const typedKey = keyConverter(key, prefix, argument); - const typedValue = valueConverter(O[key], prefix, argument); - result[typedKey] = typedValue; - } + for (const key of keys) if (Reflect.getOwnPropertyDescriptor(O, key)?.enumerable) { + const typedKey = keyConverter(key, prefix, argument); + result[typedKey] = valueConverter(O[key], prefix, argument); } return result; }; }; webidl.interfaceConverter = function(TypeCheck, name) { return (V, prefix, argument) => { - if (!TypeCheck(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${name}.` - }); - } + if (!TypeCheck(V)) throw webidl.errors.exception({ + header: prefix, + message: `Expected ${argument} ("${webidl.util.Stringify(V)}") to be an instance of ${name}.` + }); return V; }; }; webidl.dictionaryConverter = function(converters) { return (dictionary, prefix, argument) => { const dict = {}; - if (dictionary != null && webidl.util.Type(dictionary) !== OBJECT) { - throw webidl.errors.exception({ - header: prefix, - message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` - }); - } + if (dictionary != null && webidl.util.Type(dictionary) !== OBJECT) throw webidl.errors.exception({ + header: prefix, + message: `Expected ${dictionary} to be one of: Null, Undefined, Object.` + }); for (const options of converters) { const { key, defaultValue, required, converter } = options; if (required === true) { - if (dictionary == null || !Object.hasOwn(dictionary, key)) { - throw webidl.errors.exception({ - header: prefix, - message: `Missing required key "${key}".` - }); - } + if (dictionary == null || !Object.hasOwn(dictionary, key)) throw webidl.errors.exception({ + header: prefix, + message: `Missing required key "${key}".` + }); } let value = dictionary?.[key]; - const hasDefault = defaultValue !== undefined; - if (hasDefault && value === undefined) { - value = defaultValue(); - } - if (required || hasDefault || value !== undefined) { + const hasDefault = defaultValue !== void 0; + if (hasDefault && value === void 0) value = defaultValue(); + if (required || hasDefault || value !== void 0) { value = converter(value, prefix, `${argument}.${key}`); - if (options.allowedValues && !options.allowedValues.includes(value)) { - throw webidl.errors.exception({ - header: prefix, - message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` - }); - } + if (options.allowedValues && !options.allowedValues.includes(value)) throw webidl.errors.exception({ + header: prefix, + message: `${value} is not an accepted type. Expected one of ${options.allowedValues.join(", ")}.` + }); dict[key] = value; } } @@ -162993,9 +148475,7 @@ var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; webidl.nullableConverter = function(converter) { return (V, prefix, argument) => { - if (V === null) { - return V; - } + if (V === null) return V; return converter(V, prefix, argument); }; }; @@ -163029,39 +148509,27 @@ var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { assert$29(types.isAnyArrayBuffer(jsBufferSource)); length = jsBufferSource.byteLength; } - if (jsArrayBuffer.detached) { - return new Uint8Array(0); - } + if (jsArrayBuffer.detached) return new Uint8Array(0); const bytes = new Uint8Array(length); const view = new Uint8Array(jsArrayBuffer, offset, length); bytes.set(view); return bytes; }; webidl.converters.DOMString = function(V, prefix, argument, flags) { - if (V === null && webidl.util.HasFlag(flags, webidl.attributes.LegacyNullToEmptyString)) { - return ""; - } - if (typeof V === "symbol") { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is a symbol, which cannot be converted to a DOMString.` - }); - } + if (V === null && webidl.util.HasFlag(flags, webidl.attributes.LegacyNullToEmptyString)) return ""; + if (typeof V === "symbol") throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a DOMString.` + }); return String(V); }; webidl.converters.ByteString = function(V, prefix, argument) { - if (typeof V === "symbol") { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} is a symbol, which cannot be converted to a ByteString.` - }); - } + if (typeof V === "symbol") throw webidl.errors.exception({ + header: prefix, + message: `${argument} is a symbol, which cannot be converted to a ByteString.` + }); const x = String(V); - for (let index = 0; index < x.length; index++) { - if (x.charCodeAt(index) > 255) { - throw new TypeError("Cannot convert argument to a ByteString because the character at " + `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`); - } - } + for (let index = 0; index < x.length; index++) if (x.charCodeAt(index) > 255) throw new TypeError(`Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.`); return x; }; /** @@ -163070,146 +148538,109 @@ var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @see https://webidl.spec.whatwg.org/#es-USVString */ webidl.converters.USVString = function(value) { - if (typeof value === "string") { - return value.toWellFormed(); - } + if (typeof value === "string") return value.toWellFormed(); return `${value}`.toWellFormed(); }; webidl.converters.boolean = function(V) { - const x = Boolean(V); - return x; + return Boolean(V); }; webidl.converters.any = function(V) { return V; }; webidl.converters["long long"] = function(V, prefix, argument) { - const x = webidl.util.ConvertToInt(V, 64, "signed", 0, prefix, argument); - return x; + return webidl.util.ConvertToInt(V, 64, "signed", 0, prefix, argument); }; webidl.converters["unsigned long long"] = function(V, prefix, argument) { - const x = webidl.util.ConvertToInt(V, 64, "unsigned", 0, prefix, argument); - return x; + return webidl.util.ConvertToInt(V, 64, "unsigned", 0, prefix, argument); }; webidl.converters["unsigned long"] = function(V, prefix, argument) { - const x = webidl.util.ConvertToInt(V, 32, "unsigned", 0, prefix, argument); - return x; + return webidl.util.ConvertToInt(V, 32, "unsigned", 0, prefix, argument); }; webidl.converters["unsigned short"] = function(V, prefix, argument, flags) { - const x = webidl.util.ConvertToInt(V, 16, "unsigned", flags, prefix, argument); - return x; + return webidl.util.ConvertToInt(V, 16, "unsigned", flags, prefix, argument); }; webidl.converters.ArrayBuffer = function(V, prefix, argument, flags) { - if (webidl.util.Type(V) !== OBJECT || !types.isArrayBuffer(V)) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ["ArrayBuffer"] - }); - } - if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a resizable ArrayBuffer.` - }); - } + if (webidl.util.Type(V) !== OBJECT || !types.isArrayBuffer(V)) throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V)}")`, + types: ["ArrayBuffer"] + }); + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a resizable ArrayBuffer.` + }); return V; }; webidl.converters.SharedArrayBuffer = function(V, prefix, argument, flags) { - if (webidl.util.Type(V) !== OBJECT || !types.isSharedArrayBuffer(V)) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ["SharedArrayBuffer"] - }); - } - if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a resizable SharedArrayBuffer.` - }); - } + if (webidl.util.Type(V) !== OBJECT || !types.isSharedArrayBuffer(V)) throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V)}")`, + types: ["SharedArrayBuffer"] + }); + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V)) throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a resizable SharedArrayBuffer.` + }); return V; }; webidl.converters.TypedArray = function(V, T, prefix, argument, flags) { - if (webidl.util.Type(V) !== OBJECT || !types.isTypedArray(V) || V.constructor.name !== T.name) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: [T.name] - }); - } - if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a view on a shared array buffer.` - }); - } - if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a view on a resizable array buffer.` - }); - } + if (webidl.util.Type(V) !== OBJECT || !types.isTypedArray(V) || V.constructor.name !== T.name) throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V)}")`, + types: [T.name] + }); + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a view on a shared array buffer.` + }); + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a view on a resizable array buffer.` + }); return V; }; webidl.converters.DataView = function(V, prefix, argument, flags) { - if (webidl.util.Type(V) !== OBJECT || !types.isDataView(V)) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ["DataView"] - }); - } - if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a view on a shared array buffer.` - }); - } - if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a view on a resizable array buffer.` - }); - } + if (webidl.util.Type(V) !== OBJECT || !types.isDataView(V)) throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V)}")`, + types: ["DataView"] + }); + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a view on a shared array buffer.` + }); + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a view on a resizable array buffer.` + }); return V; }; webidl.converters.ArrayBufferView = function(V, prefix, argument, flags) { - if (webidl.util.Type(V) !== OBJECT || !types.isArrayBufferView(V)) { - throw webidl.errors.conversionFailed({ - prefix, - argument: `${argument} ("${webidl.util.Stringify(V)}")`, - types: ["ArrayBufferView"] - }); - } - if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a view on a shared array buffer.` - }); - } - if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a view on a resizable array buffer.` - }); - } + if (webidl.util.Type(V) !== OBJECT || !types.isArrayBufferView(V)) throw webidl.errors.conversionFailed({ + prefix, + argument: `${argument} ("${webidl.util.Stringify(V)}")`, + types: ["ArrayBufferView"] + }); + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowShared) && types.isSharedArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a view on a shared array buffer.` + }); + if (!webidl.util.HasFlag(flags, webidl.attributes.AllowResizable) && webidl.util.IsResizableArrayBuffer(V.buffer)) throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a view on a resizable array buffer.` + }); return V; }; webidl.converters.BufferSource = function(V, prefix, argument, flags) { - if (types.isArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, prefix, argument, flags); - } + if (types.isArrayBuffer(V)) return webidl.converters.ArrayBuffer(V, prefix, argument, flags); if (types.isArrayBufferView(V)) { flags &= ~webidl.attributes.AllowShared; return webidl.converters.ArrayBufferView(V, prefix, argument, flags); } - if (types.isSharedArrayBuffer(V)) { - throw webidl.errors.exception({ - header: prefix, - message: `${argument} cannot be a SharedArrayBuffer.` - }); - } + if (types.isSharedArrayBuffer(V)) throw webidl.errors.exception({ + header: prefix, + message: `${argument} cannot be a SharedArrayBuffer.` + }); throw webidl.errors.conversionFailed({ prefix, argument: `${argument} ("${webidl.util.Stringify(V)}")`, @@ -163217,12 +148648,8 @@ var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { }); }; webidl.converters.AllowSharedBufferSource = function(V, prefix, argument, flags) { - if (types.isArrayBuffer(V)) { - return webidl.converters.ArrayBuffer(V, prefix, argument, flags); - } - if (types.isSharedArrayBuffer(V)) { - return webidl.converters.SharedArrayBuffer(V, prefix, argument, flags); - } + if (types.isArrayBuffer(V)) return webidl.converters.ArrayBuffer(V, prefix, argument, flags); + if (types.isSharedArrayBuffer(V)) return webidl.converters.SharedArrayBuffer(V, prefix, argument, flags); if (types.isArrayBufferView(V)) { flags |= webidl.attributes.AllowShared; return webidl.converters.ArrayBufferView(V, prefix, argument, flags); @@ -163249,24 +148676,19 @@ var require_webidl = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {*} V */ webidl.converters.EventHandlerNonNull = function(V) { - if (webidl.util.Type(V) !== OBJECT) { - return null; - } - if (typeof V === "function") { - return V; - } + if (webidl.util.Type(V) !== OBJECT) return null; + if (typeof V === "function") return V; return () => {}; }; webidl.attributes = { - Clamp: 1 << 0, - EnforceRange: 1 << 1, - AllowShared: 1 << 2, - AllowResizable: 1 << 3, - LegacyNullToEmptyString: 1 << 4 + Clamp: 1, + EnforceRange: 2, + AllowShared: 4, + AllowResizable: 8, + LegacyNullToEmptyString: 16 }; module.exports = { webidl }; })); - //#endregion //#region ../node_modules/undici/lib/web/fetch/util.js var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -163287,19 +148709,13 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { return length === 0 ? null : urlList[length - 1].toString(); } function responseLocationURL(response, requestFragment) { - if (!redirectStatusSet.has(response.status)) { - return null; - } + if (!redirectStatusSet.has(response.status)) return null; let location = response.headersList.get("location", true); if (location !== null && isValidHeaderValue(location)) { - if (!isValidEncodedURL(location)) { - location = normalizeBinaryStringToUtf8(location); - } + if (!isValidEncodedURL(location)) location = normalizeBinaryStringToUtf8(location); location = new URL(location, responseURL(response)); } - if (location && !location.hash) { - location.hash = requestFragment; - } + if (location && !location.hash) location.hash = requestFragment; return location; } /** @@ -163310,9 +148726,7 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { function isValidEncodedURL(url) { for (let i = 0; i < url.length; ++i) { const code = url.charCodeAt(i); - if (code > 126 || code < 32) { - return false; - } + if (code > 126 || code < 32) return false; } return true; } @@ -163331,9 +148745,7 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } function requestBadPort(request) { const url = requestCurrentURL(request); - if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) { - return "blocked"; - } + if (urlIsHttpHttpsScheme(url) && badPortsSet.has(url.port)) return "blocked"; return "allowed"; } function isErrorLike(object) { @@ -163342,9 +148754,7 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { function isValidReasonPhrase(statusText) { for (let i = 0; i < statusText.length; ++i) { const c = statusText.charCodeAt(i); - if (!(c === 9 || c >= 32 && c <= 126 || c >= 128 && c <= 255)) { - return false; - } + if (!(c === 9 || c >= 32 && c <= 126 || c >= 128 && c <= 255)) return false; } return true; } @@ -163367,13 +148777,11 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { function parseReferrerPolicy(actualResponse) { const policyHeader = (actualResponse.headersList.get("referrer-policy", true) ?? "").split(","); let policy = ""; - if (policyHeader.length) { - for (let i = policyHeader.length; i !== 0; i--) { - const token = policyHeader[i - 1].trim(); - if (referrerPolicyTokens.has(token)) { - policy = token; - break; - } + if (policyHeader.length) for (let i = policyHeader.length; i !== 0; i--) { + const token = policyHeader[i - 1].trim(); + if (referrerPolicyTokens.has(token)) { + policy = token; + break; } } return policy; @@ -163388,9 +148796,7 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function setRequestReferrerPolicyOnRedirect(request, actualResponse) { const policy = parseReferrerPolicy(actualResponse); - if (policy !== "") { - request.referrerPolicy = policy; - } + if (policy !== "") request.referrerPolicy = policy; } function crossOriginResourcePolicyCheck() { return "allowed"; @@ -163408,12 +148814,9 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } function appendRequestOriginHeader(request) { let serializedOrigin = request.origin; - if (serializedOrigin === "client" || serializedOrigin === undefined) { - return; - } - if (request.responseTainting === "cors" || request.mode === "websocket") { - request.headersList.append("origin", serializedOrigin, true); - } else if (request.method !== "GET" && request.method !== "HEAD") { + if (serializedOrigin === "client" || serializedOrigin === void 0) return; + if (request.responseTainting === "cors" || request.mode === "websocket") request.headersList.append("origin", serializedOrigin, true); + else if (request.method !== "GET" && request.method !== "HEAD") { switch (request.referrerPolicy) { case "no-referrer": serializedOrigin = null; @@ -163421,14 +148824,10 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { case "no-referrer-when-downgrade": case "strict-origin": case "strict-origin-when-cross-origin": - if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) { - serializedOrigin = null; - } + if (request.origin && urlHasHttpsScheme(request.origin) && !urlHasHttpsScheme(requestCurrentURL(request))) serializedOrigin = null; break; case "same-origin": - if (!sameOrigin(request, requestCurrentURL(request))) { - serializedOrigin = null; - } + if (!sameOrigin(request, requestCurrentURL(request))) serializedOrigin = null; break; default: } @@ -163439,16 +148838,14 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { return timestamp; } function clampAndCoarsenConnectionTimingInfo(connectionTimingInfo, defaultStartTime, crossOriginIsolatedCapability) { - if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) { - return { - domainLookupStartTime: defaultStartTime, - domainLookupEndTime: defaultStartTime, - connectionStartTime: defaultStartTime, - connectionEndTime: defaultStartTime, - secureConnectionStartTime: defaultStartTime, - ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol - }; - } + if (!connectionTimingInfo?.startTime || connectionTimingInfo.startTime < defaultStartTime) return { + domainLookupStartTime: defaultStartTime, + domainLookupEndTime: defaultStartTime, + connectionStartTime: defaultStartTime, + connectionEndTime: defaultStartTime, + secureConnectionStartTime: defaultStartTime, + ALPNNegotiatedProtocol: connectionTimingInfo?.ALPNNegotiatedProtocol + }; return { domainLookupStartTime: coarsenTime(connectionTimingInfo.domainLookupStartTime, crossOriginIsolatedCapability), domainLookupEndTime: coarsenTime(connectionTimingInfo.domainLookupEndTime, crossOriginIsolatedCapability), @@ -163493,58 +148890,38 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { let referrerSource = null; if (request.referrer === "client") { const globalOrigin = getGlobalOrigin(); - if (!globalOrigin || globalOrigin.origin === "null") { - return "no-referrer"; - } + if (!globalOrigin || globalOrigin.origin === "null") return "no-referrer"; referrerSource = new URL(globalOrigin); - } else if (webidl.is.URL(request.referrer)) { - referrerSource = request.referrer; - } + } else if (webidl.is.URL(request.referrer)) referrerSource = request.referrer; let referrerURL = stripURLForReferrer(referrerSource); const referrerOrigin = stripURLForReferrer(referrerSource, true); - if (referrerURL.toString().length > 4096) { - referrerURL = referrerOrigin; - } + if (referrerURL.toString().length > 4096) referrerURL = referrerOrigin; switch (policy) { case "no-referrer": return "no-referrer"; case "origin": - if (referrerOrigin != null) { - return referrerOrigin; - } + if (referrerOrigin != null) return referrerOrigin; return stripURLForReferrer(referrerSource, true); case "unsafe-url": return referrerURL; case "strict-origin": { const currentURL = requestCurrentURL(request); - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { - return "no-referrer"; - } + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; return referrerOrigin; } case "strict-origin-when-cross-origin": { const currentURL = requestCurrentURL(request); - if (sameOrigin(referrerURL, currentURL)) { - return referrerURL; - } - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { - return "no-referrer"; - } + if (sameOrigin(referrerURL, currentURL)) return referrerURL; + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; return referrerOrigin; } case "same-origin": - if (sameOrigin(request, referrerURL)) { - return referrerURL; - } + if (sameOrigin(request, referrerURL)) return referrerURL; return "no-referrer"; case "origin-when-cross-origin": - if (sameOrigin(request, referrerURL)) { - return referrerURL; - } + if (sameOrigin(request, referrerURL)) return referrerURL; return referrerOrigin; case "no-referrer-when-downgrade": { const currentURL = requestCurrentURL(request); - if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) { - return "no-referrer"; - } + if (isURLPotentiallyTrustworthy(referrerURL) && !isURLPotentiallyTrustworthy(currentURL)) return "no-referrer"; return referrerURL; } } @@ -163564,9 +148941,7 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { function stripURLForReferrer(url, originOnly = false) { assert$28(webidl.is.URL(url)); url = new URL(url); - if (urlIsLocal(url)) { - return "no-referrer"; - } + if (urlIsLocal(url)) return "no-referrer"; url.username = ""; url.password = ""; url.hash = ""; @@ -163586,9 +148961,7 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function isOriginIPPotentiallyTrustworthy(origin) { if (origin.includes(":")) { - if (origin[0] === "[" && origin[origin.length - 1] === "]") { - origin = origin.slice(1, -1); - } + if (origin[0] === "[" && origin[origin.length - 1] === "]") origin = origin.slice(1, -1); return isPotentiallyTrustworthyIPv6(origin); } return isPotentialleTrustworthyIPv4(origin); @@ -163605,25 +148978,13 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {boolean} */ function isOriginPotentiallyTrustworthy(origin) { - if (origin == null || origin === "null") { - return false; - } + if (origin == null || origin === "null") return false; origin = new URL(origin); - if (origin.protocol === "https:" || origin.protocol === "wss:") { - return true; - } - if (isOriginIPPotentiallyTrustworthy(origin.hostname)) { - return true; - } - if (origin.hostname === "localhost" || origin.hostname === "localhost.") { - return true; - } - if (origin.hostname.endsWith(".localhost") || origin.hostname.endsWith(".localhost.")) { - return true; - } - if (origin.protocol === "file:") { - return true; - } + if (origin.protocol === "https:" || origin.protocol === "wss:") return true; + if (isOriginIPPotentiallyTrustworthy(origin.hostname)) return true; + if (origin.hostname === "localhost" || origin.hostname === "localhost.") return true; + if (origin.hostname.endsWith(".localhost") || origin.hostname.endsWith(".localhost.")) return true; + if (origin.protocol === "file:") return true; return false; } /** @@ -163639,12 +149000,8 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {boolean} */ function isURLPotentiallyTrustworthy(url) { - if (!webidl.is.URL(url)) { - return false; - } - if (url.href === "about:blank" || url.href === "about:srcdoc") { - return true; - } + if (!webidl.is.URL(url)) return false; + if (url.href === "about:blank" || url.href === "about:srcdoc") return true; if (url.protocol === "data:") return true; if (url.protocol === "blob:") return true; return isOriginPotentiallyTrustworthy(url.origin); @@ -163656,12 +149013,8 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {URL} B */ function sameOrigin(A, B) { - if (A.origin === B.origin && A.origin === "null") { - return true; - } - if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) { - return true; - } + if (A.origin === B.origin && A.origin === "null") return true; + if (A.protocol === B.protocol && A.hostname === B.hostname && A.port === B.port) return true; return false; } function isAborted(fetchParams) { @@ -163704,18 +149057,13 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { this.#index = 0; } next() { - if (typeof this !== "object" || this === null || !(#target in this)) { - throw new TypeError(`'next' called on an object that does not implement interface ${name} Iterator.`); - } + if (typeof this !== "object" || this === null || !(#target in this)) throw new TypeError(`'next' called on an object that does not implement interface ${name} Iterator.`); const index = this.#index; const values = kInternalIterator(this.#target); - const len = values.length; - if (index >= len) { - return { - value: undefined, - done: true - }; - } + if (index >= values.length) return { + value: void 0, + done: true + }; const { [keyIndex]: key, [valueIndex]: value } = values[index]; this.#index = index + 1; let result; @@ -163805,12 +149153,8 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { value: function forEach(callbackfn, thisArg = globalThis) { webidl.brandCheck(this, object); webidl.argumentLengthCheck(arguments, 1, `${name}.forEach`); - if (typeof callbackfn !== "function") { - throw new TypeError(`Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`); - } - for (const { 0: key, 1: value } of makeIterator(this, "key+value")) { - callbackfn.call(thisArg, value, key, this); - } + if (typeof callbackfn !== "function") throw new TypeError(`Failed to execute 'forEach' on '${name}': parameter 1 is not of type 'Function'.`); + for (const { 0: key, 1: value } of makeIterator(this, "key+value")) callbackfn.call(thisArg, value, key, this); } } }; @@ -163836,8 +149180,7 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { const successSteps = processBody; const errorSteps = processBodyError; try { - const reader = body.stream.getReader(); - readAllBytes(reader, successSteps, errorSteps); + readAllBytes(body.stream.getReader(), successSteps, errorSteps); } catch (e) { errorSteps(e); } @@ -163850,9 +149193,7 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { controller.close(); controller.byobRequest?.respond(0); } catch (err) { - if (!err.message.includes("Controller is already closed") && !err.message.includes("ReadableStream is already closed")) { - throw err; - } + if (!err.message.includes("Controller is already closed") && !err.message.includes("ReadableStream is already closed")) throw err; } } /** @@ -163874,7 +149215,7 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { return; } if (!isUint8Array$1(chunk)) { - failureSteps(new TypeError("Received non-Uint8Array chunk")); + failureSteps(/* @__PURE__ */ new TypeError("Received non-Uint8Array chunk")); return; } bytes.push(chunk); @@ -163923,49 +149264,29 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function simpleRangeHeaderValue(value, allowWhitespace) { const data = value; - if (!data.startsWith("bytes")) { - return "failure"; - } + if (!data.startsWith("bytes")) return "failure"; const position = { position: 5 }; - if (allowWhitespace) { - collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); - } - if (data.charCodeAt(position.position) !== 61) { - return "failure"; - } + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + if (data.charCodeAt(position.position) !== 61) return "failure"; position.position++; - if (allowWhitespace) { - collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); - } + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); const rangeStart = collectASequenceOfCodePoints((char) => { const code = char.charCodeAt(0); return code >= 48 && code <= 57; }, data, position); const rangeStartValue = rangeStart.length ? Number(rangeStart) : null; - if (allowWhitespace) { - collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); - } - if (data.charCodeAt(position.position) !== 45) { - return "failure"; - } + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); + if (data.charCodeAt(position.position) !== 45) return "failure"; position.position++; - if (allowWhitespace) { - collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); - } + if (allowWhitespace) collectASequenceOfCodePoints((char) => char === " " || char === " ", data, position); const rangeEnd = collectASequenceOfCodePoints((char) => { const code = char.charCodeAt(0); return code >= 48 && code <= 57; }, data, position); const rangeEndValue = rangeEnd.length ? Number(rangeEnd) : null; - if (position.position < data.length) { - return "failure"; - } - if (rangeEndValue === null && rangeStartValue === null) { - return "failure"; - } - if (rangeStartValue > rangeEndValue) { - return "failure"; - } + if (position.position < data.length) return "failure"; + if (rangeEndValue === null && rangeStartValue === null) return "failure"; + if (rangeStartValue > rangeEndValue) return "failure"; return { rangeStartValue, rangeEndValue @@ -164030,28 +149351,18 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { let essence = null; let mimeType = null; const values = getDecodeSplit("content-type", headers); - if (values === null) { - return "failure"; - } + if (values === null) return "failure"; for (const value of values) { const temporaryMimeType = parseMIMEType(value); - if (temporaryMimeType === "failure" || temporaryMimeType.essence === "*/*") { - continue; - } + if (temporaryMimeType === "failure" || temporaryMimeType.essence === "*/*") continue; mimeType = temporaryMimeType; if (mimeType.essence !== essence) { charset = null; - if (mimeType.parameters.has("charset")) { - charset = mimeType.parameters.get("charset"); - } + if (mimeType.parameters.has("charset")) charset = mimeType.parameters.get("charset"); essence = mimeType.essence; - } else if (!mimeType.parameters.has("charset") && charset !== null) { - mimeType.parameters.set("charset", charset); - } - } - if (mimeType == null) { - return "failure"; + } else if (!mimeType.parameters.has("charset") && charset !== null) mimeType.parameters.set("charset", charset); } + if (mimeType == null) return "failure"; return mimeType; } /** @@ -164065,16 +149376,12 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { let temporaryValue = ""; while (position.position < input.length) { temporaryValue += collectASequenceOfCodePoints((char) => char !== "\"" && char !== ",", input, position); - if (position.position < input.length) { - if (input.charCodeAt(position.position) === 34) { - temporaryValue += collectAnHTTPQuotedString(input, position); - if (position.position < input.length) { - continue; - } - } else { - assert$28(input.charCodeAt(position.position) === 44); - position.position++; - } + if (position.position < input.length) if (input.charCodeAt(position.position) === 34) { + temporaryValue += collectAnHTTPQuotedString(input, position); + if (position.position < input.length) continue; + } else { + assert$28(input.charCodeAt(position.position) === 44); + position.position++; } temporaryValue = removeChars(temporaryValue, true, true, (char) => char === 9 || char === 32); values.push(temporaryValue); @@ -164089,9 +149396,7 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function getDecodeSplit(name, list) { const value = list.get(name, true); - if (value === null) { - return null; - } + if (value === null) return null; return gettingDecodingSplitting(value); } function hasAuthenticationEntry(request) { @@ -164123,7 +149428,6 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { var EnvironmentSettingsObject = class { settingsObject = new EnvironmentSettingsObjectBase(); }; - const environmentSettingsObject = new EnvironmentSettingsObject(); module.exports = { isAborted, isCancelled, @@ -164167,14 +149471,13 @@ var require_util$4 = /* @__PURE__ */ __commonJSMin(((exports, module) => { createInflate, extractMimeType, getDecodeSplit, - environmentSettingsObject, + environmentSettingsObject: new EnvironmentSettingsObject(), isOriginIPPotentiallyTrustworthy, hasAuthenticationEntry, includesCredentials, isTraversableNavigable }; })); - //#endregion //#region ../node_modules/undici/lib/web/fetch/formdata.js var require_formdata = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -164184,100 +149487,75 @@ var require_formdata = /* @__PURE__ */ __commonJSMin(((exports, module) => { const nodeUtil$2 = __require("node:util"); var FormData = class FormData { #state = []; - constructor(form = undefined) { + constructor(form = void 0) { webidl.util.markAsUncloneable(this); - if (form !== undefined) { - throw webidl.errors.conversionFailed({ - prefix: "FormData constructor", - argument: "Argument 1", - types: ["undefined"] - }); - } + if (form !== void 0) throw webidl.errors.conversionFailed({ + prefix: "FormData constructor", + argument: "Argument 1", + types: ["undefined"] + }); } - append(name, value, filename = undefined) { + append(name, value, filename = void 0) { webidl.brandCheck(this, FormData); const prefix = "FormData.append"; webidl.argumentLengthCheck(arguments, 2, prefix); name = webidl.converters.USVString(name); if (arguments.length === 3 || webidl.is.Blob(value)) { value = webidl.converters.Blob(value, prefix, "value"); - if (filename !== undefined) { - filename = webidl.converters.USVString(filename); - } - } else { - value = webidl.converters.USVString(value); - } + if (filename !== void 0) filename = webidl.converters.USVString(filename); + } else value = webidl.converters.USVString(value); const entry = makeEntry(name, value, filename); this.#state.push(entry); } delete(name) { webidl.brandCheck(this, FormData); - const prefix = "FormData.delete"; - webidl.argumentLengthCheck(arguments, 1, prefix); + webidl.argumentLengthCheck(arguments, 1, "FormData.delete"); name = webidl.converters.USVString(name); this.#state = this.#state.filter((entry) => entry.name !== name); } get(name) { webidl.brandCheck(this, FormData); - const prefix = "FormData.get"; - webidl.argumentLengthCheck(arguments, 1, prefix); + webidl.argumentLengthCheck(arguments, 1, "FormData.get"); name = webidl.converters.USVString(name); const idx = this.#state.findIndex((entry) => entry.name === name); - if (idx === -1) { - return null; - } + if (idx === -1) return null; return this.#state[idx].value; } getAll(name) { webidl.brandCheck(this, FormData); - const prefix = "FormData.getAll"; - webidl.argumentLengthCheck(arguments, 1, prefix); + webidl.argumentLengthCheck(arguments, 1, "FormData.getAll"); name = webidl.converters.USVString(name); return this.#state.filter((entry) => entry.name === name).map((entry) => entry.value); } has(name) { webidl.brandCheck(this, FormData); - const prefix = "FormData.has"; - webidl.argumentLengthCheck(arguments, 1, prefix); + webidl.argumentLengthCheck(arguments, 1, "FormData.has"); name = webidl.converters.USVString(name); return this.#state.findIndex((entry) => entry.name === name) !== -1; } - set(name, value, filename = undefined) { + set(name, value, filename = void 0) { webidl.brandCheck(this, FormData); const prefix = "FormData.set"; webidl.argumentLengthCheck(arguments, 2, prefix); name = webidl.converters.USVString(name); if (arguments.length === 3 || webidl.is.Blob(value)) { value = webidl.converters.Blob(value, prefix, "value"); - if (filename !== undefined) { - filename = webidl.converters.USVString(filename); - } - } else { - value = webidl.converters.USVString(value); - } + if (filename !== void 0) filename = webidl.converters.USVString(filename); + } else value = webidl.converters.USVString(value); const entry = makeEntry(name, value, filename); const idx = this.#state.findIndex((entry) => entry.name === name); - if (idx !== -1) { - this.#state = [ - ...this.#state.slice(0, idx), - entry, - ...this.#state.slice(idx + 1).filter((entry) => entry.name !== name) - ]; - } else { - this.#state.push(entry); - } + if (idx !== -1) this.#state = [ + ...this.#state.slice(0, idx), + entry, + ...this.#state.slice(idx + 1).filter((entry) => entry.name !== name) + ]; + else this.#state.push(entry); } [nodeUtil$2.inspect.custom](depth, options) { const state = this.#state.reduce((a, b) => { - if (a[b.name]) { - if (Array.isArray(a[b.name])) { - a[b.name].push(b.value); - } else { - a[b.name] = [a[b.name], b.value]; - } - } else { - a[b.name] = b.value; - } + if (a[b.name]) if (Array.isArray(a[b.name])) a[b.name].push(b.value); + else a[b.name] = [a[b.name], b.value]; + else a[b.name] = b.value; return a; }, { __proto__: null }); options.depth ??= depth; @@ -164324,10 +149602,8 @@ var require_formdata = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function makeEntry(name, value, filename) { if (typeof value === "string") {} else { - if (!webidl.is.File(value)) { - value = new File([value], "blob", { type: value.type }); - } - if (filename !== undefined) { + if (!webidl.is.File(value)) value = new File([value], "blob", { type: value.type }); + if (filename !== void 0) { /** @type {FilePropertyBag} */ const options = { type: value.type, @@ -164348,7 +149624,6 @@ var require_formdata = /* @__PURE__ */ __commonJSMin(((exports, module) => { setFormDataState }; })); - //#endregion //#region ../node_modules/undici/lib/web/fetch/formdata-parser.js var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -164365,11 +149640,7 @@ var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) = * @param {string} chars */ function isAsciiString(chars) { - for (let i = 0; i < chars.length; ++i) { - if ((chars.charCodeAt(i) & ~127) !== 0) { - return false; - } - } + for (let i = 0; i < chars.length; ++i) if ((chars.charCodeAt(i) & -128) !== 0) return false; return true; } /** @@ -164378,14 +149649,10 @@ var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) = */ function validateBoundary(boundary) { const length = boundary.length; - if (length < 27 || length > 70) { - return false; - } + if (length < 27 || length > 70) return false; for (let i = 0; i < length; ++i) { const cp = boundary.charCodeAt(i); - if (!(cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 39 || cp === 45 || cp === 95)) { - return false; - } + if (!(cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 39 || cp === 45 || cp === 95)) return false; } return true; } @@ -164397,60 +149664,37 @@ var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) = function multipartFormDataParser(input, mimeType) { assert$27(mimeType !== "failure" && mimeType.essence === "multipart/form-data"); const boundaryString = mimeType.parameters.get("boundary"); - if (boundaryString === undefined) { - throw parsingError("missing boundary in content-type header"); - } + if (boundaryString === void 0) throw parsingError("missing boundary in content-type header"); const boundary = Buffer.from(`--${boundaryString}`, "utf8"); const entryList = []; const position = { position: 0 }; const firstBoundaryIndex = input.indexOf(boundary); - if (firstBoundaryIndex === -1) { - throw parsingError("no boundary found in multipart body"); - } + if (firstBoundaryIndex === -1) throw parsingError("no boundary found in multipart body"); position.position = firstBoundaryIndex; while (true) { - if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) { - position.position += boundary.length; - } else { - throw parsingError("expected a value starting with -- and the boundary"); - } - if (bufferStartsWith(input, dd, position)) { - return entryList; - } - if (input[position.position] !== 13 || input[position.position + 1] !== 10) { - throw parsingError("expected CRLF"); - } + if (input.subarray(position.position, position.position + boundary.length).equals(boundary)) position.position += boundary.length; + else throw parsingError("expected a value starting with -- and the boundary"); + if (bufferStartsWith(input, dd, position)) return entryList; + if (input[position.position] !== 13 || input[position.position + 1] !== 10) throw parsingError("expected CRLF"); position.position += 2; - const result = parseMultipartFormDataHeaders(input, position); - let { name, filename, contentType, encoding } = result; + let { name, filename, contentType, encoding } = parseMultipartFormDataHeaders(input, position); position.position += 2; let body; { const boundaryIndex = input.indexOf(boundary.subarray(2), position.position); - if (boundaryIndex === -1) { - throw parsingError("expected boundary after body"); - } + if (boundaryIndex === -1) throw parsingError("expected boundary after body"); body = input.subarray(position.position, boundaryIndex - 4); position.position += body.length; - if (encoding === "base64") { - body = Buffer.from(body.toString(), "base64"); - } - } - if (input[position.position] !== 13 || input[position.position + 1] !== 10) { - throw parsingError("expected CRLF"); - } else { - position.position += 2; + if (encoding === "base64") body = Buffer.from(body.toString(), "base64"); } + if (input[position.position] !== 13 || input[position.position + 1] !== 10) throw parsingError("expected CRLF"); + else position.position += 2; let value; if (filename !== null) { contentType ??= "text/plain"; - if (!isAsciiString(contentType)) { - contentType = ""; - } + if (!isAsciiString(contentType)) contentType = ""; value = new File([body], filename, { type: contentType }); - } else { - value = utf8DecodeBytes(Buffer.from(body)); - } + } else value = utf8DecodeBytes(Buffer.from(body)); assert$27(webidl.is.USVString(name)); assert$27(typeof value === "string" && webidl.is.USVString(value) || webidl.is.File(value)); entryList.push(makeEntry(name, value, filename)); @@ -164463,37 +149707,25 @@ var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) = * @returns {{ name: string, value: string }} */ function parseContentDispositionAttribute(input, position) { - if (input[position.position] === 59) { - position.position++; - } + if (input[position.position] === 59) position.position++; collectASequenceOfBytes((char) => char === 32 || char === 9, input, position); const attributeName = collectASequenceOfBytes((char) => isToken(char) && char !== 61 && char !== 42, input, position); - if (attributeName.length === 0) { - return null; - } + if (attributeName.length === 0) return null; const attrNameStr = attributeName.toString("ascii").toLowerCase(); const isExtended = input[position.position] === 42; - if (isExtended) { - position.position++; - } - if (input[position.position] !== 61) { - return null; - } + if (isExtended) position.position++; + if (input[position.position] !== 61) return null; position.position++; collectASequenceOfBytes((char) => char === 32 || char === 9, input, position); let value; if (isExtended) { const headerValue = collectASequenceOfBytes((char) => char !== 32 && char !== 13 && char !== 10 && char !== 59, input, position); - if (headerValue[0] !== 117 && headerValue[0] !== 85 || headerValue[1] !== 116 && headerValue[1] !== 84 || headerValue[2] !== 102 && headerValue[2] !== 70 || headerValue[3] !== 45 || headerValue[4] !== 56) { - throw parsingError("unknown encoding, expected utf-8''"); - } + if (headerValue[0] !== 117 && headerValue[0] !== 85 || headerValue[1] !== 116 && headerValue[1] !== 84 || headerValue[2] !== 102 && headerValue[2] !== 70 || headerValue[3] !== 45 || headerValue[4] !== 56) throw parsingError("unknown encoding, expected utf-8''"); value = decodeURIComponent(decoder.decode(headerValue.subarray(7))); } else if (input[position.position] === 34) { position.position++; const quotedValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 34, input, position); - if (input[position.position] !== 34) { - throw parsingError("Closing quote not found"); - } + if (input[position.position] !== 34) throw parsingError("Closing quote not found"); position.position++; value = decoder.decode(quotedValue).replace(/%0A/gi, "\n").replace(/%0D/gi, "\r").replace(/%22/g, "\""); } else { @@ -164517,9 +149749,7 @@ var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) = let encoding = null; while (true) { if (input[position.position] === 13 && input[position.position + 1] === 10) { - if (name === null) { - throw parsingError("header name is null"); - } + if (name === null) throw parsingError("header name is null"); return { name, filename, @@ -164529,37 +149759,22 @@ var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) = } let headerName = collectASequenceOfBytes((char) => char !== 10 && char !== 13 && char !== 58, input, position); headerName = removeChars(headerName, true, true, (char) => char === 9 || char === 32); - if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) { - throw parsingError("header name does not match the field-name token production"); - } - if (input[position.position] !== 58) { - throw parsingError("expected :"); - } + if (!HTTP_TOKEN_CODEPOINTS.test(headerName.toString())) throw parsingError("header name does not match the field-name token production"); + if (input[position.position] !== 58) throw parsingError("expected :"); position.position++; collectASequenceOfBytes((char) => char === 32 || char === 9, input, position); switch (bufferToLowerCasedHeaderName(headerName)) { - case "content-disposition": { + case "content-disposition": name = filename = null; - const dispositionType = collectASequenceOfBytes((char) => isToken(char), input, position); - if (dispositionType.toString("ascii").toLowerCase() !== "form-data") { - throw parsingError("expected form-data for content-disposition header"); - } + if (collectASequenceOfBytes((char) => isToken(char), input, position).toString("ascii").toLowerCase() !== "form-data") throw parsingError("expected form-data for content-disposition header"); while (position.position < input.length && input[position.position] !== 13 && input[position.position + 1] !== 10) { const attribute = parseContentDispositionAttribute(input, position); - if (!attribute) { - break; - } - if (attribute.name === "name") { - name = attribute.value; - } else if (attribute.name === "filename") { - filename = attribute.value; - } - } - if (name === null) { - throw parsingError("name attribute is required in content-disposition header"); + if (!attribute) break; + if (attribute.name === "name") name = attribute.value; + else if (attribute.name === "filename") filename = attribute.value; } + if (name === null) throw parsingError("name attribute is required in content-disposition header"); break; - } case "content-type": { let headerValue = collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); headerValue = removeChars(headerValue, false, true, (char) => char === 9 || char === 32); @@ -164572,15 +149787,10 @@ var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) = encoding = isomorphicDecode(headerValue); break; } - default: { - collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); - } - } - if (input[position.position] !== 13 && input[position.position + 1] !== 10) { - throw parsingError("expected CRLF"); - } else { - position.position += 2; + default: collectASequenceOfBytes((char) => char !== 10 && char !== 13, input, position); } + if (input[position.position] !== 13 && input[position.position + 1] !== 10) throw parsingError("expected CRLF"); + else position.position += 2; } } /** @@ -164590,9 +149800,7 @@ var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) = */ function collectASequenceOfBytes(condition, input, position) { let start = position.position; - while (start < input.length && condition(input[start])) { - ++start; - } + while (start < input.length && condition(input[start])) ++start; return input.subarray(position.position, position.position = start); } /** @@ -164605,12 +149813,8 @@ var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) = function removeChars(buf, leading, trailing, predicate) { let lead = 0; let trail = buf.length - 1; - if (leading) { - while (lead < buf.length && predicate(buf[lead])) lead++; - } - if (trailing) { - while (trail > 0 && predicate(buf[trail])) trail--; - } + if (leading) while (lead < buf.length && predicate(buf[lead])) lead++; + if (trailing) while (trail > 0 && predicate(buf[trail])) trail--; return lead === 0 && trail === buf.length - 1 ? buf : buf.subarray(lead, trail + 1); } /** @@ -164620,14 +149824,8 @@ var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) = * @param {{ position: number }} position */ function bufferStartsWith(buffer, start, position) { - if (buffer.length < start.length) { - return false; - } - for (let i = 0; i < start.length; i++) { - if (start[i] !== buffer[position.position + i]) { - return false; - } - } + if (buffer.length < start.length) return false; + for (let i = 0; i < start.length; i++) if (start[i] !== buffer[position.position + i]) return false; return true; } function parsingError(cause) { @@ -164665,7 +149863,6 @@ var require_formdata_parser = /* @__PURE__ */ __commonJSMin(((exports, module) = validateBoundary }; })); - //#endregion //#region ../node_modules/undici/lib/util/promise.js var require_promise = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -164683,19 +149880,17 @@ var require_promise = /* @__PURE__ */ __commonJSMin(((exports, module) => { function createDeferredPromise() { let res; let rej; - const promise = new Promise((resolve, reject) => { - res = resolve; - rej = reject; - }); return { - promise, + promise: new Promise((resolve, reject) => { + res = resolve; + rej = reject; + }), resolve: res, reject: rej }; } module.exports = { createDeferredPromise }; })); - //#endregion //#region ../node_modules/undici/lib/web/fetch/body.js var require_body$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -164717,9 +149912,7 @@ var require_body$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { function noop() {} const streamRegistry = new FinalizationRegistry((weakRef) => { const stream = weakRef.deref(); - if (stream && !stream.locked && !isDisturbed(stream) && !isErrored$1(stream)) { - stream.cancel("Response object has been garbage collected").catch(noop); - } + if (stream && !stream.locked && !isDisturbed(stream) && !isErrored$1(stream)) stream.cancel("Response object has been garbage collected").catch(noop); }); /** * Extract a body with type from a byte sequence or BodyInit object @@ -164733,20 +149926,16 @@ var require_body$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { function extractBody(object, keepalive = false) { let stream = null; let controller = null; - if (webidl.is.ReadableStream(object)) { - stream = object; - } else if (webidl.is.Blob(object)) { - stream = object.stream(); - } else { - stream = new ReadableStream({ - pull() {}, - start(c) { - controller = c; - }, - cancel() {}, - type: "bytes" - }); - } + if (webidl.is.ReadableStream(object)) stream = object; + else if (webidl.is.Blob(object)) stream = object.stream(); + else stream = new ReadableStream({ + pull() {}, + start(c) { + controller = c; + }, + cancel() {}, + type: "bytes" + }); assert$26(webidl.is.ReadableStream(stream)); let action = null; let source = null; @@ -164758,9 +149947,8 @@ var require_body$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } else if (webidl.is.URLSearchParams(object)) { source = object.toString(); type = "application/x-www-form-urlencoded;charset=UTF-8"; - } else if (webidl.is.BufferSource(object)) { - source = webidl.util.getCopyOfBytesHeldByBufferSource(object); - } else if (webidl.is.FormData(object)) { + } else if (webidl.is.BufferSource(object)) source = webidl.util.getCopyOfBytesHeldByBufferSource(object); + else if (webidl.is.FormData(object)) { const boundary = `----formdata-undici-0${`${random$1(1e11)}`.padStart(11, "0")}`; const prefix = `--${boundary}\r\nContent-Disposition: form-data`; /*! formdata-polyfill. MIT License. Jimmy Wärting */ @@ -164770,83 +149958,55 @@ var require_body$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { const rn = new Uint8Array([13, 10]); length = 0; let hasUnknownSizeValue = false; - for (const [name, value] of object) { - if (typeof value === "string") { - const chunk = textEncoder.encode(prefix + `; name="${formdataEscape(normalizeLinefeeds(name))}"` + `\r\n\r\n${normalizeLinefeeds(value)}\r\n`); - blobParts.push(chunk); - length += chunk.byteLength; - } else { - const chunk = textEncoder.encode(`${prefix}; name="${formdataEscape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${formdataEscape(value.name)}"` : "") + "\r\n" + `Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); - blobParts.push(chunk, value, rn); - if (typeof value.size === "number") { - length += chunk.byteLength + value.size + rn.byteLength; - } else { - hasUnknownSizeValue = true; - } - } + for (const [name, value] of object) if (typeof value === "string") { + const chunk = textEncoder.encode(prefix + `; name="${formdataEscape(normalizeLinefeeds(name))}"\r\n\r\n${normalizeLinefeeds(value)}\r\n`); + blobParts.push(chunk); + length += chunk.byteLength; + } else { + const chunk = textEncoder.encode(`${prefix}; name="${formdataEscape(normalizeLinefeeds(name))}"` + (value.name ? `; filename="${formdataEscape(value.name)}"` : "") + `\r +Content-Type: ${value.type || "application/octet-stream"}\r\n\r\n`); + blobParts.push(chunk, value, rn); + if (typeof value.size === "number") length += chunk.byteLength + value.size + rn.byteLength; + else hasUnknownSizeValue = true; } const chunk = textEncoder.encode(`--${boundary}--\r\n`); blobParts.push(chunk); length += chunk.byteLength; - if (hasUnknownSizeValue) { - length = null; - } + if (hasUnknownSizeValue) length = null; source = object; action = async function* () { - for (const part of blobParts) { - if (part.stream) { - yield* part.stream(); - } else { - yield part; - } - } + for (const part of blobParts) if (part.stream) yield* part.stream(); + else yield part; }; type = `multipart/form-data; boundary=${boundary}`; } else if (webidl.is.Blob(object)) { source = object; length = object.size; - if (object.type) { - type = object.type; - } + if (object.type) type = object.type; } else if (typeof object[Symbol.asyncIterator] === "function") { - if (keepalive) { - throw new TypeError("keepalive"); - } - if (util.isDisturbed(object) || object.locked) { - throw new TypeError("Response body object should not be disturbed or locked"); - } + if (keepalive) throw new TypeError("keepalive"); + if (util.isDisturbed(object) || object.locked) throw new TypeError("Response body object should not be disturbed or locked"); stream = webidl.is.ReadableStream(object) ? object : ReadableStreamFrom(object); } - if (typeof source === "string" || isUint8Array(source)) { - action = () => { - length = typeof source === "string" ? Buffer.byteLength(source) : source.length; - return source; - }; - } - if (action != null) { - ; - (async () => { - const result = action(); - const iterator = result?.[Symbol.asyncIterator]?.(); - if (iterator) { - for await (const bytes of iterator) { - if (isErrored$1(stream)) break; - if (bytes.length) { - controller.enqueue(new Uint8Array(bytes)); - } - } - } else if (result?.length && !isErrored$1(stream)) { - controller.enqueue(typeof result === "string" ? textEncoder.encode(result) : new Uint8Array(result)); - } - queueMicrotask(() => readableStreamClose(controller)); - })(); - } - const body = { + if (typeof source === "string" || isUint8Array(source)) action = () => { + length = typeof source === "string" ? Buffer.byteLength(source) : source.length; + return source; + }; + if (action != null) (async () => { + const result = action(); + const iterator = result?.[Symbol.asyncIterator]?.(); + if (iterator) for await (const bytes of iterator) { + if (isErrored$1(stream)) break; + if (bytes.length) controller.enqueue(new Uint8Array(bytes)); + } + else if (result?.length && !isErrored$1(stream)) controller.enqueue(typeof result === "string" ? textEncoder.encode(result) : new Uint8Array(result)); + queueMicrotask(() => readableStreamClose(controller)); + })(); + return [{ stream, source, length - }; - return [body, type]; + }, type]; } /** * @typedef {object} ExtractBodyResult @@ -164880,15 +150040,12 @@ var require_body$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; } function bodyMixinMethods(instance, getInternalState) { - const methods = { + return { blob() { return consumeBody(this, (bytes) => { let mimeType = bodyMimeType(getInternalState(this)); - if (mimeType === null) { - mimeType = ""; - } else if (mimeType) { - mimeType = serializeAMimeType(mimeType); - } + if (mimeType === null) mimeType = ""; + else if (mimeType) mimeType = serializeAMimeType(mimeType); return new Blob([bytes], { type: mimeType }); }, instance, getInternalState); }, @@ -164906,22 +150063,18 @@ var require_body$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { formData() { return consumeBody(this, (value) => { const mimeType = bodyMimeType(getInternalState(this)); - if (mimeType !== null) { - switch (mimeType.essence) { - case "multipart/form-data": { - const parsed = multipartFormDataParser(value, mimeType); - const fd = new FormData(); - setFormDataState(fd, parsed); - return fd; - } - case "application/x-www-form-urlencoded": { - const entries = new URLSearchParams(value.toString()); - const fd = new FormData(); - for (const [name, value] of entries) { - fd.append(name, value); - } - return fd; - } + if (mimeType !== null) switch (mimeType.essence) { + case "multipart/form-data": { + const parsed = multipartFormDataParser(value, mimeType); + const fd = new FormData(); + setFormDataState(fd, parsed); + return fd; + } + case "application/x-www-form-urlencoded": { + const entries = new URLSearchParams(value.toString()); + const fd = new FormData(); + for (const [name, value] of entries) fd.append(name, value); + return fd; } } throw new TypeError("Content-Type was not one of \"multipart/form-data\" or \"application/x-www-form-urlencoded\"."); @@ -164933,7 +150086,6 @@ var require_body$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { }, instance, getInternalState); } }; - return methods; } function mixinBody(prototype, getInternalState) { Object.assign(prototype.prototype, bodyMixinMethods(prototype, getInternalState)); @@ -164952,9 +150104,7 @@ var require_body$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { return Promise.reject(e); } object = getInternalState(object); - if (bodyUnusable(object)) { - return Promise.reject(new TypeError("Body is unusable: Body has already been read")); - } + if (bodyUnusable(object)) return Promise.reject(/* @__PURE__ */ new TypeError("Body is unusable: Body has already been read")); const promise = createDeferredPromise(); const errorSteps = promise.reject; const successSteps = (data) => { @@ -164987,9 +150137,7 @@ var require_body$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { /** @type {import('./headers').HeadersList} */ const headers = requestOrResponse.headersList; const mimeType = extractMimeType(headers); - if (mimeType === "failure") { - return null; - } + if (mimeType === "failure") return null; return mimeType; } module.exports = { @@ -165001,7 +150149,6 @@ var require_body$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { bodyUnusable }; })); - //#endregion //#region ../node_modules/undici/lib/dispatcher/client-h1.js var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -165017,22 +150164,15 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { const removeAllListeners = util.removeAllListeners; let extractBody; function lazyllhttp() { - const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : undefined; + const llhttpWasmData = process.env.JEST_WORKER_ID ? require_llhttp_wasm() : void 0; let mod; let useWasmSIMD = process.arch !== "ppc64"; - if (process.env.UNDICI_NO_WASM_SIMD === "1") { - useWasmSIMD = true; - } else if (process.env.UNDICI_NO_WASM_SIMD === "0") { - useWasmSIMD = false; - } - if (useWasmSIMD) { - try { - mod = new WebAssembly.Module(require_llhttp_simd_wasm()); - } catch {} - } - if (!mod) { - mod = new WebAssembly.Module(llhttpWasmData || require_llhttp_wasm()); - } + if (process.env.UNDICI_NO_WASM_SIMD === "1") useWasmSIMD = true; + else if (process.env.UNDICI_NO_WASM_SIMD === "0") useWasmSIMD = false; + if (useWasmSIMD) try { + mod = new WebAssembly.Module(require_llhttp_simd_wasm()); + } catch {} + if (!mod) mod = new WebAssembly.Module(llhttpWasmData || require_llhttp_wasm()); return new WebAssembly.Instance(mod, { env: { wasm_on_url: (p, at, len) => { return 0; @@ -165125,34 +150265,25 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { timers.clearTimeout(this.timeout); this.timeout = null; } - if (delay) { - if (type & USE_FAST_TIMER) { - this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)); - } else { - this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)); - this.timeout?.unref(); - } + if (delay) if (type & USE_FAST_TIMER) this.timeout = timers.setFastTimeout(onParserTimeout, delay, new WeakRef(this)); + else { + this.timeout = setTimeout(onParserTimeout, delay, new WeakRef(this)); + this.timeout?.unref(); } this.timeoutValue = delay; } else if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } + if (this.timeout.refresh) this.timeout.refresh(); } this.timeoutType = type; } resume() { - if (this.socket.destroyed || !this.paused) { - return; - } + if (this.socket.destroyed || !this.paused) return; assert$25(this.ptr != null); assert$25(currentParser === null); this.llhttp.llhttp_resume(this.ptr); assert$25(this.timeoutType === TIMEOUT_BODY); if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } + if (this.timeout.refresh) this.timeout.refresh(); } this.paused = false; this.execute(this.socket.read() || EMPTY_BUF); @@ -165161,9 +150292,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { readMore() { while (!this.paused && this.ptr) { const chunk = this.socket.read(); - if (chunk === null) { - break; - } + if (chunk === null) break; this.execute(chunk); } } @@ -165176,9 +150305,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { assert$25(!this.paused); const { socket, llhttp } = this; if (chunk.length > currentBufferSize) { - if (currentBufferPtr) { - llhttp.free(currentBufferPtr); - } + if (currentBufferPtr) llhttp.free(currentBufferPtr); currentBufferSize = Math.ceil(chunk.length / 4096) * 4096; currentBufferPtr = llhttp.malloc(currentBufferSize); } @@ -165195,9 +150322,8 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } if (ret !== constants.ERROR.OK) { const data = chunk.subarray(llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr); - if (ret === constants.ERROR.PAUSED_UPGRADE) { - this.onUpgrade(data); - } else if (ret === constants.ERROR.PAUSED) { + if (ret === constants.ERROR.PAUSED_UPGRADE) this.onUpgrade(data); + else if (ret === constants.ERROR.PAUSED) { this.paused = true; socket.unshift(data); } else { @@ -165238,13 +150364,9 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ onMessageBegin() { const { socket, client } = this; - if (socket.destroyed) { - return -1; - } + if (socket.destroyed) return -1; const request = client[kQueue][client[kRunningIdx]]; - if (!request) { - return -1; - } + if (!request) return -1; request.onResponseStarted(); return 0; } @@ -165254,11 +150376,8 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ onHeaderField(buf) { const len = this.headers.length; - if ((len & 1) === 0) { - this.headers.push(buf); - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); - } + if ((len & 1) === 0) this.headers.push(buf); + else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); this.trackHeader(buf.length); return 0; } @@ -165271,20 +150390,13 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { if ((len & 1) === 1) { this.headers.push(buf); len += 1; - } else { - this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); - } + } else this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf]); const key = this.headers[len - 2]; if (key.length === 10) { const headerName = util.bufferToLowerCasedHeaderName(key); - if (headerName === "keep-alive") { - this.keepAlive += buf.toString(); - } else if (headerName === "connection") { - this.connection += buf.toString(); - } - } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === "content-length") { - this.contentLength += buf.toString(); - } + if (headerName === "keep-alive") this.keepAlive += buf.toString(); + else if (headerName === "connection") this.connection += buf.toString(); + } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === "content-length") this.contentLength += buf.toString(); this.trackHeader(buf.length); return 0; } @@ -165293,9 +150405,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ trackHeader(len) { this.headersSize += len; - if (this.headersSize >= this.headersMaxSize) { - util.destroy(this.socket, new HeadersOverflowError()); - } + if (this.headersSize >= this.headersMaxSize) util.destroy(this.socket, new HeadersOverflowError()); } /** * @param {Buffer} head @@ -165340,13 +150450,9 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ onHeadersComplete(statusCode, upgrade, shouldKeepAlive) { const { client, socket, headers, statusText } = this; - if (socket.destroyed) { - return -1; - } + if (socket.destroyed) return -1; const request = client[kQueue][client[kRunningIdx]]; - if (!request) { - return -1; - } + if (!request) return -1; assert$25(!this.upgrade); assert$25(this.statusCode < 200); if (statusCode === 100) { @@ -165364,9 +150470,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { const bodyTimeout = request.bodyTimeout != null ? request.bodyTimeout : client[kBodyTimeout]; this.setTimeout(bodyTimeout, TIMEOUT_BODY); } else if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } + if (this.timeout.refresh) this.timeout.refresh(); } if (request.method === "CONNECT") { assert$25(client[kRunning] === 1); @@ -165385,27 +150489,14 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null; if (keepAliveTimeout != null) { const timeout = Math.min(keepAliveTimeout - client[kKeepAliveTimeoutThreshold], client[kKeepAliveMaxTimeout]); - if (timeout <= 0) { - socket[kReset] = true; - } else { - client[kKeepAliveTimeoutValue] = timeout; - } - } else { - client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; - } - } else { - socket[kReset] = true; - } + if (timeout <= 0) socket[kReset] = true; + else client[kKeepAliveTimeoutValue] = timeout; + } else client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]; + } else socket[kReset] = true; const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; - if (request.aborted) { - return -1; - } - if (request.method === "HEAD") { - return 1; - } - if (statusCode < 200) { - return 1; - } + if (request.aborted) return -1; + if (request.method === "HEAD") return 1; + if (statusCode < 200) return 1; if (socket[kBlocking]) { socket[kBlocking] = false; client[kResume](); @@ -165418,16 +150509,12 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ onBody(buf) { const { client, socket, statusCode, maxResponseSize } = this; - if (socket.destroyed) { - return -1; - } + if (socket.destroyed) return -1; const request = client[kQueue][client[kRunningIdx]]; assert$25(request); assert$25(this.timeoutType === TIMEOUT_BODY); if (this.timeout) { - if (this.timeout.refresh) { - this.timeout.refresh(); - } + if (this.timeout.refresh) this.timeout.refresh(); } assert$25(statusCode >= 200); if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) { @@ -165435,9 +150522,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { return -1; } this.bytesRead += buf.length; - if (request.onData(buf) === false) { - return constants.ERROR.PAUSED; - } + if (request.onData(buf) === false) return constants.ERROR.PAUSED; return 0; } /** @@ -165445,12 +150530,8 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ onMessageComplete() { const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this; - if (socket.destroyed && (!statusCode || shouldKeepAlive)) { - return -1; - } - if (upgrade) { - return 0; - } + if (socket.destroyed && (!statusCode || shouldKeepAlive)) return -1; + if (upgrade) return 0; assert$25(statusCode >= 100); assert$25((this.headers.length & 1) === 0); const request = client[kQueue][client[kRunningIdx]]; @@ -165463,9 +150544,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { this.connection = ""; this.headers = []; this.headersSize = 0; - if (statusCode < 200) { - return 0; - } + if (statusCode < 200) return 0; if (request.method !== "HEAD" && contentLength && bytesRead !== parseInt(contentLength, 10)) { util.destroy(socket, new ResponseContentLengthMismatchError()); return -1; @@ -165482,19 +150561,14 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } else if (socket[kReset] && client[kRunning] === 0) { util.destroy(socket, new InformationalError("reset")); return constants.ERROR.PAUSED; - } else if (client[kPipelining] == null || client[kPipelining] === 1) { - setImmediate(client[kResume]); - } else { - client[kResume](); - } + } else if (client[kPipelining] == null || client[kPipelining] === 1) setImmediate(client[kResume]); + else client[kResume](); return 0; } }; function onParserTimeout(parserWeakRef) { const parser = parserWeakRef.deref(); - if (!parser) { - return; - } + if (!parser) return; const { socket, timeoutType, client, paused } = parser; if (timeoutType === TIMEOUT_HEADERS) { if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) { @@ -165502,9 +150576,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { util.destroy(socket, new HeadersTimeoutError()); } } else if (timeoutType === TIMEOUT_BODY) { - if (!paused) { - util.destroy(socket, new BodyTimeoutError()); - } + if (!paused) util.destroy(socket, new BodyTimeoutError()); } else if (timeoutType === TIMEOUT_KEEP_ALIVE) { assert$25(client[kRunning] === 0 && client[kKeepAliveTimeoutValue]); util.destroy(socket, new InformationalError("socket idle timeout")); @@ -165517,15 +150589,9 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function connectH1(client, socket) { client[kSocket] = socket; - if (!llhttpInstance) { - llhttpInstance = lazyllhttp(); - } - if (socket.errored) { - throw socket.errored; - } - if (socket.destroyed) { - throw new SocketError("destroyed"); - } + if (!llhttpInstance) llhttpInstance = lazyllhttp(); + if (socket.errored) throw socket.errored; + if (socket.destroyed) throw new SocketError("destroyed"); socket[kNoRef] = false; socket[kWriting] = false; socket[kReset] = false; @@ -165547,9 +150613,8 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { resumeH1(client); }, destroy(err, callback) { - if (socket[kClosed]) { - queueMicrotask(callback); - } else { + if (socket[kClosed]) queueMicrotask(callback); + else { socket.on("close", callback); socket.destroy(err); } @@ -165558,19 +150623,11 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { return socket.destroyed; }, busy(request) { - if (socket[kWriting] || socket[kReset] || socket[kBlocking]) { - return true; - } + if (socket[kWriting] || socket[kReset] || socket[kBlocking]) return true; if (request) { - if (client[kRunning] > 0 && !request.idempotent) { - return true; - } - if (client[kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) { - return true; - } - if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) { - return true; - } + if (client[kRunning] > 0 && !request.idempotent) return true; + if (client[kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) return true; + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) return true; } return false; } @@ -165600,9 +150657,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { function onHttpSocketClose() { const parser = this[kParser]; if (parser) { - if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) { - parser.onMessageComplete(); - } + if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) parser.onMessageComplete(); this[kParser].destroy(); this[kParser] = null; } @@ -165646,9 +150701,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { socket[kNoRef] = false; } if (client[kSize] === 0) { - if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) { - socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE); - } + if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE); } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) { if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) { const request = client[kQueue][client[kRunningIdx]]; @@ -165671,29 +150724,17 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { let { body, headers, contentLength } = request; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH" || method === "QUERY" || method === "PROPFIND" || method === "PROPPATCH"; if (util.isFormDataLike(body)) { - if (!extractBody) { - extractBody = require_body$1().extractBody; - } + if (!extractBody) extractBody = require_body$1().extractBody; const [bodyStream, contentType] = extractBody(body); - if (request.contentType == null) { - headers.push("content-type", contentType); - } + if (request.contentType == null) headers.push("content-type", contentType); body = bodyStream.stream; contentLength = bodyStream.length; - } else if (util.isBlobLike(body) && request.contentType == null && body.type) { - headers.push("content-type", body.type); - } - if (body && typeof body.read === "function") { - body.read(0); - } + } else if (util.isBlobLike(body) && request.contentType == null && body.type) headers.push("content-type", body.type); + if (body && typeof body.read === "function") body.read(0); const bodyLength = util.bodyLength(body); contentLength = bodyLength ?? contentLength; - if (contentLength === null) { - contentLength = request.contentLength; - } - if (contentLength === 0 && !expectsPayload) { - contentLength = null; - } + if (contentLength === null) contentLength = request.contentLength; + if (contentLength === 0 && !expectsPayload) contentLength = null; if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { if (client[kStrictContentLength]) { util.errorRequest(client, request, new RequestContentLengthMismatchError()); @@ -165707,9 +150748,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {void} */ const abort = (err) => { - if (request.aborted || request.completed) { - return; - } + if (request.aborted || request.completed) return; util.errorRequest(client, request, err || new RequestAbortedError()); util.destroy(body); util.destroy(socket, new InformationalError("aborted")); @@ -165719,74 +150758,36 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } catch (err) { util.errorRequest(client, request, err); } - if (request.aborted) { - return false; - } - if (method === "HEAD") { - socket[kReset] = true; - } - if (upgrade || method === "CONNECT") { - socket[kReset] = true; - } - if (reset != null) { - socket[kReset] = reset; - } - if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) { - socket[kReset] = true; - } - if (blocking) { - socket[kBlocking] = true; - } + if (request.aborted) return false; + if (method === "HEAD") socket[kReset] = true; + if (upgrade || method === "CONNECT") socket[kReset] = true; + if (reset != null) socket[kReset] = reset; + if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) socket[kReset] = true; + if (blocking) socket[kBlocking] = true; let header = `${method} ${path} HTTP/1.1\r\n`; - if (typeof host === "string") { - header += `host: ${host}\r\n`; - } else { - header += client[kHostHeader]; - } - if (upgrade) { - header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n`; - } else if (client[kPipelining] && !socket[kReset]) { - header += "connection: keep-alive\r\n"; - } else { - header += "connection: close\r\n"; - } - if (Array.isArray(headers)) { - for (let n = 0; n < headers.length; n += 2) { - const key = headers[n + 0]; - const val = headers[n + 1]; - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - header += `${key}: ${val[i]}\r\n`; - } - } else { - header += `${key}: ${val}\r\n`; - } - } - } - if (channels.sendHeaders.hasSubscribers) { - channels.sendHeaders.publish({ - request, - headers: header, - socket - }); - } - if (!body || bodyLength === 0) { - writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload); - } else if (util.isBuffer(body)) { - writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload); - } else if (util.isBlobLike(body)) { - if (typeof body.stream === "function") { - writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload); - } else { - writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload); - } - } else if (util.isStream(body)) { - writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload); - } else if (util.isIterable(body)) { - writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload); - } else { - assert$25(false); - } + if (typeof host === "string") header += `host: ${host}\r\n`; + else header += client[kHostHeader]; + if (upgrade) header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n`; + else if (client[kPipelining] && !socket[kReset]) header += "connection: keep-alive\r\n"; + else header += "connection: close\r\n"; + if (Array.isArray(headers)) for (let n = 0; n < headers.length; n += 2) { + const key = headers[n + 0]; + const val = headers[n + 1]; + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) header += `${key}: ${val[i]}\r\n`; + else header += `${key}: ${val}\r\n`; + } + if (channels.sendHeaders.hasSubscribers) channels.sendHeaders.publish({ + request, + headers: header, + socket + }); + if (!body || bodyLength === 0) writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload); + else if (util.isBuffer(body)) writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload); + else writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isStream(body)) writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload); + else if (util.isIterable(body)) writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload); + else assert$25(false); return true; } /** @@ -165816,13 +150817,9 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {void} */ const onData = function(chunk) { - if (finished) { - return; - } + if (finished) return; try { - if (!writer.write(chunk) && this.pause) { - this.pause(); - } + if (!writer.write(chunk) && this.pause) this.pause(); } catch (err) { util.destroy(this, err); } @@ -165831,12 +150828,8 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {void} */ const onDrain = function() { - if (finished) { - return; - } - if (body.resume) { - body.resume(); - } + if (finished) return; + if (body.resume) body.resume(); }; /** * @returns {void} @@ -165855,40 +150848,26 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns */ const onFinished = function(err) { - if (finished) { - return; - } + if (finished) return; finished = true; assert$25(socket.destroyed || socket[kWriting] && client[kRunning] <= 1); socket.off("drain", onDrain).off("error", onFinished); body.removeListener("data", onData).removeListener("end", onFinished).removeListener("close", onClose); - if (!err) { - try { - writer.end(); - } catch (er) { - err = er; - } + if (!err) try { + writer.end(); + } catch (er) { + err = er; } writer.destroy(err); - if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) { - util.destroy(body, err); - } else { - util.destroy(body); - } + if (err && (err.code !== "UND_ERR_INFO" || err.message !== "reset")) util.destroy(body, err); + else util.destroy(body); }; body.on("data", onData).on("end", onFinished).on("error", onFinished).on("close", onClose); - if (body.resume) { - body.resume(); - } + if (body.resume) body.resume(); socket.on("drain", onDrain).on("error", onFinished); - if (body.errorEmitted ?? body.errored) { - setImmediate(onFinished, body.errored); - } else if (body.endEmitted ?? body.readableEnded) { - setImmediate(onFinished, null); - } - if (body.closeEmitted ?? body.closed) { - setImmediate(onClose); - } + if (body.errorEmitted ?? body.errored) setImmediate(onFinished, body.errored); + else if (body.endEmitted ?? body.readableEnded) setImmediate(onFinished, null); + if (body.closeEmitted ?? body.closed) setImmediate(onClose); } /** * @typedef AbortCallback @@ -165909,23 +150888,19 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload) { try { - if (!body) { - if (contentLength === 0) { - socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); - } else { - assert$25(contentLength === null, "no body must not have content length"); - socket.write(`${header}\r\n`, "latin1"); - } - } else if (util.isBuffer(body)) { + if (!body) if (contentLength === 0) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else { + assert$25(contentLength === null, "no body must not have content length"); + socket.write(`${header}\r\n`, "latin1"); + } + else if (util.isBuffer(body)) { assert$25(contentLength === body.byteLength, "buffer body must have content length"); socket.cork(); socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); socket.write(body); socket.uncork(); request.onBodySent(body); - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true; - } + if (!expectsPayload && request.reset !== false) socket[kReset] = true; } request.onRequestSent(); client[kResume](); @@ -165947,9 +150922,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { async function writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload) { assert$25(contentLength === body.size, "blob body must have content length"); try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError(); - } + if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); const buffer = Buffer.from(await body.arrayBuffer()); socket.cork(); socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); @@ -165957,9 +150930,7 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { socket.uncork(); request.onBodySent(buffer); request.onRequestSent(); - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true; - } + if (!expectsPayload && request.reset !== false) socket[kReset] = true; client[kResume](); } catch (err) { abort(err); @@ -165988,11 +150959,8 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } const waitForDrain = () => new Promise((resolve, reject) => { assert$25(callback === null); - if (socket[kError]) { - reject(socket[kError]); - } else { - callback = resolve; - } + if (socket[kError]) reject(socket[kError]); + else callback = resolve; }); socket.on("close", onDrain).on("drain", onDrain); const writer = new AsyncWriter({ @@ -166006,12 +150974,8 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { }); try { for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError]; - } - if (!writer.write(chunk)) { - await waitForDrain(); - } + if (socket[kError]) throw socket[kError]; + if (!writer.write(chunk)) await waitForDrain(); } writer.end(); } catch (err) { @@ -166049,45 +151013,28 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ write(chunk) { const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this; - if (socket[kError]) { - throw socket[kError]; - } - if (socket.destroyed) { - return false; - } + if (socket[kError]) throw socket[kError]; + if (socket.destroyed) return false; const len = Buffer.byteLength(chunk); - if (!len) { - return true; - } + if (!len) return true; if (contentLength !== null && bytesWritten + len > contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError(); - } + if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); process.emitWarning(new RequestContentLengthMismatchError()); } socket.cork(); if (bytesWritten === 0) { - if (!expectsPayload && request.reset !== false) { - socket[kReset] = true; - } - if (contentLength === null) { - socket.write(`${header}transfer-encoding: chunked\r\n`, "latin1"); - } else { - socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); - } - } - if (contentLength === null) { - socket.write(`\r\n${len.toString(16)}\r\n`, "latin1"); + if (!expectsPayload && request.reset !== false) socket[kReset] = true; + if (contentLength === null) socket.write(`${header}transfer-encoding: chunked\r\n`, "latin1"); + else socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, "latin1"); } + if (contentLength === null) socket.write(`\r\n${len.toString(16)}\r\n`, "latin1"); this.bytesWritten += len; const ret = socket.write(chunk); socket.uncork(); request.onBodySent(chunk); if (!ret) { if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh(); - } + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); } } return ret; @@ -166099,32 +151046,15 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this; request.onRequestSent(); socket[kWriting] = false; - if (socket[kError]) { - throw socket[kError]; - } - if (socket.destroyed) { - return; - } - if (bytesWritten === 0) { - if (expectsPayload) { - socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); - } else { - socket.write(`${header}\r\n`, "latin1"); - } - } else if (contentLength === null) { - socket.write("\r\n0\r\n\r\n", "latin1"); - } - if (contentLength !== null && bytesWritten !== contentLength) { - if (client[kStrictContentLength]) { - throw new RequestContentLengthMismatchError(); - } else { - process.emitWarning(new RequestContentLengthMismatchError()); - } - } + if (socket[kError]) throw socket[kError]; + if (socket.destroyed) return; + if (bytesWritten === 0) if (expectsPayload) socket.write(`${header}content-length: 0\r\n\r\n`, "latin1"); + else socket.write(`${header}\r\n`, "latin1"); + else if (contentLength === null) socket.write("\r\n0\r\n\r\n", "latin1"); + if (contentLength !== null && bytesWritten !== contentLength) if (client[kStrictContentLength]) throw new RequestContentLengthMismatchError(); + else process.emitWarning(new RequestContentLengthMismatchError()); if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) { - if (socket[kParser].timeout.refresh) { - socket[kParser].timeout.refresh(); - } + if (socket[kParser].timeout.refresh) socket[kParser].timeout.refresh(); } client[kResume](); } @@ -166143,7 +151073,6 @@ var require_client_h1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; module.exports = connectH1; })); - //#endregion //#region ../node_modules/undici/lib/dispatcher/client-h2.js var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -166165,15 +151094,8 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { const { constants: { HTTP2_HEADER_AUTHORITY, HTTP2_HEADER_METHOD, HTTP2_HEADER_PATH, HTTP2_HEADER_SCHEME, HTTP2_HEADER_CONTENT_LENGTH, HTTP2_HEADER_EXPECT, HTTP2_HEADER_STATUS, HTTP2_HEADER_PROTOCOL, NGHTTP2_REFUSED_STREAM, NGHTTP2_CANCEL } } = http2; function parseH2Headers(headers) { const result = []; - for (const [name, value] of Object.entries(headers)) { - if (Array.isArray(value)) { - for (const subvalue of value) { - result.push(Buffer.from(name), Buffer.from(subvalue)); - } - } else { - result.push(Buffer.from(name), Buffer.from(value)); - } - } + for (const [name, value] of Object.entries(headers)) if (Array.isArray(value)) for (const subvalue of value) result.push(Buffer.from(name), Buffer.from(subvalue)); + else result.push(Buffer.from(name), Buffer.from(value)); return result; } function connectH2(client, socket) { @@ -166195,9 +151117,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { session[kHTTP2SessionState] = { ping: { interval: client[kPingInterval] === 0 ? null : setInterval(onHttp2SendPing, client[kPingInterval], session).unref() } }; session[kEnableConnectProtocol] = false; session[kRemoteSettings] = false; - if (http2ConnectionWindowSize) { - util.addListener(session, "connect", applyConnectionWindowSize.bind(session, http2ConnectionWindowSize)); - } + if (http2ConnectionWindowSize) util.addListener(session, "connect", applyConnectionWindowSize.bind(session, http2ConnectionWindowSize)); util.addListener(session, "error", onHttp2SessionError); util.addListener(session, "frameError", onHttp2FrameError); util.addListener(session, "end", onHttp2SessionEnd); @@ -166222,46 +151142,35 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { resumeH2(client); }, destroy(err, callback) { - if (socket[kClosed]) { - queueMicrotask(callback); - } else { - socket.destroy(err).on("close", callback); - } + if (socket[kClosed]) queueMicrotask(callback); + else socket.destroy(err).on("close", callback); }, get destroyed() { return socket.destroyed; }, busy(request) { - if (request != null) { - if (client[kRunning] > 0) { - if (request.idempotent === false) return true; - if ((request.upgrade === "websocket" || request.method === "CONNECT") && session[kRemoteSettings] === false) return true; - if (util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) return true; - } else { - return (request.upgrade === "websocket" || request.method === "CONNECT") && session[kRemoteSettings] === false; - } - } + if (request != null) if (client[kRunning] > 0) { + if (request.idempotent === false) return true; + if ((request.upgrade === "websocket" || request.method === "CONNECT") && session[kRemoteSettings] === false) return true; + if (util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) return true; + } else return (request.upgrade === "websocket" || request.method === "CONNECT") && session[kRemoteSettings] === false; return false; } }; } function resumeH2(client) { const socket = client[kSocket]; - if (socket?.destroyed === false) { - if (client[kSize] === 0 || client[kMaxConcurrentStreams] === 0) { - socket.unref(); - client[kHTTP2Session].unref(); - } else { - socket.ref(); - client[kHTTP2Session].ref(); - } + if (socket?.destroyed === false) if (client[kSize] === 0 || client[kMaxConcurrentStreams] === 0) { + socket.unref(); + client[kHTTP2Session].unref(); + } else { + socket.ref(); + client[kHTTP2Session].ref(); } } function applyConnectionWindowSize(connectionWindowSize) { try { - if (typeof this.setLocalWindowSize === "function") { - this.setLocalWindowSize(connectionWindowSize); - } + if (typeof this.setLocalWindowSize === "function") this.setLocalWindowSize(connectionWindowSize); } catch {} } function onHttp2RemoteSettings(settings) { @@ -166296,9 +151205,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { const error = new InformationalError(`HTTP/2: "PING" errored - type ${err.message}`); socket[kError] = error; client[kOnError](error); - } else { - client.emit("ping", duration); - } + } else client.emit("ping", duration); } } function onHttp2SessionError(err) { @@ -166369,9 +151276,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { const client = this[kHTTP2Session][kClient]; client[kSocket] = null; client[kHTTPContext] = null; - if (this[kHTTP2Session] !== null) { - this[kHTTP2Session].destroy(err); - } + if (this[kHTTP2Session] !== null) this[kHTTP2Session].destroy(err); client[kPendingIdx] = client[kRunningIdx]; assert$24(client[kRunning] === 0); client.emit("disconnect", client[kUrl], [client], err); @@ -166405,26 +151310,14 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { const key = reqHeaders[n + 0]; const val = reqHeaders[n + 1]; if (key === "cookie") { - if (headers[key] != null) { - headers[key] = Array.isArray(headers[key]) ? (headers[key].push(val), headers[key]) : [headers[key], val]; - } else { - headers[key] = val; - } + if (headers[key] != null) headers[key] = Array.isArray(headers[key]) ? (headers[key].push(val), headers[key]) : [headers[key], val]; + else headers[key] = val; continue; } - if (Array.isArray(val)) { - for (let i = 0; i < val.length; i++) { - if (headers[key]) { - headers[key] += `, ${val[i]}`; - } else { - headers[key] = val[i]; - } - } - } else if (headers[key]) { - headers[key] += `, ${val}`; - } else { - headers[key] = val; - } + if (Array.isArray(val)) for (let i = 0; i < val.length; i++) if (headers[key]) headers[key] += `, ${val[i]}`; + else headers[key] = val[i]; + else if (headers[key]) headers[key] += `, ${val}`; + else headers[key] = val; } /** @type {import('node:http2').ClientHttp2Stream} */ let stream = null; @@ -166432,9 +151325,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { headers[HTTP2_HEADER_AUTHORITY] = host || `${hostname}${port ? `:${port}` : ""}`; headers[HTTP2_HEADER_METHOD] = method; const abort = (err) => { - if (request.aborted || request.completed) { - return; - } + if (request.aborted || request.completed) return; err = err || new RequestAbortedError(); util.errorRequest(client, request, err); if (stream != null) { @@ -166450,9 +151341,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } catch (err) { util.errorRequest(client, request, err); } - if (request.aborted) { - return false; - } + if (request.aborted) return false; if (upgrade || method === "CONNECT") { session.ref(); if (upgrade === "websocket") { @@ -166464,11 +151353,8 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { headers[HTTP2_HEADER_METHOD] = "CONNECT"; headers[HTTP2_HEADER_PROTOCOL] = "websocket"; headers[HTTP2_HEADER_PATH] = path; - if (protocol === "ws:" || protocol === "wss:") { - headers[HTTP2_HEADER_SCHEME] = protocol === "ws:" ? "http" : "https"; - } else { - headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https"; - } + if (protocol === "ws:" || protocol === "wss:") headers[HTTP2_HEADER_SCHEME] = protocol === "ws:" ? "http" : "https"; + else headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https"; stream = session.request(headers, { endStream: false, signal @@ -166481,9 +151367,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { client[kQueue][client[kRunningIdx]++] = null; }); stream.on("error", () => { - if (stream.rstCode === NGHTTP2_REFUSED_STREAM || stream.rstCode === NGHTTP2_CANCEL) { - abort(new InformationalError(`HTTP/2: "stream error" received - code ${stream.rstCode}`)); - } + if (stream.rstCode === NGHTTP2_REFUSED_STREAM || stream.rstCode === NGHTTP2_CANCEL) abort(new InformationalError(`HTTP/2: "stream error" received - code ${stream.rstCode}`)); }); stream.once("close", () => { session[kOpenStreams] -= 1; @@ -166513,9 +151397,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { headers[HTTP2_HEADER_PATH] = path; headers[HTTP2_HEADER_SCHEME] = protocol === "http:" ? "http" : "https"; const expectsPayload = method === "PUT" || method === "POST" || method === "PATCH"; - if (body && typeof body.read === "function") { - body.read(0); - } + if (body && typeof body.read === "function") body.read(0); let contentLength = util.bodyLength(body); if (util.isFormDataLike(body)) { extractBody ??= require_body$1().extractBody; @@ -166524,12 +151406,8 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { body = bodyStream.stream; contentLength = bodyStream.length; } - if (contentLength == null) { - contentLength = request.contentLength; - } - if (!expectsPayload) { - contentLength = null; - } + if (contentLength == null) contentLength = request.contentLength; + if (!expectsPayload) contentLength = null; if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { if (client[kStrictContentLength]) { util.errorRequest(client, request, new RequestContentLengthMismatchError()); @@ -166544,9 +151422,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { session.ref(); if (channels.sendHeaders.hasSubscribers) { let header = ""; - for (const key in headers) { - header += `${key}: ${headers[key]}\r\n`; - } + for (const key in headers) header += `${key}: ${headers[key]}\r\n`; channels.sendHeaders.publish({ request, headers: header, @@ -166581,21 +151457,15 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { stream.removeAllListeners("data"); return; } - if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), "") === false) { - stream.pause(); - } + if (request.onHeaders(Number(statusCode), parseH2Headers(realHeaders), stream.resume.bind(stream), "") === false) stream.pause(); }); stream.on("data", (chunk) => { - if (request.onData(chunk) === false) { - stream.pause(); - } + if (request.onData(chunk) === false) stream.pause(); }); stream.once("end", () => { stream.removeAllListeners("data"); if (responseReceived) { - if (!request.aborted && !request.completed) { - request.onComplete({}); - } + if (!request.aborted && !request.completed) request.onComplete({}); client[kQueue][client[kRunningIdx]++] = null; client[kResume](); } else { @@ -166608,9 +151478,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { stream.once("close", () => { stream.removeAllListeners("data"); session[kOpenStreams] -= 1; - if (session[kOpenStreams] === 0) { - session.unref(); - } + if (session[kOpenStreams] === 0) session.unref(); }); stream.once("error", function(err) { stream.removeAllListeners("data"); @@ -166627,36 +151495,22 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { const err = new InformationalError(`HTTP/2: "stream timeout after ${requestTimeout}"`); stream.removeAllListeners("data"); session[kOpenStreams] -= 1; - if (session[kOpenStreams] === 0) { - session.unref(); - } + if (session[kOpenStreams] === 0) session.unref(); abort(err); }); stream.once("trailers", (trailers) => { - if (request.aborted || request.completed) { - return; - } + if (request.aborted || request.completed) return; request.onComplete(trailers); }); return true; function writeBodyH2() { - if (!body || contentLength === 0) { - writeBuffer(abort, stream, null, client, request, client[kSocket], contentLength, expectsPayload); - } else if (util.isBuffer(body)) { - writeBuffer(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); - } else if (util.isBlobLike(body)) { - if (typeof body.stream === "function") { - writeIterable(abort, stream, body.stream(), client, request, client[kSocket], contentLength, expectsPayload); - } else { - writeBlob(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); - } - } else if (util.isStream(body)) { - writeStream(abort, client[kSocket], expectsPayload, stream, body, client, request, contentLength); - } else if (util.isIterable(body)) { - writeIterable(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); - } else { - assert$24(false); - } + if (!body || contentLength === 0) writeBuffer(abort, stream, null, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isBuffer(body)) writeBuffer(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isBlobLike(body)) if (typeof body.stream === "function") writeIterable(abort, stream, body.stream(), client, request, client[kSocket], contentLength, expectsPayload); + else writeBlob(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else if (util.isStream(body)) writeStream(abort, client[kSocket], expectsPayload, stream, body, client, request, contentLength); + else if (util.isIterable(body)) writeIterable(abort, stream, body, client, request, client[kSocket], contentLength, expectsPayload); + else assert$24(false); } } function writeBuffer(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { @@ -166669,9 +151523,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { h2stream.end(); request.onBodySent(body); } - if (!expectsPayload) { - socket[kReset] = true; - } + if (!expectsPayload) socket[kReset] = true; request.onRequestSent(); client[kResume](); } catch (error) { @@ -166687,9 +151539,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } else { util.removeAllListeners(pipe); request.onRequestSent(); - if (!expectsPayload) { - socket[kReset] = true; - } + if (!expectsPayload) socket[kReset] = true; client[kResume](); } }); @@ -166701,9 +151551,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { async function writeBlob(abort, h2stream, body, client, request, socket, contentLength, expectsPayload) { assert$24(contentLength === body.size, "blob body must have content length"); try { - if (contentLength != null && contentLength !== body.size) { - throw new RequestContentLengthMismatchError(); - } + if (contentLength != null && contentLength !== body.size) throw new RequestContentLengthMismatchError(); const buffer = Buffer.from(await body.arrayBuffer()); h2stream.cork(); h2stream.write(buffer); @@ -166711,9 +151559,7 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { h2stream.end(); request.onBodySent(buffer); request.onRequestSent(); - if (!expectsPayload) { - socket[kReset] = true; - } + if (!expectsPayload) socket[kReset] = true; client[kResume](); } catch (err) { abort(err); @@ -166731,29 +151577,20 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } const waitForDrain = () => new Promise((resolve, reject) => { assert$24(callback === null); - if (socket[kError]) { - reject(socket[kError]); - } else { - callback = resolve; - } + if (socket[kError]) reject(socket[kError]); + else callback = resolve; }); h2stream.on("close", onDrain).on("drain", onDrain); try { for await (const chunk of body) { - if (socket[kError]) { - throw socket[kError]; - } + if (socket[kError]) throw socket[kError]; const res = h2stream.write(chunk); request.onBodySent(chunk); - if (!res) { - await waitForDrain(); - } + if (!res) await waitForDrain(); } h2stream.end(); request.onRequestSent(); - if (!expectsPayload) { - socket[kReset] = true; - } + if (!expectsPayload) socket[kReset] = true; client[kResume](); } catch (err) { abort(err); @@ -166763,7 +151600,6 @@ var require_client_h2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } module.exports = connectH2; })); - //#endregion //#region ../node_modules/undici/lib/dispatcher/client.js var require_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -166798,98 +151634,46 @@ var require_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {import('../../types/client.js').Client.Options} options */ constructor(url, { maxHeaderSize, headersTimeout, socketTimeout, requestTimeout, connectTimeout, bodyTimeout, idleTimeout, keepAlive, keepAliveTimeout, maxKeepAliveTimeout, keepAliveMaxTimeout, keepAliveTimeoutThreshold, socketPath, pipelining, tls, strictContentLength, maxCachedSessions, connect, maxRequestsPerClient, localAddress, maxResponseSize, autoSelectFamily, autoSelectFamilyAttemptTimeout, maxConcurrentStreams, allowH2, useH2c, initialWindowSize, connectionWindowSize, pingInterval } = {}) { - if (keepAlive !== undefined) { - throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); - } - if (socketTimeout !== undefined) { - throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); - } - if (requestTimeout !== undefined) { - throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); - } - if (idleTimeout !== undefined) { - throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); - } - if (maxKeepAliveTimeout !== undefined) { - throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); - } + if (keepAlive !== void 0) throw new InvalidArgumentError("unsupported keepAlive, use pipelining=0 instead"); + if (socketTimeout !== void 0) throw new InvalidArgumentError("unsupported socketTimeout, use headersTimeout & bodyTimeout instead"); + if (requestTimeout !== void 0) throw new InvalidArgumentError("unsupported requestTimeout, use headersTimeout & bodyTimeout instead"); + if (idleTimeout !== void 0) throw new InvalidArgumentError("unsupported idleTimeout, use keepAliveTimeout instead"); + if (maxKeepAliveTimeout !== void 0) throw new InvalidArgumentError("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead"); if (maxHeaderSize != null) { - if (!Number.isInteger(maxHeaderSize) || maxHeaderSize < 1) { - throw new InvalidArgumentError("invalid maxHeaderSize"); - } - } else { - maxHeaderSize = getDefaultNodeMaxHeaderSize(); - } - if (socketPath != null && typeof socketPath !== "string") { - throw new InvalidArgumentError("invalid socketPath"); - } - if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) { - throw new InvalidArgumentError("invalid connectTimeout"); - } - if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) { - throw new InvalidArgumentError("invalid keepAliveTimeout"); - } - if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) { - throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); - } - if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) { - throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); - } - if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) { - throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); - } - if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) { - throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); - } - if (connect != null && typeof connect !== "function" && typeof connect !== "object") { - throw new InvalidArgumentError("connect must be a function or an object"); - } - if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) { - throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); - } - if (localAddress != null && (typeof localAddress !== "string" || net$1.isIP(localAddress) === 0)) { - throw new InvalidArgumentError("localAddress must be valid string IP address"); - } - if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) { - throw new InvalidArgumentError("maxResponseSize must be a positive number"); - } - if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) { - throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); - } - if (allowH2 != null && typeof allowH2 !== "boolean") { - throw new InvalidArgumentError("allowH2 must be a valid boolean value"); - } - if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) { - throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0"); - } - if (useH2c != null && typeof useH2c !== "boolean") { - throw new InvalidArgumentError("useH2c must be a valid boolean value"); - } - if (initialWindowSize != null && (!Number.isInteger(initialWindowSize) || initialWindowSize < 1)) { - throw new InvalidArgumentError("initialWindowSize must be a positive integer, greater than 0"); - } - if (connectionWindowSize != null && (!Number.isInteger(connectionWindowSize) || connectionWindowSize < 1)) { - throw new InvalidArgumentError("connectionWindowSize must be a positive integer, greater than 0"); - } - if (pingInterval != null && (typeof pingInterval !== "number" || !Number.isInteger(pingInterval) || pingInterval < 0)) { - throw new InvalidArgumentError("pingInterval must be a positive integer, greater or equal to 0"); - } + if (!Number.isInteger(maxHeaderSize) || maxHeaderSize < 1) throw new InvalidArgumentError("invalid maxHeaderSize"); + } else maxHeaderSize = getDefaultNodeMaxHeaderSize(); + if (socketPath != null && typeof socketPath !== "string") throw new InvalidArgumentError("invalid socketPath"); + if (connectTimeout != null && (!Number.isFinite(connectTimeout) || connectTimeout < 0)) throw new InvalidArgumentError("invalid connectTimeout"); + if (keepAliveTimeout != null && (!Number.isFinite(keepAliveTimeout) || keepAliveTimeout <= 0)) throw new InvalidArgumentError("invalid keepAliveTimeout"); + if (keepAliveMaxTimeout != null && (!Number.isFinite(keepAliveMaxTimeout) || keepAliveMaxTimeout <= 0)) throw new InvalidArgumentError("invalid keepAliveMaxTimeout"); + if (keepAliveTimeoutThreshold != null && !Number.isFinite(keepAliveTimeoutThreshold)) throw new InvalidArgumentError("invalid keepAliveTimeoutThreshold"); + if (headersTimeout != null && (!Number.isInteger(headersTimeout) || headersTimeout < 0)) throw new InvalidArgumentError("headersTimeout must be a positive integer or zero"); + if (bodyTimeout != null && (!Number.isInteger(bodyTimeout) || bodyTimeout < 0)) throw new InvalidArgumentError("bodyTimeout must be a positive integer or zero"); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (maxRequestsPerClient != null && (!Number.isInteger(maxRequestsPerClient) || maxRequestsPerClient < 0)) throw new InvalidArgumentError("maxRequestsPerClient must be a positive number"); + if (localAddress != null && (typeof localAddress !== "string" || net$1.isIP(localAddress) === 0)) throw new InvalidArgumentError("localAddress must be valid string IP address"); + if (maxResponseSize != null && (!Number.isInteger(maxResponseSize) || maxResponseSize < -1)) throw new InvalidArgumentError("maxResponseSize must be a positive number"); + if (autoSelectFamilyAttemptTimeout != null && (!Number.isInteger(autoSelectFamilyAttemptTimeout) || autoSelectFamilyAttemptTimeout < -1)) throw new InvalidArgumentError("autoSelectFamilyAttemptTimeout must be a positive number"); + if (allowH2 != null && typeof allowH2 !== "boolean") throw new InvalidArgumentError("allowH2 must be a valid boolean value"); + if (maxConcurrentStreams != null && (typeof maxConcurrentStreams !== "number" || maxConcurrentStreams < 1)) throw new InvalidArgumentError("maxConcurrentStreams must be a positive integer, greater than 0"); + if (useH2c != null && typeof useH2c !== "boolean") throw new InvalidArgumentError("useH2c must be a valid boolean value"); + if (initialWindowSize != null && (!Number.isInteger(initialWindowSize) || initialWindowSize < 1)) throw new InvalidArgumentError("initialWindowSize must be a positive integer, greater than 0"); + if (connectionWindowSize != null && (!Number.isInteger(connectionWindowSize) || connectionWindowSize < 1)) throw new InvalidArgumentError("connectionWindowSize must be a positive integer, greater than 0"); + if (pingInterval != null && (typeof pingInterval !== "number" || !Number.isInteger(pingInterval) || pingInterval < 0)) throw new InvalidArgumentError("pingInterval must be a positive integer, greater or equal to 0"); super(); - if (typeof connect !== "function") { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - useH2c, - socketPath, - timeout: connectTimeout, - ...typeof autoSelectFamily === "boolean" ? { - autoSelectFamily, - autoSelectFamilyAttemptTimeout - } : undefined, - ...connect - }); - } + if (typeof connect !== "function") connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + useH2c, + socketPath, + timeout: connectTimeout, + ...typeof autoSelectFamily === "boolean" ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect + }); this[kUrl] = util.parseOrigin(url); this[kConnector] = connect; this[kPipelining] = pipelining != null ? pipelining : 1; @@ -166955,21 +151739,14 @@ var require_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { if (this[kResuming]) {} else if (util.bodyLength(request.body) == null && util.isIterable(request.body)) { this[kResuming] = 1; queueMicrotask(() => resume(this)); - } else { - this[kResume](true); - } - if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) { - this[kNeedDrain] = 2; - } + } else this[kResume](true); + if (this[kResuming] && this[kNeedDrain] !== 2 && this[kBusy]) this[kNeedDrain] = 2; return this[kNeedDrain] < 2; } [kClose]() { return new Promise((resolve) => { - if (this[kSize]) { - this[kClosedResolve] = resolve; - } else { - resolve(null); - } + if (this[kSize]) this[kClosedResolve] = resolve; + else resolve(null); }); } [kDestroy](err) { @@ -166989,9 +151766,7 @@ var require_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { if (this[kHTTPContext]) { this[kHTTPContext].destroy(err, callback); this[kHTTPContext] = null; - } else { - queueMicrotask(callback); - } + } else queueMicrotask(callback); this[kResume](); }); } @@ -167023,20 +151798,18 @@ var require_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { hostname = ip; } client[kConnecting] = true; - if (channels.beforeConnect.hasSubscribers) { - channels.beforeConnect.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector] - }); - } + if (channels.beforeConnect.hasSubscribers) channels.beforeConnect.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector] + }); client[kConnector]({ host, hostname, @@ -167079,32 +151852,7 @@ var require_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { socket[kMaxRequests] = client[kMaxRequests]; socket[kClient] = client; socket[kError] = null; - if (channels.connected.hasSubscribers) { - channels.connected.publish({ - connectParams: { - host, - hostname, - protocol, - port, - version: client[kHTTPContext]?.version, - servername: client[kServerName], - localAddress: client[kLocalAddress] - }, - connector: client[kConnector], - socket - }); - } - client.emit("connect", client[kUrl], [client]); - client[kResume](); - }); - } - function handleConnectError(client, err, { host, hostname, protocol, port }) { - if (client.destroyed) { - return; - } - client[kConnecting] = false; - if (channels.connectError.hasSubscribers) { - channels.connectError.publish({ + if (channels.connected.hasSubscribers) channels.connected.publish({ connectParams: { host, hostname, @@ -167115,18 +151863,35 @@ var require_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { localAddress: client[kLocalAddress] }, connector: client[kConnector], - error: err + socket }); - } + client.emit("connect", client[kUrl], [client]); + client[kResume](); + }); + } + function handleConnectError(client, err, { host, hostname, protocol, port }) { + if (client.destroyed) return; + client[kConnecting] = false; + if (channels.connectError.hasSubscribers) channels.connectError.publish({ + connectParams: { + host, + hostname, + protocol, + port, + version: client[kHTTPContext]?.version, + servername: client[kServerName], + localAddress: client[kLocalAddress] + }, + connector: client[kConnector], + error: err + }); if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { assert$23(client[kRunning] === 0); while (client[kPending] > 0 && client[kQueue][client[kPendingIdx]].servername === client[kServerName]) { const request = client[kQueue][client[kPendingIdx]++]; util.errorRequest(client, request, err); } - } else { - onError(client, err); - } + } else onError(client, err); client.emit("connectionError", client[kUrl], [client], err); } function emitDrain(client) { @@ -167134,9 +151899,7 @@ var require_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { client.emit("drain", client[kUrl], [client]); } function resume(client, sync) { - if (client[kResuming] === 2) { - return; - } + if (client[kResuming] === 2) return; client[kResuming] = 2; _resume(client, sync); client[kResuming] = 0; @@ -167157,60 +151920,39 @@ var require_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { client[kClosedResolve] = null; return; } - if (client[kHTTPContext]) { - client[kHTTPContext].resume(); - } - if (client[kBusy]) { - client[kNeedDrain] = 2; - } else if (client[kNeedDrain] === 2) { + if (client[kHTTPContext]) client[kHTTPContext].resume(); + if (client[kBusy]) client[kNeedDrain] = 2; + else if (client[kNeedDrain] === 2) { if (sync) { client[kNeedDrain] = 1; queueMicrotask(() => emitDrain(client)); - } else { - emitDrain(client); - } + } else emitDrain(client); continue; } - if (client[kPending] === 0) { - return; - } - if (client[kRunning] >= (getPipelining(client) || 1)) { - return; - } + if (client[kPending] === 0) return; + if (client[kRunning] >= (getPipelining(client) || 1)) return; const request = client[kQueue][client[kPendingIdx]]; if (client[kUrl].protocol === "https:" && client[kServerName] !== request.servername) { - if (client[kRunning] > 0) { - return; - } + if (client[kRunning] > 0) return; client[kServerName] = request.servername; client[kHTTPContext]?.destroy(new InformationalError("servername changed"), () => { client[kHTTPContext] = null; resume(client); }); } - if (client[kConnecting]) { - return; - } + if (client[kConnecting]) return; if (!client[kHTTPContext]) { connect(client); return; } - if (client[kHTTPContext].destroyed) { - return; - } - if (client[kHTTPContext].busy(request)) { - return; - } - if (!request.aborted && client[kHTTPContext].write(request)) { - client[kPendingIdx]++; - } else { - client[kQueue].splice(client[kPendingIdx], 1); - } + if (client[kHTTPContext].destroyed) return; + if (client[kHTTPContext].busy(request)) return; + if (!request.aborted && client[kHTTPContext].write(request)) client[kPendingIdx]++; + else client[kQueue].splice(client[kPendingIdx], 1); } } module.exports = Client; })); - //#endregion //#region ../node_modules/undici/lib/dispatcher/fixed-queue.js var require_fixed_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -167226,7 +151968,7 @@ var require_fixed_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => { /** @type {number} */ top = 0; /** @type {Array} */ - list = new Array(kSize).fill(undefined); + list = new Array(kSize).fill(void 0); /** @type {T|null} */ next = null; /** @returns {boolean} */ @@ -167248,10 +151990,8 @@ var require_fixed_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => { /** @returns {T|null} */ shift() { const nextItem = this.list[this.bottom]; - if (nextItem === undefined) { - return null; - } - this.list[this.bottom] = undefined; + if (nextItem === void 0) return null; + this.list[this.bottom] = void 0; this.bottom = this.bottom + 1 & kMask; return nextItem; } @@ -167270,9 +152010,7 @@ var require_fixed_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => { } /** @param {T} data */ push(data) { - if (this.head.isFull()) { - this.head = this.head.next = new FixedCircularBuffer(); - } + if (this.head.isFull()) this.head = this.head.next = new FixedCircularBuffer(); this.head.push(data); } /** @returns {T|null} */ @@ -167287,7 +152025,6 @@ var require_fixed_queue = /* @__PURE__ */ __commonJSMin(((exports, module) => { } }; })); - //#endregion //#region ../node_modules/undici/lib/dispatcher/pool-base.js var require_pool_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -167316,9 +152053,7 @@ var require_pool_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { let needDrain = false; while (!needDrain) { const item = queue.shift(); - if (!item) { - break; - } + if (!item) break; this[kQueued]--; needDrain = !client.dispatch(item.opts, item.handler); } @@ -167331,9 +152066,7 @@ var require_pool_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { const closeAll = []; for (let i = 0; i < this[kClients].length; i++) { const client = this[kClients][i]; - if (!client.destroyed) { - closeAll.push(client.close()); - } + if (!client.destroyed) closeAll.push(client.close()); } return Promise.all(closeAll).then(this[kClosedResolve]); } @@ -167352,37 +152085,27 @@ var require_pool_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { } get [kConnected]() { let ret = 0; - for (const { [kConnected]: connected } of this[kClients]) { - ret += connected; - } + for (const { [kConnected]: connected } of this[kClients]) ret += connected; return ret; } get [kFree]() { let ret = 0; - for (const { [kConnected]: connected, [kNeedDrain]: needDrain } of this[kClients]) { - ret += connected && !needDrain; - } + for (const { [kConnected]: connected, [kNeedDrain]: needDrain } of this[kClients]) ret += connected && !needDrain; return ret; } get [kPending]() { let ret = this[kQueued]; - for (const { [kPending]: pending } of this[kClients]) { - ret += pending; - } + for (const { [kPending]: pending } of this[kClients]) ret += pending; return ret; } get [kRunning]() { let ret = 0; - for (const { [kRunning]: running } of this[kClients]) { - ret += running; - } + for (const { [kRunning]: running } of this[kClients]) ret += running; return ret; } get [kSize]() { let ret = this[kQueued]; - for (const { [kSize]: size } of this[kClients]) { - ret += size; - } + for (const { [kSize]: size } of this[kClients]) ret += size; return ret; } get stats() { @@ -167393,29 +152116,21 @@ var require_pool_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { const closeAll = []; for (let i = 0; i < this[kClients].length; i++) { const client = this[kClients][i]; - if (!client.destroyed) { - closeAll.push(client.close()); - } + if (!client.destroyed) closeAll.push(client.close()); } return Promise.all(closeAll); - } else { - return new Promise((resolve) => { - this[kClosedResolve] = resolve; - }); - } + } else return new Promise((resolve) => { + this[kClosedResolve] = resolve; + }); } [kDestroy](err) { while (true) { const item = this[kQueue].shift(); - if (!item) { - break; - } + if (!item) break; item.handler.onError(err); } const destroyAll = new Array(this[kClients].length); - for (let i = 0; i < this[kClients].length; i++) { - destroyAll[i] = this[kClients][i].destroy(err); - } + for (let i = 0; i < this[kClients].length; i++) destroyAll[i] = this[kClients][i].destroy(err); return Promise.all(destroyAll); } [kDispatch](opts, handler) { @@ -167436,21 +152151,15 @@ var require_pool_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { [kAddClient](client) { client.on("drain", this[kOnDrain].bind(this, client)).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); this[kClients].push(client); - if (this[kNeedDrain]) { - queueMicrotask(() => { - if (this[kNeedDrain]) { - this[kOnDrain](client, client[kUrl], [client, this]); - } - }); - } + if (this[kNeedDrain]) queueMicrotask(() => { + if (this[kNeedDrain]) this[kOnDrain](client, client[kUrl], [client, this]); + }); return this; } [kRemoveClient](client) { client.close(() => { const idx = this[kClients].indexOf(client); - if (idx !== -1) { - this[kClients].splice(idx, 1); - } + if (idx !== -1) this[kClients].splice(idx, 1); }); this[kNeedDrain] = this[kClients].some((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); } @@ -167464,7 +152173,6 @@ var require_pool_base = /* @__PURE__ */ __commonJSMin(((exports, module) => { kGetDispatcher }; })); - //#endregion //#region ../node_modules/undici/lib/dispatcher/pool.js var require_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -167482,29 +152190,21 @@ var require_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { } var Pool = class extends PoolBase { constructor(origin, { connections, factory = defaultFactory, connect, connectTimeout, tls, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2, clientTtl, ...options } = {}) { - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError("invalid connections"); - } - if (typeof factory !== "function") { - throw new InvalidArgumentError("factory must be a function."); - } - if (connect != null && typeof connect !== "function" && typeof connect !== "object") { - throw new InvalidArgumentError("connect must be a function or an object"); - } - if (typeof connect !== "function") { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...typeof autoSelectFamily === "boolean" ? { - autoSelectFamily, - autoSelectFamilyAttemptTimeout - } : undefined, - ...connect - }); - } + if (connections != null && (!Number.isFinite(connections) || connections < 0)) throw new InvalidArgumentError("invalid connections"); + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (typeof connect !== "function") connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...typeof autoSelectFamily === "boolean" ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect + }); super(); this[kConnections] = connections || null; this[kUrl] = util.parseOrigin(origin); @@ -167514,33 +152214,22 @@ var require_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { allowH2, clientTtl }; - this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : undefined; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kFactory] = factory; this.on("connect", (origin, targets) => { - if (clientTtl != null && clientTtl > 0) { - for (const target of targets) { - Object.assign(target, { ttl: Date.now() }); - } - } + if (clientTtl != null && clientTtl > 0) for (const target of targets) Object.assign(target, { ttl: Date.now() }); }); this.on("connectionError", (origin, targets, error) => { for (const target of targets) { const idx = this[kClients].indexOf(target); - if (idx !== -1) { - this[kClients].splice(idx, 1); - } + if (idx !== -1) this[kClients].splice(idx, 1); } }); } [kGetDispatcher]() { const clientTtlOption = this[kOptions].clientTtl; - for (const client of this[kClients]) { - if (clientTtlOption != null && clientTtlOption > 0 && client.ttl && Date.now() - client.ttl > clientTtlOption) { - this[kRemoveClient](client); - } else if (!client[kNeedDrain]) { - return client; - } - } + for (const client of this[kClients]) if (clientTtlOption != null && clientTtlOption > 0 && client.ttl && Date.now() - client.ttl > clientTtlOption) this[kRemoveClient](client); + else if (!client[kNeedDrain]) return client; if (!this[kConnections] || this[kClients].length < this[kConnections]) { const dispatcher = this[kFactory](this[kUrl], this[kOptions]); this[kAddClient](dispatcher); @@ -167550,7 +152239,6 @@ var require_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; module.exports = Pool; })); - //#endregion //#region ../node_modules/undici/lib/dispatcher/balanced-pool.js var require_balanced_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -167589,29 +152277,21 @@ var require_balanced_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => } var BalancedPool = class extends PoolBase { constructor(upstreams = [], { factory = defaultFactory, ...opts } = {}) { - if (typeof factory !== "function") { - throw new InvalidArgumentError("factory must be a function."); - } + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); super(); this[kOptions] = opts; this[kIndex] = -1; this[kCurrentWeight] = 0; this[kMaxWeightPerServer] = this[kOptions].maxWeightPerServer || 100; this[kErrorPenalty] = this[kOptions].errorPenalty || 15; - if (!Array.isArray(upstreams)) { - upstreams = [upstreams]; - } + if (!Array.isArray(upstreams)) upstreams = [upstreams]; this[kFactory] = factory; - for (const upstream of upstreams) { - this.addUpstream(upstream); - } + for (const upstream of upstreams) this.addUpstream(upstream); this._updateBalancedPoolStats(); } addUpstream(upstream) { const upstreamOrigin = parseOrigin(upstream).origin; - if (this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true)) { - return this; - } + if (this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true)) return this; const pool = this[kFactory](upstreamOrigin, Object.assign({}, this[kOptions])); this[kAddClient](pool); pool.on("connect", () => { @@ -167628,25 +152308,19 @@ var require_balanced_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => this._updateBalancedPoolStats(); } }); - for (const client of this[kClients]) { - client[kWeight] = this[kMaxWeightPerServer]; - } + for (const client of this[kClients]) client[kWeight] = this[kMaxWeightPerServer]; this._updateBalancedPoolStats(); return this; } _updateBalancedPoolStats() { let result = 0; - for (let i = 0; i < this[kClients].length; i++) { - result = getGreatestCommonDivisor(this[kClients][i][kWeight], result); - } + for (let i = 0; i < this[kClients].length; i++) result = getGreatestCommonDivisor(this[kClients][i][kWeight], result); this[kGreatestCommonDivisor] = result; } removeUpstream(upstream) { const upstreamOrigin = parseOrigin(upstream).origin; const pool = this[kClients].find((pool) => pool[kUrl].origin === upstreamOrigin && pool.closed !== true && pool.destroyed !== true); - if (pool) { - this[kRemoveClient](pool); - } + if (pool) this[kRemoveClient](pool); return this; } getUpstream(upstream) { @@ -167657,34 +152331,20 @@ var require_balanced_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => return this[kClients].filter((dispatcher) => dispatcher.closed !== true && dispatcher.destroyed !== true).map((p) => p[kUrl].origin); } [kGetDispatcher]() { - if (this[kClients].length === 0) { - throw new BalancedPoolMissingUpstreamError(); - } - const dispatcher = this[kClients].find((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true); - if (!dispatcher) { - return; - } - const allClientsBusy = this[kClients].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true); - if (allClientsBusy) { - return; - } + if (this[kClients].length === 0) throw new BalancedPoolMissingUpstreamError(); + if (!this[kClients].find((dispatcher) => !dispatcher[kNeedDrain] && dispatcher.closed !== true && dispatcher.destroyed !== true)) return; + if (this[kClients].map((pool) => pool[kNeedDrain]).reduce((a, b) => a && b, true)) return; let counter = 0; let maxWeightIndex = this[kClients].findIndex((pool) => !pool[kNeedDrain]); while (counter++ < this[kClients].length) { this[kIndex] = (this[kIndex] + 1) % this[kClients].length; const pool = this[kClients][this[kIndex]]; - if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) { - maxWeightIndex = this[kIndex]; - } + if (pool[kWeight] > this[kClients][maxWeightIndex][kWeight] && !pool[kNeedDrain]) maxWeightIndex = this[kIndex]; if (this[kIndex] === 0) { this[kCurrentWeight] = this[kCurrentWeight] - this[kGreatestCommonDivisor]; - if (this[kCurrentWeight] <= 0) { - this[kCurrentWeight] = this[kMaxWeightPerServer]; - } - } - if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) { - return pool; + if (this[kCurrentWeight] <= 0) this[kCurrentWeight] = this[kMaxWeightPerServer]; } + if (pool[kWeight] >= this[kCurrentWeight] && !pool[kNeedDrain]) return pool; } this[kCurrentWeight] = this[kClients][maxWeightIndex][kWeight]; this[kIndex] = maxWeightIndex; @@ -167693,7 +152353,6 @@ var require_balanced_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => }; module.exports = BalancedPool; })); - //#endregion //#region ../node_modules/undici/lib/dispatcher/round-robin-pool.js var require_round_robin_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -167712,29 +152371,21 @@ var require_round_robin_pool = /* @__PURE__ */ __commonJSMin(((exports, module) } var RoundRobinPool = class extends PoolBase { constructor(origin, { connections, factory = defaultFactory, connect, connectTimeout, tls, maxCachedSessions, socketPath, autoSelectFamily, autoSelectFamilyAttemptTimeout, allowH2, clientTtl, ...options } = {}) { - if (connections != null && (!Number.isFinite(connections) || connections < 0)) { - throw new InvalidArgumentError("invalid connections"); - } - if (typeof factory !== "function") { - throw new InvalidArgumentError("factory must be a function."); - } - if (connect != null && typeof connect !== "function" && typeof connect !== "object") { - throw new InvalidArgumentError("connect must be a function or an object"); - } - if (typeof connect !== "function") { - connect = buildConnector({ - ...tls, - maxCachedSessions, - allowH2, - socketPath, - timeout: connectTimeout, - ...typeof autoSelectFamily === "boolean" ? { - autoSelectFamily, - autoSelectFamilyAttemptTimeout - } : undefined, - ...connect - }); - } + if (connections != null && (!Number.isFinite(connections) || connections < 0)) throw new InvalidArgumentError("invalid connections"); + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (typeof connect !== "function") connect = buildConnector({ + ...tls, + maxCachedSessions, + allowH2, + socketPath, + timeout: connectTimeout, + ...typeof autoSelectFamily === "boolean" ? { + autoSelectFamily, + autoSelectFamilyAttemptTimeout + } : void 0, + ...connect + }); super(); this[kConnections] = connections || null; this[kUrl] = util.parseOrigin(origin); @@ -167744,22 +152395,16 @@ var require_round_robin_pool = /* @__PURE__ */ __commonJSMin(((exports, module) allowH2, clientTtl }; - this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : undefined; + this[kOptions].interceptors = options.interceptors ? { ...options.interceptors } : void 0; this[kFactory] = factory; this[kIndex] = -1; this.on("connect", (origin, targets) => { - if (clientTtl != null && clientTtl > 0) { - for (const target of targets) { - Object.assign(target, { ttl: Date.now() }); - } - } + if (clientTtl != null && clientTtl > 0) for (const target of targets) Object.assign(target, { ttl: Date.now() }); }); this.on("connectionError", (origin, targets, error) => { for (const target of targets) { const idx = this[kClients].indexOf(target); - if (idx !== -1) { - this[kClients].splice(idx, 1); - } + if (idx !== -1) this[kClients].splice(idx, 1); } }); } @@ -167780,9 +152425,7 @@ var require_round_robin_pool = /* @__PURE__ */ __commonJSMin(((exports, module) checked++; continue; } - if (!client[kNeedDrain]) { - return client; - } + if (!client[kNeedDrain]) return client; checked++; } if (!this[kConnections] || clientsLength < this[kConnections]) { @@ -167794,7 +152437,6 @@ var require_round_robin_pool = /* @__PURE__ */ __commonJSMin(((exports, module) }; module.exports = RoundRobinPool; })); - //#endregion //#region ../node_modules/undici/lib/dispatcher/agent.js var require_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -167816,27 +152458,19 @@ var require_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { } var Agent = class extends DispatcherBase { constructor({ factory = defaultFactory, maxOrigins = Infinity, connect, ...options } = {}) { - if (typeof factory !== "function") { - throw new InvalidArgumentError("factory must be a function."); - } - if (connect != null && typeof connect !== "function" && typeof connect !== "object") { - throw new InvalidArgumentError("connect must be a function or an object"); - } - if (typeof maxOrigins !== "number" || Number.isNaN(maxOrigins) || maxOrigins <= 0) { - throw new InvalidArgumentError("maxOrigins must be a number greater than 0"); - } + if (typeof factory !== "function") throw new InvalidArgumentError("factory must be a function."); + if (connect != null && typeof connect !== "function" && typeof connect !== "object") throw new InvalidArgumentError("connect must be a function or an object"); + if (typeof maxOrigins !== "number" || Number.isNaN(maxOrigins) || maxOrigins <= 0) throw new InvalidArgumentError("maxOrigins must be a number greater than 0"); super(); - if (connect && typeof connect !== "function") { - connect = { ...connect }; - } + if (connect && typeof connect !== "function") connect = { ...connect }; this[kOptions] = { ...util.deepClone(options), maxOrigins, connect }; this[kFactory] = factory; - this[kClients] = new Map(); - this[kOrigins] = new Set(); + this[kClients] = /* @__PURE__ */ new Map(); + this[kOrigins] = /* @__PURE__ */ new Set(); this[kOnDrain] = (origin, targets) => { this.emit("drain", origin, [this, ...targets]); }; @@ -167852,21 +152486,14 @@ var require_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { } get [kRunning]() { let ret = 0; - for (const { dispatcher } of this[kClients].values()) { - ret += dispatcher[kRunning]; - } + for (const { dispatcher } of this[kClients].values()) ret += dispatcher[kRunning]; return ret; } [kDispatch](opts, handler) { let key; - if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) { - key = String(opts.origin); - } else { - throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); - } - if (this[kOrigins].size >= this[kOptions].maxOrigins && !this[kOrigins].has(key)) { - throw new MaxOriginsReachedError(); - } + if (opts.origin && (typeof opts.origin === "string" || opts.origin instanceof URL)) key = String(opts.origin); + else throw new InvalidArgumentError("opts.origin must be a non-empty string or URL."); + if (this[kOrigins].size >= this[kOptions].maxOrigins && !this[kOrigins].has(key)) throw new MaxOriginsReachedError(); const result = this[kClients].get(key); let dispatcher = result && result.dispatcher; if (!dispatcher) { @@ -167876,18 +152503,14 @@ var require_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { if (connected) result.count -= 1; if (result.count <= 0) { this[kClients].delete(key); - if (!result.dispatcher.destroyed) { - result.dispatcher.close(); - } + if (!result.dispatcher.destroyed) result.dispatcher.close(); } this[kOrigins].delete(key); } }; dispatcher = this[kFactory](opts.origin, this[kOptions]).on("drain", this[kOnDrain]).on("connect", (origin, targets) => { const result = this[kClients].get(key); - if (result) { - result.count += 1; - } + if (result) result.count += 1; this[kOnConnect](origin, targets); }).on("disconnect", (origin, targets, err) => { closeClientIfUnused(true); @@ -167906,33 +152529,24 @@ var require_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { } [kClose]() { const closePromises = []; - for (const { dispatcher } of this[kClients].values()) { - closePromises.push(dispatcher.close()); - } + for (const { dispatcher } of this[kClients].values()) closePromises.push(dispatcher.close()); this[kClients].clear(); return Promise.all(closePromises); } [kDestroy](err) { const destroyPromises = []; - for (const { dispatcher } of this[kClients].values()) { - destroyPromises.push(dispatcher.destroy(err)); - } + for (const { dispatcher } of this[kClients].values()) destroyPromises.push(dispatcher.destroy(err)); this[kClients].clear(); return Promise.all(destroyPromises); } get stats() { const allClientStats = {}; - for (const { dispatcher } of this[kClients].values()) { - if (dispatcher.stats) { - allClientStats[dispatcher[kUrl].origin] = dispatcher.stats; - } - } + for (const { dispatcher } of this[kClients].values()) if (dispatcher.stats) allClientStats[dispatcher[kUrl].origin] = dispatcher.stats; return allClientStats; } }; module.exports = Agent; })); - //#endregion //#region ../node_modules/undici/lib/dispatcher/proxy-agent.js var require_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -167959,32 +152573,23 @@ var require_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { } const noop = () => {}; function defaultAgentFactory(origin, opts) { - if (opts.connections === 1) { - return new Client(origin, opts); - } + if (opts.connections === 1) return new Client(origin, opts); return new Pool(origin, opts); } var Http1ProxyWrapper = class extends DispatcherBase { #client; constructor(proxyUrl, { headers = {}, connect, factory }) { - if (!proxyUrl) { - throw new InvalidArgumentError("Proxy URL is mandatory"); - } + if (!proxyUrl) throw new InvalidArgumentError("Proxy URL is mandatory"); super(); this[kProxyHeaders] = headers; - if (factory) { - this.#client = factory(proxyUrl, { connect }); - } else { - this.#client = new Client(proxyUrl, { connect }); - } + if (factory) this.#client = factory(proxyUrl, { connect }); + else this.#client = new Client(proxyUrl, { connect }); } [kDispatch](opts, handler) { const onHeaders = handler.onHeaders; handler.onHeaders = function(statusCode, data, resume) { if (statusCode === 407) { - if (typeof handler.onError === "function") { - handler.onError(new InvalidArgumentError("Proxy Authentication Required (407)")); - } + if (typeof handler.onError === "function") handler.onError(new InvalidArgumentError("Proxy Authentication Required (407)")); return; } if (onHeaders) onHeaders.call(this, statusCode, data, resume); @@ -168010,13 +152615,9 @@ var require_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; var ProxyAgent = class extends DispatcherBase { constructor(opts) { - if (!opts || typeof opts === "object" && !(opts instanceof URL) && !opts.uri) { - throw new InvalidArgumentError("Proxy uri is mandatory"); - } + if (!opts || typeof opts === "object" && !(opts instanceof URL) && !opts.uri) throw new InvalidArgumentError("Proxy uri is mandatory"); const { clientFactory = defaultFactory } = opts; - if (typeof clientFactory !== "function") { - throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); - } + if (typeof clientFactory !== "function") throw new InvalidArgumentError("Proxy opts.clientFactory must be a function."); const { proxyTunnel = true } = opts; super(); const url = this.#getUrl(opts); @@ -168029,27 +152630,20 @@ var require_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { this[kProxyTls] = opts.proxyTls; this[kProxyHeaders] = opts.headers || {}; this[kTunnelProxy] = proxyTunnel; - if (opts.auth && opts.token) { - throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); - } else if (opts.auth) { - this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; - } else if (opts.token) { - this[kProxyHeaders]["proxy-authorization"] = opts.token; - } else if (username && password) { - this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; - } + if (opts.auth && opts.token) throw new InvalidArgumentError("opts.auth cannot be used in combination with opts.token"); + else if (opts.auth) this[kProxyHeaders]["proxy-authorization"] = `Basic ${opts.auth}`; + else if (opts.token) this[kProxyHeaders]["proxy-authorization"] = opts.token; + else if (username && password) this[kProxyHeaders]["proxy-authorization"] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString("base64")}`; const connect = buildConnector({ ...opts.proxyTls }); this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }); const agentFactory = opts.factory || defaultAgentFactory; const factory = (origin, options) => { const { protocol } = new URL(origin); - if (!this[kTunnelProxy] && protocol === "http:" && this[kProxy].protocol === "http:") { - return new Http1ProxyWrapper(this[kProxy].uri, { - headers: this[kProxyHeaders], - connect, - factory: agentFactory - }); - } + if (!this[kTunnelProxy] && protocol === "http:" && this[kProxy].protocol === "http:") return new Http1ProxyWrapper(this[kProxy].uri, { + headers: this[kProxyHeaders], + connect, + factory: agentFactory + }); return agentFactory(origin, options); }; this[kClient] = clientFactory(url, { connect }); @@ -168058,9 +152652,7 @@ var require_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { factory, connect: async (opts, callback) => { let requestedPath = opts.host; - if (!opts.port) { - requestedPath += `:${defaultProtocolPort(opts.protocol)}`; - } + if (!opts.port) requestedPath += `:${defaultProtocolPort(opts.protocol)}`; try { const connectParams = { origin, @@ -168080,33 +152672,25 @@ var require_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)); return; } - if (channels.proxyConnected.hasSubscribers) { - channels.proxyConnected.publish({ - socket, - connectParams - }); - } + if (channels.proxyConnected.hasSubscribers) channels.proxyConnected.publish({ + socket, + connectParams + }); if (opts.protocol !== "https:") { callback(null, socket); return; } let servername; - if (this[kRequestTls]) { - servername = this[kRequestTls].servername; - } else { - servername = opts.servername; - } + if (this[kRequestTls]) servername = this[kRequestTls].servername; + else servername = opts.servername; this[kConnectEndpoint]({ ...opts, servername, httpSocket: socket }, callback); } catch (err) { - if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") { - callback(new SecureProxyConnectionError(err)); - } else { - callback(err); - } + if (err.code === "ERR_TLS_CERT_ALTNAME_INVALID") callback(new SecureProxyConnectionError(err)); + else callback(err); } } }); @@ -168128,13 +152712,9 @@ var require_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {URL} */ #getUrl(opts) { - if (typeof opts === "string") { - return new URL(opts); - } else if (opts instanceof URL) { - return opts; - } else { - return new URL(opts.uri); - } + if (typeof opts === "string") return new URL(opts); + else if (opts instanceof URL) return opts; + else return new URL(opts.uri); } [kClose]() { return Promise.all([this[kAgent].close(), this[kClient].close()]); @@ -168151,9 +152731,7 @@ var require_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { if (Array.isArray(headers)) { /** @type {Record} */ const headersPair = {}; - for (let i = 0; i < headers.length; i += 2) { - headersPair[headers[i]] = headers[i + 1]; - } + for (let i = 0; i < headers.length; i += 2) headersPair[headers[i]] = headers[i + 1]; return headersPair; } return headers; @@ -168167,14 +152745,10 @@ var require_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { * It should be removed in the next major version for performance reasons */ function throwIfProxyAuthIsSent(headers) { - const existProxyAuth = headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization"); - if (existProxyAuth) { - throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); - } + if (headers && Object.keys(headers).find((key) => key.toLowerCase() === "proxy-authorization")) throw new InvalidArgumentError("Proxy-Authorization should be sent in ProxyAgent constructor"); } module.exports = ProxyAgent; })); - //#endregion //#region ../node_modules/undici/lib/dispatcher/env-http-proxy-agent.js var require_env_http_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -168196,29 +152770,22 @@ var require_env_http_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, modu const { httpProxy, httpsProxy, noProxy, ...agentOpts } = opts; this[kNoProxyAgent] = new Agent(agentOpts); const HTTP_PROXY = httpProxy ?? process.env.http_proxy ?? process.env.HTTP_PROXY; - if (HTTP_PROXY) { - this[kHttpProxyAgent] = new ProxyAgent({ - ...agentOpts, - uri: HTTP_PROXY - }); - } else { - this[kHttpProxyAgent] = this[kNoProxyAgent]; - } + if (HTTP_PROXY) this[kHttpProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTP_PROXY + }); + else this[kHttpProxyAgent] = this[kNoProxyAgent]; const HTTPS_PROXY = httpsProxy ?? process.env.https_proxy ?? process.env.HTTPS_PROXY; - if (HTTPS_PROXY) { - this[kHttpsProxyAgent] = new ProxyAgent({ - ...agentOpts, - uri: HTTPS_PROXY - }); - } else { - this[kHttpsProxyAgent] = this[kHttpProxyAgent]; - } + if (HTTPS_PROXY) this[kHttpsProxyAgent] = new ProxyAgent({ + ...agentOpts, + uri: HTTPS_PROXY + }); + else this[kHttpsProxyAgent] = this[kHttpProxyAgent]; this.#parseNoProxy(); } [kDispatch](opts, handler) { const url = new URL(opts.origin); - const agent = this.#getProxyAgentForUrl(url); - return agent.dispatch(opts, handler); + return this.#getProxyAgentForUrl(url).dispatch(opts, handler); } [kClose]() { return Promise.all([ @@ -168238,38 +152805,20 @@ var require_env_http_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, modu let { protocol, host: hostname, port } = url; hostname = hostname.replace(/:\d*$/, "").toLowerCase(); port = Number.parseInt(port, 10) || DEFAULT_PORTS[protocol] || 0; - if (!this.#shouldProxy(hostname, port)) { - return this[kNoProxyAgent]; - } - if (protocol === "https:") { - return this[kHttpsProxyAgent]; - } + if (!this.#shouldProxy(hostname, port)) return this[kNoProxyAgent]; + if (protocol === "https:") return this[kHttpsProxyAgent]; return this[kHttpProxyAgent]; } #shouldProxy(hostname, port) { - if (this.#noProxyChanged) { - this.#parseNoProxy(); - } - if (this.#noProxyEntries.length === 0) { - return true; - } - if (this.#noProxyValue === "*") { - return false; - } + if (this.#noProxyChanged) this.#parseNoProxy(); + if (this.#noProxyEntries.length === 0) return true; + if (this.#noProxyValue === "*") return false; for (let i = 0; i < this.#noProxyEntries.length; i++) { const entry = this.#noProxyEntries[i]; - if (entry.port && entry.port !== port) { - continue; - } + if (entry.port && entry.port !== port) continue; if (!/^[.*]/.test(entry.hostname)) { - if (hostname === entry.hostname) { - return false; - } - } else { - if (hostname.endsWith(entry.hostname.replace(/^\*/, ""))) { - return false; - } - } + if (hostname === entry.hostname) return false; + } else if (hostname.endsWith(entry.hostname.replace(/^\*/, ""))) return false; } return true; } @@ -168279,9 +152828,7 @@ var require_env_http_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, modu const noProxyEntries = []; for (let i = 0; i < noProxySplit.length; i++) { const entry = noProxySplit[i]; - if (!entry) { - continue; - } + if (!entry) continue; const parsed = entry.match(/^(.+):(\d+)$/); noProxyEntries.push({ hostname: (parsed ? parsed[1] : entry).toLowerCase(), @@ -168292,9 +152839,7 @@ var require_env_http_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, modu this.#noProxyEntries = noProxyEntries; } get #noProxyChanged() { - if (this.#opts.noProxy !== undefined) { - return false; - } + if (this.#opts.noProxy !== void 0) return false; return this.#noProxyValue !== this.#noProxyEnv; } get #noProxyEnv() { @@ -168303,7 +152848,6 @@ var require_env_http_proxy_agent = /* @__PURE__ */ __commonJSMin(((exports, modu }; module.exports = EnvHttpProxyAgent; })); - //#endregion //#region ../node_modules/undici/lib/handler/retry-handler.js var require_retry_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -168316,7 +152860,7 @@ var require_retry_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => const retryTime = new Date(retryAfter).getTime(); return isNaN(retryTime) ? 0 : retryTime - Date.now(); } - var RetryHandler = class RetryHandler { + module.exports = class RetryHandler { constructor(opts, { dispatch, handler }) { const { retryOptions, ...dispatchOpts } = opts; const { retry: retryFn, maxRetries, maxTimeout, minTimeout, timeoutFactor, methods, errorCodes, retryAfter, statusCodes, throwOnError } = retryOptions ?? {}; @@ -168374,9 +152918,7 @@ var require_retry_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => if (this.retryOpts.statusCodes.includes(statusCode) === false) { this.headersSent = true; this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage); - } else { - this.error = err; - } + } else this.error = err; return; } if (isDisturbed(this.opts.body)) { @@ -168404,9 +152946,7 @@ var require_retry_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => }, shouldRetry.bind(this)); } onRequestStart(controller, context) { - if (!this.headersSent) { - this.handler.onRequestStart?.(controller, context); - } + if (!this.headersSent) this.handler.onRequestStart?.(controller, context); } onRequestUpgrade(controller, statusCode, headers, socket) { this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket); @@ -168452,25 +152992,19 @@ var require_retry_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => return; } if (this.headersSent) { - if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) { - throw new RequestRetryError("server does not support the range header and the payload was partially consumed", statusCode, { - headers, - data: { count: this.retryCount } - }); - } + if (statusCode !== 206 && (this.start > 0 || statusCode !== 200)) throw new RequestRetryError("server does not support the range header and the payload was partially consumed", statusCode, { + headers, + data: { count: this.retryCount } + }); const contentRange = parseRangeHeader(headers["content-range"]); - if (!contentRange) { - throw new RequestRetryError("Content-Range mismatch", statusCode, { - headers, - data: { count: this.retryCount } - }); - } - if (this.etag != null && this.etag !== headers.etag) { - throw new RequestRetryError("ETag mismatch", statusCode, { - headers, - data: { count: this.retryCount } - }); - } + if (!contentRange) throw new RequestRetryError("Content-Range mismatch", statusCode, { + headers, + data: { count: this.retryCount } + }); + if (this.etag != null && this.etag !== headers.etag) throw new RequestRetryError("ETag mismatch", statusCode, { + headers, + data: { count: this.retryCount } + }); const { start, size, end = size ? size - 1 : null } = contentRange; assert$22(this.start === start, "content-range mismatch"); assert$22(this.end == null || this.end === end, "content-range mismatch"); @@ -168498,29 +153032,21 @@ var require_retry_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => assert$22(this.end == null || Number.isFinite(this.end), "invalid content-length"); this.resume = true; this.etag = headers.etag != null ? headers.etag : null; - if (this.etag != null && this.etag[0] === "W" && this.etag[1] === "/") { - this.etag = null; - } + if (this.etag != null && this.etag[0] === "W" && this.etag[1] === "/") this.etag = null; this.headersSent = true; this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage); - } else { - throw new RequestRetryError("Request failed", statusCode, { - headers, - data: { count: this.retryCount } - }); - } + } else throw new RequestRetryError("Request failed", statusCode, { + headers, + data: { count: this.retryCount } + }); } onResponseData(controller, chunk) { - if (this.error) { - return; - } + if (this.error) return; this.start += chunk.length; this.handler.onResponseData?.(controller, chunk); } onResponseEnd(controller, trailers) { - if (this.error && this.retryOpts.throwOnError) { - throw this.error; - } + if (this.error && this.retryOpts.throwOnError) throw this.error; if (!this.error) { this.retryCount = 0; return this.handler.onResponseEnd?.(controller, trailers); @@ -168530,9 +153056,7 @@ var require_retry_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => retry(controller) { if (this.start !== 0) { const headers = { range: `bytes=${this.start}-${this.end ?? ""}` }; - if (this.etag != null) { - headers["if-match"] = this.etag; - } + if (this.etag != null) headers["if-match"] = this.etag; this.opts = { ...this.opts, headers: { @@ -168560,11 +153084,8 @@ var require_retry_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => } this.handler?.onResponseError?.(controller, returnedErr); } - if (this.retryCount - this.retryCountCheckpoint > 0) { - this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint); - } else { - this.retryCount += 1; - } + if (this.retryCount - this.retryCountCheckpoint > 0) this.retryCount = this.retryCountCheckpoint + (this.retryCount - this.retryCountCheckpoint); + else this.retryCount += 1; this.retryOpts.retry(err, { state: { counter: this.retryCount }, opts: { @@ -168574,9 +153095,7 @@ var require_retry_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => }, shouldRetry.bind(this)); } }; - module.exports = RetryHandler; })); - //#endregion //#region ../node_modules/undici/lib/dispatcher/retry-agent.js var require_retry_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -168609,7 +153128,6 @@ var require_retry_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; module.exports = RetryAgent; })); - //#endregion //#region ../node_modules/undici/lib/dispatcher/h2c-client.js var require_h2c_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -168617,24 +153135,14 @@ var require_h2c_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { const Client = require_client(); var H2CClient = class extends Client { constructor(origin, clientOpts) { - if (typeof origin === "string") { - origin = new URL(origin); - } - if (origin.protocol !== "http:") { - throw new InvalidArgumentError("h2c-client: Only h2c protocol is supported"); - } + if (typeof origin === "string") origin = new URL(origin); + if (origin.protocol !== "http:") throw new InvalidArgumentError("h2c-client: Only h2c protocol is supported"); const { connect, maxConcurrentStreams, pipelining, ...opts } = clientOpts ?? {}; let defaultMaxConcurrentStreams = 100; let defaultPipelining = 100; - if (maxConcurrentStreams != null && Number.isInteger(maxConcurrentStreams) && maxConcurrentStreams > 0) { - defaultMaxConcurrentStreams = maxConcurrentStreams; - } - if (pipelining != null && Number.isInteger(pipelining) && pipelining > 0) { - defaultPipelining = pipelining; - } - if (defaultPipelining > defaultMaxConcurrentStreams) { - throw new InvalidArgumentError("h2c-client: pipelining cannot be greater than maxConcurrentStreams"); - } + if (maxConcurrentStreams != null && Number.isInteger(maxConcurrentStreams) && maxConcurrentStreams > 0) defaultMaxConcurrentStreams = maxConcurrentStreams; + if (pipelining != null && Number.isInteger(pipelining) && pipelining > 0) defaultPipelining = pipelining; + if (defaultPipelining > defaultMaxConcurrentStreams) throw new InvalidArgumentError("h2c-client: pipelining cannot be greater than maxConcurrentStreams"); super(origin, { ...opts, maxConcurrentStreams: defaultMaxConcurrentStreams, @@ -168646,7 +153154,6 @@ var require_h2c_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; module.exports = H2CClient; })); - //#endregion //#region ../node_modules/undici/lib/api/readable.js var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -168714,17 +153221,10 @@ var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {void} */ _destroy(err, callback) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError(); - } - if (err) { - this[kAbort](); - } - if (!this[kUsed]) { - setImmediate(callback, err); - } else { - callback(err); - } + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError(); + if (err) this[kAbort](); + if (!this[kUsed]) setImmediate(callback, err); + else callback(err); } /** * @param {string|symbol} event @@ -168753,9 +153253,7 @@ var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ off(event, listener) { const ret = super.off(event, listener); - if (event === "data" || event === "readable") { - this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; - } + if (event === "data" || event === "readable") this[kReading] = this.listenerCount("data") > 0 || this.listenerCount("readable") > 0; return ret; } /** @@ -168869,20 +153367,12 @@ var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ dump(opts) { const signal = opts?.signal; - if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) { - return Promise.reject(new InvalidArgumentError("signal must be an AbortSignal")); - } + if (signal != null && (typeof signal !== "object" || !("aborted" in signal))) return Promise.reject(new InvalidArgumentError("signal must be an AbortSignal")); const limit = opts?.limit && Number.isFinite(opts.limit) ? opts.limit : 128 * 1024; - if (signal?.aborted) { - return Promise.reject(signal.reason ?? new AbortError()); - } - if (this._readableState.closeEmitted) { - return Promise.resolve(null); - } + if (signal?.aborted) return Promise.reject(signal.reason ?? new AbortError()); + if (this._readableState.closeEmitted) return Promise.resolve(null); return new Promise((resolve, reject) => { - if (this[kContentLength] && this[kContentLength] > limit || this[kBytesRead] > limit) { - this.destroy(new AbortError()); - } + if (this[kContentLength] && this[kContentLength] > limit || this[kBytesRead] > limit) this.destroy(new AbortError()); if (signal) { const onAbort = () => { this.destroy(signal.reason ?? new AbortError()); @@ -168890,19 +153380,12 @@ var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { signal.addEventListener("abort", onAbort); this.on("close", function() { signal.removeEventListener("abort", onAbort); - if (signal.aborted) { - reject(signal.reason ?? new AbortError()); - } else { - resolve(null); - } + if (signal.aborted) reject(signal.reason ?? new AbortError()); + else resolve(null); }); - } else { - this.on("close", resolve); - } + } else this.on("close", resolve); this.on("error", noop).on("data", () => { - if (this[kBytesRead] > limit) { - this.destroy(); - } + if (this[kBytesRead] > limit) this.destroy(); }).resume(); }); } @@ -168911,9 +153394,7 @@ var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {this} */ setEncoding(encoding) { - if (Buffer.isEncoding(encoding)) { - this._readableState.encoding = encoding; - } + if (Buffer.isEncoding(encoding)) this._readableState.encoding = encoding; return this; } }; @@ -168966,33 +153447,26 @@ var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { return new Promise((resolve, reject) => { if (isUnusable(stream)) { const rState = stream._readableState; - if (rState.destroyed && rState.closeEmitted === false) { - stream.on("error", reject).on("close", () => { - reject(new TypeError("unusable")); - }); - } else { - reject(rState.errored ?? new TypeError("unusable")); - } - } else { - queueMicrotask(() => { - stream[kConsume] = { - type, - stream, - resolve, - reject, - length: 0, - body: [] - }; - stream.on("error", function(err) { - consumeFinish(this[kConsume], err); - }).on("close", function() { - if (this[kConsume].body !== null) { - consumeFinish(this[kConsume], new RequestAbortedError()); - } - }); - consumeStart(stream[kConsume]); + if (rState.destroyed && rState.closeEmitted === false) stream.on("error", reject).on("close", () => { + reject(/* @__PURE__ */ new TypeError("unusable")); }); - } + else reject(rState.errored ?? /* @__PURE__ */ new TypeError("unusable")); + } else queueMicrotask(() => { + stream[kConsume] = { + type, + stream, + resolve, + reject, + length: 0, + body: [] + }; + stream.on("error", function(err) { + consumeFinish(this[kConsume], err); + }).on("close", function() { + if (this[kConsume].body !== null) consumeFinish(this[kConsume], new RequestAbortedError()); + }); + consumeStart(stream[kConsume]); + }); }); } /** @@ -169000,30 +153474,19 @@ var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {void} */ function consumeStart(consume) { - if (consume.body === null) { - return; - } + if (consume.body === null) return; const { _readableState: state } = consume.stream; if (state.bufferIndex) { const start = state.bufferIndex; const end = state.buffer.length; - for (let n = start; n < end; n++) { - consumePush(consume, state.buffer[n]); - } - } else { - for (const chunk of state.buffer) { - consumePush(consume, chunk); - } - } - if (state.endEmitted) { + for (let n = start; n < end; n++) consumePush(consume, state.buffer[n]); + } else for (const chunk of state.buffer) consumePush(consume, chunk); + if (state.endEmitted) consumeEnd(this[kConsume], this._readableState.encoding); + else consume.stream.on("end", function() { consumeEnd(this[kConsume], this._readableState.encoding); - } else { - consume.stream.on("end", function() { - consumeEnd(this[kConsume], this._readableState.encoding); - }); - } + }); consume.stream.resume(); - while (consume.stream.read() != null) {} + while (consume.stream.read() != null); } /** * @param {Buffer[]} chunks @@ -169032,17 +153495,12 @@ var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {string} */ function chunksDecode(chunks, length, encoding) { - if (chunks.length === 0 || length === 0) { - return ""; - } + if (chunks.length === 0 || length === 0) return ""; const buffer = chunks.length === 1 ? chunks[0] : Buffer.concat(chunks, length); const bufferLength = buffer.length; const start = bufferLength > 2 && buffer[0] === 239 && buffer[1] === 187 && buffer[2] === 191 ? 3 : 0; - if (!encoding || encoding === "utf8" || encoding === "utf-8") { - return buffer.utf8Slice(start, bufferLength); - } else { - return buffer.subarray(start, bufferLength).toString(encoding); - } + if (!encoding || encoding === "utf8" || encoding === "utf-8") return buffer.utf8Slice(start, bufferLength); + else return buffer.subarray(start, bufferLength).toString(encoding); } /** * @param {Buffer[]} chunks @@ -169050,12 +153508,8 @@ var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {Uint8Array} */ function chunksConcat(chunks, length) { - if (chunks.length === 0 || length === 0) { - return new Uint8Array(0); - } - if (chunks.length === 1) { - return new Uint8Array(chunks[0]); - } + if (chunks.length === 0 || length === 0) return new Uint8Array(0); + if (chunks.length === 1) return new Uint8Array(chunks[0]); const buffer = new Uint8Array(Buffer.allocUnsafeSlow(length).buffer); let offset = 0; for (let i = 0; i < chunks.length; ++i) { @@ -169073,17 +153527,11 @@ var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { function consumeEnd(consume, encoding) { const { type, body, resolve, stream, length } = consume; try { - if (type === "text") { - resolve(chunksDecode(body, length, encoding)); - } else if (type === "json") { - resolve(JSON.parse(chunksDecode(body, length, encoding))); - } else if (type === "arrayBuffer") { - resolve(chunksConcat(body, length).buffer); - } else if (type === "blob") { - resolve(new Blob(body, { type: stream[kContentType] })); - } else if (type === "bytes") { - resolve(chunksConcat(body, length)); - } + if (type === "text") resolve(chunksDecode(body, length, encoding)); + else if (type === "json") resolve(JSON.parse(chunksDecode(body, length, encoding))); + else if (type === "arrayBuffer") resolve(chunksConcat(body, length).buffer); + else if (type === "blob") resolve(new Blob(body, { type: stream[kContentType] })); + else if (type === "bytes") resolve(chunksConcat(body, length)); consumeFinish(consume); } catch (err) { stream.destroy(err); @@ -169104,14 +153552,9 @@ var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {void} */ function consumeFinish(consume, err) { - if (consume.body === null) { - return; - } - if (err) { - consume.reject(err); - } else { - consume.resolve(); - } + if (consume.body === null) return; + if (err) consume.reject(err); + else consume.resolve(); consume.type = null; consume.stream = null; consume.resolve = null; @@ -169124,7 +153567,6 @@ var require_readable = /* @__PURE__ */ __commonJSMin(((exports, module) => { chunksDecode }; })); - //#endregion //#region ../node_modules/undici/lib/api/api-request.js var require_api_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -169136,31 +153578,17 @@ var require_api_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { function noop() {} var RequestHandler = class extends AsyncResource$4 { constructor(opts, callback) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); const { signal, method, opaque, body, onInfo, responseHeaders, highWaterMark } = opts; try { - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) { - throw new InvalidArgumentError("invalid highWaterMark"); - } - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } - if (method === "CONNECT") { - throw new InvalidArgumentError("invalid method"); - } - if (onInfo && typeof onInfo !== "function") { - throw new InvalidArgumentError("invalid onInfo callback"); - } + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (highWaterMark && (typeof highWaterMark !== "number" || highWaterMark < 0)) throw new InvalidArgumentError("invalid highWaterMark"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); super("UNDICI_REQUEST"); } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on("error", noop), err); - } + if (util.isStream(body)) util.destroy(body.on("error", noop), err); throw err; } this.method = method; @@ -169176,18 +153604,12 @@ var require_api_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { this.highWaterMark = highWaterMark; this.reason = null; this.removeAbortListener = null; - if (signal?.aborted) { + if (signal?.aborted) this.reason = signal.reason ?? new RequestAbortedError(); + else if (signal) this.removeAbortListener = util.addAbortListener(signal, () => { this.reason = signal.reason ?? new RequestAbortedError(); - } else if (signal) { - this.removeAbortListener = util.addAbortListener(signal, () => { - this.reason = signal.reason ?? new RequestAbortedError(); - if (this.res) { - util.destroy(this.res.on("error", noop), this.reason); - } else if (this.abort) { - this.abort(this.reason); - } - }); - } + if (this.res) util.destroy(this.res.on("error", noop), this.reason); + else if (this.abort) this.abort(this.reason); + }); } onConnect(abort, context) { if (this.reason) { @@ -169202,12 +153624,10 @@ var require_api_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { const { callback, opaque, abort, context, responseHeaders, highWaterMark } = this; const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ - statusCode, - headers - }); - } + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); return; } const parsedHeaders = responseHeaders === "raw" ? util.parseHeaders(rawHeaders) : headers; @@ -169226,24 +153646,22 @@ var require_api_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { } this.callback = null; this.res = res; - if (callback !== null) { - try { - this.runInAsyncScope(callback, null, null, { - statusCode, - statusText: statusMessage, - headers, - trailers: this.trailers, - opaque, - body: res, - context - }); - } catch (err) { - this.res = null; - util.destroy(res.on("error", noop), err); - queueMicrotask(() => { - throw err; - }); - } + if (callback !== null) try { + this.runInAsyncScope(callback, null, null, { + statusCode, + statusText: statusMessage, + headers, + trailers: this.trailers, + opaque, + body: res, + context + }); + } catch (err) { + this.res = null; + util.destroy(res.on("error", noop), err); + queueMicrotask(() => { + throw err; + }); } } onData(chunk) { @@ -169281,20 +153699,16 @@ var require_api_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { } }; function request(opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - request.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); + if (callback === void 0) return new Promise((resolve, reject) => { + request.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); }); - } + }); try { const handler = new RequestHandler(opts, callback); this.dispatch(opts, handler); } catch (err) { - if (typeof callback !== "function") { - throw err; - } + if (typeof callback !== "function") throw err; const opaque = opts?.opaque; queueMicrotask(() => callback(err, { opaque })); } @@ -169302,7 +153716,6 @@ var require_api_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = request; module.exports.RequestHandler = RequestHandler; })); - //#endregion //#region ../node_modules/undici/lib/api/abort-signal.js var require_abort_signal = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -169311,20 +153724,15 @@ var require_abort_signal = /* @__PURE__ */ __commonJSMin(((exports, module) => { const kListener = Symbol("kListener"); const kSignal = Symbol("kSignal"); function abort(self) { - if (self.abort) { - self.abort(self[kSignal]?.reason); - } else { - self.reason = self[kSignal]?.reason ?? new RequestAbortedError(); - } + if (self.abort) self.abort(self[kSignal]?.reason); + else self.reason = self[kSignal]?.reason ?? new RequestAbortedError(); removeSignal(self); } function addSignal(self, signal) { self.reason = null; self[kSignal] = null; self[kListener] = null; - if (!signal) { - return; - } + if (!signal) return; if (signal.aborted) { abort(self); return; @@ -169336,14 +153744,9 @@ var require_abort_signal = /* @__PURE__ */ __commonJSMin(((exports, module) => { addAbortListener(self[kSignal], self[kListener]); } function removeSignal(self) { - if (!self[kSignal]) { - return; - } - if ("removeEventListener" in self[kSignal]) { - self[kSignal].removeEventListener("abort", self[kListener]); - } else { - self[kSignal].removeListener("abort", self[kListener]); - } + if (!self[kSignal]) return; + if ("removeEventListener" in self[kSignal]) self[kSignal].removeEventListener("abort", self[kListener]); + else self[kSignal].removeListener("abort", self[kListener]); self[kSignal] = null; self[kListener] = null; } @@ -169352,7 +153755,6 @@ var require_abort_signal = /* @__PURE__ */ __commonJSMin(((exports, module) => { removeSignal }; })); - //#endregion //#region ../node_modules/undici/lib/api/api-stream.js var require_api_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -169365,31 +153767,17 @@ var require_api_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { function noop() {} var StreamHandler = class extends AsyncResource$3 { constructor(opts, factory, callback) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); const { signal, method, opaque, body, onInfo, responseHeaders } = opts; try { - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } - if (typeof factory !== "function") { - throw new InvalidArgumentError("invalid factory"); - } - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } - if (method === "CONNECT") { - throw new InvalidArgumentError("invalid method"); - } - if (onInfo && typeof onInfo !== "function") { - throw new InvalidArgumentError("invalid onInfo callback"); - } + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); + if (typeof factory !== "function") throw new InvalidArgumentError("invalid factory"); + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); super("UNDICI_STREAM"); } catch (err) { - if (util.isStream(body)) { - util.destroy(body.on("error", noop), err); - } + if (util.isStream(body)) util.destroy(body.on("error", noop), err); throw err; } this.responseHeaders = responseHeaders || null; @@ -169402,11 +153790,9 @@ var require_api_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { this.trailers = null; this.body = body; this.onInfo = onInfo || null; - if (util.isStream(body)) { - body.on("error", (err) => { - this.onError(err); - }); - } + if (util.isStream(body)) body.on("error", (err) => { + this.onError(err); + }); addSignal(this, signal); } onConnect(abort, context) { @@ -169422,46 +153808,35 @@ var require_api_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { const { factory, opaque, context, responseHeaders } = this; const headers = responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); if (statusCode < 200) { - if (this.onInfo) { - this.onInfo({ - statusCode, - headers - }); - } + if (this.onInfo) this.onInfo({ + statusCode, + headers + }); return; } this.factory = null; - if (factory === null) { - return; - } + if (factory === null) return; const res = this.runInAsyncScope(factory, null, { statusCode, headers, opaque, context }); - if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") { - throw new InvalidReturnValueError("expected Writable"); - } + if (!res || typeof res.write !== "function" || typeof res.end !== "function" || typeof res.on !== "function") throw new InvalidReturnValueError("expected Writable"); finished$2(res, { readable: false }, (err) => { const { callback, res, opaque, trailers, abort } = this; this.res = null; - if (err || !res?.readable) { - util.destroy(res, err); - } + if (err || !res?.readable) util.destroy(res, err); this.callback = null; this.runInAsyncScope(callback, null, err || null, { opaque, trailers }); - if (err) { - abort(); - } + if (err) abort(); }); res.on("drain", resume); this.res = res; - const needDrain = res.writableNeedDrain !== undefined ? res.writableNeedDrain : res._writableState?.needDrain; - return needDrain !== true; + return (res.writableNeedDrain !== void 0 ? res.writableNeedDrain : res._writableState?.needDrain) !== true; } onData(chunk) { const { res } = this; @@ -169470,9 +153845,7 @@ var require_api_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { onComplete(trailers) { const { res } = this; removeSignal(this); - if (!res) { - return; - } + if (!res) return; this.trailers = util.parseHeaders(trailers); res.end(); } @@ -169496,27 +153869,22 @@ var require_api_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { } }; function stream(opts, factory, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - stream.call(this, opts, factory, (err, data) => { - return err ? reject(err) : resolve(data); - }); + if (callback === void 0) return new Promise((resolve, reject) => { + stream.call(this, opts, factory, (err, data) => { + return err ? reject(err) : resolve(data); }); - } + }); try { const handler = new StreamHandler(opts, factory, callback); this.dispatch(opts, handler); } catch (err) { - if (typeof callback !== "function") { - throw err; - } + if (typeof callback !== "function") throw err; const opaque = opts?.opaque; queueMicrotask(() => callback(err, { opaque })); } } module.exports = stream; })); - //#endregion //#region ../node_modules/undici/lib/api/api-pipeline.js var require_api_pipeline = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -169554,30 +153922,18 @@ var require_api_pipeline = /* @__PURE__ */ __commonJSMin(((exports, module) => { this[kResume](); } _destroy(err, callback) { - if (!err && !this._readableState.endEmitted) { - err = new RequestAbortedError(); - } + if (!err && !this._readableState.endEmitted) err = new RequestAbortedError(); callback(err); } }; var PipelineHandler = class extends AsyncResource$2 { constructor(opts, handler) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - if (typeof handler !== "function") { - throw new InvalidArgumentError("invalid handler"); - } + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof handler !== "function") throw new InvalidArgumentError("invalid handler"); const { signal, method, opaque, onInfo, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } - if (method === "CONNECT") { - throw new InvalidArgumentError("invalid method"); - } - if (onInfo && typeof onInfo !== "function") { - throw new InvalidArgumentError("invalid onInfo callback"); - } + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); + if (method === "CONNECT") throw new InvalidArgumentError("invalid method"); + if (onInfo && typeof onInfo !== "function") throw new InvalidArgumentError("invalid onInfo callback"); super("UNDICI_PIPELINE"); this.opaque = opaque || null; this.responseHeaders = responseHeaders || null; @@ -169591,26 +153947,17 @@ var require_api_pipeline = /* @__PURE__ */ __commonJSMin(((exports, module) => { autoDestroy: true, read: () => { const { body } = this; - if (body?.resume) { - body.resume(); - } + if (body?.resume) body.resume(); }, write: (chunk, encoding, callback) => { const { req } = this; - if (req.push(chunk, encoding) || req._readableState.destroyed) { - callback(); - } else { - req[kResume] = callback; - } + if (req.push(chunk, encoding) || req._readableState.destroyed) callback(); + else req[kResume] = callback; }, destroy: (err, callback) => { const { body, req, res, ret, abort } = this; - if (!err && !ret._readableState.endEmitted) { - err = new RequestAbortedError(); - } - if (abort && err) { - abort(); - } + if (!err && !ret._readableState.endEmitted) err = new RequestAbortedError(); + if (abort && err) abort(); util.destroy(body, err); util.destroy(req, err); util.destroy(res, err); @@ -169662,14 +154009,10 @@ var require_api_pipeline = /* @__PURE__ */ __commonJSMin(((exports, module) => { this.res.on("error", noop); throw err; } - if (!body || typeof body.on !== "function") { - throw new InvalidReturnValueError("expected Readable"); - } + if (!body || typeof body.on !== "function") throw new InvalidReturnValueError("expected Readable"); body.on("data", (chunk) => { const { ret, body } = this; - if (!ret.push(chunk) && body.pause) { - body.pause(); - } + if (!ret.push(chunk) && body.pause) body.pause(); }).on("error", (err) => { const { ret } = this; util.destroy(ret, err); @@ -169678,9 +154021,7 @@ var require_api_pipeline = /* @__PURE__ */ __commonJSMin(((exports, module) => { ret.push(null); }).on("close", () => { const { ret } = this; - if (!ret._readableState.ended) { - util.destroy(ret, new RequestAbortedError()); - } + if (!ret._readableState.ended) util.destroy(ret, new RequestAbortedError()); }); this.body = body; } @@ -169712,7 +154053,6 @@ var require_api_pipeline = /* @__PURE__ */ __commonJSMin(((exports, module) => { } module.exports = pipeline; })); - //#endregion //#region ../node_modules/undici/lib/api/api-upgrade.js var require_api_upgrade = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -169724,16 +154064,10 @@ var require_api_upgrade = /* @__PURE__ */ __commonJSMin(((exports, module) => { const { addSignal, removeSignal } = require_abort_signal(); var UpgradeHandler = class extends AsyncResource$1 { constructor(opts, callback) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); const { signal, opaque, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); super("UNDICI_UPGRADE"); this.responseHeaders = responseHeaders || null; this.opaque = opaque || null; @@ -169779,13 +154113,11 @@ var require_api_upgrade = /* @__PURE__ */ __commonJSMin(((exports, module) => { } }; function upgrade(opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - upgrade.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); + if (callback === void 0) return new Promise((resolve, reject) => { + upgrade.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); }); - } + }); try { const upgradeHandler = new UpgradeHandler(opts, callback); const upgradeOpts = { @@ -169795,16 +154127,13 @@ var require_api_upgrade = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; this.dispatch(upgradeOpts, upgradeHandler); } catch (err) { - if (typeof callback !== "function") { - throw err; - } + if (typeof callback !== "function") throw err; const opaque = opts?.opaque; queueMicrotask(() => callback(err, { opaque })); } } module.exports = upgrade; })); - //#endregion //#region ../node_modules/undici/lib/api/api-connect.js var require_api_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -169815,16 +154144,10 @@ var require_api_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { const { addSignal, removeSignal } = require_abort_signal(); var ConnectHandler = class extends AsyncResource { constructor(opts, callback) { - if (!opts || typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } - if (typeof callback !== "function") { - throw new InvalidArgumentError("invalid callback"); - } + if (!opts || typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); + if (typeof callback !== "function") throw new InvalidArgumentError("invalid callback"); const { signal, opaque, responseHeaders } = opts; - if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") { - throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); - } + if (signal && typeof signal.on !== "function" && typeof signal.addEventListener !== "function") throw new InvalidArgumentError("signal must be an EventEmitter or EventTarget"); super("UNDICI_CONNECT"); this.opaque = opaque || null; this.responseHeaders = responseHeaders || null; @@ -169849,9 +154172,7 @@ var require_api_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { removeSignal(this); this.callback = null; let headers = rawHeaders; - if (headers != null) { - headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); - } + if (headers != null) headers = this.responseHeaders === "raw" ? util.parseRawHeaders(rawHeaders) : util.parseHeaders(rawHeaders); this.runInAsyncScope(callback, null, null, { statusCode, headers, @@ -169872,13 +154193,11 @@ var require_api_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { } }; function connect(opts, callback) { - if (callback === undefined) { - return new Promise((resolve, reject) => { - connect.call(this, opts, (err, data) => { - return err ? reject(err) : resolve(data); - }); + if (callback === void 0) return new Promise((resolve, reject) => { + connect.call(this, opts, (err, data) => { + return err ? reject(err) : resolve(data); }); - } + }); try { const connectHandler = new ConnectHandler(opts, callback); const connectOptions = { @@ -169887,16 +154206,13 @@ var require_api_connect = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; this.dispatch(connectOptions, connectHandler); } catch (err) { - if (typeof callback !== "function") { - throw err; - } + if (typeof callback !== "function") throw err; const opaque = opts?.opaque; queueMicrotask(() => callback(err, { opaque })); } } module.exports = connect; })); - //#endregion //#region ../node_modules/undici/lib/api/index.js var require_api = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -169906,7 +154222,6 @@ var require_api = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports.upgrade = require_api_upgrade(); module.exports.connect = require_api_connect(); })); - //#endregion //#region ../node_modules/undici/lib/mock/mock-errors.js var require_mock_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -169931,7 +154246,6 @@ var require_mock_errors = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; module.exports = { MockNotMatchedError }; })); - //#endregion //#region ../node_modules/undici/lib/mock/mock-symbols.js var require_mock_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -169965,7 +154279,6 @@ var require_mock_symbols = /* @__PURE__ */ __commonJSMin(((exports, module) => { kMockCallHistoryAddLog: Symbol("mock call history add log") }; })); - //#endregion //#region ../node_modules/undici/lib/mock/mock-utils.js var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -169976,15 +154289,9 @@ var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { const { types: { isPromise } } = __require("node:util"); const { InvalidArgumentError } = require_errors(); function matchValue(match, value) { - if (typeof match === "string") { - return match === value; - } - if (match instanceof RegExp) { - return match.test(value); - } - if (typeof match === "function") { - return match(value) === true; - } + if (typeof match === "string") return match === value; + if (match instanceof RegExp) return match.test(value); + if (typeof match === "function") return match(value) === true; return false; } function lowerCaseEntries(headers) { @@ -169998,66 +154305,41 @@ var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function getHeaderByName(headers, key) { if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) { - return headers[i + 1]; - } - } - return undefined; - } else if (typeof headers.get === "function") { - return headers.get(key); - } else { - return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; - } + for (let i = 0; i < headers.length; i += 2) if (headers[i].toLocaleLowerCase() === key.toLocaleLowerCase()) return headers[i + 1]; + return; + } else if (typeof headers.get === "function") return headers.get(key); + else return lowerCaseEntries(headers)[key.toLocaleLowerCase()]; } /** @param {string[]} headers */ function buildHeadersFromArray(headers) { const clone = headers.slice(); const entries = []; - for (let index = 0; index < clone.length; index += 2) { - entries.push([clone[index], clone[index + 1]]); - } + for (let index = 0; index < clone.length; index += 2) entries.push([clone[index], clone[index + 1]]); return Object.fromEntries(entries); } function matchHeaders(mockDispatch, headers) { if (typeof mockDispatch.headers === "function") { - if (Array.isArray(headers)) { - headers = buildHeadersFromArray(headers); - } + if (Array.isArray(headers)) headers = buildHeadersFromArray(headers); return mockDispatch.headers(headers ? lowerCaseEntries(headers) : {}); } - if (typeof mockDispatch.headers === "undefined") { - return true; - } - if (typeof headers !== "object" || typeof mockDispatch.headers !== "object") { - return false; - } - for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) { - const headerValue = getHeaderByName(headers, matchHeaderName); - if (!matchValue(matchHeaderValue, headerValue)) { - return false; - } - } + if (typeof mockDispatch.headers === "undefined") return true; + if (typeof headers !== "object" || typeof mockDispatch.headers !== "object") return false; + for (const [matchHeaderName, matchHeaderValue] of Object.entries(mockDispatch.headers)) if (!matchValue(matchHeaderValue, getHeaderByName(headers, matchHeaderName))) return false; return true; } function normalizeSearchParams(query) { - if (typeof query !== "string") { - return query; - } + if (typeof query !== "string") return query; const originalQp = new URLSearchParams(query); const normalizedQp = new URLSearchParams(); for (let [key, value] of originalQp.entries()) { key = key.replace("[]", ""); - const valueRepresentsString = /^(['"]).*\1$/.test(value); - if (valueRepresentsString) { + if (/^(['"]).*\1$/.test(value)) { normalizedQp.append(key, value); continue; } if (value.includes(",")) { const values = value.split(","); - for (const v of values) { - normalizedQp.append(key, v); - } + for (const v of values) normalizedQp.append(key, v); continue; } normalizedQp.append(key, value); @@ -170065,13 +154347,9 @@ var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { return normalizedQp; } function safeUrl(path) { - if (typeof path !== "string") { - return path; - } + if (typeof path !== "string") return path; const pathSegments = path.split("?", 3); - if (pathSegments.length !== 2) { - return path; - } + if (pathSegments.length !== 2) return path; const qp = new URLSearchParams(pathSegments.pop()); qp.sort(); return [...pathSegments, qp.toString()].join("?"); @@ -170084,19 +154362,12 @@ var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { return pathMatch && methodMatch && bodyMatch && headersMatch; } function getResponseData(data) { - if (Buffer.isBuffer(data)) { - return data; - } else if (data instanceof Uint8Array) { - return data; - } else if (data instanceof ArrayBuffer) { - return data; - } else if (typeof data === "object") { - return JSON.stringify(data); - } else if (data) { - return data.toString(); - } else { - return ""; - } + if (Buffer.isBuffer(data)) return data; + else if (data instanceof Uint8Array) return data; + else if (data instanceof ArrayBuffer) return data; + else if (typeof data === "object") return JSON.stringify(data); + else if (data) return data.toString(); + else return ""; } function getMockDispatch(mockDispatches, key) { const basePath = key.query ? serializePathWithQuery(key.path, key.query) : key.path; @@ -170105,22 +154376,13 @@ var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { let matchedMockDispatches = mockDispatches.filter(({ consumed }) => !consumed).filter(({ path, ignoreTrailingSlash }) => { return ignoreTrailingSlash ? matchValue(removeTrailingSlash(safeUrl(path)), resolvedPathWithoutTrailingSlash) : matchValue(safeUrl(path), resolvedPath); }); - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); - } + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for path '${resolvedPath}'`); matchedMockDispatches = matchedMockDispatches.filter(({ method }) => matchValue(method, key.method)); - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`); - } + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for method '${key.method}' on path '${resolvedPath}'`); matchedMockDispatches = matchedMockDispatches.filter(({ body }) => typeof body !== "undefined" ? matchValue(body, key.body) : true); - if (matchedMockDispatches.length === 0) { - throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`); - } + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for body '${key.body}' on path '${resolvedPath}'`); matchedMockDispatches = matchedMockDispatches.filter((mockDispatch) => matchHeaders(mockDispatch, key.headers)); - if (matchedMockDispatches.length === 0) { - const headers = typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers; - throw new MockNotMatchedError(`Mock dispatch not matched for headers '${headers}' on path '${resolvedPath}'`); - } + if (matchedMockDispatches.length === 0) throw new MockNotMatchedError(`Mock dispatch not matched for headers '${typeof key.headers === "object" ? JSON.stringify(key.headers) : key.headers}' on path '${resolvedPath}'`); return matchedMockDispatches[0]; } function addMockDispatch(mockDispatches, key, data, opts) { @@ -170146,25 +154408,17 @@ var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { } function deleteMockDispatch(mockDispatches, key) { const index = mockDispatches.findIndex((dispatch) => { - if (!dispatch.consumed) { - return false; - } + if (!dispatch.consumed) return false; return matchKey(dispatch, key); }); - if (index !== -1) { - mockDispatches.splice(index, 1); - } + if (index !== -1) mockDispatches.splice(index, 1); } /** * @param {string} path Path to remove trailing slash from */ function removeTrailingSlash(path) { - while (path.endsWith("/")) { - path = path.slice(0, -1); - } - if (path.length === 0) { - path = "/"; - } + while (path.endsWith("/")) path = path.slice(0, -1); + if (path.length === 0) path = "/"; return path; } function buildKey(opts) { @@ -170184,13 +154438,8 @@ var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { const key = keys[i]; const value = data[key]; const name = Buffer.from(`${key}`); - if (Array.isArray(value)) { - for (let j = 0; j < value.length; ++j) { - result.push(name, Buffer.from(`${value[j]}`)); - } - } else { - result.push(name, Buffer.from(`${value}`)); - } + if (Array.isArray(value)) for (let j = 0; j < value.length; ++j) result.push(name, Buffer.from(`${value[j]}`)); + else result.push(name, Buffer.from(`${value}`)); } return result; } @@ -170203,9 +154452,7 @@ var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { } async function getResponse(body) { const buffers = []; - for await (const data of body) { - buffers.push(data); - } + for await (const data of body) buffers.push(data); return Buffer.concat(buffers).toString("utf8"); } /** @@ -170215,12 +154462,10 @@ var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { const key = buildKey(opts); const mockDispatch = getMockDispatch(this[kDispatches], key); mockDispatch.timesInvoked++; - if (mockDispatch.data.callback) { - mockDispatch.data = { - ...mockDispatch.data, - ...mockDispatch.data.callback(opts) - }; - } + if (mockDispatch.data.callback) mockDispatch.data = { + ...mockDispatch.data, + ...mockDispatch.data.callback(opts) + }; const { data: { statusCode, data, headers, trailers, error }, delay, persist } = mockDispatch; const { timesInvoked, times } = mockDispatch; mockDispatch.consumed = !persist && timesInvoked >= times; @@ -170233,9 +154478,7 @@ var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { let aborted = false; let timer = null; function abort(err) { - if (aborted) { - return; - } + if (aborted) return; aborted = true; if (timer !== null) { clearTimeout(timer); @@ -170244,29 +154487,20 @@ var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { handler.onError(err); } handler.onConnect?.(abort, null); - if (typeof delay === "number" && delay > 0) { - timer = setTimeout(() => { - timer = null; - handleReply(this[kDispatches]); - }, delay); - } else { + if (typeof delay === "number" && delay > 0) timer = setTimeout(() => { + timer = null; handleReply(this[kDispatches]); - } + }, delay); + else handleReply(this[kDispatches]); function handleReply(mockDispatches, _data = data) { - if (aborted) { - return; - } + if (aborted) return; const optsHeaders = Array.isArray(opts.headers) ? buildHeadersFromArray(opts.headers) : opts.headers; const body = typeof _data === "function" ? _data({ ...opts, headers: optsHeaders }) : _data; - if (isPromise(body)) { - return body.then((newData) => handleReply(mockDispatches, newData)); - } - if (aborted) { - return; - } + if (isPromise(body)) return body.then((newData) => handleReply(mockDispatches, newData)); + if (aborted) return; const responseData = getResponseData(body); const responseHeaders = generateKeyValues(headers); const responseTrailers = generateKeyValues(trailers); @@ -170283,58 +154517,35 @@ var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { const origin = this[kOrigin]; const originalDispatch = this[kOriginalDispatch]; return function dispatch(opts, handler) { - if (agent.isMockActive) { - try { - mockDispatch.call(this, opts, handler); - } catch (error) { - if (error.code === "UND_MOCK_ERR_MOCK_NOT_MATCHED") { - const netConnect = agent[kGetNetConnect](); - if (netConnect === false) { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); - } - if (checkNetConnect(netConnect, origin)) { - originalDispatch.call(this, opts, handler); - } else { - throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); - } - } else { - throw error; - } - } - } else { - originalDispatch.call(this, opts, handler); - } + if (agent.isMockActive) try { + mockDispatch.call(this, opts, handler); + } catch (error) { + if (error.code === "UND_MOCK_ERR_MOCK_NOT_MATCHED") { + const netConnect = agent[kGetNetConnect](); + if (netConnect === false) throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect disabled)`); + if (checkNetConnect(netConnect, origin)) originalDispatch.call(this, opts, handler); + else throw new MockNotMatchedError(`${error.message}: subsequent request to origin ${origin} was not allowed (net.connect is not enabled for this origin)`); + } else throw error; + } + else originalDispatch.call(this, opts, handler); }; } function checkNetConnect(netConnect, origin) { const url = new URL(origin); - if (netConnect === true) { - return true; - } else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) { - return true; - } + if (netConnect === true) return true; + else if (Array.isArray(netConnect) && netConnect.some((matcher) => matchValue(matcher, url.host))) return true; return false; } function normalizeOrigin(origin) { - if (typeof origin !== "string" && !(origin instanceof URL)) { - return origin; - } - if (origin instanceof URL) { - return origin.origin; - } + if (typeof origin !== "string" && !(origin instanceof URL)) return origin; + if (origin instanceof URL) return origin.origin; return origin.toLowerCase(); } function buildAndValidateMockOptions(opts) { const { agent, ...mockOptions } = opts; - if ("enableCallHistory" in mockOptions && typeof mockOptions.enableCallHistory !== "boolean") { - throw new InvalidArgumentError("options.enableCallHistory must to be a boolean"); - } - if ("acceptNonStandardSearchParameters" in mockOptions && typeof mockOptions.acceptNonStandardSearchParameters !== "boolean") { - throw new InvalidArgumentError("options.acceptNonStandardSearchParameters must to be a boolean"); - } - if ("ignoreTrailingSlash" in mockOptions && typeof mockOptions.ignoreTrailingSlash !== "boolean") { - throw new InvalidArgumentError("options.ignoreTrailingSlash must to be a boolean"); - } + if ("enableCallHistory" in mockOptions && typeof mockOptions.enableCallHistory !== "boolean") throw new InvalidArgumentError("options.enableCallHistory must to be a boolean"); + if ("acceptNonStandardSearchParameters" in mockOptions && typeof mockOptions.acceptNonStandardSearchParameters !== "boolean") throw new InvalidArgumentError("options.acceptNonStandardSearchParameters must to be a boolean"); + if ("ignoreTrailingSlash" in mockOptions && typeof mockOptions.ignoreTrailingSlash !== "boolean") throw new InvalidArgumentError("options.ignoreTrailingSlash must to be a boolean"); return mockOptions; } module.exports = { @@ -170357,7 +154568,6 @@ var require_mock_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { normalizeOrigin }; })); - //#endregion //#region ../node_modules/undici/lib/mock/mock-interceptor.js var require_mock_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -170376,9 +154586,7 @@ var require_mock_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) * Delay a reply by a set amount in ms. */ delay(waitInMs) { - if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) { - throw new InvalidArgumentError("waitInMs must be a valid integer > 0"); - } + if (typeof waitInMs !== "number" || !Number.isInteger(waitInMs) || waitInMs <= 0) throw new InvalidArgumentError("waitInMs must be a valid integer > 0"); this[kMockDispatch].delay = waitInMs; return this; } @@ -170393,9 +154601,7 @@ var require_mock_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) * Allow one to define a reply for a set amount of matching requests. */ times(repeatTimes) { - if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) { - throw new InvalidArgumentError("repeatTimes must be a valid integer > 0"); - } + if (typeof repeatTimes !== "number" || !Number.isInteger(repeatTimes) || repeatTimes <= 0) throw new InvalidArgumentError("repeatTimes must be a valid integer > 0"); this[kMockDispatch].times = repeatTimes; return this; } @@ -170405,26 +154611,15 @@ var require_mock_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) */ var MockInterceptor = class { constructor(opts, mockDispatches) { - if (typeof opts !== "object") { - throw new InvalidArgumentError("opts must be an object"); - } - if (typeof opts.path === "undefined") { - throw new InvalidArgumentError("opts.path must be defined"); - } - if (typeof opts.method === "undefined") { - opts.method = "GET"; - } - if (typeof opts.path === "string") { - if (opts.query) { - opts.path = serializePathWithQuery(opts.path, opts.query); - } else { - const parsedURL = new URL(opts.path, "data://"); - opts.path = parsedURL.pathname + parsedURL.search; - } - } - if (typeof opts.method === "string") { - opts.method = opts.method.toUpperCase(); + if (typeof opts !== "object") throw new InvalidArgumentError("opts must be an object"); + if (typeof opts.path === "undefined") throw new InvalidArgumentError("opts.path must be defined"); + if (typeof opts.method === "undefined") opts.method = "GET"; + if (typeof opts.path === "string") if (opts.query) opts.path = serializePathWithQuery(opts.path, opts.query); + else { + const parsedURL = new URL(opts.path, "data://"); + opts.path = parsedURL.pathname + parsedURL.search; } + if (typeof opts.method === "string") opts.method = opts.method.toUpperCase(); this[kDispatchKey] = buildKey(opts); this[kDispatches] = mockDispatches; this[kIgnoreTrailingSlash] = opts.ignoreTrailingSlash ?? false; @@ -170435,29 +154630,23 @@ var require_mock_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) createMockScopeDispatchData({ statusCode, data, responseOptions }) { const responseData = getResponseData(data); const contentLength = this[kContentLength] ? { "content-length": responseData.length } : {}; - const headers = { - ...this[kDefaultHeaders], - ...contentLength, - ...responseOptions.headers - }; - const trailers = { - ...this[kDefaultTrailers], - ...responseOptions.trailers - }; return { statusCode, data, - headers, - trailers + headers: { + ...this[kDefaultHeaders], + ...contentLength, + ...responseOptions.headers + }, + trailers: { + ...this[kDefaultTrailers], + ...responseOptions.trailers + } }; } validateReplyParameters(replyParameters) { - if (typeof replyParameters.statusCode === "undefined") { - throw new InvalidArgumentError("statusCode must be defined"); - } - if (typeof replyParameters.responseOptions !== "object" || replyParameters.responseOptions === null) { - throw new InvalidArgumentError("responseOptions must be an object"); - } + if (typeof replyParameters.statusCode === "undefined") throw new InvalidArgumentError("statusCode must be defined"); + if (typeof replyParameters.responseOptions !== "object" || replyParameters.responseOptions === null) throw new InvalidArgumentError("responseOptions must be an object"); } /** * Mock an undici request with a defined reply. @@ -170466,9 +154655,7 @@ var require_mock_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) if (typeof replyOptionsCallbackOrStatusCode === "function") { const wrappedDefaultsCallback = (opts) => { const resolvedData = replyOptionsCallbackOrStatusCode(opts); - if (typeof resolvedData !== "object" || resolvedData === null) { - throw new InvalidArgumentError("reply options callback must return an object"); - } + if (typeof resolvedData !== "object" || resolvedData === null) throw new InvalidArgumentError("reply options callback must return an object"); const replyParameters = { data: "", responseOptions: {}, @@ -170477,36 +154664,29 @@ var require_mock_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) this.validateReplyParameters(replyParameters); return { ...this.createMockScopeDispatchData(replyParameters) }; }; - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); - return new MockScope(newMockDispatch); + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], wrappedDefaultsCallback, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] })); } const replyParameters = { statusCode: replyOptionsCallbackOrStatusCode, - data: arguments[1] === undefined ? "" : arguments[1], - responseOptions: arguments[2] === undefined ? {} : arguments[2] + data: arguments[1] === void 0 ? "" : arguments[1], + responseOptions: arguments[2] === void 0 ? {} : arguments[2] }; this.validateReplyParameters(replyParameters); const dispatchData = this.createMockScopeDispatchData(replyParameters); - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); - return new MockScope(newMockDispatch); + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], dispatchData, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] })); } /** * Mock an undici request with a defined error. */ replyWithError(error) { - if (typeof error === "undefined") { - throw new InvalidArgumentError("error must be defined"); - } - const newMockDispatch = addMockDispatch(this[kDispatches], this[kDispatchKey], { error }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] }); - return new MockScope(newMockDispatch); + if (typeof error === "undefined") throw new InvalidArgumentError("error must be defined"); + return new MockScope(addMockDispatch(this[kDispatches], this[kDispatchKey], { error }, { ignoreTrailingSlash: this[kIgnoreTrailingSlash] })); } /** * Set default reply headers on the interceptor for subsequent replies */ defaultReplyHeaders(headers) { - if (typeof headers === "undefined") { - throw new InvalidArgumentError("headers must be defined"); - } + if (typeof headers === "undefined") throw new InvalidArgumentError("headers must be defined"); this[kDefaultHeaders] = headers; return this; } @@ -170514,9 +154694,7 @@ var require_mock_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) * Set default reply trailers on the interceptor for subsequent replies */ defaultReplyTrailers(trailers) { - if (typeof trailers === "undefined") { - throw new InvalidArgumentError("trailers must be defined"); - } + if (typeof trailers === "undefined") throw new InvalidArgumentError("trailers must be defined"); this[kDefaultTrailers] = trailers; return this; } @@ -170531,7 +154709,6 @@ var require_mock_interceptor = /* @__PURE__ */ __commonJSMin(((exports, module) module.exports.MockInterceptor = MockInterceptor; module.exports.MockScope = MockScope; })); - //#endregion //#region ../node_modules/undici/lib/mock/mock-client.js var require_mock_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -170547,9 +154724,7 @@ var require_mock_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ var MockClient = class extends Client { constructor(origin, opts) { - if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { - throw new InvalidArgumentError("Argument opts.agent must implement Agent"); - } + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); super(origin, opts); this[kMockAgent] = opts.agent; this[kOrigin] = origin; @@ -170584,7 +154759,6 @@ var require_mock_client = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; module.exports = MockClient; })); - //#endregion //#region ../node_modules/undici/lib/mock/mock-call-history.js var require_mock_call_history = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -170602,9 +154776,7 @@ var require_mock_call_history = /* @__PURE__ */ __commonJSMin(((exports, module) function buildAndValidateFilterCallsOptions(options = {}) { const finalOptions = {}; if ("operator" in options) { - if (typeof options.operator !== "string" || options.operator.toUpperCase() !== "OR" && options.operator.toUpperCase() !== "AND") { - throw new InvalidArgumentError("options.operator must to be a case insensitive string equal to 'OR' or 'AND'"); - } + if (typeof options.operator !== "string" || options.operator.toUpperCase() !== "OR" && options.operator.toUpperCase() !== "AND") throw new InvalidArgumentError("options.operator must to be a case insensitive string equal to 'OR' or 'AND'"); return { ...finalOptions, operator: options.operator.toUpperCase() @@ -170614,25 +154786,19 @@ var require_mock_call_history = /* @__PURE__ */ __commonJSMin(((exports, module) } function makeFilterCalls(parameterName) { return (parameterValue) => { - if (typeof parameterValue === "string" || parameterValue == null) { - return this.logs.filter((log) => { - return log[parameterName] === parameterValue; - }); - } - if (parameterValue instanceof RegExp) { - return this.logs.filter((log) => { - return parameterValue.test(log[parameterName]); - }); - } + if (typeof parameterValue === "string" || parameterValue == null) return this.logs.filter((log) => { + return log[parameterName] === parameterValue; + }); + if (parameterValue instanceof RegExp) return this.logs.filter((log) => { + return parameterValue.test(log[parameterName]); + }); throw new InvalidArgumentError(`${parameterName} parameter should be one of string, regexp, undefined or null`); }; } function computeUrlWithMaybeSearchParameters(requestInit) { try { const url = new URL(requestInit.path, requestInit.origin); - if (url.search.length !== 0) { - return url; - } + if (url.search.length !== 0) return url; url.search = new URLSearchParams(requestInit.query).toString(); return url; } catch (error) { @@ -170676,12 +154842,8 @@ var require_mock_call_history = /* @__PURE__ */ __commonJSMin(((exports, module) }; let result = ""; this.toMap().forEach((value, key) => { - if (typeof value === "string" || value === undefined || value === null) { - result = `${result}${key}${options.betweenKeyValueSeparator}${value}${options.betweenPairSeparator}`; - } - if (typeof value === "object" && value !== null || Array.isArray(value)) { - result = `${result}${key}${options.betweenKeyValueSeparator}${JSON.stringify(value)}${options.betweenPairSeparator}`; - } + if (typeof value === "string" || value === void 0 || value === null) result = `${result}${key}${options.betweenKeyValueSeparator}${value}${options.betweenPairSeparator}`; + if (typeof value === "object" && value !== null || Array.isArray(value)) result = `${result}${key}${options.betweenKeyValueSeparator}${JSON.stringify(value)}${options.betweenPairSeparator}`; }); return result.slice(0, -1); } @@ -170698,64 +154860,33 @@ var require_mock_call_history = /* @__PURE__ */ __commonJSMin(((exports, module) return this.logs.at(-1); } nthCall(number) { - if (typeof number !== "number") { - throw new InvalidArgumentError("nthCall must be called with a number"); - } - if (!Number.isInteger(number)) { - throw new InvalidArgumentError("nthCall must be called with an integer"); - } - if (Math.sign(number) !== 1) { - throw new InvalidArgumentError("nthCall must be called with a positive value. use firstCall or lastCall instead"); - } + if (typeof number !== "number") throw new InvalidArgumentError("nthCall must be called with a number"); + if (!Number.isInteger(number)) throw new InvalidArgumentError("nthCall must be called with an integer"); + if (Math.sign(number) !== 1) throw new InvalidArgumentError("nthCall must be called with a positive value. use firstCall or lastCall instead"); return this.logs.at(number - 1); } filterCalls(criteria, options) { - if (this.logs.length === 0) { - return this.logs; - } - if (typeof criteria === "function") { - return this.logs.filter(criteria); - } - if (criteria instanceof RegExp) { - return this.logs.filter((log) => { - return criteria.test(log.toString()); - }); - } + if (this.logs.length === 0) return this.logs; + if (typeof criteria === "function") return this.logs.filter(criteria); + if (criteria instanceof RegExp) return this.logs.filter((log) => { + return criteria.test(log.toString()); + }); if (typeof criteria === "object" && criteria !== null) { - if (Object.keys(criteria).length === 0) { - return this.logs; - } + if (Object.keys(criteria).length === 0) return this.logs; const finalOptions = { operator: "OR", ...buildAndValidateFilterCallsOptions(options) }; let maybeDuplicatedLogsFiltered = []; - if ("protocol" in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.protocol, finalOptions, this.filterCallsByProtocol, maybeDuplicatedLogsFiltered); - } - if ("host" in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.host, finalOptions, this.filterCallsByHost, maybeDuplicatedLogsFiltered); - } - if ("port" in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.port, finalOptions, this.filterCallsByPort, maybeDuplicatedLogsFiltered); - } - if ("origin" in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.origin, finalOptions, this.filterCallsByOrigin, maybeDuplicatedLogsFiltered); - } - if ("path" in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.path, finalOptions, this.filterCallsByPath, maybeDuplicatedLogsFiltered); - } - if ("hash" in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.hash, finalOptions, this.filterCallsByHash, maybeDuplicatedLogsFiltered); - } - if ("fullUrl" in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.fullUrl, finalOptions, this.filterCallsByFullUrl, maybeDuplicatedLogsFiltered); - } - if ("method" in criteria) { - maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.method, finalOptions, this.filterCallsByMethod, maybeDuplicatedLogsFiltered); - } - const uniqLogsFiltered = [...new Set(maybeDuplicatedLogsFiltered)]; - return uniqLogsFiltered; + if ("protocol" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.protocol, finalOptions, this.filterCallsByProtocol, maybeDuplicatedLogsFiltered); + if ("host" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.host, finalOptions, this.filterCallsByHost, maybeDuplicatedLogsFiltered); + if ("port" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.port, finalOptions, this.filterCallsByPort, maybeDuplicatedLogsFiltered); + if ("origin" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.origin, finalOptions, this.filterCallsByOrigin, maybeDuplicatedLogsFiltered); + if ("path" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.path, finalOptions, this.filterCallsByPath, maybeDuplicatedLogsFiltered); + if ("hash" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.hash, finalOptions, this.filterCallsByHash, maybeDuplicatedLogsFiltered); + if ("fullUrl" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.fullUrl, finalOptions, this.filterCallsByFullUrl, maybeDuplicatedLogsFiltered); + if ("method" in criteria) maybeDuplicatedLogsFiltered = handleFilterCallsWithOptions(criteria.method, finalOptions, this.filterCallsByMethod, maybeDuplicatedLogsFiltered); + return [...new Set(maybeDuplicatedLogsFiltered)]; } throw new InvalidArgumentError("criteria parameter should be one of function, regexp, or object"); } @@ -170776,15 +154907,12 @@ var require_mock_call_history = /* @__PURE__ */ __commonJSMin(((exports, module) return log; } *[Symbol.iterator]() { - for (const log of this.calls()) { - yield log; - } + for (const log of this.calls()) yield log; } }; module.exports.MockCallHistory = MockCallHistory; module.exports.MockCallHistoryLog = MockCallHistoryLog; })); - //#endregion //#region ../node_modules/undici/lib/mock/mock-pool.js var require_mock_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -170800,9 +154928,7 @@ var require_mock_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ var MockPool = class extends Pool { constructor(origin, opts) { - if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") { - throw new InvalidArgumentError("Argument opts.agent must implement Agent"); - } + if (!opts || !opts.agent || typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); super(origin, opts); this[kMockAgent] = opts.agent; this[kOrigin] = origin; @@ -170837,7 +154963,6 @@ var require_mock_pool = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; module.exports = MockPool; })); - //#endregion //#region ../node_modules/undici/lib/mock/pending-interceptors-formatter.js var require_pending_interceptors_formatter = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -170873,7 +154998,6 @@ var require_pending_interceptors_formatter = /* @__PURE__ */ __commonJSMin(((exp } }; })); - //#endregion //#region ../node_modules/undici/lib/mock/mock-agent.js var require_mock_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -170896,16 +155020,12 @@ var require_mock_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { this[kMockAgentIsCallHistoryEnabled] = mockOptions.enableCallHistory ?? false; this[kMockAgentAcceptsNonStandardSearchParameters] = mockOptions.acceptNonStandardSearchParameters ?? false; this[kIgnoreTrailingSlash] = mockOptions.ignoreTrailingSlash ?? false; - if (opts?.agent && typeof opts.agent.dispatch !== "function") { - throw new InvalidArgumentError("Argument opts.agent must implement Agent"); - } + if (opts?.agent && typeof opts.agent.dispatch !== "function") throw new InvalidArgumentError("Argument opts.agent must implement Agent"); const agent = opts?.agent ? opts.agent : new Agent(opts); this[kAgent] = agent; this[kClients] = agent[kClients]; this[kOptions] = mockOptions; - if (this[kMockAgentIsCallHistoryEnabled]) { - this[kMockAgentRegisterCallHistory](); - } + if (this[kMockAgentIsCallHistoryEnabled]) this[kMockAgentRegisterCallHistory](); } get(origin) { const normalizedOrigin = normalizeOrigin(origin); @@ -170925,8 +155045,7 @@ var require_mock_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { const dispatchOpts = { ...opts }; if (acceptNonStandardSearchParameters && dispatchOpts.path) { const [path, searchParams] = dispatchOpts.path.split("?"); - const normalizedSearchParams = normalizeSearchParams(searchParams, acceptNonStandardSearchParameters); - dispatchOpts.path = `${path}?${normalizedSearchParams}`; + dispatchOpts.path = `${path}?${normalizeSearchParams(searchParams, acceptNonStandardSearchParameters)}`; } return this[kAgent].dispatch(dispatchOpts, handler); } @@ -170942,17 +155061,10 @@ var require_mock_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { this[kIsMockActive] = true; } enableNetConnect(matcher) { - if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) { - if (Array.isArray(this[kNetConnect])) { - this[kNetConnect].push(matcher); - } else { - this[kNetConnect] = [matcher]; - } - } else if (typeof matcher === "undefined") { - this[kNetConnect] = true; - } else { - throw new InvalidArgumentError("Unsupported matcher. Must be one of String|Function|RegExp."); - } + if (typeof matcher === "string" || typeof matcher === "function" || matcher instanceof RegExp) if (Array.isArray(this[kNetConnect])) this[kNetConnect].push(matcher); + else this[kNetConnect] = [matcher]; + else if (typeof matcher === "undefined") this[kNetConnect] = true; + else throw new InvalidArgumentError("Unsupported matcher. Must be one of String|Function|RegExp."); } disableNetConnect() { this[kNetConnect] = false; @@ -170969,17 +155081,13 @@ var require_mock_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { return this[kMockAgentMockCallHistoryInstance]; } clearCallHistory() { - if (this[kMockAgentMockCallHistoryInstance] !== undefined) { - this[kMockAgentMockCallHistoryInstance].clear(); - } + if (this[kMockAgentMockCallHistoryInstance] !== void 0) this[kMockAgentMockCallHistoryInstance].clear(); } get isMockActive() { return this[kIsMockActive]; } [kMockAgentRegisterCallHistory]() { - if (this[kMockAgentMockCallHistoryInstance] === undefined) { - this[kMockAgentMockCallHistoryInstance] = new MockCallHistory(); - } + if (this[kMockAgentMockCallHistoryInstance] === void 0) this[kMockAgentMockCallHistoryInstance] = new MockCallHistory(); } [kMockAgentAddCallHistoryLog](opts) { if (this[kMockAgentIsCallHistoryEnabled]) { @@ -170999,21 +155107,17 @@ var require_mock_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { } [kMockAgentGet](origin) { const result = this[kClients].get(origin); - if (result?.dispatcher) { - return result.dispatcher; - } + if (result?.dispatcher) return result.dispatcher; if (typeof origin !== "string") { const dispatcher = this[kFactory]("http://localhost:9999"); this[kMockAgentSet](origin, dispatcher); return dispatcher; } - for (const [keyMatcher, result] of Array.from(this[kClients])) { - if (result && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { - const dispatcher = this[kFactory](origin); - this[kMockAgentSet](origin, dispatcher); - dispatcher[kDispatches] = result.dispatcher[kDispatches]; - return dispatcher; - } + for (const [keyMatcher, result] of Array.from(this[kClients])) if (result && typeof keyMatcher !== "string" && matchValue(keyMatcher, origin)) { + const dispatcher = this[kFactory](origin); + this[kMockAgentSet](origin, dispatcher); + dispatcher[kDispatches] = result.dispatcher[kDispatches]; + return dispatcher; } } [kGetNetConnect]() { @@ -171028,15 +155132,12 @@ var require_mock_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { } assertNoPendingInterceptors({ pendingInterceptorsFormatter = new PendingInterceptorsFormatter() } = {}) { const pending = this.pendingInterceptors(); - if (pending.length === 0) { - return; - } + if (pending.length === 0) return; throw new UndiciError(pending.length === 1 ? `1 interceptor is pending:\n\n${pendingInterceptorsFormatter.format(pending)}`.trim() : `${pending.length} interceptors are pending:\n\n${pendingInterceptorsFormatter.format(pending)}`.trim()); } }; module.exports = MockAgent; })); - //#endregion //#region ../node_modules/undici/lib/mock/snapshot-utils.js var require_snapshot_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -171092,24 +155193,14 @@ var require_snapshot_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => * @returns {IsUrlExcluded} - A function that checks if a URL matches any of the exclude patterns */ function isUrlExcludedFactory(excludePatterns = []) { - if (excludePatterns.length === 0) { - return () => false; - } + if (excludePatterns.length === 0) return () => false; return function isUrlExcluded(url) { let urlLowerCased; - for (const pattern of excludePatterns) { - if (typeof pattern === "string") { - if (!urlLowerCased) { - urlLowerCased = url.toLowerCase(); - } - if (urlLowerCased.includes(pattern.toLowerCase())) { - return true; - } - } else if (pattern instanceof RegExp) { - if (pattern.test(url)) { - return true; - } - } + for (const pattern of excludePatterns) if (typeof pattern === "string") { + if (!urlLowerCased) urlLowerCased = url.toLowerCase(); + if (urlLowerCased.includes(pattern.toLowerCase())) return true; + } else if (pattern instanceof RegExp) { + if (pattern.test(url)) return true; } return false; }; @@ -171128,7 +155219,7 @@ var require_snapshot_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => for (let i = 0; i < headers.length; i += 2) { const key = headers[i]; const value = headers[i + 1]; - if (key && value !== undefined) { + if (key && value !== void 0) { const keyStr = Buffer.isBuffer(key) ? key.toString() : key; const valueStr = Buffer.isBuffer(value) ? value.toString() : value; normalizedHeaders[keyStr.toLowerCase()] = valueStr; @@ -171137,11 +155228,7 @@ var require_snapshot_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => return normalizedHeaders; } if (headers && typeof headers === "object") { - for (const [key, value] of Object.entries(headers)) { - if (key && typeof key === "string") { - normalizedHeaders[key.toLowerCase()] = Array.isArray(value) ? value.join(", ") : String(value); - } - } + for (const [key, value] of Object.entries(headers)) if (key && typeof key === "string") normalizedHeaders[key.toLowerCase()] = Array.isArray(value) ? value.join(", ") : String(value); } return normalizedHeaders; } @@ -171156,9 +155243,7 @@ var require_snapshot_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => * @returns {asserts mode is SnapshotMode} */ function validateSnapshotMode(mode) { - if (!validSnapshotModes.includes(mode)) { - throw new InvalidArgumentError(`Invalid snapshot mode: ${mode}. Must be one of: ${validSnapshotModes.join(", ")}`); - } + if (!validSnapshotModes.includes(mode)) throw new InvalidArgumentError(`Invalid snapshot mode: ${mode}. Must be one of: ${validSnapshotModes.join(", ")}`); } module.exports = { createHeaderFilters, @@ -171169,7 +155254,6 @@ var require_snapshot_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => validateSnapshotMode }; })); - //#endregion //#region ../node_modules/undici/lib/mock/snapshot-recorder.js var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -171255,9 +155339,7 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) function formatRequestKey(opts, headerFilters, matchOptions = {}) { const url = new URL(opts.path, opts.origin); const normalized = opts._normalizedHeaders || normalizeHeaders(opts.headers); - if (!opts._normalizedHeaders) { - opts._normalizedHeaders = normalized; - } + if (!opts._normalizedHeaders) opts._normalizedHeaders = normalized; return { method: opts.method || "GET", url: matchOptions.matchQuery !== false ? url.toString() : `${url.origin}${url.pathname}`, @@ -171321,14 +155403,11 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) for (const key of headerKeys) { const values = Array.isArray(formattedRequest.headers[key]) ? formattedRequest.headers[key] : [formattedRequest.headers[key]]; parts.push(key); - for (const value of values.sort()) { - parts.push(String(value)); - } + for (const value of values.sort()) parts.push(String(value)); } } parts.push(formattedRequest.body); - const content = parts.join("|"); - return hashId(content); + return hashId(parts.join("|")); } var SnapshotRecorder = class { /** @type {NodeJS.Timeout | null} */ @@ -171336,7 +155415,7 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) /** @type {import('./snapshot-utils').IsUrlExcluded} */ #isUrlExcluded; /** @type {Map} */ - #snapshots = new Map(); + #snapshots = /* @__PURE__ */ new Map(); /** @type {string|undefined} */ #snapshotPath; /** @type {number} */ @@ -171368,9 +155447,7 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) this.shouldRecord = options.shouldRecord || (() => true); this.shouldPlayback = options.shouldPlayback || (() => true); this.#isUrlExcluded = isUrlExcludedFactory(options.excludeUrls); - if (this.#autoFlush && this.#snapshotPath) { - this.#startAutoFlush(); - } + if (this.#autoFlush && this.#snapshotPath) this.#startAutoFlush(); } /** * Records a request-response interaction @@ -171379,12 +155456,8 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) * @return {Promise} - Resolves when the recording is complete */ async record(requestOpts, response) { - if (!this.shouldRecord(requestOpts)) { - return; - } - if (this.isUrlExcluded(requestOpts)) { - return; - } + if (!this.shouldRecord(requestOpts)) return; + if (this.isUrlExcluded(requestOpts)) return; const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); const hash = createRequestHash(request); const normalizedHeaders = normalizeHeaders(response.headers); @@ -171402,18 +155475,14 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) const existingSnapshot = this.#snapshots.get(hash); if (existingSnapshot && existingSnapshot.responses) { existingSnapshot.responses.push(responseData); - existingSnapshot.timestamp = new Date().toISOString(); - } else { - this.#snapshots.set(hash, { - request, - responses: [responseData], - callCount: 0, - timestamp: new Date().toISOString() - }); - } - if (this.#autoFlush && this.#snapshotPath) { - this.#scheduleFlush(); - } + existingSnapshot.timestamp = (/* @__PURE__ */ new Date()).toISOString(); + } else this.#snapshots.set(hash, { + request, + responses: [responseData], + callCount: 0, + timestamp: (/* @__PURE__ */ new Date()).toISOString() + }); + if (this.#autoFlush && this.#snapshotPath) this.#scheduleFlush(); } /** * Checks if a URL should be excluded from recording/playback @@ -171432,16 +155501,11 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) * @returns {SnapshotEntry&Record<'response', SnapshotEntryResponse>|undefined} - Matching snapshot response or undefined if not found */ findSnapshot(requestOpts) { - if (!this.shouldPlayback(requestOpts)) { - return undefined; - } - if (this.isUrlExcluded(requestOpts)) { - return undefined; - } - const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); - const hash = createRequestHash(request); + if (!this.shouldPlayback(requestOpts)) return; + if (this.isUrlExcluded(requestOpts)) return; + const hash = createRequestHash(formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions)); const snapshot = this.#snapshots.get(hash); - if (!snapshot) return undefined; + if (!snapshot) return void 0; const currentCallCount = snapshot.callCount || 0; const responseIndex = Math.min(currentCallCount, snapshot.responses.length - 1); snapshot.callCount = currentCallCount + 1; @@ -171457,26 +155521,17 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) */ async loadSnapshots(filePath) { const path = filePath || this.#snapshotPath; - if (!path) { - throw new InvalidArgumentError("Snapshot path is required"); - } + if (!path) throw new InvalidArgumentError("Snapshot path is required"); try { const data = await readFile$1(resolve(path), "utf8"); const parsed = JSON.parse(data); if (Array.isArray(parsed)) { this.#snapshots.clear(); - for (const { hash, snapshot } of parsed) { - this.#snapshots.set(hash, snapshot); - } - } else { - this.#snapshots = new Map(Object.entries(parsed)); - } + for (const { hash, snapshot } of parsed) this.#snapshots.set(hash, snapshot); + } else this.#snapshots = new Map(Object.entries(parsed)); } catch (error) { - if (error.code === "ENOENT") { - this.#snapshots.clear(); - } else { - throw new UndiciError(`Failed to load snapshots from ${path}`, { cause: error }); - } + if (error.code === "ENOENT") this.#snapshots.clear(); + else throw new UndiciError(`Failed to load snapshots from ${path}`, { cause: error }); } } /** @@ -171487,9 +155542,7 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) */ async saveSnapshots(filePath) { const path = filePath || this.#snapshotPath; - if (!path) { - throw new InvalidArgumentError("Snapshot path is required"); - } + if (!path) throw new InvalidArgumentError("Snapshot path is required"); const resolvedPath = resolve(path); await mkdir$1(dirname$1(resolvedPath), { recursive: true }); const data = Array.from(this.#snapshots.entries()).map(([hash, snapshot]) => ({ @@ -171524,9 +155577,7 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) * @returns {void} */ resetCallCounts() { - for (const snapshot of this.#snapshots.values()) { - snapshot.callCount = 0; - } + for (const snapshot of this.#snapshots.values()) snapshot.callCount = 0; } /** * Deletes a specific snapshot by request options @@ -171534,8 +155585,7 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) * @returns {boolean} - True if snapshot was deleted, false if not found */ deleteSnapshot(requestOpts) { - const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); - const hash = createRequestHash(request); + const hash = createRequestHash(formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions)); return this.#snapshots.delete(hash); } /** @@ -171544,8 +155594,7 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) * @returns {SnapshotInfo|null} - Snapshot information or null if not found */ getSnapshotInfo(requestOpts) { - const request = formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions); - const hash = createRequestHash(request); + const hash = createRequestHash(formatRequestKey(requestOpts, this.#headerFilters, this.matchOptions)); const snapshot = this.#snapshots.get(hash); if (!snapshot) return null; return { @@ -171563,13 +155612,8 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) */ replaceSnapshots(snapshotData) { this.#snapshots.clear(); - if (Array.isArray(snapshotData)) { - for (const { hash, snapshot } of snapshotData) { - this.#snapshots.set(hash, snapshot); - } - } else if (snapshotData && typeof snapshotData === "object") { - this.#snapshots = new Map(Object.entries(snapshotData)); - } + if (Array.isArray(snapshotData)) for (const { hash, snapshot } of snapshotData) this.#snapshots.set(hash, snapshot); + else if (snapshotData && typeof snapshotData === "object") this.#snapshots = new Map(Object.entries(snapshotData)); } /** * Starts the auto-flush timer @@ -171595,11 +155639,8 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) #scheduleFlush() { this.#flushTimeout = setTimeout$2(() => { this.saveSnapshots().catch(() => {}); - if (this.#autoFlush) { - this.#flushTimeout?.refresh(); - } else { - this.#flushTimeout = null; - } + if (this.#autoFlush) this.#flushTimeout?.refresh(); + else this.#flushTimeout = null; }, 1e3); } /** @@ -171618,9 +155659,7 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) * @returns {Promise} */ async close() { - if (this.#snapshotPath && this.#snapshots.size !== 0) { - await this.saveSnapshots(); - } + if (this.#snapshotPath && this.#snapshots.size !== 0) await this.saveSnapshots(); this.destroy(); } }; @@ -171633,7 +155672,6 @@ var require_snapshot_recorder = /* @__PURE__ */ __commonJSMin(((exports, module) createHeaderFilters }; })); - //#endregion //#region ../node_modules/undici/lib/mock/snapshot-agent.js var require_snapshot_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -171658,9 +155696,7 @@ var require_snapshot_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => const { mode = "record", snapshotPath = null, ...mockAgentOpts } = opts; super(mockAgentOpts); validateSnapshotMode(mode); - if ((mode === "playback" || mode === "update") && !snapshotPath) { - throw new InvalidArgumentError(`snapshotPath is required when mode is '${mode}'`); - } + if ((mode === "playback" || mode === "update") && !snapshotPath) throw new InvalidArgumentError(`snapshotPath is required when mode is '${mode}'`); this[kSnapshotMode] = mode; this[kSnapshotPath] = snapshotPath; this[kSnapshotRecorder] = new SnapshotRecorder({ @@ -171680,29 +155716,19 @@ var require_snapshot_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => excludeUrls: opts.excludeUrls }); this[kSnapshotLoaded] = false; - if (this[kSnapshotMode] === "record" || this[kSnapshotMode] === "update" || this[kSnapshotMode] === "playback" && opts.excludeUrls && opts.excludeUrls.length > 0) { - this[kRealAgent] = new Agent(opts); - } - if ((this[kSnapshotMode] === "playback" || this[kSnapshotMode] === "update") && this[kSnapshotPath]) { - this.loadSnapshots().catch(() => {}); - } + if (this[kSnapshotMode] === "record" || this[kSnapshotMode] === "update" || this[kSnapshotMode] === "playback" && opts.excludeUrls && opts.excludeUrls.length > 0) this[kRealAgent] = new Agent(opts); + if ((this[kSnapshotMode] === "playback" || this[kSnapshotMode] === "update") && this[kSnapshotPath]) this.loadSnapshots().catch(() => {}); } dispatch(opts, handler) { handler = WrapHandler.wrap(handler); const mode = this[kSnapshotMode]; - if (this[kSnapshotRecorder].isUrlExcluded(opts)) { - return this[kRealAgent].dispatch(opts, handler); - } + if (this[kSnapshotRecorder].isUrlExcluded(opts)) return this[kRealAgent].dispatch(opts, handler); if (mode === "playback" || mode === "update") { - if (!this[kSnapshotLoaded]) { - return this.#asyncDispatch(opts, handler); - } + if (!this[kSnapshotLoaded]) return this.#asyncDispatch(opts, handler); const snapshot = this[kSnapshotRecorder].findSnapshot(opts); - if (snapshot) { - return this.#replaySnapshot(snapshot, handler); - } else if (mode === "update") { - return this.#recordAndReplay(opts, handler); - } else { + if (snapshot) return this.#replaySnapshot(snapshot, handler); + else if (mode === "update") return this.#recordAndReplay(opts, handler); + else { const error = new UndiciError(`No snapshot found for ${opts.method || "GET"} ${opts.path}`); if (handler.onError) { handler.onError(error); @@ -171710,9 +155736,7 @@ var require_snapshot_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => } throw error; } - } else if (mode === "record") { - return this.#recordAndReplay(opts, handler); - } + } else if (mode === "record") return this.#recordAndReplay(opts, handler); } /** * Async version of dispatch for when we need to load snapshots first @@ -171732,7 +155756,7 @@ var require_snapshot_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => body: [] }; const self = this; - const recordingHandler = { + return this[kRealAgent].dispatch(opts, { onRequestStart(controller, context) { return handler.onRequestStart(controller, { ...context, @@ -171761,9 +155785,7 @@ var require_snapshot_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => trailers: responseData.trailers }).then(() => handler.onResponseEnd(controller, trailers)).catch((error) => handler.onResponseError(controller, error)); } - }; - const agent = this[kRealAgent]; - return agent.dispatch(opts, recordingHandler); + }); } /** * Replays a recorded response @@ -171803,9 +155825,7 @@ var require_snapshot_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => async loadSnapshots(filePath) { await this[kSnapshotRecorder].loadSnapshots(filePath || this[kSnapshotPath]); this[kSnapshotLoaded] = true; - if (this[kSnapshotMode] === "playback") { - this.#setupMockInterceptors(); - } + if (this[kSnapshotMode] === "playback") this.#setupMockInterceptors(); } /** * Saves snapshots to file @@ -171911,20 +155931,15 @@ var require_snapshot_agent = /* @__PURE__ */ __commonJSMin(((exports, module) => }; module.exports = SnapshotAgent; })); - //#endregion //#region ../node_modules/undici/lib/global.js var require_global = /* @__PURE__ */ __commonJSMin(((exports, module) => { const globalDispatcher = Symbol.for("undici.globalDispatcher.1"); const { InvalidArgumentError } = require_errors(); const Agent = require_agent(); - if (getGlobalDispatcher() === undefined) { - setGlobalDispatcher(new Agent()); - } + if (getGlobalDispatcher() === void 0) setGlobalDispatcher(new Agent()); function setGlobalDispatcher(agent) { - if (!agent || typeof agent.dispatch !== "function") { - throw new InvalidArgumentError("Argument agent must implement Agent"); - } + if (!agent || typeof agent.dispatch !== "function") throw new InvalidArgumentError("Argument agent must implement Agent"); Object.defineProperty(globalThis, globalDispatcher, { value: agent, writable: true, @@ -171935,25 +155950,23 @@ var require_global = /* @__PURE__ */ __commonJSMin(((exports, module) => { function getGlobalDispatcher() { return globalThis[globalDispatcher]; } - const installedExports = [ - "fetch", - "Headers", - "Response", - "Request", - "FormData", - "WebSocket", - "CloseEvent", - "ErrorEvent", - "MessageEvent", - "EventSource" - ]; module.exports = { setGlobalDispatcher, getGlobalDispatcher, - installedExports + installedExports: [ + "fetch", + "Headers", + "Response", + "Request", + "FormData", + "WebSocket", + "CloseEvent", + "ErrorEvent", + "MessageEvent", + "EventSource" + ] }; })); - //#endregion //#region ../node_modules/undici/lib/handler/decorator-handler.js var require_decorator_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -171968,9 +155981,7 @@ var require_decorator_handler = /* @__PURE__ */ __commonJSMin(((exports, module) #onErrorCalled = false; #onResponseStartCalled = false; constructor(handler) { - if (typeof handler !== "object" || handler === null) { - throw new TypeError("handler must be an object"); - } + if (typeof handler !== "object" || handler === null) throw new TypeError("handler must be an object"); this.#handler = WrapHandler.wrap(handler); } onRequestStart(...args) { @@ -172009,7 +156020,6 @@ var require_decorator_handler = /* @__PURE__ */ __commonJSMin(((exports, module) onBodySent() {} }; })); - //#endregion //#region ../node_modules/undici/lib/handler/redirect-handler.js var require_redirect_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -172041,16 +156051,12 @@ var require_redirect_handler = /* @__PURE__ */ __commonJSMin(((exports, module) }; var RedirectHandler = class RedirectHandler { static buildDispatch(dispatcher, maxRedirections) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError("maxRedirections must be a positive number"); - } + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError("maxRedirections must be a positive number"); const dispatch = dispatcher.dispatch.bind(dispatcher); return (opts, originalHandler) => dispatch(opts, new RedirectHandler(dispatch, maxRedirections, opts, originalHandler)); } constructor(dispatch, maxRedirections, opts, handler) { - if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) { - throw new InvalidArgumentError("maxRedirections must be a positive number"); - } + if (maxRedirections != null && (!Number.isInteger(maxRedirections) || maxRedirections < 0)) throw new InvalidArgumentError("maxRedirections must be a positive number"); this.dispatch = dispatch; this.location = null; const { maxRedirections: _, ...cleanOpts } = opts; @@ -172059,22 +156065,17 @@ var require_redirect_handler = /* @__PURE__ */ __commonJSMin(((exports, module) this.handler = handler; this.history = []; if (util.isStream(this.opts.body)) { - if (util.bodyLength(this.opts.body) === 0) { - this.opts.body.on("data", function() { - assert$14(false); - }); - } + if (util.bodyLength(this.opts.body) === 0) this.opts.body.on("data", function() { + assert$14(false); + }); if (typeof this.opts.body.readableDidRead !== "boolean") { this.opts.body[kBodyUsed] = false; EE$1.prototype.on.call(this.opts.body, "data", function() { this[kBodyUsed] = true; }); } - } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") { - this.opts.body = new BodyAsyncIterable(this.opts.body); - } else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body) && !util.isFormDataLike(this.opts.body)) { - this.opts.body = new BodyAsyncIterable(this.opts.body); - } + } else if (this.opts.body && typeof this.opts.body.pipeTo === "function") this.opts.body = new BodyAsyncIterable(this.opts.body); + else if (this.opts.body && typeof this.opts.body !== "string" && !ArrayBuffer.isView(this.opts.body) && util.isIterable(this.opts.body) && !util.isFormDataLike(this.opts.body)) this.opts.body = new BodyAsyncIterable(this.opts.body); } onRequestStart(controller, context) { this.handler.onRequestStart?.(controller, { @@ -172086,27 +156087,19 @@ var require_redirect_handler = /* @__PURE__ */ __commonJSMin(((exports, module) this.handler.onRequestUpgrade?.(controller, statusCode, headers, socket); } onResponseStart(controller, statusCode, headers, statusMessage) { - if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) { - throw new Error("max redirects"); - } + if (this.opts.throwOnMaxRedirect && this.history.length >= this.maxRedirections) throw new Error("max redirects"); if ((statusCode === 301 || statusCode === 302) && this.opts.method === "POST") { this.opts.method = "GET"; - if (util.isStream(this.opts.body)) { - util.destroy(this.opts.body.on("error", noop)); - } + if (util.isStream(this.opts.body)) util.destroy(this.opts.body.on("error", noop)); this.opts.body = null; } if (statusCode === 303 && this.opts.method !== "HEAD") { this.opts.method = "GET"; - if (util.isStream(this.opts.body)) { - util.destroy(this.opts.body.on("error", noop)); - } + if (util.isStream(this.opts.body)) util.destroy(this.opts.body.on("error", noop)); this.opts.body = null; } this.location = this.history.length >= this.maxRedirections || util.isDisturbed(this.opts.body) || redirectableStatusCodes.indexOf(statusCode) === -1 ? null : headers.location; - if (this.opts.origin) { - this.history.push(new URL(this.opts.path, this.opts.origin)); - } + if (this.opts.origin) this.history.push(new URL(this.opts.path, this.opts.origin)); if (!this.location) { this.handler.onResponseStart?.(controller, statusCode, headers, statusMessage); return; @@ -172114,39 +156107,26 @@ var require_redirect_handler = /* @__PURE__ */ __commonJSMin(((exports, module) const { origin, pathname, search } = util.parseURL(new URL(this.location, this.opts.origin && new URL(this.opts.path, this.opts.origin))); const path = search ? `${pathname}${search}` : pathname; const redirectUrlString = `${origin}${path}`; - for (const historyUrl of this.history) { - if (historyUrl.toString() === redirectUrlString) { - throw new InvalidArgumentError(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`); - } - } + for (const historyUrl of this.history) if (historyUrl.toString() === redirectUrlString) throw new InvalidArgumentError(`Redirect loop detected. Cannot redirect to ${origin}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`); this.opts.headers = cleanRequestHeaders(this.opts.headers, statusCode === 303, this.opts.origin !== origin); this.opts.path = path; this.opts.origin = origin; this.opts.query = null; } onResponseData(controller, chunk) { - if (this.location) {} else { - this.handler.onResponseData?.(controller, chunk); - } + if (this.location) {} else this.handler.onResponseData?.(controller, chunk); } onResponseEnd(controller, trailers) { - if (this.location) { - this.dispatch(this.opts, this); - } else { - this.handler.onResponseEnd(controller, trailers); - } + if (this.location) this.dispatch(this.opts, this); + else this.handler.onResponseEnd(controller, trailers); } onResponseError(controller, error) { this.handler.onResponseError?.(controller, error); } }; function shouldRemoveHeader(header, removeContent, unknownOrigin) { - if (header.length === 4) { - return util.headerNameToString(header) === "host"; - } - if (removeContent && util.headerNameToString(header).startsWith("content-")) { - return true; - } + if (header.length === 4) return util.headerNameToString(header) === "host"; + if (removeContent && util.headerNameToString(header).startsWith("content-")) return true; if (unknownOrigin && (header.length === 13 || header.length === 6 || header.length === 19)) { const name = util.headerNameToString(header); return name === "authorization" || name === "cookie" || name === "proxy-authorization"; @@ -172156,26 +156136,15 @@ var require_redirect_handler = /* @__PURE__ */ __commonJSMin(((exports, module) function cleanRequestHeaders(headers, removeContent, unknownOrigin) { const ret = []; if (Array.isArray(headers)) { - for (let i = 0; i < headers.length; i += 2) { - if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) { - ret.push(headers[i], headers[i + 1]); - } - } + for (let i = 0; i < headers.length; i += 2) if (!shouldRemoveHeader(headers[i], removeContent, unknownOrigin)) ret.push(headers[i], headers[i + 1]); } else if (headers && typeof headers === "object") { const entries = typeof headers[Symbol.iterator] === "function" ? headers : Object.entries(headers); - for (const [key, value] of entries) { - if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) { - ret.push(key, value); - } - } - } else { - assert$14(headers == null, "headers must be an object or an array"); - } + for (const [key, value] of entries) if (!shouldRemoveHeader(key, removeContent, unknownOrigin)) ret.push(key, value); + } else assert$14(headers == null, "headers must be an object or an array"); return ret; } module.exports = RedirectHandler; })); - //#endregion //#region ../node_modules/undici/lib/interceptor/redirect.js var require_redirect = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -172184,18 +156153,14 @@ var require_redirect = /* @__PURE__ */ __commonJSMin(((exports, module) => { return (dispatch) => { return function Intercept(opts, handler) { const { maxRedirections = defaultMaxRedirections, ...rest } = opts; - if (maxRedirections == null || maxRedirections === 0) { - return dispatch(opts, handler); - } + if (maxRedirections == null || maxRedirections === 0) return dispatch(opts, handler); const dispatchOpts = { ...rest }; - const redirectHandler = new RedirectHandler(dispatch, maxRedirections, dispatchOpts, handler); - return dispatch(dispatchOpts, redirectHandler); + return dispatch(dispatchOpts, new RedirectHandler(dispatch, maxRedirections, dispatchOpts, handler)); }; }; } module.exports = createRedirectInterceptor; })); - //#endregion //#region ../node_modules/undici/lib/interceptor/response-error.js var require_response_error = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -172225,27 +156190,19 @@ var require_response_error = /* @__PURE__ */ __commonJSMin(((exports, module) => this.#statusCode = statusCode; this.#headers = headers; this.#contentType = headers["content-type"]; - if (this.#statusCode < 400) { - return super.onResponseStart(controller, statusCode, headers, statusMessage); - } - if (this.#checkContentType("application/json") || this.#checkContentType("text/plain")) { - this.#decoder = new TextDecoder("utf-8"); - } + if (this.#statusCode < 400) return super.onResponseStart(controller, statusCode, headers, statusMessage); + if (this.#checkContentType("application/json") || this.#checkContentType("text/plain")) this.#decoder = new TextDecoder("utf-8"); } onResponseData(controller, chunk) { - if (this.#statusCode < 400) { - return super.onResponseData(controller, chunk); - } + if (this.#statusCode < 400) return super.onResponseData(controller, chunk); this.#body += this.#decoder?.decode(chunk, { stream: true }) ?? ""; } onResponseEnd(controller, trailers) { if (this.#statusCode >= 400) { - this.#body += this.#decoder?.decode(undefined, { stream: false }) ?? ""; - if (this.#checkContentType("application/json")) { - try { - this.#body = JSON.parse(this.#body); - } catch {} - } + this.#body += this.#decoder?.decode(void 0, { stream: false }) ?? ""; + if (this.#checkContentType("application/json")) try { + this.#body = JSON.parse(this.#body); + } catch {} let err; const stackTraceLimit = Error.stackTraceLimit; Error.stackTraceLimit = 0; @@ -172258,9 +156215,7 @@ var require_response_error = /* @__PURE__ */ __commonJSMin(((exports, module) => Error.stackTraceLimit = stackTraceLimit; } super.onResponseError(controller, err); - } else { - super.onResponseEnd(controller, trailers); - } + } else super.onResponseEnd(controller, trailers); } onResponseError(controller, err) { super.onResponseError(controller, err); @@ -172274,7 +156229,6 @@ var require_response_error = /* @__PURE__ */ __commonJSMin(((exports, module) => }; }; })); - //#endregion //#region ../node_modules/undici/lib/interceptor/retry.js var require_retry = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -172296,7 +156250,6 @@ var require_retry = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; }; })); - //#endregion //#region ../node_modules/undici/lib/interceptor/dump.js var require_dump = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -172310,9 +156263,7 @@ var require_dump = /* @__PURE__ */ __commonJSMin(((exports, module) => { aborted = false; reason = false; constructor({ maxSize, signal }, handler) { - if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) { - throw new InvalidArgumentError("maxSize must be a number greater than 0"); - } + if (maxSize != null && (!Number.isFinite(maxSize) || maxSize < 1)) throw new InvalidArgumentError("maxSize must be a number greater than 0"); super(handler); this.#maxSize = maxSize ?? this.#maxSize; } @@ -172327,18 +156278,12 @@ var require_dump = /* @__PURE__ */ __commonJSMin(((exports, module) => { } onResponseStart(controller, statusCode, headers, statusMessage) { const contentLength = headers["content-length"]; - if (contentLength != null && contentLength > this.#maxSize) { - throw new RequestAbortedError(`Response size (${contentLength}) larger than maxSize (${this.#maxSize})`); - } - if (this.aborted === true) { - return true; - } + if (contentLength != null && contentLength > this.#maxSize) throw new RequestAbortedError(`Response size (${contentLength}) larger than maxSize (${this.#maxSize})`); + if (this.aborted === true) return true; return super.onResponseStart(controller, statusCode, headers, statusMessage); } onResponseError(controller, err) { - if (this.#dumped) { - return; - } + if (this.#dumped) return; err = this.#controller?.reason ?? err; super.onResponseError(controller, err); } @@ -172346,18 +156291,13 @@ var require_dump = /* @__PURE__ */ __commonJSMin(((exports, module) => { this.#size = this.#size + chunk.length; if (this.#size >= this.#maxSize) { this.#dumped = true; - if (this.aborted === true) { - super.onResponseError(controller, this.reason); - } else { - super.onResponseEnd(controller, {}); - } + if (this.aborted === true) super.onResponseError(controller, this.reason); + else super.onResponseEnd(controller, {}); } return true; } onResponseEnd(controller, trailers) { - if (this.#dumped) { - return; - } + if (this.#dumped) return; if (this.#controller.aborted === true) { super.onResponseError(controller, this.reason); return; @@ -172369,17 +156309,15 @@ var require_dump = /* @__PURE__ */ __commonJSMin(((exports, module) => { return (dispatch) => { return function Intercept(opts, handler) { const { dumpMaxSize = defaultMaxSize } = opts; - const dumpHandler = new DumpHandler({ + return dispatch(opts, new DumpHandler({ maxSize: dumpMaxSize, signal: opts.signal - }, handler); - return dispatch(opts, dumpHandler); + }, handler)); }; }; } module.exports = createDumpInterceptor; })); - //#endregion //#region ../node_modules/undici/lib/interceptor/dns.js var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -172390,7 +156328,7 @@ var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { const maxInt = Math.pow(2, 31) - 1; var DNSStorage = class { #maxItems = 0; - #records = new Map(); + #records = /* @__PURE__ */ new Map(); constructor(opts) { this.#maxItems = opts.maxItems; } @@ -172442,26 +156380,21 @@ var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { maxTTL: this.#maxTTL, maxItems: this.#maxItems }; - if (ips == null) { - this.lookup(origin, newOpts, (err, addresses) => { - if (err || addresses == null || addresses.length === 0) { - cb(err ?? new InformationalError("No DNS entries found")); - return; - } - this.setRecords(origin, addresses); - const records = this.storage.get(origin.hostname); - const ip = this.pick(origin, records, newOpts.affinity); - let port; - if (typeof ip.port === "number") { - port = `:${ip.port}`; - } else if (origin.port !== "") { - port = `:${origin.port}`; - } else { - port = ""; - } - cb(null, new URL(`${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`)); - }); - } else { + if (ips == null) this.lookup(origin, newOpts, (err, addresses) => { + if (err || addresses == null || addresses.length === 0) { + cb(err ?? new InformationalError("No DNS entries found")); + return; + } + this.setRecords(origin, addresses); + const records = this.storage.get(origin.hostname); + const ip = this.pick(origin, records, newOpts.affinity); + let port; + if (typeof ip.port === "number") port = `:${ip.port}`; + else if (origin.port !== "") port = `:${origin.port}`; + else port = ""; + cb(null, new URL(`${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`)); + }); + else { const ip = this.pick(origin, ips, newOpts.affinity); if (ip == null) { this.storage.delete(origin.hostname); @@ -172469,13 +156402,9 @@ var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { return; } let port; - if (typeof ip.port === "number") { - port = `:${ip.port}`; - } else if (origin.port !== "") { - port = `:${origin.port}`; - } else { - port = ""; - } + if (typeof ip.port === "number") port = `:${ip.port}`; + else if (origin.port !== "") port = `:${origin.port}`; + else port = ""; cb(null, new URL(`${origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}`)); } } @@ -172485,13 +156414,9 @@ var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { family: this.dualStack === false ? this.affinity : 0, order: "ipv4first" }, (err, addresses) => { - if (err) { - return cb(err); - } - const results = new Map(); - for (const addr of addresses) { - results.set(`${addr.address}:${addr.family}`, addr); - } + if (err) return cb(err); + const results = /* @__PURE__ */ new Map(); + for (const addr of addresses) results.set(`${addr.address}:${addr.family}`, addr); cb(null, results.values()); }); } @@ -172500,36 +156425,22 @@ var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { const { records, offset } = hostnameRecords; let family; if (this.dualStack) { - if (affinity == null) { - if (offset == null || offset === maxInt) { - hostnameRecords.offset = 0; - affinity = 4; - } else { - hostnameRecords.offset++; - affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4; - } - } - if (records[affinity] != null && records[affinity].ips.length > 0) { - family = records[affinity]; + if (affinity == null) if (offset == null || offset === maxInt) { + hostnameRecords.offset = 0; + affinity = 4; } else { - family = records[affinity === 4 ? 6 : 4]; - } - } else { - family = records[affinity]; - } - if (family == null || family.ips.length === 0) { - return ip; - } - if (family.offset == null || family.offset === maxInt) { - family.offset = 0; - } else { - family.offset++; - } + hostnameRecords.offset++; + affinity = (hostnameRecords.offset & 1) === 1 ? 6 : 4; + } + if (records[affinity] != null && records[affinity].ips.length > 0) family = records[affinity]; + else family = records[affinity === 4 ? 6 : 4]; + } else family = records[affinity]; + if (family == null || family.ips.length === 0) return ip; + if (family.offset == null || family.offset === maxInt) family.offset = 0; + else family.offset++; const position = family.offset % family.ips.length; ip = family.ips[position] ?? null; - if (ip == null) { - return ip; - } + if (ip == null) return ip; if (Date.now() - ip.timestamp > ip.ttl) { family.ips.splice(position, 1); return this.pick(origin, hostnameRecords, affinity); @@ -172538,26 +156449,15 @@ var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { } pickFamily(origin, ipFamily) { const records = this.storage.get(origin.hostname)?.records; - if (!records) { - return null; - } + if (!records) return null; const family = records[ipFamily]; - if (!family) { - return null; - } - if (family.offset == null || family.offset === maxInt) { - family.offset = 0; - } else { - family.offset++; - } + if (!family) return null; + if (family.offset == null || family.offset === maxInt) family.offset = 0; + else family.offset++; const position = family.offset % family.ips.length; const ip = family.ips[position] ?? null; - if (ip == null) { - return ip; - } - if (Date.now() - ip.timestamp > ip.ttl) { - family.ips.splice(position, 1); - } + if (ip == null) return ip; + if (Date.now() - ip.timestamp > ip.ttl) family.ips.splice(position, 1); return ip; } setRecords(origin, addresses) { @@ -172572,9 +156472,7 @@ var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { if (typeof record.ttl === "number") { record.ttl = Math.min(record.ttl, this.#maxTTL); minTTL = Math.min(minTTL, record.ttl); - } else { - record.ttl = this.#maxTTL; - } + } else record.ttl = this.#maxTTL; const familyRecords = records.records[record.family] ?? { ips: [] }; familyRecords.ips.push(record); records.records[record.family] = familyRecords; @@ -172607,7 +156505,7 @@ var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { onResponseError(controller, err) { switch (err.code) { case "ETIMEDOUT": - case "ECONNREFUSED": { + case "ECONNREFUSED": if (this.#state.dualStack) { if (!this.#firstTry) { super.onResponseError(controller, err); @@ -172621,13 +156519,9 @@ var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { return; } let port; - if (typeof ip.port === "number") { - port = `:${ip.port}`; - } else if (this.#origin.port !== "") { - port = `:${this.#origin.port}`; - } else { - port = ""; - } + if (typeof ip.port === "number") port = `:${ip.port}`; + else if (this.#origin.port !== "") port = `:${this.#origin.port}`; + else port = ""; const dispatchOpts = { ...this.#opts, origin: `${this.#origin.protocol}//${ip.family === 6 ? `[${ip.address}]` : ip.address}${port}` @@ -172637,7 +156531,6 @@ var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { } super.onResponseError(controller, err); break; - } case "ENOTFOUND": this.#state.deleteRecords(this.#origin); super.onResponseError(controller, err); @@ -172649,35 +156542,18 @@ var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { } }; module.exports = (interceptorOpts) => { - if (interceptorOpts?.maxTTL != null && (typeof interceptorOpts?.maxTTL !== "number" || interceptorOpts?.maxTTL < 0)) { - throw new InvalidArgumentError("Invalid maxTTL. Must be a positive number"); - } - if (interceptorOpts?.maxItems != null && (typeof interceptorOpts?.maxItems !== "number" || interceptorOpts?.maxItems < 1)) { - throw new InvalidArgumentError("Invalid maxItems. Must be a positive number and greater than zero"); - } - if (interceptorOpts?.affinity != null && interceptorOpts?.affinity !== 4 && interceptorOpts?.affinity !== 6) { - throw new InvalidArgumentError("Invalid affinity. Must be either 4 or 6"); - } - if (interceptorOpts?.dualStack != null && typeof interceptorOpts?.dualStack !== "boolean") { - throw new InvalidArgumentError("Invalid dualStack. Must be a boolean"); - } - if (interceptorOpts?.lookup != null && typeof interceptorOpts?.lookup !== "function") { - throw new InvalidArgumentError("Invalid lookup. Must be a function"); - } - if (interceptorOpts?.pick != null && typeof interceptorOpts?.pick !== "function") { - throw new InvalidArgumentError("Invalid pick. Must be a function"); - } - if (interceptorOpts?.storage != null && (typeof interceptorOpts?.storage?.get !== "function" || typeof interceptorOpts?.storage?.set !== "function" || typeof interceptorOpts?.storage?.full !== "function" || typeof interceptorOpts?.storage?.delete !== "function")) { - throw new InvalidArgumentError("Invalid storage. Must be a object with methods: { get, set, full, delete }"); - } + if (interceptorOpts?.maxTTL != null && (typeof interceptorOpts?.maxTTL !== "number" || interceptorOpts?.maxTTL < 0)) throw new InvalidArgumentError("Invalid maxTTL. Must be a positive number"); + if (interceptorOpts?.maxItems != null && (typeof interceptorOpts?.maxItems !== "number" || interceptorOpts?.maxItems < 1)) throw new InvalidArgumentError("Invalid maxItems. Must be a positive number and greater than zero"); + if (interceptorOpts?.affinity != null && interceptorOpts?.affinity !== 4 && interceptorOpts?.affinity !== 6) throw new InvalidArgumentError("Invalid affinity. Must be either 4 or 6"); + if (interceptorOpts?.dualStack != null && typeof interceptorOpts?.dualStack !== "boolean") throw new InvalidArgumentError("Invalid dualStack. Must be a boolean"); + if (interceptorOpts?.lookup != null && typeof interceptorOpts?.lookup !== "function") throw new InvalidArgumentError("Invalid lookup. Must be a function"); + if (interceptorOpts?.pick != null && typeof interceptorOpts?.pick !== "function") throw new InvalidArgumentError("Invalid pick. Must be a function"); + if (interceptorOpts?.storage != null && (typeof interceptorOpts?.storage?.get !== "function" || typeof interceptorOpts?.storage?.set !== "function" || typeof interceptorOpts?.storage?.full !== "function" || typeof interceptorOpts?.storage?.delete !== "function")) throw new InvalidArgumentError("Invalid storage. Must be a object with methods: { get, set, full, delete }"); const dualStack = interceptorOpts?.dualStack ?? true; let affinity; - if (dualStack) { - affinity = interceptorOpts?.affinity ?? null; - } else { - affinity = interceptorOpts?.affinity ?? 4; - } - const opts = { + if (dualStack) affinity = interceptorOpts?.affinity ?? null; + else affinity = interceptorOpts?.affinity ?? 4; + const instance = new DNSInstance({ maxTTL: interceptorOpts?.maxTTL ?? 1e4, lookup: interceptorOpts?.lookup ?? null, pick: interceptorOpts?.pick ?? null, @@ -172685,19 +156561,14 @@ var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { affinity, maxItems: interceptorOpts?.maxItems ?? Infinity, storage: interceptorOpts?.storage - }; - const instance = new DNSInstance(opts); + }); return (dispatch) => { return function dnsInterceptor(origDispatchOpts, handler) { const origin = origDispatchOpts.origin.constructor === URL ? origDispatchOpts.origin : new URL(origDispatchOpts.origin); - if (isIP(origin.hostname) !== 0) { - return dispatch(origDispatchOpts, handler); - } + if (isIP(origin.hostname) !== 0) return dispatch(origDispatchOpts, handler); instance.runLookup(origin, origDispatchOpts, (err, newOrigin) => { - if (err) { - return handler.onResponseError(null, err); - } - const dispatchOpts = { + if (err) return handler.onResponseError(null, err); + dispatch({ ...origDispatchOpts, servername: origin.hostname, origin: newOrigin.origin, @@ -172705,8 +156576,7 @@ var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { host: origin.host, ...origDispatchOpts.headers } - }; - dispatch(dispatchOpts, instance.getHandler({ + }, instance.getHandler({ origin, dispatch, handler, @@ -172718,7 +156588,6 @@ var require_dns = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; }; })); - //#endregion //#region ../node_modules/undici/lib/util/cache.js var require_cache$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -172728,13 +156597,9 @@ var require_cache$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {import('../../types/dispatcher.d.ts').default.DispatchOptions} opts */ function makeCacheKey(opts) { - if (!opts.origin) { - throw new Error("opts.origin is undefined"); - } + if (!opts.origin) throw new Error("opts.origin is undefined"); let fullPath = opts.path || "/"; - if (opts.query && !pathHasQueryOrFragment(opts.path)) { - fullPath = serializePathWithQuery(fullPath, opts.query); - } + if (opts.query && !pathHasQueryOrFragment(opts.path)) fullPath = serializePathWithQuery(fullPath, opts.query); return { origin: opts.origin.toString(), method: opts.method, @@ -172748,79 +156613,48 @@ var require_cache$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function normalizeHeaders(opts) { let headers; - if (opts.headers == null) { - headers = {}; - } else if (typeof opts.headers[Symbol.iterator] === "function") { + if (opts.headers == null) headers = {}; + else if (typeof opts.headers[Symbol.iterator] === "function") { headers = {}; for (const x of opts.headers) { - if (!Array.isArray(x)) { - throw new Error("opts.headers is not a valid header map"); - } + if (!Array.isArray(x)) throw new Error("opts.headers is not a valid header map"); const [key, val] = x; - if (typeof key !== "string" || typeof val !== "string") { - throw new Error("opts.headers is not a valid header map"); - } + if (typeof key !== "string" || typeof val !== "string") throw new Error("opts.headers is not a valid header map"); headers[key.toLowerCase()] = val; } } else if (typeof opts.headers === "object") { headers = {}; - for (const key of Object.keys(opts.headers)) { - headers[key.toLowerCase()] = opts.headers[key]; - } - } else { - throw new Error("opts.headers is not an object"); - } + for (const key of Object.keys(opts.headers)) headers[key.toLowerCase()] = opts.headers[key]; + } else throw new Error("opts.headers is not an object"); return headers; } /** * @param {any} key */ function assertCacheKey(key) { - if (typeof key !== "object") { - throw new TypeError(`expected key to be object, got ${typeof key}`); - } + if (typeof key !== "object") throw new TypeError(`expected key to be object, got ${typeof key}`); for (const property of [ "origin", "method", "path" - ]) { - if (typeof key[property] !== "string") { - throw new TypeError(`expected key.${property} to be string, got ${typeof key[property]}`); - } - } - if (key.headers !== undefined && typeof key.headers !== "object") { - throw new TypeError(`expected headers to be object, got ${typeof key}`); - } + ]) if (typeof key[property] !== "string") throw new TypeError(`expected key.${property} to be string, got ${typeof key[property]}`); + if (key.headers !== void 0 && typeof key.headers !== "object") throw new TypeError(`expected headers to be object, got ${typeof key}`); } /** * @param {any} value */ function assertCacheValue(value) { - if (typeof value !== "object") { - throw new TypeError(`expected value to be object, got ${typeof value}`); - } + if (typeof value !== "object") throw new TypeError(`expected value to be object, got ${typeof value}`); for (const property of [ "statusCode", "cachedAt", "staleAt", "deleteAt" - ]) { - if (typeof value[property] !== "number") { - throw new TypeError(`expected value.${property} to be number, got ${typeof value[property]}`); - } - } - if (typeof value.statusMessage !== "string") { - throw new TypeError(`expected value.statusMessage to be string, got ${typeof value.statusMessage}`); - } - if (value.headers != null && typeof value.headers !== "object") { - throw new TypeError(`expected value.rawHeaders to be object, got ${typeof value.headers}`); - } - if (value.vary !== undefined && typeof value.vary !== "object") { - throw new TypeError(`expected value.vary to be object, got ${typeof value.vary}`); - } - if (value.etag !== undefined && typeof value.etag !== "string") { - throw new TypeError(`expected value.etag to be string, got ${typeof value.etag}`); - } + ]) if (typeof value[property] !== "number") throw new TypeError(`expected value.${property} to be number, got ${typeof value[property]}`); + if (typeof value.statusMessage !== "string") throw new TypeError(`expected value.statusMessage to be string, got ${typeof value.statusMessage}`); + if (value.headers != null && typeof value.headers !== "object") throw new TypeError(`expected value.rawHeaders to be object, got ${typeof value.headers}`); + if (value.vary !== void 0 && typeof value.vary !== "object") throw new TypeError(`expected value.vary to be object, got ${typeof value.vary}`); + if (value.etag !== void 0 && typeof value.etag !== "string") throw new TypeError(`expected value.etag to be string, got ${typeof value.etag}`); } /** * @see https://www.rfc-editor.org/rfc/rfc9111.html#name-cache-control @@ -172837,12 +156671,8 @@ var require_cache$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { let directives; if (Array.isArray(header)) { directives = []; - for (const directive of header) { - directives.push(...directive.split(",")); - } - } else { - directives = header.split(","); - } + for (const directive of header) directives.push(...directive.split(",")); + } else directives = header.split(","); for (let i = 0; i < directives.length; i++) { const directive = directives[i].toLowerCase(); const keyValueDelimiter = directive.indexOf("="); @@ -172851,9 +156681,7 @@ var require_cache$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { if (keyValueDelimiter !== -1) { key = directive.substring(0, keyValueDelimiter).trimStart(); value = directive.substring(keyValueDelimiter + 1); - } else { - key = directive.trim(); - } + } else key = directive.trim(); switch (key) { case "min-fresh": case "max-stale": @@ -172861,60 +156689,40 @@ var require_cache$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { case "s-maxage": case "stale-while-revalidate": case "stale-if-error": { - if (value === undefined || value[0] === " ") { - continue; - } - if (value.length >= 2 && value[0] === "\"" && value[value.length - 1] === "\"") { - value = value.substring(1, value.length - 1); - } + if (value === void 0 || value[0] === " ") continue; + if (value.length >= 2 && value[0] === "\"" && value[value.length - 1] === "\"") value = value.substring(1, value.length - 1); const parsedValue = parseInt(value, 10); - if (parsedValue !== parsedValue) { - continue; - } - if (key === "max-age" && key in output && output[key] >= parsedValue) { - continue; - } + if (parsedValue !== parsedValue) continue; + if (key === "max-age" && key in output && output[key] >= parsedValue) continue; output[key] = parsedValue; break; } case "private": - case "no-cache": { - if (value) { - if (value[0] === "\"") { - const headers = [value.substring(1)]; - let foundEndingQuote = value[value.length - 1] === "\""; - if (!foundEndingQuote) { - for (let j = i + 1; j < directives.length; j++) { - const nextPart = directives[j]; - const nextPartLength = nextPart.length; - headers.push(nextPart.trim()); - if (nextPartLength !== 0 && nextPart[nextPartLength - 1] === "\"") { - foundEndingQuote = true; - break; - } - } - } - if (foundEndingQuote) { - let lastHeader = headers[headers.length - 1]; - if (lastHeader[lastHeader.length - 1] === "\"") { - lastHeader = lastHeader.substring(0, lastHeader.length - 1); - headers[headers.length - 1] = lastHeader; - } - if (key in output) { - output[key] = output[key].concat(headers); - } else { - output[key] = headers; - } + case "no-cache": if (value) { + if (value[0] === "\"") { + const headers = [value.substring(1)]; + let foundEndingQuote = value[value.length - 1] === "\""; + if (!foundEndingQuote) for (let j = i + 1; j < directives.length; j++) { + const nextPart = directives[j]; + const nextPartLength = nextPart.length; + headers.push(nextPart.trim()); + if (nextPartLength !== 0 && nextPart[nextPartLength - 1] === "\"") { + foundEndingQuote = true; + break; } - } else { - if (key in output) { - output[key] = output[key].concat(value); - } else { - output[key] = [value]; + } + if (foundEndingQuote) { + let lastHeader = headers[headers.length - 1]; + if (lastHeader[lastHeader.length - 1] === "\"") { + lastHeader = lastHeader.substring(0, lastHeader.length - 1); + headers[headers.length - 1] = lastHeader; } + if (key in output) output[key] = output[key].concat(headers); + else output[key] = headers; } - break; - } + } else if (key in output) output[key] = output[key].concat(value); + else output[key] = [value]; + break; } case "public": case "no-store": @@ -172924,9 +156732,7 @@ var require_cache$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { case "no-transform": case "must-understand": case "only-if-cached": - if (value) { - continue; - } + if (value) continue; output[key] = true; break; default: continue; @@ -172940,9 +156746,7 @@ var require_cache$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {Record} */ function parseVaryHeader(varyHeader, headers) { - if (typeof varyHeader === "string" && varyHeader.includes("*")) { - return headers; - } + if (typeof varyHeader === "string" && varyHeader.includes("*")) return headers; const output = {}; const varyingHeaders = typeof varyHeader === "string" ? varyHeader.split(",") : varyHeader; for (const header of varyingHeaders) { @@ -172961,15 +156765,9 @@ var require_cache$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {boolean} */ function isEtagUsable(etag) { - if (etag.length <= 2) { - return false; - } - if (etag[0] === "\"" && etag[etag.length - 1] === "\"") { - return !(etag[1] === "\"" || etag.startsWith("\"W/")); - } - if (etag.startsWith("W/\"") && etag[etag.length - 1] === "\"") { - return etag.length !== 4; - } + if (etag.length <= 2) return false; + if (etag[0] === "\"" && etag[etag.length - 1] === "\"") return !(etag[1] === "\"" || etag.startsWith("\"W/")); + if (etag.startsWith("W/\"") && etag[etag.length - 1] === "\"") return etag.length !== 4; return false; } /** @@ -172977,35 +156775,21 @@ var require_cache$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {asserts store is import('../../types/cache-interceptor.d.ts').default.CacheStore} */ function assertCacheStore(store, name = "CacheStore") { - if (typeof store !== "object" || store === null) { - throw new TypeError(`expected type of ${name} to be a CacheStore, got ${store === null ? "null" : typeof store}`); - } + if (typeof store !== "object" || store === null) throw new TypeError(`expected type of ${name} to be a CacheStore, got ${store === null ? "null" : typeof store}`); for (const fn of [ "get", "createWriteStream", "delete" - ]) { - if (typeof store[fn] !== "function") { - throw new TypeError(`${name} needs to have a \`${fn}()\` function`); - } - } + ]) if (typeof store[fn] !== "function") throw new TypeError(`${name} needs to have a \`${fn}()\` function`); } /** * @param {unknown} methods * @returns {asserts methods is import('../../types/cache-interceptor.d.ts').default.CacheMethods[]} */ function assertCacheMethods(methods, name = "CacheMethods") { - if (!Array.isArray(methods)) { - throw new TypeError(`expected type of ${name} needs to be an array, got ${methods === null ? "null" : typeof methods}`); - } - if (methods.length === 0) { - throw new TypeError(`${name} needs to have at least one method`); - } - for (const method of methods) { - if (!safeHTTPMethods.includes(method)) { - throw new TypeError(`element of ${name}-array needs to be one of following values: ${safeHTTPMethods.join(", ")}, got ${method}`); - } - } + if (!Array.isArray(methods)) throw new TypeError(`expected type of ${name} needs to be an array, got ${methods === null ? "null" : typeof methods}`); + if (methods.length === 0) throw new TypeError(`${name} needs to have at least one method`); + for (const method of methods) if (!safeHTTPMethods.includes(method)) throw new TypeError(`element of ${name}-array needs to be one of following values: ${safeHTTPMethods.join(", ")}, got ${method}`); } /** * Creates a string key for request deduplication purposes. @@ -173019,9 +156803,7 @@ var require_cache$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { if (cacheKey.headers) { const sortedHeaders = Object.keys(cacheKey.headers).sort(); for (const header of sortedHeaders) { - if (excludeHeaders?.has(header.toLowerCase())) { - continue; - } + if (excludeHeaders?.has(header.toLowerCase())) continue; const value = cacheKey.headers[header]; key += `:${header}=${Array.isArray(value) ? value.join(",") : value}`; } @@ -173041,7 +156823,6 @@ var require_cache$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { makeDeduplicationKey }; })); - //#endregion //#region ../node_modules/undici/lib/util/date.js var require_date = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -173065,167 +156846,95 @@ var require_date = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {Date | undefined} */ function parseImfDate(date) { - if (date.length !== 29 || date[4] !== " " || date[7] !== " " || date[11] !== " " || date[16] !== " " || date[19] !== ":" || date[22] !== ":" || date[25] !== " " || date[26] !== "G" || date[27] !== "M" || date[28] !== "T") { - return undefined; - } + if (date.length !== 29 || date[4] !== " " || date[7] !== " " || date[11] !== " " || date[16] !== " " || date[19] !== ":" || date[22] !== ":" || date[25] !== " " || date[26] !== "G" || date[27] !== "M" || date[28] !== "T") return; let weekday = -1; - if (date[0] === "S" && date[1] === "u" && date[2] === "n") { - weekday = 0; - } else if (date[0] === "M" && date[1] === "o" && date[2] === "n") { - weekday = 1; - } else if (date[0] === "T" && date[1] === "u" && date[2] === "e") { - weekday = 2; - } else if (date[0] === "W" && date[1] === "e" && date[2] === "d") { - weekday = 3; - } else if (date[0] === "T" && date[1] === "h" && date[2] === "u") { - weekday = 4; - } else if (date[0] === "F" && date[1] === "r" && date[2] === "i") { - weekday = 5; - } else if (date[0] === "S" && date[1] === "a" && date[2] === "t") { - weekday = 6; - } else { - return undefined; - } + if (date[0] === "S" && date[1] === "u" && date[2] === "n") weekday = 0; + else if (date[0] === "M" && date[1] === "o" && date[2] === "n") weekday = 1; + else if (date[0] === "T" && date[1] === "u" && date[2] === "e") weekday = 2; + else if (date[0] === "W" && date[1] === "e" && date[2] === "d") weekday = 3; + else if (date[0] === "T" && date[1] === "h" && date[2] === "u") weekday = 4; + else if (date[0] === "F" && date[1] === "r" && date[2] === "i") weekday = 5; + else if (date[0] === "S" && date[1] === "a" && date[2] === "t") weekday = 6; + else return; let day = 0; if (date[5] === "0") { const code = date.charCodeAt(6); - if (code < 49 || code > 57) { - return undefined; - } + if (code < 49 || code > 57) return; day = code - 48; } else { const code1 = date.charCodeAt(5); - if (code1 < 49 || code1 > 51) { - return undefined; - } + if (code1 < 49 || code1 > 51) return; const code2 = date.charCodeAt(6); - if (code2 < 48 || code2 > 57) { - return undefined; - } + if (code2 < 48 || code2 > 57) return; day = (code1 - 48) * 10 + (code2 - 48); } let monthIdx = -1; - if (date[8] === "J" && date[9] === "a" && date[10] === "n") { - monthIdx = 0; - } else if (date[8] === "F" && date[9] === "e" && date[10] === "b") { - monthIdx = 1; - } else if (date[8] === "M" && date[9] === "a") { - if (date[10] === "r") { - monthIdx = 2; - } else if (date[10] === "y") { - monthIdx = 4; - } else { - return undefined; - } - } else if (date[8] === "J") { - if (date[9] === "a" && date[10] === "n") { - monthIdx = 0; - } else if (date[9] === "u") { - if (date[10] === "n") { - monthIdx = 5; - } else if (date[10] === "l") { - monthIdx = 6; - } else { - return undefined; - } - } else { - return undefined; - } - } else if (date[8] === "A") { - if (date[9] === "p" && date[10] === "r") { - monthIdx = 3; - } else if (date[9] === "u" && date[10] === "g") { - monthIdx = 7; - } else { - return undefined; - } - } else if (date[8] === "S" && date[9] === "e" && date[10] === "p") { - monthIdx = 8; - } else if (date[8] === "O" && date[9] === "c" && date[10] === "t") { - monthIdx = 9; - } else if (date[8] === "N" && date[9] === "o" && date[10] === "v") { - monthIdx = 10; - } else if (date[8] === "D" && date[9] === "e" && date[10] === "c") { - monthIdx = 11; - } else { - return undefined; - } + if (date[8] === "J" && date[9] === "a" && date[10] === "n") monthIdx = 0; + else if (date[8] === "F" && date[9] === "e" && date[10] === "b") monthIdx = 1; + else if (date[8] === "M" && date[9] === "a") if (date[10] === "r") monthIdx = 2; + else if (date[10] === "y") monthIdx = 4; + else return; + else if (date[8] === "J") if (date[9] === "a" && date[10] === "n") monthIdx = 0; + else if (date[9] === "u") if (date[10] === "n") monthIdx = 5; + else if (date[10] === "l") monthIdx = 6; + else return; + else return; + else if (date[8] === "A") if (date[9] === "p" && date[10] === "r") monthIdx = 3; + else if (date[9] === "u" && date[10] === "g") monthIdx = 7; + else return; + else if (date[8] === "S" && date[9] === "e" && date[10] === "p") monthIdx = 8; + else if (date[8] === "O" && date[9] === "c" && date[10] === "t") monthIdx = 9; + else if (date[8] === "N" && date[9] === "o" && date[10] === "v") monthIdx = 10; + else if (date[8] === "D" && date[9] === "e" && date[10] === "c") monthIdx = 11; + else return; const yearDigit1 = date.charCodeAt(12); - if (yearDigit1 < 48 || yearDigit1 > 57) { - return undefined; - } + if (yearDigit1 < 48 || yearDigit1 > 57) return; const yearDigit2 = date.charCodeAt(13); - if (yearDigit2 < 48 || yearDigit2 > 57) { - return undefined; - } + if (yearDigit2 < 48 || yearDigit2 > 57) return; const yearDigit3 = date.charCodeAt(14); - if (yearDigit3 < 48 || yearDigit3 > 57) { - return undefined; - } + if (yearDigit3 < 48 || yearDigit3 > 57) return; const yearDigit4 = date.charCodeAt(15); - if (yearDigit4 < 48 || yearDigit4 > 57) { - return undefined; - } + if (yearDigit4 < 48 || yearDigit4 > 57) return; const year = (yearDigit1 - 48) * 1e3 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48); let hour = 0; if (date[17] === "0") { const code = date.charCodeAt(18); - if (code < 48 || code > 57) { - return undefined; - } + if (code < 48 || code > 57) return; hour = code - 48; } else { const code1 = date.charCodeAt(17); - if (code1 < 48 || code1 > 50) { - return undefined; - } + if (code1 < 48 || code1 > 50) return; const code2 = date.charCodeAt(18); - if (code2 < 48 || code2 > 57) { - return undefined; - } - if (code1 === 50 && code2 > 51) { - return undefined; - } + if (code2 < 48 || code2 > 57) return; + if (code1 === 50 && code2 > 51) return; hour = (code1 - 48) * 10 + (code2 - 48); } let minute = 0; if (date[20] === "0") { const code = date.charCodeAt(21); - if (code < 48 || code > 57) { - return undefined; - } + if (code < 48 || code > 57) return; minute = code - 48; } else { const code1 = date.charCodeAt(20); - if (code1 < 48 || code1 > 53) { - return undefined; - } + if (code1 < 48 || code1 > 53) return; const code2 = date.charCodeAt(21); - if (code2 < 48 || code2 > 57) { - return undefined; - } + if (code2 < 48 || code2 > 57) return; minute = (code1 - 48) * 10 + (code2 - 48); } let second = 0; if (date[23] === "0") { const code = date.charCodeAt(24); - if (code < 48 || code > 57) { - return undefined; - } + if (code < 48 || code > 57) return; second = code - 48; } else { const code1 = date.charCodeAt(23); - if (code1 < 48 || code1 > 53) { - return undefined; - } + if (code1 < 48 || code1 > 53) return; const code2 = date.charCodeAt(24); - if (code2 < 48 || code2 > 57) { - return undefined; - } + if (code2 < 48 || code2 > 57) return; second = (code1 - 48) * 10 + (code2 - 48); } const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); - return result.getUTCDay() === weekday ? result : undefined; + return result.getUTCDay() === weekday ? result : void 0; } /** * @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats @@ -173234,167 +156943,95 @@ var require_date = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {Date | undefined} */ function parseAscTimeDate(date) { - if (date.length !== 24 || date[7] !== " " || date[10] !== " " || date[19] !== " ") { - return undefined; - } + if (date.length !== 24 || date[7] !== " " || date[10] !== " " || date[19] !== " ") return; let weekday = -1; - if (date[0] === "S" && date[1] === "u" && date[2] === "n") { - weekday = 0; - } else if (date[0] === "M" && date[1] === "o" && date[2] === "n") { - weekday = 1; - } else if (date[0] === "T" && date[1] === "u" && date[2] === "e") { - weekday = 2; - } else if (date[0] === "W" && date[1] === "e" && date[2] === "d") { - weekday = 3; - } else if (date[0] === "T" && date[1] === "h" && date[2] === "u") { - weekday = 4; - } else if (date[0] === "F" && date[1] === "r" && date[2] === "i") { - weekday = 5; - } else if (date[0] === "S" && date[1] === "a" && date[2] === "t") { - weekday = 6; - } else { - return undefined; - } + if (date[0] === "S" && date[1] === "u" && date[2] === "n") weekday = 0; + else if (date[0] === "M" && date[1] === "o" && date[2] === "n") weekday = 1; + else if (date[0] === "T" && date[1] === "u" && date[2] === "e") weekday = 2; + else if (date[0] === "W" && date[1] === "e" && date[2] === "d") weekday = 3; + else if (date[0] === "T" && date[1] === "h" && date[2] === "u") weekday = 4; + else if (date[0] === "F" && date[1] === "r" && date[2] === "i") weekday = 5; + else if (date[0] === "S" && date[1] === "a" && date[2] === "t") weekday = 6; + else return; let monthIdx = -1; - if (date[4] === "J" && date[5] === "a" && date[6] === "n") { - monthIdx = 0; - } else if (date[4] === "F" && date[5] === "e" && date[6] === "b") { - monthIdx = 1; - } else if (date[4] === "M" && date[5] === "a") { - if (date[6] === "r") { - monthIdx = 2; - } else if (date[6] === "y") { - monthIdx = 4; - } else { - return undefined; - } - } else if (date[4] === "J") { - if (date[5] === "a" && date[6] === "n") { - monthIdx = 0; - } else if (date[5] === "u") { - if (date[6] === "n") { - monthIdx = 5; - } else if (date[6] === "l") { - monthIdx = 6; - } else { - return undefined; - } - } else { - return undefined; - } - } else if (date[4] === "A") { - if (date[5] === "p" && date[6] === "r") { - monthIdx = 3; - } else if (date[5] === "u" && date[6] === "g") { - monthIdx = 7; - } else { - return undefined; - } - } else if (date[4] === "S" && date[5] === "e" && date[6] === "p") { - monthIdx = 8; - } else if (date[4] === "O" && date[5] === "c" && date[6] === "t") { - monthIdx = 9; - } else if (date[4] === "N" && date[5] === "o" && date[6] === "v") { - monthIdx = 10; - } else if (date[4] === "D" && date[5] === "e" && date[6] === "c") { - monthIdx = 11; - } else { - return undefined; - } + if (date[4] === "J" && date[5] === "a" && date[6] === "n") monthIdx = 0; + else if (date[4] === "F" && date[5] === "e" && date[6] === "b") monthIdx = 1; + else if (date[4] === "M" && date[5] === "a") if (date[6] === "r") monthIdx = 2; + else if (date[6] === "y") monthIdx = 4; + else return; + else if (date[4] === "J") if (date[5] === "a" && date[6] === "n") monthIdx = 0; + else if (date[5] === "u") if (date[6] === "n") monthIdx = 5; + else if (date[6] === "l") monthIdx = 6; + else return; + else return; + else if (date[4] === "A") if (date[5] === "p" && date[6] === "r") monthIdx = 3; + else if (date[5] === "u" && date[6] === "g") monthIdx = 7; + else return; + else if (date[4] === "S" && date[5] === "e" && date[6] === "p") monthIdx = 8; + else if (date[4] === "O" && date[5] === "c" && date[6] === "t") monthIdx = 9; + else if (date[4] === "N" && date[5] === "o" && date[6] === "v") monthIdx = 10; + else if (date[4] === "D" && date[5] === "e" && date[6] === "c") monthIdx = 11; + else return; let day = 0; if (date[8] === " ") { const code = date.charCodeAt(9); - if (code < 49 || code > 57) { - return undefined; - } + if (code < 49 || code > 57) return; day = code - 48; } else { const code1 = date.charCodeAt(8); - if (code1 < 49 || code1 > 51) { - return undefined; - } + if (code1 < 49 || code1 > 51) return; const code2 = date.charCodeAt(9); - if (code2 < 48 || code2 > 57) { - return undefined; - } + if (code2 < 48 || code2 > 57) return; day = (code1 - 48) * 10 + (code2 - 48); } let hour = 0; if (date[11] === "0") { const code = date.charCodeAt(12); - if (code < 48 || code > 57) { - return undefined; - } + if (code < 48 || code > 57) return; hour = code - 48; } else { const code1 = date.charCodeAt(11); - if (code1 < 48 || code1 > 50) { - return undefined; - } + if (code1 < 48 || code1 > 50) return; const code2 = date.charCodeAt(12); - if (code2 < 48 || code2 > 57) { - return undefined; - } - if (code1 === 50 && code2 > 51) { - return undefined; - } + if (code2 < 48 || code2 > 57) return; + if (code1 === 50 && code2 > 51) return; hour = (code1 - 48) * 10 + (code2 - 48); } let minute = 0; if (date[14] === "0") { const code = date.charCodeAt(15); - if (code < 48 || code > 57) { - return undefined; - } + if (code < 48 || code > 57) return; minute = code - 48; } else { const code1 = date.charCodeAt(14); - if (code1 < 48 || code1 > 53) { - return undefined; - } + if (code1 < 48 || code1 > 53) return; const code2 = date.charCodeAt(15); - if (code2 < 48 || code2 > 57) { - return undefined; - } + if (code2 < 48 || code2 > 57) return; minute = (code1 - 48) * 10 + (code2 - 48); } let second = 0; if (date[17] === "0") { const code = date.charCodeAt(18); - if (code < 48 || code > 57) { - return undefined; - } + if (code < 48 || code > 57) return; second = code - 48; } else { const code1 = date.charCodeAt(17); - if (code1 < 48 || code1 > 53) { - return undefined; - } + if (code1 < 48 || code1 > 53) return; const code2 = date.charCodeAt(18); - if (code2 < 48 || code2 > 57) { - return undefined; - } + if (code2 < 48 || code2 > 57) return; second = (code1 - 48) * 10 + (code2 - 48); } const yearDigit1 = date.charCodeAt(20); - if (yearDigit1 < 48 || yearDigit1 > 57) { - return undefined; - } + if (yearDigit1 < 48 || yearDigit1 > 57) return; const yearDigit2 = date.charCodeAt(21); - if (yearDigit2 < 48 || yearDigit2 > 57) { - return undefined; - } + if (yearDigit2 < 48 || yearDigit2 > 57) return; const yearDigit3 = date.charCodeAt(22); - if (yearDigit3 < 48 || yearDigit3 > 57) { - return undefined; - } + if (yearDigit3 < 48 || yearDigit3 > 57) return; const yearDigit4 = date.charCodeAt(23); - if (yearDigit4 < 48 || yearDigit4 > 57) { - return undefined; - } + if (yearDigit4 < 48 || yearDigit4 > 57) return; const year = (yearDigit1 - 48) * 1e3 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48); const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); - return result.getUTCDay() === weekday ? result : undefined; + return result.getUTCDay() === weekday ? result : void 0; } /** * @see https://httpwg.org/specs/rfc9110.html#obsolete.date.formats @@ -173430,131 +157067,82 @@ var require_date = /* @__PURE__ */ __commonJSMin(((exports, module) => { } else if (date[0] === "F" && date[1] === "r" && date[2] === "i" && date[3] === "d" && date[4] === "a" && date[5] === "y") { weekday = 5; commaIndex = 6; - } else { - return undefined; - } - if (date[commaIndex] !== "," || date.length - commaIndex - 1 !== 23 || date[commaIndex + 1] !== " " || date[commaIndex + 4] !== "-" || date[commaIndex + 8] !== "-" || date[commaIndex + 11] !== " " || date[commaIndex + 14] !== ":" || date[commaIndex + 17] !== ":" || date[commaIndex + 20] !== " " || date[commaIndex + 21] !== "G" || date[commaIndex + 22] !== "M" || date[commaIndex + 23] !== "T") { - return undefined; - } + } else return; + if (date[commaIndex] !== "," || date.length - commaIndex - 1 !== 23 || date[commaIndex + 1] !== " " || date[commaIndex + 4] !== "-" || date[commaIndex + 8] !== "-" || date[commaIndex + 11] !== " " || date[commaIndex + 14] !== ":" || date[commaIndex + 17] !== ":" || date[commaIndex + 20] !== " " || date[commaIndex + 21] !== "G" || date[commaIndex + 22] !== "M" || date[commaIndex + 23] !== "T") return; let day = 0; if (date[commaIndex + 2] === "0") { const code = date.charCodeAt(commaIndex + 3); - if (code < 49 || code > 57) { - return undefined; - } + if (code < 49 || code > 57) return; day = code - 48; } else { const code1 = date.charCodeAt(commaIndex + 2); - if (code1 < 49 || code1 > 51) { - return undefined; - } + if (code1 < 49 || code1 > 51) return; const code2 = date.charCodeAt(commaIndex + 3); - if (code2 < 48 || code2 > 57) { - return undefined; - } + if (code2 < 48 || code2 > 57) return; day = (code1 - 48) * 10 + (code2 - 48); } let monthIdx = -1; - if (date[commaIndex + 5] === "J" && date[commaIndex + 6] === "a" && date[commaIndex + 7] === "n") { - monthIdx = 0; - } else if (date[commaIndex + 5] === "F" && date[commaIndex + 6] === "e" && date[commaIndex + 7] === "b") { - monthIdx = 1; - } else if (date[commaIndex + 5] === "M" && date[commaIndex + 6] === "a" && date[commaIndex + 7] === "r") { - monthIdx = 2; - } else if (date[commaIndex + 5] === "A" && date[commaIndex + 6] === "p" && date[commaIndex + 7] === "r") { - monthIdx = 3; - } else if (date[commaIndex + 5] === "M" && date[commaIndex + 6] === "a" && date[commaIndex + 7] === "y") { - monthIdx = 4; - } else if (date[commaIndex + 5] === "J" && date[commaIndex + 6] === "u" && date[commaIndex + 7] === "n") { - monthIdx = 5; - } else if (date[commaIndex + 5] === "J" && date[commaIndex + 6] === "u" && date[commaIndex + 7] === "l") { - monthIdx = 6; - } else if (date[commaIndex + 5] === "A" && date[commaIndex + 6] === "u" && date[commaIndex + 7] === "g") { - monthIdx = 7; - } else if (date[commaIndex + 5] === "S" && date[commaIndex + 6] === "e" && date[commaIndex + 7] === "p") { - monthIdx = 8; - } else if (date[commaIndex + 5] === "O" && date[commaIndex + 6] === "c" && date[commaIndex + 7] === "t") { - monthIdx = 9; - } else if (date[commaIndex + 5] === "N" && date[commaIndex + 6] === "o" && date[commaIndex + 7] === "v") { - monthIdx = 10; - } else if (date[commaIndex + 5] === "D" && date[commaIndex + 6] === "e" && date[commaIndex + 7] === "c") { - monthIdx = 11; - } else { - return undefined; - } + if (date[commaIndex + 5] === "J" && date[commaIndex + 6] === "a" && date[commaIndex + 7] === "n") monthIdx = 0; + else if (date[commaIndex + 5] === "F" && date[commaIndex + 6] === "e" && date[commaIndex + 7] === "b") monthIdx = 1; + else if (date[commaIndex + 5] === "M" && date[commaIndex + 6] === "a" && date[commaIndex + 7] === "r") monthIdx = 2; + else if (date[commaIndex + 5] === "A" && date[commaIndex + 6] === "p" && date[commaIndex + 7] === "r") monthIdx = 3; + else if (date[commaIndex + 5] === "M" && date[commaIndex + 6] === "a" && date[commaIndex + 7] === "y") monthIdx = 4; + else if (date[commaIndex + 5] === "J" && date[commaIndex + 6] === "u" && date[commaIndex + 7] === "n") monthIdx = 5; + else if (date[commaIndex + 5] === "J" && date[commaIndex + 6] === "u" && date[commaIndex + 7] === "l") monthIdx = 6; + else if (date[commaIndex + 5] === "A" && date[commaIndex + 6] === "u" && date[commaIndex + 7] === "g") monthIdx = 7; + else if (date[commaIndex + 5] === "S" && date[commaIndex + 6] === "e" && date[commaIndex + 7] === "p") monthIdx = 8; + else if (date[commaIndex + 5] === "O" && date[commaIndex + 6] === "c" && date[commaIndex + 7] === "t") monthIdx = 9; + else if (date[commaIndex + 5] === "N" && date[commaIndex + 6] === "o" && date[commaIndex + 7] === "v") monthIdx = 10; + else if (date[commaIndex + 5] === "D" && date[commaIndex + 6] === "e" && date[commaIndex + 7] === "c") monthIdx = 11; + else return; const yearDigit1 = date.charCodeAt(commaIndex + 9); - if (yearDigit1 < 48 || yearDigit1 > 57) { - return undefined; - } + if (yearDigit1 < 48 || yearDigit1 > 57) return; const yearDigit2 = date.charCodeAt(commaIndex + 10); - if (yearDigit2 < 48 || yearDigit2 > 57) { - return undefined; - } + if (yearDigit2 < 48 || yearDigit2 > 57) return; let year = (yearDigit1 - 48) * 10 + (yearDigit2 - 48); year += year < 70 ? 2e3 : 1900; let hour = 0; if (date[commaIndex + 12] === "0") { const code = date.charCodeAt(commaIndex + 13); - if (code < 48 || code > 57) { - return undefined; - } + if (code < 48 || code > 57) return; hour = code - 48; } else { const code1 = date.charCodeAt(commaIndex + 12); - if (code1 < 48 || code1 > 50) { - return undefined; - } + if (code1 < 48 || code1 > 50) return; const code2 = date.charCodeAt(commaIndex + 13); - if (code2 < 48 || code2 > 57) { - return undefined; - } - if (code1 === 50 && code2 > 51) { - return undefined; - } + if (code2 < 48 || code2 > 57) return; + if (code1 === 50 && code2 > 51) return; hour = (code1 - 48) * 10 + (code2 - 48); } let minute = 0; if (date[commaIndex + 15] === "0") { const code = date.charCodeAt(commaIndex + 16); - if (code < 48 || code > 57) { - return undefined; - } + if (code < 48 || code > 57) return; minute = code - 48; } else { const code1 = date.charCodeAt(commaIndex + 15); - if (code1 < 48 || code1 > 53) { - return undefined; - } + if (code1 < 48 || code1 > 53) return; const code2 = date.charCodeAt(commaIndex + 16); - if (code2 < 48 || code2 > 57) { - return undefined; - } + if (code2 < 48 || code2 > 57) return; minute = (code1 - 48) * 10 + (code2 - 48); } let second = 0; if (date[commaIndex + 18] === "0") { const code = date.charCodeAt(commaIndex + 19); - if (code < 48 || code > 57) { - return undefined; - } + if (code < 48 || code > 57) return; second = code - 48; } else { const code1 = date.charCodeAt(commaIndex + 18); - if (code1 < 48 || code1 > 53) { - return undefined; - } + if (code1 < 48 || code1 > 53) return; const code2 = date.charCodeAt(commaIndex + 19); - if (code2 < 48 || code2 > 57) { - return undefined; - } + if (code2 < 48 || code2 > 57) return; second = (code1 - 48) * 10 + (code2 - 48); } const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second)); - return result.getUTCDay() === weekday ? result : undefined; + return result.getUTCDay() === weekday ? result : void 0; } module.exports = { parseHttpDate }; })); - //#endregion //#region ../node_modules/undici/lib/handler/cache-handler.js var require_cache_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -173622,7 +157210,7 @@ var require_cache_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => } onRequestStart(controller, context) { this.#writeStream?.destroy(); - this.#writeStream = undefined; + this.#writeStream = void 0; this.#handler.onRequestStart?.(controller, context); } onRequestUpgrade(controller, statusCode, headers, socket) { @@ -173645,34 +157233,22 @@ var require_cache_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => } const cacheControlHeader = resHeaders["cache-control"]; const heuristicallyCacheable = resHeaders["last-modified"] && HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode); - if (!cacheControlHeader && !resHeaders["expires"] && !heuristicallyCacheable && !this.#cacheByDefault) { - return downstreamOnHeaders(); - } + if (!cacheControlHeader && !resHeaders["expires"] && !heuristicallyCacheable && !this.#cacheByDefault) return downstreamOnHeaders(); const cacheControlDirectives = cacheControlHeader ? parseCacheControlHeader(cacheControlHeader) : {}; - if (!canCacheResponse(this.#cacheType, statusCode, resHeaders, cacheControlDirectives)) { - return downstreamOnHeaders(); - } + if (!canCacheResponse(this.#cacheType, statusCode, resHeaders, cacheControlDirectives)) return downstreamOnHeaders(); const now = Date.now(); - const resAge = resHeaders.age ? getAge(resHeaders.age) : undefined; - if (resAge && resAge >= MAX_RESPONSE_AGE) { - return downstreamOnHeaders(); - } - const resDate = typeof resHeaders.date === "string" ? parseHttpDate(resHeaders.date) : undefined; + const resAge = resHeaders.age ? getAge(resHeaders.age) : void 0; + if (resAge && resAge >= MAX_RESPONSE_AGE) return downstreamOnHeaders(); + const resDate = typeof resHeaders.date === "string" ? parseHttpDate(resHeaders.date) : void 0; const staleAt = determineStaleAt(this.#cacheType, now, resAge, resHeaders, resDate, cacheControlDirectives) ?? this.#cacheByDefault; - if (staleAt === undefined || resAge && resAge > staleAt) { - return downstreamOnHeaders(); - } + if (staleAt === void 0 || resAge && resAge > staleAt) return downstreamOnHeaders(); const baseTime = resDate ? resDate.getTime() : now; const absoluteStaleAt = staleAt + baseTime; - if (now >= absoluteStaleAt) { - return downstreamOnHeaders(); - } + if (now >= absoluteStaleAt) return downstreamOnHeaders(); let varyDirectives; if (this.#cacheKey.headers && resHeaders.vary) { varyDirectives = parseVaryHeader(resHeaders.vary, this.#cacheKey.headers); - if (!varyDirectives) { - return downstreamOnHeaders(); - } + if (!varyDirectives) return downstreamOnHeaders(); } const deleteAt = determineDeleteAt(baseTime, cacheControlDirectives, absoluteStaleAt); const strippedHeaders = stripNecessaryHeaders(resHeaders, cacheControlDirectives); @@ -173694,9 +157270,7 @@ var require_cache_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => * @type {import('../../types/cache-interceptor.d.ts').default.CacheValue} */ const cachedValue = this.#store.get(this.#cacheKey); - if (!cachedValue) { - return downstreamOnHeaders(); - } + if (!cachedValue) return downstreamOnHeaders(); value.statusCode = cachedValue.statusCode; value.statusMessage = cachedValue.statusMessage; value.etag = cachedValue.etag; @@ -173706,54 +157280,40 @@ var require_cache_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => }; downstreamOnHeaders(); this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value); - if (!this.#writeStream || !cachedValue?.body) { - return; - } + if (!this.#writeStream || !cachedValue?.body) return; const bodyIterator = cachedValue.body.values(); const streamCachedBody = () => { for (const chunk of bodyIterator) { const full = this.#writeStream.write(chunk) === false; this.#handler.onResponseData?.(controller, chunk); - if (full) { - break; - } + if (full) break; } }; this.#writeStream.on("error", function() { - handler.#writeStream = undefined; + handler.#writeStream = void 0; handler.#store.delete(handler.#cacheKey); }).on("drain", () => { streamCachedBody(); }).on("close", function() { - if (handler.#writeStream === this) { - handler.#writeStream = undefined; - } + if (handler.#writeStream === this) handler.#writeStream = void 0; }); streamCachedBody(); } else { - if (typeof resHeaders.etag === "string" && isEtagUsable(resHeaders.etag)) { - value.etag = resHeaders.etag; - } + if (typeof resHeaders.etag === "string" && isEtagUsable(resHeaders.etag)) value.etag = resHeaders.etag; this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value); - if (!this.#writeStream) { - return downstreamOnHeaders(); - } + if (!this.#writeStream) return downstreamOnHeaders(); this.#writeStream.on("drain", () => controller.resume()).on("error", function() { - handler.#writeStream = undefined; + handler.#writeStream = void 0; handler.#store.delete(handler.#cacheKey); }).on("close", function() { - if (handler.#writeStream === this) { - handler.#writeStream = undefined; - } + if (handler.#writeStream === this) handler.#writeStream = void 0; controller.resume(); }); downstreamOnHeaders(); } } onResponseData(controller, chunk) { - if (this.#writeStream?.write(chunk) === false) { - controller.pause(); - } + if (this.#writeStream?.write(chunk) === false) controller.pause(); this.#handler.onResponseData?.(controller, chunk); } onResponseEnd(controller, trailers) { @@ -173762,7 +157322,7 @@ var require_cache_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => } onResponseError(controller, err) { this.#writeStream?.destroy(err); - this.#writeStream = undefined; + this.#writeStream = void 0; this.#handler.onResponseError?.(controller, err); } }; @@ -173775,31 +157335,15 @@ var require_cache_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => * @param {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives} cacheControlDirectives */ function canCacheResponse(cacheType, statusCode, resHeaders, cacheControlDirectives) { - if (statusCode < 200 || NOT_UNDERSTOOD_STATUS_CODES.includes(statusCode)) { - return false; - } - if (!HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode) && !resHeaders["expires"] && !cacheControlDirectives.public && cacheControlDirectives["max-age"] === undefined && !(cacheControlDirectives.private && cacheType === "private") && !(cacheControlDirectives["s-maxage"] !== undefined && cacheType === "shared")) { - return false; - } - if (cacheControlDirectives["no-store"]) { - return false; - } - if (cacheType === "shared" && cacheControlDirectives.private === true) { - return false; - } - if (resHeaders.vary?.includes("*")) { - return false; - } + if (statusCode < 200 || NOT_UNDERSTOOD_STATUS_CODES.includes(statusCode)) return false; + if (!HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode) && !resHeaders["expires"] && !cacheControlDirectives.public && cacheControlDirectives["max-age"] === void 0 && !(cacheControlDirectives.private && cacheType === "private") && !(cacheControlDirectives["s-maxage"] !== void 0 && cacheType === "shared")) return false; + if (cacheControlDirectives["no-store"]) return false; + if (cacheType === "shared" && cacheControlDirectives.private === true) return false; + if (resHeaders.vary?.includes("*")) return false; if (resHeaders.authorization) { - if (!cacheControlDirectives.public || typeof resHeaders.authorization !== "string") { - return false; - } - if (Array.isArray(cacheControlDirectives["no-cache"]) && cacheControlDirectives["no-cache"].includes("authorization")) { - return false; - } - if (Array.isArray(cacheControlDirectives["private"]) && cacheControlDirectives["private"].includes("authorization")) { - return false; - } + if (!cacheControlDirectives.public || typeof resHeaders.authorization !== "string") return false; + if (Array.isArray(cacheControlDirectives["no-cache"]) && cacheControlDirectives["no-cache"].includes("authorization")) return false; + if (Array.isArray(cacheControlDirectives["private"]) && cacheControlDirectives["private"].includes("authorization")) return false; } return true; } @@ -173809,7 +157353,7 @@ var require_cache_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => */ function getAge(ageHeader) { const age = parseInt(Array.isArray(ageHeader) ? ageHeader[0] : ageHeader); - return isNaN(age) ? undefined : age * 1e3; + return isNaN(age) ? void 0 : age * 1e3; } /** * @param {import('../../types/cache-interceptor.d.ts').default.CacheOptions['type']} cacheType @@ -173824,27 +157368,17 @@ var require_cache_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => function determineStaleAt(cacheType, now, age, resHeaders, responseDate, cacheControlDirectives) { if (cacheType === "shared") { const sMaxAge = cacheControlDirectives["s-maxage"]; - if (sMaxAge !== undefined) { - return sMaxAge > 0 ? sMaxAge * 1e3 : undefined; - } + if (sMaxAge !== void 0) return sMaxAge > 0 ? sMaxAge * 1e3 : void 0; } const maxAge = cacheControlDirectives["max-age"]; - if (maxAge !== undefined) { - return maxAge > 0 ? maxAge * 1e3 : undefined; - } + if (maxAge !== void 0) return maxAge > 0 ? maxAge * 1e3 : void 0; if (typeof resHeaders.expires === "string") { const expiresDate = parseHttpDate(resHeaders.expires); if (expiresDate) { - if (now >= expiresDate.getTime()) { - return undefined; - } + if (now >= expiresDate.getTime()) return; if (responseDate) { - if (responseDate >= expiresDate) { - return undefined; - } - if (age !== undefined && age > expiresDate - responseDate) { - return undefined; - } + if (responseDate >= expiresDate) return; + if (age !== void 0 && age > expiresDate - responseDate) return; } return expiresDate.getTime() - now; } @@ -173852,17 +157386,11 @@ var require_cache_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => if (typeof resHeaders["last-modified"] === "string") { const lastModified = new Date(resHeaders["last-modified"]); if (isValidDate(lastModified)) { - if (lastModified.getTime() >= now) { - return undefined; - } - const responseAge = now - lastModified.getTime(); - return responseAge * .1; + if (lastModified.getTime() >= now) return; + return (now - lastModified.getTime()) * .1; } } - if (cacheControlDirectives.immutable) { - return 31536e3; - } - return undefined; + if (cacheControlDirectives.immutable) return 31536e3; } /** * @param {number} now @@ -173873,15 +157401,9 @@ var require_cache_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => let staleWhileRevalidate = -Infinity; let staleIfError = -Infinity; let immutable = -Infinity; - if (cacheControlDirectives["stale-while-revalidate"]) { - staleWhileRevalidate = staleAt + cacheControlDirectives["stale-while-revalidate"] * 1e3; - } - if (cacheControlDirectives["stale-if-error"]) { - staleIfError = staleAt + cacheControlDirectives["stale-if-error"] * 1e3; - } - if (staleWhileRevalidate === -Infinity && staleIfError === -Infinity) { - immutable = now + 31536e6; - } + if (cacheControlDirectives["stale-while-revalidate"]) staleWhileRevalidate = staleAt + cacheControlDirectives["stale-while-revalidate"] * 1e3; + if (cacheControlDirectives["stale-if-error"]) staleIfError = staleAt + cacheControlDirectives["stale-if-error"] * 1e3; + if (staleWhileRevalidate === -Infinity && staleIfError === -Infinity) immutable = now + 31536e6; return Math.max(staleAt, staleWhileRevalidate, staleIfError, immutable); } /** @@ -173902,25 +157424,14 @@ var require_cache_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => "upgrade", "age" ]; - if (resHeaders["connection"]) { - if (Array.isArray(resHeaders["connection"])) { - headersToRemove.push(...resHeaders["connection"].map((header) => header.trim())); - } else { - headersToRemove.push(...resHeaders["connection"].split(",").map((header) => header.trim())); - } - } - if (Array.isArray(cacheControlDirectives["no-cache"])) { - headersToRemove.push(...cacheControlDirectives["no-cache"]); - } - if (Array.isArray(cacheControlDirectives["private"])) { - headersToRemove.push(...cacheControlDirectives["private"]); - } + if (resHeaders["connection"]) if (Array.isArray(resHeaders["connection"])) headersToRemove.push(...resHeaders["connection"].map((header) => header.trim())); + else headersToRemove.push(...resHeaders["connection"].split(",").map((header) => header.trim())); + if (Array.isArray(cacheControlDirectives["no-cache"])) headersToRemove.push(...cacheControlDirectives["no-cache"]); + if (Array.isArray(cacheControlDirectives["private"])) headersToRemove.push(...cacheControlDirectives["private"]); let strippedHeaders; - for (const headerName of headersToRemove) { - if (resHeaders[headerName]) { - strippedHeaders ??= { ...resHeaders }; - delete strippedHeaders[headerName]; - } + for (const headerName of headersToRemove) if (resHeaders[headerName]) { + strippedHeaders ??= { ...resHeaders }; + delete strippedHeaders[headerName]; } return strippedHeaders ?? resHeaders; } @@ -173933,7 +157444,6 @@ var require_cache_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => } module.exports = CacheHandler; })); - //#endregion //#region ../node_modules/undici/lib/cache/memory-cache-store.js var require_memory_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -173956,7 +157466,7 @@ var require_memory_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module #maxEntrySize = 5242880; #size = 0; #count = 0; - #entries = new Map(); + #entries = /* @__PURE__ */ new Map(); #hasEmittedMaxSizeEvent = false; /** * @param {import('../../types/cache-interceptor.d.ts').default.MemoryCacheStoreOpts | undefined} [opts] @@ -173964,25 +157474,17 @@ var require_memory_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module constructor(opts) { super(); if (opts) { - if (typeof opts !== "object") { - throw new TypeError("MemoryCacheStore options must be an object"); - } - if (opts.maxCount !== undefined) { - if (typeof opts.maxCount !== "number" || !Number.isInteger(opts.maxCount) || opts.maxCount < 0) { - throw new TypeError("MemoryCacheStore options.maxCount must be a non-negative integer"); - } + if (typeof opts !== "object") throw new TypeError("MemoryCacheStore options must be an object"); + if (opts.maxCount !== void 0) { + if (typeof opts.maxCount !== "number" || !Number.isInteger(opts.maxCount) || opts.maxCount < 0) throw new TypeError("MemoryCacheStore options.maxCount must be a non-negative integer"); this.#maxCount = opts.maxCount; } - if (opts.maxSize !== undefined) { - if (typeof opts.maxSize !== "number" || !Number.isInteger(opts.maxSize) || opts.maxSize < 0) { - throw new TypeError("MemoryCacheStore options.maxSize must be a non-negative integer"); - } + if (opts.maxSize !== void 0) { + if (typeof opts.maxSize !== "number" || !Number.isInteger(opts.maxSize) || opts.maxSize < 0) throw new TypeError("MemoryCacheStore options.maxSize must be a non-negative integer"); this.#maxSize = opts.maxSize; } - if (opts.maxEntrySize !== undefined) { - if (typeof opts.maxEntrySize !== "number" || !Number.isInteger(opts.maxEntrySize) || opts.maxEntrySize < 0) { - throw new TypeError("MemoryCacheStore options.maxEntrySize must be a non-negative integer"); - } + if (opts.maxEntrySize !== void 0) { + if (typeof opts.maxEntrySize !== "number" || !Number.isInteger(opts.maxEntrySize) || opts.maxEntrySize < 0) throw new TypeError("MemoryCacheStore options.maxEntrySize must be a non-negative integer"); this.#maxEntrySize = opts.maxEntrySize; } } @@ -174011,12 +157513,12 @@ var require_memory_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module const now = Date.now(); const entries = this.#entries.get(topLevelKey); const entry = entries ? findEntry(key, entries, now) : null; - return entry == null ? undefined : { + return entry == null ? void 0 : { statusMessage: entry.statusMessage, statusCode: entry.statusCode, headers: entry.headers, body: entry.body, - vary: entry.vary ? entry.vary : undefined, + vary: entry.vary ? entry.vary : void 0, etag: entry.etag, cacheControlDirectives: entry.cacheControlDirectives, cachedAt: entry.cachedAt, @@ -174042,15 +157544,10 @@ var require_memory_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module }; return new Writable$4({ write(chunk, encoding, callback) { - if (typeof chunk === "string") { - chunk = Buffer.from(chunk, encoding); - } + if (typeof chunk === "string") chunk = Buffer.from(chunk, encoding); entry.size += chunk.byteLength; - if (entry.size >= store.#maxEntrySize) { - this.destroy(); - } else { - entry.body.push(chunk); - } + if (entry.size >= store.#maxEntrySize) this.destroy(); + else entry.body.push(chunk); callback(null); }, final(callback) { @@ -174084,13 +157581,9 @@ var require_memory_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module store.#size -= entry.size; store.#count -= 1; } - if (entries.length === 0) { - store.#entries.delete(key); - } - } - if (store.#size < store.#maxSize && store.#count < store.#maxCount) { - store.#hasEmittedMaxSizeEvent = false; + if (entries.length === 0) store.#entries.delete(key); } + if (store.#size < store.#maxSize && store.#count < store.#maxCount) store.#hasEmittedMaxSizeEvent = false; } callback(null); } @@ -174100,9 +157593,7 @@ var require_memory_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module * @param {CacheKey} key */ delete(key) { - if (typeof key !== "object") { - throw new TypeError(`expected key to be object, got ${typeof key}`); - } + if (typeof key !== "object") throw new TypeError(`expected key to be object, got ${typeof key}`); const topLevelKey = `${key.origin}:${key.path}`; for (const entry of this.#entries.get(topLevelKey) ?? []) { this.#size -= entry.size; @@ -174113,15 +157604,12 @@ var require_memory_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module }; function findEntry(key, entries, now) { return entries.find((entry) => entry.deleteAt > now && entry.method === key.method && (entry.vary == null || Object.keys(entry.vary).every((headerName) => { - if (entry.vary[headerName] === null) { - return key.headers[headerName] === undefined; - } + if (entry.vary[headerName] === null) return key.headers[headerName] === void 0; return entry.vary[headerName] === key.headers[headerName]; }))); } module.exports = MemoryCacheStore; })); - //#endregion //#region ../node_modules/undici/lib/handler/cache-revalidation-handler.js var require_cache_revalidation_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -174160,9 +157648,7 @@ var require_cache_revalidation_handler = /* @__PURE__ */ __commonJSMin(((exports * @param {boolean} allowErrorStatusCodes */ constructor(callback, handler, allowErrorStatusCodes) { - if (typeof callback !== "function") { - throw new TypeError("callback must be a function"); - } + if (typeof callback !== "function") throw new TypeError("callback must be a function"); this.#callback = callback; this.#handler = handler; this.#allowErrorStatusCodes = allowErrorStatusCodes; @@ -174179,42 +157665,30 @@ var require_cache_revalidation_handler = /* @__PURE__ */ __commonJSMin(((exports this.#successful = statusCode === 304 || this.#allowErrorStatusCodes && statusCode >= 500 && statusCode <= 504; this.#callback(this.#successful, this.#context); this.#callback = null; - if (this.#successful) { - return true; - } + if (this.#successful) return true; this.#handler.onRequestStart?.(controller, this.#context); this.#handler.onResponseStart?.(controller, statusCode, headers, statusMessage); } onResponseData(controller, chunk) { - if (this.#successful) { - return; - } + if (this.#successful) return; return this.#handler.onResponseData?.(controller, chunk); } onResponseEnd(controller, trailers) { - if (this.#successful) { - return; - } + if (this.#successful) return; this.#handler.onResponseEnd?.(controller, trailers); } onResponseError(controller, err) { - if (this.#successful) { - return; - } + if (this.#successful) return; if (this.#callback) { this.#callback(false); this.#callback = null; } - if (typeof this.#handler.onResponseError === "function") { - this.#handler.onResponseError(controller, err); - } else { - throw err; - } + if (typeof this.#handler.onResponseError === "function") this.#handler.onResponseError(controller, err); + else throw err; } }; module.exports = CacheRevalidationHandler; })); - //#endregion //#region ../node_modules/undici/lib/interceptor/cache.js var require_cache$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -174231,15 +157705,11 @@ var require_cache$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {string} name */ function assertCacheOrigins(origins, name) { - if (origins === undefined) return; - if (!Array.isArray(origins)) { - throw new TypeError(`expected ${name} to be an array or undefined, got ${typeof origins}`); - } + if (origins === void 0) return; + if (!Array.isArray(origins)) throw new TypeError(`expected ${name} to be an array or undefined, got ${typeof origins}`); for (let i = 0; i < origins.length; i++) { const origin = origins[i]; - if (typeof origin !== "string" && !(origin instanceof RegExp)) { - throw new TypeError(`expected ${name}[${i}] to be a string or RegExp, got ${typeof origin}`); - } + if (typeof origin !== "string" && !(origin instanceof RegExp)) throw new TypeError(`expected ${name}[${i}] to be a string or RegExp, got ${typeof origin}`); } } const nop = () => {}; @@ -174253,15 +157723,9 @@ var require_cache$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {boolean} */ function needsRevalidation(result, cacheControlDirectives, { headers = {} }) { - if (cacheControlDirectives?.["no-cache"]) { - return true; - } - if (result.cacheControlDirectives?.["no-cache"] && !Array.isArray(result.cacheControlDirectives["no-cache"])) { - return true; - } - if (headers["if-modified-since"] || headers["if-none-match"]) { - return true; - } + if (cacheControlDirectives?.["no-cache"]) return true; + if (result.cacheControlDirectives?.["no-cache"] && !Array.isArray(result.cacheControlDirectives["no-cache"])) return true; + if (headers["if-modified-since"] || headers["if-none-match"]) return true; return false; } /** @@ -174272,17 +157736,10 @@ var require_cache$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { function isStale(result, cacheControlDirectives) { const now = Date.now(); if (now > result.staleAt) { - if (cacheControlDirectives?.["max-stale"]) { - const gracePeriod = result.staleAt + cacheControlDirectives["max-stale"] * 1e3; - return now > gracePeriod; - } + if (cacheControlDirectives?.["max-stale"]) return now > result.staleAt + cacheControlDirectives["max-stale"] * 1e3; return true; } - if (cacheControlDirectives?.["min-fresh"]) { - const timeLeftTillStale = result.staleAt - now; - const threshold = cacheControlDirectives["min-fresh"] * 1e3; - return timeLeftTillStale <= threshold; - } + if (cacheControlDirectives?.["min-fresh"]) return result.staleAt - now <= cacheControlDirectives["min-fresh"] * 1e3; return false; } /** @@ -174292,12 +157749,8 @@ var require_cache$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function withinStaleWhileRevalidateWindow(result) { const staleWhileRevalidate = result.cacheControlDirectives?.["stale-while-revalidate"]; - if (!staleWhileRevalidate) { - return false; - } - const now = Date.now(); - const staleWhileRevalidateExpiry = result.staleAt + staleWhileRevalidate * 1e3; - return now <= staleWhileRevalidateExpiry; + if (!staleWhileRevalidate) return false; + return Date.now() <= result.staleAt + staleWhileRevalidate * 1e3; } /** * @param {DispatchFn} dispatch @@ -174315,23 +157768,15 @@ var require_cache$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { handler.onConnect(() => { aborted = true; }); - if (aborted) { - return; - } + if (aborted) return; } if (typeof handler.onHeaders === "function") { handler.onHeaders(504, [], nop, "Gateway Timeout"); - if (aborted) { - return; - } - } - if (typeof handler.onComplete === "function") { - handler.onComplete([]); + if (aborted) return; } + if (typeof handler.onComplete === "function") handler.onComplete([]); } catch (err) { - if (typeof handler.onError === "function") { - handler.onError(err); - } + if (typeof handler.onError === "function") handler.onError(err); } return true; } @@ -174370,37 +157815,23 @@ var require_cache$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } }; stream.on("error", function(err) { - if (!this.readableEnded) { - if (typeof handler.onResponseError === "function") { - handler.onResponseError(controller, err); - } else { - throw err; - } - } + if (!this.readableEnded) if (typeof handler.onResponseError === "function") handler.onResponseError(controller, err); + else throw err; }).on("close", function() { - if (!this.errored) { - handler.onResponseEnd?.(controller, {}); - } + if (!this.errored) handler.onResponseEnd?.(controller, {}); }); handler.onRequestStart?.(controller, context); - if (stream.destroyed) { - return; - } + if (stream.destroyed) return; const headers = { ...result.headers, age: String(age) }; - if (isStale) { - headers.warning = "110 - \"response is stale\""; - } + if (isStale) headers.warning = "110 - \"response is stale\""; handler.onResponseStart?.(controller, result.statusCode, headers, result.statusMessage); - if (opts.method === "HEAD") { - stream.destroy(); - } else { - stream.on("data", function(chunk) { - handler.onResponseData?.(controller, chunk); - }); - } + if (opts.method === "HEAD") stream.destroy(); + else stream.on("data", function(chunk) { + handler.onResponseData?.(controller, chunk); + }); } /** * @param {DispatchFn} dispatch @@ -174412,23 +157843,15 @@ var require_cache$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {import('../../types/cache-interceptor.d.ts').default.GetResult | undefined} result */ function handleResult(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl, result) { - if (!result) { - return handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl); - } + if (!result) return handleUncachedResponse(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl); const now = Date.now(); - if (now > result.deleteAt) { - return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)); - } + if (now > result.deleteAt) return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)); const age = Math.round((now - result.cachedAt) / 1e3); - if (reqCacheControl?.["max-age"] && age >= reqCacheControl["max-age"]) { - return dispatch(opts, handler); - } + if (reqCacheControl?.["max-age"] && age >= reqCacheControl["max-age"]) return dispatch(opts, handler); const stale = isStale(result, reqCacheControl); const revalidate = needsRevalidation(result, reqCacheControl, opts); if (stale || revalidate) { - if (util.isStream(opts.body) && util.bodyLength(opts.body) !== 0) { - return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)); - } + if (util.isStream(opts.body) && util.bodyLength(opts.body) !== 0) return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler)); if (!revalidate && withinStaleWhileRevalidateWindow(result)) { sendCachedValue(handler, opts, result, age, null, true); queueMicrotask(() => { @@ -174436,15 +157859,11 @@ var require_cache$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { ...opts.headers, "if-modified-since": new Date(result.cachedAt).toUTCString() }; - if (result.etag) { - headers["if-none-match"] = result.etag; - } - if (result.vary) { - headers = { - ...headers, - ...result.vary - }; - } + if (result.etag) headers["if-none-match"] = result.etag; + if (result.vary) headers = { + ...headers, + ...result.vary + }; dispatch({ ...opts, headers @@ -174461,36 +157880,25 @@ var require_cache$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } let withinStaleIfErrorThreshold = false; const staleIfErrorExpiry = result.cacheControlDirectives["stale-if-error"] ?? reqCacheControl?.["stale-if-error"]; - if (staleIfErrorExpiry) { - withinStaleIfErrorThreshold = now < result.staleAt + staleIfErrorExpiry * 1e3; - } + if (staleIfErrorExpiry) withinStaleIfErrorThreshold = now < result.staleAt + staleIfErrorExpiry * 1e3; let headers = { ...opts.headers, "if-modified-since": new Date(result.cachedAt).toUTCString() }; - if (result.etag) { - headers["if-none-match"] = result.etag; - } - if (result.vary) { - headers = { - ...headers, - ...result.vary - }; - } + if (result.etag) headers["if-none-match"] = result.etag; + if (result.vary) headers = { + ...headers, + ...result.vary + }; return dispatch({ ...opts, headers }, new CacheRevalidationHandler((success, context) => { - if (success) { - sendCachedValue(handler, opts, result, age, context, stale); - } else if (util.isStream(result.body)) { - result.body.on("error", nop).destroy(); - } + if (success) sendCachedValue(handler, opts, result, age, context, stale); + else if (util.isStream(result.body)) result.body.on("error", nop).destroy(); }, new CacheHandler(globalOpts, cacheKey, handler), withinStaleIfErrorThreshold)); } - if (util.isStream(opts.body)) { - opts.body.on("error", nop).destroy(); - } + if (util.isStream(opts.body)) opts.body.on("error", nop).destroy(); sendCachedValue(handler, opts, result, age, null, false); } /** @@ -174498,19 +157906,13 @@ var require_cache$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {import('../../types/dispatcher.d.ts').default.DispatcherComposeInterceptor} */ module.exports = (opts = {}) => { - const { store = new MemoryCacheStore(), methods = ["GET"], cacheByDefault = undefined, type = "shared", origins = undefined } = opts; - if (typeof opts !== "object" || opts === null) { - throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? "null" : typeof opts}`); - } + const { store = new MemoryCacheStore(), methods = ["GET"], cacheByDefault = void 0, type = "shared", origins = void 0 } = opts; + if (typeof opts !== "object" || opts === null) throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? "null" : typeof opts}`); assertCacheStore(store, "opts.store"); assertCacheMethods(methods, "opts.methods"); assertCacheOrigins(origins, "opts.origins"); - if (typeof cacheByDefault !== "undefined" && typeof cacheByDefault !== "number") { - throw new TypeError(`expected opts.cacheByDefault to be number or undefined, got ${typeof cacheByDefault}`); - } - if (typeof type !== "undefined" && type !== "shared" && type !== "private") { - throw new TypeError(`expected opts.type to be shared, private, or undefined, got ${typeof type}`); - } + if (typeof cacheByDefault !== "undefined" && typeof cacheByDefault !== "number") throw new TypeError(`expected opts.cacheByDefault to be number or undefined, got ${typeof cacheByDefault}`); + if (typeof type !== "undefined" && type !== "shared" && type !== "private") throw new TypeError(`expected opts.type to be shared, private, or undefined, got ${typeof type}`); const globalOpts = { store, methods, @@ -174520,10 +157922,8 @@ var require_cache$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { const safeMethodsToNotCache = util.safeHTTPMethods.filter((method) => methods.includes(method) === false); return (dispatch) => { return (opts, handler) => { - if (!opts.origin || safeMethodsToNotCache.includes(opts.method)) { - return dispatch(opts, handler); - } - if (origins !== undefined) { + if (!opts.origin || safeMethodsToNotCache.includes(opts.method)) return dispatch(opts, handler); + if (origins !== void 0) { const requestOrigin = opts.origin.toString().toLowerCase(); let isAllowed = false; for (let i = 0; i < origins.length; i++) { @@ -174538,33 +157938,25 @@ var require_cache$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { break; } } - if (!isAllowed) { - return dispatch(opts, handler); - } + if (!isAllowed) return dispatch(opts, handler); } opts = { ...opts, headers: normalizeHeaders(opts) }; - const reqCacheControl = opts.headers?.["cache-control"] ? parseCacheControlHeader(opts.headers["cache-control"]) : undefined; - if (reqCacheControl?.["no-store"]) { - return dispatch(opts, handler); - } + const reqCacheControl = opts.headers?.["cache-control"] ? parseCacheControlHeader(opts.headers["cache-control"]) : void 0; + if (reqCacheControl?.["no-store"]) return dispatch(opts, handler); /** * @type {import('../../types/cache-interceptor.d.ts').default.CacheKey} */ const cacheKey = makeCacheKey(opts); const result = store.get(cacheKey); - if (result && typeof result.then === "function") { - return result.then((result) => handleResult(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl, result)); - } else { - return handleResult(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl, result); - } + if (result && typeof result.then === "function") return result.then((result) => handleResult(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl, result)); + else return handleResult(dispatch, globalOpts, cacheKey, handler, opts, reqCacheControl, result); }; }; }; })); - //#endregion //#region ../node_modules/undici/lib/interceptor/decompress.js var require_decompress = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -174626,9 +158018,7 @@ var require_decompress = /* @__PURE__ */ __commonJSMin(((exports, module) => { #createDecompressionChain(encodings) { const parts = encodings.split(","); const maxContentEncodings = 5; - if (parts.length > maxContentEncodings) { - throw new Error(`too many content-encodings in response: ${parts.length}, maximum allowed is ${maxContentEncodings}`); - } + if (parts.length > maxContentEncodings) throw new Error(`too many content-encodings in response: ${parts.length}, maximum allowed is ${maxContentEncodings}`); /** @type {DecompressorStream[]} */ const decompressors = []; for (let i = parts.length - 1; i >= 0; i--) { @@ -174651,12 +158041,7 @@ var require_decompress = /* @__PURE__ */ __commonJSMin(((exports, module) => { #setupDecompressorEvents(decompressor, controller) { decompressor.on("readable", () => { let chunk; - while ((chunk = decompressor.read()) !== null) { - const result = super.onResponseData(controller, chunk); - if (result === false) { - break; - } - } + while ((chunk = decompressor.read()) !== null) if (super.onResponseData(controller, chunk) === false) break; }); decompressor.on("error", (error) => { super.onResponseError(controller, error); @@ -174706,9 +158091,7 @@ var require_decompress = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ onResponseStart(controller, statusCode, headers, statusMessage) { const contentEncoding = headers["content-encoding"]; - if (this.#shouldSkipDecompression(contentEncoding, statusCode)) { - return super.onResponseStart(controller, statusCode, headers, statusMessage); - } + if (this.#shouldSkipDecompression(contentEncoding, statusCode)) return super.onResponseStart(controller, statusCode, headers, statusMessage); const decompressors = this.#createDecompressionChain(contentEncoding.toLowerCase()); if (decompressors.length === 0) { this.#cleanupDecompressors(); @@ -174716,11 +158099,8 @@ var require_decompress = /* @__PURE__ */ __commonJSMin(((exports, module) => { } this.#decompressors = decompressors; const { "content-encoding": _, "content-length": __, ...newHeaders } = headers; - if (this.#decompressors.length === 1) { - this.#setupSingleDecompressor(controller); - } else { - this.#setupMultipleDecompressors(controller); - } + if (this.#decompressors.length === 1) this.#setupSingleDecompressor(controller); + else this.#setupMultipleDecompressors(controller); return super.onResponseStart(controller, statusCode, newHeaders, statusMessage); } /** @@ -174755,9 +158135,7 @@ var require_decompress = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ onResponseError(controller, err) { if (this.#decompressors.length > 0) { - for (const decompressor of this.#decompressors) { - decompressor.destroy(err); - } + for (const decompressor of this.#decompressors) decompressor.destroy(err); this.#cleanupDecompressors(); } super.onResponseError(controller, err); @@ -174775,14 +158153,12 @@ var require_decompress = /* @__PURE__ */ __commonJSMin(((exports, module) => { } return (dispatch) => { return (opts, handler) => { - const decompressHandler = new DecompressHandler(handler, options); - return dispatch(opts, decompressHandler); + return dispatch(opts, new DecompressHandler(handler, options)); }; }; } module.exports = createDecompressInterceptor; })); - //#endregion //#region ../node_modules/undici/lib/handler/deduplication-handler.js var require_deduplication_handler = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -174925,16 +158301,10 @@ var require_deduplication_handler = /* @__PURE__ */ __commonJSMin(((exports, mod }; try { handler.onRequestStart?.(waitingController, null); - if (waitingController.aborted) { - continue; - } + if (waitingController.aborted) continue; handler.onResponseStart?.(waitingController, this.#statusCode, this.#headers, this.#statusMessage); - if (waitingController.aborted) { - continue; - } - if (body.length > 0) { - handler.onResponseData?.(waitingController, body); - } + if (waitingController.aborted) continue; + if (body.length > 0) handler.onResponseData?.(waitingController, body); handler.onResponseEnd?.(waitingController, {}); } catch {} } @@ -174972,7 +158342,6 @@ var require_deduplication_handler = /* @__PURE__ */ __commonJSMin(((exports, mod }; module.exports = DeduplicationHandler; })); - //#endregion //#region ../node_modules/undici/lib/interceptor/deduplicate.js var require_deduplicate = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -174987,23 +158356,11 @@ var require_deduplicate = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ module.exports = (opts = {}) => { const { methods = ["GET"], skipHeaderNames = [], excludeHeaderNames = [] } = opts; - if (typeof opts !== "object" || opts === null) { - throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? "null" : typeof opts}`); - } - if (!Array.isArray(methods)) { - throw new TypeError(`expected opts.methods to be an array, got ${typeof methods}`); - } - for (const method of methods) { - if (!util.safeHTTPMethods.includes(method)) { - throw new TypeError(`expected opts.methods to only contain safe HTTP methods, got ${method}`); - } - } - if (!Array.isArray(skipHeaderNames)) { - throw new TypeError(`expected opts.skipHeaderNames to be an array, got ${typeof skipHeaderNames}`); - } - if (!Array.isArray(excludeHeaderNames)) { - throw new TypeError(`expected opts.excludeHeaderNames to be an array, got ${typeof excludeHeaderNames}`); - } + if (typeof opts !== "object" || opts === null) throw new TypeError(`expected type of opts to be an Object, got ${opts === null ? "null" : typeof opts}`); + if (!Array.isArray(methods)) throw new TypeError(`expected opts.methods to be an array, got ${typeof methods}`); + for (const method of methods) if (!util.safeHTTPMethods.includes(method)) throw new TypeError(`expected opts.methods to only contain safe HTTP methods, got ${method}`); + if (!Array.isArray(skipHeaderNames)) throw new TypeError(`expected opts.skipHeaderNames to be an array, got ${typeof skipHeaderNames}`); + if (!Array.isArray(excludeHeaderNames)) throw new TypeError(`expected opts.excludeHeaderNames to be an array, got ${typeof excludeHeaderNames}`); const skipHeaderNamesSet = new Set(skipHeaderNames.map((name) => name.toLowerCase())); const excludeHeaderNamesSet = new Set(excludeHeaderNames.map((name) => name.toLowerCase())); const safeMethodsToNotDeduplicate = util.safeHTTPMethods.filter((method) => methods.includes(method) === false); @@ -175011,25 +158368,18 @@ var require_deduplicate = /* @__PURE__ */ __commonJSMin(((exports, module) => { * Map of pending requests for deduplication * @type {Map} */ - const pendingRequests = new Map(); + const pendingRequests = /* @__PURE__ */ new Map(); return (dispatch) => { return (opts, handler) => { - if (!opts.origin || safeMethodsToNotDeduplicate.includes(opts.method)) { - return dispatch(opts, handler); - } + if (!opts.origin || safeMethodsToNotDeduplicate.includes(opts.method)) return dispatch(opts, handler); opts = { ...opts, headers: normalizeHeaders(opts) }; if (skipHeaderNamesSet.size > 0) { - for (const headerName of Object.keys(opts.headers)) { - if (skipHeaderNamesSet.has(headerName.toLowerCase())) { - return dispatch(opts, handler); - } - } + for (const headerName of Object.keys(opts.headers)) if (skipHeaderNamesSet.has(headerName.toLowerCase())) return dispatch(opts, handler); } - const cacheKey = makeCacheKey(opts); - const dedupeKey = makeDeduplicationKey(cacheKey, excludeHeaderNamesSet); + const dedupeKey = makeDeduplicationKey(makeCacheKey(opts), excludeHeaderNamesSet); const pendingHandler = pendingRequests.get(dedupeKey); if (pendingHandler) { pendingHandler.addWaitingHandler(handler); @@ -175037,28 +158387,23 @@ var require_deduplicate = /* @__PURE__ */ __commonJSMin(((exports, module) => { } const deduplicationHandler = new DeduplicationHandler(handler, () => { pendingRequests.delete(dedupeKey); - if (pendingRequestsChannel.hasSubscribers) { - pendingRequestsChannel.publish({ - size: pendingRequests.size, - key: dedupeKey, - type: "removed" - }); - } - }); - pendingRequests.set(dedupeKey, deduplicationHandler); - if (pendingRequestsChannel.hasSubscribers) { - pendingRequestsChannel.publish({ + if (pendingRequestsChannel.hasSubscribers) pendingRequestsChannel.publish({ size: pendingRequests.size, key: dedupeKey, - type: "added" + type: "removed" }); - } + }); + pendingRequests.set(dedupeKey, deduplicationHandler); + if (pendingRequestsChannel.hasSubscribers) pendingRequestsChannel.publish({ + size: pendingRequests.size, + key: dedupeKey, + type: "added" + }); return dispatch(opts, deduplicationHandler); }; }; }; })); - //#endregion //#region ../node_modules/undici/lib/cache/sqlite-cache-store.js var require_sqlite_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -175125,28 +158470,18 @@ var require_sqlite_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module */ constructor(opts) { if (opts) { - if (typeof opts !== "object") { - throw new TypeError("SqliteCacheStore options must be an object"); - } - if (opts.maxEntrySize !== undefined) { - if (typeof opts.maxEntrySize !== "number" || !Number.isInteger(opts.maxEntrySize) || opts.maxEntrySize < 0) { - throw new TypeError("SqliteCacheStore options.maxEntrySize must be a non-negative integer"); - } - if (opts.maxEntrySize > MAX_ENTRY_SIZE) { - throw new TypeError("SqliteCacheStore options.maxEntrySize must be less than 2gb"); - } + if (typeof opts !== "object") throw new TypeError("SqliteCacheStore options must be an object"); + if (opts.maxEntrySize !== void 0) { + if (typeof opts.maxEntrySize !== "number" || !Number.isInteger(opts.maxEntrySize) || opts.maxEntrySize < 0) throw new TypeError("SqliteCacheStore options.maxEntrySize must be a non-negative integer"); + if (opts.maxEntrySize > MAX_ENTRY_SIZE) throw new TypeError("SqliteCacheStore options.maxEntrySize must be less than 2gb"); this.#maxEntrySize = opts.maxEntrySize; } - if (opts.maxCount !== undefined) { - if (typeof opts.maxCount !== "number" || !Number.isInteger(opts.maxCount) || opts.maxCount < 0) { - throw new TypeError("SqliteCacheStore options.maxCount must be a non-negative integer"); - } + if (opts.maxCount !== void 0) { + if (typeof opts.maxCount !== "number" || !Number.isInteger(opts.maxCount) || opts.maxCount < 0) throw new TypeError("SqliteCacheStore options.maxCount must be a non-negative integer"); this.#maxCount = opts.maxCount; } } - if (!DatabaseSync) { - DatabaseSync = __require("node:sqlite").DatabaseSync; - } + if (!DatabaseSync) DatabaseSync = __require("node:sqlite").DatabaseSync; this.#db = new DatabaseSync(opts?.location ?? ":memory:"); this.#db.exec(` PRAGMA journal_mode = WAL; @@ -175251,17 +158586,17 @@ var require_sqlite_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module assertCacheKey(key); const value = this.#findValue(key); return value ? { - body: value.body ? Buffer.from(value.body.buffer, value.body.byteOffset, value.body.byteLength) : undefined, + body: value.body ? Buffer.from(value.body.buffer, value.body.byteOffset, value.body.byteLength) : void 0, statusCode: value.statusCode, statusMessage: value.statusMessage, - headers: value.headers ? JSON.parse(value.headers) : undefined, - etag: value.etag ? value.etag : undefined, - vary: value.vary ? JSON.parse(value.vary) : undefined, - cacheControlDirectives: value.cacheControlDirectives ? JSON.parse(value.cacheControlDirectives) : undefined, + headers: value.headers ? JSON.parse(value.headers) : void 0, + etag: value.etag ? value.etag : void 0, + vary: value.vary ? JSON.parse(value.vary) : void 0, + cacheControlDirectives: value.cacheControlDirectives ? JSON.parse(value.cacheControlDirectives) : void 0, cachedAt: value.cachedAt, staleAt: value.staleAt, deleteAt: value.deleteAt - } : undefined; + } : void 0; } /** * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key @@ -175272,13 +158607,10 @@ var require_sqlite_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module const url = this.#makeValueUrl(key); const body = Array.isArray(value.body) ? Buffer.concat(value.body) : value.body; const size = body?.byteLength; - if (size && size > this.#maxEntrySize) { - return; - } + if (size && size > this.#maxEntrySize) return; const existingValue = this.#findValue(key, true); - if (existingValue) { - this.#updateValueQuery.run(body, value.deleteAt, value.statusCode, value.statusMessage, value.headers ? JSON.stringify(value.headers) : null, value.etag ? value.etag : null, value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null, value.cachedAt, value.staleAt, existingValue.id); - } else { + if (existingValue) this.#updateValueQuery.run(body, value.deleteAt, value.statusCode, value.statusMessage, value.headers ? JSON.stringify(value.headers) : null, value.etag ? value.etag : null, value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null, value.cachedAt, value.staleAt, existingValue.id); + else { this.#prune(); this.#insertValueQuery.run(url, key.method, body, value.deleteAt, value.statusCode, value.statusMessage, value.headers ? JSON.stringify(value.headers) : null, value.etag ? value.etag : null, value.cacheControlDirectives ? JSON.stringify(value.cacheControlDirectives) : null, value.vary ? JSON.stringify(value.vary) : null, value.cachedAt, value.staleAt); } @@ -175301,11 +158633,8 @@ var require_sqlite_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module decodeStrings: true, write(chunk, encoding, callback) { size += chunk.byteLength; - if (size < store.#maxEntrySize) { - body.push(chunk); - } else { - this.destroy(); - } + if (size < store.#maxEntrySize) body.push(chunk); + else this.destroy(); callback(); }, final(callback) { @@ -175321,26 +158650,18 @@ var require_sqlite_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module * @param {import('../../types/cache-interceptor.d.ts').default.CacheKey} key */ delete(key) { - if (typeof key !== "object") { - throw new TypeError(`expected key to be object, got ${typeof key}`); - } + if (typeof key !== "object") throw new TypeError(`expected key to be object, got ${typeof key}`); this.#deleteByUrlQuery.run(this.#makeValueUrl(key)); } #prune() { - if (Number.isFinite(this.#maxCount) && this.size <= this.#maxCount) { - return 0; - } + if (Number.isFinite(this.#maxCount) && this.size <= this.#maxCount) return 0; { const removed = this.#deleteExpiredValuesQuery.run(Date.now()).changes; - if (removed) { - return removed; - } + if (removed) return removed; } { const removed = this.#deleteOldValuesQuery?.run(Math.max(Math.floor(this.#maxCount * .1), 1)).changes; - if (removed) { - return removed; - } + if (removed) return removed; } return 0; } @@ -175371,29 +158692,20 @@ var require_sqlite_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module * @type {SqliteStoreValue[]} */ const values = this.#getValuesQuery.all(url, method); - if (values.length === 0) { - return undefined; - } + if (values.length === 0) return; const now = Date.now(); for (const value of values) { - if (now >= value.deleteAt && !canBeExpired) { - return undefined; - } + if (now >= value.deleteAt && !canBeExpired) return; let matches = true; if (value.vary) { const vary = JSON.parse(value.vary); - for (const header in vary) { - if (!headerValueEquals(headers[header], vary[header])) { - matches = false; - break; - } + for (const header in vary) if (!headerValueEquals(headers[header], vary[header])) { + matches = false; + break; } } - if (matches) { - return value; - } + if (matches) return value; } - return undefined; } }; /** @@ -175402,22 +158714,15 @@ var require_sqlite_cache_store = /* @__PURE__ */ __commonJSMin(((exports, module * @returns {boolean} */ function headerValueEquals(lhs, rhs) { - if (lhs == null && rhs == null) { - return true; - } - if (lhs == null && rhs != null || lhs != null && rhs == null) { - return false; - } + if (lhs == null && rhs == null) return true; + if (lhs == null && rhs != null || lhs != null && rhs == null) return false; if (Array.isArray(lhs) && Array.isArray(rhs)) { - if (lhs.length !== rhs.length) { - return false; - } + if (lhs.length !== rhs.length) return false; return lhs.every((x, i) => x === rhs[i]); } return lhs === rhs; } })); - //#endregion //#region ../node_modules/undici/lib/web/fetch/headers.js var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -175451,29 +158756,22 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {Array|Object} object */ function fill(headers, object) { - if (Array.isArray(object)) { - for (let i = 0; i < object.length; ++i) { - const header = object[i]; - if (header.length !== 2) { - throw webidl.errors.exception({ - header: "Headers constructor", - message: `expected name/value pair to be length 2, found ${header.length}.` - }); - } - appendHeader(headers, header[0], header[1]); - } - } else if (typeof object === "object" && object !== null) { - const keys = Object.keys(object); - for (let i = 0; i < keys.length; ++i) { - appendHeader(headers, keys[i], object[keys[i]]); - } - } else { - throw webidl.errors.conversionFailed({ - prefix: "Headers constructor", - argument: "Argument 1", - types: ["sequence>", "record"] + if (Array.isArray(object)) for (let i = 0; i < object.length; ++i) { + const header = object[i]; + if (header.length !== 2) throw webidl.errors.exception({ + header: "Headers constructor", + message: `expected name/value pair to be length 2, found ${header.length}.` }); + appendHeader(headers, header[0], header[1]); } + else if (typeof object === "object" && object !== null) { + const keys = Object.keys(object); + for (let i = 0; i < keys.length; ++i) appendHeader(headers, keys[i], object[keys[i]]); + } else throw webidl.errors.conversionFailed({ + prefix: "Headers constructor", + argument: "Argument 1", + types: ["sequence>", "record"] + }); } /** * @see https://fetch.spec.whatwg.org/#concept-headers-append @@ -175483,22 +158781,17 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function appendHeader(headers, name, value) { value = headerValueNormalize(value); - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: "Headers.append", - value: name, - type: "header name" - }); - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix: "Headers.append", - value, - type: "header value" - }); - } - if (getHeadersGuard(headers) === "immutable") { - throw new TypeError("immutable"); - } + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value, + type: "header value" + }); + if (getHeadersGuard(headers) === "immutable") throw new TypeError("immutable"); return getHeadersList(headers).append(name, value, false); } /** @@ -175506,27 +158799,16 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function headersListSortAndCombine(target) { const headersList = getHeadersList(target); - if (!headersList) { - return []; - } - if (headersList.sortedMap) { - return headersList.sortedMap; - } + if (!headersList) return []; + if (headersList.sortedMap) return headersList.sortedMap; const headers = []; const names = headersList.toSortedArray(); const cookies = headersList.cookies; - if (cookies === null || cookies.length === 1) { - return headersList.sortedMap = names; - } + if (cookies === null || cookies.length === 1) return headersList.sortedMap = names; for (let i = 0; i < names.length; ++i) { const { 0: name, 1: value } = names[i]; - if (name === "set-cookie") { - for (let j = 0; j < cookies.length; ++j) { - headers.push([name, cookies[j]]); - } - } else { - headers.push([name, value]); - } + if (name === "set-cookie") for (let j = 0; j < cookies.length; ++j) headers.push([name, cookies[j]]); + else headers.push([name, value]); } return headersList.sortedMap = headers; } @@ -175577,15 +158859,11 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { name: exists.name, value: `${exists.value}${delimiter}${value}` }); - } else { - this.headersMap.set(lowercaseName, { - name, - value - }); - } - if (lowercaseName === "set-cookie") { - (this.cookies ??= []).push(value); - } + } else this.headersMap.set(lowercaseName, { + name, + value + }); + if (lowercaseName === "set-cookie") (this.cookies ??= []).push(value); } /** * @see https://fetch.spec.whatwg.org/#concept-header-list-set @@ -175596,9 +158874,7 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { set(name, value, isLowerCase) { this.sortedMap = null; const lowercaseName = isLowerCase ? name : name.toLowerCase(); - if (lowercaseName === "set-cookie") { - this.cookies = [value]; - } + if (lowercaseName === "set-cookie") this.cookies = [value]; this.headersMap.set(lowercaseName, { name, value @@ -175612,9 +158888,7 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { delete(name, isLowerCase) { this.sortedMap = null; if (!isLowerCase) name = name.toLowerCase(); - if (name === "set-cookie") { - this.cookies = null; - } + if (name === "set-cookie") this.cookies = null; this.headersMap.delete(name); } /** @@ -175627,17 +158901,11 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { return this.headersMap.get(isLowerCase ? name : name.toLowerCase())?.value ?? null; } *[Symbol.iterator]() { - for (const { 0: name, 1: { value } } of this.headersMap) { - yield [name, value]; - } + for (const { 0: name, 1: { value } } of this.headersMap) yield [name, value]; } get entries() { const headers = {}; - if (this.headersMap.size !== 0) { - for (const { name, value } of this.headersMap.values()) { - headers[name] = value; - } - } + if (this.headersMap.size !== 0) for (const { name, value } of this.headersMap.values()) headers[name] = value; return headers; } rawValues() { @@ -175645,26 +158913,15 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } get entriesList() { const headers = []; - if (this.headersMap.size !== 0) { - for (const { 0: lowerName, 1: { name, value } } of this.headersMap) { - if (lowerName === "set-cookie") { - for (const cookie of this.cookies) { - headers.push([name, cookie]); - } - } else { - headers.push([name, value]); - } - } - } + if (this.headersMap.size !== 0) for (const { 0: lowerName, 1: { name, value } } of this.headersMap) if (lowerName === "set-cookie") for (const cookie of this.cookies) headers.push([name, cookie]); + else headers.push([name, value]); return headers; } toSortedArray() { const size = this.headersMap.size; const array = new Array(size); if (size <= 32) { - if (size === 0) { - return array; - } + if (size === 0) return array; const iterator = this.headersMap[Symbol.iterator](); const firstValue = iterator.next().value; array[0] = [firstValue[0], firstValue[1].value]; @@ -175677,24 +158934,17 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { right = i; while (left < right) { pivot = left + (right - left >> 1); - if (array[pivot][0] <= x[0]) { - left = pivot + 1; - } else { - right = pivot; - } + if (array[pivot][0] <= x[0]) left = pivot + 1; + else right = pivot; } if (i !== pivot) { j = i; - while (j > left) { - array[j] = array[--j]; - } + while (j > left) array[j] = array[--j]; array[left] = x; } } /* c8 ignore next 4 */ - if (!iterator.next().done) { - throw new TypeError("Unreachable"); - } + if (!iterator.next().done) throw new TypeError("Unreachable"); return array; } else { let i = 0; @@ -175716,14 +158966,12 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {HeadersInit|Symbol} [init] * @returns */ - constructor(init = undefined) { + constructor(init = void 0) { webidl.util.markAsUncloneable(this); - if (init === kConstruct) { - return; - } + if (init === kConstruct) return; this.#headersList = new HeadersList(); this.#guard = "none"; - if (init !== undefined) { + if (init !== void 0) { init = webidl.converters.HeadersInit(init, "Headers constructor", "init"); fill(this, init); } @@ -175739,21 +158987,14 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { delete(name) { webidl.brandCheck(this, Headers); webidl.argumentLengthCheck(arguments, 1, "Headers.delete"); - const prefix = "Headers.delete"; - name = webidl.converters.ByteString(name, prefix, "name"); - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: "Headers.delete", - value: name, - type: "header name" - }); - } - if (this.#guard === "immutable") { - throw new TypeError("immutable"); - } - if (!this.#headersList.contains(name, false)) { - return; - } + name = webidl.converters.ByteString(name, "Headers.delete", "name"); + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix: "Headers.delete", + value: name, + type: "header name" + }); + if (this.#guard === "immutable") throw new TypeError("immutable"); + if (!this.#headersList.contains(name, false)) return; this.#headersList.delete(name, false); } get(name) { @@ -175761,13 +159002,11 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { webidl.argumentLengthCheck(arguments, 1, "Headers.get"); const prefix = "Headers.get"; name = webidl.converters.ByteString(name, prefix, "name"); - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: "header name" - }); - } + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); return this.#headersList.get(name, false); } has(name) { @@ -175775,13 +159014,11 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { webidl.argumentLengthCheck(arguments, 1, "Headers.has"); const prefix = "Headers.has"; name = webidl.converters.ByteString(name, prefix, "name"); - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: "header name" - }); - } + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); return this.#headersList.contains(name, false); } set(name, value) { @@ -175791,30 +159028,23 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { name = webidl.converters.ByteString(name, prefix, "name"); value = webidl.converters.ByteString(value, prefix, "value"); value = headerValueNormalize(value); - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix, - value: name, - type: "header name" - }); - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix, - value, - type: "header value" - }); - } - if (this.#guard === "immutable") { - throw new TypeError("immutable"); - } + if (!isValidHeaderName(name)) throw webidl.errors.invalidArgument({ + prefix, + value: name, + type: "header name" + }); + else if (!isValidHeaderValue(value)) throw webidl.errors.invalidArgument({ + prefix, + value, + type: "header value" + }); + if (this.#guard === "immutable") throw new TypeError("immutable"); this.#headersList.set(name, value, false); } getSetCookie() { webidl.brandCheck(this, Headers); const list = this.#headersList.cookies; - if (list) { - return [...list]; - } + if (list) return [...list]; return []; } [util$5.inspect.custom](depth, options) { @@ -175863,14 +159093,10 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { webidl.converters.HeadersInit = function(V, prefix, argument) { if (webidl.util.Type(V) === webidl.util.Types.OBJECT) { const iterator = Reflect.get(V, Symbol.iterator); - if (!util$5.types.isProxy(V) && iterator === Headers.prototype.entries) { - try { - return getHeadersList(V).entriesList; - } catch {} - } - if (typeof iterator === "function") { - return webidl.converters["sequence>"](V, prefix, argument, iterator.bind(V)); - } + if (!util$5.types.isProxy(V) && iterator === Headers.prototype.entries) try { + return getHeadersList(V).entriesList; + } catch {} + if (typeof iterator === "function") return webidl.converters["sequence>"](V, prefix, argument, iterator.bind(V)); return webidl.converters["record"](V, prefix, argument); } throw webidl.errors.conversionFailed({ @@ -175890,7 +159116,6 @@ var require_headers$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { getHeadersList }; })); - //#endregion //#region ../node_modules/undici/lib/web/fetch/response.js var require_response$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -175912,16 +159137,12 @@ var require_response$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { #headers; #state; static error() { - const responseObject = fromInnerResponse(makeNetworkError(), "immutable"); - return responseObject; + return fromInnerResponse(makeNetworkError(), "immutable"); } - static json(data, init = undefined) { + static json(data, init = void 0) { webidl.argumentLengthCheck(arguments, 1, "Response.json"); - if (init !== null) { - init = webidl.converters.ResponseInit(init); - } - const bytes = textEncoder.encode(serializeJavascriptValueToJSONString(data)); - const body = extractBody(bytes); + if (init !== null) init = webidl.converters.ResponseInit(init); + const body = extractBody(textEncoder.encode(serializeJavascriptValueToJSONString(data))); const responseObject = fromInnerResponse(makeResponse({}), "response"); initializeResponse(responseObject, init, { body: body[0], @@ -175939,23 +159160,17 @@ var require_response$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } catch (err) { throw new TypeError(`Failed to parse URL from ${url}`, { cause: err }); } - if (!redirectStatusSet.has(status)) { - throw new RangeError(`Invalid status code ${status}`); - } + if (!redirectStatusSet.has(status)) throw new RangeError(`Invalid status code ${status}`); const responseObject = fromInnerResponse(makeResponse({}), "immutable"); responseObject.#state.status = status; const value = isomorphicEncode(URLSerializer(parsedURL)); responseObject.#state.headersList.append("location", value, true); return responseObject; } - constructor(body = null, init = undefined) { + constructor(body = null, init = void 0) { webidl.util.markAsUncloneable(this); - if (body === kConstruct) { - return; - } - if (body !== null) { - body = webidl.converters.BodyInit(body, "Response", "body"); - } + if (body === kConstruct) return; + if (body !== null) body = webidl.converters.BodyInit(body, "Response", "body"); init = webidl.converters.ResponseInit(init); this.#state = makeResponse({}); this.#headers = new Headers(kConstruct); @@ -175979,9 +159194,7 @@ var require_response$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { webidl.brandCheck(this, Response); const urlList = this.#state.urlList; const url = urlList[urlList.length - 1] ?? null; - if (url === null) { - return ""; - } + if (url === null) return ""; return URLSerializer(url, true); } get redirected() { @@ -176014,22 +159227,16 @@ var require_response$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } clone() { webidl.brandCheck(this, Response); - if (bodyUnusable(this.#state)) { - throw webidl.errors.exception({ - header: "Response.clone", - message: "Body has already been consumed." - }); - } + if (bodyUnusable(this.#state)) throw webidl.errors.exception({ + header: "Response.clone", + message: "Body has already been consumed." + }); const clonedResponse = cloneResponse(this.#state); - if (this.#state.urlList.length !== 0 && this.#state.body?.stream) { - streamRegistry.register(this, new WeakRef(this.#state.body.stream)); - } + if (this.#state.urlList.length !== 0 && this.#state.body?.stream) streamRegistry.register(this, new WeakRef(this.#state.body.stream)); return fromInnerResponse(clonedResponse, getHeadersGuard(this.#headers)); } [nodeUtil$1.inspect.custom](depth, options) { - if (options.depth === null) { - options.depth = 2; - } + if (options.depth === null) options.depth = 2; options.colors ??= true; const properties = { status: this.status, @@ -176099,16 +159306,12 @@ var require_response$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { error: kEnumerableProperty }); function cloneResponse(response) { - if (response.internalResponse) { - return filterResponse(cloneResponse(response.internalResponse), response.type); - } + if (response.internalResponse) return filterResponse(cloneResponse(response.internalResponse), response.type); const newResponse = makeResponse({ ...response, body: null }); - if (response.body != null) { - newResponse.body = cloneBody(response.body); - } + if (response.body != null) newResponse.body = cloneBody(response.body); return newResponse; } function makeResponse(init) { @@ -176128,11 +159331,10 @@ var require_response$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; } function makeNetworkError(reason) { - const isError = isErrorLike(reason); return makeResponse({ type: "error", status: 0, - error: isError ? reason : new Error(reason ? String(reason) : reason), + error: isErrorLike(reason) ? reason : new Error(reason ? String(reason) : reason), aborted: reason && reason.name === "AbortError" }); } @@ -176156,69 +159358,49 @@ var require_response$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { }); } function filterResponse(response, type) { - if (type === "basic") { - return makeFilteredResponse(response, { - type: "basic", - headersList: response.headersList - }); - } else if (type === "cors") { - return makeFilteredResponse(response, { - type: "cors", - headersList: response.headersList - }); - } else if (type === "opaque") { - return makeFilteredResponse(response, { - type: "opaque", - urlList: [], - status: 0, - statusText: "", - body: null - }); - } else if (type === "opaqueredirect") { - return makeFilteredResponse(response, { - type: "opaqueredirect", - status: 0, - statusText: "", - headersList: [], - body: null - }); - } else { - assert$10(false); - } + if (type === "basic") return makeFilteredResponse(response, { + type: "basic", + headersList: response.headersList + }); + else if (type === "cors") return makeFilteredResponse(response, { + type: "cors", + headersList: response.headersList + }); + else if (type === "opaque") return makeFilteredResponse(response, { + type: "opaque", + urlList: [], + status: 0, + statusText: "", + body: null + }); + else if (type === "opaqueredirect") return makeFilteredResponse(response, { + type: "opaqueredirect", + status: 0, + statusText: "", + headersList: [], + body: null + }); + else assert$10(false); } function makeAppropriateNetworkError(fetchParams, err = null) { assert$10(isCancelled(fetchParams)); return isAborted(fetchParams) ? makeNetworkError(Object.assign(new DOMException("The operation was aborted.", "AbortError"), { cause: err })) : makeNetworkError(Object.assign(new DOMException("Request was cancelled."), { cause: err })); } function initializeResponse(response, init, body) { - if (init.status !== null && (init.status < 200 || init.status > 599)) { - throw new RangeError("init[\"status\"] must be in the range of 200 to 599, inclusive."); - } - if ("statusText" in init && init.statusText != null) { - if (!isValidReasonPhrase(String(init.statusText))) { - throw new TypeError("Invalid statusText"); - } - } - if ("status" in init && init.status != null) { - getResponseState(response).status = init.status; - } + if (init.status !== null && (init.status < 200 || init.status > 599)) throw new RangeError("init[\"status\"] must be in the range of 200 to 599, inclusive."); if ("statusText" in init && init.statusText != null) { - getResponseState(response).statusText = init.statusText; - } - if ("headers" in init && init.headers != null) { - fill(getResponseHeaders(response), init.headers); + if (!isValidReasonPhrase(String(init.statusText))) throw new TypeError("Invalid statusText"); } + if ("status" in init && init.status != null) getResponseState(response).status = init.status; + if ("statusText" in init && init.statusText != null) getResponseState(response).statusText = init.statusText; + if ("headers" in init && init.headers != null) fill(getResponseHeaders(response), init.headers); if (body) { - if (nullBodyStatus.includes(response.status)) { - throw webidl.errors.exception({ - header: "Response constructor", - message: `Invalid response status code ${response.status}` - }); - } + if (nullBodyStatus.includes(response.status)) throw webidl.errors.exception({ + header: "Response constructor", + message: `Invalid response status code ${response.status}` + }); getResponseState(response).body = body.body; - if (body.type != null && !getResponseState(response).headersList.contains("content-type", true)) { - getResponseState(response).headersList.append("content-type", body.type, true); - } + if (body.type != null && !getResponseState(response).headersList.contains("content-type", true)) getResponseState(response).headersList.append("content-type", body.type, true); } } /** @@ -176234,36 +159416,20 @@ var require_response$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { setResponseHeaders(response, headers); setHeadersList(headers, innerResponse.headersList); setHeadersGuard(headers, guard); - if (innerResponse.urlList.length !== 0 && innerResponse.body?.stream) { - streamRegistry.register(response, new WeakRef(innerResponse.body.stream)); - } + if (innerResponse.urlList.length !== 0 && innerResponse.body?.stream) streamRegistry.register(response, new WeakRef(innerResponse.body.stream)); return response; } webidl.converters.XMLHttpRequestBodyInit = function(V, prefix, name) { - if (typeof V === "string") { - return webidl.converters.USVString(V, prefix, name); - } - if (webidl.is.Blob(V)) { - return V; - } - if (webidl.is.BufferSource(V)) { - return V; - } - if (webidl.is.FormData(V)) { - return V; - } - if (webidl.is.URLSearchParams(V)) { - return V; - } + if (typeof V === "string") return webidl.converters.USVString(V, prefix, name); + if (webidl.is.Blob(V)) return V; + if (webidl.is.BufferSource(V)) return V; + if (webidl.is.FormData(V)) return V; + if (webidl.is.URLSearchParams(V)) return V; return webidl.converters.DOMString(V, prefix, name); }; webidl.converters.BodyInit = function(V, prefix, argument) { - if (webidl.is.ReadableStream(V)) { - return V; - } - if (V?.[Symbol.asyncIterator]) { - return V; - } + if (webidl.is.ReadableStream(V)) return V; + if (V?.[Symbol.asyncIterator]) return V; return webidl.converters.XMLHttpRequestBodyInit(V, prefix, argument); }; webidl.converters.ResponseInit = webidl.dictionaryConverter([ @@ -176295,7 +159461,6 @@ var require_response$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { getResponseState }; })); - //#endregion //#region ../node_modules/undici/lib/web/fetch/request.js var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -176315,7 +159480,7 @@ var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { signal.removeEventListener("abort", abort); }); - const dependentControllerMap = new WeakMap(); + const dependentControllerMap = /* @__PURE__ */ new WeakMap(); let abortSignalHasEventHandlerLeakWarning; try { abortSignalHasEventHandlerLeakWarning = getMaxListeners(new AbortController().signal) > 0; @@ -176326,18 +159491,16 @@ var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { return abort; function abort() { const ac = acRef.deref(); - if (ac !== undefined) { + if (ac !== void 0) { requestFinalizer.unregister(abort); this.removeEventListener("abort", abort); ac.abort(this.reason); const controllerList = dependentControllerMap.get(ac.signal); - if (controllerList !== undefined) { + if (controllerList !== void 0) { if (controllerList.size !== 0) { for (const ref of controllerList) { const ctrl = ref.deref(); - if (ctrl !== undefined) { - ctrl.abort(this.reason); - } + if (ctrl !== void 0) ctrl.abort(this.reason); } controllerList.clear(); } @@ -176355,13 +159518,10 @@ var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { /** @type {Headers} */ #headers; #state; - constructor(input, init = undefined) { + constructor(input, init = void 0) { webidl.util.markAsUncloneable(this); - if (input === kConstruct) { - return; - } - const prefix = "Request constructor"; - webidl.argumentLengthCheck(arguments, 1, prefix); + if (input === kConstruct) return; + webidl.argumentLengthCheck(arguments, 1, "Request constructor"); input = webidl.converters.RequestInfo(input); init = webidl.converters.RequestInit(init); let request = null; @@ -176376,9 +159536,7 @@ var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } catch (err) { throw new TypeError("Failed to parse URL from " + input, { cause: err }); } - if (parsedURL.username || parsedURL.password) { - throw new TypeError("Request cannot be constructed from a URL that includes credentials: " + input); - } + if (parsedURL.username || parsedURL.password) throw new TypeError("Request cannot be constructed from a URL that includes credentials: " + input); request = makeRequest({ urlList: [parsedURL] }); fallbackMode = "cors"; } else { @@ -176389,15 +159547,9 @@ var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } const origin = environmentSettingsObject.settingsObject.origin; let window = "client"; - if (request.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request.window, origin)) { - window = request.window; - } - if (init.window != null) { - throw new TypeError(`'window' option '${window}' must be null`); - } - if ("window" in init) { - window = "no-window"; - } + if (request.window?.constructor?.name === "EnvironmentSettingsObject" && sameOrigin(request.window, origin)) window = request.window; + if (init.window != null) throw new TypeError(`'window' option '${window}' must be null`); + if ("window" in init) window = "no-window"; request = makeRequest({ method: request.method, headersList: request.headersList, @@ -176420,9 +159572,7 @@ var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { }); const initHasKey = Object.keys(init).length !== 0; if (initHasKey) { - if (request.mode === "navigate") { - request.mode = "same-origin"; - } + if (request.mode === "navigate") request.mode = "same-origin"; request.reloadNavigation = false; request.historyNavigation = false; request.origin = "client"; @@ -176431,73 +159581,43 @@ var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { request.url = request.urlList[request.urlList.length - 1]; request.urlList = [request.url]; } - if (init.referrer !== undefined) { + if (init.referrer !== void 0) { const referrer = init.referrer; - if (referrer === "") { - request.referrer = "no-referrer"; - } else { + if (referrer === "") request.referrer = "no-referrer"; + else { let parsedReferrer; try { parsedReferrer = new URL(referrer, baseUrl); } catch (err) { throw new TypeError(`Referrer "${referrer}" is not a valid URL.`, { cause: err }); } - if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) { - request.referrer = "client"; - } else { - request.referrer = parsedReferrer; - } + if (parsedReferrer.protocol === "about:" && parsedReferrer.hostname === "client" || origin && !sameOrigin(parsedReferrer, environmentSettingsObject.settingsObject.baseUrl)) request.referrer = "client"; + else request.referrer = parsedReferrer; } } - if (init.referrerPolicy !== undefined) { - request.referrerPolicy = init.referrerPolicy; - } + if (init.referrerPolicy !== void 0) request.referrerPolicy = init.referrerPolicy; let mode; - if (init.mode !== undefined) { - mode = init.mode; - } else { - mode = fallbackMode; - } - if (mode === "navigate") { - throw webidl.errors.exception({ - header: "Request constructor", - message: "invalid request mode navigate." - }); - } - if (mode != null) { - request.mode = mode; - } - if (init.credentials !== undefined) { - request.credentials = init.credentials; - } - if (init.cache !== undefined) { - request.cache = init.cache; - } - if (request.cache === "only-if-cached" && request.mode !== "same-origin") { - throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); - } - if (init.redirect !== undefined) { - request.redirect = init.redirect; - } - if (init.integrity != null) { - request.integrity = String(init.integrity); - } - if (init.keepalive !== undefined) { - request.keepalive = Boolean(init.keepalive); - } - if (init.method !== undefined) { + if (init.mode !== void 0) mode = init.mode; + else mode = fallbackMode; + if (mode === "navigate") throw webidl.errors.exception({ + header: "Request constructor", + message: "invalid request mode navigate." + }); + if (mode != null) request.mode = mode; + if (init.credentials !== void 0) request.credentials = init.credentials; + if (init.cache !== void 0) request.cache = init.cache; + if (request.cache === "only-if-cached" && request.mode !== "same-origin") throw new TypeError("'only-if-cached' can be set only with 'same-origin' mode"); + if (init.redirect !== void 0) request.redirect = init.redirect; + if (init.integrity != null) request.integrity = String(init.integrity); + if (init.keepalive !== void 0) request.keepalive = Boolean(init.keepalive); + if (init.method !== void 0) { let method = init.method; const mayBeNormalized = normalizedMethodRecords[method]; - if (mayBeNormalized !== undefined) { - request.method = mayBeNormalized; - } else { - if (!isValidHTTPToken(method)) { - throw new TypeError(`'${method}' is not a valid HTTP method.`); - } + if (mayBeNormalized !== void 0) request.method = mayBeNormalized; + else { + if (!isValidHTTPToken(method)) throw new TypeError(`'${method}' is not a valid HTTP method.`); const upperCase = method.toUpperCase(); - if (forbiddenMethodsSet.has(upperCase)) { - throw new TypeError(`'${method}' HTTP method is unsupported.`); - } + if (forbiddenMethodsSet.has(upperCase)) throw new TypeError(`'${method}' HTTP method is unsupported.`); method = normalizedMethodRecordsBase[upperCase] ?? method; request.method = method; } @@ -176506,79 +159626,55 @@ var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { patchMethodWarning = true; } } - if (init.signal !== undefined) { - signal = init.signal; - } + if (init.signal !== void 0) signal = init.signal; this.#state = request; const ac = new AbortController(); this.#signal = ac.signal; - if (signal != null) { - if (signal.aborted) { - ac.abort(signal.reason); - } else { - this[kAbortController] = ac; - const acRef = new WeakRef(ac); - const abort = buildAbort(acRef); - if (abortSignalHasEventHandlerLeakWarning && getMaxListeners(signal) === defaultMaxListeners) { - setMaxListeners(1500, signal); - } - util.addAbortListener(signal, abort); - requestFinalizer.register(ac, { - signal, - abort - }, abort); - } + if (signal != null) if (signal.aborted) ac.abort(signal.reason); + else { + this[kAbortController] = ac; + const abort = buildAbort(new WeakRef(ac)); + if (abortSignalHasEventHandlerLeakWarning && getMaxListeners(signal) === defaultMaxListeners) setMaxListeners(1500, signal); + util.addAbortListener(signal, abort); + requestFinalizer.register(ac, { + signal, + abort + }, abort); } this.#headers = new Headers(kConstruct); setHeadersList(this.#headers, request.headersList); setHeadersGuard(this.#headers, "request"); if (mode === "no-cors") { - if (!corsSafeListedMethodsSet.has(request.method)) { - throw new TypeError(`'${request.method} is unsupported in no-cors mode.`); - } + if (!corsSafeListedMethodsSet.has(request.method)) throw new TypeError(`'${request.method} is unsupported in no-cors mode.`); setHeadersGuard(this.#headers, "request-no-cors"); } if (initHasKey) { /** @type {HeadersList} */ const headersList = getHeadersList(this.#headers); - const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList); + const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); headersList.clear(); if (headers instanceof HeadersList) { - for (const { name, value } of headers.rawValues()) { - headersList.append(name, value, false); - } + for (const { name, value } of headers.rawValues()) headersList.append(name, value, false); headersList.cookies = headers.cookies; - } else { - fillHeaders(this.#headers, headers); - } + } else fillHeaders(this.#headers, headers); } const inputBody = webidl.is.Request(input) ? input.#state.body : null; - if ((init.body != null || inputBody != null) && (request.method === "GET" || request.method === "HEAD")) { - throw new TypeError("Request with GET/HEAD method cannot have body."); - } + if ((init.body != null || inputBody != null) && (request.method === "GET" || request.method === "HEAD")) throw new TypeError("Request with GET/HEAD method cannot have body."); let initBody = null; if (init.body != null) { const [extractedBody, contentType] = extractBody(init.body, request.keepalive); initBody = extractedBody; - if (contentType && !getHeadersList(this.#headers).contains("content-type", true)) { - this.#headers.append("content-type", contentType, true); - } + if (contentType && !getHeadersList(this.#headers).contains("content-type", true)) this.#headers.append("content-type", contentType, true); } const inputOrInitBody = initBody ?? inputBody; if (inputOrInitBody != null && inputOrInitBody.source == null) { - if (initBody != null && init.duplex == null) { - throw new TypeError("RequestInit: duplex option is required when sending a body."); - } - if (request.mode !== "same-origin" && request.mode !== "cors") { - throw new TypeError("If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\""); - } + if (initBody != null && init.duplex == null) throw new TypeError("RequestInit: duplex option is required when sending a body."); + if (request.mode !== "same-origin" && request.mode !== "cors") throw new TypeError("If request is made from ReadableStream, mode should be \"same-origin\" or \"cors\""); request.useCORSPreflightFlag = true; } let finalBody = inputOrInitBody; if (initBody == null && inputBody != null) { - if (bodyUnusable(input.#state)) { - throw new TypeError("Cannot construct a Request with a Request object that has already been used."); - } + if (bodyUnusable(input.#state)) throw new TypeError("Cannot construct a Request with a Request object that has already been used."); const identityTransform = new TransformStream(); inputBody.stream.pipeThrough(identityTransform); finalBody = { @@ -176607,12 +159703,8 @@ var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } get referrer() { webidl.brandCheck(this, Request); - if (this.#state.referrer === "no-referrer") { - return ""; - } - if (this.#state.referrer === "client") { - return "about:client"; - } + if (this.#state.referrer === "no-referrer") return ""; + if (this.#state.referrer === "client") return "about:client"; return this.#state.referrer.toString(); } get referrerPolicy() { @@ -176669,17 +159761,14 @@ var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } clone() { webidl.brandCheck(this, Request); - if (bodyUnusable(this.#state)) { - throw new TypeError("unusable"); - } + if (bodyUnusable(this.#state)) throw new TypeError("unusable"); const clonedRequest = cloneRequest(this.#state); const ac = new AbortController(); - if (this.signal.aborted) { - ac.abort(this.signal.reason); - } else { + if (this.signal.aborted) ac.abort(this.signal.reason); + else { let list = dependentControllerMap.get(this.signal); - if (list === undefined) { - list = new Set(); + if (list === void 0) { + list = /* @__PURE__ */ new Set(); dependentControllerMap.set(this.signal, list); } const acRef = new WeakRef(ac); @@ -176689,9 +159778,7 @@ var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { return fromInnerRequest(clonedRequest, this.#dispatcher, ac.signal, getHeadersGuard(this.#headers)); } [nodeUtil.inspect.custom](depth, options) { - if (options.depth === null) { - options.depth = 2; - } + if (options.depth === null) options.depth = 2; options.colors ??= true; const properties = { method: this.method, @@ -176799,7 +159886,7 @@ var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false, done: init.done ?? false, timingAllowFailed: init.timingAllowFailed ?? false, - useURLCredentials: init.useURLCredentials ?? undefined, + useURLCredentials: init.useURLCredentials ?? void 0, traversableForUserPrompts: init.traversableForUserPrompts ?? "client", urlList: init.urlList, url: init.urlList[0], @@ -176811,9 +159898,7 @@ var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { ...request, body: null }); - if (request.body != null) { - newRequest.body = cloneBody(request.body); - } + if (request.body != null) newRequest.body = cloneBody(request.body); return newRequest; } /** @@ -176869,12 +159954,8 @@ var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @see https://fetch.spec.whatwg.org/#requestinfo */ webidl.converters.RequestInfo = function(V) { - if (typeof V === "string") { - return webidl.converters.USVString(V); - } - if (webidl.is.Request(V)) { - return V; - } + if (typeof V === "string") return webidl.converters.USVString(V); + if (webidl.is.Request(V)) return V; return webidl.converters.USVString(V); }; /** @@ -176969,7 +160050,6 @@ var require_request$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { getRequestState }; })); - //#endregion //#region ../node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js var require_subresource_integrity = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -177006,17 +160086,9 @@ var require_subresource_integrity = /* @__PURE__ */ __commonJSMin(((exports, mod if (runtimeFeatures.has("crypto")) { crypto = __require("node:crypto"); const cryptoHashes = crypto.getHashes(); - if (cryptoHashes.length === 0) { - validSRIHashAlgorithmTokenSet.clear(); - } - for (const algorithm of validSRIHashAlgorithmTokenSet.keys()) { - if (cryptoHashes.includes(algorithm) === false) { - validSRIHashAlgorithmTokenSet.delete(algorithm); - } - } - } else { - validSRIHashAlgorithmTokenSet.clear(); - } + if (cryptoHashes.length === 0) validSRIHashAlgorithmTokenSet.clear(); + for (const algorithm of validSRIHashAlgorithmTokenSet.keys()) if (cryptoHashes.includes(algorithm) === false) validSRIHashAlgorithmTokenSet.delete(algorithm); + } else validSRIHashAlgorithmTokenSet.clear(); /** * @typedef GetSRIHashAlgorithmIndex * @type {(algorithm: SRIHashAlgorithm) => number} @@ -177041,17 +160113,12 @@ var require_subresource_integrity = /* @__PURE__ */ __commonJSMin(((exports, mod */ const bytesMatch = runtimeFeatures.has("crypto") === false || validSRIHashAlgorithmTokenSet.size === 0 ? () => true : (bytes, metadataList) => { const parsedMetadata = parseMetadata(metadataList); - if (parsedMetadata.length === 0) { - return true; - } + if (parsedMetadata.length === 0) return true; const metadata = getStrongestMetadata(parsedMetadata); for (const item of metadata) { const algorithm = item.alg; const expectedValue = item.val; - const actualValue = applyAlgorithmToBytes(algorithm, bytes); - if (caseSensitiveMatch(actualValue, expectedValue)) { - return true; - } + if (caseSensitiveMatch(applyAlgorithmToBytes(algorithm, bytes), expectedValue)) return true; } return false; }; @@ -177074,15 +160141,12 @@ var require_subresource_integrity = /* @__PURE__ */ __commonJSMin(((exports, mod const currentAlgorithmIndex = getSRIHashAlgorithmIndex(currentAlgorithm); const newAlgorithm = item.alg; const newAlgorithmIndex = getSRIHashAlgorithmIndex(newAlgorithm); - if (newAlgorithmIndex < currentAlgorithmIndex) { - continue; - } else if (newAlgorithmIndex > currentAlgorithmIndex) { + if (newAlgorithmIndex < currentAlgorithmIndex) continue; + else if (newAlgorithmIndex > currentAlgorithmIndex) { strongest = item; result[0] = item; result.length = 1; - } else { - result.push(item); - } + } else result.push(item); } return result; } @@ -177096,17 +160160,12 @@ var require_subresource_integrity = /* @__PURE__ */ __commonJSMin(((exports, mod /** @type {MetadataList} */ const result = []; for (const item of metadata.split(" ")) { - const expressionAndOptions = item.split("?", 1); - const algorithmExpression = expressionAndOptions[0]; + const algorithmExpression = item.split("?", 1)[0]; let base64Value = ""; const algorithmAndValue = [algorithmExpression.slice(0, 6), algorithmExpression.slice(7)]; const algorithm = algorithmAndValue[0]; - if (!isValidSRIHashAlgorithm(algorithm)) { - continue; - } - if (algorithmAndValue[1]) { - base64Value = algorithmAndValue[1]; - } + if (!isValidSRIHashAlgorithm(algorithm)) continue; + if (algorithmAndValue[1]) base64Value = algorithmAndValue[1]; const metadata = { alg: algorithm, val: base64Value @@ -177136,26 +160195,14 @@ var require_subresource_integrity = /* @__PURE__ */ __commonJSMin(((exports, mod */ function caseSensitiveMatch(actualValue, expectedValue) { let actualValueLength = actualValue.length; - if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === "=") { - actualValueLength -= 1; - } - if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === "=") { - actualValueLength -= 1; - } + if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === "=") actualValueLength -= 1; + if (actualValueLength !== 0 && actualValue[actualValueLength - 1] === "=") actualValueLength -= 1; let expectedValueLength = expectedValue.length; - if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === "=") { - expectedValueLength -= 1; - } - if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === "=") { - expectedValueLength -= 1; - } - if (actualValueLength !== expectedValueLength) { - return false; - } + if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === "=") expectedValueLength -= 1; + if (expectedValueLength !== 0 && expectedValue[expectedValueLength - 1] === "=") expectedValueLength -= 1; + if (actualValueLength !== expectedValueLength) return false; for (let i = 0; i < actualValueLength; ++i) { - if (actualValue[i] === expectedValue[i] || actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") { - continue; - } + if (actualValue[i] === expectedValue[i] || actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") continue; return false; } return true; @@ -177169,7 +160216,6 @@ var require_subresource_integrity = /* @__PURE__ */ __commonJSMin(((exports, mod parseMetadata }; })); - //#endregion //#region ../node_modules/undici/lib/web/fetch/index.js var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -177206,21 +160252,15 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { this.state = "ongoing"; } terminate(reason) { - if (this.state !== "ongoing") { - return; - } + if (this.state !== "ongoing") return; this.state = "terminated"; this.connection?.destroy(reason); this.emit("terminated", reason); } abort(error) { - if (this.state !== "ongoing") { - return; - } + if (this.state !== "ongoing") return; this.state = "aborted"; - if (!error) { - error = new DOMException("The operation was aborted.", "AbortError"); - } + if (!error) error = new DOMException("The operation was aborted.", "AbortError"); this.serializedAbortReason = error; this.connection?.destroy(error); this.emit("terminated", error); @@ -177229,7 +160269,7 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { function handleFetchDone(response) { finalizeAndReportTiming(response, "fetch"); } - function fetch(input, init = undefined) { + function fetch(input, init = void 0) { webidl.argumentLengthCheck(arguments, 1, "globalThis.fetch"); let p = createDeferredPromise(); let requestObject; @@ -177244,10 +160284,7 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { abortFetch(p, request, null, requestObject.signal.reason, null); return p.promise; } - const globalObject = request.client.globalObject; - if (globalObject?.constructor?.name === "ServiceWorkerGlobalScope") { - request.serviceWorkers = "none"; - } + if (request.client.globalObject?.constructor?.name === "ServiceWorkerGlobalScope") request.serviceWorkers = "none"; let responseObject = null; let locallyAborted = false; let controller = null; @@ -177259,9 +160296,7 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { abortFetch(p, request, realResponse, requestObject.signal.reason, controller.controller); }); const processResponse = (response) => { - if (locallyAborted) { - return; - } + if (locallyAborted) return; if (response.aborted) { abortFetch(p, request, responseObject, controller.serializedAbortReason, controller.controller); return; @@ -177283,21 +160318,13 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { return p.promise; } function finalizeAndReportTiming(response, initiatorType = "other") { - if (response.type === "error" && response.aborted) { - return; - } - if (!response.urlList?.length) { - return; - } + if (response.type === "error" && response.aborted) return; + if (!response.urlList?.length) return; const originalURL = response.urlList[0]; let timingInfo = response.timingInfo; let cacheState = response.cacheState; - if (!urlIsHttpHttpsScheme(originalURL)) { - return; - } - if (timingInfo === null) { - return; - } + if (!urlIsHttpHttpsScheme(originalURL)) return; + if (timingInfo === null) return; if (!response.timingAllowPassed) { timingInfo = createOpaqueTimingInfo({ startTime: timingInfo.startTime }); cacheState = ""; @@ -177308,24 +160335,14 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { } const markResourceTiming = performance.markResourceTiming; function abortFetch(p, request, responseObject, error, controller) { - if (p) { - p.reject(error); - } - if (request.body?.stream != null && isReadable(request.body.stream)) { - request.body.stream.cancel(error).catch((err) => { - if (err.code === "ERR_INVALID_STATE") { - return; - } - throw err; - }); - } - if (responseObject == null) { - return; - } + if (p) p.reject(error); + if (request.body?.stream != null && isReadable(request.body.stream)) request.body.stream.cancel(error).catch((err) => { + if (err.code === "ERR_INVALID_STATE") return; + throw err; + }); + if (responseObject == null) return; const response = getResponseState(responseObject); - if (response.body?.stream != null && isReadable(response.body.stream)) { - controller.error(error); - } + if (response.body?.stream != null && isReadable(response.body.stream)) controller.error(error); } function fetching({ request, processRequestBodyChunkLength, processRequestEndOfBody, processResponse, processResponseEndOfBody, processResponseConsumeBody, useParallelQueue = false, dispatcher = getGlobalDispatcher() }) { assert$7(dispatcher); @@ -177335,8 +160352,7 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { taskDestination = request.client.globalObject; crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability; } - const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability); - const timingInfo = createOpaqueTimingInfo({ startTime: currentTime }); + const timingInfo = createOpaqueTimingInfo({ startTime: coarsenedSharedCurrentTime(crossOriginIsolatedCapability) }); const fetchParams = { controller: new Fetch(dispatcher), request, @@ -177350,26 +160366,12 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { crossOriginIsolatedCapability }; assert$7(!request.body || request.body.stream); - if (request.window === "client") { - request.window = request.client?.globalObject?.constructor?.name === "Window" ? request.client : "no-window"; - } - if (request.origin === "client") { - request.origin = request.client.origin; - } - if (request.policyContainer === "client") { - if (request.client != null) { - request.policyContainer = clonePolicyContainer(request.client.policyContainer); - } else { - request.policyContainer = makePolicyContainer(); - } - } - if (!request.headersList.contains("accept", true)) { - const value = "*/*"; - request.headersList.append("accept", value, true); - } - if (!request.headersList.contains("accept-language", true)) { - request.headersList.append("accept-language", "*", true); - } + if (request.window === "client") request.window = request.client?.globalObject?.constructor?.name === "Window" ? request.client : "no-window"; + if (request.origin === "client") request.origin = request.client.origin; + if (request.policyContainer === "client") if (request.client != null) request.policyContainer = clonePolicyContainer(request.client.policyContainer); + else request.policyContainer = makePolicyContainer(); + if (!request.headersList.contains("accept", true)) request.headersList.append("accept", "*/*", true); + if (!request.headersList.contains("accept-language", true)) request.headersList.append("accept-language", "*", true); if (request.priority === null) {} if (subresourceSet.has(request.destination)) {} mainFetch(fetchParams, false); @@ -177379,65 +160381,40 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { try { const request = fetchParams.request; let response = null; - if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) { - response = makeNetworkError("local URLs only"); - } + if (request.localURLsOnly && !urlIsLocal(requestCurrentURL(request))) response = makeNetworkError("local URLs only"); tryUpgradeRequestToAPotentiallyTrustworthyURL(request); - if (requestBadPort(request) === "blocked") { - response = makeNetworkError("bad port"); - } - if (request.referrerPolicy === "") { - request.referrerPolicy = request.policyContainer.referrerPolicy; - } - if (request.referrer !== "no-referrer") { - request.referrer = determineRequestsReferrer(request); - } + if (requestBadPort(request) === "blocked") response = makeNetworkError("bad port"); + if (request.referrerPolicy === "") request.referrerPolicy = request.policyContainer.referrerPolicy; + if (request.referrer !== "no-referrer") request.referrer = determineRequestsReferrer(request); if (response === null) { const currentURL = requestCurrentURL(request); if (sameOrigin(currentURL, request.url) && request.responseTainting === "basic" || currentURL.protocol === "data:" || request.mode === "navigate" || request.mode === "websocket") { request.responseTainting = "basic"; response = await schemeFetch(fetchParams); - } else if (request.mode === "same-origin") { - response = makeNetworkError("request mode cannot be \"same-origin\""); - } else if (request.mode === "no-cors") { - if (request.redirect !== "follow") { - response = makeNetworkError("redirect mode cannot be \"follow\" for \"no-cors\" request"); - } else { - request.responseTainting = "opaque"; - response = await schemeFetch(fetchParams); - } - } else if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) { - response = makeNetworkError("URL scheme must be a HTTP(S) scheme"); - } else { + } else if (request.mode === "same-origin") response = makeNetworkError("request mode cannot be \"same-origin\""); + else if (request.mode === "no-cors") if (request.redirect !== "follow") response = makeNetworkError("redirect mode cannot be \"follow\" for \"no-cors\" request"); + else { + request.responseTainting = "opaque"; + response = await schemeFetch(fetchParams); + } + else if (!urlIsHttpHttpsScheme(requestCurrentURL(request))) response = makeNetworkError("URL scheme must be a HTTP(S) scheme"); + else { request.responseTainting = "cors"; response = await httpFetch(fetchParams); } } - if (recursive) { - return response; - } + if (recursive) return response; if (response.status !== 0 && !response.internalResponse) { if (request.responseTainting === "cors") {} - if (request.responseTainting === "basic") { - response = filterResponse(response, "basic"); - } else if (request.responseTainting === "cors") { - response = filterResponse(response, "cors"); - } else if (request.responseTainting === "opaque") { - response = filterResponse(response, "opaque"); - } else { - assert$7(false); - } + if (request.responseTainting === "basic") response = filterResponse(response, "basic"); + else if (request.responseTainting === "cors") response = filterResponse(response, "cors"); + else if (request.responseTainting === "opaque") response = filterResponse(response, "opaque"); + else assert$7(false); } let internalResponse = response.status === 0 ? response : response.internalResponse; - if (internalResponse.urlList.length === 0) { - internalResponse.urlList.push(...request.urlList); - } - if (!request.timingAllowFailed) { - response.timingAllowPassed = true; - } - if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request.headers.contains("range", true)) { - response = internalResponse = makeNetworkError(); - } + if (internalResponse.urlList.length === 0) internalResponse.urlList.push(...request.urlList); + if (!request.timingAllowFailed) response.timingAllowPassed = true; + if (response.type === "opaque" && internalResponse.status === 206 && internalResponse.rangeRequested && !request.headers.contains("range", true)) response = internalResponse = makeNetworkError(); if (response.status !== 0 && (request.method === "HEAD" || request.method === "CONNECT" || nullBodyStatus.includes(internalResponse.status))) { internalResponse.body = null; fetchParams.controller.dump = true; @@ -177457,35 +160434,23 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { fetchFinale(fetchParams, response); }; fullyReadBody(response.body, processBody, processBodyError); - } else { - fetchFinale(fetchParams, response); - } + } else fetchFinale(fetchParams, response); } catch (err) { fetchParams.controller.terminate(err); } } function schemeFetch(fetchParams) { - if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) { - return Promise.resolve(makeAppropriateNetworkError(fetchParams)); - } + if (isCancelled(fetchParams) && fetchParams.request.redirectCount === 0) return Promise.resolve(makeAppropriateNetworkError(fetchParams)); const { request } = fetchParams; const { protocol: scheme } = requestCurrentURL(request); switch (scheme) { - case "about:": { - return Promise.resolve(makeNetworkError("about scheme is not supported")); - } + case "about:": return Promise.resolve(makeNetworkError("about scheme is not supported")); case "blob:": { - if (!resolveObjectURL) { - resolveObjectURL = __require("node:buffer").resolveObjectURL; - } + if (!resolveObjectURL) resolveObjectURL = __require("node:buffer").resolveObjectURL; const blobURLEntry = requestCurrentURL(request); - if (blobURLEntry.search.length !== 0) { - return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); - } + if (blobURLEntry.search.length !== 0) return Promise.resolve(makeNetworkError("NetworkError when attempting to fetch resource.")); const blob = resolveObjectURL(blobURLEntry.toString()); - if (request.method !== "GET" || !webidl.is.Blob(blob)) { - return Promise.resolve(makeNetworkError("invalid method")); - } + if (request.method !== "GET" || !webidl.is.Blob(blob)) return Promise.resolve(makeNetworkError("invalid method")); const response = makeResponse(); const fullLength = blob.size; const serializedFullLength = isomorphicEncode(`${fullLength}`); @@ -177498,26 +160463,18 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { response.headersList.set("content-type", type, true); } else { response.rangeRequested = true; - const rangeHeader = request.headersList.get("range", true); - const rangeValue = simpleRangeHeaderValue(rangeHeader, true); - if (rangeValue === "failure") { - return Promise.resolve(makeNetworkError("failed to fetch the data URL")); - } + const rangeValue = simpleRangeHeaderValue(request.headersList.get("range", true), true); + if (rangeValue === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); let { rangeStartValue: rangeStart, rangeEndValue: rangeEnd } = rangeValue; if (rangeStart === null) { rangeStart = fullLength - rangeEnd; rangeEnd = rangeStart + rangeEnd - 1; } else { - if (rangeStart >= fullLength) { - return Promise.resolve(makeNetworkError("Range start is greater than the blob's size.")); - } - if (rangeEnd === null || rangeEnd >= fullLength) { - rangeEnd = fullLength - 1; - } + if (rangeStart >= fullLength) return Promise.resolve(makeNetworkError("Range start is greater than the blob's size.")); + if (rangeEnd === null || rangeEnd >= fullLength) rangeEnd = fullLength - 1; } const slicedBlob = blob.slice(rangeStart, rangeEnd + 1, type); - const slicedBodyWithType = extractBody(slicedBlob); - response.body = slicedBodyWithType[0]; + response.body = extractBody(slicedBlob)[0]; const serializedSlicedLength = isomorphicEncode(`${slicedBlob.size}`); const contentRange = buildContentRange(rangeStart, rangeEnd, fullLength); response.status = 206; @@ -177529,11 +160486,8 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { return Promise.resolve(response); } case "data:": { - const currentURL = requestCurrentURL(request); - const dataURLStruct = dataURLProcessor(currentURL); - if (dataURLStruct === "failure") { - return Promise.resolve(makeNetworkError("failed to fetch the data URL")); - } + const dataURLStruct = dataURLProcessor(requestCurrentURL(request)); + if (dataURLStruct === "failure") return Promise.resolve(makeNetworkError("failed to fetch the data URL")); const mimeType = serializeAMimeType(dataURLStruct.mimeType); return Promise.resolve(makeResponse({ statusText: "OK", @@ -177544,35 +160498,23 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { body: safelyExtractBody(dataURLStruct.body)[0] })); } - case "file:": { - return Promise.resolve(makeNetworkError("not implemented... yet...")); - } + case "file:": return Promise.resolve(makeNetworkError("not implemented... yet...")); case "http:": - case "https:": { - return httpFetch(fetchParams).catch((err) => makeNetworkError(err)); - } - default: { - return Promise.resolve(makeNetworkError("unknown scheme")); - } + case "https:": return httpFetch(fetchParams).catch((err) => makeNetworkError(err)); + default: return Promise.resolve(makeNetworkError("unknown scheme")); } } function finalizeResponse(fetchParams, response) { fetchParams.request.done = true; - if (fetchParams.processResponseDone != null) { - queueMicrotask(() => fetchParams.processResponseDone(response)); - } + if (fetchParams.processResponseDone != null) queueMicrotask(() => fetchParams.processResponseDone(response)); } function fetchFinale(fetchParams, response) { let timingInfo = fetchParams.timingInfo; const processResponseEndOfBody = () => { const unsafeEndTime = Date.now(); - if (fetchParams.request.destination === "document") { - fetchParams.controller.fullTimingInfo = timingInfo; - } + if (fetchParams.request.destination === "document") fetchParams.controller.fullTimingInfo = timingInfo; fetchParams.controller.reportTimingSteps = () => { - if (!urlIsHttpHttpsScheme(fetchParams.request.url)) { - return; - } + if (!urlIsHttpHttpsScheme(fetchParams.request.url)) return; timingInfo.endTime = unsafeEndTime; let cacheState = response.cacheState; const bodyInfo = response.bodyInfo; @@ -177584,39 +160526,26 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { if (fetchParams.request.mode !== "navigator" || !response.hasCrossOriginRedirects) { responseStatus = response.status; const mimeType = extractMimeType(response.headersList); - if (mimeType !== "failure") { - bodyInfo.contentType = minimizeSupportedMimeType(mimeType); - } - } - if (fetchParams.request.initiatorType != null) { - markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus); + if (mimeType !== "failure") bodyInfo.contentType = minimizeSupportedMimeType(mimeType); } + if (fetchParams.request.initiatorType != null) markResourceTiming(timingInfo, fetchParams.request.url.href, fetchParams.request.initiatorType, globalThis, cacheState, bodyInfo, responseStatus); }; const processResponseEndOfBodyTask = () => { fetchParams.request.done = true; - if (fetchParams.processResponseEndOfBody != null) { - queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); - } - if (fetchParams.request.initiatorType != null) { - fetchParams.controller.reportTimingSteps(); - } + if (fetchParams.processResponseEndOfBody != null) queueMicrotask(() => fetchParams.processResponseEndOfBody(response)); + if (fetchParams.request.initiatorType != null) fetchParams.controller.reportTimingSteps(); }; queueMicrotask(() => processResponseEndOfBodyTask()); }; - if (fetchParams.processResponse != null) { - queueMicrotask(() => { - fetchParams.processResponse(response); - fetchParams.processResponse = null; - }); - } + if (fetchParams.processResponse != null) queueMicrotask(() => { + fetchParams.processResponse(response); + fetchParams.processResponse = null; + }); const internalResponse = response.type === "error" ? response : response.internalResponse ?? response; - if (internalResponse.body == null) { + if (internalResponse.body == null) processResponseEndOfBody(); + else finished$1(internalResponse.body.stream, () => { processResponseEndOfBody(); - } else { - finished$1(internalResponse.body.stream, () => { - processResponseEndOfBody(); - }); - } + }); } async function httpFetch(fetchParams) { const request = fetchParams.request; @@ -177625,33 +160554,18 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { const timingInfo = fetchParams.timingInfo; if (request.serviceWorkers === "all") {} if (response === null) { - if (request.redirect === "follow") { - request.serviceWorkers = "none"; - } + if (request.redirect === "follow") request.serviceWorkers = "none"; actualResponse = response = await httpNetworkOrCacheFetch(fetchParams); - if (request.responseTainting === "cors" && corsCheck(request, response) === "failure") { - return makeNetworkError("cors failure"); - } - if (TAOCheck(request, response) === "failure") { - request.timingAllowFailed = true; - } - } - if ((request.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck(request.origin, request.client, request.destination, actualResponse) === "blocked") { - return makeNetworkError("blocked"); + if (request.responseTainting === "cors" && corsCheck(request, response) === "failure") return makeNetworkError("cors failure"); + if (TAOCheck(request, response) === "failure") request.timingAllowFailed = true; } + if ((request.responseTainting === "opaque" || response.type === "opaque") && crossOriginResourcePolicyCheck(request.origin, request.client, request.destination, actualResponse) === "blocked") return makeNetworkError("blocked"); if (redirectStatusSet.has(actualResponse.status)) { - if (request.redirect !== "manual") { - fetchParams.controller.connection.destroy(undefined, false); - } - if (request.redirect === "error") { - response = makeNetworkError("unexpected redirect"); - } else if (request.redirect === "manual") { - response = actualResponse; - } else if (request.redirect === "follow") { - response = await httpRedirectFetch(fetchParams, response); - } else { - assert$7(false); - } + if (request.redirect !== "manual") fetchParams.controller.connection.destroy(void 0, false); + if (request.redirect === "error") response = makeNetworkError("unexpected redirect"); + else if (request.redirect === "manual") response = actualResponse; + else if (request.redirect === "follow") response = await httpRedirectFetch(fetchParams, response); + else assert$7(false); } response.timingInfo = timingInfo; return response; @@ -177662,34 +160576,20 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { let locationURL; try { locationURL = responseLocationURL(actualResponse, requestCurrentURL(request).hash); - if (locationURL == null) { - return response; - } + if (locationURL == null) return response; } catch (err) { return Promise.resolve(makeNetworkError(err)); } - if (!urlIsHttpHttpsScheme(locationURL)) { - return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); - } - if (request.redirectCount === 20) { - return Promise.resolve(makeNetworkError("redirect count exceeded")); - } + if (!urlIsHttpHttpsScheme(locationURL)) return Promise.resolve(makeNetworkError("URL scheme must be a HTTP(S) scheme")); + if (request.redirectCount === 20) return Promise.resolve(makeNetworkError("redirect count exceeded")); request.redirectCount += 1; - if (request.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request, locationURL)) { - return Promise.resolve(makeNetworkError("cross origin not allowed for request mode \"cors\"")); - } - if (request.responseTainting === "cors" && (locationURL.username || locationURL.password)) { - return Promise.resolve(makeNetworkError("URL cannot contain credentials for request mode \"cors\"")); - } - if (actualResponse.status !== 303 && request.body != null && request.body.source == null) { - return Promise.resolve(makeNetworkError()); - } + if (request.mode === "cors" && (locationURL.username || locationURL.password) && !sameOrigin(request, locationURL)) return Promise.resolve(makeNetworkError("cross origin not allowed for request mode \"cors\"")); + if (request.responseTainting === "cors" && (locationURL.username || locationURL.password)) return Promise.resolve(makeNetworkError("URL cannot contain credentials for request mode \"cors\"")); + if (actualResponse.status !== 303 && request.body != null && request.body.source == null) return Promise.resolve(makeNetworkError()); if ([301, 302].includes(actualResponse.status) && request.method === "POST" || actualResponse.status === 303 && !GET_OR_HEAD.includes(request.method)) { request.method = "GET"; request.body = null; - for (const headerName of requestBodyHeader) { - request.headersList.delete(headerName); - } + for (const headerName of requestBodyHeader) request.headersList.delete(headerName); } if (!sameOrigin(requestCurrentURL(request), locationURL)) { request.headersList.delete("authorization", true); @@ -177703,9 +160603,7 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { } const timingInfo = fetchParams.timingInfo; timingInfo.redirectEndTime = timingInfo.postRedirectStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); - if (timingInfo.redirectStartTime === 0) { - timingInfo.redirectStartTime = timingInfo.startTime; - } + if (timingInfo.redirectStartTime === 0) timingInfo.redirectStartTime = timingInfo.startTime; request.urlList.push(locationURL); setRequestReferrerPolicyOnRedirect(request, actualResponse); return mainFetch(fetchParams, true); @@ -177728,110 +160626,64 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { const includeCredentials = request.credentials === "include" || request.credentials === "same-origin" && request.responseTainting === "basic"; const contentLength = httpRequest.body ? httpRequest.body.length : null; let contentLengthHeaderValue = null; - if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) { - contentLengthHeaderValue = "0"; - } - if (contentLength != null) { - contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); - } - if (contentLengthHeaderValue != null) { - httpRequest.headersList.append("content-length", contentLengthHeaderValue, true); - } + if (httpRequest.body == null && ["POST", "PUT"].includes(httpRequest.method)) contentLengthHeaderValue = "0"; + if (contentLength != null) contentLengthHeaderValue = isomorphicEncode(`${contentLength}`); + if (contentLengthHeaderValue != null) httpRequest.headersList.append("content-length", contentLengthHeaderValue, true); if (contentLength != null && httpRequest.keepalive) {} - if (webidl.is.URL(httpRequest.referrer)) { - httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href), true); - } + if (webidl.is.URL(httpRequest.referrer)) httpRequest.headersList.append("referer", isomorphicEncode(httpRequest.referrer.href), true); appendRequestOriginHeader(httpRequest); appendFetchMetadata(httpRequest); - if (!httpRequest.headersList.contains("user-agent", true)) { - httpRequest.headersList.append("user-agent", defaultUserAgent, true); - } - if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since", true) || httpRequest.headersList.contains("if-none-match", true) || httpRequest.headersList.contains("if-unmodified-since", true) || httpRequest.headersList.contains("if-match", true) || httpRequest.headersList.contains("if-range", true))) { - httpRequest.cache = "no-store"; - } - if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control", true)) { - httpRequest.headersList.append("cache-control", "max-age=0", true); - } + if (!httpRequest.headersList.contains("user-agent", true)) httpRequest.headersList.append("user-agent", defaultUserAgent, true); + if (httpRequest.cache === "default" && (httpRequest.headersList.contains("if-modified-since", true) || httpRequest.headersList.contains("if-none-match", true) || httpRequest.headersList.contains("if-unmodified-since", true) || httpRequest.headersList.contains("if-match", true) || httpRequest.headersList.contains("if-range", true))) httpRequest.cache = "no-store"; + if (httpRequest.cache === "no-cache" && !httpRequest.preventNoCacheCacheControlHeaderModification && !httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "max-age=0", true); if (httpRequest.cache === "no-store" || httpRequest.cache === "reload") { - if (!httpRequest.headersList.contains("pragma", true)) { - httpRequest.headersList.append("pragma", "no-cache", true); - } - if (!httpRequest.headersList.contains("cache-control", true)) { - httpRequest.headersList.append("cache-control", "no-cache", true); - } - } - if (httpRequest.headersList.contains("range", true)) { - httpRequest.headersList.append("accept-encoding", "identity", true); - } - if (!httpRequest.headersList.contains("accept-encoding", true)) { - if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) { - httpRequest.headersList.append("accept-encoding", "br, gzip, deflate", true); - } else { - httpRequest.headersList.append("accept-encoding", "gzip, deflate", true); - } + if (!httpRequest.headersList.contains("pragma", true)) httpRequest.headersList.append("pragma", "no-cache", true); + if (!httpRequest.headersList.contains("cache-control", true)) httpRequest.headersList.append("cache-control", "no-cache", true); } + if (httpRequest.headersList.contains("range", true)) httpRequest.headersList.append("accept-encoding", "identity", true); + if (!httpRequest.headersList.contains("accept-encoding", true)) if (urlHasHttpsScheme(requestCurrentURL(httpRequest))) httpRequest.headersList.append("accept-encoding", "br, gzip, deflate", true); + else httpRequest.headersList.append("accept-encoding", "gzip, deflate", true); httpRequest.headersList.delete("host", true); if (includeCredentials) { if (!httpRequest.headersList.contains("authorization", true)) { let authorizationValue = null; - if (hasAuthenticationEntry(httpRequest) && (httpRequest.useURLCredentials === undefined || !includesCredentials(requestCurrentURL(httpRequest)))) {} else if (includesCredentials(requestCurrentURL(httpRequest)) && isAuthenticationFetch) { + if (hasAuthenticationEntry(httpRequest) && (httpRequest.useURLCredentials === void 0 || !includesCredentials(requestCurrentURL(httpRequest)))) {} else if (includesCredentials(requestCurrentURL(httpRequest)) && isAuthenticationFetch) { const { username, password } = requestCurrentURL(httpRequest); authorizationValue = `Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`; } - if (authorizationValue !== null) { - httpRequest.headersList.append("Authorization", authorizationValue, false); - } + if (authorizationValue !== null) httpRequest.headersList.append("Authorization", authorizationValue, false); } } - if (httpCache == null) { - httpRequest.cache = "no-store"; - } + if (httpCache == null) httpRequest.cache = "no-store"; if (httpRequest.cache !== "no-store" && httpRequest.cache !== "reload") {} if (response == null) { - if (httpRequest.cache === "only-if-cached") { - return makeNetworkError("only if cached"); - } + if (httpRequest.cache === "only-if-cached") return makeNetworkError("only if cached"); const forwardResponse = await httpNetworkFetch(httpFetchParams, includeCredentials, isNewConnectionFetch); if (!safeMethodsSet.has(httpRequest.method) && forwardResponse.status >= 200 && forwardResponse.status <= 399) {} - if (revalidatingFlag && forwardResponse.status === 304) {} - if (response == null) { - response = forwardResponse; - } + if (response == null) response = forwardResponse; } response.urlList = [...httpRequest.urlList]; - if (httpRequest.headersList.contains("range", true)) { - response.rangeRequested = true; - } + if (httpRequest.headersList.contains("range", true)) response.rangeRequested = true; response.requestIncludesCredentials = includeCredentials; if (response.status === 401 && httpRequest.responseTainting !== "cors" && includeCredentials && isTraversableNavigable(request.traversableForUserPrompts)) { if (request.body != null) { - if (request.body.source == null) { - return makeNetworkError("expected non-null body source"); - } + if (request.body.source == null) return makeNetworkError("expected non-null body source"); request.body = safelyExtractBody(request.body.source)[0]; } - if (request.useURLCredentials === undefined || isAuthenticationFetch) { - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams); - } + if (request.useURLCredentials === void 0 || isAuthenticationFetch) { + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); return response; } fetchParams.controller.connection.destroy(); response = await httpNetworkOrCacheFetch(fetchParams, true); } if (response.status === 407) { - if (request.window === "no-window") { - return makeNetworkError(); - } - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams); - } + if (request.window === "no-window") return makeNetworkError(); + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); return makeNetworkError("proxy authentication required"); } if (response.status === 421 && !isNewConnectionFetch && (request.body == null || request.body.source != null)) { - if (isCancelled(fetchParams)) { - return makeAppropriateNetworkError(fetchParams); - } + if (isCancelled(fetchParams)) return makeAppropriateNetworkError(fetchParams); fetchParams.controller.connection.destroy(); response = await httpNetworkOrCacheFetch(fetchParams, isAuthenticationFetch, true); } @@ -177846,55 +160698,36 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { destroy(err, abort = true) { if (!this.destroyed) { this.destroyed = true; - if (abort) { - this.abort?.(err ?? new DOMException("The operation was aborted.", "AbortError")); - } + if (abort) this.abort?.(err ?? new DOMException("The operation was aborted.", "AbortError")); } } }; const request = fetchParams.request; let response = null; const timingInfo = fetchParams.timingInfo; - const httpCache = null; - if (httpCache == null) { - request.cache = "no-store"; - } + request.cache = "no-store"; const newConnection = forceNewConnection ? "yes" : "no"; - if (request.mode === "websocket") {} else {} + if (request.mode === "websocket") {} let requestBody = null; - if (request.body == null && fetchParams.processRequestEndOfBody) { - queueMicrotask(() => fetchParams.processRequestEndOfBody()); - } else if (request.body != null) { + if (request.body == null && fetchParams.processRequestEndOfBody) queueMicrotask(() => fetchParams.processRequestEndOfBody()); + else if (request.body != null) { const processBodyChunk = async function* (bytes) { - if (isCancelled(fetchParams)) { - return; - } + if (isCancelled(fetchParams)) return; yield bytes; fetchParams.processRequestBodyChunkLength?.(bytes.byteLength); }; const processEndOfBody = () => { - if (isCancelled(fetchParams)) { - return; - } - if (fetchParams.processRequestEndOfBody) { - fetchParams.processRequestEndOfBody(); - } + if (isCancelled(fetchParams)) return; + if (fetchParams.processRequestEndOfBody) fetchParams.processRequestEndOfBody(); }; const processBodyError = (e) => { - if (isCancelled(fetchParams)) { - return; - } - if (e.name === "AbortError") { - fetchParams.controller.abort(); - } else { - fetchParams.controller.terminate(e); - } + if (isCancelled(fetchParams)) return; + if (e.name === "AbortError") fetchParams.controller.abort(); + else fetchParams.controller.terminate(e); }; requestBody = (async function* () { try { - for await (const bytes of request.body.stream) { - yield* processBodyChunk(bytes); - } + for await (const bytes of request.body.stream) yield* processBodyChunk(bytes); processEndOfBody(); } catch (err) { processBodyError(err); @@ -177903,14 +160736,13 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { } try { const { body, status, statusText, headersList, socket } = await dispatch({ body: requestBody }); - if (socket) { - response = makeResponse({ - status, - statusText, - headersList, - socket - }); - } else { + if (socket) response = makeResponse({ + status, + statusText, + headersList, + socket + }); + else { const iterator = body[Symbol.asyncIterator](); fetchParams.controller.next = () => iterator.next(); response = makeResponse({ @@ -177930,9 +160762,7 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { return fetchParams.controller.resume(); }; const cancelAlgorithm = (reason) => { - if (!isCancelled(fetchParams)) { - fetchParams.controller.abort(reason); - } + if (!isCancelled(fetchParams)) fetchParams.controller.abort(reason); }; const stream = new ReadableStream({ start(controller) { @@ -177947,28 +160777,23 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { source: null, length: null }; - if (!fetchParams.controller.resume) { - fetchParams.controller.on("terminated", onAborted); - } + if (!fetchParams.controller.resume) fetchParams.controller.on("terminated", onAborted); fetchParams.controller.resume = async () => { while (true) { let bytes; let isFailure; try { const { done, value } = await fetchParams.controller.next(); - if (isAborted(fetchParams)) { - break; - } - bytes = done ? undefined : value; + if (isAborted(fetchParams)) break; + bytes = done ? void 0 : value; } catch (err) { - if (fetchParams.controller.ended && !timingInfo.encodedBodySize) { - bytes = undefined; - } else { + if (fetchParams.controller.ended && !timingInfo.encodedBodySize) bytes = void 0; + else { bytes = err; isFailure = true; } } - if (bytes === undefined) { + if (bytes === void 0) { readableStreamClose(fetchParams.controller.controller); finalizeResponse(fetchParams, response); return; @@ -177979,29 +160804,19 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { return; } const buffer = new Uint8Array(bytes); - if (buffer.byteLength) { - fetchParams.controller.controller.enqueue(buffer); - } + if (buffer.byteLength) fetchParams.controller.controller.enqueue(buffer); if (isErrored(stream)) { fetchParams.controller.terminate(); return; } - if (fetchParams.controller.controller.desiredSize <= 0) { - return; - } + if (fetchParams.controller.controller.desiredSize <= 0) return; } }; function onAborted(reason) { if (isAborted(fetchParams)) { response.aborted = true; - if (isReadable(stream)) { - fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); - } - } else { - if (isReadable(stream)) { - fetchParams.controller.controller.error(new TypeError("terminated", { cause: isErrorLike(reason) ? reason : undefined })); - } - } + if (isReadable(stream)) fetchParams.controller.controller.error(fetchParams.controller.serializedAbortReason); + } else if (isReadable(stream)) fetchParams.controller.controller.error(new TypeError("terminated", { cause: isErrorLike(reason) ? reason : void 0 })); fetchParams.controller.connection.destroy(); } return response; @@ -178016,16 +160831,15 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { body: agent.isMockActive ? request.body && (request.body.source || request.body.stream) : body, headers: request.headersList.entries, maxRedirections: 0, - upgrade: request.mode === "websocket" ? "websocket" : undefined + upgrade: request.mode === "websocket" ? "websocket" : void 0 }, { body: null, abort: null, onConnect(abort) { const { connection } = fetchParams.controller; - timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(undefined, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability); - if (connection.destroyed) { - abort(new DOMException("The operation was aborted.", "AbortError")); - } else { + timingInfo.finalConnectionTimingInfo = clampAndCoarsenConnectionTimingInfo(void 0, timingInfo.postRedirectStartTime, fetchParams.crossOriginIsolatedCapability); + if (connection.destroyed) abort(new DOMException("The operation was aborted.", "AbortError")); + else { fetchParams.controller.on("terminated", abort); this.abort = connection.abort = abort; } @@ -178035,13 +160849,9 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { timingInfo.finalNetworkResponseStartTime = coarsenedSharedCurrentTime(fetchParams.crossOriginIsolatedCapability); }, onHeaders(status, rawHeaders, resume, statusText) { - if (status < 200) { - return false; - } + if (status < 200) return false; const headersList = new HeadersList(); - for (let i = 0; i < rawHeaders.length; i += 2) { - headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); - } + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); const location = headersList.get("location", true); this.body = new Readable$1({ read: resume }); const willFollow = location && request.redirect === "follow" && redirectStatusSet.has(status); @@ -178052,32 +160862,28 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { const codings = contentEncoding ? contentEncoding.toLowerCase().split(",") : []; const maxContentEncodings = 5; if (codings.length > maxContentEncodings) { - reject(new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`)); + reject(/* @__PURE__ */ new Error(`too many content-encodings in response: ${codings.length}, maximum allowed is ${maxContentEncodings}`)); return true; } for (let i = codings.length - 1; i >= 0; --i) { const coding = codings[i].trim(); - if (coding === "x-gzip" || coding === "gzip") { - decoders.push(zlib$1.createGunzip({ - flush: zlib$1.constants.Z_SYNC_FLUSH, - finishFlush: zlib$1.constants.Z_SYNC_FLUSH - })); - } else if (coding === "deflate") { - decoders.push(createInflate({ - flush: zlib$1.constants.Z_SYNC_FLUSH, - finishFlush: zlib$1.constants.Z_SYNC_FLUSH - })); - } else if (coding === "br") { - decoders.push(zlib$1.createBrotliDecompress({ - flush: zlib$1.constants.BROTLI_OPERATION_FLUSH, - finishFlush: zlib$1.constants.BROTLI_OPERATION_FLUSH - })); - } else if (coding === "zstd" && hasZstd) { - decoders.push(zlib$1.createZstdDecompress({ - flush: zlib$1.constants.ZSTD_e_continue, - finishFlush: zlib$1.constants.ZSTD_e_end - })); - } else { + if (coding === "x-gzip" || coding === "gzip") decoders.push(zlib$1.createGunzip({ + flush: zlib$1.constants.Z_SYNC_FLUSH, + finishFlush: zlib$1.constants.Z_SYNC_FLUSH + })); + else if (coding === "deflate") decoders.push(createInflate({ + flush: zlib$1.constants.Z_SYNC_FLUSH, + finishFlush: zlib$1.constants.Z_SYNC_FLUSH + })); + else if (coding === "br") decoders.push(zlib$1.createBrotliDecompress({ + flush: zlib$1.constants.BROTLI_OPERATION_FLUSH, + finishFlush: zlib$1.constants.BROTLI_OPERATION_FLUSH + })); + else if (coding === "zstd" && hasZstd) decoders.push(zlib$1.createZstdDecompress({ + flush: zlib$1.constants.ZSTD_e_continue, + finishFlush: zlib$1.constants.ZSTD_e_end + })); + else { decoders.length = 0; break; } @@ -178089,44 +160895,32 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { statusText, headersList, body: decoders.length ? pipeline$2(this.body, ...decoders, (err) => { - if (err) { - this.onError(err); - } + if (err) this.onError(err); }).on("error", onError) : this.body.on("error", onError) }); return true; }, onData(chunk) { - if (fetchParams.controller.dump) { - return; - } + if (fetchParams.controller.dump) return; const bytes = chunk; timingInfo.encodedBodySize += bytes.byteLength; return this.body.push(bytes); }, onComplete() { - if (this.abort) { - fetchParams.controller.off("terminated", this.abort); - } + if (this.abort) fetchParams.controller.off("terminated", this.abort); fetchParams.controller.ended = true; this.body.push(null); }, onError(error) { - if (this.abort) { - fetchParams.controller.off("terminated", this.abort); - } + if (this.abort) fetchParams.controller.off("terminated", this.abort); this.body?.destroy(error); fetchParams.controller.terminate(error); reject(error); }, onUpgrade(status, rawHeaders, socket) { - if (socket.session != null && status !== 200 || socket.session == null && status !== 101) { - return false; - } + if (socket.session != null && status !== 200 || socket.session == null && status !== 101) return false; const headersList = new HeadersList(); - for (let i = 0; i < rawHeaders.length; i += 2) { - headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); - } + for (let i = 0; i < rawHeaders.length; i += 2) headersList.append(bufferToLowerCasedHeaderName(rawHeaders[i]), rawHeaders[i + 1].toString("latin1"), true); resolve({ status, statusText: STATUS_CODES[status], @@ -178145,7 +160939,6 @@ var require_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { finalizeAndReportTiming }; })); - //#endregion //#region ../node_modules/undici/lib/web/cache/util.js var require_util$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -178160,9 +160953,7 @@ var require_util$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {boolean} */ function urlEquals(A, B, excludeFragment = false) { - const serializedA = URLSerializer(A, excludeFragment); - const serializedB = URLSerializer(B, excludeFragment); - return serializedA === serializedB; + return URLSerializer(A, excludeFragment) === URLSerializer(B, excludeFragment); } /** * @see https://github.com/chromium/chromium/blob/694d20d134cb553d8d89e5500b9148012b1ba299/content/browser/cache_storage/cache_storage_cache.cc#L260-L262 @@ -178173,9 +160964,7 @@ var require_util$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { const values = []; for (let value of header.split(",")) { value = value.trim(); - if (isValidHeaderName(value)) { - values.push(value); - } + if (isValidHeaderName(value)) values.push(value); } return values; } @@ -178184,7 +160973,6 @@ var require_util$3 = /* @__PURE__ */ __commonJSMin(((exports, module) => { getFieldValues }; })); - //#endregion //#region ../node_modules/undici/lib/web/cache/cache.js var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -178217,9 +161005,7 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ #relevantRequestResponseList; constructor() { - if (arguments[0] !== kConstruct) { - webidl.illegalConstructor(); - } + if (arguments[0] !== kConstruct) webidl.illegalConstructor(); webidl.util.markAsUncloneable(this); this.#relevantRequestResponseList = arguments[1]; } @@ -178230,26 +161016,22 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { request = webidl.converters.RequestInfo(request); options = webidl.converters.CacheQueryOptions(options, prefix, "options"); const p = this.#internalMatchAll(request, options, 1); - if (p.length === 0) { - return; - } + if (p.length === 0) return; return p[0]; } - async matchAll(request = undefined, options = {}) { + async matchAll(request = void 0, options = {}) { webidl.brandCheck(this, Cache); const prefix = "Cache.matchAll"; - if (request !== undefined) request = webidl.converters.RequestInfo(request); + if (request !== void 0) request = webidl.converters.RequestInfo(request); options = webidl.converters.CacheQueryOptions(options, prefix, "options"); return this.#internalMatchAll(request, options); } async add(request) { webidl.brandCheck(this, Cache); - const prefix = "Cache.add"; - webidl.argumentLengthCheck(arguments, 1, prefix); + webidl.argumentLengthCheck(arguments, 1, "Cache.add"); request = webidl.converters.RequestInfo(request); const requests = [request]; - const responseArrayPromise = this.addAll(requests); - return await responseArrayPromise; + return await this.addAll(requests); } async addAll(requests) { webidl.brandCheck(this, Cache); @@ -178258,35 +161040,27 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { const responsePromises = []; const requestList = []; for (let request of requests) { - if (request === undefined) { - throw webidl.errors.conversionFailed({ - prefix, - argument: "Argument 1", - types: ["undefined is not allowed"] - }); - } + if (request === void 0) throw webidl.errors.conversionFailed({ + prefix, + argument: "Argument 1", + types: ["undefined is not allowed"] + }); request = webidl.converters.RequestInfo(request); - if (typeof request === "string") { - continue; - } + if (typeof request === "string") continue; const r = getRequestState(request); - if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") { - throw webidl.errors.exception({ - header: prefix, - message: "Expected http/s scheme when method is not GET." - }); - } + if (!urlIsHttpHttpsScheme(r.url) || r.method !== "GET") throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme when method is not GET." + }); } /** @type {ReturnType[]} */ const fetchControllers = []; for (const request of requests) { const r = getRequestState(new Request(request)); - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: prefix, - message: "Expected http/s scheme." - }); - } + if (!urlIsHttpHttpsScheme(r.url)) throw webidl.errors.exception({ + header: prefix, + message: "Expected http/s scheme." + }); r.initiator = "fetch"; r.destination = "subresource"; requestList.push(r); @@ -178294,24 +161068,19 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { fetchControllers.push(fetching({ request: r, processResponse(response) { - if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) { - responsePromise.reject(webidl.errors.exception({ - header: "Cache.addAll", - message: "Received an invalid status code or the request failed." - })); - } else if (response.headersList.contains("vary")) { + if (response.type === "error" || response.status === 206 || response.status < 200 || response.status > 299) responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "Received an invalid status code or the request failed." + })); + else if (response.headersList.contains("vary")) { const fieldValues = getFieldValues(response.headersList.get("vary")); - for (const fieldValue of fieldValues) { - if (fieldValue === "*") { - responsePromise.reject(webidl.errors.exception({ - header: "Cache.addAll", - message: "invalid vary field value" - })); - for (const controller of fetchControllers) { - controller.abort(); - } - return; - } + for (const fieldValue of fieldValues) if (fieldValue === "*") { + responsePromise.reject(webidl.errors.exception({ + header: "Cache.addAll", + message: "invalid vary field value" + })); + for (const controller of fetchControllers) controller.abort(); + return; } } }, @@ -178325,8 +161094,7 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { })); responsePromises.push(responsePromise.promise); } - const p = Promise.all(responsePromises); - const responses = await p; + const responses = await Promise.all(responsePromises); const operations = []; let index = 0; for (const response of responses) { @@ -178347,11 +161115,8 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { errorData = e; } queueMicrotask(() => { - if (errorData === null) { - cacheJobPromise.resolve(undefined); - } else { - cacheJobPromise.reject(errorData); - } + if (errorData === null) cacheJobPromise.resolve(void 0); + else cacheJobPromise.reject(errorData); }); return cacheJobPromise.promise; } @@ -178362,50 +161127,32 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { request = webidl.converters.RequestInfo(request); response = webidl.converters.Response(response, prefix, "response"); let innerRequest = null; - if (webidl.is.Request(request)) { - innerRequest = getRequestState(request); - } else { - innerRequest = getRequestState(new Request(request)); - } - if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") { - throw webidl.errors.exception({ - header: prefix, - message: "Expected an http/s scheme when method is not GET" - }); - } + if (webidl.is.Request(request)) innerRequest = getRequestState(request); + else innerRequest = getRequestState(new Request(request)); + if (!urlIsHttpHttpsScheme(innerRequest.url) || innerRequest.method !== "GET") throw webidl.errors.exception({ + header: prefix, + message: "Expected an http/s scheme when method is not GET" + }); const innerResponse = getResponseState(response); - if (innerResponse.status === 206) { - throw webidl.errors.exception({ - header: prefix, - message: "Got 206 status" - }); - } + if (innerResponse.status === 206) throw webidl.errors.exception({ + header: prefix, + message: "Got 206 status" + }); if (innerResponse.headersList.contains("vary")) { const fieldValues = getFieldValues(innerResponse.headersList.get("vary")); - for (const fieldValue of fieldValues) { - if (fieldValue === "*") { - throw webidl.errors.exception({ - header: prefix, - message: "Got * vary field value" - }); - } - } - } - if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) { - throw webidl.errors.exception({ + for (const fieldValue of fieldValues) if (fieldValue === "*") throw webidl.errors.exception({ header: prefix, - message: "Response body is locked or disturbed" + message: "Got * vary field value" }); } + if (innerResponse.body && (isDisturbed(innerResponse.body.stream) || innerResponse.body.stream.locked)) throw webidl.errors.exception({ + header: prefix, + message: "Response body is locked or disturbed" + }); const clonedResponse = cloneResponse(innerResponse); const bodyReadPromise = createDeferredPromise(); - if (innerResponse.body != null) { - const stream = innerResponse.body.stream; - const reader = stream.getReader(); - readAllBytes(reader, bodyReadPromise.resolve, bodyReadPromise.reject); - } else { - bodyReadPromise.resolve(undefined); - } + if (innerResponse.body != null) readAllBytes(innerResponse.body.stream.getReader(), bodyReadPromise.resolve, bodyReadPromise.reject); + else bodyReadPromise.resolve(void 0); /** @type {CacheBatchOperation[]} */ const operations = []; /** @type {CacheBatchOperation} */ @@ -178416,9 +161163,7 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; operations.push(operation); const bytes = await bodyReadPromise.promise; - if (clonedResponse.body != null) { - clonedResponse.body.source = bytes; - } + if (clonedResponse.body != null) clonedResponse.body.source = bytes; const cacheJobPromise = createDeferredPromise(); let errorData = null; try { @@ -178427,11 +161172,8 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { errorData = e; } queueMicrotask(() => { - if (errorData === null) { - cacheJobPromise.resolve(); - } else { - cacheJobPromise.reject(errorData); - } + if (errorData === null) cacheJobPromise.resolve(); + else cacheJobPromise.reject(errorData); }); return cacheJobPromise.promise; } @@ -178447,9 +161189,7 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { let r = null; if (webidl.is.Request(request)) { r = getRequestState(request); - if (r.method !== "GET" && !options.ignoreMethod) { - return false; - } + if (r.method !== "GET" && !options.ignoreMethod) return false; } else { assert$5(typeof request === "string"); r = getRequestState(new Request(request)); @@ -178472,11 +161212,8 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { errorData = e; } queueMicrotask(() => { - if (errorData === null) { - cacheJobPromise.resolve(!!requestResponses?.length); - } else { - cacheJobPromise.reject(errorData); - } + if (errorData === null) cacheJobPromise.resolve(!!requestResponses?.length); + else cacheJobPromise.reject(errorData); }); return cacheJobPromise.promise; } @@ -178486,38 +161223,29 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {import('../../../types/cache').CacheQueryOptions} options * @returns {Promise} */ - async keys(request = undefined, options = {}) { + async keys(request = void 0, options = {}) { webidl.brandCheck(this, Cache); const prefix = "Cache.keys"; - if (request !== undefined) request = webidl.converters.RequestInfo(request); + if (request !== void 0) request = webidl.converters.RequestInfo(request); options = webidl.converters.CacheQueryOptions(options, prefix, "options"); let r = null; - if (request !== undefined) { + if (request !== void 0) { if (webidl.is.Request(request)) { r = getRequestState(request); - if (r.method !== "GET" && !options.ignoreMethod) { - return []; - } - } else if (typeof request === "string") { - r = getRequestState(new Request(request)); - } + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request === "string") r = getRequestState(new Request(request)); } const promise = createDeferredPromise(); const requests = []; - if (request === undefined) { - for (const requestResponse of this.#relevantRequestResponseList) { - requests.push(requestResponse[0]); - } - } else { + if (request === void 0) for (const requestResponse of this.#relevantRequestResponseList) requests.push(requestResponse[0]); + else { const requestResponses = this.#queryCache(r, options); - for (const requestResponse of requestResponses) { - requests.push(requestResponse[0]); - } + for (const requestResponse of requestResponses) requests.push(requestResponse[0]); } queueMicrotask(() => { const requestList = []; for (const request of requests) { - const requestObject = fromInnerRequest(request, undefined, new AbortController().signal, "immutable"); + const requestObject = fromInnerRequest(request, void 0, new AbortController().signal, "immutable"); requestList.push(requestObject); } promise.resolve(Object.freeze(requestList)); @@ -178536,58 +161264,42 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { const resultList = []; try { for (const operation of operations) { - if (operation.type !== "delete" && operation.type !== "put") { - throw webidl.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "operation type does not match \"delete\" or \"put\"" - }); - } - if (operation.type === "delete" && operation.response != null) { - throw webidl.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "delete operation should not have an associated response" - }); - } - if (this.#queryCache(operation.request, operation.options, addedItems).length) { - throw new DOMException("???", "InvalidStateError"); - } + if (operation.type !== "delete" && operation.type !== "put") throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "operation type does not match \"delete\" or \"put\"" + }); + if (operation.type === "delete" && operation.response != null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "delete operation should not have an associated response" + }); + if (this.#queryCache(operation.request, operation.options, addedItems).length) throw new DOMException("???", "InvalidStateError"); let requestResponses; if (operation.type === "delete") { requestResponses = this.#queryCache(operation.request, operation.options); - if (requestResponses.length === 0) { - return []; - } + if (requestResponses.length === 0) return []; for (const requestResponse of requestResponses) { const idx = cache.indexOf(requestResponse); assert$5(idx !== -1); cache.splice(idx, 1); } } else if (operation.type === "put") { - if (operation.response == null) { - throw webidl.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "put operation should have an associated response" - }); - } + if (operation.response == null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "put operation should have an associated response" + }); const r = operation.request; - if (!urlIsHttpHttpsScheme(r.url)) { - throw webidl.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "expected http or https scheme" - }); - } - if (r.method !== "GET") { - throw webidl.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "not get method" - }); - } - if (operation.options != null) { - throw webidl.errors.exception({ - header: "Cache.#batchCacheOperations", - message: "options must not be defined" - }); - } + if (!urlIsHttpHttpsScheme(r.url)) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "expected http or https scheme" + }); + if (r.method !== "GET") throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "not get method" + }); + if (operation.options != null) throw webidl.errors.exception({ + header: "Cache.#batchCacheOperations", + message: "options must not be defined" + }); requestResponses = this.#queryCache(operation.request); for (const requestResponse of requestResponses) { const idx = cache.indexOf(requestResponse); @@ -178619,9 +161331,7 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { const storage = targetStorage ?? this.#relevantRequestResponseList; for (const requestResponse of storage) { const [cachedRequest, cachedResponse] = requestResponse; - if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) { - resultList.push(requestResponse); - } + if (this.#requestMatchesCachedItem(requestQuery, cachedRequest, cachedResponse, options)) resultList.push(requestResponse); } return resultList; } @@ -178640,55 +161350,34 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { cachedURL.search = ""; queryURL.search = ""; } - if (!urlEquals(queryURL, cachedURL, true)) { - return false; - } - if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) { - return true; - } + if (!urlEquals(queryURL, cachedURL, true)) return false; + if (response == null || options?.ignoreVary || !response.headersList.contains("vary")) return true; const fieldValues = getFieldValues(response.headersList.get("vary")); for (const fieldValue of fieldValues) { - if (fieldValue === "*") { - return false; - } - const requestValue = request.headersList.get(fieldValue); - const queryValue = requestQuery.headersList.get(fieldValue); - if (requestValue !== queryValue) { - return false; - } + if (fieldValue === "*") return false; + if (request.headersList.get(fieldValue) !== requestQuery.headersList.get(fieldValue)) return false; } return true; } #internalMatchAll(request, options, maxResponses = Infinity) { let r = null; - if (request !== undefined) { + if (request !== void 0) { if (webidl.is.Request(request)) { r = getRequestState(request); - if (r.method !== "GET" && !options.ignoreMethod) { - return []; - } - } else if (typeof request === "string") { - r = getRequestState(new Request(request)); - } + if (r.method !== "GET" && !options.ignoreMethod) return []; + } else if (typeof request === "string") r = getRequestState(new Request(request)); } const responses = []; - if (request === undefined) { - for (const requestResponse of this.#relevantRequestResponseList) { - responses.push(requestResponse[1]); - } - } else { + if (request === void 0) for (const requestResponse of this.#relevantRequestResponseList) responses.push(requestResponse[1]); + else { const requestResponses = this.#queryCache(r, options); - for (const requestResponse of requestResponses) { - responses.push(requestResponse[1]); - } + for (const requestResponse of requestResponses) responses.push(requestResponse[1]); } const responseList = []; for (const response of responses) { const responseObject = fromInnerResponse(cloneResponse(response), "immutable"); responseList.push(responseObject); - if (responseList.length >= maxResponses) { - break; - } + if (responseList.length >= maxResponses) break; } return Object.freeze(responseList); } @@ -178732,7 +161421,6 @@ var require_cache = /* @__PURE__ */ __commonJSMin(((exports, module) => { webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.RequestInfo); module.exports = { Cache }; })); - //#endregion //#region ../node_modules/undici/lib/web/cache/cachestorage.js var require_cachestorage = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -178745,11 +161433,9 @@ var require_cachestorage = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @see https://w3c.github.io/ServiceWorker/#dfn-relevant-name-to-cache-map * @type {Map { request = webidl.converters.RequestInfo(request); options = webidl.converters.MultiCacheQueryOptions(options); if (options.cacheName != null) { - if (this.#caches.has(options.cacheName)) { - const cacheList = this.#caches.get(options.cacheName); - const cache = new Cache(kConstruct, cacheList); - return await cache.match(request, options); - } - } else { - for (const cacheList of this.#caches.values()) { - const cache = new Cache(kConstruct, cacheList); - const response = await cache.match(request, options); - if (response !== undefined) { - return response; - } - } + if (this.#caches.has(options.cacheName)) return await new Cache(kConstruct, this.#caches.get(options.cacheName)).match(request, options); + } else for (const cacheList of this.#caches.values()) { + const response = await new Cache(kConstruct, cacheList).match(request, options); + if (response !== void 0) return response; } } /** @@ -178795,10 +161472,7 @@ var require_cachestorage = /* @__PURE__ */ __commonJSMin(((exports, module) => { const prefix = "CacheStorage.open"; webidl.argumentLengthCheck(arguments, 1, prefix); cacheName = webidl.converters.DOMString(cacheName, prefix, "cacheName"); - if (this.#caches.has(cacheName)) { - const cache = this.#caches.get(cacheName); - return new Cache(kConstruct, cache); - } + if (this.#caches.has(cacheName)) return new Cache(kConstruct, this.#caches.get(cacheName)); const cache = []; this.#caches.set(cacheName, cache); return new Cache(kConstruct, cache); @@ -178821,8 +161495,7 @@ var require_cachestorage = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ async keys() { webidl.brandCheck(this, CacheStorage); - const keys = this.#caches.keys(); - return [...keys]; + return [...this.#caches.keys()]; } }; Object.defineProperties(CacheStorage.prototype, { @@ -178838,18 +161511,14 @@ var require_cachestorage = /* @__PURE__ */ __commonJSMin(((exports, module) => { }); module.exports = { CacheStorage }; })); - //#endregion //#region ../node_modules/undici/lib/web/cookies/constants.js var require_constants$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { - const maxAttributeValueSize = 1024; - const maxNameValuePairSize = 4096; module.exports = { - maxAttributeValueSize, - maxNameValuePairSize + maxAttributeValueSize: 1024, + maxNameValuePairSize: 4096 }; })); - //#endregion //#region ../node_modules/undici/lib/web/cookies/util.js var require_util$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -178860,9 +161529,7 @@ var require_util$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { function isCTLExcludingHtab(value) { for (let i = 0; i < value.length; ++i) { const code = value.charCodeAt(i); - if (code >= 0 && code <= 8 || code >= 10 && code <= 31 || code === 127) { - return true; - } + if (code >= 0 && code <= 8 || code >= 10 && code <= 31 || code === 127) return true; } return false; } @@ -178878,9 +161545,7 @@ var require_util$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { function validateCookieName(name) { for (let i = 0; i < name.length; ++i) { const code = name.charCodeAt(i); - if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 60 || code === 62 || code === 64 || code === 44 || code === 59 || code === 58 || code === 92 || code === 47 || code === 91 || code === 93 || code === 63 || code === 61 || code === 123 || code === 125) { - throw new Error("Invalid cookie name"); - } + if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 60 || code === 62 || code === 64 || code === 44 || code === 59 || code === 58 || code === 92 || code === 47 || code === 91 || code === 93 || code === 63 || code === 61 || code === 123 || code === 125) throw new Error("Invalid cookie name"); } } /** @@ -178895,17 +161560,13 @@ var require_util$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { let len = value.length; let i = 0; if (value[0] === "\"") { - if (len === 1 || value[len - 1] !== "\"") { - throw new Error("Invalid cookie value"); - } + if (len === 1 || value[len - 1] !== "\"") throw new Error("Invalid cookie value"); --len; ++i; } while (i < len) { const code = value.charCodeAt(i++); - if (code < 33 || code > 126 || code === 34 || code === 44 || code === 59 || code === 92) { - throw new Error("Invalid cookie value"); - } + if (code < 33 || code > 126 || code === 34 || code === 44 || code === 59 || code === 92) throw new Error("Invalid cookie value"); } } /** @@ -178915,9 +161576,7 @@ var require_util$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { function validateCookiePath(path) { for (let i = 0; i < path.length; ++i) { const code = path.charCodeAt(i); - if (code < 32 || code === 127 || code === 59) { - throw new Error("Invalid cookie path"); - } + if (code < 32 || code === 127 || code === 59) throw new Error("Invalid cookie path"); } } /** @@ -178926,9 +161585,7 @@ var require_util$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {string} domain */ function validateCookieDomain(domain) { - if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) { - throw new Error("Invalid cookie domain"); - } + if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) throw new Error("Invalid cookie domain"); } const IMFDays = [ "Sun", @@ -178996,9 +161653,7 @@ var require_util$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { second = 2DIGIT */ function toIMFDate(date) { - if (typeof date === "number") { - date = new Date(date); - } + if (typeof date === "number") date = new Date(date); return `${IMFDays[date.getUTCDay()]}, ${IMFPaddedNumbers[date.getUTCDate()]} ${IMFMonths[date.getUTCMonth()]} ${date.getUTCFullYear()} ${IMFPaddedNumbers[date.getUTCHours()]}:${IMFPaddedNumbers[date.getUTCMinutes()]}:${IMFPaddedNumbers[date.getUTCSeconds()]} GMT`; } /** @@ -179009,35 +161664,25 @@ var require_util$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {number} maxAge */ function validateCookieMaxAge(maxAge) { - if (maxAge < 0) { - throw new Error("Invalid cookie max-age"); - } + if (maxAge < 0) throw new Error("Invalid cookie max-age"); } /** * @see https://www.rfc-editor.org/rfc/rfc6265#section-4.1.1 * @param {import('./index').Cookie} cookie */ function stringify(cookie) { - if (cookie.name.length === 0) { - return null; - } + if (cookie.name.length === 0) return null; validateCookieName(cookie.name); validateCookieValue(cookie.value); const out = [`${cookie.name}=${cookie.value}`]; - if (cookie.name.startsWith("__Secure-")) { - cookie.secure = true; - } + if (cookie.name.startsWith("__Secure-")) cookie.secure = true; if (cookie.name.startsWith("__Host-")) { cookie.secure = true; cookie.domain = null; cookie.path = "/"; } - if (cookie.secure) { - out.push("Secure"); - } - if (cookie.httpOnly) { - out.push("HttpOnly"); - } + if (cookie.secure) out.push("Secure"); + if (cookie.httpOnly) out.push("HttpOnly"); if (typeof cookie.maxAge === "number") { validateCookieMaxAge(cookie.maxAge); out.push(`Max-Age=${cookie.maxAge}`); @@ -179050,16 +161695,10 @@ var require_util$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { validateCookiePath(cookie.path); out.push(`Path=${cookie.path}`); } - if (cookie.expires && cookie.expires.toString() !== "Invalid Date") { - out.push(`Expires=${toIMFDate(cookie.expires)}`); - } - if (cookie.sameSite) { - out.push(`SameSite=${cookie.sameSite}`); - } + if (cookie.expires && cookie.expires.toString() !== "Invalid Date") out.push(`Expires=${toIMFDate(cookie.expires)}`); + if (cookie.sameSite) out.push(`SameSite=${cookie.sameSite}`); for (const part of cookie.unparsed) { - if (!part.includes("=")) { - throw new Error("Invalid unparsed"); - } + if (!part.includes("=")) throw new Error("Invalid unparsed"); const [key, ...value] = part.split("="); out.push(`${key.trim()}=${value.join("=")}`); } @@ -179074,7 +161713,6 @@ var require_util$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => { stringify }; })); - //#endregion //#region ../node_modules/undici/lib/web/cookies/parse.js var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -179090,9 +161728,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {import('./index').Cookie|null} if the header is invalid, null will be returned */ function parseSetCookie(header) { - if (isCTLExcludingHtab(header)) { - return null; - } + if (isCTLExcludingHtab(header)) return null; let nameValuePair = ""; let unparsedAttributes = ""; let name = ""; @@ -179101,21 +161737,16 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => { const position = { position: 0 }; nameValuePair = collectASequenceOfCodePointsFast(";", header, position); unparsedAttributes = header.slice(position.position); - } else { - nameValuePair = header; - } - if (!nameValuePair.includes("=")) { - value = nameValuePair; - } else { + } else nameValuePair = header; + if (!nameValuePair.includes("=")) value = nameValuePair; + else { const position = { position: 0 }; name = collectASequenceOfCodePointsFast("=", nameValuePair, position); value = nameValuePair.slice(position.position + 1); } name = name.trim(); value = value.trim(); - if (name.length + value.length > maxNameValuePairSize) { - return null; - } + if (name.length + value.length > maxNameValuePairSize) return null; return { name, value: qsUnescape(value), @@ -179129,9 +161760,7 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {Object.} [cookieAttributeList={}] */ function parseUnparsedAttributes(unparsedAttributes, cookieAttributeList = {}) { - if (unparsedAttributes.length === 0) { - return cookieAttributeList; - } + if (unparsedAttributes.length === 0) return cookieAttributeList; assert$4(unparsedAttributes[0] === ";"); unparsedAttributes = unparsedAttributes.slice(1); let cookieAv = ""; @@ -179148,59 +161777,35 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => { const position = { position: 0 }; attributeName = collectASequenceOfCodePointsFast("=", cookieAv, position); attributeValue = cookieAv.slice(position.position + 1); - } else { - attributeName = cookieAv; - } + } else attributeName = cookieAv; attributeName = attributeName.trim(); attributeValue = attributeValue.trim(); - if (attributeValue.length > maxAttributeValueSize) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); - } + if (attributeValue.length > maxAttributeValueSize) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); const attributeNameLowercase = attributeName.toLowerCase(); - if (attributeNameLowercase === "expires") { - const expiryTime = new Date(attributeValue); - cookieAttributeList.expires = expiryTime; - } else if (attributeNameLowercase === "max-age") { + if (attributeNameLowercase === "expires") cookieAttributeList.expires = new Date(attributeValue); + else if (attributeNameLowercase === "max-age") { const charCode = attributeValue.charCodeAt(0); - if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); - } - if (!/^\d+$/.test(attributeValue)) { - return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); - } - const deltaSeconds = Number(attributeValue); - cookieAttributeList.maxAge = deltaSeconds; + if ((charCode < 48 || charCode > 57) && attributeValue[0] !== "-") return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + if (!/^\d+$/.test(attributeValue)) return parseUnparsedAttributes(unparsedAttributes, cookieAttributeList); + cookieAttributeList.maxAge = Number(attributeValue); } else if (attributeNameLowercase === "domain") { let cookieDomain = attributeValue; - if (cookieDomain[0] === ".") { - cookieDomain = cookieDomain.slice(1); - } + if (cookieDomain[0] === ".") cookieDomain = cookieDomain.slice(1); cookieDomain = cookieDomain.toLowerCase(); cookieAttributeList.domain = cookieDomain; } else if (attributeNameLowercase === "path") { let cookiePath = ""; - if (attributeValue.length === 0 || attributeValue[0] !== "/") { - cookiePath = "/"; - } else { - cookiePath = attributeValue; - } + if (attributeValue.length === 0 || attributeValue[0] !== "/") cookiePath = "/"; + else cookiePath = attributeValue; cookieAttributeList.path = cookiePath; - } else if (attributeNameLowercase === "secure") { - cookieAttributeList.secure = true; - } else if (attributeNameLowercase === "httponly") { - cookieAttributeList.httpOnly = true; - } else if (attributeNameLowercase === "samesite") { + } else if (attributeNameLowercase === "secure") cookieAttributeList.secure = true; + else if (attributeNameLowercase === "httponly") cookieAttributeList.httpOnly = true; + else if (attributeNameLowercase === "samesite") { let enforcement = "Default"; const attributeValueLowercase = attributeValue.toLowerCase(); - if (attributeValueLowercase.includes("none")) { - enforcement = "None"; - } - if (attributeValueLowercase.includes("strict")) { - enforcement = "Strict"; - } - if (attributeValueLowercase.includes("lax")) { - enforcement = "Lax"; - } + if (attributeValueLowercase.includes("none")) enforcement = "None"; + if (attributeValueLowercase.includes("strict")) enforcement = "Strict"; + if (attributeValueLowercase.includes("lax")) enforcement = "Lax"; cookieAttributeList.sameSite = enforcement; } else { cookieAttributeList.unparsed ??= []; @@ -179213,7 +161818,6 @@ var require_parse = /* @__PURE__ */ __commonJSMin(((exports, module) => { parseUnparsedAttributes }; })); - //#endregion //#region ../node_modules/undici/lib/web/cookies/index.js var require_cookies = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -179245,9 +161849,7 @@ var require_cookies = /* @__PURE__ */ __commonJSMin(((exports, module) => { const cookie = headers.get("cookie"); /** @type {Record} */ const out = {}; - if (!cookie) { - return out; - } + if (!cookie) return out; for (const piece of cookie.split(";")) { const [name, ...value] = piece.split("="); out[name.trim()] = value.join("="); @@ -179269,7 +161871,7 @@ var require_cookies = /* @__PURE__ */ __commonJSMin(((exports, module) => { setCookie(headers, { name, value: "", - expires: new Date(0), + expires: /* @__PURE__ */ new Date(0), ...attributes }); } @@ -179281,9 +161883,7 @@ var require_cookies = /* @__PURE__ */ __commonJSMin(((exports, module) => { webidl.argumentLengthCheck(arguments, 1, "getSetCookies"); brandChecks(headers); const cookies = headers.getSetCookie(); - if (!cookies) { - return []; - } + if (!cookies) return []; return cookies.map((pair) => parseSetCookie(pair)); } /** @@ -179304,9 +161904,7 @@ var require_cookies = /* @__PURE__ */ __commonJSMin(((exports, module) => { brandChecks(headers); cookie = webidl.converters.Cookie(cookie); const str = stringify(cookie); - if (str) { - headers.append("set-cookie", str, true); - } + if (str) headers.append("set-cookie", str, true); } webidl.converters.DeleteCookieAttributes = webidl.dictionaryConverter([{ converter: webidl.nullableConverter(webidl.converters.DOMString), @@ -179328,9 +161926,7 @@ var require_cookies = /* @__PURE__ */ __commonJSMin(((exports, module) => { }, { converter: webidl.nullableConverter((value) => { - if (typeof value === "number") { - return webidl.converters["unsigned long long"](value); - } + if (typeof value === "number") return webidl.converters["unsigned long long"](value); return new Date(value); }), key: "expires", @@ -179384,7 +161980,6 @@ var require_cookies = /* @__PURE__ */ __commonJSMin(((exports, module) => { parseCookie }; })); - //#endregion //#region ../node_modules/undici/lib/web/websocket/events.js var require_events = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -179428,9 +162023,7 @@ var require_events = /* @__PURE__ */ __commonJSMin(((exports, module) => { } get ports() { webidl.brandCheck(this, MessageEvent); - if (!Object.isFrozen(this.#eventInit.ports)) { - Object.freeze(this.#eventInit.ports); - } + if (!Object.isFrozen(this.#eventInit.ports)) Object.freeze(this.#eventInit.ports); return this.#eventInit.ports; } initMessageEvent(type, bubbles = false, cancelable = false, data = null, origin = "", lastEventId = "", source = null, ports = []) { @@ -179649,127 +162242,50 @@ var require_events = /* @__PURE__ */ __commonJSMin(((exports, module) => { createFastMessageEvent }; })); - //#endregion //#region ../node_modules/undici/lib/web/websocket/constants.js var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => { - /** - * This is a Globally Unique Identifier unique used to validate that the - * endpoint accepts websocket connections. - * @see https://www.rfc-editor.org/rfc/rfc6455.html#section-1.3 - * @type {'258EAFA5-E914-47DA-95CA-C5AB0DC85B11'} - */ - const uid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"; - /** - * @type {PropertyDescriptor} - */ - const staticPropertyDescriptors = { - enumerable: true, - writable: false, - configurable: false - }; - /** - * The states of the WebSocket connection. - * - * @readonly - * @enum - * @property {0} CONNECTING - * @property {1} OPEN - * @property {2} CLOSING - * @property {3} CLOSED - */ - const states = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 - }; - /** - * @readonly - * @enum - * @property {0} NOT_SENT - * @property {1} PROCESSING - * @property {2} SENT - */ - const sentCloseFrameState = { - SENT: 1, - RECEIVED: 2 - }; - /** - * The WebSocket opcodes. - * - * @readonly - * @enum - * @property {0x0} CONTINUATION - * @property {0x1} TEXT - * @property {0x2} BINARY - * @property {0x8} CLOSE - * @property {0x9} PING - * @property {0xA} PONG - * @see https://datatracker.ietf.org/doc/html/rfc6455#section-5.2 - */ - const opcodes = { - CONTINUATION: 0, - TEXT: 1, - BINARY: 2, - CLOSE: 8, - PING: 9, - PONG: 10 - }; - /** - * The maximum value for an unsigned 16-bit integer. - * - * @type {65535} 2 ** 16 - 1 - */ - const maxUnsigned16Bit = 65535; - /** - * The states of the parser. - * - * @readonly - * @enum - * @property {0} INFO - * @property {2} PAYLOADLENGTH_16 - * @property {3} PAYLOADLENGTH_64 - * @property {4} READ_DATA - */ - const parserStates = { - INFO: 0, - PAYLOADLENGTH_16: 2, - PAYLOADLENGTH_64: 3, - READ_DATA: 4 - }; - /** - * An empty buffer. - * - * @type {Buffer} - */ - const emptyBuffer = Buffer.allocUnsafe(0); - /** - * @readonly - * @property {1} text - * @property {2} typedArray - * @property {3} arrayBuffer - * @property {4} blob - */ - const sendHints = { - text: 1, - typedArray: 2, - arrayBuffer: 3, - blob: 4 - }; module.exports = { - uid, - sentCloseFrameState, - staticPropertyDescriptors, - states, - opcodes, - maxUnsigned16Bit, - parserStates, - emptyBuffer, - sendHints + uid: "258EAFA5-E914-47DA-95CA-C5AB0DC85B11", + sentCloseFrameState: { + SENT: 1, + RECEIVED: 2 + }, + staticPropertyDescriptors: { + enumerable: true, + writable: false, + configurable: false + }, + states: { + CONNECTING: 0, + OPEN: 1, + CLOSING: 2, + CLOSED: 3 + }, + opcodes: { + CONTINUATION: 0, + TEXT: 1, + BINARY: 2, + CLOSE: 8, + PING: 9, + PONG: 10 + }, + maxUnsigned16Bit: 65535, + parserStates: { + INFO: 0, + PAYLOADLENGTH_16: 2, + PAYLOADLENGTH_64: 3, + READ_DATA: 4 + }, + emptyBuffer: Buffer.allocUnsafe(0), + sendHints: { + text: 1, + typedArray: 2, + arrayBuffer: 3, + blob: 4 + } }; })); - //#endregion //#region ../node_modules/undici/lib/web/websocket/util.js var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -179832,9 +162348,7 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {ArrayBuffer} */ function toArrayBuffer(buffer) { - if (buffer.byteLength === buffer.buffer.byteLength) { - return buffer.buffer; - } + if (buffer.byteLength === buffer.buffer.byteLength) return buffer.buffer; return new Uint8Array(buffer).buffer; } /** @@ -179845,14 +162359,10 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {boolean} */ function isValidSubprotocol(protocol) { - if (protocol.length === 0) { - return false; - } + if (protocol.length === 0) return false; for (let i = 0; i < protocol.length; ++i) { const code = protocol.charCodeAt(i); - if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 44 || code === 47 || code === 58 || code === 59 || code === 60 || code === 61 || code === 62 || code === 63 || code === 64 || code === 91 || code === 92 || code === 93 || code === 123 || code === 125) { - return false; - } + if (code < 33 || code > 126 || code === 34 || code === 40 || code === 41 || code === 44 || code === 47 || code === 58 || code === 59 || code === 60 || code === 61 || code === 62 || code === 63 || code === 64 || code === 91 || code === 92 || code === 93 || code === 123 || code === 125) return false; } return true; } @@ -179862,9 +162372,7 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {boolean} */ function isValidStatusCode(code) { - if (code >= 1e3 && code < 1015) { - return code !== 1004 && code !== 1005 && code !== 1006; - } + if (code >= 1e3 && code < 1015) return code !== 1004 && code !== 1005 && code !== 1006; return code >= 3e3 && code <= 4999; } /** @@ -179904,10 +162412,9 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function parseExtensions(extensions) { const position = { position: 0 }; - const extensionList = new Map(); + const extensionList = /* @__PURE__ */ new Map(); while (position.position < extensions.length) { - const pair = collectASequenceOfCodePointsFast(";", extensions, position); - const [name, value = ""] = pair.split("=", 2); + const [name, value = ""] = collectASequenceOfCodePointsFast(";", extensions, position).split("=", 2); extensionList.set(removeHTTPWhitespace(name, true, false), removeHTTPWhitespace(value, false, true)); position.position++; } @@ -179922,9 +162429,7 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { function isValidClientWindowBits(value) { for (let i = 0; i < value.length; i++) { const byte = value.charCodeAt(i); - if (byte < 48 || byte > 57) { - return false; - } + if (byte < 48 || byte > 57) return false; } return true; } @@ -179940,48 +162445,21 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { } catch (e) { throw new DOMException(e, "SyntaxError"); } - if (urlRecord.protocol === "http:") { - urlRecord.protocol = "ws:"; - } else if (urlRecord.protocol === "https:") { - urlRecord.protocol = "wss:"; - } - if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") { - throw new DOMException("expected a ws: or wss: url", "SyntaxError"); - } - if (urlRecord.hash.length || urlRecord.href.endsWith("#")) { - throw new DOMException("hash", "SyntaxError"); - } + if (urlRecord.protocol === "http:") urlRecord.protocol = "ws:"; + else if (urlRecord.protocol === "https:") urlRecord.protocol = "wss:"; + if (urlRecord.protocol !== "ws:" && urlRecord.protocol !== "wss:") throw new DOMException("expected a ws: or wss: url", "SyntaxError"); + if (urlRecord.hash.length || urlRecord.href.endsWith("#")) throw new DOMException("hash", "SyntaxError"); return urlRecord; } function validateCloseCodeAndReason(code, reason) { if (code !== null) { - if (code !== 1e3 && (code < 3e3 || code > 4999)) { - throw new DOMException("invalid code", "InvalidAccessError"); - } + if (code !== 1e3 && (code < 3e3 || code > 4999)) throw new DOMException("invalid code", "InvalidAccessError"); } if (reason !== null) { const reasonBytesLength = Buffer.byteLength(reason); - if (reasonBytesLength > 123) { - throw new DOMException(`Reason must be less than 123 bytes; received ${reasonBytesLength}`, "SyntaxError"); - } + if (reasonBytesLength > 123) throw new DOMException(`Reason must be less than 123 bytes; received ${reasonBytesLength}`, "SyntaxError"); } } - /** - * Converts a Buffer to utf-8, even on platforms without icu. - * @type {(buffer: Buffer) => string} - */ - const utf8Decode = (() => { - if (typeof process.versions.icu === "string") { - const fatalDecoder = new TextDecoder("utf-8", { fatal: true }); - return fatalDecoder.decode.bind(fatalDecoder); - } - return function(buffer) { - if (isUtf8(buffer)) { - return buffer.toString("utf-8"); - } - throw new TypeError("Invalid utf-8 received."); - }; - })(); module.exports = { isConnecting, isEstablished, @@ -179991,7 +162469,16 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { isValidSubprotocol, isValidStatusCode, websocketMessageReceived, - utf8Decode, + utf8Decode: (() => { + if (typeof process.versions.icu === "string") { + const fatalDecoder = new TextDecoder("utf-8", { fatal: true }); + return fatalDecoder.decode.bind(fatalDecoder); + } + return function(buffer) { + if (isUtf8(buffer)) return buffer.toString("utf-8"); + throw new TypeError("Invalid utf-8 received."); + }; + })(), isControlFrame, isContinuationFrame, isTextBinaryFrame, @@ -180003,7 +162490,6 @@ var require_util$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => { validateCloseCodeAndReason }; })); - //#endregion //#region ../node_modules/undici/lib/web/websocket/frame.js var require_frame = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -180013,9 +162499,7 @@ var require_frame = /* @__PURE__ */ __commonJSMin(((exports, module) => { let buffer = null; let bufIdx = BUFFER_SIZE; const randomFillSync = runtimeFeatures.has("crypto") ? __require("node:crypto").randomFillSync : function randomFillSync(buffer, _offset, _size) { - for (let i = 0; i < buffer.length; ++i) { - buffer[i] = Math.random() * 255 | 0; - } + for (let i = 0; i < buffer.length; ++i) buffer[i] = Math.random() * 255 | 0; return buffer; }; function generateMask() { @@ -180061,16 +162545,13 @@ var require_frame = /* @__PURE__ */ __commonJSMin(((exports, module) => { buffer[offset - 2] = maskKey[2]; buffer[offset - 1] = maskKey[3]; buffer[1] = payloadLength; - if (payloadLength === 126) { - buffer.writeUInt16BE(bodyLength, 2); - } else if (payloadLength === 127) { + if (payloadLength === 126) buffer.writeUInt16BE(bodyLength, 2); + else if (payloadLength === 127) { buffer[2] = buffer[3] = 0; buffer.writeUIntBE(bodyLength, 4, 6); } buffer[1] |= 128; - for (let i = 0; i < bodyLength; ++i) { - buffer[offset + i] = frameData[i] ^ maskKey[i & 3]; - } + for (let i = 0; i < bodyLength; ++i) buffer[offset + i] = frameData[i] ^ maskKey[i & 3]; return buffer; } /** @@ -180079,9 +162560,7 @@ var require_frame = /* @__PURE__ */ __commonJSMin(((exports, module) => { static createFastTextFrame(buffer) { const maskKey = generateMask(); const bodyLength = buffer.length; - for (let i = 0; i < bodyLength; ++i) { - buffer[i] ^= maskKey[i & 3]; - } + for (let i = 0; i < bodyLength; ++i) buffer[i] ^= maskKey[i & 3]; let payloadLength = bodyLength; let offset = 6; if (bodyLength > maxUnsigned16Bit) { @@ -180098,9 +162577,8 @@ var require_frame = /* @__PURE__ */ __commonJSMin(((exports, module) => { head[offset - 3] = maskKey[1]; head[offset - 2] = maskKey[2]; head[offset - 1] = maskKey[3]; - if (payloadLength === 126) { - head.writeUInt16BE(bodyLength, 2); - } else if (payloadLength === 127) { + if (payloadLength === 126) head.writeUInt16BE(bodyLength, 2); + else if (payloadLength === 127) { head[2] = head[3] = 0; head.writeUIntBE(bodyLength, 4, 6); } @@ -180112,7 +162590,6 @@ var require_frame = /* @__PURE__ */ __commonJSMin(((exports, module) => { generateMask }; })); - //#endregion //#region ../node_modules/undici/lib/web/websocket/connection.js var require_connection = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -180148,19 +162625,13 @@ var require_connection = /* @__PURE__ */ __commonJSMin(((exports, module) => { redirect: "error", useURLCredentials: true }); - if (options.headers) { - const headersList = getHeadersList(new Headers(options.headers)); - request.headersList = headersList; - } + if (options.headers) request.headersList = getHeadersList(new Headers(options.headers)); const keyValue = crypto$3.randomBytes(16).toString("base64"); request.headersList.append("sec-websocket-key", keyValue, true); request.headersList.append("sec-websocket-version", "13", true); - for (const protocol of protocols) { - request.headersList.append("sec-websocket-protocol", protocol, true); - } - const permessageDeflate = "permessage-deflate; client_max_window_bits"; - request.headersList.append("sec-websocket-extensions", permessageDeflate, true); - const controller = fetching({ + for (const protocol of protocols) request.headersList.append("sec-websocket-protocol", protocol, true); + request.headersList.append("sec-websocket-extensions", "permessage-deflate; client_max_window_bits", true); + return fetching({ request, useParallelQueue: true, dispatcher: options.dispatcher, @@ -180191,9 +162662,7 @@ var require_connection = /* @__PURE__ */ __commonJSMin(((exports, module) => { failWebsocketConnection(handler, 1002, "Server did not set Connection header to \"upgrade\"."); return; } - const secWSAccept = response.headersList.get("Sec-WebSocket-Accept"); - const digest = crypto$3.hash("sha1", keyValue + uid, "base64"); - if (secWSAccept !== digest) { + if (response.headersList.get("Sec-WebSocket-Accept") !== crypto$3.hash("sha1", keyValue + uid, "base64")) { failWebsocketConnection(handler, 1002, "Incorrect hash received in Sec-WebSocket-Accept header."); return; } @@ -180208,8 +162677,7 @@ var require_connection = /* @__PURE__ */ __commonJSMin(((exports, module) => { } const secProtocol = response.headersList.get("Sec-WebSocket-Protocol"); if (secProtocol !== null) { - const requestProtocols = getDecodeSplit("sec-websocket-protocol", request.headersList); - if (!requestProtocols.includes(secProtocol)) { + if (!getDecodeSplit("sec-websocket-protocol", request.headersList).includes(secProtocol)) { failWebsocketConnection(handler, 1002, "Protocol was not set in the opening handshake."); return; } @@ -180221,7 +162689,6 @@ var require_connection = /* @__PURE__ */ __commonJSMin(((exports, module) => { handler.onConnectionEstablished(response, extensions); } }); - return controller; } /** * @see https://whatpr.org/websockets/48.html#close-the-websocket @@ -180238,28 +162705,21 @@ var require_connection = /* @__PURE__ */ __commonJSMin(((exports, module) => { object.readyState = states.CLOSING; } else if (!object.closeState.has(sentCloseFrameState.SENT) && !object.closeState.has(sentCloseFrameState.RECEIVED)) { const frame = new WebsocketFrameSend(); - if (reason.length !== 0 && code === null) { - code = 1e3; - } + if (reason.length !== 0 && code === null) code = 1e3; assert$3(code === null || Number.isInteger(code)); - if (code === null && reason.length === 0) { - frame.frameData = emptyBuffer; - } else if (code !== null && reason === null) { + if (code === null && reason.length === 0) frame.frameData = emptyBuffer; + else if (code !== null && reason === null) { frame.frameData = Buffer.allocUnsafe(2); frame.frameData.writeUInt16BE(code, 0); } else if (code !== null && reason !== null) { frame.frameData = Buffer.allocUnsafe(2 + Buffer.byteLength(reason)); frame.frameData.writeUInt16BE(code, 0); frame.frameData.write(reason, 2, "utf-8"); - } else { - frame.frameData = emptyBuffer; - } + } else frame.frameData = emptyBuffer; object.socket.write(frame.createFrame(opcodes.CLOSE)); object.closeState.add(sentCloseFrameState.SENT); object.readyState = states.CLOSING; - } else { - object.readyState = states.CLOSING; - } + } else object.readyState = states.CLOSING; } /** * @param {import('./websocket').Handler} handler @@ -180269,15 +162729,10 @@ var require_connection = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {void} */ function failWebsocketConnection(handler, code, reason, cause) { - if (isEstablished(handler.readyState)) { - closeWebSocketConnection(handler, code, reason, false); - } + if (isEstablished(handler.readyState)) closeWebSocketConnection(handler, code, reason, false); handler.controller.abort(); - if (isConnecting(handler.readyState)) { - handler.onSocketClose(); - } else if (handler.socket?.destroyed === false) { - handler.socket.destroy(); - } + if (isConnecting(handler.readyState)) handler.onSocketClose(); + else if (handler.socket?.destroyed === false) handler.socket.destroy(); } module.exports = { establishWebSocketConnection, @@ -180285,7 +162740,6 @@ var require_connection = /* @__PURE__ */ __commonJSMin(((exports, module) => { closeWebSocketConnection }; })); - //#endregion //#region ../node_modules/undici/lib/web/websocket/permessage-deflate.js var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -180312,7 +162766,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module let windowBits = Z_DEFAULT_WINDOWBITS; if (this.#options.serverMaxWindowBits) { if (!isValidClientWindowBits(this.#options.serverMaxWindowBits)) { - callback(new Error("Invalid server_max_window_bits")); + callback(/* @__PURE__ */ new Error("Invalid server_max_window_bits")); return; } windowBits = Number.parseInt(this.#options.serverMaxWindowBits); @@ -180330,9 +162784,7 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module }); } this.#inflate.write(chunk); - if (fin) { - this.#inflate.write(tail); - } + if (fin) this.#inflate.write(tail); this.#inflate.flush(() => { const full = Buffer.concat(this.#inflate[kBuffer], this.#inflate[kLength]); this.#inflate[kBuffer].length = 0; @@ -180343,7 +162795,6 @@ var require_permessage_deflate = /* @__PURE__ */ __commonJSMin(((exports, module }; module.exports = { PerMessageDeflate }; })); - //#endregion //#region ../node_modules/undici/lib/web/websocket/receiver.js var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -180369,10 +162820,8 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => { constructor(handler, extensions) { super(); this.#handler = handler; - this.#extensions = extensions == null ? new Map() : extensions; - if (this.#extensions.has("permessage-deflate")) { - this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions)); - } + this.#extensions = extensions == null ? /* @__PURE__ */ new Map() : extensions; + if (this.#extensions.has("permessage-deflate")) this.#extensions.set("permessage-deflate", new PerMessageDeflate(extensions)); } /** * @param {Buffer} chunk @@ -180390,129 +162839,112 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => { * or not enough bytes are buffered to parse. */ run(callback) { - while (this.#loop) { - if (this.#state === parserStates.INFO) { - if (this.#byteOffset < 2) { - return callback(); - } - const buffer = this.consume(2); - const fin = (buffer[0] & 128) !== 0; - const opcode = buffer[0] & 15; - const masked = (buffer[1] & 128) === 128; - const fragmented = !fin && opcode !== opcodes.CONTINUATION; - const payloadLength = buffer[1] & 127; - const rsv1 = buffer[0] & 64; - const rsv2 = buffer[0] & 32; - const rsv3 = buffer[0] & 16; - if (!isValidOpcode(opcode)) { - failWebsocketConnection(this.#handler, 1002, "Invalid opcode received"); - return callback(); - } - if (masked) { - failWebsocketConnection(this.#handler, 1002, "Frame cannot be masked"); - return callback(); - } - if (rsv1 !== 0 && !this.#extensions.has("permessage-deflate")) { - failWebsocketConnection(this.#handler, 1002, "Expected RSV1 to be clear."); - return; - } - if (rsv2 !== 0 || rsv3 !== 0) { - failWebsocketConnection(this.#handler, 1002, "RSV1, RSV2, RSV3 must be clear"); - return; - } - if (fragmented && !isTextBinaryFrame(opcode)) { - failWebsocketConnection(this.#handler, 1002, "Invalid frame type was fragmented."); - return; - } - if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { - failWebsocketConnection(this.#handler, 1002, "Expected continuation frame"); - return; - } - if (this.#info.fragmented && fragmented) { - failWebsocketConnection(this.#handler, 1002, "Fragmented frame exceeded 125 bytes."); - return; - } - if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { - failWebsocketConnection(this.#handler, 1002, "Control frame either too large or fragmented"); - return; - } - if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { - failWebsocketConnection(this.#handler, 1002, "Unexpected continuation frame"); - return; - } - if (payloadLength <= 125) { - this.#info.payloadLength = payloadLength; - this.#state = parserStates.READ_DATA; - } else if (payloadLength === 126) { - this.#state = parserStates.PAYLOADLENGTH_16; - } else if (payloadLength === 127) { - this.#state = parserStates.PAYLOADLENGTH_64; - } - if (isTextBinaryFrame(opcode)) { - this.#info.binaryType = opcode; - this.#info.compressed = rsv1 !== 0; - } - this.#info.opcode = opcode; - this.#info.masked = masked; - this.#info.fin = fin; - this.#info.fragmented = fragmented; - } else if (this.#state === parserStates.PAYLOADLENGTH_16) { - if (this.#byteOffset < 2) { - return callback(); - } - const buffer = this.consume(2); - this.#info.payloadLength = buffer.readUInt16BE(0); - this.#state = parserStates.READ_DATA; - } else if (this.#state === parserStates.PAYLOADLENGTH_64) { - if (this.#byteOffset < 8) { - return callback(); - } - const buffer = this.consume(8); - const upper = buffer.readUInt32BE(0); - if (upper > 2 ** 31 - 1) { - failWebsocketConnection(this.#handler, 1009, "Received payload length > 2^31 bytes."); - return; - } - const lower = buffer.readUInt32BE(4); - this.#info.payloadLength = (upper << 8) + lower; + while (this.#loop) if (this.#state === parserStates.INFO) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + const fin = (buffer[0] & 128) !== 0; + const opcode = buffer[0] & 15; + const masked = (buffer[1] & 128) === 128; + const fragmented = !fin && opcode !== opcodes.CONTINUATION; + const payloadLength = buffer[1] & 127; + const rsv1 = buffer[0] & 64; + const rsv2 = buffer[0] & 32; + const rsv3 = buffer[0] & 16; + if (!isValidOpcode(opcode)) { + failWebsocketConnection(this.#handler, 1002, "Invalid opcode received"); + return callback(); + } + if (masked) { + failWebsocketConnection(this.#handler, 1002, "Frame cannot be masked"); + return callback(); + } + if (rsv1 !== 0 && !this.#extensions.has("permessage-deflate")) { + failWebsocketConnection(this.#handler, 1002, "Expected RSV1 to be clear."); + return; + } + if (rsv2 !== 0 || rsv3 !== 0) { + failWebsocketConnection(this.#handler, 1002, "RSV1, RSV2, RSV3 must be clear"); + return; + } + if (fragmented && !isTextBinaryFrame(opcode)) { + failWebsocketConnection(this.#handler, 1002, "Invalid frame type was fragmented."); + return; + } + if (isTextBinaryFrame(opcode) && this.#fragments.length > 0) { + failWebsocketConnection(this.#handler, 1002, "Expected continuation frame"); + return; + } + if (this.#info.fragmented && fragmented) { + failWebsocketConnection(this.#handler, 1002, "Fragmented frame exceeded 125 bytes."); + return; + } + if ((payloadLength > 125 || fragmented) && isControlFrame(opcode)) { + failWebsocketConnection(this.#handler, 1002, "Control frame either too large or fragmented"); + return; + } + if (isContinuationFrame(opcode) && this.#fragments.length === 0 && !this.#info.compressed) { + failWebsocketConnection(this.#handler, 1002, "Unexpected continuation frame"); + return; + } + if (payloadLength <= 125) { + this.#info.payloadLength = payloadLength; this.#state = parserStates.READ_DATA; - } else if (this.#state === parserStates.READ_DATA) { - if (this.#byteOffset < this.#info.payloadLength) { - return callback(); - } - const body = this.consume(this.#info.payloadLength); - if (isControlFrame(this.#info.opcode)) { - this.#loop = this.parseControlFrame(body); - this.#state = parserStates.INFO; - } else { - if (!this.#info.compressed) { - this.writeFragments(body); - if (!this.#info.fragmented && this.#info.fin) { - websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments()); - } + } else if (payloadLength === 126) this.#state = parserStates.PAYLOADLENGTH_16; + else if (payloadLength === 127) this.#state = parserStates.PAYLOADLENGTH_64; + if (isTextBinaryFrame(opcode)) { + this.#info.binaryType = opcode; + this.#info.compressed = rsv1 !== 0; + } + this.#info.opcode = opcode; + this.#info.masked = masked; + this.#info.fin = fin; + this.#info.fragmented = fragmented; + } else if (this.#state === parserStates.PAYLOADLENGTH_16) { + if (this.#byteOffset < 2) return callback(); + const buffer = this.consume(2); + this.#info.payloadLength = buffer.readUInt16BE(0); + this.#state = parserStates.READ_DATA; + } else if (this.#state === parserStates.PAYLOADLENGTH_64) { + if (this.#byteOffset < 8) return callback(); + const buffer = this.consume(8); + const upper = buffer.readUInt32BE(0); + if (upper > 2 ** 31 - 1) { + failWebsocketConnection(this.#handler, 1009, "Received payload length > 2^31 bytes."); + return; + } + const lower = buffer.readUInt32BE(4); + this.#info.payloadLength = (upper << 8) + lower; + this.#state = parserStates.READ_DATA; + } else if (this.#state === parserStates.READ_DATA) { + if (this.#byteOffset < this.#info.payloadLength) return callback(); + const body = this.consume(this.#info.payloadLength); + if (isControlFrame(this.#info.opcode)) { + this.#loop = this.parseControlFrame(body); + this.#state = parserStates.INFO; + } else if (!this.#info.compressed) { + this.writeFragments(body); + if (!this.#info.fragmented && this.#info.fin) websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments()); + this.#state = parserStates.INFO; + } else { + this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error, data) => { + if (error) { + failWebsocketConnection(this.#handler, 1007, error.message); + return; + } + this.writeFragments(data); + if (!this.#info.fin) { this.#state = parserStates.INFO; - } else { - this.#extensions.get("permessage-deflate").decompress(body, this.#info.fin, (error, data) => { - if (error) { - failWebsocketConnection(this.#handler, 1007, error.message); - return; - } - this.writeFragments(data); - if (!this.#info.fin) { - this.#state = parserStates.INFO; - this.#loop = true; - this.run(callback); - return; - } - websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments()); - this.#loop = true; - this.#state = parserStates.INFO; - this.run(callback); - }); - this.#loop = false; - break; + this.#loop = true; + this.run(callback); + return; } - } + websocketMessageReceived(this.#handler, this.#info.binaryType, this.consumeFragments()); + this.#loop = true; + this.#state = parserStates.INFO; + this.run(callback); + }); + this.#loop = false; + break; } } } @@ -180522,19 +162954,15 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @returns {Buffer} */ consume(n) { - if (n > this.#byteOffset) { - throw new Error("Called consume() before buffers satiated."); - } else if (n === 0) { - return emptyBuffer; - } + if (n > this.#byteOffset) throw new Error("Called consume() before buffers satiated."); + else if (n === 0) return emptyBuffer; this.#byteOffset -= n; const first = this.#buffers[0]; if (first.length > n) { this.#buffers[0] = first.subarray(n, first.length); return first.subarray(0, n); - } else if (first.length === n) { - return this.#buffers.shift(); - } else { + } else if (first.length === n) return this.#buffers.shift(); + else { let offset = 0; const buffer = Buffer.allocUnsafeSlow(n); while (offset !== n) { @@ -180580,21 +163008,15 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => { assert$2(data.length !== 1); /** @type {number|undefined} */ let code; - if (data.length >= 2) { - code = data.readUInt16BE(0); - } - if (code !== undefined && !isValidStatusCode(code)) { - return { - code: 1002, - reason: "Invalid status code", - error: true - }; - } + if (data.length >= 2) code = data.readUInt16BE(0); + if (code !== void 0 && !isValidStatusCode(code)) return { + code: 1002, + reason: "Invalid status code", + error: true + }; /** @type {Buffer} */ let reason = data.subarray(2); - if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) { - reason = reason.subarray(3); - } + if (reason[0] === 239 && reason[1] === 187 && reason[2] === 191) reason = reason.subarray(3); try { reason = utf8Decode(reason); } catch { @@ -180646,9 +163068,7 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => { this.#handler.socket.write(frame.createFrame(opcodes.PONG)); this.#handler.onPing(body); } - } else if (opcode === opcodes.PONG) { - this.#handler.onPong(body); - } + } else if (opcode === opcodes.PONG) this.#handler.onPong(body); return true; } get closingInfo() { @@ -180657,7 +163077,6 @@ var require_receiver = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; module.exports = { ByteParser }; })); - //#endregion //#region ../node_modules/undici/lib/web/websocket/sender.js var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -180686,17 +163105,14 @@ var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => { } add(item, cb, hint) { if (hint !== sendHints.blob) { - if (!this.#running) { - if (hint === sendHints.text) { - const { 0: head, 1: body } = WebsocketFrameSend.createFastTextFrame(item); - this.#socket.cork(); - this.#socket.write(head); - this.#socket.write(body, cb); - this.#socket.uncork(); - } else { - this.#socket.write(createFrame(item, hint), cb); - } - } else { + if (!this.#running) if (hint === sendHints.text) { + const { 0: head, 1: body } = WebsocketFrameSend.createFastTextFrame(item); + this.#socket.cork(); + this.#socket.write(head); + this.#socket.write(body, cb); + this.#socket.uncork(); + } else this.#socket.write(createFrame(item, hint), cb); + else { /** @type {SendQueueNode} */ const node = { promise: null, @@ -180717,18 +163133,14 @@ var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => { frame: null }; this.#queue.push(node); - if (!this.#running) { - this.#run(); - } + if (!this.#running) this.#run(); } async #run() { this.#running = true; const queue = this.#queue; while (!queue.isEmpty()) { const node = queue.shift(); - if (node.promise !== null) { - await node.promise; - } + if (node.promise !== null) await node.promise; this.#socket.write(node.frame, node.callback); node.callback = node.frame = null; } @@ -180748,7 +163160,6 @@ var require_sender = /* @__PURE__ */ __commonJSMin(((exports, module) => { } module.exports = { SendQueue }; })); - //#endregion //#region ../node_modules/undici/lib/web/websocket/websocket.js var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -180803,37 +163214,29 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message), onParserDrain: () => this.#onParserDrain(), onSocketData: (chunk) => { - if (!this.#parser.write(chunk)) { - this.#handler.socket.pause(); - } + if (!this.#parser.write(chunk)) this.#handler.socket.pause(); }, onSocketError: (err) => { this.#handler.readyState = states.CLOSING; - if (channels.socketError.hasSubscribers) { - channels.socketError.publish(err); - } + if (channels.socketError.hasSubscribers) channels.socketError.publish(err); this.#handler.socket.destroy(); }, onSocketClose: () => this.#onSocketClose(), onPing: (body) => { - if (channels.ping.hasSubscribers) { - channels.ping.publish({ - payload: body, - websocket: this - }); - } + if (channels.ping.hasSubscribers) channels.ping.publish({ + payload: body, + websocket: this + }); }, onPong: (body) => { - if (channels.pong.hasSubscribers) { - channels.pong.publish({ - payload: body, - websocket: this - }); - } + if (channels.pong.hasSubscribers) channels.pong.publish({ + payload: body, + websocket: this + }); }, readyState: states.CONNECTING, socket: null, - closeState: new Set(), + closeState: /* @__PURE__ */ new Set(), controller: null, wasEverConnected: false }; @@ -180855,15 +163258,9 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { protocols = options.protocols; const baseURL = environmentSettingsObject.settingsObject.baseUrl; const urlRecord = getURLRecord(url, baseURL); - if (typeof protocols === "string") { - protocols = [protocols]; - } - if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) { - throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); - } - if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) { - throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); - } + if (typeof protocols === "string") protocols = [protocols]; + if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); this.#url = new URL(urlRecord.href); const client = environmentSettingsObject.settingsObject; this.#handler.controller = establishWebSocketConnection(urlRecord, protocols, client, this.#handler, options); @@ -180875,15 +163272,11 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {number|undefined} code * @param {string|undefined} reason */ - close(code = undefined, reason = undefined) { + close(code = void 0, reason = void 0) { webidl.brandCheck(this, WebSocket); const prefix = "WebSocket.close"; - if (code !== undefined) { - code = webidl.converters["unsigned short"](code, prefix, "code", webidl.attributes.Clamp); - } - if (reason !== undefined) { - reason = webidl.converters.USVString(reason); - } + if (code !== void 0) code = webidl.converters["unsigned short"](code, prefix, "code", webidl.attributes.Clamp); + if (reason !== void 0) reason = webidl.converters.USVString(reason); code ??= null; reason ??= ""; closeWebSocketConnection(this.#handler, code, reason, true); @@ -180897,12 +163290,8 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { const prefix = "WebSocket.send"; webidl.argumentLengthCheck(arguments, 1, prefix); data = webidl.converters.WebSocketSendData(data, prefix, "data"); - if (isConnecting(this.#handler.readyState)) { - throw new DOMException("Sent before connected.", "InvalidStateError"); - } - if (!isEstablished(this.#handler.readyState) || isClosing(this.#handler.readyState)) { - return; - } + if (isConnecting(this.#handler.readyState)) throw new DOMException("Sent before connected.", "InvalidStateError"); + if (!isEstablished(this.#handler.readyState) || isClosing(this.#handler.readyState)) return; if (typeof data === "string") { const buffer = Buffer.from(data); this.#bufferedAmount += buffer.byteLength; @@ -180952,16 +163341,12 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { } set onopen(fn) { webidl.brandCheck(this, WebSocket); - if (this.#events.open) { - this.removeEventListener("open", this.#events.open); - } + if (this.#events.open) this.removeEventListener("open", this.#events.open); const listener = webidl.converters.EventHandlerNonNull(fn); if (listener !== null) { this.addEventListener("open", listener); this.#events.open = fn; - } else { - this.#events.open = null; - } + } else this.#events.open = null; } get onerror() { webidl.brandCheck(this, WebSocket); @@ -180969,16 +163354,12 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { } set onerror(fn) { webidl.brandCheck(this, WebSocket); - if (this.#events.error) { - this.removeEventListener("error", this.#events.error); - } + if (this.#events.error) this.removeEventListener("error", this.#events.error); const listener = webidl.converters.EventHandlerNonNull(fn); if (listener !== null) { this.addEventListener("error", listener); this.#events.error = fn; - } else { - this.#events.error = null; - } + } else this.#events.error = null; } get onclose() { webidl.brandCheck(this, WebSocket); @@ -180986,16 +163367,12 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { } set onclose(fn) { webidl.brandCheck(this, WebSocket); - if (this.#events.close) { - this.removeEventListener("close", this.#events.close); - } + if (this.#events.close) this.removeEventListener("close", this.#events.close); const listener = webidl.converters.EventHandlerNonNull(fn); if (listener !== null) { this.addEventListener("close", listener); this.#events.close = fn; - } else { - this.#events.close = null; - } + } else this.#events.close = null; } get onmessage() { webidl.brandCheck(this, WebSocket); @@ -181003,16 +163380,12 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { } set onmessage(fn) { webidl.brandCheck(this, WebSocket); - if (this.#events.message) { - this.removeEventListener("message", this.#events.message); - } + if (this.#events.message) this.removeEventListener("message", this.#events.message); const listener = webidl.converters.EventHandlerNonNull(fn); if (listener !== null) { this.addEventListener("message", listener); this.#events.message = fn; - } else { - this.#events.message = null; - } + } else this.#events.message = null; } get binaryType() { webidl.brandCheck(this, WebSocket); @@ -181020,11 +163393,8 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { } set binaryType(type) { webidl.brandCheck(this, WebSocket); - if (type !== "blob" && type !== "arraybuffer") { - this.#binaryType = "blob"; - } else { - this.#binaryType = type; - } + if (type !== "blob" && type !== "arraybuffer") this.#binaryType = "blob"; + else this.#binaryType = type; } /** * @see https://websockets.spec.whatwg.org/#feedback-from-the-protocol @@ -181038,13 +163408,9 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { this.#sendQueue = new SendQueue(response.socket); this.#handler.readyState = states.OPEN; const extensions = response.headersList.get("sec-websocket-extensions"); - if (extensions !== null) { - this.#extensions = extensions; - } + if (extensions !== null) this.#extensions = extensions; const protocol = response.headersList.get("sec-websocket-protocol"); - if (protocol !== null) { - this.#protocol = protocol; - } + if (protocol !== null) this.#protocol = protocol; fireEvent("open", this); if (channels.open.hasSubscribers) { const headers = response.headersList.entries; @@ -181062,24 +163428,16 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { } } #onMessage(type, data) { - if (this.#handler.readyState !== states.OPEN) { - return; - } + if (this.#handler.readyState !== states.OPEN) return; let dataForEvent; - if (type === opcodes.TEXT) { - try { - dataForEvent = utf8Decode(data); - } catch { - failWebsocketConnection(this.#handler, 1007, "Received invalid UTF-8 in text frame."); - return; - } - } else if (type === opcodes.BINARY) { - if (this.#binaryType === "blob") { - dataForEvent = new Blob([data]); - } else { - dataForEvent = toArrayBuffer(data); - } + if (type === opcodes.TEXT) try { + dataForEvent = utf8Decode(data); + } catch { + failWebsocketConnection(this.#handler, 1007, "Received invalid UTF-8 in text frame."); + return; } + else if (type === opcodes.BINARY) if (this.#binaryType === "blob") dataForEvent = new Blob([data]); + else dataForEvent = toArrayBuffer(data); fireEvent("message", this, createFastMessageEvent, { origin: this.#url.origin, data: dataForEvent @@ -181111,13 +163469,11 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { code, reason }); - if (channels.close.hasSubscribers) { - channels.close.publish({ - websocket: this, - code, - reason - }); - } + if (channels.close.hasSubscribers) channels.close.publish({ + websocket: this, + code, + reason + }); } /** * @param {WebSocket} ws @@ -181125,12 +163481,8 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ static ping(ws, buffer) { if (Buffer.isBuffer(buffer)) { - if (buffer.length > 125) { - throw new TypeError("A PING frame cannot have a body larger than 125 bytes."); - } - } else if (buffer !== undefined) { - throw new TypeError("Expected buffer payload"); - } + if (buffer.length > 125) throw new TypeError("A PING frame cannot have a body larger than 125 bytes."); + } else if (buffer !== void 0) throw new TypeError("Expected buffer payload"); const readyState = ws.#handler.readyState; if (isEstablished(readyState) && !isClosing(readyState) && !isClosed(readyState)) { const frame = new WebsocketFrameSend(buffer); @@ -181176,9 +163528,7 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { }); webidl.converters["sequence"] = webidl.sequenceConverter(webidl.converters.DOMString); webidl.converters["DOMString or sequence"] = function(V, prefix, argument) { - if (webidl.util.Type(V) === webidl.util.Types.OBJECT && Symbol.iterator in V) { - return webidl.converters["sequence"](V); - } + if (webidl.util.Type(V) === webidl.util.Types.OBJECT && Symbol.iterator in V) return webidl.converters["sequence"](V); return webidl.converters.DOMString(V, prefix, argument); }; webidl.converters.WebSocketInit = webidl.dictionaryConverter([ @@ -181198,19 +163548,13 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { } ]); webidl.converters["DOMString or sequence or WebSocketInit"] = function(V) { - if (webidl.util.Type(V) === webidl.util.Types.OBJECT && !(Symbol.iterator in V)) { - return webidl.converters.WebSocketInit(V); - } + if (webidl.util.Type(V) === webidl.util.Types.OBJECT && !(Symbol.iterator in V)) return webidl.converters.WebSocketInit(V); return { protocols: webidl.converters["DOMString or sequence"](V) }; }; webidl.converters.WebSocketSendData = function(V) { if (webidl.util.Type(V) === webidl.util.Types.OBJECT) { - if (webidl.is.Blob(V)) { - return V; - } - if (webidl.is.BufferSource(V)) { - return V; - } + if (webidl.is.Blob(V)) return V; + if (webidl.is.BufferSource(V)) return V; } return webidl.converters.USVString(V); }; @@ -181219,7 +163563,6 @@ var require_websocket = /* @__PURE__ */ __commonJSMin(((exports, module) => { ping }; })); - //#endregion //#region ../node_modules/undici/lib/web/websocket/stream/websocketerror.js var require_websocketerror = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -181233,9 +163576,7 @@ var require_websocketerror = /* @__PURE__ */ __commonJSMin(((exports, module) => return ""; } } - if (new Test().reason !== undefined) { - return DOMException; - } + if (new Test().reason !== void 0) return DOMException; return new Proxy(DOMException, { construct(target, args, newTarget) { const instance = Reflect.construct(target, args, target); Object.setPrototypeOf(instance, newTarget.prototype); @@ -181245,20 +163586,15 @@ var require_websocketerror = /* @__PURE__ */ __commonJSMin(((exports, module) => var WebSocketError = class WebSocketError extends createInheritableDOMException() { #closeCode; #reason; - constructor(message = "", init = undefined) { + constructor(message = "", init = void 0) { message = webidl.converters.DOMString(message, "WebSocketError", "message"); super(message, "WebSocketError"); - if (init === kConstruct) { - return; - } else if (init !== null) { - init = webidl.converters.WebSocketCloseInfo(init); - } + if (init === kConstruct) return; + else if (init !== null) init = webidl.converters.WebSocketCloseInfo(init); let code = init.closeCode ?? null; const reason = init.reason ?? ""; validateCloseCodeAndReason(code, reason); - if (reason.length !== 0 && code === null) { - code = 1e3; - } + if (reason.length !== 0 && code === null) code = 1e3; this.#closeCode = code; this.#reason = reason; } @@ -181298,7 +163634,6 @@ var require_websocketerror = /* @__PURE__ */ __commonJSMin(((exports, module) => createUnvalidatedWebSocketError }; })); - //#endregion //#region ../node_modules/undici/lib/web/websocket/stream/websocketstream.js var require_websocketstream = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -181336,15 +163671,11 @@ var require_websocketstream = /* @__PURE__ */ __commonJSMin(((exports, module) = onParserError: (err) => failWebsocketConnection(this.#handler, null, err.message), onParserDrain: () => this.#handler.socket.resume(), onSocketData: (chunk) => { - if (!this.#parser.write(chunk)) { - this.#handler.socket.pause(); - } + if (!this.#parser.write(chunk)) this.#handler.socket.pause(); }, onSocketError: (err) => { this.#handler.readyState = states.CLOSING; - if (channels.socketError.hasSubscribers) { - channels.socketError.publish(err); - } + if (channels.socketError.hasSubscribers) channels.socketError.publish(err); this.#handler.socket.destroy(); }, onSocketClose: () => this.#onSocketClose(), @@ -181352,31 +163683,25 @@ var require_websocketstream = /* @__PURE__ */ __commonJSMin(((exports, module) = onPong: () => {}, readyState: states.CONNECTING, socket: null, - closeState: new Set(), + closeState: /* @__PURE__ */ new Set(), controller: null, wasEverConnected: false }; /** @type {import('../receiver').ByteParser} */ #parser; - constructor(url, options = undefined) { + constructor(url, options = void 0) { if (!emittedExperimentalWarning) { process.emitWarning("WebSocketStream is experimental! Expect it to change at any time.", { code: "UNDICI-WSS" }); emittedExperimentalWarning = true; } webidl.argumentLengthCheck(arguments, 1, "WebSocket"); url = webidl.converters.USVString(url); - if (options !== null) { - options = webidl.converters.WebSocketStreamOptions(options); - } + if (options !== null) options = webidl.converters.WebSocketStreamOptions(options); const baseURL = environmentSettingsObject.settingsObject.baseUrl; const urlRecord = getURLRecord(url, baseURL); const protocols = options.protocols; - if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) { - throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); - } - if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) { - throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); - } + if (protocols.length !== new Set(protocols.map((p) => p.toLowerCase())).size) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); + if (protocols.length > 0 && !protocols.every((p) => isValidSubprotocol(p))) throw new DOMException("Invalid Sec-WebSocket-Protocol value", "SyntaxError"); this.#url = urlRecord.toString(); this.#openedPromise = createDeferredPromise(); this.#closedPromise = createDeferredPromise(); @@ -181409,10 +163734,8 @@ var require_websocketstream = /* @__PURE__ */ __commonJSMin(((exports, module) = get closed() { return this.#closedPromise.promise; } - close(closeInfo = undefined) { - if (closeInfo !== null) { - closeInfo = webidl.converters.WebSocketCloseInfo(closeInfo); - } + close(closeInfo = void 0) { + if (closeInfo !== null) closeInfo = webidl.converters.WebSocketCloseInfo(closeInfo); const code = closeInfo.closeCode ?? null; const reason = closeInfo.reason; closeWebSocketConnection(this.#handler, code, reason, true); @@ -181439,7 +163762,7 @@ var require_websocketstream = /* @__PURE__ */ __commonJSMin(((exports, module) = if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { const frame = new WebsocketFrameSend(data); this.#handler.socket.write(frame.createFrame(opcode), () => { - promise.resolve(undefined); + promise.resolve(void 0); }); } return promise.promise; @@ -181460,9 +163783,7 @@ var require_websocketstream = /* @__PURE__ */ __commonJSMin(((exports, module) = }, pull(controller) { let chunk; - while (controller.desiredSize > 0 && (chunk = response.socket.read()) !== null) { - controller.enqueue(chunk); - } + while (controller.desiredSize > 0 && (chunk = response.socket.read()) !== null) controller.enqueue(chunk); }, cancel: (reason) => this.#cancel(reason) }); @@ -181482,43 +163803,30 @@ var require_websocketstream = /* @__PURE__ */ __commonJSMin(((exports, module) = } /** @type {import('../websocket').Handler['onMessage']} */ #onMessage(type, data) { - if (this.#handler.readyState !== states.OPEN) { - return; - } + if (this.#handler.readyState !== states.OPEN) return; let chunk; - if (type === opcodes.TEXT) { - try { - chunk = utf8Decode(data); - } catch { - failWebsocketConnection(this.#handler, "Received invalid UTF-8 in text frame."); - return; - } - } else if (type === opcodes.BINARY) { - chunk = new Uint8Array(data.buffer, data.byteOffset, data.byteLength); + if (type === opcodes.TEXT) try { + chunk = utf8Decode(data); + } catch { + failWebsocketConnection(this.#handler, "Received invalid UTF-8 in text frame."); + return; } + else if (type === opcodes.BINARY) chunk = new Uint8Array(data.buffer, data.byteOffset, data.byteLength); this.#readableStreamController.enqueue(chunk); } /** @type {import('../websocket').Handler['onSocketClose']} */ #onSocketClose() { const wasClean = this.#handler.closeState.has(sentCloseFrameState.SENT) && this.#handler.closeState.has(sentCloseFrameState.RECEIVED); this.#handler.readyState = states.CLOSED; - if (this.#handshakeAborted) { - return; - } - if (!this.#handler.wasEverConnected) { - this.#openedPromise.reject(new WebSocketError("Socket never opened")); - } + if (this.#handshakeAborted) return; + if (!this.#handler.wasEverConnected) this.#openedPromise.reject(new WebSocketError("Socket never opened")); const result = this.#parser?.closingInfo; let code = result?.code ?? 1005; - if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) { - code = 1006; - } + if (!this.#handler.closeState.has(sentCloseFrameState.SENT) && !this.#handler.closeState.has(sentCloseFrameState.RECEIVED)) code = 1006; const reason = result?.reason == null ? "" : utf8DecodeBytes(Buffer.from(result.reason)); if (wasClean) { this.#readableStreamController.close(); - if (!this.#writableStream.locked) { - this.#writableStream.abort(new DOMException("A closed WebSocketStream cannot be written to", "InvalidStateError")); - } + if (!this.#writableStream.locked) this.#writableStream.abort(new DOMException("A closed WebSocketStream cannot be written to", "InvalidStateError")); this.#closedPromise.resolve({ closeCode: code, reason @@ -181573,14 +163881,11 @@ var require_websocketstream = /* @__PURE__ */ __commonJSMin(((exports, module) = defaultValue: () => "" }]); webidl.converters.WebSocketStreamWrite = function(V) { - if (typeof V === "string") { - return webidl.converters.USVString(V); - } + if (typeof V === "string") return webidl.converters.USVString(V); return webidl.converters.BufferSource(V); }; module.exports = { WebSocketStream }; })); - //#endregion //#region ../node_modules/undici/lib/web/eventsource/util.js var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -181599,9 +163904,7 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => { */ function isASCIINumber(value) { if (value.length === 0) return false; - for (let i = 0; i < value.length; i++) { - if (value.charCodeAt(i) < 48 || value.charCodeAt(i) > 57) return false; - } + for (let i = 0; i < value.length; i++) if (value.charCodeAt(i) < 48 || value.charCodeAt(i) > 57) return false; return true; } module.exports = { @@ -181609,7 +163912,6 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports, module) => { isASCIINumber }; })); - //#endregion //#region ../node_modules/undici/lib/web/eventsource/eventsource-stream.js var require_eventsource_stream = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -181678,10 +163980,10 @@ var require_eventsource_stream = /* @__PURE__ */ __commonJSMin(((exports, module buffer = null; pos = 0; event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined + data: void 0, + event: void 0, + id: void 0, + retry: void 0 }; /** * @param {object} options @@ -181693,9 +163995,7 @@ var require_eventsource_stream = /* @__PURE__ */ __commonJSMin(((exports, module options.readableObjectMode = true; super(options); this.state = options.eventSourceSettings || {}; - if (options.push) { - this.push = options.push; - } + if (options.push) this.push = options.push; } /** * @param {Buffer} chunk @@ -181708,44 +164008,37 @@ var require_eventsource_stream = /* @__PURE__ */ __commonJSMin(((exports, module callback(); return; } - if (this.buffer) { - this.buffer = Buffer.concat([this.buffer, chunk]); - } else { - this.buffer = chunk; - } - if (this.checkBOM) { - switch (this.buffer.length) { - case 1: - if (this.buffer[0] === BOM[0]) { - callback(); - return; - } - this.checkBOM = false; + if (this.buffer) this.buffer = Buffer.concat([this.buffer, chunk]); + else this.buffer = chunk; + if (this.checkBOM) switch (this.buffer.length) { + case 1: + if (this.buffer[0] === BOM[0]) { callback(); return; - case 2: - if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1]) { - callback(); - return; - } - this.checkBOM = false; - break; - case 3: - if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) { - this.buffer = Buffer.alloc(0); - this.checkBOM = false; - callback(); - return; - } - this.checkBOM = false; - break; - default: - if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) { - this.buffer = this.buffer.subarray(3); - } + } + this.checkBOM = false; + callback(); + return; + case 2: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1]) { + callback(); + return; + } + this.checkBOM = false; + break; + case 3: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) { + this.buffer = Buffer.alloc(0); this.checkBOM = false; - break; - } + callback(); + return; + } + this.checkBOM = false; + break; + default: + if (this.buffer[0] === BOM[0] && this.buffer[1] === BOM[1] && this.buffer[2] === BOM[2]) this.buffer = this.buffer.subarray(3); + this.checkBOM = false; + break; } while (this.pos < this.buffer.length) { if (this.eventEndCheck) { @@ -181759,14 +164052,10 @@ var require_eventsource_stream = /* @__PURE__ */ __commonJSMin(((exports, module this.crlfCheck = false; } if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - if (this.buffer[this.pos] === CR) { - this.crlfCheck = true; - } + if (this.buffer[this.pos] === CR) this.crlfCheck = true; this.buffer = this.buffer.subarray(this.pos + 1); this.pos = 0; - if (this.event.data !== undefined || this.event.event || this.event.id !== undefined || this.event.retry) { - this.processEvent(this.event); - } + if (this.event.data !== void 0 || this.event.event || this.event.id !== void 0 || this.event.retry) this.processEvent(this.event); this.clearEvent(); continue; } @@ -181774,9 +164063,7 @@ var require_eventsource_stream = /* @__PURE__ */ __commonJSMin(((exports, module continue; } if (this.buffer[this.pos] === LF || this.buffer[this.pos] === CR) { - if (this.buffer[this.pos] === CR) { - this.crlfCheck = true; - } + if (this.buffer[this.pos] === CR) this.crlfCheck = true; this.parseLine(this.buffer.subarray(0, this.pos), this.event); this.buffer = this.buffer.subarray(this.pos + 1); this.pos = 0; @@ -181792,21 +164079,15 @@ var require_eventsource_stream = /* @__PURE__ */ __commonJSMin(((exports, module * @param {EventSourceStreamEvent} event */ parseLine(line, event) { - if (line.length === 0) { - return; - } + if (line.length === 0) return; const colonPosition = line.indexOf(COLON); - if (colonPosition === 0) { - return; - } + if (colonPosition === 0) return; let field = ""; let value = ""; if (colonPosition !== -1) { field = line.subarray(0, colonPosition).toString("utf8"); let valueStart = colonPosition + 1; - if (line[valueStart] === SPACE) { - ++valueStart; - } + if (line[valueStart] === SPACE) ++valueStart; value = line.subarray(valueStart).toString("utf8"); } else { field = line.toString("utf8"); @@ -181814,26 +164095,17 @@ var require_eventsource_stream = /* @__PURE__ */ __commonJSMin(((exports, module } switch (field) { case "data": - if (event[field] === undefined) { - event[field] = value; - } else { - event[field] += `\n${value}`; - } + if (event[field] === void 0) event[field] = value; + else event[field] += `\n${value}`; break; case "retry": - if (isASCIINumber(value)) { - event[field] = value; - } + if (isASCIINumber(value)) event[field] = value; break; case "id": - if (isValidLastEventId(value)) { - event[field] = value; - } + if (isValidLastEventId(value)) event[field] = value; break; case "event": - if (value.length > 0) { - event[field] = value; - } + if (value.length > 0) event[field] = value; break; } } @@ -181841,35 +164113,28 @@ var require_eventsource_stream = /* @__PURE__ */ __commonJSMin(((exports, module * @param {EventSourceStreamEvent} event */ processEvent(event) { - if (event.retry && isASCIINumber(event.retry)) { - this.state.reconnectionTime = parseInt(event.retry, 10); - } - if (event.id !== undefined && isValidLastEventId(event.id)) { - this.state.lastEventId = event.id; - } - if (event.data !== undefined) { - this.push({ - type: event.event || "message", - options: { - data: event.data, - lastEventId: this.state.lastEventId, - origin: this.state.origin - } - }); - } + if (event.retry && isASCIINumber(event.retry)) this.state.reconnectionTime = parseInt(event.retry, 10); + if (event.id !== void 0 && isValidLastEventId(event.id)) this.state.lastEventId = event.id; + if (event.data !== void 0) this.push({ + type: event.event || "message", + options: { + data: event.data, + lastEventId: this.state.lastEventId, + origin: this.state.origin + } + }); } clearEvent() { this.event = { - data: undefined, - event: undefined, - id: undefined, - retry: undefined + data: void 0, + event: void 0, + id: void 0, + retry: void 0 }; } }; module.exports = { EventSourceStream }; })); - //#endregion //#region ../node_modules/undici/lib/web/eventsource/eventsource.js var require_eventsource = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -182042,21 +164307,17 @@ var require_eventsource = /* @__PURE__ */ __commonJSMin(((exports, module) => { dispatcher: this.#dispatcher }; const processEventSourceEndOfBody = (response) => { - if (!isNetworkError(response)) { - return this.#reconnect(); - } + if (!isNetworkError(response)) return this.#reconnect(); }; fetchParams.processResponseEndOfBody = processEventSourceEndOfBody; fetchParams.processResponse = (response) => { - if (isNetworkError(response)) { - if (response.aborted) { - this.close(); - this.dispatchEvent(new Event("error")); - return; - } else { - this.#reconnect(); - return; - } + if (isNetworkError(response)) if (response.aborted) { + this.close(); + this.dispatchEvent(new Event("error")); + return; + } else { + this.#reconnect(); + return; } const contentType = response.headersList.get("content-type", true); const mimeType = contentType !== null ? parseMIMEType(contentType) : "failure"; @@ -182094,9 +164355,7 @@ var require_eventsource = /* @__PURE__ */ __commonJSMin(((exports, module) => { this.dispatchEvent(new Event("error")); setTimeout(() => { if (this.#readyState !== CONNECTING) return; - if (this.#state.lastEventId.length) { - this.#request.headersList.set("last-event-id", this.#state.lastEventId, true); - } + if (this.#state.lastEventId.length) this.#request.headersList.set("last-event-id", this.#state.lastEventId, true); this.#connect(); }, this.#state.reconnectionTime)?.unref(); } @@ -182115,46 +164374,34 @@ var require_eventsource = /* @__PURE__ */ __commonJSMin(((exports, module) => { return this.#events.open; } set onopen(fn) { - if (this.#events.open) { - this.removeEventListener("open", this.#events.open); - } + if (this.#events.open) this.removeEventListener("open", this.#events.open); const listener = webidl.converters.EventHandlerNonNull(fn); if (listener !== null) { this.addEventListener("open", listener); this.#events.open = fn; - } else { - this.#events.open = null; - } + } else this.#events.open = null; } get onmessage() { return this.#events.message; } set onmessage(fn) { - if (this.#events.message) { - this.removeEventListener("message", this.#events.message); - } + if (this.#events.message) this.removeEventListener("message", this.#events.message); const listener = webidl.converters.EventHandlerNonNull(fn); if (listener !== null) { this.addEventListener("message", listener); this.#events.message = fn; - } else { - this.#events.message = null; - } + } else this.#events.message = null; } get onerror() { return this.#events.error; } set onerror(fn) { - if (this.#events.error) { - this.removeEventListener("error", this.#events.error); - } + if (this.#events.error) this.removeEventListener("error", this.#events.error); const listener = webidl.converters.EventHandlerNonNull(fn); if (listener !== null) { this.addEventListener("error", listener); this.#events.error = fn; - } else { - this.#events.error = null; - } + } else this.#events.error = null; } }; const constantsPropertyDescriptors = { @@ -182219,7 +164466,6 @@ var require_eventsource = /* @__PURE__ */ __commonJSMin(((exports, module) => { defaultReconnectionTime }; })); - //#endregion //#region ../node_modules/undici/index.js var require_undici = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -182287,31 +164533,19 @@ var require_undici = /* @__PURE__ */ __commonJSMin(((exports, module) => { handler = opts; opts = null; } - if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) { - throw new InvalidArgumentError("invalid url"); - } - if (opts != null && typeof opts !== "object") { - throw new InvalidArgumentError("invalid opts"); - } + if (!url || typeof url !== "string" && typeof url !== "object" && !(url instanceof URL)) throw new InvalidArgumentError("invalid url"); + if (opts != null && typeof opts !== "object") throw new InvalidArgumentError("invalid opts"); if (opts && opts.path != null) { - if (typeof opts.path !== "string") { - throw new InvalidArgumentError("invalid opts.path"); - } + if (typeof opts.path !== "string") throw new InvalidArgumentError("invalid opts.path"); let path = opts.path; - if (!opts.path.startsWith("/")) { - path = `/${path}`; - } + if (!opts.path.startsWith("/")) path = `/${path}`; url = new URL(util.parseOrigin(url).origin + path); } else { - if (!opts) { - opts = typeof url === "object" ? url : {}; - } + if (!opts) opts = typeof url === "object" ? url : {}; url = util.parseURL(url); } const { agent, dispatcher = getGlobalDispatcher() } = opts; - if (agent) { - throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); - } + if (agent) throw new InvalidArgumentError("unsupported opts.agent. Did you mean opts.client?"); return fn.call(dispatcher, { ...opts, origin: url.origin, @@ -182323,31 +164557,22 @@ var require_undici = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports.setGlobalDispatcher = setGlobalDispatcher; module.exports.getGlobalDispatcher = getGlobalDispatcher; const fetchImpl = require_fetch().fetch; - const currentFilename = typeof __filename !== "undefined" ? __filename : undefined; + const currentFilename = typeof __filename !== "undefined" ? __filename : void 0; function appendFetchStackTrace(err, filename) { - if (!err || typeof err !== "object") { - return; - } + if (!err || typeof err !== "object") return; const stack = typeof err.stack === "string" ? err.stack : ""; const normalizedFilename = filename.replace(/\\/g, "/"); - if (stack && (stack.includes(filename) || stack.includes(normalizedFilename))) { - return; - } + if (stack && (stack.includes(filename) || stack.includes(normalizedFilename))) return; const capture = {}; Error.captureStackTrace(capture, appendFetchStackTrace); - if (!capture.stack) { - return; - } + if (!capture.stack) return; const captureLines = capture.stack.split("\n").slice(1).join("\n"); err.stack = stack ? `${stack}\n${captureLines}` : capture.stack; } - module.exports.fetch = function fetch(init, options = undefined) { + module.exports.fetch = function fetch(init, options = void 0) { return fetchImpl(init, options).catch((err) => { - if (currentFilename) { - appendFetchStackTrace(err, currentFilename); - } else if (err && typeof err === "object") { - Error.captureStackTrace(err, module.exports.fetch); - } + if (currentFilename) appendFetchStackTrace(err, currentFilename); + else if (err && typeof err === "object") Error.captureStackTrace(err, module.exports.fetch); throw err; }); }; @@ -182407,7 +164632,6 @@ var require_undici = /* @__PURE__ */ __commonJSMin(((exports, module) => { } module.exports.install = install; })); - //#endregion //#region ../node_modules/whatwg-mimetype/lib/utils.js var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -182437,9 +164661,7 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => { value += input[position]; ++position; } - if (position >= input.length) { - break; - } + if (position >= input.length) break; const quoteOrBackslash = input[position]; ++position; if (quoteOrBackslash === "\\") { @@ -182449,14 +164671,11 @@ var require_utils = /* @__PURE__ */ __commonJSMin(((exports) => { } value += input[position]; ++position; - } else { - break; - } + } else break; } return [value, position]; }; })); - //#endregion //#region ../node_modules/whatwg-mimetype/lib/mime-type-parameters.js var require_mime_type_parameters = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -182479,12 +164698,8 @@ var require_mime_type_parameters = /* @__PURE__ */ __commonJSMin(((exports, modu set(name, value) { name = asciiLowercase(String(name)); value = String(value); - if (!solelyContainsHTTPTokenCodePoints(name)) { - throw new Error(`Invalid MIME type parameter name "${name}": only HTTP token code points are valid.`); - } - if (!soleyContainsHTTPQuotedStringTokenCodePoints(value)) { - throw new Error(`Invalid MIME type parameter value "${value}": only HTTP quoted-string token code points are ` + `valid.`); - } + if (!solelyContainsHTTPTokenCodePoints(name)) throw new Error(`Invalid MIME type parameter name "${name}": only HTTP token code points are valid.`); + if (!soleyContainsHTTPQuotedStringTokenCodePoints(value)) throw new Error(`Invalid MIME type parameter value "${value}": only HTTP quoted-string token code points are valid.`); return this._map.set(name, value); } clear() { @@ -182511,7 +164726,6 @@ var require_mime_type_parameters = /* @__PURE__ */ __commonJSMin(((exports, modu } }; })); - //#endregion //#region ../node_modules/whatwg-mimetype/lib/parser.js var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -182524,12 +164738,8 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => { type += input[position]; ++position; } - if (type.length === 0 || !solelyContainsHTTPTokenCodePoints(type)) { - return null; - } - if (position >= input.length) { - return null; - } + if (type.length === 0 || !solelyContainsHTTPTokenCodePoints(type)) return null; + if (position >= input.length) return null; ++position; let subtype = ""; while (position < input.length && input[position] !== ";") { @@ -182537,19 +164747,15 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => { ++position; } subtype = removeTrailingHTTPWhitespace(subtype); - if (subtype.length === 0 || !solelyContainsHTTPTokenCodePoints(subtype)) { - return null; - } + if (subtype.length === 0 || !solelyContainsHTTPTokenCodePoints(subtype)) return null; const mimeType = { type: asciiLowercase(type), subtype: asciiLowercase(subtype), - parameters: new Map() + parameters: /* @__PURE__ */ new Map() }; while (position < input.length) { ++position; - while (isHTTPWhitespaceChar(input[position])) { - ++position; - } + while (isHTTPWhitespaceChar(input[position])) ++position; let parameterName = ""; while (position < input.length && input[position] !== ";" && input[position] !== "=") { parameterName += input[position]; @@ -182557,17 +164763,13 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => { } parameterName = asciiLowercase(parameterName); if (position < input.length) { - if (input[position] === ";") { - continue; - } + if (input[position] === ";") continue; ++position; } let parameterValue = null; if (input[position] === "\"") { [parameterValue, position] = collectAnHTTPQuotedString(input, position); - while (position < input.length && input[position] !== ";") { - ++position; - } + while (position < input.length && input[position] !== ";") ++position; } else { parameterValue = ""; while (position < input.length && input[position] !== ";") { @@ -182575,27 +164777,20 @@ var require_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => { ++position; } parameterValue = removeTrailingHTTPWhitespace(parameterValue); - if (parameterValue === "") { - continue; - } - } - if (parameterName.length > 0 && solelyContainsHTTPTokenCodePoints(parameterName) && soleyContainsHTTPQuotedStringTokenCodePoints(parameterValue) && !mimeType.parameters.has(parameterName)) { - mimeType.parameters.set(parameterName, parameterValue); + if (parameterValue === "") continue; } + if (parameterName.length > 0 && solelyContainsHTTPTokenCodePoints(parameterName) && soleyContainsHTTPQuotedStringTokenCodePoints(parameterValue) && !mimeType.parameters.has(parameterName)) mimeType.parameters.set(parameterName, parameterValue); } return mimeType; }; })); - //#endregion //#region ../node_modules/whatwg-mimetype/lib/serializer.js var require_serializer = /* @__PURE__ */ __commonJSMin(((exports, module) => { const { solelyContainsHTTPTokenCodePoints } = require_utils(); module.exports = (mimeType) => { let serialization = `${mimeType.type}/${mimeType.subtype}`; - if (mimeType.parameters.size === 0) { - return serialization; - } + if (mimeType.parameters.size === 0) return serialization; for (let [name, value] of mimeType.parameters) { serialization += ";"; serialization += name; @@ -182609,7 +164804,6 @@ var require_serializer = /* @__PURE__ */ __commonJSMin(((exports, module) => { return serialization; }; })); - //#endregion //#region ../node_modules/whatwg-mimetype/lib/mime-type.js var require_mime_type = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -182621,9 +164815,7 @@ var require_mime_type = /* @__PURE__ */ __commonJSMin(((exports, module) => { constructor(string) { string = String(string); const result = parse(string); - if (result === null) { - throw new Error(`Could not parse MIME type string "${string}"`); - } + if (result === null) throw new Error(`Could not parse MIME type string "${string}"`); this._type = result.type; this._subtype = result.subtype; this._parameters = new MIMETypeParameters(result.parameters); @@ -182643,12 +164835,8 @@ var require_mime_type = /* @__PURE__ */ __commonJSMin(((exports, module) => { } set type(value) { value = asciiLowercase(String(value)); - if (value.length === 0) { - throw new Error("Invalid type: must be a non-empty string"); - } - if (!solelyContainsHTTPTokenCodePoints(value)) { - throw new Error(`Invalid type ${value}: must contain only HTTP token code points`); - } + if (value.length === 0) throw new Error("Invalid type: must be a non-empty string"); + if (!solelyContainsHTTPTokenCodePoints(value)) throw new Error(`Invalid type ${value}: must contain only HTTP token code points`); this._type = value; } get subtype() { @@ -182656,12 +164844,8 @@ var require_mime_type = /* @__PURE__ */ __commonJSMin(((exports, module) => { } set subtype(value) { value = asciiLowercase(String(value)); - if (value.length === 0) { - throw new Error("Invalid subtype: must be a non-empty string"); - } - if (!solelyContainsHTTPTokenCodePoints(value)) { - throw new Error(`Invalid subtype ${value}: must contain only HTTP token code points`); - } + if (value.length === 0) throw new Error("Invalid subtype: must be a non-empty string"); + if (!solelyContainsHTTPTokenCodePoints(value)) throw new Error(`Invalid subtype ${value}: must contain only HTTP token code points`); this._subtype = value; } get parameters() { @@ -182672,43 +164856,29 @@ var require_mime_type = /* @__PURE__ */ __commonJSMin(((exports, module) => { } isJavaScript({ prohibitParameters = false } = {}) { switch (this._type) { - case "text": { - switch (this._subtype) { - case "ecmascript": - case "javascript": - case "javascript1.0": - case "javascript1.1": - case "javascript1.2": - case "javascript1.3": - case "javascript1.4": - case "javascript1.5": - case "jscript": - case "livescript": - case "x-ecmascript": - case "x-javascript": { - return !prohibitParameters || this._parameters.size === 0; - } - default: { - return false; - } - } - } - case "application": { - switch (this._subtype) { - case "ecmascript": - case "javascript": - case "x-ecmascript": - case "x-javascript": { - return !prohibitParameters || this._parameters.size === 0; - } - default: { - return false; - } - } - } - default: { - return false; - } + case "text": switch (this._subtype) { + case "ecmascript": + case "javascript": + case "javascript1.0": + case "javascript1.1": + case "javascript1.2": + case "javascript1.3": + case "javascript1.4": + case "javascript1.5": + case "jscript": + case "livescript": + case "x-ecmascript": + case "x-javascript": return !prohibitParameters || this._parameters.size === 0; + default: return false; + } + case "application": switch (this._subtype) { + case "ecmascript": + case "javascript": + case "x-ecmascript": + case "x-javascript": return !prohibitParameters || this._parameters.size === 0; + default: return false; + } + default: return false; } } isXML() { @@ -182719,9 +164889,17 @@ var require_mime_type = /* @__PURE__ */ __commonJSMin(((exports, module) => { } }; })); - //#endregion //#region ../node_modules/cheerio/dist/esm/index.js +var esm_exports = /* @__PURE__ */ __exportAll({ + contains: () => contains$1, + decodeStream: () => decodeStream, + fromURL: () => fromURL, + load: () => load, + loadBuffer: () => loadBuffer, + merge: () => merge, + stringStream: () => stringStream +}); var import_undici = /* @__PURE__ */ __toESM(require_undici(), 1); var import_mime_type = /* @__PURE__ */ __toESM(require_mime_type(), 1); /** @@ -182744,11 +164922,10 @@ var import_mime_type = /* @__PURE__ */ __toESM(require_mime_type(), 1); */ function loadBuffer(buffer, options = {}) { const opts = flattenOptions(options); - const str = decodeBuffer(buffer, { + return load(decodeBuffer(buffer, { defaultEncoding: (opts === null || opts === void 0 ? void 0 : opts.xmlMode) ? "utf8" : "windows-1252", ...options.encoding - }); - return load(str, opts); + }), opts); } function _stringStream(options, cb) { var _a; @@ -182757,9 +164934,7 @@ function _stringStream(options, cb) { return new Writable$1({ decodeStrings: false, write(chunk, _encoding, callback) { - if (typeof chunk !== "string") { - throw new TypeError("Expected a string"); - } + if (typeof chunk !== "string") throw new TypeError("Expected a string"); parser.write(chunk); callback(); }, @@ -182769,11 +164944,9 @@ function _stringStream(options, cb) { } }); } - options !== null && options !== void 0 ? options : options = {}; - (_a = options.treeAdapter) !== null && _a !== void 0 ? _a : options.treeAdapter = adapter; - if (options.scriptingEnabled !== false) { - options.scriptingEnabled = true; - } + options !== null && options !== void 0 || (options = {}); + (_a = options.treeAdapter) !== null && _a !== void 0 || (options.treeAdapter = adapter); + if (options.scriptingEnabled !== false) options.scriptingEnabled = true; const stream = new ParserStream(options); finished(stream, (err) => cb(err, load(stream.document, options))); return stream; @@ -182827,7 +165000,7 @@ function decodeStream(options, cb) { var _a; const { encoding = {}, ...cheerioOptions } = options; const opts = flattenOptions(cheerioOptions); - (_a = encoding.defaultEncoding) !== null && _a !== void 0 ? _a : encoding.defaultEncoding = (opts === null || opts === void 0 ? void 0 : opts.xmlMode) ? "utf8" : "windows-1252"; + (_a = encoding.defaultEncoding) !== null && _a !== void 0 || (encoding.defaultEncoding = (opts === null || opts === void 0 ? void 0 : opts.xmlMode) ? "utf8" : "windows-1252"); const decodeStream = new DecodeStream(encoding); const loadStream = _stringStream(opts, cb); decodeStream.pipe(loadStream); @@ -182867,30 +165040,24 @@ async function fromURL(url, options = {}) { const promise = new Promise((resolve, reject) => { undiciStream = new import_undici.Client(urlObject.origin).compose(import_undici.interceptors.redirect({ maxRedirections: 5 })).stream(streamOptions, (res) => { var _a, _b; - if (res.statusCode < 200 || res.statusCode >= 300) { - throw new import_undici.errors.ResponseError("Response Error", res.statusCode, { headers: res.headers }); - } + if (res.statusCode < 200 || res.statusCode >= 300) throw new import_undici.errors.ResponseError("Response Error", res.statusCode, { headers: res.headers }); const contentTypeHeader = (_a = res.headers["content-type"]) !== null && _a !== void 0 ? _a : "text/html"; const mimeType = new import_mime_type.default(Array.isArray(contentTypeHeader) ? contentTypeHeader[0] : contentTypeHeader); - if (!mimeType.isHTML() && !mimeType.isXML()) { - throw new RangeError(`The content-type "${mimeType.essence}" is neither HTML nor XML.`); - } + if (!mimeType.isHTML() && !mimeType.isXML()) throw new RangeError(`The content-type "${mimeType.essence}" is neither HTML nor XML.`); encoding.transportLayerEncodingLabel = mimeType.parameters.get("charset"); const history = (_b = res.context) === null || _b === void 0 ? void 0 : _b.history; const baseURI = history ? history[history.length - 1] : urlObject; - const opts = { + return decodeStream({ encoding, xmlMode: mimeType.isXML(), baseURI, ...cheerioOptions - }; - return decodeStream(opts, (err, $) => err ? reject(err) : resolve($)); + }, (err, $) => err ? reject(err) : resolve($)); }); }); await undiciStream; return promise; } - //#endregion //#region ../utils/webdav.js /** @@ -182942,12 +165109,10 @@ var WebDAVClient = class { ...this.config.headers } }); - if (this.config.username && this.config.password) { - this.client.defaults.auth = { - username: this.config.username, - password: this.config.password - }; - } + if (this.config.username && this.config.password) this.client.defaults.auth = { + username: this.config.username, + password: this.config.password + }; this.client.interceptors.response.use((response) => response, (error) => { if (error.response) { const { status, statusText, data } = error.response; @@ -183017,18 +165182,12 @@ var WebDAVClient = class { ` }); - if (Number(process.env.WEBDAV_DEBUG)) { - console.log("WebDAV PROPFIND response for", remotePath, ":", response.data); - } + if (Number(process.env.WEBDAV_DEBUG)) console.log("WebDAV PROPFIND response for", remotePath, ":", response.data); const items = this._parseMultiStatus(response.data); - if (items.length === 0) { - throw new Error(`Resource not found or no accessible properties: ${remotePath}`); - } + if (items.length === 0) throw new Error(`Resource not found or no accessible properties: ${remotePath}`); return items[0]; } catch (error) { - if (error.response && error.response.status === 404) { - throw new Error(`Resource not found: ${remotePath}`); - } + if (error.response && error.response.status === 404) throw new Error(`Resource not found: ${remotePath}`); throw new Error(`Failed to get info for ${remotePath}: ${error.message}`); } } @@ -183059,19 +165218,15 @@ var WebDAVClient = class { let currentPath = ""; for (const part of pathParts) { currentPath += "/" + part; - if (!await this.exists(currentPath)) { - await this.client.request({ - method: "MKCOL", - url: currentPath - }); - } + if (!await this.exists(currentPath)) await this.client.request({ + method: "MKCOL", + url: currentPath + }); } - } else { - await this.client.request({ - method: "MKCOL", - url: normalizedPath - }); - } + } else await this.client.request({ + method: "MKCOL", + url: normalizedPath + }); return true; } catch (error) { throw new Error(`Failed to create directory ${remotePath}: ${error.message}`); @@ -183091,25 +165246,17 @@ var WebDAVClient = class { const { overwrite = true, contentType, onProgress } = options; try { const normalizedPath = this._normalizePath(remotePath); - if (!overwrite && await this.exists(normalizedPath)) { - throw new Error(`File ${remotePath} already exists and overwrite is disabled`); - } + if (!overwrite && await this.exists(normalizedPath)) throw new Error(`File ${remotePath} already exists and overwrite is disabled`); let data; let headers = {}; if (typeof source === "string") { data = createReadStream(source); - if (!contentType) { - headers["Content-Type"] = this._getContentType(source); - } + if (!contentType) headers["Content-Type"] = this._getContentType(source); } else if (Buffer.isBuffer(source)) { data = source; headers["Content-Length"] = source.length; - } else { - data = source; - } - if (contentType) { - headers["Content-Type"] = contentType; - } + } else data = source; + if (contentType) headers["Content-Type"] = contentType; await this.client.request({ method: "PUT", url: normalizedPath, @@ -183144,9 +165291,7 @@ var WebDAVClient = class { const writeStream = createWriteStream(localPath); await pipeline(response.data, writeStream); return true; - } else { - return Buffer.from(response.data); - } + } else return Buffer.from(response.data); } catch (error) { throw new Error(`Failed to download file ${remotePath}: ${error.message}`); } @@ -183163,9 +165308,7 @@ var WebDAVClient = class { const normalizedPath = this._normalizePath(remotePath); const { headers: extraHeaders = {} } = options; const fileInfo = await this.getInfo(normalizedPath); - if (!fileInfo || fileInfo.isDirectory) { - throw new Error(`File not found or is a directory: ${remotePath}`); - } + if (!fileInfo || fileInfo.isDirectory) throw new Error(`File not found or is a directory: ${remotePath}`); const requestHeaders = { ...extraHeaders }; const response = await this.client.request({ method: "GET", @@ -183211,9 +165354,7 @@ var WebDAVClient = class { async move(sourcePath, destinationPath, overwrite = false) { try { const headers = { "Destination": this._getAbsoluteUrl(destinationPath) }; - if (overwrite) { - headers["Overwrite"] = "T"; - } + if (overwrite) headers["Overwrite"] = "T"; await this.client.request({ method: "MOVE", url: this._normalizePath(sourcePath), @@ -183233,19 +165374,13 @@ var WebDAVClient = class { */ async copy(sourcePath, destinationPath, overwrite = false) { try { - const sourceExists = await this.exists(sourcePath); - if (!sourceExists) { - throw new Error(`Source file does not exist: ${sourcePath}`); - } + if (!await this.exists(sourcePath)) throw new Error(`Source file does not exist: ${sourcePath}`); const normalizedSource = this._normalizePath(sourcePath); const normalizedDestination = this._normalizePath(destinationPath); const destinationUrl = this._getAbsoluteUrl(destinationPath); const headers = { "Destination": destinationUrl }; - if (overwrite) { - headers["Overwrite"] = "T"; - } else { - headers["Overwrite"] = "F"; - } + if (overwrite) headers["Overwrite"] = "T"; + else headers["Overwrite"] = "F"; if (Number(process.env.WEBDAV_DEBUG)) { console.log("WebDAV COPY operation:"); console.log(" Source:", normalizedSource); @@ -183257,11 +165392,8 @@ var WebDAVClient = class { url: normalizedSource, headers }); - if (response.status >= 200 && response.status < 300) { - return true; - } else { - throw new Error(`Unexpected response status: ${response.status}`); - } + if (response.status >= 200 && response.status < 300) return true; + else throw new Error(`Unexpected response status: ${response.status}`); } catch (error) { if (error.response) { const status = error.response.status; @@ -183279,8 +165411,7 @@ var WebDAVClient = class { */ async getFileContent(remotePath, encoding = "utf8") { try { - const buffer = await this.downloadFile(remotePath); - return buffer.toString(encoding); + return (await this.downloadFile(remotePath)).toString(encoding); } catch (error) { throw new Error(`Failed to get file content ${remotePath}: ${error.message}`); } @@ -183308,19 +165439,14 @@ var WebDAVClient = class { */ _normalizePath(remotePath) { if (!remotePath) return "/"; - if (!remotePath.startsWith("/")) { - remotePath = "/" + remotePath; - } + if (!remotePath.startsWith("/")) remotePath = "/" + remotePath; remotePath = remotePath.replace(/\/+/g, "/"); - const baseUrl = new URL(this.config.baseURL); - const basePath = baseUrl.pathname; + const basePath = new URL(this.config.baseURL).pathname; const decodedBasePath = decodeURIComponent(basePath); const decodedRemotePath = decodeURIComponent(remotePath); if (decodedRemotePath.startsWith(decodedBasePath)) { let relativePath = decodedRemotePath.substring(decodedBasePath.length); - if (!relativePath.startsWith("/")) { - relativePath = "/" + relativePath; - } + if (!relativePath.startsWith("/")) relativePath = "/" + relativePath; return relativePath || "/"; } return remotePath; @@ -183332,8 +165458,7 @@ var WebDAVClient = class { */ _normalizeResponsePath(responsePath) { if (!responsePath) return ""; - const baseUrl = new URL(this.config.baseURL); - let basePath = baseUrl.pathname; + let basePath = new URL(this.config.baseURL).pathname; try { basePath = decodeURIComponent(basePath); } catch (e) { @@ -183346,20 +165471,12 @@ var WebDAVClient = class { } if (responsePath.startsWith(basePath)) { let normalizedPath = responsePath.substring(basePath.length); - if (!normalizedPath.startsWith("/")) { - normalizedPath = "/" + normalizedPath; - } - if (normalizedPath === "/") { - normalizedPath = ""; - } - if (Number(process.env.WEBDAV_DEBUG)) { - console.log(" Normalized path:", normalizedPath); - } + if (!normalizedPath.startsWith("/")) normalizedPath = "/" + normalizedPath; + if (normalizedPath === "/") normalizedPath = ""; + if (Number(process.env.WEBDAV_DEBUG)) console.log(" Normalized path:", normalizedPath); return normalizedPath; } - if (Number(process.env.WEBDAV_DEBUG)) { - console.log(" No normalization needed, returning:", responsePath); - } + if (Number(process.env.WEBDAV_DEBUG)) console.log(" No normalization needed, returning:", responsePath); return responsePath; } /** @@ -183369,9 +165486,7 @@ var WebDAVClient = class { _getAbsoluteUrl(remotePath) { const normalizedPath = this._normalizePath(remotePath); let baseURL = this.config.baseURL; - if (!baseURL.endsWith("/")) { - baseURL += "/"; - } + if (!baseURL.endsWith("/")) baseURL += "/"; const cleanPath = normalizedPath.startsWith("/") ? normalizedPath.substring(1) : normalizedPath; const absoluteUrl = new URL(cleanPath, baseURL).href; if (Number(process.env.WEBDAV_DEBUG)) { @@ -183390,7 +165505,7 @@ var WebDAVClient = class { */ _getContentType(filePath) { const ext = path.extname(filePath).toLowerCase(); - const mimeTypes = { + return { ".txt": "text/plain", ".html": "text/html", ".css": "text/css", @@ -183406,8 +165521,7 @@ var WebDAVClient = class { ".mp4": "video/mp4", ".mp3": "audio/mpeg", ".zip": "application/zip" - }; - return mimeTypes[ext] || "application/octet-stream"; + }[ext] || "application/octet-stream"; } /** * 解析 WebDAV PROPFIND 响应 @@ -183439,14 +165553,9 @@ var WebDAVClient = class { console.warn("Failed to decode href:", href); } let normalizedPath = this._normalizeResponsePath(href); - if (!normalizedPath || normalizedPath === "/" || normalizedPath === "") { - return; - } + if (!normalizedPath || normalizedPath === "/" || normalizedPath === "") return; if (requestPath) { - const normalizedRequestPath = this._normalizePath(requestPath); - if (normalizedPath === normalizedRequestPath) { - return; - } + if (normalizedPath === this._normalizePath(requestPath)) return; } let name = path.basename(normalizedPath); if (!name || name === "/") { @@ -183478,39 +165587,26 @@ var WebDAVClient = class { console.warn("No prop found for", href); return; } - const $resourcetype = $prop.find("resourcetype, d\\:resourcetype, D\\:resourcetype").first(); - if ($resourcetype.find("collection, d\\:collection, D\\:collection").length > 0) { - item.isDirectory = true; - } + if ($prop.find("resourcetype, d\\:resourcetype, D\\:resourcetype").first().find("collection, d\\:collection, D\\:collection").length > 0) item.isDirectory = true; const contentLength = $prop.find("getcontentlength, d\\:getcontentlength, D\\:getcontentlength").text().trim(); if (contentLength) { const size = parseInt(contentLength, 10); - if (!isNaN(size)) { - item.size = size; - } + if (!isNaN(size)) item.size = size; } const lastModified = $prop.find("getlastmodified, d\\:getlastmodified, D\\:getlastmodified").text().trim(); if (lastModified) { const date = new Date(lastModified); - if (!isNaN(date.getTime())) { - item.lastModified = date; - } + if (!isNaN(date.getTime())) item.lastModified = date; } const creationDate = $prop.find("creationdate, d\\:creationdate, D\\:creationdate").text().trim(); if (creationDate) { const date = new Date(creationDate); - if (!isNaN(date.getTime())) { - item.creationDate = date; - } + if (!isNaN(date.getTime())) item.creationDate = date; } const contentType = $prop.find("getcontenttype, d\\:getcontenttype, D\\:getcontenttype").text().trim(); - if (contentType) { - item.contentType = contentType; - } + if (contentType) item.contentType = contentType; const etag = $prop.find("getetag, d\\:getetag, D\\:getetag").text().trim(); - if (etag) { - item.etag = etag.replace(/"/g, ""); - } + if (etag) item.etag = etag.replace(/"/g, ""); items.push(item); }); } catch (error) { @@ -183532,9 +165628,8 @@ var WebDAVClient = class { const hrefMatch = /<(?:D:)?href[^>]*>(.*?)<\/(?:D:)?href>/i.exec(responseXml); if (!hrefMatch) continue; const href = decodeURIComponent(hrefMatch[1]); - const name = path.basename(href) || "/"; const item = { - name, + name: path.basename(href) || "/", path: href, isDirectory: false, size: 0, @@ -183543,35 +165638,23 @@ var WebDAVClient = class { etag: null, creationDate: null }; - if (/<(?:D:)?resourcetype[^>]*>[\s\S]*?<(?:D:)?collection[^>]*\/?>[\s\S]*?<\/(?:D:)?resourcetype>/i.test(responseXml)) { - item.isDirectory = true; - } + if (/<(?:D:)?resourcetype[^>]*>[\s\S]*?<(?:D:)?collection[^>]*\/?>[\s\S]*?<\/(?:D:)?resourcetype>/i.test(responseXml)) item.isDirectory = true; const sizeMatch = /<(?:D:)?getcontentlength[^>]*>(\d+)<\/(?:D:)?getcontentlength>/i.exec(responseXml); - if (sizeMatch) { - item.size = parseInt(sizeMatch[1], 10); - } + if (sizeMatch) item.size = parseInt(sizeMatch[1], 10); const lastModifiedMatch = /<(?:D:)?getlastmodified[^>]*>(.*?)<\/(?:D:)?getlastmodified>/i.exec(responseXml); if (lastModifiedMatch) { const date = new Date(lastModifiedMatch[1]); - if (!isNaN(date.getTime())) { - item.lastModified = date; - } + if (!isNaN(date.getTime())) item.lastModified = date; } const creationDateMatch = /<(?:D:)?creationdate[^>]*>(.*?)<\/(?:D:)?creationdate>/i.exec(responseXml); if (creationDateMatch) { const date = new Date(creationDateMatch[1]); - if (!isNaN(date.getTime())) { - item.creationDate = date; - } + if (!isNaN(date.getTime())) item.creationDate = date; } const contentTypeMatch = /<(?:D:)?getcontenttype[^>]*>(.*?)<\/(?:D:)?getcontenttype>/i.exec(responseXml); - if (contentTypeMatch) { - item.contentType = contentTypeMatch[1]; - } + if (contentTypeMatch) item.contentType = contentTypeMatch[1]; const etagMatch = /<(?:D:)?getetag[^>]*>(.*?)<\/(?:D:)?getetag>/i.exec(responseXml); - if (etagMatch) { - item.etag = etagMatch[1].replace(/"/g, ""); - } + if (etagMatch) item.etag = etagMatch[1].replace(/"/g, ""); items.push(item); } return items; @@ -183585,7 +165668,6 @@ var WebDAVClient = class { function createWebDAVClient(config) { return new WebDAVClient(config); } - //#endregion //#region ../node_modules/basic-ftp/dist/parseControlResponse.js var require_parseControlResponse = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -183611,18 +165693,15 @@ var require_parseControlResponse = /* @__PURE__ */ __commonJSMin(((exports) => { const token = line.substr(0, 3); tokenRegex = new RegExp(`^${token}(?:$| )`); startAt = i; - } else if (isSingleLine(line)) { - messages.push(line); - } + } else if (isSingleLine(line)) messages.push(line); } else if (tokenRegex.test(line)) { - tokenRegex = undefined; + tokenRegex = void 0; messages.push(lines.slice(startAt, i + 1).join(LF)); } } - const rest = tokenRegex ? lines.slice(startAt).join(LF) + LF : ""; return { messages, - rest + rest: tokenRegex ? lines.slice(startAt).join(LF) + LF : "" }; } exports.parseControlResponse = parseControlResponse; @@ -183652,7 +165731,6 @@ var require_parseControlResponse = /* @__PURE__ */ __commonJSMin(((exports) => { return str.trim() !== ""; } })); - //#endregion //#region ../node_modules/basic-ftp/dist/FtpContext.js var require_FtpContext = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -183693,14 +165771,14 @@ var require_FtpContext = /* @__PURE__ */ __commonJSMin(((exports) => { /** Debug-level logging of all socket communication. */ this.verbose = false; /** IP version to prefer (4: IPv4, 6: IPv6, undefined: automatic). */ - this.ipFamily = undefined; + this.ipFamily = void 0; /** Options for TLS connections. */ this.tlsOptions = {}; /** A multiline response might be received as multiple chunks. */ this._partialResponse = ""; this._encoding = encoding; this._socket = this.socket = this._newSocket(); - this._dataSocket = undefined; + this._dataSocket = void 0; } /** * Close the context. @@ -183714,9 +165792,7 @@ var require_FtpContext = /* @__PURE__ */ __commonJSMin(((exports) => { * Close the context with an error. */ closeWithError(err) { - if (this._closingError) { - return; - } + if (this._closingError) return; this._closingError = err; this._closeControlSocket(); this._closeSocket(this._dataSocket); @@ -183727,7 +165803,7 @@ var require_FtpContext = /* @__PURE__ */ __commonJSMin(((exports) => { * Returns true if this context has been closed or hasn't been connected yet. You can reopen it with `access`. */ get closed() { - return this.socket.remoteAddress === undefined || this._closingError !== undefined; + return this.socket.remoteAddress === void 0 || this._closingError !== void 0; } /** * Reset this contex and all of its state. @@ -183746,26 +165822,20 @@ var require_FtpContext = /* @__PURE__ */ __commonJSMin(((exports) => { * if the new one is not an upgrade to the current one. */ set socket(socket) { - this.dataSocket = undefined; + this.dataSocket = void 0; this.tlsOptions = {}; this._partialResponse = ""; - if (this._socket) { - const newSocketUpgradesExisting = socket.localPort === this._socket.localPort; - if (newSocketUpgradesExisting) { - this._removeSocketListeners(this.socket); - } else { - this._closeControlSocket(); - } - } + if (this._socket) if (socket.localPort === this._socket.localPort) this._removeSocketListeners(this.socket); + else this._closeControlSocket(); if (socket) { - this._closingError = undefined; + this._closingError = void 0; socket.setTimeout(0); socket.setEncoding(this._encoding); socket.setKeepAlive(true); socket.on("data", (data) => this._onControlSocketData(data)); - socket.on("end", () => this.closeWithError(new Error("Server sent FIN packet unexpectedly, closing connection."))); + socket.on("end", () => this.closeWithError(/* @__PURE__ */ new Error("Server sent FIN packet unexpectedly, closing connection."))); socket.on("close", (hadError) => { - if (!hadError) this.closeWithError(new Error("Server closed connection unexpectedly.")); + if (!hadError) this.closeWithError(/* @__PURE__ */ new Error("Server closed connection unexpectedly.")); }); this._setupDefaultErrorHandlers(socket, "control socket"); } @@ -183802,16 +165872,13 @@ var require_FtpContext = /* @__PURE__ */ __commonJSMin(((exports) => { */ set encoding(encoding) { this._encoding = encoding; - if (this.socket) { - this.socket.setEncoding(encoding); - } + if (this.socket) this.socket.setEncoding(encoding); } /** * Send an FTP command without waiting for or handling the result. */ send(command) { - const containsPassword = command.startsWith("PASS"); - const message = containsPassword ? "> PASS ###" : `> ${command}`; + const message = command.startsWith("PASS") ? "> PASS ###" : `> ${command}`; this.log(message); this._socket.write(command + "\r\n", this.encoding); } @@ -183821,11 +165888,8 @@ var require_FtpContext = /* @__PURE__ */ __commonJSMin(((exports) => { */ request(command) { return this.handle(command, (res, task) => { - if (res instanceof Error) { - task.reject(res); - } else { - task.resolve(res); - } + if (res instanceof Error) task.reject(res); + else task.resolve(res); }); } /** @@ -183834,13 +165898,13 @@ var require_FtpContext = /* @__PURE__ */ __commonJSMin(((exports) => { */ handle(command, responseHandler) { if (this._task) { - const err = new Error("User launched a task while another one is still running. Forgot to use 'await' or '.then()'?"); + const err = /* @__PURE__ */ new Error("User launched a task while another one is still running. Forgot to use 'await' or '.then()'?"); err.stack += `\nRunning task launched at: ${this._task.stack}`; this.closeWithError(err); } return new Promise((resolveTask, rejectTask) => { this._task = { - stack: new Error().stack || "Unknown call stack", + stack: (/* @__PURE__ */ new Error()).stack || "Unknown call stack", responseHandler, resolver: { resolve: (arg) => { @@ -183854,25 +165918,21 @@ var require_FtpContext = /* @__PURE__ */ __commonJSMin(((exports) => { } }; if (this._closingError) { - const err = new Error(`Client is closed because ${this._closingError.message}`); + const err = /* @__PURE__ */ new Error(`Client is closed because ${this._closingError.message}`); err.stack += `\nClosing reason: ${this._closingError.stack}`; - err.code = this._closingError.code !== undefined ? this._closingError.code : "0"; + err.code = this._closingError.code !== void 0 ? this._closingError.code : "0"; this._passToHandler(err); return; } this.socket.setTimeout(this.timeout); - if (command) { - this.send(command); - } + if (command) this.send(command); }); } /** * Log message if set to be verbose. */ log(message) { - if (this.verbose) { - console.log(message); - } + if (this.verbose) console.log(message); } /** * Return true if the control socket is using TLS. This does not mean that a session @@ -183887,7 +165947,7 @@ var require_FtpContext = /* @__PURE__ */ __commonJSMin(((exports) => { */ _stopTrackingTask() { this.socket.setTimeout(0); - this._task = undefined; + this._task = void 0; } /** * Handle incoming data on the control socket. The chunk is going to be of type `string` @@ -183905,7 +165965,7 @@ var require_FtpContext = /* @__PURE__ */ __commonJSMin(((exports) => { code, message }; - const err = code >= 400 ? new FTPError(response) : undefined; + const err = code >= 400 ? new FTPError(response) : void 0; this._passToHandler(err ? err : response); } } @@ -183915,9 +165975,7 @@ var require_FtpContext = /* @__PURE__ */ __commonJSMin(((exports) => { * @protected */ _passToHandler(response) { - if (this._task) { - this._task.responseHandler(response, this._task.resolver); - } + if (this._task) this._task.responseHandler(response, this._task.resolver); } /** * Setup all error handlers for a socket. @@ -183929,13 +165987,11 @@ var require_FtpContext = /* @__PURE__ */ __commonJSMin(((exports) => { this.closeWithError(error); }); socket.once("close", (hadError) => { - if (hadError) { - this.closeWithError(new Error(`Socket closed due to transmission error (${identifier})`)); - } + if (hadError) this.closeWithError(/* @__PURE__ */ new Error(`Socket closed due to transmission error (${identifier})`)); }); socket.once("timeout", () => { socket.destroy(); - this.closeWithError(new Error(`Timeout (${identifier})`)); + this.closeWithError(/* @__PURE__ */ new Error(`Timeout (${identifier})`)); }); } /** @@ -183982,7 +166038,6 @@ var require_FtpContext = /* @__PURE__ */ __commonJSMin(((exports) => { }; exports.FTPContext = FTPContext; })); - //#endregion //#region ../node_modules/basic-ftp/dist/FileInfo.js var require_FileInfo = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -184023,32 +166078,32 @@ var require_FileInfo = /* @__PURE__ */ __commonJSMin(((exports) => { * parsed with the correct timezone and a resolution down to seconds. See `rawModifiedAt` property for the unparsed * date that is always available. */ - this.modifiedAt = undefined; + this.modifiedAt = void 0; /** * Unix permissions if present. If the underlying FTP server is not running on Unix this will be undefined. * If set, you might be able to edit permissions with the FTP command `SITE CHMOD`. */ - this.permissions = undefined; + this.permissions = void 0; /** * Hard link count if available. */ - this.hardLinkCount = undefined; + this.hardLinkCount = void 0; /** * Link name for symbolic links if available. */ - this.link = undefined; + this.link = void 0; /** * Unix group if available. */ - this.group = undefined; + this.group = void 0; /** * Unix user if available. */ - this.user = undefined; + this.user = void 0; /** * Unique ID if available. */ - this.uniqueID = undefined; + this.uniqueID = void 0; this.name = name; } get isDirectory() { @@ -184078,7 +166133,6 @@ var require_FileInfo = /* @__PURE__ */ __commonJSMin(((exports) => { Execute: 1 }; })); - //#endregion //#region ../node_modules/basic-ftp/dist/parseListDOS.js var require_parseListDOS = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -184091,7 +166145,7 @@ var require_parseListDOS = /* @__PURE__ */ __commonJSMin(((exports) => { * * https://github.com/apache/commons-net/blob/master/src/main/java/org/apache/commons/net/ftp/parser/NTFTPEntryParser.java */ - const RE_LINE = new RegExp("(\\S+)\\s+(\\S+)\\s+" + "(?:()|([0-9]+))\\s+" + "(\\S.*)"); + const RE_LINE = new RegExp("(\\S+)\\s+(\\S+)\\s+(?:()|([0-9]+))\\s+(\\S.*)"); /** * Returns true if a given line might be a DOS-style listing. * @@ -184106,16 +166160,11 @@ var require_parseListDOS = /* @__PURE__ */ __commonJSMin(((exports) => { */ function parseLine(line) { const groups = line.match(RE_LINE); - if (groups === null) { - return undefined; - } + if (groups === null) return; const name = groups[5]; - if (name === "." || name === "..") { - return undefined; - } + if (name === "." || name === "..") return; const file = new FileInfo_1.FileInfo(name); - const fileType = groups[3]; - if (fileType === "") { + if (groups[3] === "") { file.type = FileInfo_1.FileType.Directory; file.size = 0; } else { @@ -184131,7 +166180,6 @@ var require_parseListDOS = /* @__PURE__ */ __commonJSMin(((exports) => { } exports.transformList = transformList; })); - //#endregion //#region ../node_modules/basic-ftp/dist/parseListUnix.js var require_parseListUnix = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -184171,7 +166219,7 @@ var require_parseListUnix = /* @__PURE__ */ __commonJSMin(((exports) => { * this is not allowed for here as does not appear to be shown by FTP servers * {@code @} file has extended attributes */ - const RE_LINE = new RegExp("([bcdelfmpSs-])" + "(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]?)))\\+?" + "\\s*" + "(\\d+)" + "\\s+" + "(?:(\\S+(?:\\s\\S+)*?)\\s+)?" + "(?:(\\S+(?:\\s\\S+)*)\\s+)?" + "(\\d+(?:,\\s*\\d+)?)" + "\\s+" + "(" + "(?:\\d+[-/]\\d+[-/]\\d+)" + "|(?:\\S{3}\\s+\\d{1,2})" + "|(?:\\d{1,2}\\s+\\S{3})" + "|(?:\\d{1,2}" + JA_MONTH + "\\s+\\d{1,2}" + JA_DAY + ")" + ")" + "\\s+" + "((?:\\d+(?::\\d+)?)|(?:\\d{4}" + JA_YEAR + "))" + "\\s" + "(.*)"); + const RE_LINE = new RegExp("([bcdelfmpSs-])(((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]))((r|-)(w|-)([xsStTL-]?)))\\+?\\s*(\\d+)\\s+(?:(\\S+(?:\\s\\S+)*?)\\s+)?(?:(\\S+(?:\\s\\S+)*)\\s+)?(\\d+(?:,\\s*\\d+)?)\\s+((?:\\d+[-/]\\d+[-/]\\d+)|(?:\\S{3}\\s+\\d{1,2})|(?:\\d{1,2}\\s+\\S{3})|(?:\\d{1,2}" + JA_MONTH + "\\s+\\d{1,2}日))\\s+((?:\\d+(?::\\d+)?)|(?:\\d{4}年))\\s(.*)"); /** * Returns true if a given line might be a Unix-style listing. * @@ -184186,13 +166234,9 @@ var require_parseListUnix = /* @__PURE__ */ __commonJSMin(((exports) => { */ function parseLine(line) { const groups = line.match(RE_LINE); - if (groups === null) { - return undefined; - } + if (groups === null) return; const name = groups[21]; - if (name === "." || name === "..") { - return undefined; - } + if (name === "." || name === "..") return; const file = new FileInfo_1.FileInfo(name); file.size = parseInt(groups[18], 10); file.user = groups[16]; @@ -184240,20 +166284,13 @@ var require_parseListUnix = /* @__PURE__ */ __commonJSMin(((exports) => { exports.transformList = transformList; function parseMode(r, w, x) { let value = 0; - if (r !== "-") { - value += FileInfo_1.FileInfo.UnixPermission.Read; - } - if (w !== "-") { - value += FileInfo_1.FileInfo.UnixPermission.Write; - } + if (r !== "-") value += FileInfo_1.FileInfo.UnixPermission.Read; + if (w !== "-") value += FileInfo_1.FileInfo.UnixPermission.Write; const execToken = x.charAt(0); - if (execToken !== "-" && execToken.toUpperCase() !== execToken) { - value += FileInfo_1.FileInfo.UnixPermission.Execute; - } + if (execToken !== "-" && execToken.toUpperCase() !== execToken) value += FileInfo_1.FileInfo.UnixPermission.Execute; return value; } })); - //#endregion //#region ../node_modules/basic-ftp/dist/parseListMLSD.js var require_parseListMLSD = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -184310,7 +166347,7 @@ var require_parseListMLSD = /* @__PURE__ */ __commonJSMin(((exports) => { info.user = value; }, "unix.owner": (value, info) => { - if (info.user === undefined) info.user = value; + if (info.user === void 0) info.user = value; }, get "unix.uid"() { return this["unix.owner"]; @@ -184319,7 +166356,7 @@ var require_parseListMLSD = /* @__PURE__ */ __commonJSMin(((exports) => { info.group = value; }, "unix.group": (value, info) => { - if (info.group === undefined) info.group = value; + if (info.group === void 0) info.group = value; }, get "unix.gid"() { return this["unix.group"]; @@ -184331,9 +166368,7 @@ var require_parseListMLSD = /* @__PURE__ */ __commonJSMin(((exports) => { */ function splitStringOnce(str, delimiter) { const pos = str.indexOf(delimiter); - const a = str.substr(0, pos); - const b = str.substr(pos + delimiter.length); - return [a, b]; + return [str.substr(0, pos), str.substr(pos + delimiter.length)]; } /** * Returns true if a given line might be part of an MLSD listing. @@ -184350,47 +166385,29 @@ var require_parseListMLSD = /* @__PURE__ */ __commonJSMin(((exports) => { */ function parseLine(line) { const [packedFacts, name] = splitStringOnce(line, " "); - if (name === "" || name === "." || name === "..") { - return undefined; - } + if (name === "" || name === "." || name === "..") return; const info = new FileInfo_1.FileInfo(name); const facts = packedFacts.split(";"); for (const fact of facts) { const [factName, factValue] = splitStringOnce(fact, "="); - if (!factValue) { - continue; - } + if (!factValue) continue; const factHandler = factHandlersByName[factName.toLowerCase()]; - if (!factHandler) { - continue; - } - const result = factHandler(factValue, info); - if (result === 2) { - return undefined; - } + if (!factHandler) continue; + if (factHandler(factValue, info) === 2) return; } return info; } exports.parseLine = parseLine; function transformList(files) { - const nonLinksByID = new Map(); - for (const file of files) { - if (!file.isSymbolicLink && file.uniqueID !== undefined) { - nonLinksByID.set(file.uniqueID, file); - } - } + const nonLinksByID = /* @__PURE__ */ new Map(); + for (const file of files) if (!file.isSymbolicLink && file.uniqueID !== void 0) nonLinksByID.set(file.uniqueID, file); const resolvedFiles = []; for (const file of files) { - if (file.isSymbolicLink && file.uniqueID !== undefined && file.link === undefined) { + if (file.isSymbolicLink && file.uniqueID !== void 0 && file.link === void 0) { const target = nonLinksByID.get(file.uniqueID); - if (target !== undefined) { - file.link = target.name; - } - } - const isPartOfDirectory = !file.name.includes("/"); - if (isPartOfDirectory) { - resolvedFiles.push(file); + if (target !== void 0) file.link = target.name; } + if (!file.name.includes("/")) resolvedFiles.push(file); } return resolvedFiles; } @@ -184406,24 +166423,21 @@ var require_parseListMLSD = /* @__PURE__ */ __commonJSMin(((exports) => { } exports.parseMLSxDate = parseMLSxDate; })); - //#endregion //#region ../node_modules/basic-ftp/dist/parseList.js var require_parseList = /* @__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; 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]; - } - }; - } + 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; + if (k2 === void 0) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) { @@ -184445,17 +166459,14 @@ var require_parseList = /* @__PURE__ */ __commonJSMin(((exports) => { }; Object.defineProperty(exports, "__esModule", { value: true }); exports.parseList = void 0; - const dosParser = __importStar(require_parseListDOS()); - const unixParser = __importStar(require_parseListUnix()); - const mlsdParser = __importStar(require_parseListMLSD()); /** * Available directory listing parsers. These are candidates that will be tested * in the order presented. The first candidate will be used to parse the whole list. */ const availableParsers = [ - dosParser, - unixParser, - mlsdParser + __importStar(require_parseListDOS()), + __importStar(require_parseListUnix()), + __importStar(require_parseListMLSD()) ]; function firstCompatibleParser(line, parsers) { return parsers.find((parser) => parser.testLine(line) === true); @@ -184472,20 +166483,15 @@ var require_parseList = /* @__PURE__ */ __commonJSMin(((exports) => { */ function parseList(rawList) { const lines = rawList.split(REGEX_NEWLINE).filter(isNotBlank).filter(isNotMeta); - if (lines.length === 0) { - return []; - } + if (lines.length === 0) return []; const testLine = lines[lines.length - 1]; const parser = firstCompatibleParser(testLine, availableParsers); - if (!parser) { - throw new Error("This library only supports MLSD, Unix- or DOS-style directory listing. Your FTP server seems to be using another format. You can see the transmitted listing when setting `client.ftp.verbose = true`. You can then provide a custom parser to `client.parseList`, see the documentation for details."); - } - const files = lines.map(parser.parseLine).filter((info) => info !== undefined); + if (!parser) throw new Error("This library only supports MLSD, Unix- or DOS-style directory listing. Your FTP server seems to be using another format. You can see the transmitted listing when setting `client.ftp.verbose = true`. You can then provide a custom parser to `client.parseList`, see the documentation for details."); + const files = lines.map(parser.parseLine).filter((info) => info !== void 0); return parser.transformList(files); } exports.parseList = parseList; })); - //#endregion //#region ../node_modules/basic-ftp/dist/ProgressTracker.js var require_ProgressTracker = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -184550,9 +166556,7 @@ var require_ProgressTracker = /* @__PURE__ */ __commonJSMin(((exports) => { const id = setInterval(updateFunc, intervalMs); const stopFunc = (stopWithUpdate) => { clearInterval(id); - if (stopWithUpdate) { - updateFunc(); - } + if (stopWithUpdate) updateFunc(); updateFunc = noop; }; updateFunc(); @@ -184560,7 +166564,6 @@ var require_ProgressTracker = /* @__PURE__ */ __commonJSMin(((exports) => { } function noop() {} })); - //#endregion //#region ../node_modules/basic-ftp/dist/StringWriter.js var require_StringWriter = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -184576,9 +166579,7 @@ var require_StringWriter = /* @__PURE__ */ __commonJSMin(((exports) => { if (chunk instanceof Buffer) { this.buf = Buffer.concat([this.buf, chunk]); callback(null); - } else { - callback(new Error("StringWriter expects chunks of type 'Buffer'.")); - } + } else callback(/* @__PURE__ */ new Error("StringWriter expects chunks of type 'Buffer'.")); } getText(encoding) { return this.buf.toString(encoding); @@ -184586,7 +166587,6 @@ var require_StringWriter = /* @__PURE__ */ __commonJSMin(((exports) => { }; exports.StringWriter = StringWriter; })); - //#endregion //#region ../node_modules/basic-ftp/dist/netUtils.js var require_netUtils = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -184608,9 +166608,7 @@ var require_netUtils = /* @__PURE__ */ __commonJSMin(((exports) => { * Returns a string describing the remote address of a socket. */ function describeAddress(socket) { - if (socket.remoteFamily === "IPv6") { - return `[${socket.remoteAddress}]:${socket.remotePort}`; - } + if (socket.remoteFamily === "IPv6") return `[${socket.remoteAddress}]:${socket.remotePort}`; return `${socket.remoteAddress}:${socket.remotePort}`; } exports.describeAddress = describeAddress; @@ -184621,10 +166619,8 @@ var require_netUtils = /* @__PURE__ */ __commonJSMin(((exports) => { return new Promise((resolve, reject) => { const tlsOptions = Object.assign({}, options, { socket }); const tlsSocket = (0, tls_1$2.connect)(tlsOptions, () => { - const expectCertificate = tlsOptions.rejectUnauthorized !== false; - if (expectCertificate && !tlsSocket.authorized) { - reject(tlsSocket.authorizationError); - } else { + if (tlsOptions.rejectUnauthorized !== false && !tlsSocket.authorized) reject(tlsSocket.authorizationError); + else { tlsSocket.removeAllListeners("error"); resolve(tlsSocket); } @@ -184641,15 +166637,12 @@ var require_netUtils = /* @__PURE__ */ __commonJSMin(((exports) => { * @param ip The IP as a string, e.g. "192.168.0.1" */ function ipIsPrivateV4Address(ip = "") { - if (ip.startsWith("::ffff:")) { - ip = ip.substr(7); - } + if (ip.startsWith("::ffff:")) ip = ip.substr(7); const octets = ip.split(".").map((o) => parseInt(o, 10)); return octets[0] === 10 || octets[0] === 172 && octets[1] >= 16 && octets[1] <= 31 || octets[0] === 192 && octets[1] === 168 || ip === "127.0.0.1"; } exports.ipIsPrivateV4Address = ipIsPrivateV4Address; })); - //#endregion //#region ../node_modules/basic-ftp/dist/transfer.js var require_transfer = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -184665,13 +166658,9 @@ var require_transfer = /* @__PURE__ */ __commonJSMin(((exports) => { async function enterPassiveModeIPv6(ftp) { const res = await ftp.request("EPSV"); const port = parseEpsvResponse(res.message); - if (!port) { - throw new Error("Can't parse EPSV response: " + res.message); - } + if (!port) throw new Error("Can't parse EPSV response: " + res.message); const controlHost = ftp.socket.remoteAddress; - if (controlHost === undefined) { - throw new Error("Control socket is disconnected, can't get remote address."); - } + if (controlHost === void 0) throw new Error("Control socket is disconnected, can't get remote address."); await connectForPassiveTransfer(controlHost, port, ftp); return res; } @@ -184681,13 +166670,9 @@ var require_transfer = /* @__PURE__ */ __commonJSMin(((exports) => { */ function parseEpsvResponse(message) { const groups = message.match(/[|!]{3}(.+)[|!]/); - if (groups === null || groups[1] === undefined) { - throw new Error(`Can't parse response to 'EPSV': ${message}`); - } + if (groups === null || groups[1] === void 0) throw new Error(`Can't parse response to 'EPSV': ${message}`); const port = parseInt(groups[1], 10); - if (Number.isNaN(port)) { - throw new Error(`Can't parse response to 'EPSV', port is not a number: ${message}`); - } + if (Number.isNaN(port)) throw new Error(`Can't parse response to 'EPSV', port is not a number: ${message}`); return port; } exports.parseEpsvResponse = parseEpsvResponse; @@ -184697,13 +166682,9 @@ var require_transfer = /* @__PURE__ */ __commonJSMin(((exports) => { async function enterPassiveModeIPv4(ftp) { const res = await ftp.request("PASV"); const target = parsePasvResponse(res.message); - if (!target) { - throw new Error("Can't parse PASV response: " + res.message); - } + if (!target) throw new Error("Can't parse PASV response: " + res.message); const controlHost = ftp.socket.remoteAddress; - if ((0, netUtils_1.ipIsPrivateV4Address)(target.host) && controlHost && !(0, netUtils_1.ipIsPrivateV4Address)(controlHost)) { - target.host = controlHost; - } + if ((0, netUtils_1.ipIsPrivateV4Address)(target.host) && controlHost && !(0, netUtils_1.ipIsPrivateV4Address)(controlHost)) target.host = controlHost; await connectForPassiveTransfer(target.host, target.port, ftp); return res; } @@ -184713,9 +166694,7 @@ var require_transfer = /* @__PURE__ */ __commonJSMin(((exports) => { */ function parsePasvResponse(message) { const groups = message.match(/([-\d]+,[-\d]+,[-\d]+,[-\d]+),([-\d]+),([-\d]+)/); - if (groups === null || groups.length !== 4) { - throw new Error(`Can't parse response to 'PASV': ${message}`); - } + if (groups === null || groups.length !== 4) throw new Error(`Can't parse response to 'PASV': ${message}`); return { host: groups[1].replace(/,/g, "."), port: (parseInt(groups[2], 10) & 255) * 256 + (parseInt(groups[3], 10) & 255) @@ -184731,7 +166710,7 @@ var require_transfer = /* @__PURE__ */ __commonJSMin(((exports) => { }; const handleTimeout = function() { socket.destroy(); - reject(new Error(`Timeout when trying to open data connection to ${host}:${port}`)); + reject(/* @__PURE__ */ new Error(`Timeout when trying to open data connection to ${host}:${port}`)); }; socket.setTimeout(ftp.timeout); socket.on("error", handleConnErr); @@ -184741,12 +166720,10 @@ var require_transfer = /* @__PURE__ */ __commonJSMin(((exports) => { host, family: ftp.ipFamily }, () => { - if (ftp.socket instanceof tls_1$1.TLSSocket) { - socket = (0, tls_1$1.connect)(Object.assign({}, ftp.tlsOptions, { - socket, - session: ftp.socket.getSession() - })); - } + if (ftp.socket instanceof tls_1$1.TLSSocket) socket = (0, tls_1$1.connect)(Object.assign({}, ftp.tlsOptions, { + socket, + session: ftp.socket.getSession() + })); socket.removeListener("error", handleConnErr); socket.removeListener("timeout", handleTimeout); ftp.dataSocket = socket; @@ -184770,7 +166747,7 @@ var require_transfer = /* @__PURE__ */ __commonJSMin(((exports) => { constructor(ftp, progress) { this.ftp = ftp; this.progress = progress; - this.response = undefined; + this.response = void 0; this.dataTransferDone = false; } /** @@ -184780,9 +166757,7 @@ var require_transfer = /* @__PURE__ */ __commonJSMin(((exports) => { * @param type - Type of transfer, usually "upload" or "download". */ onDataStart(name, type) { - if (this.ftp.dataSocket === undefined) { - throw new Error("Data transfer should start but there is no data connection."); - } + if (this.ftp.dataSocket === void 0) throw new Error("Data transfer should start but there is no data connection."); this.ftp.socket.setTimeout(0); this.ftp.dataSocket.setTimeout(this.ftp.timeout); this.progress.start(this.ftp.dataSocket, name, type); @@ -184793,9 +166768,7 @@ var require_transfer = /* @__PURE__ */ __commonJSMin(((exports) => { onDataDone(task) { this.progress.updateAndStop(); this.ftp.socket.setTimeout(this.ftp.timeout); - if (this.ftp.dataSocket) { - this.ftp.dataSocket.setTimeout(0); - } + if (this.ftp.dataSocket) this.ftp.dataSocket.setTimeout(0); this.dataTransferDone = true; this.tryResolve(task); } @@ -184812,7 +166785,7 @@ var require_transfer = /* @__PURE__ */ __commonJSMin(((exports) => { onError(task, err) { this.progress.updateAndStop(); this.ftp.socket.setTimeout(this.ftp.timeout); - this.ftp.dataSocket = undefined; + this.ftp.dataSocket = void 0; task.reject(err); } /** @@ -184821,13 +166794,12 @@ var require_transfer = /* @__PURE__ */ __commonJSMin(((exports) => { * the FTP server is now caught up in a state we can't resolve. */ onUnexpectedRequest(response) { - const err = new Error(`Unexpected FTP response is requesting an answer: ${response.message}`); + const err = /* @__PURE__ */ new Error(`Unexpected FTP response is requesting an answer: ${response.message}`); this.ftp.closeWithError(err); } tryResolve(task) { - const canResolve = this.dataTransferDone && this.response !== undefined; - if (canResolve) { - this.ftp.dataSocket = undefined; + if (this.dataTransferDone && this.response !== void 0) { + this.ftp.dataSocket = void 0; task.resolve(this.response); } } @@ -184836,64 +166808,46 @@ var require_transfer = /* @__PURE__ */ __commonJSMin(((exports) => { const resolver = new TransferResolver(config.ftp, config.tracker); const fullCommand = `${config.command} ${config.remotePath}`; return config.ftp.handle(fullCommand, (res, task) => { - if (res instanceof Error) { - resolver.onError(task, res); - } else if (res.code === 150 || res.code === 125) { + if (res instanceof Error) resolver.onError(task, res); + else if (res.code === 150 || res.code === 125) { const dataSocket = config.ftp.dataSocket; if (!dataSocket) { - resolver.onError(task, new Error("Upload should begin but no data connection is available.")); + resolver.onError(task, /* @__PURE__ */ new Error("Upload should begin but no data connection is available.")); return; } - const canUpload = "getCipher" in dataSocket ? dataSocket.getCipher() !== undefined : true; - onConditionOrEvent(canUpload, dataSocket, "secureConnect", () => { + onConditionOrEvent("getCipher" in dataSocket ? dataSocket.getCipher() !== void 0 : true, dataSocket, "secureConnect", () => { config.ftp.log(`Uploading to ${(0, netUtils_1.describeAddress)(dataSocket)} (${(0, netUtils_1.describeTLS)(dataSocket)})`); resolver.onDataStart(config.remotePath, config.type); (0, stream_1.pipeline)(source, dataSocket, (err) => { - if (err) { - resolver.onError(task, err); - } else { - resolver.onDataDone(task); - } + if (err) resolver.onError(task, err); + else resolver.onDataDone(task); }); }); - } else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) { - resolver.onControlDone(task, res); - } else if ((0, parseControlResponse_1.positiveIntermediate)(res.code)) { - resolver.onUnexpectedRequest(res); - } + } else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) resolver.onControlDone(task, res); + else if ((0, parseControlResponse_1.positiveIntermediate)(res.code)) resolver.onUnexpectedRequest(res); }); } exports.uploadFrom = uploadFrom; function downloadTo(destination, config) { - if (!config.ftp.dataSocket) { - throw new Error("Download will be initiated but no data connection is available."); - } + if (!config.ftp.dataSocket) throw new Error("Download will be initiated but no data connection is available."); const resolver = new TransferResolver(config.ftp, config.tracker); return config.ftp.handle(config.command, (res, task) => { - if (res instanceof Error) { - resolver.onError(task, res); - } else if (res.code === 150 || res.code === 125) { + if (res instanceof Error) resolver.onError(task, res); + else if (res.code === 150 || res.code === 125) { const dataSocket = config.ftp.dataSocket; if (!dataSocket) { - resolver.onError(task, new Error("Download should begin but no data connection is available.")); + resolver.onError(task, /* @__PURE__ */ new Error("Download should begin but no data connection is available.")); return; } config.ftp.log(`Downloading from ${(0, netUtils_1.describeAddress)(dataSocket)} (${(0, netUtils_1.describeTLS)(dataSocket)})`); resolver.onDataStart(config.remotePath, config.type); (0, stream_1.pipeline)(dataSocket, destination, (err) => { - if (err) { - resolver.onError(task, err); - } else { - resolver.onDataDone(task); - } + if (err) resolver.onError(task, err); + else resolver.onDataDone(task); }); - } else if (res.code === 350) { - config.ftp.send("RETR " + config.remotePath); - } else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) { - resolver.onControlDone(task, res); - } else if ((0, parseControlResponse_1.positiveIntermediate)(res.code)) { - resolver.onUnexpectedRequest(res); - } + } else if (res.code === 350) config.ftp.send("RETR " + config.remotePath); + else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) resolver.onControlDone(task, res); + else if ((0, parseControlResponse_1.positiveIntermediate)(res.code)) resolver.onUnexpectedRequest(res); }); } exports.downloadTo = downloadTo; @@ -184907,14 +166861,10 @@ var require_transfer = /* @__PURE__ */ __commonJSMin(((exports) => { * @param action The function to call. */ function onConditionOrEvent(condition, emitter, eventName, action) { - if (condition === true) { - action(); - } else { - emitter.once(eventName, () => action()); - } + if (condition === true) action(); + else emitter.once(eventName, () => action()); } })); - //#endregion //#region ../node_modules/basic-ftp/dist/Client.js var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -185011,14 +166961,10 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { * Handles the first reponse by an FTP server after the socket connection has been established. */ _handleConnectResponse() { - return this.ftp.handle(undefined, (res, task) => { - if (res instanceof Error) { - task.reject(res); - } else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) { - task.resolve(res); - } else { - task.reject(new FtpContext_1.FTPError(res)); - } + return this.ftp.handle(void 0, (res, task) => { + if (res instanceof Error) task.reject(res); + else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) task.resolve(res); + else task.reject(new FtpContext_1.FTPError(res)); }); } /** @@ -185038,16 +166984,12 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { */ sendIgnoringError(command) { return this.ftp.handle(command, (res, task) => { - if (res instanceof FtpContext_1.FTPError) { - task.resolve({ - code: res.code, - message: res.message - }); - } else if (res instanceof Error) { - task.reject(res); - } else { - task.resolve(res); - } + if (res instanceof FtpContext_1.FTPError) task.resolve({ + code: res.code, + message: res.message + }); + else if (res instanceof Error) task.reject(res); + else task.resolve(res); }); } /** @@ -185072,15 +167014,10 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { login(user = "anonymous", password = "guest") { this.ftp.log(`Login security: ${(0, netUtils_1.describeTLS)(this.ftp.socket)}`); return this.ftp.handle("USER " + user, (res, task) => { - if (res instanceof Error) { - task.reject(res); - } else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) { - task.resolve(res); - } else if (res.code === 331) { - this.ftp.send("PASS " + password); - } else { - task.reject(new FtpContext_1.FTPError(res)); - } + if (res instanceof Error) task.reject(res); + else if ((0, parseControlResponse_1.positiveCompletion)(res.code)) task.resolve(res); + else if (res.code === 331) this.ftp.send("PASS " + password); + else task.reject(new FtpContext_1.FTPError(res)); }); } /** @@ -185092,15 +167029,12 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { * * Additional settings for FTPS (PBSZ 0, PROT P) */ async useDefaultSettings() { - const features = await this.features(); - const supportsMLSD = features.has("MLST"); + const supportsMLSD = (await this.features()).has("MLST"); this.availableListCommands = supportsMLSD ? LIST_COMMANDS_MLSD() : LIST_COMMANDS_DEFAULT(); await this.send("TYPE I"); await this.sendIgnoringError("STRU F"); await this.sendIgnoringError("OPTS UTF8 ON"); - if (supportsMLSD) { - await this.sendIgnoringError("OPTS MLST type;size;modify;unique;unix.mode;unix.owner;unix.group;unix.ownername;unix.groupname;"); - } + if (supportsMLSD) await this.sendIgnoringError("OPTS MLST type;size;modify;unique;unix.mode;unix.owner;unix.group;unix.ownername;unix.groupname;"); if (this.ftp.hasTLS) { await this.sendIgnoringError("PBSZ 0"); await this.sendIgnoringError("PROT P"); @@ -185119,11 +167053,8 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { const useExplicitTLS = options.secure === true; const useImplicitTLS = options.secure === "implicit"; let welcome; - if (useImplicitTLS) { - welcome = await this.connectImplicitTLS(options.host, options.port, options.secureOptions); - } else { - welcome = await this.connect(options.host, options.port); - } + if (useImplicitTLS) welcome = await this.connectImplicitTLS(options.host, options.port, options.secureOptions); + else welcome = await this.connect(options.host, options.port); if (useExplicitTLS) { const secureOptions = (_a = options.secureOptions) !== null && _a !== void 0 ? _a : {}; secureOptions.host = (_b = secureOptions.host) !== null && _b !== void 0 ? _b : options.host; @@ -185140,9 +167071,7 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { async pwd() { const res = await this.send("PWD"); const parsed = res.message.match(/"(.+)"/); - if (parsed === null || parsed[1] === undefined) { - throw new Error(`Can't parse response to command 'PWD': ${res.message}`); - } + if (parsed === null || parsed[1] === void 0) throw new Error(`Can't parse response to command 'PWD': ${res.message}`); return parsed[1]; } /** @@ -185154,13 +167083,11 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { */ async features() { const res = await this.sendIgnoringError("FEAT"); - const features = new Map(); - if (res.code < 400 && (0, parseControlResponse_1.isMultiline)(res.message)) { - res.message.split("\n").slice(1, -1).forEach((line) => { - const entry = line.trim().split(" "); - features.set(entry[0], entry[1] || ""); - }); - } + const features = /* @__PURE__ */ new Map(); + if (res.code < 400 && (0, parseControlResponse_1.isMultiline)(res.message)) res.message.split("\n").slice(1, -1).forEach((line) => { + const entry = line.trim().split(" "); + features.set(entry[0], entry[1] || ""); + }); return features; } /** @@ -185182,21 +167109,17 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { */ async lastMod(path) { const validPath = await this.protectWhitespace(path); - const res = await this.send(`MDTM ${validPath}`); - const date = res.message.slice(4); + const date = (await this.send(`MDTM ${validPath}`)).message.slice(4); return (0, parseListMLSD_1.parseMLSxDate)(date); } /** * Get the size of a file. */ async size(path) { - const validPath = await this.protectWhitespace(path); - const command = `SIZE ${validPath}`; + const command = `SIZE ${await this.protectWhitespace(path)}`; const res = await this.send(command); const size = parseInt(res.message.slice(4), 10); - if (Number.isNaN(size)) { - throw new Error(`Can't parse response to command '${command}' as a numerical value: ${res.message}`); - } + if (Number.isNaN(size)) throw new Error(`Can't parse response to command '${command}' as a numerical value: ${res.message}`); return size; } /** @@ -185219,9 +167142,7 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { */ async remove(path, ignoreErrorCodes = false) { const validPath = await this.protectWhitespace(path); - if (ignoreErrorCodes) { - return this.sendIgnoringError(`DELE ${validPath}`); - } + if (ignoreErrorCodes) return this.sendIgnoringError(`DELE ${validPath}`); return this.send(`DELE ${validPath}`); } /** @@ -185259,9 +167180,7 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { * @protected */ async _uploadWithCommand(source, remotePath, command, options) { - if (typeof source === "string") { - return this._uploadLocalFile(source, remotePath, command, options); - } + if (typeof source === "string") return this._uploadLocalFile(source, remotePath, command, options); return this._uploadFromStream(source, remotePath, command); } /** @@ -185315,9 +167234,7 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { * @param startAt Position within the remote file to start downloading at. If the destination is a file, this offset is also applied to it. */ async downloadTo(destination, fromRemotePath, startAt = 0) { - if (typeof destination === "string") { - return this._downloadToFile(destination, fromRemotePath, startAt); - } + if (typeof destination === "string") return this._downloadToFile(destination, fromRemotePath, startAt); return this._downloadToStream(destination, fromRemotePath, startAt); } /** @@ -185325,8 +167242,7 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { */ async _downloadToFile(localPath, remotePath, startAt) { const appendingToLocalFile = startAt > 0; - const fileSystemFlags = appendingToLocalFile ? "r+" : "w"; - const fd = await fsOpen(localPath, fileSystemFlags); + const fd = await fsOpen(localPath, appendingToLocalFile ? "r+" : "w"); const destination = (0, fs_1.createWriteStream)("", { fd, start: startAt, @@ -185337,10 +167253,7 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { } catch (err) { const localFileStats = await ignoreError(() => fsStat(localPath)); const hasDownloadedData = localFileStats && localFileStats.size > 0; - const shouldRemoveLocalFile = !appendingToLocalFile && !hasDownloadedData; - if (shouldRemoveLocalFile) { - await ignoreError(() => fsUnlink(localPath)); - } + if (!appendingToLocalFile && !hasDownloadedData) await ignoreError(() => fsUnlink(localPath)); throw err; } finally { await ignoreError(() => fsClose(fd)); @@ -185383,10 +167296,7 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { this.availableListCommands = [candidate]; return parsedList; } catch (err) { - const shouldTryNext = err instanceof FtpContext_1.FTPError; - if (!shouldTryNext) { - throw err; - } + if (!(err instanceof FtpContext_1.FTPError)) throw err; lastError = err; } } @@ -185422,8 +167332,7 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { await this.cd(remoteDirPath); const absoluteDirPath = await this.pwd(); await this.clearWorkingDir(); - const dirIsRoot = absoluteDirPath === "/"; - if (!dirIsRoot) { + if (!(absoluteDirPath === "/")) { await this.cdup(); await this.removeEmptyDir(absoluteDirPath); } @@ -185434,16 +167343,12 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { * the working directory itself. */ async clearWorkingDir() { - for (const file of await this.list()) { - if (file.isDirectory) { - await this.cd(file.name); - await this.clearWorkingDir(); - await this.cdup(); - await this.removeEmptyDir(file.name); - } else { - await this.remove(file.name); - } - } + for (const file of await this.list()) if (file.isDirectory) { + await this.cd(file.name); + await this.clearWorkingDir(); + await this.cdup(); + await this.removeEmptyDir(file.name); + } else await this.remove(file.name); } /** * Upload the contents of a local directory to the remote working directory. @@ -185459,9 +167364,7 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { */ async uploadFromDir(localDirPath, remoteDirPath) { return this._exitAtCurrentDirectory(async () => { - if (remoteDirPath) { - await this.ensureDir(remoteDirPath); - } + if (remoteDirPath) await this.ensureDir(remoteDirPath); return await this._uploadToWorkingDir(localDirPath); }); } @@ -185473,9 +167376,8 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { for (const file of files) { const fullPath = (0, path_1.join)(localDirPath, file); const stats = await fsStat(fullPath); - if (stats.isFile()) { - await this.uploadFrom(fullPath, file); - } else if (stats.isDirectory()) { + if (stats.isFile()) await this.uploadFrom(fullPath, file); + else if (stats.isDirectory()) { await this._openDir(file); await this._uploadToWorkingDir(fullPath); await this.cdup(); @@ -185490,9 +167392,7 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { */ async downloadToDir(localDirPath, remoteDirPath) { return this._exitAtCurrentDirectory(async () => { - if (remoteDirPath) { - await this.cd(remoteDirPath); - } + if (remoteDirPath) await this.cd(remoteDirPath); return await this._downloadFromWorkingDir(localDirPath); }); } @@ -185507,9 +167407,7 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { await this.cd(file.name); await this._downloadFromWorkingDir(localPath); await this.cdup(); - } else if (file.isFile) { - await this.downloadTo(localPath, file.name); - } + } else if (file.isFile) await this.downloadTo(localPath, file.name); } } /** @@ -185517,13 +167415,9 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { * This function also changes the current working directory to the given path. */ async ensureDir(remoteDirPath) { - if (remoteDirPath.startsWith("/")) { - await this.cd("/"); - } + if (remoteDirPath.startsWith("/")) await this.cd("/"); const names = remoteDirPath.split("/").filter((name) => name !== ""); - for (const name of names) { - await this._openDir(name); - } + for (const name of names) await this._openDir(name); } /** * Try to create a directory and enter it. This will not raise an exception if the directory @@ -185546,21 +167440,16 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { * a given path to fix that issue for most cases. */ async protectWhitespace(path) { - if (!path.startsWith(" ")) { - return path; - } + if (!path.startsWith(" ")) return path; const pwd = await this.pwd(); - const absolutePathPrefix = pwd.endsWith("/") ? pwd : pwd + "/"; - return absolutePathPrefix + path; + return (pwd.endsWith("/") ? pwd : pwd + "/") + path; } async _exitAtCurrentDirectory(func) { const userDir = await this.pwd(); try { return await func(); } finally { - if (!this.closed) { - await ignoreError(() => this.cd(userDir)); - } + if (!this.closed) await ignoreError(() => this.cd(userDir)); } } /** @@ -185572,16 +167461,14 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { _enterFirstCompatibleMode(strategies) { return async (ftp) => { ftp.log("Trying to find optimal transfer strategy..."); - let lastError = undefined; - for (const strategy of strategies) { - try { - const res = await strategy(ftp); - ftp.log("Optimal transfer strategy found."); - this.prepareTransfer = strategy; - return res; - } catch (err) { - lastError = err; - } + let lastError = void 0; + for (const strategy of strategies) try { + const res = await strategy(ftp); + ftp.log("Optimal transfer strategy found."); + this.prepareTransfer = strategy; + return res; + } catch (err) { + lastError = err; } throw new Error(`None of the available transfer strategies work. Last error response was '${lastError}'.`); }; @@ -185639,34 +167526,30 @@ var require_Client = /* @__PURE__ */ __commonJSMin(((exports) => { try { return await func(); } catch (err) { - return undefined; + return; } } })); - //#endregion //#region ../node_modules/basic-ftp/dist/StringEncoding.js var require_StringEncoding = /* @__PURE__ */ __commonJSMin(((exports) => { Object.defineProperty(exports, "__esModule", { value: true }); })); - //#endregion //#region ../node_modules/basic-ftp/dist/index.js var require_dist = /* @__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; 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]; - } - }; - } + 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; + if (k2 === void 0) k2 = k; o[k2] = m[k]; })); var __exportStar = exports && exports.__exportStar || function(m, exports$1) { @@ -185696,7 +167579,6 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => { } }); })); - //#endregion //#region ../utils/ftp.js var import_dist = require_dist(); @@ -185740,12 +167622,8 @@ var FTPClient = class { * @returns {Promise} 连接是否成功 */ async connect() { - if (this.isConnected && this.client) { - return true; - } - if (this.connectionPromise) { - return await this.connectionPromise; - } + if (this.isConnected && this.client) return true; + if (this.connectionPromise) return await this.connectionPromise; this.connectionPromise = this._doConnect(); return await this.connectionPromise; } @@ -185756,9 +167634,7 @@ var FTPClient = class { async _doConnect() { try { this.client = new import_dist.Client(this.config.timeout); - if (this.config.verbose) { - this.client.ftp.verbose = true; - } + if (this.config.verbose) this.client.ftp.verbose = true; await this.client.access({ host: this.config.host, port: this.config.port, @@ -185767,9 +167643,7 @@ var FTPClient = class { secure: this.config.secure, secureOptions: this.config.secureOptions }); - if (this.config.pasv) { - this.client.ftp.ipFamily = 4; - } + if (this.config.pasv) this.client.ftp.ipFamily = 4; this.isConnected = true; this.connectionPromise = null; return true; @@ -185802,8 +167676,7 @@ var FTPClient = class { */ async testConnection() { try { - const connected = await this.connect(); - if (connected) { + if (await this.connect()) { await this.client.pwd(); return true; } @@ -185818,9 +167691,7 @@ var FTPClient = class { * @private */ async _ensureConnected() { - if (!this.isConnected) { - await this.connect(); - } + if (!this.isConnected) await this.connect(); } /** * 将操作添加到队列中执行,确保同一时间只有一个操作 @@ -185841,15 +167712,12 @@ var FTPClient = class { * 处理请求队列 */ async _processQueue() { - if (this.isProcessingQueue || this.requestQueue.length === 0) { - return; - } + if (this.isProcessingQueue || this.requestQueue.length === 0) return; this.isProcessingQueue = true; while (this.requestQueue.length > 0) { const { operation, resolve, reject } = this.requestQueue.shift(); try { - const result = await operation(); - resolve(result); + resolve(await operation()); } catch (error) { reject(error); } @@ -185866,8 +167734,7 @@ var FTPClient = class { try { await this._ensureConnected(); const fullPath = this._getFullPath(remotePath); - const fileList = await this.client.list(fullPath); - return fileList.map((item) => ({ + return (await this.client.list(fullPath)).map((item) => ({ name: item.name, path: this._joinPath(remotePath, item.name), isDirectory: item.isDirectory, @@ -185898,11 +167765,8 @@ var FTPClient = class { const fullPath = this._getFullPath(remotePath); const parentPath = path.dirname(fullPath); const fileName = path.basename(fullPath); - const fileList = await this.client.list(parentPath === "." ? "/" : parentPath); - const item = fileList.find((file) => file.name === fileName); - if (!item) { - throw new Error(`Resource not found: ${remotePath}`); - } + const item = (await this.client.list(parentPath === "." ? "/" : parentPath)).find((file) => file.name === fileName); + if (!item) throw new Error(`Resource not found: ${remotePath}`); return { name: item.name, path: remotePath, @@ -185918,9 +167782,7 @@ var FTPClient = class { creationDate: null }; } catch (error) { - if (error.message.includes("Resource not found")) { - throw error; - } + if (error.message.includes("Resource not found")) throw error; throw new Error(`Failed to get info for ${remotePath}: ${error.message}`); } }); @@ -185948,11 +167810,8 @@ var FTPClient = class { try { await this._ensureConnected(); const fullPath = this._getFullPath(remotePath); - if (recursive) { - await this.client.ensureDir(fullPath); - } else { - await this.client.send(`MKD ${fullPath}`); - } + if (recursive) await this.client.ensureDir(fullPath); + else await this.client.send(`MKD ${fullPath}`); return true; } catch (error) { throw new Error(`Failed to create directory ${remotePath}: ${error.message}`); @@ -185972,29 +167831,19 @@ var FTPClient = class { try { await this._ensureConnected(); const fullPath = this._getFullPath(remotePath); - if (!overwrite && await this.exists(remotePath)) { - throw new Error(`File ${remotePath} already exists and overwrite is disabled`); - } + if (!overwrite && await this.exists(remotePath)) throw new Error(`File ${remotePath} already exists and overwrite is disabled`); let sourceStream; - if (typeof source === "string") { - sourceStream = createReadStream(source); - } else if (Buffer.isBuffer(source)) { - sourceStream = Readable.from(source); - } else { - sourceStream = source; - } - if (onProgress) { - this.client.trackProgress((info) => { - onProgress({ - loaded: info.bytes, - total: info.bytesOverall || 0 - }); + if (typeof source === "string") sourceStream = createReadStream(source); + else if (Buffer.isBuffer(source)) sourceStream = Readable.from(source); + else sourceStream = source; + if (onProgress) this.client.trackProgress((info) => { + onProgress({ + loaded: info.bytes, + total: info.bytesOverall || 0 }); - } + }); await this.client.uploadFrom(sourceStream, fullPath); - if (onProgress) { - this.client.trackProgress(); - } + if (onProgress) this.client.trackProgress(); return true; } catch (error) { throw new Error(`Failed to upload file to ${remotePath}: ${error.message}`); @@ -186013,20 +167862,16 @@ var FTPClient = class { try { await this._ensureConnected(); const fullPath = this._getFullPath(remotePath); - if (onProgress) { - this.client.trackProgress((info) => { - onProgress({ - loaded: info.bytes, - total: info.bytesOverall || 0 - }); + if (onProgress) this.client.trackProgress((info) => { + onProgress({ + loaded: info.bytes, + total: info.bytesOverall || 0 }); - } + }); if (localPath) { const writeStream = createWriteStream(localPath); await this.client.downloadTo(writeStream, fullPath); - if (onProgress) { - this.client.trackProgress(); - } + if (onProgress) this.client.trackProgress(); return true; } else { const chunks = []; @@ -186035,9 +167880,7 @@ var FTPClient = class { callback(); } }); await this.client.downloadTo(writeStream, fullPath); - if (onProgress) { - this.client.trackProgress(); - } + if (onProgress) this.client.trackProgress(); return Buffer.concat(chunks); } } catch (error) { @@ -186057,14 +167900,9 @@ var FTPClient = class { const fullPath = this._getFullPath(remotePath); const parentPath = path.dirname(fullPath); const fileName = path.basename(fullPath); - const fileList = await this.client.list(parentPath === "." ? "/" : parentPath); - const item = fileList.find((file) => file.name === fileName); - if (!item) { - throw new Error(`Resource not found: ${remotePath}`); - } - if (item.isDirectory) { - throw new Error(`File not found or is a directory: ${remotePath}`); - } + const item = (await this.client.list(parentPath === "." ? "/" : parentPath)).find((file) => file.name === fileName); + if (!item) throw new Error(`Resource not found: ${remotePath}`); + if (item.isDirectory) throw new Error(`File not found or is a directory: ${remotePath}`); const fileInfo = { name: item.name, path: remotePath, @@ -186092,36 +167930,28 @@ var FTPClient = class { let bytesToRead = end - start + 1; const writeStream = new Writable({ write(chunk, encoding, callback) { if (isRangeRequest) { - if (bytesToSkip > 0) { - if (chunk.length <= bytesToSkip) { - bytesToSkip -= chunk.length; - callback(); - return; - } else { - chunk = chunk.slice(bytesToSkip); - bytesToSkip = 0; - } + if (bytesToSkip > 0) if (chunk.length <= bytesToSkip) { + bytesToSkip -= chunk.length; + callback(); + return; + } else { + chunk = chunk.slice(bytesToSkip); + bytesToSkip = 0; } if (bytesToRead <= 0) { callback(); return; } - if (chunk.length > bytesToRead) { - chunk = chunk.slice(0, bytesToRead); - } + if (chunk.length > bytesToRead) chunk = chunk.slice(0, bytesToRead); bytesToRead -= chunk.length; } stream.push(chunk); bytesReceived += chunk.length; callback(); - if (isRangeRequest && bytesToRead <= 0) { - stream.push(null); - } + if (isRangeRequest && bytesToRead <= 0) stream.push(null); } }); writeStream.on("finish", () => { - if (!isRangeRequest || bytesToRead > 0) { - stream.push(null); - } + if (!isRangeRequest || bytesToRead > 0) stream.push(null); }); writeStream.on("error", (error) => { stream.destroy(error); @@ -186135,7 +167965,7 @@ var FTPClient = class { headers: { "content-type": fileInfo.contentType || "application/octet-stream", "content-length": contentLength.toString(), - "last-modified": fileInfo.lastModified || new Date().toISOString(), + "last-modified": fileInfo.lastModified || (/* @__PURE__ */ new Date()).toISOString(), "cache-control": "public, max-age=3600", ...isRangeRequest && { "content-range": `bytes ${start}-${end}/${fileInfo.size}`, @@ -186165,12 +167995,8 @@ var FTPClient = class { try { await this._ensureConnected(); const fullPath = this._getFullPath(remotePath); - const info = await this.getInfo(remotePath); - if (info.isDirectory) { - await this.client.removeDir(fullPath); - } else { - await this.client.remove(fullPath); - } + if ((await this.getInfo(remotePath)).isDirectory) await this.client.removeDir(fullPath); + else await this.client.remove(fullPath); return true; } catch (error) { throw new Error(`Failed to delete ${remotePath}: ${error.message}`); @@ -186188,9 +168014,7 @@ var FTPClient = class { await this._ensureConnected(); const fullSourcePath = this._getFullPath(sourcePath); const fullDestinationPath = this._getFullPath(destinationPath); - if (!overwrite && await this.exists(destinationPath)) { - throw new Error(`Destination ${destinationPath} already exists and overwrite is disabled`); - } + if (!overwrite && await this.exists(destinationPath)) throw new Error(`Destination ${destinationPath} already exists and overwrite is disabled`); await this.client.rename(fullSourcePath, fullDestinationPath); return true; } catch (error) { @@ -186208,12 +168032,8 @@ var FTPClient = class { try { await this._ensureConnected(); const sourceInfo = await this.getInfo(sourcePath); - if (!sourceInfo) { - throw new Error(`Source file does not exist: ${sourcePath}`); - } - if (!overwrite && await this.exists(destinationPath)) { - throw new Error(`Destination ${destinationPath} already exists and overwrite is disabled`); - } + if (!sourceInfo) throw new Error(`Source file does not exist: ${sourcePath}`); + if (!overwrite && await this.exists(destinationPath)) throw new Error(`Destination ${destinationPath} already exists and overwrite is disabled`); if (sourceInfo.isDirectory) { await this.createDirectory(destinationPath, true); const files = await this.listDirectory(sourcePath); @@ -186239,8 +168059,7 @@ var FTPClient = class { */ async getFileContent(remotePath, encoding = "utf8") { try { - const buffer = await this.downloadFile(remotePath); - return buffer.toString(encoding); + return (await this.downloadFile(remotePath)).toString(encoding); } catch (error) { throw new Error(`Failed to get file content ${remotePath}: ${error.message}`); } @@ -186268,22 +168087,14 @@ var FTPClient = class { */ _normalizePath(remotePath) { if (!remotePath) return "/"; - if (!remotePath.startsWith("/")) { - remotePath = "/" + remotePath; - } + if (!remotePath.startsWith("/")) remotePath = "/" + remotePath; remotePath = remotePath.replace(/\/+/g, "/"); let basePath = this.config.basePath || "/"; - if (!basePath.startsWith("/")) { - basePath = "/" + basePath; - } - if (!basePath.endsWith("/")) { - basePath = basePath + "/"; - } + if (!basePath.startsWith("/")) basePath = "/" + basePath; + if (!basePath.endsWith("/")) basePath = basePath + "/"; if (remotePath.startsWith(basePath)) { let relativePath = remotePath.substring(basePath.length); - if (!relativePath.startsWith("/")) { - relativePath = "/" + relativePath; - } + if (!relativePath.startsWith("/")) relativePath = "/" + relativePath; return relativePath || "/"; } return remotePath; @@ -186296,19 +168107,11 @@ var FTPClient = class { _getFullPath(remotePath) { const normalizedPath = this._normalizePath(remotePath); let basePath = this.config.basePath || "/"; - if (!basePath.startsWith("/")) { - basePath = "/" + basePath; - } - if (basePath !== "/" && basePath.endsWith("/")) { - basePath = basePath.slice(0, -1); - } - if (basePath === "/") { - return normalizedPath; - } + if (!basePath.startsWith("/")) basePath = "/" + basePath; + if (basePath !== "/" && basePath.endsWith("/")) basePath = basePath.slice(0, -1); + if (basePath === "/") return normalizedPath; const cleanPath = normalizedPath.startsWith("/") ? normalizedPath.substring(1) : normalizedPath; - if (!cleanPath || cleanPath === "/") { - return basePath; - } + if (!cleanPath || cleanPath === "/") return basePath; return basePath + "/" + cleanPath; } /** @@ -186319,17 +168122,11 @@ var FTPClient = class { _normalizeResponsePath(responsePath) { if (!responsePath) return ""; let basePath = this.config.basePath || "/"; - if (!basePath.startsWith("/")) { - basePath = "/" + basePath; - } - if (basePath !== "/" && basePath.endsWith("/")) { - basePath = basePath.slice(0, -1); - } + if (!basePath.startsWith("/")) basePath = "/" + basePath; + if (basePath !== "/" && basePath.endsWith("/")) basePath = basePath.slice(0, -1); if (responsePath.startsWith(basePath)) { let normalizedPath = responsePath.substring(basePath.length); - if (!normalizedPath.startsWith("/")) { - normalizedPath = "/" + normalizedPath; - } + if (!normalizedPath.startsWith("/")) normalizedPath = "/" + normalizedPath; return normalizedPath; } return responsePath; @@ -186340,11 +168137,8 @@ var FTPClient = class { */ _joinPath(basePath, fileName) { const normalized = this._normalizePath(basePath); - if (normalized === "/") { - return "/" + fileName; - } - const separator = normalized.endsWith("/") ? "" : "/"; - return normalized + separator + fileName; + if (normalized === "/") return "/" + fileName; + return normalized + (normalized.endsWith("/") ? "" : "/") + fileName; } /** * 根据文件扩展名获取内容类型 @@ -186352,7 +168146,7 @@ var FTPClient = class { */ _getContentType(filePath) { const ext = path.extname(filePath).toLowerCase(); - const mimeTypes = { + return { ".txt": "text/plain", ".html": "text/html", ".htm": "text/html", @@ -186389,8 +168183,7 @@ var FTPClient = class { ".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", ".ppt": "application/vnd.ms-powerpoint", ".pptx": "application/vnd.openxmlformats-officedocument.presentationml.presentation" - }; - return mimeTypes[ext] || "application/octet-stream"; + }[ext] || "application/octet-stream"; } }; /** @@ -186401,7 +168194,6 @@ var FTPClient = class { function createFTPClient(config) { return new FTPClient(config); } - //#endregion //#region ../utils/mime-type.js var import_mime_types = /* @__PURE__ */ __toESM(require_mime_types(), 1); @@ -186411,8 +168203,7 @@ var import_mime_types = /* @__PURE__ */ __toESM(require_mime_types(), 1); * @returns {string} - Content-Type 或 'unknown' */ function getContentType(filePath) { - const extension = path.extname(filePath); - return getMimeType(extension); + return getMimeType(path.extname(filePath)); } /** * 根据扩展名返回 MIME 类型 @@ -186422,10 +168213,8 @@ function getContentType(filePath) { function getMimeType(ext) { const mimeType = import_mime_types.lookup(ext); const isUtf8Type = mimeType && mimeType.includes("text") || ext.includes(".js"); - const extInfo = mimeType && isUtf8Type ? "; charset=utf-8" : ""; - return (mimeType || "application/octet-stream") + extInfo; + return (mimeType || "application/octet-stream") + (mimeType && isUtf8Type ? "; charset=utf-8" : ""); } - //#endregion //#region ../utils/sites-map.js /** @@ -186435,7 +168224,7 @@ function getMimeType(ext) { */ const __dirname$6 = path.dirname(fileURLToPath(import.meta.url)); const _config_path$2 = path.join(__dirname$6, "../config"); -const sitesMapCache = new Map(); +const sitesMapCache = /* @__PURE__ */ new Map(); /** * 计算字符串的MD5哈希值 * @param {string} content - 要计算哈希的字符串内容 @@ -186449,11 +168238,8 @@ function getContentHash(content) { * @param {string} configDir - 可选,指定要清除的配置目录缓存,不传则清除所有缓存 */ function clearSitesMapCache(configDir = null) { - if (configDir) { - sitesMapCache.delete(configDir); - } else { - sitesMapCache.clear(); - } + if (configDir) sitesMapCache.delete(configDir); + else sitesMapCache.clear(); } /** * 将查询字符串解析为对象 @@ -186465,9 +168251,7 @@ function clearSitesMapCache(configDir = null) { function getQueryObj(query) { const searchParams = new URLSearchParams(query); const queryObject = {}; - for (const [key, value] of searchParams.entries()) { - queryObject[key] = value; - } + for (const [key, value] of searchParams.entries()) queryObject[key] = value; return queryObject; } /** @@ -186482,39 +168266,31 @@ function getSitesMap(configDir = _config_path$2) { let SitesMap = {}; let SitesMapPath = path.join(configDir, "./map.txt"); let splitStr = "@@"; - if (existsSync(SitesMapPath)) { - try { - let SitesMapText = readFileSync(SitesMapPath, "utf-8"); - const contentHash = getContentHash(SitesMapText); - const cacheKey = configDir; - const cachedData = sitesMapCache.get(cacheKey); - if (cachedData && cachedData.hash === contentHash) { - return cachedData.data; - } - let SitesMapLines = SitesMapText.split("\n").filter((it) => it); - SitesMapLines.forEach((line) => { - let SitesMapKey = line.split(splitStr)[0].trim(); - if (!SitesMap.hasOwnProperty(SitesMapKey)) { - SitesMap[SitesMapKey] = []; - } - let SitesMapQuery = line.split(splitStr)[1].trim(); - let SitesMapAlias = line.split(splitStr).length > 2 ? line.split(splitStr)[2].trim() : SitesMapKey; - SitesMap[SitesMapKey].push({ - alias: SitesMapAlias, - queryStr: SitesMapQuery, - queryObject: getQueryObj(SitesMapQuery) - }); - }); - sitesMapCache.set(cacheKey, { - hash: contentHash, - data: SitesMap + if (existsSync(SitesMapPath)) try { + let SitesMapText = readFileSync(SitesMapPath, "utf-8"); + const contentHash = getContentHash(SitesMapText); + const cacheKey = configDir; + const cachedData = sitesMapCache.get(cacheKey); + if (cachedData && cachedData.hash === contentHash) return cachedData.data; + SitesMapText.split("\n").filter((it) => it).forEach((line) => { + let SitesMapKey = line.split(splitStr)[0].trim(); + if (!SitesMap.hasOwnProperty(SitesMapKey)) SitesMap[SitesMapKey] = []; + let SitesMapQuery = line.split(splitStr)[1].trim(); + let SitesMapAlias = line.split(splitStr).length > 2 ? line.split(splitStr)[2].trim() : SitesMapKey; + SitesMap[SitesMapKey].push({ + alias: SitesMapAlias, + queryStr: SitesMapQuery, + queryObject: getQueryObj(SitesMapQuery) }); - return SitesMap; - } catch (e) {} - } + }); + sitesMapCache.set(cacheKey, { + hash: contentHash, + data: SitesMap + }); + return SitesMap; + } catch (e) {} return SitesMap; } - //#endregion //#region ../utils/file.js /** @@ -186583,9 +168359,7 @@ const pathLib = { } try { const dirPath = path.dirname(resolvedPath); - if (!existsSync(dirPath)) { - mkdirSync(dirPath, { recursive: true }); - } + if (!existsSync(dirPath)) mkdirSync(dirPath, { recursive: true }); writeFileSync(resolvedPath, text, "utf8"); return true; } catch (e) { @@ -186622,8 +168396,7 @@ function getParsesDict(host) { const jx_conf = path.join(__dirname, "../config/parses.conf"); let jx_list = []; if (existsSync(jx_conf)) { - const jx_conf_text = readFileSync(jx_conf, "utf-8"); - let jx_conf_content = jx_conf_text.trim(); + let jx_conf_content = readFileSync(jx_conf, "utf-8").trim(); let hostName = host; try { const raw = String(host || ""); @@ -186641,8 +168414,7 @@ function getParsesDict(host) { hostName }; jx_conf_content = jinja.render(jx_conf_content, var_dict); - const jxs = jx_conf_content.split("\n").filter((it) => it.trim() && !it.trim().startsWith("#")).map((it) => it.trim()); - jxs.forEach((jx) => { + jx_conf_content.split("\n").filter((it) => it.trim() && !it.trim().startsWith("#")).map((it) => it.trim()).forEach((jx) => { let jx_arr = jx.split(","); let jx_name = jx_arr[0]; let jx_url = jx_arr[1]; @@ -186655,9 +168427,7 @@ function getParsesDict(host) { "type": jx_type, "header": { "User-Agent": jx_ua } }; - if (jx_flag) { - jx_obj.ext = { "flag": jx_flag.split("|") }; - } + if (jx_flag) jx_obj.ext = { "flag": jx_flag.split("|") }; jx_list.push(jx_obj); }); } @@ -186672,16 +168442,11 @@ function getParsesDict(host) { * @returns {Array} [flag, url] - flag为true表示找到解析文件,false表示未找到 */ function executeParse(name, host, url) { - let _file_path = path.join(_jx_path, name + ".js"); - if (existsSync(_file_path)) { - return [true, host + "/parse/" + name + "?url=" + url]; - } else { - return [false, url]; - } + if (existsSync(path.join(_jx_path, name + ".js"))) return [true, host + "/parse/" + name + "?url=" + url]; + else return [false, url]; } globalThis.pathLib = pathLib; globalThis.executeParse = executeParse; - //#endregion //#region ../node_modules/pinyin/lib/cjs/pinyin.js var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -386023,9 +367788,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { ] }; function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } + if (!(instance instanceof Constructor)) throw new TypeError("Cannot call a class as a function"); } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { @@ -386042,22 +367805,17 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { return Constructor; } 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; } function _inherits(subClass, superClass) { - if (typeof superClass !== "function" && superClass !== null) { - throw new TypeError("Super expression must either be null or a function"); - } + if (typeof superClass !== "function" && superClass !== null) throw new TypeError("Super expression must either be null or a function"); subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, @@ -386079,15 +367837,11 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { return _setPrototypeOf(o, p); } function _assertThisInitialized(self) { - if (self === void 0) { - throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); - } + if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return self; } function _possibleConstructorReturn(self, call) { - if (call && (typeof call === "object" || typeof call === "function")) { - return call; - } + if (call && (typeof call === "object" || typeof call === "function")) return call; return _assertThisInitialized(self); } function _toConsumableArray(arr) { @@ -386162,9 +367916,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { _createClass(Tokenizer, [{ key: "split", value: function split(text, modules) { - if (modules.length < 1) { - throw Error("No tokenizer module!"); - } + if (modules.length < 1) throw Error("No tokenizer module!"); var result = [{ w: text }]; modules.forEach(function(module$4) { result = module$4.split(result); @@ -386211,27 +367963,23 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { var _this = this; _classCallCheck(this, Segment); _defineProperty(this, "use", function(Module) { - if (Array.isArray(Module)) { - Module.forEach(_this.use); + if (Array.isArray(Module)) Module.forEach(_this.use); + else if (typeof Module.init === "function") { + Module.init(_this); + _this.modules[Module.type].push(Module); } else { - if (typeof Module.init === "function") { - Module.init(_this); - _this.modules[Module.type].push(Module); - } else { - var module$6 = new Module(_this); - _this.modules[module$6.type].push(module$6); - } + var module$6 = new Module(_this); + _this.modules[module$6.type].push(module$6); } return _this; }); _defineProperty(this, "loadDict", function(dict) { - var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "TABLE"; - var convertToLower = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - if (Array.isArray(dict)) { - dict.forEach(function(d) { - return _this.loadDict(d); - }); - } else { + var type = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "TABLE"; + var convertToLower = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false; + if (Array.isArray(dict)) dict.forEach(function(d) { + return _this.loadDict(d); + }); + else { if (!_this.DICT[type]) _this.DICT[type] = {}; if (!_this.DICT["".concat(type, "2")]) _this.DICT["".concat(type, "2")] = {}; var TABLE = _this.DICT[type]; @@ -386262,11 +368010,10 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { return _this.DICT[type]; }); _defineProperty(this, "loadSynonymDict", function(dict) { - if (Array.isArray(dict)) { - dict.forEach(function(d) { - return _this.loadSynonymDict(d); - }); - } else { + if (Array.isArray(dict)) dict.forEach(function(d) { + return _this.loadSynonymDict(d); + }); + else { var type = "SYNONYM"; if (!_this.DICT[type]) _this.DICT[type] = {}; var TABLE = _this.DICT[type]; @@ -386277,29 +368024,24 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { var n1 = blocks[0].trim(); var n2 = blocks[1].trim(); TABLE[n1] = n2; - if (TABLE[n2] === n1) { - delete TABLE[n2]; - } + if (TABLE[n2] === n1) delete TABLE[n2]; } }); } return _this; }); _defineProperty(this, "loadStopwordDict", function(dict) { - if (Array.isArray(dict)) { - dict.forEach(function(d) { - return _this.loadStopwordDict(d); - }); - } else { + if (Array.isArray(dict)) dict.forEach(function(d) { + return _this.loadStopwordDict(d); + }); + else { var type = "STOPWORD"; if (!_this.DICT[type]) _this.DICT[type] = {}; var TABLE = _this.DICT[type]; dict.split(/\r?\n/).map(function(line) { return line.trim(); }).forEach(function(line) { - if (line) { - TABLE[line] = true; - } + if (line) TABLE[line] = true; }); } return _this; @@ -386315,11 +368057,9 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { sret = me.optimizer.doOptimize(sret, me.modules.optimizer); if (sret.length > 0) ret = ret.concat(sret); }); - if (options.stripPunctuation) { - ret = ret.filter(function(item) { - return item.p !== POSTAG.D_W; - }); - } + if (options.stripPunctuation) ret = ret.filter(function(item) { + return item.p !== POSTAG.D_W; + }); function convertSynonym(list) { var count = 0; var TABLE = me.getDict("SYNONYM"); @@ -386338,23 +368078,19 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { list }; } - if (options.convertSynonym) { - do { - var result = convertSynonym(ret); - ret = result.list; - } while (result.count > 0); - } + if (options.convertSynonym) do { + var result = convertSynonym(ret); + ret = result.list; + } while (result.count > 0); if (options.stripStopword) { var STOPWORD = me.getDict("STOPWORD"); ret = ret.filter(function(item) { return !(item.w in STOPWORD); }); } - if (options.simple) { - ret = ret.map(function(item) { - return item.w; - }); - } + if (options.simple) ret = ret.map(function(item) { + return item.w; + }); return ret; }); this.POSTAG = POSTAG; @@ -386388,19 +368124,13 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { var lasti = 0; var i = 0; var f = typeof s === "string" ? "w" : "p"; - while (i < words.length) { - if (words[i][f] === s) { - if (lasti < i) ret.push(words.slice(lasti, i)); - ret.push(words.slice(i, i + 1)); - i++; - lasti = i; - } else { - i++; - } - } - if (lasti < words.length - 1) { - ret.push(words.slice(lasti, words.length)); - } + while (i < words.length) if (words[i][f] === s) { + if (lasti < i) ret.push(words.slice(lasti, i)); + ret.push(words.slice(i, i + 1)); + i++; + lasti = i; + } else i++; + if (lasti < words.length - 1) ret.push(words.slice(lasti, words.length)); return ret; } }, @@ -386430,9 +368160,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { var _getPrototypeOf2; var _this; _classCallCheck(this, Tokenizer); - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key]; _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(Tokenizer)).call.apply(_getPrototypeOf2, [this].concat(args))); _defineProperty(_assertThisInitialized(_this), "type", "tokenizer"); return _this; @@ -386445,16 +368173,54 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { var _getPrototypeOf3; var _this2; _classCallCheck(this, Optimizer); - for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { - args[_key2] = arguments[_key2]; - } + for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) args[_key2] = arguments[_key2]; _this2 = _possibleConstructorReturn(this, (_getPrototypeOf3 = _getPrototypeOf(Optimizer)).call.apply(_getPrototypeOf3, [this].concat(args))); _defineProperty(_assertThisInitialized(_this2), "type", "optimizer"); return _this2; } return Optimizer; }(Module); - var COLOR_WITH_RGB = [ + var colors = [ + "赤", + "朱", + "丹", + "绯", + "彤", + "绛", + "茜", + "纁", + "赭", + "栗", + "褐", + "驼", + "赭", + "橘", + "曙", + "翠", + "碧", + "金", + "米", + "缃", + "靛", + "紫", + "藕", + "桃", + "青", + "玄", + "皂", + "乌", + "墨", + "黛", + "黝", + "素", + "杏", + "缟", + "鹤", + "皓", + "苍", + "华", + "银" + ].concat(_toConsumableArray([ [ "薰衣草紫红", "#fff0f5", @@ -389955,48 +371721,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { "#404040", "64,64,64" ] - ]; - var colors = [ - "赤", - "朱", - "丹", - "绯", - "彤", - "绛", - "茜", - "纁", - "赭", - "栗", - "褐", - "驼", - "赭", - "橘", - "曙", - "翠", - "碧", - "金", - "米", - "缃", - "靛", - "紫", - "藕", - "桃", - "青", - "玄", - "皂", - "乌", - "墨", - "黛", - "黝", - "素", - "杏", - "缟", - "鹤", - "皓", - "苍", - "华", - "银" - ].concat(_toConsumableArray(COLOR_WITH_RGB.map(function(item) { + ].map(function(item) { return item[0]; }))); var AdjectiveOptimizer = /* @__PURE__ */ function(_Optimizer) { @@ -390014,12 +371739,8 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { var word = words[index]; var nextword = words[index + 1]; if (nextword) { - if (nextword.p === POSTAG.D_U && colors.includes(word.w)) { - word.p = POSTAG.D_A; - } - if (word.p === POSTAG.D_N && this.isNominal(nextword.p) && colors.includes(word.w)) { - word.p = POSTAG.D_A; - } + if (nextword.p === POSTAG.D_U && colors.includes(word.w)) word.p = POSTAG.D_A; + if (word.p === POSTAG.D_N && this.isNominal(nextword.p) && colors.includes(word.w)) word.p = POSTAG.D_A; } index += 1; } @@ -390028,9 +371749,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { }, { key: "isNominal", value: function isNominal(pos) { - if (Array.isArray(pos)) { - return this.isNominal(pos[0]); - } + if (Array.isArray(pos)) return this.isNominal(pos[0]); var POSTAG = this.segment.POSTAG; return pos === POSTAG.D_N || pos === POSTAG.A_NT || pos === POSTAG.A_NX || pos === POSTAG.A_NZ || pos === POSTAG.A_NR || pos === POSTAG.A_NS || pos === POSTAG.URL; } @@ -390992,9 +372711,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { } var lastc = 0; for (var ui = 0, url; url = nameinfo[ui]; ui++) { - if (url.c > lastc) { - ret.push({ w: word.w.substr(lastc, url.c - lastc) }); - } + if (url.c > lastc) ret.push({ w: word.w.substr(lastc, url.c - lastc) }); ret.push({ w: url.w, p: POSTAG.A_NR @@ -391002,9 +372719,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { lastc = url.c + url.w.length; } var lastn = nameinfo[nameinfo.length - 1]; - if (lastn.c + lastn.w.length < word.w.length) { - ret.push({ w: word.w.substr(lastn.c + lastn.w.length) }); - } + if (lastn.c + lastn.w.length < word.w.length) ret.push({ w: word.w.substr(lastn.c + lastn.w.length) }); } return ret; } @@ -391020,25 +372735,18 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { if (f2 in FAMILY_NAME_2) { var n1 = text.charAt(startPosition + 2); var n2 = text.charAt(startPosition + 3); - if (n1 in DOUBLE_NAME_1 && n2 in DOUBLE_NAME_2) { - name = f2 + n1 + n2; - } else if (n1 in SINGLE_NAME) { - name = f2 + n1 + (n1 === n2 ? n2 : ""); - } + if (n1 in DOUBLE_NAME_1 && n2 in DOUBLE_NAME_2) name = f2 + n1 + n2; + else if (n1 in SINGLE_NAME) name = f2 + n1 + (n1 === n2 ? n2 : ""); } var f1 = text.charAt(startPosition); if (name === false && f1 in FAMILY_NAME_1) { var _n = text.charAt(startPosition + 1); var _n2 = text.charAt(startPosition + 2); - if (_n in DOUBLE_NAME_1 && _n2 in DOUBLE_NAME_2) { - name = f1 + _n + _n2; - } else if (_n in SINGLE_NAME) { - name = f1 + _n + (_n === _n2 ? _n2 : ""); - } + if (_n in DOUBLE_NAME_1 && _n2 in DOUBLE_NAME_2) name = f1 + _n + _n2; + else if (_n in SINGLE_NAME) name = f1 + _n + (_n === _n2 ? _n2 : ""); } - if (name === false) { - startPosition++; - } else { + if (name === false) startPosition++; + else { result.push({ w: name, c: startPosition @@ -391060,9 +372768,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { _createClass(DictOptimizer, [{ key: "doOptimize", value: function doOptimize(words, isNotFirst) { - if (typeof isNotFirst === "undefined") { - isNotFirst = false; - } + if (typeof isNotFirst === "undefined") isNotFirst = false; var TABLE = this.segment.getDict("TABLE"); var POSTAG = this.segment.POSTAG; var i = 0; @@ -391122,9 +372828,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { if ((w3.p & POSTAG.A_M) > 0) { w4w += w3.w; i2++; - } else { - break; - } + } else break; } words.splice(i, i2, { w: w1.w + w2.w + w4w, @@ -391142,9 +372846,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { }(Optimizer$1); var _EMAILCHAR = "!\"#$%&'*+-/0123456789=?@ABCDEFGHIJKLMNOPQRSTUVWXYZ^_`abcdefghijklmnopqrstuvwxyz{|}~.".split(""); var EMAILCHAR = {}; - for (var i in _EMAILCHAR) { - EMAILCHAR[_EMAILCHAR[i]] = 1; - } + for (var i in _EMAILCHAR) EMAILCHAR[_EMAILCHAR[i]] = 1; var EmailOptimizer = /* @__PURE__ */ function(_Optimizer) { _inherits(EmailOptimizer, _Optimizer); function EmailOptimizer() { @@ -391210,15 +372912,13 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { key: "toEmailAddress", value: function toEmailAddress(words) { var ret = words[0].w; - for (var i = 1, word; word = words[i]; i++) { - ret += word.w; - } + for (var i = 1, word; word = words[i]; i++) ret += word.w; return ret; } }]); return EmailOptimizer; }(Optimizer$1); - var _STOPWORD = " ,.;+-|/\\'\":?<>[]{}=!@#$%^&*()~`" + "。,、':∶;?‘’“”〝〞ˆˇ﹕︰﹔﹖﹑·¨….¸;!´?!~—ˉ|‖"〃`@﹫¡¿﹏﹋﹌︴々﹟#﹩$﹠&﹪%*﹡﹢﹦" + "﹤‐ ̄¯―﹨ˆ˜﹍﹎+=<­__-ˇ~﹉﹊()〈〉‹›﹛﹜『』〖〗[]《》〔〕{}「」【】︵︷︿︹︽_﹁﹃︻︶︸" + "﹀︺︾ˉ﹂﹄︼+-×÷﹢﹣±/=≈≡≠∧∨∑∏∪∩∈⊙⌒⊥∥∠∽≌<>≤≥≮≯∧∨√﹙﹚[]﹛﹜∫∮∝∞⊙∏" + "┌┬┐┏┳┓╒╤╕─│├┼┤┣╋┫╞╪╡━┃└┴┘┗┻┛╘╧╛┄┆┅┇╭─╮┏━┓╔╦╗┈┊│╳│┃┃╠╬╣┉┋╰─╯┗━┛" + "╚╩╝╲╱┞┟┠┡┢┦┧┨┩┪╉╊┭┮┯┰┱┲┵┶┷┸╇╈┹┺┽┾┿╀╁╂╃╄╅╆" + "○◇□△▽☆●◆■▲▼★♠♥♦♣☼☺◘♀√☻◙♂×▁▂▃▄▅▆▇█⊙◎۞卍卐╱╲▁▏↖↗↑←↔◤◥╲╱▔▕↙↘↓→↕◣◢∷▒░℡™"; + var _STOPWORD = " ,.;+-|/\\'\":?<>[]{}=!@#$%^&*()~`。,、':∶;?‘’“”〝〞ˆˇ﹕︰﹔﹖﹑·¨….¸;!´?!~—ˉ|‖"〃`@﹫¡¿﹏﹋﹌︴々﹟#﹩$﹠&﹪%*﹡﹢﹦﹤‐ ̄¯―﹨ˆ˜﹍﹎+=<­__-ˇ~﹉﹊()〈〉‹›﹛﹜『』〖〗[]《》〔〕{}「」【】︵︷︿︹︽_﹁﹃︻︶︸﹀︺︾ˉ﹂﹄︼+-×÷﹢﹣±/=≈≡≠∧∨∑∏∪∩∈⊙⌒⊥∥∠∽≌<>≤≥≮≯∧∨√﹙﹚[]﹛﹜∫∮∝∞⊙∏┌┬┐┏┳┓╒╤╕─│├┼┤┣╋┫╞╪╡━┃└┴┘┗┻┛╘╧╛┄┆┅┇╭─╮┏━┓╔╦╗┈┊│╳│┃┃╠╬╣┉┋╰─╯┗━┛╚╩╝╲╱┞┟┠┡┢┦┧┨┩┪╉╊┭┮┯┰┱┲┵┶┷┸╇╈┹┺┽┾┿╀╁╂╃╄╅╆○◇□△▽☆●◆■▲▼★♠♥♦♣☼☺◘♀√☻◙♂×▁▂▃▄▅▆▇█⊙◎۞卍卐╱╲▁▏↖↗↑←↔◤◥╲╱▔▕↙↘↓→↕◣◢∷▒░℡™"; _STOPWORD = _STOPWORD.split(""); var STOPWORD = {}; var STOPWORD2 = {}; @@ -391252,21 +372952,15 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { } var lastc = 0; for (var ui = 0, sw; sw = stopinfo[ui]; ui++) { - if (sw.c > lastc) { - ret.push({ w: word.w.substr(lastc, sw.c - lastc) }); - } - if (sw.w != " ") { - ret.push({ - w: sw.w, - p: POSTAG.D_W - }); - } + if (sw.c > lastc) ret.push({ w: word.w.substr(lastc, sw.c - lastc) }); + if (sw.w != " ") ret.push({ + w: sw.w, + p: POSTAG.D_W + }); lastc = sw.c + sw.w.length; } var lastsw = stopinfo[stopinfo.length - 1]; - if (lastsw.c + lastsw.w.length < word.w.length) { - ret.push({ w: word.w.substr(lastsw.c + lastsw.w.length) }); - } + if (lastsw.c + lastsw.w.length < word.w.length) ret.push({ w: word.w.substr(lastsw.c + lastsw.w.length) }); } return ret; } @@ -391304,11 +372998,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { "telnet://" ]; var MIN_PROTOTAL_LEN = 100; - for (var i$2 in PROTOTAL) { - if (PROTOTAL[i$2].length < MIN_PROTOTAL_LEN) { - MIN_PROTOTAL_LEN = PROTOTAL[i$2].length; - } - } + for (var i$2 in PROTOTAL) if (PROTOTAL[i$2].length < MIN_PROTOTAL_LEN) MIN_PROTOTAL_LEN = PROTOTAL[i$2].length; var _URLCHAR = [ "a", "b", @@ -391401,9 +373091,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { "~" ]; var URLCHAR = {}; - for (var i$2 in _URLCHAR) { - URLCHAR[_URLCHAR[i$2]] = 1; - } + for (var i$2 in _URLCHAR) URLCHAR[_URLCHAR[i$2]] = 1; var URLTokenizer = /* @__PURE__ */ function(_Tokenizer) { _inherits(URLTokenizer, _Tokenizer); function URLTokenizer() { @@ -391427,9 +373115,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { } var lastc = 0; for (var ui = 0, url; url = urlinfo[ui]; ui++) { - if (url.c > lastc) { - ret.push({ w: word.w.substr(lastc, url.c - lastc) }); - } + if (url.c > lastc) ret.push({ w: word.w.substr(lastc, url.c - lastc) }); ret.push({ w: url.w, p: POSTAG.URL @@ -391437,9 +373123,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { lastc = url.c + url.w.length; } var lasturl = urlinfo[urlinfo.length - 1]; - if (lasturl.c + lasturl.w.length < word.w.length) { - ret.push({ w: word.w.substr(lasturl.c + lasturl.w.length) }); - } + if (lasturl.c + lasturl.w.length < word.w.length) ret.push({ w: word.w.substr(lasturl.c + lasturl.w.length) }); } return ret; } @@ -391451,12 +373135,10 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { var s = false; while (cur < text.length) { if (s === false && cur < text.length - MIN_PROTOTAL_LEN) { - for (var i = 0, prot; prot = PROTOTAL[i]; i++) { - if (text.substr(cur, prot.length) === prot) { - s = cur; - cur += prot.length - 1; - break; - } + for (var i = 0, prot; prot = PROTOTAL[i]; i++) if (text.substr(cur, prot.length) === prot) { + s = cur; + cur += prot.length - 1; + break; } } else if (s !== false && !(text.charAt(cur) in URLCHAR)) { ret.push({ @@ -391467,12 +373149,10 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { } cur++; } - if (s !== false) { - ret.push({ - w: text.substr(s, cur - s), - c: s - }); - } + if (s !== false) ret.push({ + w: text.substr(s, cur - s), + c: s + }); return ret; } }]); @@ -391516,23 +373196,18 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { p: POSTAG.A_NR }); var preword = words[i - 1]; - if (preword && (preword.w in FAMILY_NAME_1 || preword.w in FAMILY_NAME_2)) { - words.splice(i - 1, 2, { - w: preword.w + word.w + nextword.w, - p: POSTAG.A_NR - }); - } else { - i++; - } + if (preword && (preword.w in FAMILY_NAME_1 || preword.w in FAMILY_NAME_2)) words.splice(i - 1, 2, { + w: preword.w + word.w + nextword.w, + p: POSTAG.A_NR + }); + else i++; continue; } } - if ((word.w in FAMILY_NAME_1 || word.w in FAMILY_NAME_2) && (!word.p || !nextword.p)) { - words.splice(i, 2, { - w: word.w + nextword.w, - p: POSTAG.A_NR - }); - } + if ((word.w in FAMILY_NAME_1 || word.w in FAMILY_NAME_2) && (!word.p || !nextword.p)) words.splice(i, 2, { + w: word.w + nextword.w, + p: POSTAG.A_NR + }); } i++; } @@ -391576,9 +373251,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { "毫秒" ]; var DATETIME = {}; - for (var i$3 in DATETIME_WORDS) { - DATETIME[DATETIME_WORDS[i$3]] = DATETIME_WORDS[i$3].length; - } + for (var i$3 in DATETIME_WORDS) DATETIME[DATETIME_WORDS[i$3]] = DATETIME_WORDS[i$3].length; var DatetimeOptimizer = /* @__PURE__ */ function(_Optimizer) { _inherits(DatetimeOptimizer, _Optimizer); function DatetimeOptimizer() { @@ -391605,9 +373278,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { if (w1 && w2 && (w1.p & POSTAG.A_M) > 0 && w2.w in DATETIME) { len += 2; nw += w1.w + w2.w; - } else { - break; - } + } else break; } words.splice(i, len, { w: nw, @@ -391643,407 +373314,339 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { "毫秒" ]; var DATETIME$1 = {}; - for (var i$4 in _DATETIME) { - DATETIME$1[_DATETIME[i$4]] = _DATETIME[i$4].length; - } - /** - * 对未识别的单词进行分词 - * - * @param {array} words 单词数组 - * @return {array} - */ - var DictTokenizer = /* @__PURE__ */ function(_Tokenizer) { - _inherits(DictTokenizer, _Tokenizer); - function DictTokenizer() { - _classCallCheck(this, DictTokenizer); - return _possibleConstructorReturn(this, _getPrototypeOf(DictTokenizer).apply(this, arguments)); - } - _createClass(DictTokenizer, [ - { + for (var i$4 in _DATETIME) DATETIME$1[_DATETIME[i$4]] = _DATETIME[i$4].length; + var modules = [ + URLTokenizer, + /* @__PURE__ */ function(_Tokenizer) { + _inherits(WildcardTokenizer, _Tokenizer); + function WildcardTokenizer() { + _classCallCheck(this, WildcardTokenizer); + return _possibleConstructorReturn(this, _getPrototypeOf(WildcardTokenizer).apply(this, arguments)); + } + _createClass(WildcardTokenizer, [{ key: "split", value: function split(words) { this.segment.POSTAG; - var TABLE = this.segment.getDict("TABLE"); + var TABLE = this.segment.getDict("WILDCARD"); var ret = []; for (var i = 0, word; word = words[i]; i++) { if (word.p > 0) { ret.push(word); continue; } - var wordinfo = this.matchWord(word.w, 0, words[i - 1]); + var wordinfo = this.matchWord(word.w); if (wordinfo.length < 1) { ret.push(word); continue; } var lastc = 0; for (var ui = 0, bw; bw = wordinfo[ui]; ui++) { - if (bw.c > lastc) { - ret.push({ w: word.w.substr(lastc, bw.c - lastc) }); - } + if (bw.c > lastc) ret.push({ w: word.w.substr(lastc, bw.c - lastc) }); ret.push({ w: bw.w, - p: TABLE[bw.w].p + p: TABLE[bw.w.toLowerCase()].p }); lastc = bw.c + bw.w.length; } var lastword = wordinfo[wordinfo.length - 1]; - if (lastword.c + lastword.w.length < word.w.length) { - ret.push({ w: word.w.substr(lastword.c + lastword.w.length) }); - } + if (lastword.c + lastword.w.length < word.w.length) ret.push({ w: word.w.substr(lastword.c + lastword.w.length) }); } return ret; } - }, - { + }, { key: "matchWord", - value: function matchWord(text, cur, preword) { + value: function matchWord(text, cur) { if (isNaN(cur)) cur = 0; var ret = []; - var TABLE = this.segment.getDict("TABLE2"); + var TABLE = this.segment.getDict("WILDCARD2"); + var lowertext = text.toLowerCase(); while (cur < text.length) { - for (var _i in TABLE) { - var w = text.substr(cur, _i); - if (w in TABLE[_i]) { + var stopword = false; + for (var i in TABLE) if (lowertext.substr(cur, i) in TABLE[i]) stopword = { + w: text.substr(cur, i), + c: cur + }; + if (stopword !== false) { + ret.push(stopword); + cur += stopword.w.length; + } else cur++; + } + return ret; + } + }]); + return WildcardTokenizer; + }(Tokenizer$1), + PunctuationTokenizer, + /* @__PURE__ */ function(_Tokenizer) { + _inherits(ForeignTokenizer, _Tokenizer); + function ForeignTokenizer() { + _classCallCheck(this, ForeignTokenizer); + return _possibleConstructorReturn(this, _getPrototypeOf(ForeignTokenizer).apply(this, arguments)); + } + _createClass(ForeignTokenizer, [{ + key: "split", + value: function split(words) { + this.segment.POSTAG; + var ret = []; + for (var i = 0, word; word = words[i]; i++) if (word.p) ret.push(word); + else ret = ret.concat(this.splitForeign(word.w)); + return ret; + } + }, { + key: "splitForeign", + value: function splitForeign(text, cur) { + var POSTAG = this.segment.POSTAG; + var ret = []; + var lastcur = 0; + var lasttype = 0; + var c = text.charCodeAt(0); + if (c >= 65296 && c <= 65370) c -= 65248; + if (c >= 48 && c <= 57) lasttype = POSTAG.A_M; + else if (c >= 65 && c <= 90 || c >= 97 && c <= 122) lasttype = POSTAG.A_NX; + else lasttype = POSTAG.UNK; + for (var i = 1; i < text.length; i++) { + var c = text.charCodeAt(i); + if (c >= 65296 && c <= 65370) c -= 65248; + if (c >= 48 && c <= 57) { + if (lasttype !== POSTAG.A_M) { + var nw = { w: text.substr(lastcur, i - lastcur) }; + if (lasttype !== POSTAG.UNK) nw.p = lasttype; + ret.push(nw); + lastcur = i; + } + lasttype = POSTAG.A_M; + } else if (c >= 65 && c <= 90 || c >= 97 && c <= 122) { + if (lasttype !== POSTAG.A_NX) { + var nw = { w: text.substr(lastcur, i - lastcur) }; + if (lasttype !== POSTAG.UNK) nw.p = lasttype; + ret.push(nw); + lastcur = i; + } + lasttype = POSTAG.A_NX; + } else { + if (lasttype !== POSTAG.UNK) { + ret.push({ + w: text.substr(lastcur, i - lastcur), + p: [lasttype] + }); + lastcur = i; + } + lasttype = POSTAG.UNK; + } + } + var nw = { w: text.substr(lastcur, i - lastcur) }; + if (lasttype !== POSTAG.UNK) nw.p = lasttype; + ret.push(nw); + return ret; + } + }]); + return ForeignTokenizer; + }(Tokenizer$1), + /* @__PURE__ */ function(_Tokenizer) { + _inherits(DictTokenizer, _Tokenizer); + function DictTokenizer() { + _classCallCheck(this, DictTokenizer); + return _possibleConstructorReturn(this, _getPrototypeOf(DictTokenizer).apply(this, arguments)); + } + _createClass(DictTokenizer, [ + { + key: "split", + value: function split(words) { + this.segment.POSTAG; + var TABLE = this.segment.getDict("TABLE"); + var ret = []; + for (var i = 0, word; word = words[i]; i++) { + if (word.p > 0) { + ret.push(word); + continue; + } + var wordinfo = this.matchWord(word.w, 0, words[i - 1]); + if (wordinfo.length < 1) { + ret.push(word); + continue; + } + var lastc = 0; + for (var ui = 0, bw; bw = wordinfo[ui]; ui++) { + if (bw.c > lastc) ret.push({ w: word.w.substr(lastc, bw.c - lastc) }); ret.push({ + w: bw.w, + p: TABLE[bw.w].p + }); + lastc = bw.c + bw.w.length; + } + var lastword = wordinfo[wordinfo.length - 1]; + if (lastword.c + lastword.w.length < word.w.length) ret.push({ w: word.w.substr(lastword.c + lastword.w.length) }); + } + return ret; + } + }, + { + key: "matchWord", + value: function matchWord(text, cur, preword) { + if (isNaN(cur)) cur = 0; + var ret = []; + var TABLE = this.segment.getDict("TABLE2"); + while (cur < text.length) { + for (var _i in TABLE) { + var w = text.substr(cur, _i); + if (w in TABLE[_i]) ret.push({ w, c: cur, f: TABLE[_i][w].f }); } + cur++; } - cur++; + return this.filterWord(ret, preword, text); } - return this.filterWord(ret, preword, text); - } - }, - { - key: "filterWord", - value: function filterWord(words, preword, text) { - var POSTAG = this.segment.POSTAG; - var TABLE = this.segment.getDict("TABLE"); - var ret = []; - var wordpos = DictTokenizer.getPosInfo(words, text); - var chunks = DictTokenizer.getChunks(wordpos, 0, text); - var assess = []; - for (var i = 0, chunk; chunk = chunks[i]; i++) { - assess[i] = { - x: chunk.length, - a: 0, - b: 0, - c: 0, - d: 0 - }; - var sp = text.length / chunk.length; - var has_D_V = false; - if (preword) { - var prew = { + }, + { + key: "filterWord", + value: function filterWord(words, preword, text) { + var POSTAG = this.segment.POSTAG; + var TABLE = this.segment.getDict("TABLE"); + var ret = []; + var wordpos = DictTokenizer.getPosInfo(words, text); + var chunks = DictTokenizer.getChunks(wordpos, 0, text); + var assess = []; + for (var i = 0, chunk; chunk = chunks[i]; i++) { + assess[i] = { + x: chunk.length, + a: 0, + b: 0, + c: 0, + d: 0 + }; + var sp = text.length / chunk.length; + var has_D_V = false; + if (preword) var prew = { w: preword.w, p: preword.p, f: preword.f }; - } else { - prew = false; - } - for (var j = 0, w; w = chunk[j]; j++) { - if (w.w in TABLE) { - w.p = TABLE[w.w].p; - assess[i].a += w.f; - if (prew) { - if ((prew.p & POSTAG.A_M) > 0 && ((TABLE[w.w].p & POSTAG.A_Q) > 0 || w.w in DATETIME$1)) { - assess[i].d++; - } - if ((w.p & POSTAG.D_V) > 0) { - has_D_V = true; - if ((prew.p & POSTAG.D_A) > 0) { - assess[i].d++; + else prew = false; + for (var j = 0, w; w = chunk[j]; j++) { + if (w.w in TABLE) { + w.p = TABLE[w.w].p; + assess[i].a += w.f; + if (prew) { + if ((prew.p & POSTAG.A_M) > 0 && ((TABLE[w.w].p & POSTAG.A_Q) > 0 || w.w in DATETIME$1)) assess[i].d++; + if ((w.p & POSTAG.D_V) > 0) { + has_D_V = true; + if ((prew.p & POSTAG.D_A) > 0) assess[i].d++; } - } - if (((prew.p & POSTAG.A_NS) > 0 || prew.p & POSTAG.A_NT || (prew.p & POSTAG.D_A) > 0) && ((w.p & POSTAG.D_N) > 0 || (w.p & POSTAG.A_NR) > 0 || (w.p & POSTAG.A_NS) > 0 || (w.p & POSTAG.A_NZ) > 0 || (w.p & POSTAG.A_NT) > 0)) { - assess[i].d++; - } - if ((prew.p & POSTAG.D_F) > 0 && (w.p & POSTAG.A_M > 0 || w.p & POSTAG.D_MQ > 0)) { - assess[i].d++; - } - if ((prew.w in FAMILY_NAME_1 || prew.w in FAMILY_NAME_2) && ((w.p & POSTAG.D_N) > 0 || (w.p & POSTAG.A_NZ) > 0)) { - assess[i].d++; - } - var nextw = chunk[j + 1]; - if (nextw) { - if (nextw.w in TABLE) { - nextw.p = TABLE[nextw.w].p; - } - if ((w.p & POSTAG.D_C) > 0 && prew.p === nextw.p) { - assess[i].d++; - } - if ((w.w === "的" || w.w === "之") && ((nextw.p & POSTAG.D_N) > 0 || (nextw.p & POSTAG.A_NR) > 0 || (nextw.p & POSTAG.A_NS) > 0 || (nextw.p & POSTAG.A_NZ) > 0 || (nextw.p & POSTAG.A_NT) > 0)) { - assess[i].d += 1.5; + if (((prew.p & POSTAG.A_NS) > 0 || prew.p & POSTAG.A_NT || (prew.p & POSTAG.D_A) > 0) && ((w.p & POSTAG.D_N) > 0 || (w.p & POSTAG.A_NR) > 0 || (w.p & POSTAG.A_NS) > 0 || (w.p & POSTAG.A_NZ) > 0 || (w.p & POSTAG.A_NT) > 0)) assess[i].d++; + if ((prew.p & POSTAG.D_F) > 0 && (w.p & POSTAG.A_M > 0 || w.p & POSTAG.D_MQ > 0)) assess[i].d++; + if ((prew.w in FAMILY_NAME_1 || prew.w in FAMILY_NAME_2) && ((w.p & POSTAG.D_N) > 0 || (w.p & POSTAG.A_NZ) > 0)) assess[i].d++; + var nextw = chunk[j + 1]; + if (nextw) { + if (nextw.w in TABLE) nextw.p = TABLE[nextw.w].p; + if ((w.p & POSTAG.D_C) > 0 && prew.p === nextw.p) assess[i].d++; + if ((w.w === "的" || w.w === "之") && ((nextw.p & POSTAG.D_N) > 0 || (nextw.p & POSTAG.A_NR) > 0 || (nextw.p & POSTAG.A_NS) > 0 || (nextw.p & POSTAG.A_NZ) > 0 || (nextw.p & POSTAG.A_NT) > 0)) assess[i].d += 1.5; } } - } - } else { - assess[i].c++; + } else assess[i].c++; + assess[i].b += Math.pow(sp - w.w.length, 2); + prew = chunk[j]; } - assess[i].b += Math.pow(sp - w.w.length, 2); - prew = chunk[j]; + if (has_D_V === false) assess[i].d -= .5; + assess[i].a = assess[i].a / chunk.length; + assess[i].b = assess[i].b / chunk.length; } - if (has_D_V === false) assess[i].d -= .5; - assess[i].a = assess[i].a / chunk.length; - assess[i].b = assess[i].b / chunk.length; + var currchunk = chunks[DictTokenizer.getTops(assess)]; + for (var i = 0, word; word = currchunk[i]; i++) if (!(word.w in TABLE)) currchunk.splice(i--, 1); + ret = currchunk; + return ret; } - var top = DictTokenizer.getTops(assess); - var currchunk = chunks[top]; - for (var i = 0, word; word = currchunk[i]; i++) { - if (!(word.w in TABLE)) { - currchunk.splice(i--, 1); - } - } - ret = currchunk; - return ret; } - } - ], [ - { - key: "getPosInfo", - value: function getPosInfo(words, text) { - var wordpos = {}; - for (var i = 0, word; word = words[i]; i++) { - if (!wordpos[word.c]) { - wordpos[word.c] = []; - } - wordpos[word.c].push(word); - } - for (var i = 0; i < text.length; i++) { - if (!wordpos[i]) { - wordpos[i] = [{ - w: text.charAt(i), - c: i, - f: 0 - }]; + ], [ + { + key: "getPosInfo", + value: function getPosInfo(words, text) { + var wordpos = {}; + for (var i = 0, word; word = words[i]; i++) { + if (!wordpos[word.c]) wordpos[word.c] = []; + wordpos[word.c].push(word); } + for (var i = 0; i < text.length; i++) if (!wordpos[i]) wordpos[i] = [{ + w: text.charAt(i), + c: i, + f: 0 + }]; + return wordpos; } - return wordpos; - } - }, - { - key: "getChunks", - value: function getChunks(wordpos, pos, text) { - var words = wordpos[pos] || []; - var ret = []; - for (var _i2 = 0; _i2 < words.length; _i2++) { - var word = words[_i2]; - var nextcur = word.c + word.w.length; - if (!wordpos[nextcur]) { - ret.push([word]); - } else { - var chunks = DictTokenizer.getChunks(wordpos, nextcur); - for (var j = 0; j < chunks.length; j++) { - ret.push([word].concat(chunks[j])); + }, + { + key: "getChunks", + value: function getChunks(wordpos, pos, text) { + var words = wordpos[pos] || []; + var ret = []; + for (var _i2 = 0; _i2 < words.length; _i2++) { + var word = words[_i2]; + var nextcur = word.c + word.w.length; + if (!wordpos[nextcur]) ret.push([word]); + else { + var chunks = DictTokenizer.getChunks(wordpos, nextcur); + for (var j = 0; j < chunks.length; j++) ret.push([word].concat(chunks[j])); } } + return ret; } - return ret; - } - }, - { - key: "getTops", - value: function getTops(assess) { - var top = { - x: assess[0].x, - a: assess[0].a, - b: assess[0].b, - c: assess[0].c, - d: assess[0].d - }; - for (var i = 1, ass; ass = assess[i]; i++) { - if (ass.a > top.a) top.a = ass.a; - if (ass.b < top.b) top.b = ass.b; - if (ass.c > top.c) top.c = ass.c; - if (ass.d < top.d) top.d = ass.d; - if (ass.x > top.x) top.x = ass.x; - } - var tops = []; - for (var i = 0, ass; ass = assess[i]; i++) { - tops[i] = 0; - tops[i] += (top.x - ass.x) * 1.5; - if (ass.a >= top.a) tops[i] += 1; - if (ass.b <= top.b) tops[i] += 1; - tops[i] += top.c - ass.c; - tops[i] += (ass.d < 0 ? top.d + ass.d : ass.d - top.d) * 1; - } - var curri = 0; - var maxs = tops[0]; - for (var i in tops) { - var s = tops[i]; - if (s > maxs) { - curri = i; - maxs = s; - } else if (s === maxs) { - var a = 0; - var b = 0; - if (assess[i].c < assess[curri].c) a++; - else b++; - if (assess[i].a > assess[curri].a) a++; - else b++; - if (assess[i].x < assess[curri].x) a++; - else b++; - if (a > b) { + }, + { + key: "getTops", + value: function getTops(assess) { + var top = { + x: assess[0].x, + a: assess[0].a, + b: assess[0].b, + c: assess[0].c, + d: assess[0].d + }; + for (var i = 1, ass; ass = assess[i]; i++) { + if (ass.a > top.a) top.a = ass.a; + if (ass.b < top.b) top.b = ass.b; + if (ass.c > top.c) top.c = ass.c; + if (ass.d < top.d) top.d = ass.d; + if (ass.x > top.x) top.x = ass.x; + } + var tops = []; + for (var i = 0, ass; ass = assess[i]; i++) { + tops[i] = 0; + tops[i] += (top.x - ass.x) * 1.5; + if (ass.a >= top.a) tops[i] += 1; + if (ass.b <= top.b) tops[i] += 1; + tops[i] += top.c - ass.c; + tops[i] += (ass.d < 0 ? top.d + ass.d : ass.d - top.d) * 1; + } + var curri = 0; + var maxs = tops[0]; + for (var i in tops) { + var s = tops[i]; + if (s > maxs) { curri = i; maxs = s; + } else if (s === maxs) { + var a = 0; + var b = 0; + if (assess[i].c < assess[curri].c) a++; + else b++; + if (assess[i].a > assess[curri].a) a++; + else b++; + if (assess[i].x < assess[curri].x) a++; + else b++; + if (a > b) { + curri = i; + maxs = s; + } } } + return curri; } - return curri; } - } - ]); - return DictTokenizer; - }(Tokenizer$1); - var ForeignTokenizer = /* @__PURE__ */ function(_Tokenizer) { - _inherits(ForeignTokenizer, _Tokenizer); - function ForeignTokenizer() { - _classCallCheck(this, ForeignTokenizer); - return _possibleConstructorReturn(this, _getPrototypeOf(ForeignTokenizer).apply(this, arguments)); - } - _createClass(ForeignTokenizer, [{ - key: "split", - value: function split(words) { - this.segment.POSTAG; - var ret = []; - for (var i = 0, word; word = words[i]; i++) { - if (word.p) { - ret.push(word); - } else { - ret = ret.concat(this.splitForeign(word.w)); - } - } - return ret; - } - }, { - key: "splitForeign", - value: function splitForeign(text, cur) { - var POSTAG = this.segment.POSTAG; - var ret = []; - var lastcur = 0; - var lasttype = 0; - var c = text.charCodeAt(0); - if (c >= 65296 && c <= 65370) c -= 65248; - if (c >= 48 && c <= 57) lasttype = POSTAG.A_M; - else if (c >= 65 && c <= 90 || c >= 97 && c <= 122) { - lasttype = POSTAG.A_NX; - } else lasttype = POSTAG.UNK; - for (var i = 1; i < text.length; i++) { - var c = text.charCodeAt(i); - if (c >= 65296 && c <= 65370) c -= 65248; - if (c >= 48 && c <= 57) { - if (lasttype !== POSTAG.A_M) { - var nw = { w: text.substr(lastcur, i - lastcur) }; - if (lasttype !== POSTAG.UNK) nw.p = lasttype; - ret.push(nw); - lastcur = i; - } - lasttype = POSTAG.A_M; - } else if (c >= 65 && c <= 90 || c >= 97 && c <= 122) { - if (lasttype !== POSTAG.A_NX) { - var nw = { w: text.substr(lastcur, i - lastcur) }; - if (lasttype !== POSTAG.UNK) nw.p = lasttype; - ret.push(nw); - lastcur = i; - } - lasttype = POSTAG.A_NX; - } else { - if (lasttype !== POSTAG.UNK) { - ret.push({ - w: text.substr(lastcur, i - lastcur), - p: [lasttype] - }); - lastcur = i; - } - lasttype = POSTAG.UNK; - } - } - var nw = { w: text.substr(lastcur, i - lastcur) }; - if (lasttype !== POSTAG.UNK) nw.p = lasttype; - ret.push(nw); - return ret; - } - }]); - return ForeignTokenizer; - }(Tokenizer$1); - var WildcardTokenizer = /* @__PURE__ */ function(_Tokenizer) { - _inherits(WildcardTokenizer, _Tokenizer); - function WildcardTokenizer() { - _classCallCheck(this, WildcardTokenizer); - return _possibleConstructorReturn(this, _getPrototypeOf(WildcardTokenizer).apply(this, arguments)); - } - _createClass(WildcardTokenizer, [{ - key: "split", - value: function split(words) { - this.segment.POSTAG; - var TABLE = this.segment.getDict("WILDCARD"); - var ret = []; - for (var i = 0, word; word = words[i]; i++) { - if (word.p > 0) { - ret.push(word); - continue; - } - var wordinfo = this.matchWord(word.w); - if (wordinfo.length < 1) { - ret.push(word); - continue; - } - var lastc = 0; - for (var ui = 0, bw; bw = wordinfo[ui]; ui++) { - if (bw.c > lastc) { - ret.push({ w: word.w.substr(lastc, bw.c - lastc) }); - } - ret.push({ - w: bw.w, - p: TABLE[bw.w.toLowerCase()].p - }); - lastc = bw.c + bw.w.length; - } - var lastword = wordinfo[wordinfo.length - 1]; - if (lastword.c + lastword.w.length < word.w.length) { - ret.push({ w: word.w.substr(lastword.c + lastword.w.length) }); - } - } - return ret; - } - }, { - key: "matchWord", - value: function matchWord(text, cur) { - if (isNaN(cur)) cur = 0; - var ret = []; - var TABLE = this.segment.getDict("WILDCARD2"); - var lowertext = text.toLowerCase(); - while (cur < text.length) { - var stopword = false; - for (var i in TABLE) { - if (lowertext.substr(cur, i) in TABLE[i]) { - stopword = { - w: text.substr(cur, i), - c: cur - }; - } - } - if (stopword !== false) { - ret.push(stopword); - cur += stopword.w.length; - } else { - cur++; - } - } - return ret; - } - }]); - return WildcardTokenizer; - }(Tokenizer$1); - var modules = [ - URLTokenizer, - WildcardTokenizer, - PunctuationTokenizer, - ForeignTokenizer, - DictTokenizer, + ]); + return DictTokenizer; + }(Tokenizer$1), ChsNameTokenizer, EmailOptimizer, ChsNameOptimizer, @@ -392082,16 +373685,12 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { */ function segment$1(hans, segment) { if (segment === "segmentit") { - if (!segmentit$1) { - segmentit$1 = useDefault(new Segment()); - } + if (!segmentit$1) segmentit$1 = useDefault(new Segment()); return segmentit$1.doSegment(hans, { simple: true }); } if (segment === "Intl.Segmenter") { if (typeof (Intl === null || Intl === void 0 ? void 0 : Intl.Segmenter) === "function") { - if (!hansIntlSegmenter$1) { - hansIntlSegmenter$1 = new Intl.Segmenter("zh-Hans-CN", { granularity: "word" }); - } + if (!hansIntlSegmenter$1) hansIntlSegmenter$1 = new Intl.Segmenter("zh-Hans-CN", { granularity: "word" }); return [...hansIntlSegmenter$1.segment(hans)].map((s) => s.segment); } } @@ -392177,9 +373776,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { ]); function convertPinyinStyle(style) { const s = String(style); - if (pinyinStyleMap.has(s)) { - return pinyinStyleMap.get(s); - } + if (pinyinStyleMap.has(s)) return pinyinStyleMap.get(s); return ENUM_PINYIN_STYLE.TONE; } const pinyinModeMap = new Map([ @@ -392190,28 +373787,20 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { ]); function convertPinyinMode(mode) { const s = String(mode); - if (pinyinModeMap.has(s)) { - return pinyinModeMap.get(s); - } + if (pinyinModeMap.has(s)) return pinyinModeMap.get(s); return ENUM_PINYIN_MODE.NORMAL; } function convertUserOptions(options) { - let segment = undefined; - if (options === null || options === void 0 ? void 0 : options.segment) { - if ((options === null || options === void 0 ? void 0 : options.segment) === true) { - segment = "Intl.Segmenter"; - } else { - segment = options.segment; - } - } - const opt = Object.assign(Object.assign({}, DEFAULT_OPTIONS), { + let segment = void 0; + if (options === null || options === void 0 ? void 0 : options.segment) if ((options === null || options === void 0 ? void 0 : options.segment) === true) segment = "Intl.Segmenter"; + else segment = options.segment; + return Object.assign(Object.assign({}, DEFAULT_OPTIONS), { style: convertPinyinStyle(options === null || options === void 0 ? void 0 : options.style), mode: convertPinyinMode(options === null || options === void 0 ? void 0 : options.mode), segment, heteronym: (options === null || options === void 0 ? void 0 : options.heteronym) || false, group: (options === null || options === void 0 ? void 0 : options.group) || false }); - return opt; } /** * 组合 2 个拼音数组。 @@ -392221,17 +373810,9 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { */ function combo2array(a1, a2) { const result = []; - if (!a1.length) { - return a2; - } - if (!a2.length) { - return a1; - } - for (let i = 0, l = a1.length; i < l; i++) { - for (let j = 0, m = a2.length; j < m; j++) { - result.push(a1[i] + a2[j]); - } - } + if (!a1.length) return a2; + if (!a2.length) return a1; + for (let i = 0, l = a1.length; i < l; i++) for (let j = 0, m = a2.length; j < m; j++) result.push(a1[i] + a2[j]); return result; } /** @@ -392244,16 +373825,10 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { * ] */ function combo(arr) { - if (arr.length === 0) { - return []; - } - if (arr.length === 1) { - return arr[0]; - } + if (arr.length === 0) return []; + if (arr.length === 1) return arr[0]; let result = combo2array(arr[0], arr[1]); - for (let i = 2, l = arr.length; i < l; i++) { - result = combo2array(result, arr[i]); - } + for (let i = 2, l = arr.length; i < l; i++) result = combo2array(result, arr[i]); return result; } /** @@ -392263,46 +373838,23 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { * @returns {string[][]} 组合后的二维数组,eg: [ ["hai", "qian"], ["huan", "qian"] ] */ function compact2array(a1, a2) { - if (!Array.isArray(a1) || !Array.isArray(a2)) { - throw new Error("compact2array expect two array as parameters"); - } - if (!a1.length) { - a1 = [""]; - } - if (!a2.length) { - a2 = [""]; - } + if (!Array.isArray(a1) || !Array.isArray(a2)) throw new Error("compact2array expect two array as parameters"); + if (!a1.length) a1 = [""]; + if (!a2.length) a2 = [""]; const result = []; - for (let i = 0, l = a1.length; i < l; i++) { - for (let j = 0, m = a2.length; j < m; j++) { - if (Array.isArray(a1[i])) { - result.push([...a1[i], a2[j]]); - } else { - result.push([a1[i], a2[j]]); - } - } - } + for (let i = 0, l = a1.length; i < l; i++) for (let j = 0, m = a2.length; j < m; j++) if (Array.isArray(a1[i])) result.push([...a1[i], a2[j]]); + else result.push([a1[i], a2[j]]); return result; } function compact(arr) { - if (arr.length === 0) { - return []; - } - if (arr.length === 1) { - return [arr[0]]; - } + if (arr.length === 0) return []; + if (arr.length === 1) return [arr[0]]; let result = compact2array(arr[0], arr[1]); - for (let i = 2, l = arr.length; i < l; ++i) { - result = compact2array(result, arr[i]); - } + for (let i = 2, l = arr.length; i < l; ++i) result = compact2array(result, arr[i]); return result; } function initials(py) { - for (let i = 0, l = INITIALS.length; i < l; i++) { - if (py.indexOf(INITIALS[i]) === 0) { - return INITIALS[i]; - } - } + for (let i = 0, l = INITIALS.length; i < l; i++) if (py.indexOf(INITIALS[i]) === 0) return INITIALS[i]; return ""; } const RE_PHONETIC_SYMBOL = new RegExp("([" + Object.keys(PHONETIC_SYMBOL).join("") + "])", "g"); @@ -392322,9 +373874,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { case ENUM_PINYIN_STYLE.INITIALS: return initials(pinyin); case ENUM_PINYIN_STYLE.FIRST_LETTER: first_letter = pinyin.charAt(0); - if (hasKey(PHONETIC_SYMBOL, first_letter)) { - first_letter = PHONETIC_SYMBOL[first_letter].charAt(0); - } + if (hasKey(PHONETIC_SYMBOL, first_letter)) first_letter = PHONETIC_SYMBOL[first_letter].charAt(0); return first_letter; case ENUM_PINYIN_STYLE.NORMAL: return pinyin.replace(RE_PHONETIC_SYMBOL, function($0, $1_phonetic) { return PHONETIC_SYMBOL[$1_phonetic].replace(RE_TONE2, "$1"); @@ -392838,23 +374388,13 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { * 拼音转换入口。 */ pinyin(hans, options) { - if (typeof hans !== "string") { - return []; - } + if (typeof hans !== "string") return []; const opt = convertUserOptions(options); let pys; - if (opt.mode === ENUM_PINYIN_MODE.SURNAME) { - pys = this.surname_pinyin(hans, opt); - } else { - if (opt.segment) { - pys = this.segment_pinyin(hans, opt); - } else { - pys = this.normal_pinyin(hans, opt); - } - } - if (options === null || options === void 0 ? void 0 : options.compact) { - pys = compact(pys); - } + if (opt.mode === ENUM_PINYIN_MODE.SURNAME) pys = this.surname_pinyin(hans, opt); + else if (opt.segment) pys = this.segment_pinyin(hans, opt); + else pys = this.normal_pinyin(hans, opt); + if (options === null || options === void 0 ? void 0 : options.compact) pys = compact(pys); return pys; } /** @@ -392865,16 +374405,13 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { let nohans = ""; for (let i = 0, l = hans.length; i < l; i++) { const words = hans[i]; - const firstCharCode = words.charCodeAt(0); - if (dict[firstCharCode]) { + if (dict[words.charCodeAt(0)]) { if (nohans.length > 0) { pys.push([nohans]); nohans = ""; } pys.push(this.single_pinyin(words, options)); - } else { - nohans += words; - } + } else nohans += words; } if (nohans.length > 0) { pys.push([nohans]); @@ -392888,27 +374425,17 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { * @return {Array} 返回拼音列表,多音字会有多个拼音项。 */ single_pinyin(han, options) { - if (typeof han !== "string") { - return []; - } - if (han.length !== 1) { - return this.single_pinyin(han.charAt(0), options); - } + if (typeof han !== "string") return []; + if (han.length !== 1) return this.single_pinyin(han.charAt(0), options); const hanCode = han.charCodeAt(0); - if (!dict[hanCode]) { - return [han]; - } + if (!dict[hanCode]) return [han]; const pys = dict[hanCode].split(","); - if (!options.heteronym) { - return [toFixed(pys[0], options.style)]; - } + if (!options.heteronym) return [toFixed(pys[0], options.style)]; const py_cached = {}; const pinyins = []; for (let i = 0, l = pys.length; i < l; i++) { const py = toFixed(pys[i], options.style); - if (hasKey(py_cached, py)) { - continue; - } + if (hasKey(py_cached, py)) continue; py_cached[py] = py; pinyins.push(py); } @@ -392926,21 +374453,15 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { let nohans = ""; for (let i = 0, l = phrases.length; i < l; i++) { const words = phrases[i]; - const firstCharCode = words.charCodeAt(0); - if (dict[firstCharCode]) { + if (dict[words.charCodeAt(0)]) { if (nohans.length > 0) { pys.push([nohans]); nohans = ""; } const newPys = words.length === 1 ? this.normal_pinyin(words, options) : this.phrases_pinyin(words, options); - if (options.group) { - pys.push(this.groupPhrases(newPys)); - } else { - pys = pys.concat(newPys); - } - } else { - nohans += words; - } + if (options.group) pys.push(this.groupPhrases(newPys)); + else pys = pys.concat(newPys); + } else nohans += words; } if (nohans.length > 0) { pys.push([nohans]); @@ -392956,31 +374477,21 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { */ phrases_pinyin(phrases, options) { const py = []; - if (hasKey(phrases_dict, phrases)) { - //! copy pinyin result. - phrases_dict[phrases].forEach(function(item, idx) { - py[idx] = []; - if (options.heteronym) { - item.forEach(function(py_item, py_index) { - py[idx][py_index] = toFixed(py_item, options.style); - }); - } else { - py[idx][0] = toFixed(item[0], options.style); - } + if (hasKey(phrases_dict, phrases)) + //! copy pinyin result. + phrases_dict[phrases].forEach(function(item, idx) { + py[idx] = []; + if (options.heteronym) item.forEach(function(py_item, py_index) { + py[idx][py_index] = toFixed(py_item, options.style); }); - } else { - for (let i = 0, l = phrases.length; i < l; i++) { - py.push(this.single_pinyin(phrases[i], options)); - } - } + else py[idx][0] = toFixed(item[0], options.style); + }); + else for (let i = 0, l = phrases.length; i < l; i++) py.push(this.single_pinyin(phrases[i], options)); return py; } groupPhrases(phrases) { - if (phrases.length === 1) { - return phrases[0]; - } - const grouped = combo(phrases); - return grouped; + if (phrases.length === 1) return phrases[0]; + return combo(phrases); } surname_pinyin(hans, options) { return this.compound_surname(hans, options); @@ -392992,9 +374503,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { for (let i = 0; i < len; i++) { const twowords = hans.substring(i, i + 2); if (hasKey(CompoundSurnamePinyinData, twowords)) { - if (prefixIndex <= i - 1) { - result = result.concat(this.single_surname(hans.substring(prefixIndex, i), options)); - } + if (prefixIndex <= i - 1) result = result.concat(this.single_surname(hans.substring(prefixIndex, i), options)); const pys = CompoundSurnamePinyinData[twowords].map((item) => { return item.map((ch) => toFixed(ch, options.style)); }); @@ -393015,9 +374524,7 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { return item.map((ch) => toFixed(ch, options.style)); }); result = result.concat(pys); - } else { - result.push(this.single_pinyin(word, options)); - } + } else result.push(this.single_pinyin(word, options)); } return result; } @@ -393079,16 +374586,12 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { console.error("pinyin v4: \"segmentit\" is peerDependencies"); return [hans]; } - if (!segmentit) { - segmentit = useDefault(new Segment()); - } + if (!segmentit) segmentit = useDefault(new Segment()); return segmentit.doSegment(hans, { simple: true }); } if (segment === "Intl.Segmenter") { if (typeof (Intl === null || Intl === void 0 ? void 0 : Intl.Segmenter) === "function") { - if (!hansIntlSegmenter) { - hansIntlSegmenter = new Intl.Segmenter("zh-Hans-CN", { granularity: "word" }); - } + if (!hansIntlSegmenter) hansIntlSegmenter = new Intl.Segmenter("zh-Hans-CN", { granularity: "word" }); return [...hansIntlSegmenter.segment(hans)].map((s) => s.segment); } } @@ -393115,7 +374618,6 @@ var require_pinyin = /* @__PURE__ */ __commonJSMin(((exports) => { exports["default"] = pinyin; exports.pinyin = pinyin; })); - //#endregion //#region ../utils/pinyin-tool.js var import_pinyin = require_pinyin(); @@ -393135,27 +374637,24 @@ var import_pinyin = require_pinyin(); * getFirstLetter('上海浦东新区'); // 返回 'SHPDXQ' */ function getFirstLetter(text) { - const pinyinArray = (0, import_pinyin.pinyin)(text, { style: import_pinyin.pinyin.STYLE_FIRST_LETTER }); - return pinyinArray.map((item) => item[0].toUpperCase()).join(""); + return (0, import_pinyin.pinyin)(text, { style: import_pinyin.pinyin.STYLE_FIRST_LETTER }).map((item) => item[0].toUpperCase()).join(""); } - //#endregion //#region ../node_modules/dayjs/plugin/utc.js var require_utc = /* @__PURE__ */ __commonJSMin(((exports, module) => { - !function(t, i) { + (function(t, i) { "object" == typeof exports && "undefined" != typeof module ? module.exports = i() : "function" == typeof define && define.amd ? define(i) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs_plugin_utc = i(); - }(exports, (function() { + })(exports, (function() { "use strict"; var t = "minute", i = /[+-]\d\d(?::?\d\d)?/g, e = /([+-]|\d\d)/g; return function(s, f, n) { var u = f.prototype; n.utc = function(t) { - var i = { + return new f({ date: t, utc: !0, args: arguments - }; - return new f(i); + }); }, u.utc = function(i) { var e = n(this.toDate(), { locale: this.$L, @@ -393228,13 +374727,12 @@ var require_utc = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; })); })); - //#endregion //#region ../node_modules/dayjs/plugin/timezone.js var require_timezone = /* @__PURE__ */ __commonJSMin(((exports, module) => { - !function(t, e) { + (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_plugin_timezone = e(); - }(exports, (function() { + })(exports, (function() { "use strict"; var t = { year: 0, @@ -393247,7 +374745,8 @@ var require_timezone = /* @__PURE__ */ __commonJSMin(((exports, module) => { return function(n, i, o) { var r, a = function(t, n, i) { void 0 === i && (i = {}); - var o = new Date(t), r = function(t, n) { + var o = new Date(t); + return function(t, n) { void 0 === n && (n = {}); var i = n.timeZoneName || "short", o = t + "|" + i, r = e[o]; return r || (r = new Intl.DateTimeFormat("en-US", { @@ -393261,8 +374760,7 @@ var require_timezone = /* @__PURE__ */ __commonJSMin(((exports, module) => { second: "2-digit", timeZoneName: i }), e[o] = r), r; - }(n, i); - return r.formatToParts(o); + }(n, i).formatToParts(o); }, u = function(e, n) { for (var i = a(e, n), r = [], u = 0; u < i.length; u += 1) { var f = i[u], s = f.type, m = f.value, c = t[s]; @@ -393309,13 +374807,12 @@ var require_timezone = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; })); })); - //#endregion //#region ../node_modules/dayjs/plugin/customParseFormat.js var require_customParseFormat = /* @__PURE__ */ __commonJSMin(((exports, module) => { - !function(e, t) { + (function(e, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_plugin_customParseFormat = t(); - }(exports, (function() { + })(exports, (function() { "use strict"; var e = { LTS: "h:mm:ss A", @@ -393380,8 +374877,8 @@ var require_customParseFormat = /* @__PURE__ */ __commonJSMin(((exports, module) D: [i, f("day")], DD: [r, f("day")], Do: [o, function(e) { - var t = s.ordinal, n = e.match(/\d+/); - if (this.day = n[0], t) for (var r = 1; r <= 31; r += 1) t(r).replace(/\[|\]/g, "") === e && (this.day = r); + var t = s.ordinal; + if (this.day = e.match(/\d+/)[0], t) for (var r = 1; r <= 31; r += 1) t(r).replace(/\[|\]/g, "") === e && (this.day = r); }], w: [i, f("week")], ww: [r, f("week")], @@ -393408,8 +374905,7 @@ var require_customParseFormat = /* @__PURE__ */ __commonJSMin(((exports, module) ZZ: h }; function l(n) { - var r, i; - r = n, i = s && s.formats; + var r = n, i = s && s.formats; for (var o = (n = r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (function(t, n, r) { var o = r && r.toUpperCase(); return n || i[r] || e[r] || i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (function(e, t, n) { @@ -393451,15 +374947,15 @@ var require_customParseFormat = /* @__PURE__ */ __commonJSMin(((exports, module) var f = !0 === o[2], h = !0 === o[3], u = f || h, d = o[2]; h && (d = o[2]), s = this.$locale(), !f && d && (s = n.Ls[d]), this.$d = function(e, t, n, r) { try { - if (["x", "X"].indexOf(t) > -1) return new Date(("X" === t ? 1e3 : 1) * e); - var i = l(t)(e), o = i.year, s = i.month, a = i.day, f = i.hours, h = i.minutes, u = i.seconds, d = i.milliseconds, c = i.zone, m = i.week, M = new Date(), Y = a || (o || s ? 1 : M.getDate()), p = o || M.getFullYear(), v = 0; + if (["x", "X"].indexOf(t) > -1) return /* @__PURE__ */ new Date(("X" === t ? 1e3 : 1) * e); + var i = l(t)(e), o = i.year, s = i.month, a = i.day, f = i.hours, h = i.minutes, u = i.seconds, d = i.milliseconds, c = i.zone, m = i.week, M = /* @__PURE__ */ new Date(), Y = a || (o || s ? 1 : M.getDate()), p = o || M.getFullYear(), v = 0; o && !s || (v = s > 0 ? s - 1 : M.getMonth()); var D, w = f || 0, g = h || 0, y = u || 0, L = d || 0; return c ? new Date(Date.UTC(p, v, Y, w, g, y, L + 60 * c.offset * 1e3)) : n ? new Date(Date.UTC(p, v, Y, w, g, y, L)) : (D = new Date(p, v, Y, w, g, y, L), m && (D = r(D).week(m).toDate()), D); } catch (e) { - return new Date(""); + return /* @__PURE__ */ new Date(""); } - }(t, a, r, n), this.init(), d && !0 !== d && (this.$L = this.locale(d).$L), u && t != this.format(a) && (this.$d = new Date("")), s = {}; + }(t, a, r, n), this.init(), d && !0 !== d && (this.$L = this.locale(d).$L), u && t != this.format(a) && (this.$d = /* @__PURE__ */ new Date("")), s = {}; } else if (a instanceof Array) for (var c = a.length, m = 1; m <= c; m += 1) { o[1] = a[m - 1]; var M = n.apply(this, o); @@ -393467,14 +374963,13 @@ var require_customParseFormat = /* @__PURE__ */ __commonJSMin(((exports, module) this.$d = M.$d, this.$L = M.$L, this.init(); break; } - m === c && (this.$d = new Date("")); + m === c && (this.$d = /* @__PURE__ */ new Date("")); } else i.call(this, e); }; }; })); })); - //#endregion //#region ../utils/datetime-format.js /** @@ -393530,7 +375025,6 @@ import_dayjs_min.default.extend(import_timezone.default); * toBeijingTime(undefined) // null */ const toBeijingTime = (date) => date ? (0, import_dayjs_min.default)(date).utc().tz("Asia/Shanghai").format("YYYY-MM-DD HH:mm:ss") : null; - //#endregion //#region ../node_modules/sync-fetch/src/headers.js var require_headers = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -393550,41 +375044,24 @@ var require_headers = /* @__PURE__ */ __commonJSMin(((exports, module) => { var SyncHeaders = class SyncHeaders { constructor(headers) { this[_state] = {}; - if (headers instanceof SyncHeaders) { - this[_state] = headers.raw(); - } else if (headers != null && headers[Symbol.iterator] != null) { - if (typeof headers[Symbol.iterator] !== "function") { - throw new TypeError("Header pairs must be iterable"); - } + if (headers instanceof SyncHeaders) this[_state] = headers.raw(); + else if (headers != null && headers[Symbol.iterator] != null) { + if (typeof headers[Symbol.iterator] !== "function") throw new TypeError("Header pairs must be iterable"); for (const header of headers) { - if (header == null || typeof header[Symbol.iterator] !== "function") { - throw new TypeError("Header pairs must be iterable"); - } - if (typeof header === "string") { - throw new TypeError("Each header pair must be an iterable object"); - } + if (header == null || typeof header[Symbol.iterator] !== "function") throw new TypeError("Header pairs must be iterable"); + if (typeof header === "string") throw new TypeError("Each header pair must be an iterable object"); const pair = Array.from(header); - if (pair.length !== 2) { - throw new TypeError("Each header pair must be a name/value tuple"); - } + if (pair.length !== 2) throw new TypeError("Each header pair must be a name/value tuple"); const [name, value] = pair; this.append(name, value); } - } else if (typeof headers === "object") { - for (const name of Object.keys(headers)) { - this.set(name, headers[name]); - } - } else if (headers !== undefined) { - throw new TypeError("The provided value is not of type '(sequence> or record)'"); - } + } else if (typeof headers === "object") for (const name of Object.keys(headers)) this.set(name, headers[name]); + else if (headers !== void 0) throw new TypeError("The provided value is not of type '(sequence> or record)'"); } append(name, value) { [name, value] = prepareHeader(name, value); - if (this[_state][name]) { - this[_state][name].push(value); - } else { - this[_state][name] = [value]; - } + if (this[_state][name]) this[_state][name].push(value); + else this[_state][name] = [value]; } delete(name) { name = prepareHeaderName(name); @@ -393594,22 +375071,16 @@ var require_headers = /* @__PURE__ */ __commonJSMin(((exports, module) => { return this.keys().map((key) => [key, this.get(key)]); } forEach(callback, thisArg) { - for (const [name, value] of this.entries()) { - callback.call(thisArg ?? null, value, name, this); - } + for (const [name, value] of this.entries()) callback.call(thisArg ?? null, value, name, this); } get(name) { name = prepareHeaderName(name); - if (this.has(name)) { - return this[_state][name].join(", "); - } + if (this.has(name)) return this[_state][name].join(", "); return null; } getSetCookie() { const name = "set-cookie"; - if (this.has(name)) { - return this[_state][name].slice(); - } + if (this.has(name)) return this[_state][name].slice(); return []; } has(name) { @@ -393625,18 +375096,14 @@ var require_headers = /* @__PURE__ */ __commonJSMin(((exports, module) => { } raw() { const headers = {}; - for (const name of this.keys()) { - headers[name] = this[_state][name].slice(); - } + for (const name of this.keys()) headers[name] = this[_state][name].slice(); return headers; } values() { return this.keys().map((key) => this.get(key)); } *[Symbol.iterator]() { - for (const entry of this.entries()) { - yield entry; - } + for (const entry of this.entries()) yield entry; } get [Symbol.toStringTag]() { return "Headers"; @@ -393664,7 +375131,6 @@ var require_headers = /* @__PURE__ */ __commonJSMin(((exports, module) => { initializeHeaders }; })); - //#endregion //#region ../node_modules/sync-fetch/src/error.js var require_error = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -393672,9 +375138,7 @@ var require_error = /* @__PURE__ */ __commonJSMin(((exports, module) => { constructor(message, type, systemError) { super(message); this.type = type; - if (systemError) { - this.code = this.errno = systemError.code; - } + if (systemError) this.code = this.errno = systemError.code; } get name() { return "FetchError"; @@ -393685,18 +375149,14 @@ var require_error = /* @__PURE__ */ __commonJSMin(((exports, module) => { }; const errors = { TypeError }; function deserializeError(name, init) { - if (name in errors) { - return new errors[name](...init); - } else { - return new FetchError(...init); - } + if (name in errors) return new errors[name](...init); + else return new FetchError(...init); } module.exports = { FetchError, deserializeError }; })); - //#endregion //#region ../node_modules/sync-fetch/src/body.js var require_body = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -393705,9 +375165,7 @@ var require_body = /* @__PURE__ */ __commonJSMin(((exports, module) => { const { FetchError } = require_error(); const _state = Symbol("SyncFetch Internals"); function getMimeType(body) { - if (!body.headers.has("content-type")) { - return null; - } + if (!body.headers.has("content-type")) return null; let essence = null; let charset = null; let mimeType = null; @@ -393716,18 +375174,14 @@ var require_body = /* @__PURE__ */ __commonJSMin(((exports, module) => { if (mimeType.essence !== essence) { charset = mimeType.parameters.get("charset") ?? null; essence = mimeType.essence; - } else if (!mimeType.parameters.has("charset") && charset !== null) { - mimeType.parameters.set("charset", charset); - } + } else if (!mimeType.parameters.has("charset") && charset !== null) mimeType.parameters.set("charset", charset); } return mimeType.toString(); } var Body = class Body { static mixin(proto) { for (const name of Object.getOwnPropertyNames(Body.prototype)) { - if (name === "constructor") { - continue; - } + if (name === "constructor") continue; const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); Object.defineProperty(proto, name, { ...desc, @@ -393767,40 +375221,26 @@ var require_body = /* @__PURE__ */ __commonJSMin(((exports, module) => { return this[_state].bodyStream; } get bodyUsed() { - if (this[_state].bodyStream && this[_state].bodyStream.state === "closed") { - this[_state].bodyUsed = true; - } + if (this[_state].bodyStream && this[_state].bodyStream.state === "closed") this[_state].bodyUsed = true; return this[_state].bodyUsed; } }; function checkBody(body) { - if (body[_state].bodyError) { - throw body[_state].bodyError; - } - if (body.bodyUsed) { - throw new TypeError(`body used already for: ${body.url}`); - } + if (body[_state].bodyError) throw body[_state].bodyError; + if (body.bodyUsed) throw new TypeError(`body used already for: ${body.url}`); } function consumeBody(body) { body[_state].bodyUsed = true; return body[_state].body || Buffer.alloc(0); } function parseBodyType(body) { - if (body == null) { - return "Null"; - } else if (body.constructor.name === "URLSearchParams") { - return "URLSearchParams"; - } else if (Buffer.isBuffer(body)) { - return "Buffer"; - } else if (Object.prototype.toString.call(body) === "[object ArrayBuffer]") { - return "ArrayBuffer"; - } else if (ArrayBuffer.isView(body)) { - return "ArrayBufferView"; - } else if (body instanceof Stream$1) { - return "Stream"; - } else { - return "String"; - } + if (body == null) return "Null"; + else if (body.constructor.name === "URLSearchParams") return "URLSearchParams"; + else if (Buffer.isBuffer(body)) return "Buffer"; + else if (Object.prototype.toString.call(body) === "[object ArrayBuffer]") return "ArrayBuffer"; + else if (ArrayBuffer.isView(body)) return "ArrayBufferView"; + else if (body instanceof Stream$1) return "Stream"; + else return "String"; } function parseBody(body, type = parseBodyType(body)) { switch (type) { @@ -393827,7 +375267,6 @@ var require_body = /* @__PURE__ */ __commonJSMin(((exports, module) => { _state }; })); - //#endregion //#region ../node_modules/sync-fetch/src/request.js var require_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -393936,9 +375375,7 @@ var require_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { return new SyncRequest(this.url, this[_state]); } [util$4.inspect.custom](depth, options) { - if (options.depth === null) { - options.depth = 2; - } + if (options.depth === null) options.depth = 2; options.colors ??= true; const properties = { ...serializeRequest(this)[1], @@ -393968,7 +375405,7 @@ var require_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { }); function serializeRequest(request) { return [request.url, { - body: request[_state].body ? request[_state].body.toString("base64") : undefined, + body: request[_state].body ? request[_state].body.toString("base64") : void 0, cache: request.cache, credentials: request.credentials, destination: request.destination, @@ -393991,7 +375428,6 @@ var require_request = /* @__PURE__ */ __commonJSMin(((exports, module) => { serializeRequest }; })); - //#endregion //#region ../node_modules/sync-fetch/src/response.js var require_response = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -394001,9 +375437,7 @@ var require_response = /* @__PURE__ */ __commonJSMin(((exports, module) => { const { SyncHeaders, initializeHeaders } = require_headers(); var SyncResponse = class { constructor(body, options = {}) { - if (typeof options !== "object") { - throw new TypeError("expected options to be an object"); - } + if (typeof options !== "object") throw new TypeError("expected options to be an object"); const buffer = parseBody(body); Object.defineProperty(this, _state, { value: { @@ -394021,9 +375455,7 @@ var require_response = /* @__PURE__ */ __commonJSMin(((exports, module) => { const response = new Response(body); this.headers.append("content-type", response.headers.get("content-type")); } - if (options.url) { - this[_state].url = options.url; - } + if (options.url) this[_state].url = options.url; } get [Symbol.toStringTag]() { return "Response"; @@ -394065,9 +375497,7 @@ var require_response = /* @__PURE__ */ __commonJSMin(((exports, module) => { }); } [util$3.inspect.custom](depth, options) { - if (options.depth === null) { - options.depth = 2; - } + if (options.depth === null) options.depth = 2; options.colors ??= true; const properties = { status: this.status, @@ -394120,23 +375550,20 @@ var require_response = /* @__PURE__ */ __commonJSMin(((exports, module) => { * @param {array} [bodyError] */ function deserializeResponse(body, init, bodyError) { - const options = { + return initializeResponse({ ...init, headers: initializeHeaders(init.headers) - }; - const state = { + }, { ...init, body: Buffer.from(body, "base64"), - bodyError: bodyError ? deserializeError(...bodyError) : undefined - }; - return initializeResponse(options, state); + bodyError: bodyError ? deserializeError(...bodyError) : void 0 + }); } module.exports = { SyncResponse, deserializeResponse }; })); - //#endregion //#region ../node_modules/sync-fetch/index.js var require_sync_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -394149,11 +375576,8 @@ var require_sync_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { function syncFetch(resource, init) { const request = serializeRequest(new syncFetch.Request(resource, init)); const [status, ...response] = JSON.parse(sendMessage(request)); - if (status === 0) { - return deserializeResponse(...response); - } else { - throw deserializeError(...response[0]); - } + if (status === 0) return deserializeResponse(...response); + else throw deserializeError(...response[0]); } function sendMessage(message) { return exec$1(process.execPath, [path$3.join(__dirname, "worker.js")], { @@ -394169,7 +375593,6 @@ var require_sync_fetch = /* @__PURE__ */ __commonJSMin(((exports, module) => { syncFetch.Response = SyncResponse; module.exports = syncFetch; })); - //#endregion //#region ../libs_drpy/moduleLoader.js var import_sync_fetch = /* @__PURE__ */ __toESM(require_sync_fetch(), 1); @@ -394177,11 +375600,29 @@ const __dirname$4 = path.dirname(fileURLToPath(import.meta.url)); const ROOT_DIR = path.resolve(__dirname$4, "../"); const LIB_ROOT = path.join(ROOT_DIR, "spider/js"); const customRequire = createRequire$1(import.meta.url); +/** +* Patch Module.prototype.require to handle bundled modules in CJS context +* This allows native CJS modules (like those loaded via require('./lib.js')) to find +* bundled dependencies (axios, iconv-lite, etc.) which are exposed on globalThis. +*/ +const originalRequire = Module.prototype.require; +Module.prototype.require = function(id) { + if (id === "iconv-lite" && globalThis.iconv) return globalThis.iconv; + if (id === "axios" && globalThis.axios) return globalThis.axios; + if (id === "cheerio" && globalThis.cheerio) return globalThis.cheerio; + if (id === "qs" && globalThis.qs) return globalThis.qs; + if (id === "crypto-js" && globalThis.CryptoJS) return globalThis.CryptoJS; + return originalRequire.apply(this, arguments); +}; const rootRequire = (modulePath) => { - if (modulePath.startsWith("./") || modulePath.startsWith("../")) { - const absolutePath = path.resolve(LIB_ROOT, modulePath); - return customRequire(absolutePath); - } + if (modulePath === "iconv-lite") return globalThis.iconv; + if (modulePath === "axios") return globalThis.axios; + if (modulePath === "cheerio") return globalThis.cheerio; + if (modulePath === "qs") return globalThis.qs; + if (modulePath === "crypto-js") return globalThis.CryptoJS; + if (modulePath === "fs" && globalThis.fs) return globalThis.fs; + if (modulePath === "path" && globalThis.path) return globalThis.path; + if (modulePath.startsWith("./") || modulePath.startsWith("../")) return customRequire(path.resolve(LIB_ROOT, modulePath)); return customRequire(modulePath); }; function initializeGlobalDollar() { @@ -394197,35 +375638,27 @@ function initializeGlobalDollar() { } })(); `; - const scriptRunner = new Function("sandbox", ` + new Function("sandbox", ` with (sandbox) { ${script} } - `); - scriptRunner(sandbox); - if (!$.exports || Object.keys($.exports).length === 0) { - throw new Error(`Module did not export anything.`); - } + `)(sandbox); + if (!$.exports || Object.keys($.exports).length === 0) throw new Error(`Module did not export anything.`); return $.exports; } function loadLocalModule(jsm_path) { const fullPath = path.join(__dirname$4, "../spider/js", jsm_path); - if (!existsSync(fullPath)) { - throw new Error(`Module not found: ${fullPath}`); - } + if (!existsSync(fullPath)) throw new Error(`Module not found: ${fullPath}`); const baseName = path.basename(fullPath); - if (!baseName.startsWith("_lib")) { - throw new Error(`Invalid module name: ${baseName}. Must start with "_lib".`); - } + if (!baseName.startsWith("_lib")) throw new Error(`Invalid module name: ${baseName}. Must start with "_lib".`); return readFileSync(fullPath, "utf8"); } async function loadRemoteModule(jsm_path) { try { - const response = await axios$1.get(jsm_path, { + return (await axios$1.get(jsm_path, { headers: { "user-agent": "Mozilla/5.0" }, timeout: 5e3 - }); - return response.data; + })).data; } catch (error) { throw new Error(`Failed to fetch remote module: ${error.message}`); } @@ -394236,19 +375669,14 @@ function initializeGlobalDollar() { }, async import(jsm_path) { if (!currentSandbox) throw new Error("No sandbox context set"); - const isURL = /^(https?:)?\/\//.test(jsm_path); - const js_code = isURL ? await loadRemoteModule(jsm_path) : loadLocalModule(jsm_path); - return executeModule(js_code, currentSandbox); + return executeModule(/^(https?:)?\/\//.test(jsm_path) ? await loadRemoteModule(jsm_path) : loadLocalModule(jsm_path), currentSandbox); }, require(jsm_path) { if (!currentSandbox) throw new Error("No sandbox context set"); - const isURL = /^(https?:)?\/\//.test(jsm_path); - const js_code = isURL ? (0, import_sync_fetch.default)(jsm_path).text() : loadLocalModule(jsm_path); - return executeModule(js_code, currentSandbox); + return executeModule(/^(https?:)?\/\//.test(jsm_path) ? (0, import_sync_fetch.default)(jsm_path).text() : loadLocalModule(jsm_path), currentSandbox); } }; } - //#endregion //#region ../libs_drpy/template.js /** @@ -394267,24 +375695,18 @@ let common_lazy = $js$1.toString(async () => { let hconf = html.match(/r player_.*?=(.*?) { */ let cj_lazy = $js$1.toString(async () => { let result = input; - if (/\.(m3u8|mp4)/.test(input)) { - result = { + if (/\.(m3u8|mp4)/.test(input)) result = { + parse: 0, + url: input + }; + else if (rule.parse_url.startsWith("json:")) { + let purl = rule.parse_url.replace("json:", "") + input; + let html = await request(purl); + let json = JSON.parse(html); + if (json.url) result = { parse: 0, - url: input + url: json.url }; - } else { - if (rule.parse_url.startsWith("json:")) { - let purl = rule.parse_url.replace("json:", "") + input; - let html = await request(purl); - let json = JSON.parse(html); - if (json.url) { - result = { - parse: 0, - url: json.url - }; - } - } else { - result = rule.parse_url + input; - } - } + } else result = rule.parse_url + input; log(`[cj_lazy] result:`, result); return result; }); @@ -394667,9 +376082,7 @@ function getMubans() { log("input:", input); let html = await request(input); html = JSON.parse(html); - let data = html.list; - let VOD = data[0]; - return VOD; + return html.list[0]; }), 搜索: "*" } @@ -394694,7 +376107,6 @@ const template$1 = { def_lazy, cj_lazy }; - //#endregion //#region ../libs_drpy/batchExecute.js var import_queue = /* @__PURE__ */ __toESM(require_queue(), 1); @@ -394724,18 +376136,11 @@ async function batchExecute(tasks, listener, successCount, max_task = 0) { successfulResults.push(result); completedSuccess++; if (listener && typeof listener.func === "function") { - const listenerResult = listener.func(listener.param, id, null, result); - if (listenerResult === "break") { - stopExecution = true; - } - } - if (successCount && completedSuccess >= successCount) { - stopExecution = true; + if (listener.func(listener.param, id, null, result) === "break") stopExecution = true; } + if (successCount && completedSuccess >= successCount) stopExecution = true; } catch (error) { - if (listener && typeof listener.func === "function") { - listener.func(listener.param, id, error, null); - } + if (listener && typeof listener.func === "function") listener.func(listener.param, id, error, null); } }, maxConcurrency); tasks.forEach((task) => { @@ -394756,7 +376161,6 @@ async function batchExecute(tasks, listener, successCount, max_task = 0) { console.log(`batchExecute completed with max_task: ${maxConcurrency} and ${completedSuccess} successful tasks.`); return successfulResults; } - //#endregion //#region ../libs_drpy/axios.min.js function e$1(e, t) { @@ -394974,7 +376378,7 @@ const z = "undefined" != typeof queueMicrotask ? queueMicrotask.bind(v) : "undef asap: z }; function J(e, t, n, r, o) { - Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null); + Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = (/* @__PURE__ */ new Error()).stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null); } H.inherits(J, Error, { toJSON: function() { return { @@ -395413,7 +376817,7 @@ var Ee = class { const t = (this[ye] = this[ye] = { accessors: {} }).accessors, n = this.prototype; function r(e) { const r = be(e); - t[r] || (!function(e, t) { + t[r] || (function(e, t) { const n = H.toCamelCase(" " + t); [ "get", @@ -395708,10 +377112,7 @@ const Ue = (e) => { const { done: t, value: r } = await o.next(); if (t) return a(), void e.close(); let s = r.byteLength; - if (n) { - let e = i += s; - n(e); - } + if (n) n(i += s); e.enqueue(new Uint8Array(r)); } catch (e) { throw a(e), e; @@ -395755,13 +377156,10 @@ const Ge = async (e, t) => { return null == n ? (async (e) => { if (null == e) return 0; if (H.isBlob(e)) return e.size; - if (H.isSpecCompliantForm(e)) { - const t = new Request(fe.origin, { - method: "POST", - body: e - }); - return (await t.arrayBuffer()).byteLength; - } + if (H.isSpecCompliantForm(e)) return (await new Request(fe.origin, { + method: "POST", + body: e + }).arrayBuffer()).byteLength; return H.isArrayBufferView(e) || H.isArrayBuffer(e) ? e.byteLength : (H.isURLSearchParams(e) && (e += ""), H.isString(e) ? (await ze(e)).byteLength : void 0); })(t) : n; }, Xe = { @@ -395925,7 +377323,7 @@ var it = class { } catch (e) { if (e instanceof Error) { let t = {}; - Error.captureStackTrace ? Error.captureStackTrace(t) : t = new Error(); + Error.captureStackTrace ? Error.captureStackTrace(t) : t = /* @__PURE__ */ new Error(); const n = t.stack ? t.stack.replace(/^.+\n/, "") : ""; try { e.stack ? n && !String(e.stack).endsWith(n.replace(/^.+\n.+\n/, "")) && (e.stack += "\n" + n) : e.stack = n; @@ -396168,7 +377566,6 @@ dt.Axios = at, dt.CanceledError = Te, dt.CancelToken = ut, dt.isCancel = Se, dt. return H.isObject(e) && !0 === e.isAxiosError; }, dt.mergeConfig = Le, dt.AxiosHeaders = Re, dt.formToJSON = (e) => de(H.isHTMLForm(e) ? new FormData(e) : e), dt.getAdapter = Ye, dt.HttpStatusCode = ft, dt.default = dt; const pt = dt, { Axios: ht, AxiosError: mt, CanceledError: yt, isCancel: bt, CancelToken: gt, VERSION: wt, all: Et, Cancel: Rt, isAxiosError: Ot, spread: St, toFormData: Tt, AxiosHeaders: At, HttpStatusCode: vt, formToJSON: xt, getAdapter: Ct, mergeConfig: Nt } = pt; - //#endregion //#region ../libs_drpy/fetchAxios.js /** @@ -396177,14 +377574,10 @@ const pt = dt, { Axios: ht, AxiosError: mt, CanceledError: yt, isCancel: bt, Can */ let undiciStripUASubscribed = false; function ensureUndiciStripUASubscription() { - if (undiciStripUASubscribed) { - return; - } + if (undiciStripUASubscribed) return; undiciStripUASubscribed = true; diagnosticsChannel.channel("undici:request:create").subscribe(({ request }) => { - if (!request || !Array.isArray(request.headers)) { - return; - } + if (!request || !Array.isArray(request.headers)) return; const headers = request.headers; let shouldStrip = false; for (let i = 0; i < headers.length; i += 2) { @@ -396194,9 +377587,7 @@ function ensureUndiciStripUASubscription() { break; } } - if (!shouldStrip) { - return; - } + if (!shouldStrip) return; for (let i = 0; i < headers.length; i += 2) { const k = headers[i]; if (typeof k === "string" && k.toLowerCase() === "x-remove-user-agent") { @@ -396263,46 +377654,38 @@ var FetchAxios = class { */ async request(urlOrConfig, config = {}) { let finalConfig = {}; - if (typeof urlOrConfig === "string") { - finalConfig = { - ...this.defaults, - ...config, - url: this.defaults.baseURL + urlOrConfig - }; - } else { - finalConfig = { - ...this.defaults, - ...urlOrConfig, - url: this.defaults.baseURL + (urlOrConfig.url || "") - }; - } - for (const interceptor of this.interceptors.request) { - finalConfig = await interceptor(finalConfig) || finalConfig; - } + if (typeof urlOrConfig === "string") finalConfig = { + ...this.defaults, + ...config, + url: this.defaults.baseURL + urlOrConfig + }; + else finalConfig = { + ...this.defaults, + ...urlOrConfig, + url: this.defaults.baseURL + (urlOrConfig.url || "") + }; + for (const interceptor of this.interceptors.request) finalConfig = await interceptor(finalConfig) || finalConfig; if (finalConfig.headers) { const headerKeys = Object.keys(finalConfig.headers); - for (const key of headerKeys) { - if (key.toLowerCase() === "user-agent" && finalConfig.headers[key] === "RemoveUserAgent") { - delete finalConfig.headers[key]; - finalConfig.headers["x-remove-user-agent"] = "1"; - ensureUndiciStripUASubscription(); - break; - } + for (const key of headerKeys) if (key.toLowerCase() === "user-agent" && finalConfig.headers[key] === "RemoveUserAgent") { + delete finalConfig.headers[key]; + finalConfig.headers["x-remove-user-agent"] = "1"; + ensureUndiciStripUASubscription(); + break; } } - let fetchDispatcher = undefined; + let fetchDispatcher = new import_undici.Agent({ connect: { rejectUnauthorized: false } }); try { const proxy = await getSystemProxy(); - if (proxy) { - fetchDispatcher = new import_undici.ProxyAgent(proxy); - } else { + if (proxy) fetchDispatcher = new import_undici.ProxyAgent({ + uri: proxy, + connect: { rejectUnauthorized: false } + }); + else { let fullUrl = finalConfig.url; - if (finalConfig.baseURL && !/^https?:\/\//i.test(fullUrl)) { - try { - const parsed = new URL(fullUrl, finalConfig.baseURL); - fullUrl = parsed.toString(); - } catch (e) {} - } + if (finalConfig.baseURL && !/^https?:\/\//i.test(fullUrl)) try { + fullUrl = new URL(fullUrl, finalConfig.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") { @@ -396310,11 +377693,9 @@ var FetchAxios = class { if (ip && ip !== hostname) { let hasHost = false; const headerKeys = Object.keys(finalConfig.headers || {}); - for (const k of headerKeys) { - if (k.toLowerCase() === "host") { - hasHost = true; - break; - } + for (const k of headerKeys) if (k.toLowerCase() === "host") { + hasHost = true; + break; } if (!hasHost) { finalConfig.headers = finalConfig.headers || {}; @@ -396322,9 +377703,7 @@ var FetchAxios = class { } urlObj.hostname = ip; finalConfig.url = urlObj.toString(); - if (finalConfig.baseURL) { - delete finalConfig.baseURL; - } + if (finalConfig.baseURL) delete finalConfig.baseURL; } } } @@ -396335,41 +377714,31 @@ var FetchAxios = class { } const controller = new AbortController(); let timeoutId; - if (finalConfig.timeout && finalConfig.timeout > 0) { - timeoutId = setTimeout(() => controller.abort(), finalConfig.timeout); - } + if (finalConfig.timeout && finalConfig.timeout > 0) timeoutId = setTimeout(() => controller.abort(), finalConfig.timeout); const fetchOptions = { method: (finalConfig.method || "GET").toUpperCase(), headers: { ...finalConfig.headers }, signal: controller.signal, credentials: finalConfig.withCredentials ? "include" : "same-origin", - agent: finalConfig.httpsAgent || undefined, + agent: finalConfig.httpsAgent || void 0, redirect: finalConfig.maxRedirects === 0 ? "manual" : "follow" }; if (finalConfig.data instanceof import_form_data.default) { fetchOptions.body = finalConfig.data; Object.assign(fetchOptions.headers, finalConfig.data.getHeaders()); } else if (finalConfig.data) { - if (typeof finalConfig.data === "object" && !fetchOptions.headers["Content-Type"]) { - fetchOptions.headers["Content-Type"] = "application/json"; - } + if (typeof finalConfig.data === "object" && !fetchOptions.headers["Content-Type"]) fetchOptions.headers["Content-Type"] = "application/json"; fetchOptions.body = fetchOptions.headers["Content-Type"] === "application/json" ? JSON.stringify(finalConfig.data) : finalConfig.data; } try { - if (fetchDispatcher) { - fetchOptions.dispatcher = fetchDispatcher; - } + if (fetchDispatcher) fetchOptions.dispatcher = fetchDispatcher; let response = await fetch(finalConfig.url, fetchOptions); if (finalConfig.maxRedirects === 0 && response.status >= 300 && response.status < 400) { if (timeoutId) clearTimeout(timeoutId); let emptyData; - if (finalConfig.responseType === "json") { - emptyData = null; - } else if (finalConfig.responseType === "arraybuffer") { - emptyData = new ArrayBuffer(0); - } else { - emptyData = ""; - } + if (finalConfig.responseType === "json") emptyData = null; + else if (finalConfig.responseType === "arraybuffer") emptyData = /* @__PURE__ */ new ArrayBuffer(0); + else emptyData = ""; const redirectResult = { data: emptyData, status: response.status, @@ -396379,26 +377748,20 @@ var FetchAxios = class { request: finalConfig.url }; if (!finalConfig.validateStatus || !finalConfig.validateStatus(response.status)) { - const redirectError = new Error(`Request failed with status code ${response.status}`); + const redirectError = /* @__PURE__ */ new Error(`Request failed with status code ${response.status}`); redirectError.code = "ERR_BAD_REQUEST"; redirectError.config = finalConfig; redirectError.request = finalConfig.url; redirectError.response = redirectResult; redirectError.isAxiosError = true; throw redirectError; - } else { - return redirectResult; - } + } else return redirectResult; } if (timeoutId) clearTimeout(timeoutId); let responseData; - if (finalConfig.responseType === "json") { - responseData = await response.json().catch(() => null); - } else if (finalConfig.responseType === "arraybuffer") { - responseData = await response.arrayBuffer(); - } else { - responseData = await response.text(); - } + if (finalConfig.responseType === "json") responseData = await response.json().catch(() => null); + else if (finalConfig.responseType === "arraybuffer") responseData = await response.arrayBuffer(); + else responseData = await response.text(); let result = { data: responseData, status: response.status, @@ -396407,11 +377770,9 @@ var FetchAxios = class { config: finalConfig, request: finalConfig.url }; - for (const interceptor of this.interceptors.response) { - result = await interceptor(result) || result; - } + for (const interceptor of this.interceptors.response) result = await interceptor(result) || result; if (!finalConfig.validateStatus(response.status)) { - const statusError = new Error(`Request failed with status code ${response.status}`); + const statusError = /* @__PURE__ */ new Error(`Request failed with status code ${response.status}`); statusError.code = response.status >= 400 && response.status < 500 ? "ERR_BAD_REQUEST" : "ERR_BAD_RESPONSE"; statusError.config = finalConfig; statusError.request = finalConfig.url; @@ -396423,20 +377784,18 @@ var FetchAxios = class { } catch (err) { if (timeoutId) clearTimeout(timeoutId); if (err.name === "AbortError") { - const timeoutError = new Error(`Request timeout of ${finalConfig.timeout}ms exceeded`); + const timeoutError = /* @__PURE__ */ new Error(`Request timeout of ${finalConfig.timeout}ms exceeded`); timeoutError.code = "ECONNABORTED"; timeoutError.config = finalConfig; timeoutError.request = finalConfig.url; throw timeoutError; } else if (err.name === "TypeError" && err.message.includes("fetch")) { - const networkError = new Error("Network Error"); + const networkError = /* @__PURE__ */ new Error("Network Error"); networkError.code = "NETWORK_ERROR"; networkError.config = finalConfig; networkError.request = finalConfig.url; throw networkError; - } else { - throw err; - } + } else throw err; } } /** @@ -396525,7 +377884,6 @@ function createHttpsInstance() { httpsAgent }); } - //#endregion //#region ../libs_drpy/underscore-esm.min.js var VERSION = "1.13.6"; @@ -396550,18 +377908,14 @@ function restArguments(func, startIndex) { startIndex = startIndex == null ? func.length - 1 : +startIndex; return function() { var length = Math.max(arguments.length - startIndex, 0), rest = Array(length), index = 0; - for (; index < length; index++) { - rest[index] = arguments[index + startIndex]; - } + for (; index < length; index++) rest[index] = arguments[index + startIndex]; switch (startIndex) { case 0: return func.call(this, rest); case 1: return func.call(this, arguments[0], rest); case 2: return func.call(this, arguments[0], arguments[1], rest); } var args = Array(startIndex + 1); - for (index = 0; index < startIndex; index++) { - args[index] = arguments[index]; - } + for (index = 0; index < startIndex; index++) args[index] = arguments[index]; args[startIndex] = rest; return func.apply(this, args); }; @@ -396597,14 +377951,12 @@ var isSymbol = tagTester("Symbol"); var isArrayBuffer = tagTester("ArrayBuffer"); var isFunction = tagTester("Function"); var nodelist = root.document && root.document.childNodes; -if (typeof /./ != "function" && typeof Int8Array != "object" && typeof nodelist != "function") { - isFunction = function(obj) { - return typeof obj == "function" || false; - }; -} +if (typeof /./ != "function" && typeof Int8Array != "object" && typeof nodelist != "function") isFunction = function(obj) { + return typeof obj == "function" || false; +}; var isFunction$1 = isFunction; var hasObjectTag = tagTester("Object"); -var hasStringTagBug = supportsDataView && hasObjectTag(new DataView(new ArrayBuffer(8))), isIE11 = typeof Map !== "undefined" && hasObjectTag(new Map()); +var hasStringTagBug = supportsDataView && hasObjectTag(/* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(8))), isIE11 = typeof Map !== "undefined" && hasObjectTag(/* @__PURE__ */ new Map()); var isDataView = tagTester("DataView"); function ie10IsDataView(obj) { return obj != null && isFunction$1(obj.getInt8) && isArrayBuffer(obj.buffer); @@ -396616,11 +377968,9 @@ function has$1(obj, key) { } var isArguments = tagTester("Arguments"); (function() { - if (!isArguments(arguments)) { - isArguments = function(obj) { - return has$1(obj, "callee"); - }; - } + if (!isArguments(arguments)) isArguments = function(obj) { + return has$1(obj, "callee"); + }; })(); var isArguments$1 = isArguments; function isFinite$1(obj) { @@ -396675,9 +378025,7 @@ function collectNonEnumProps(obj, keys) { if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop); while (nonEnumIdx--) { prop = nonEnumerableProps[nonEnumIdx]; - if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) { - keys.push(prop); - } + if (prop in obj && obj[prop] !== proto[prop] && !keys.contains(prop)) keys.push(prop); } } function keys(obj) { @@ -396752,32 +378100,25 @@ function deepEq(a, b, aStack, bStack) { } var areArrays = className === "[object Array]"; if (!areArrays && isTypedArray$1(a)) { - var byteLength = getByteLength(a); - if (byteLength !== getByteLength(b)) return false; + if (getByteLength(a) !== getByteLength(b)) return false; if (a.buffer === b.buffer && a.byteOffset === b.byteOffset) return true; areArrays = true; } if (!areArrays) { if (typeof a != "object" || typeof b != "object") return false; var aCtor = a.constructor, bCtor = b.constructor; - if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor && isFunction$1(bCtor) && bCtor instanceof bCtor) && "constructor" in a && "constructor" in b) { - return false; - } + if (aCtor !== bCtor && !(isFunction$1(aCtor) && aCtor instanceof aCtor && isFunction$1(bCtor) && bCtor instanceof bCtor) && "constructor" in a && "constructor" in b) return false; } aStack = aStack || []; bStack = bStack || []; var length = aStack.length; - while (length--) { - if (aStack[length] === a) return bStack[length] === b; - } + while (length--) if (aStack[length] === a) return bStack[length] === b; aStack.push(a); bStack.push(b); if (areArrays) { length = a.length; if (length !== b.length) return false; - while (length--) { - if (!eq(a[length], b[length], aStack, bStack)) return false; - } + while (length--) if (!eq(a[length], b[length], aStack, bStack)) return false; } else { var _keys = keys(a), key; length = _keys.length; @@ -396805,11 +378146,8 @@ function ie11fingerprint(methods) { var length = getLength(methods); return function(obj) { if (obj == null) return false; - var keys = allKeys(obj); - if (getLength(keys)) return false; - for (var i = 0; i < length; i++) { - if (!isFunction$1(obj[methods[i]])) return false; - } + if (getLength(allKeys(obj))) return false; + for (var i = 0; i < length; i++) if (!isFunction$1(obj[methods[i]])) return false; return methods !== weakMapMethods || !isFunction$1(obj[forEachName]); }; } @@ -396827,33 +378165,25 @@ function values(obj) { var _keys = keys(obj); var length = _keys.length; var values = Array(length); - for (var i = 0; i < length; i++) { - values[i] = obj[_keys[i]]; - } + for (var i = 0; i < length; i++) values[i] = obj[_keys[i]]; return values; } function pairs(obj) { var _keys = keys(obj); var length = _keys.length; var pairs = Array(length); - for (var i = 0; i < length; i++) { - pairs[i] = [_keys[i], obj[_keys[i]]]; - } + for (var i = 0; i < length; i++) pairs[i] = [_keys[i], obj[_keys[i]]]; return pairs; } function invert(obj) { var result = {}; var _keys = keys(obj); - for (var i = 0, length = _keys.length; i < length; i++) { - result[obj[_keys[i]]] = _keys[i]; - } + for (var i = 0, length = _keys.length; i < length; i++) result[obj[_keys[i]]] = _keys[i]; return result; } function functions(obj) { var names = []; - for (var key in obj) { - if (isFunction$1(obj[key])) names.push(key); - } + for (var key in obj) if (isFunction$1(obj[key])) names.push(key); return names.sort(); } function createAssigner(keysFunc, defaults) { @@ -397004,7 +378334,7 @@ function random(min, max) { return min + Math.floor(Math.random() * (max - min + 1)); } var now = Date.now || function() { - return new Date().getTime(); + return (/* @__PURE__ */ new Date()).getTime(); }; function createEscaper(map) { var escaper = function(match) { @@ -397061,13 +378391,9 @@ function template(text, settings, oldSettings) { text.replace(matcher, function(match, escape, interpolate, evaluate, offset) { source += text.slice(index, offset).replace(escapeRegExp, escapeChar); index = offset + match.length; - if (escape) { - source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; - } else if (interpolate) { - source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; - } else if (evaluate) { - source += "';\n" + evaluate + "\n__p+='"; - } + if (escape) source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'"; + else if (interpolate) source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'"; + else if (evaluate) source += "';\n" + evaluate + "\n__p+='"; return match; }); source += "';\n"; @@ -397078,7 +378404,7 @@ function template(text, settings, oldSettings) { source = "with(obj||{}){\n" + source + "}\n"; argument = "obj"; } - source = "var __t,__p='',__j=Array.prototype.join," + "print=function(){__p+=__j.call(arguments,'');};\n" + source + "return __p;\n"; + source = "var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n" + source + "return __p;\n"; var render; try { render = new Function(argument, "_", source); @@ -397095,9 +378421,7 @@ function template(text, settings, oldSettings) { function result(obj, path, fallback) { path = toPath(path); var length = path.length; - if (!length) { - return isFunction$1(fallback) ? fallback.call(obj) : fallback; - } + if (!length) return isFunction$1(fallback) ? fallback.call(obj) : fallback; for (var i = 0; i < length; i++) { var prop = obj == null ? void 0 : obj[path[i]]; if (prop === void 0) { @@ -397130,9 +378454,7 @@ var partial = restArguments(function(func, boundArgs) { var bound = function() { var position = 0, length = boundArgs.length; var args = Array(length); - for (var i = 0; i < length; i++) { - args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i]; - } + for (var i = 0; i < length; i++) args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i]; while (position < arguments.length) args.push(arguments[position++]); return executeBound(func, bound, this, this, args); }; @@ -397149,25 +378471,19 @@ var bind = restArguments(function(func, context, args) { var isArrayLike = createSizePropertyCheck(getLength); function flatten$1(input, depth, strict, output) { output = output || []; - if (!depth && depth !== 0) { - depth = Infinity; - } else if (depth <= 0) { - return output.concat(input); - } + if (!depth && depth !== 0) depth = Infinity; + else if (depth <= 0) return output.concat(input); var idx = output.length; for (var i = 0, length = getLength(input); i < length; i++) { var value = input[i]; - if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) { - if (depth > 1) { - flatten$1(value, depth - 1, strict, output); - idx = output.length; - } else { - var j = 0, len = value.length; - while (j < len) output[idx++] = value[j++]; - } - } else if (!strict) { - output[idx++] = value; + if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) if (depth > 1) { + flatten$1(value, depth - 1, strict, output); + idx = output.length; + } else { + var j = 0, len = value.length; + while (j < len) output[idx++] = value[j++]; } + else if (!strict) output[idx++] = value; } return output; } @@ -397221,9 +378537,7 @@ function throttle(func, wait, options) { previous = _now; result = func.apply(context, args); if (!timeout) context = args = null; - } else if (!timeout && options.trailing !== false) { - timeout = setTimeout(later, remaining); - } + } else if (!timeout && options.trailing !== false) timeout = setTimeout(later, remaining); return result; }; throttled.cancel = function() { @@ -397237,9 +378551,8 @@ function debounce(func, wait, immediate) { var timeout, previous, args, result, context; var later = function() { var passed = now() - previous; - if (wait > passed) { - timeout = setTimeout(later, wait - passed); - } else { + if (wait > passed) timeout = setTimeout(later, wait - passed); + else { timeout = null; if (!immediate) result = func.apply(context, args); if (!timeout) args = context = null; @@ -397281,17 +378594,13 @@ function compose() { } function after(times, func) { return function() { - if (--times < 1) { - return func.apply(this, arguments); - } + if (--times < 1) return func.apply(this, arguments); }; } function before(times, func) { var memo; return function() { - if (--times > 0) { - memo = func.apply(this, arguments); - } + if (--times > 0) memo = func.apply(this, arguments); if (times <= 1) func = null; return memo; }; @@ -397310,9 +378619,7 @@ function createPredicateIndexFinder(dir) { predicate = cb(predicate, context); var length = getLength(array); var index = dir > 0 ? 0 : length - 1; - for (; index >= 0 && index < length; index += dir) { - if (predicate(array[index], index, array)) return index; - } + for (; index >= 0 && index < length; index += dir) if (predicate(array[index], index, array)) return index; return -1; }; } @@ -397332,13 +378639,9 @@ function sortedIndex(array, obj, iteratee, context) { function createIndexFinder(dir, predicateFind, sortedIndex) { return function(array, item, idx) { var i = 0, length = getLength(array); - if (typeof idx == "number") { - if (dir > 0) { - i = idx >= 0 ? idx : Math.max(idx + length, i); - } else { - length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; - } - } else if (sortedIndex && idx && length) { + if (typeof idx == "number") if (dir > 0) i = idx >= 0 ? idx : Math.max(idx + length, i); + else length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1; + else if (sortedIndex && idx && length) { idx = sortedIndex(array, item); return array[idx] === item ? idx : -1; } @@ -397346,17 +378649,14 @@ function createIndexFinder(dir, predicateFind, sortedIndex) { idx = predicateFind(slice.call(array, i, length), isNaN$1); return idx >= 0 ? idx + i : -1; } - for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) { - if (array[idx] === item) return idx; - } + for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) if (array[idx] === item) return idx; return -1; }; } var indexOf = createIndexFinder(1, findIndex, sortedIndex); var lastIndexOf = createIndexFinder(-1, findLastIndex); function find(obj, predicate, context) { - var keyFinder = isArrayLike(obj) ? findIndex : findKey; - var key = keyFinder(obj, predicate, context); + var key = (isArrayLike(obj) ? findIndex : findKey)(obj, predicate, context); if (key !== void 0 && key !== -1) return obj[key]; } function findWhere(obj, attrs) { @@ -397365,15 +378665,10 @@ function findWhere(obj, attrs) { function each(obj, iteratee, context) { iteratee = optimizeCb(iteratee, context); var i, length; - if (isArrayLike(obj)) { - for (i = 0, length = obj.length; i < length; i++) { - iteratee(obj[i], i, obj); - } - } else { + if (isArrayLike(obj)) for (i = 0, length = obj.length; i < length; i++) iteratee(obj[i], i, obj); + else { var _keys = keys(obj); - for (i = 0, length = _keys.length; i < length; i++) { - iteratee(obj[_keys[i]], _keys[i], obj); - } + for (i = 0, length = _keys.length; i < length; i++) iteratee(obj[_keys[i]], _keys[i], obj); } return obj; } @@ -397442,9 +378737,8 @@ function contains(obj, item, fromIndex, guard) { } var invoke = restArguments(function(obj, path, args) { var contextPath, func; - if (isFunction$1(path)) { - func = path; - } else { + if (isFunction$1(path)) func = path; + else { path = toPath(path); contextPath = path.slice(0, -1); path = path[path.length - 1]; @@ -397452,9 +378746,7 @@ var invoke = restArguments(function(obj, path, args) { return map(obj, function(context) { var method = func; if (!method) { - if (contextPath && contextPath.length) { - context = deepGet(context, contextPath); - } + if (contextPath && contextPath.length) context = deepGet(context, contextPath); if (context == null) return void 0; method = context[path]; } @@ -397473,9 +378765,7 @@ function max(obj, iteratee, context) { obj = isArrayLike(obj) ? obj : values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; - if (value != null && value > result) { - result = value; - } + if (value != null && value > result) result = value; } } else { iteratee = cb(iteratee, context); @@ -397495,9 +378785,7 @@ function min(obj, iteratee, context) { obj = isArrayLike(obj) ? obj : values(obj); for (var i = 0, length = obj.length; i < length; i++) { value = obj[i]; - if (value != null && value < result) { - result = value; - } + if (value != null && value < result) result = value; } } else { iteratee = cb(iteratee, context); @@ -397515,9 +378803,7 @@ var reStrSymbol = /[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udff function toArray(obj) { if (!obj) return []; if (isArray(obj)) return slice.call(obj); - if (isString(obj)) { - return obj.match(reStrSymbol); - } + if (isString(obj)) return obj.match(reStrSymbol); if (isArrayLike(obj)) return map(obj, identity); return values(obj); } @@ -397565,8 +378851,7 @@ function group(behavior, partition) { var result = partition ? [[], []] : {}; iteratee = cb(iteratee, context); each(obj, function(value, index) { - var key = iteratee(value, index, obj); - behavior(result, value, key); + behavior(result, value, iteratee(value, index, obj)); }); return result; }; @@ -397673,9 +378958,7 @@ function uniq(array, isSorted, iteratee, context) { seen.push(computed); result.push(value); } - } else if (!contains(result, value)) { - result.push(value); - } + } else if (!contains(result, value)) result.push(value); } return result; } @@ -397689,9 +378972,7 @@ function intersection(array) { var item = array[i]; if (contains(result, item)) continue; var j; - for (j = 1; j < argsLength; j++) { - if (!contains(arguments[j], item)) break; - } + for (j = 1; j < argsLength; j++) if (!contains(arguments[j], item)) break; if (j === argsLength) result.push(item); } return result; @@ -397699,21 +378980,14 @@ function intersection(array) { function unzip(array) { var length = array && max(array, getLength).length || 0; var result = Array(length); - for (var index = 0; index < length; index++) { - result[index] = pluck(array, index); - } + for (var index = 0; index < length; index++) result[index] = pluck(array, index); return result; } var zip = restArguments(unzip); function object(list, values) { var result = {}; - for (var i = 0, length = getLength(list); i < length; i++) { - if (values) { - result[list[i]] = values[i]; - } else { - result[list[i][0]] = list[i][1]; - } - } + for (var i = 0, length = getLength(list); i < length; i++) if (values) result[list[i]] = values[i]; + else result[list[i][0]] = list[i][1]; return result; } function range(start, stop, step) { @@ -397721,23 +378995,17 @@ function range(start, stop, step) { stop = start || 0; start = 0; } - if (!step) { - step = stop < start ? -1 : 1; - } + if (!step) step = stop < start ? -1 : 1; var length = Math.max(Math.ceil((stop - start) / step), 0); var range = Array(length); - for (var idx = 0; idx < length; idx++, start += step) { - range[idx] = start; - } + for (var idx = 0; idx < length; idx++, start += step) range[idx] = start; return range; } function chunk(array, count) { if (count == null || count < 1) return []; var result = []; var i = 0, length = array.length; - while (i < length) { - result.push(slice.call(array, i, i += count)); - } + while (i < length) result.push(slice.call(array, i, i += count)); return result; } function chainResult(instance, obj) { @@ -397768,9 +379036,7 @@ each([ var obj = this._wrapped; if (obj != null) { method.apply(obj, arguments); - if ((name === "shift" || name === "splice") && obj.length === 0) { - delete obj[0]; - } + if ((name === "shift" || name === "splice") && obj.length === 0) delete obj[0]; } return chainResult(this, obj); }; @@ -397938,7 +379204,6 @@ var allExports = { }; var _ = mixin(allExports); _._ = _; - //#endregion //#region ../node_modules/tunnel/lib/tunnel.js var require_tunnel$1 = /* @__PURE__ */ __commonJSMin(((exports) => { @@ -398032,9 +379297,7 @@ var require_tunnel$1 = /* @__PURE__ */ __commonJSMin(((exports) => { agent: false, headers: { host: options.host + ":" + options.port } }); - if (options.localAddress) { - connectOptions.localAddress = options.localAddress; - } + if (options.localAddress) connectOptions.localAddress = options.localAddress; if (connectOptions.proxyAuth) { connectOptions.headers = connectOptions.headers || {}; connectOptions.headers["Proxy-Authorization"] = "Basic " + new Buffer(connectOptions.proxyAuth).toString("base64"); @@ -398061,7 +379324,7 @@ var require_tunnel$1 = /* @__PURE__ */ __commonJSMin(((exports) => { if (res.statusCode !== 200) { debug("tunneling socket could not be established, statusCode=%d", res.statusCode); socket.destroy(); - var error = new Error("tunneling socket could not be established, " + "statusCode=" + res.statusCode); + var error = /* @__PURE__ */ new Error("tunneling socket could not be established, statusCode=" + res.statusCode); error.code = "ECONNRESET"; options.request.emit("error", error); self.removeSocket(placeholder); @@ -398070,7 +379333,7 @@ var require_tunnel$1 = /* @__PURE__ */ __commonJSMin(((exports) => { if (head.length > 0) { debug("got illegal response body from proxy"); socket.destroy(); - var error = new Error("got illegal response body from proxy"); + var error = /* @__PURE__ */ new Error("got illegal response body from proxy"); error.code = "ECONNRESET"; options.request.emit("error", error); self.removeSocket(placeholder); @@ -398083,7 +379346,7 @@ var require_tunnel$1 = /* @__PURE__ */ __commonJSMin(((exports) => { function onError(cause) { connectReq.removeAllListeners(); debug("tunneling socket could not be established, cause=%s\n", cause.message, cause.stack); - var error = new Error("tunneling socket could not be established, " + "cause=" + cause.message); + var error = /* @__PURE__ */ new Error("tunneling socket could not be established, cause=" + cause.message); error.code = "ECONNRESET"; options.request.emit("error", error); self.removeSocket(placeholder); @@ -398091,16 +379354,12 @@ var require_tunnel$1 = /* @__PURE__ */ __commonJSMin(((exports) => { }; TunnelingAgent.prototype.removeSocket = function removeSocket(socket) { var pos = this.sockets.indexOf(socket); - if (pos === -1) { - return; - } + if (pos === -1) return; this.sockets.splice(pos, 1); var pending = this.requests.shift(); - if (pending) { - this.createSocket(pending, function(socket) { - pending.request.onSocket(socket); - }); - } + if (pending) this.createSocket(pending, function(socket) { + pending.request.onSocket(socket); + }); }; function createSecureSocket(options, cb) { var self = this; @@ -398116,13 +379375,11 @@ var require_tunnel$1 = /* @__PURE__ */ __commonJSMin(((exports) => { }); } function toOptions(host, port, localAddress) { - if (typeof host === "string") { - return { - host, - port, - localAddress - }; - } + if (typeof host === "string") return { + host, + port, + localAddress + }; return host; } function mergeOptions(target) { @@ -398132,50 +379389,38 @@ var require_tunnel$1 = /* @__PURE__ */ __commonJSMin(((exports) => { var keys = Object.keys(overrides); for (var j = 0, keyLen = keys.length; j < keyLen; ++j) { var k = keys[j]; - if (overrides[k] !== undefined) { - target[k] = overrides[k]; - } + if (overrides[k] !== void 0) target[k] = overrides[k]; } } } return target; } var debug; - if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) { - debug = function() { - var args = Array.prototype.slice.call(arguments); - if (typeof args[0] === "string") { - args[0] = "TUNNEL: " + args[0]; - } else { - args.unshift("TUNNEL:"); - } - console.error.apply(console, args); - }; - } else { - debug = function() {}; - } + if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) debug = function() { + var args = Array.prototype.slice.call(arguments); + if (typeof args[0] === "string") args[0] = "TUNNEL: " + args[0]; + else args.unshift("TUNNEL:"); + console.error.apply(console, args); + }; + else debug = function() {}; exports.debug = debug; })); - //#endregion //#region ../node_modules/tunnel/index.js var require_tunnel = /* @__PURE__ */ __commonJSMin(((exports, module) => { module.exports = require_tunnel$1(); })); - //#endregion //#region ../libs_drpy/jsonpathplus.min.js var require_jsonpathplus_min = /* @__PURE__ */ __commonJSMin(((exports, module) => { - !function(e, t) { + (function(e, t) { "object" == typeof exports && "undefined" != typeof module ? t(exports) : "function" == typeof define && define.amd ? define(["exports"], t) : t((e = "undefined" != typeof globalThis ? globalThis : e || self).JSONPath = {}); - }(exports, function(e) { + })(exports, function(e) { "use strict"; function n(e, t, r) { return t = l(t), function(e, t) { - { - if (t && ("object" == typeof t || "function" == typeof t)) return t; - if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined"); - } + if (t && ("object" == typeof t || "function" == typeof t)) return t; + if (void 0 !== t) throw new TypeError("Derived constructors may only return object or undefined"); return function(e) { if (void 0 !== e) return e; throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); @@ -398207,8 +379452,8 @@ var require_jsonpathplus_min = /* @__PURE__ */ __commonJSMin(((exports, module) for (var e = 1; e < arguments.length; e++) { var i = null != arguments[e] ? arguments[e] : {}; e % 2 ? t(Object(i), !0).forEach(function(e) { - var t, r; - t = n, e = i[r = e], (r = a(r)) in t ? Object.defineProperty(t, r, { + var t = n, r; + e = i[r = e], (r = a(r)) in t ? Object.defineProperty(t, r, { value: e, enumerable: !0, configurable: !0, @@ -398260,7 +379505,7 @@ var require_jsonpathplus_min = /* @__PURE__ */ __commonJSMin(((exports, module) })(e, t); } function p(e) { - var r = "function" == typeof Map ? new Map() : void 0; + var r = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0; return (p = function(e) { if (null === e || !function(t) { try { @@ -398358,7 +379603,7 @@ var require_jsonpathplus_min = /* @__PURE__ */ __commonJSMin(((exports, module) { key: "throwError", value: function(e) { - var t = new Error(e + " at character " + this.index); + var t = /* @__PURE__ */ new Error(e + " at character " + this.index); throw t.index = this.index, t.description = e, t; } }, @@ -398818,7 +380063,7 @@ var require_jsonpathplus_min = /* @__PURE__ */ __commonJSMin(((exports, module) "/": 10, "%": 10 }, - right_associative: new Set(), + right_associative: /* @__PURE__ */ new Set(), additional_identifier_chars: new Set(["$", "_"]), literals: { true: !0, @@ -398932,7 +380177,7 @@ var require_jsonpathplus_min = /* @__PURE__ */ __commonJSMin(((exports, module) prefix: !1 })); }), t.hooks.add("after-expression", function(e) { - e.node && !function t(e) { + e.node && function t(e) { g.assignmentOperators.has(e.operator) ? (e.type = "AssignmentExpression", t(e.left), t(e.right)) : e.operator || Object.values(e).forEach(function(e) { e && "object" === C(e) && t(e); }); @@ -399219,7 +380464,8 @@ var require_jsonpathplus_min = /* @__PURE__ */ __commonJSMin(((exports, module) }, F.toPathArray = function(e) { var t = F.cache; if (t[e]) return t[e].concat(); - var r = [], n = e.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/g, ";$&;").replace(/['\[](\??\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\))['\]](?!(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])\])/g, function(e, t) { + var r = []; + return t[e] = e.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/g, ";$&;").replace(/['\[](\??\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\))['\]](?!(?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])\])/g, function(e, t) { return "[#" + (r.push(t) - 1) + "]"; }).replace(/\[["']((?:[\0-&\(-\\\^-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)["']\]/g, function(e, t) { return "['" + t.replace(/\./g, "%@%").replace(/~/g, "%%@@%%") + "']"; @@ -399228,8 +380474,7 @@ var require_jsonpathplus_min = /* @__PURE__ */ __commonJSMin(((exports, module) }).replace(/;;;|;;/g, ";..;").replace(/;$|'?\]|'$/g, "").split(";").map(function(e) { var t = e.match(/#([0-9]+)/); return t && t[1] ? r[t[1]] : e; - }); - return t[e] = n, t[e].concat(); + }), t[e].concat(); }; E.plugins.register(b, g); var D = { @@ -399393,9 +380638,9 @@ var require_jsonpathplus_min = /* @__PURE__ */ __commonJSMin(((exports, module) key: "runInNewContext", value: function(n) { var e = this.code, t = Object.keys(n), r = []; - !function(e, t, r) { + (function(e, t, r) { for (var n = e.length, i = 0; i < n; i++) r(e[i]) && t.push(e.splice(i--, 1)[0]); - }(t, r, function(e) { + })(t, r, function(e) { return "function" == typeof n[e]; }); var i = t.map(function(e) { @@ -399412,7 +380657,6 @@ var require_jsonpathplus_min = /* @__PURE__ */ __commonJSMin(((exports, module) }() }, F.prototype.safeVm = { Script: b }, e.JSONPath = F, e.SafeScript = b; }); })); - //#endregion //#region ../libs_drpy/htmlParser.js var import_tunnel = /* @__PURE__ */ __toESM(require_tunnel(), 1); @@ -399457,8 +380701,7 @@ var Jsoup = class { * @returns {boolean} 是否匹配 */ test(text, string) { - const searchObj = new RegExp(text, "mi").exec(string); - return searchObj ? true : false; + return new RegExp(text, "mi").exec(string) ? true : false; } /** * 检查字符串是否包含指定内容 @@ -399482,23 +380725,15 @@ var Jsoup = class { for (let i = 0; i < parses.length; i++) { const ps_list = parses[i].split(" "); const ps = ps_list[ps_list.length - 1]; - if (!this.test(NOADD_INDEX, ps)) { - if (!first && i >= parses.length - 1) { - new_parses.push(parses[i]); - } else { - new_parses.push(`${parses[i]}:eq(0)`); - } - } else { - new_parses.push(parses[i]); - } + if (!this.test(NOADD_INDEX, ps)) if (!first && i >= parses.length - 1) new_parses.push(parses[i]); + else new_parses.push(`${parses[i]}:eq(0)`); + else new_parses.push(parses[i]); } parse = new_parses.join(" "); } else { const ps_list = parse.split(" "); const ps = ps_list[ps_list.length - 1]; - if (!this.test(NOADD_INDEX, ps) && first) { - parse = `${parse}:eq(0)`; - } + if (!this.test(NOADD_INDEX, ps) && first) parse = `${parse}:eq(0)`; } return parse; } @@ -399564,9 +380799,7 @@ var Jsoup = class { if (this.contains(nparse, ":eq")) ret = ret.eq(nparse_index); if (excludes.length > 0 && ret) { ret = ret.clone(); - for (let exclude of excludes) { - ret.find(exclude).remove(); - } + for (let exclude of excludes) ret.find(exclude).remove(); } return ret; } @@ -399603,11 +380836,10 @@ var Jsoup = class { ret = this.parseOneRule(doc, nparse, ret); if (!ret) return []; } - const res = (ret?.toArray() ?? []).map((item) => { + return (ret?.toArray() ?? []).map((item) => { const res_html = `${doc(item)}`; return res_html ? res_html : ""; }); - return res; } /** * 解析HTML获取列表数据 @@ -399653,11 +380885,8 @@ var Jsoup = class { this.pdfa_doc = doc; } } - if (parse === "body&&Text" || parse === "Text") { - return this.parseText(doc.text()); - } else if (parse === "body&&Html" || parse === "Html") { - return doc.html(); - } + if (parse === "body&&Text" || parse === "Text") return this.parseText(doc.text()); + else if (parse === "body&&Html" || parse === "Html") return doc.html(); let option; if (this.contains(parse, "&&")) { const parts = parse.split("&&"); @@ -399671,37 +380900,29 @@ var Jsoup = class { ret = this.parseOneRule(doc, nparse, ret); if (!ret) return ""; } - if (option) { - switch (option) { - case "Text": - ret = ret ? this.parseText(ret.text()) : ""; - break; - case "Html": - ret = ret ? ret.html() : ""; - break; - default: - const originalRet = ret.clone(); - const options = option.split("||"); - for (const opt of options) { - ret = originalRet?.attr(opt) || ""; - if (this.contains(opt.toLowerCase(), "style") && this.contains(ret, "url(")) { - try { - ret = ret.match(/url\((.*?)\)/)[1]; - ret = ret.replace(/^['"]|['"]$/g, ""); - } catch {} - } - if (ret && baseUrl) { - const needAdd = this.test(URLJOIN_ATTR, opt) && !this.test(SPECIAL_URL$1, ret); - if (needAdd) { - ret = ret.includes("http") ? ret.slice(ret.indexOf("http")) : urljoin$2(baseUrl, ret); - } - } - if (ret) break; + if (option) switch (option) { + case "Text": + ret = ret ? this.parseText(ret.text()) : ""; + break; + case "Html": + ret = ret ? ret.html() : ""; + break; + default: + const originalRet = ret.clone(); + const options = option.split("||"); + for (const opt of options) { + ret = originalRet?.attr(opt) || ""; + if (this.contains(opt.toLowerCase(), "style") && this.contains(ret, "url(")) try { + ret = ret.match(/url\((.*?)\)/)[1]; + ret = ret.replace(/^['"]|['"]$/g, ""); + } catch {} + if (ret && baseUrl) { + if (this.test(URLJOIN_ATTR, opt) && !this.test(SPECIAL_URL$1, ret)) ret = ret.includes("http") ? ret.slice(ret.indexOf("http")) : urljoin$2(baseUrl, ret); } - } - } else { - ret = `${ret}`; + if (ret) break; + } } + else ret = `${ret}`; return ret; } /** @@ -399773,14 +380994,11 @@ var Jsoup = class { } if (!parse.startsWith("$.")) parse = "$." + parse; const result = jsonpath$1.query(html, parse); - if (Array.isArray(result) && Array.isArray(result[0]) && result.length === 1) { - return result[0]; - } + if (Array.isArray(result) && Array.isArray(result[0]) && result.length === 1) return result[0]; return result || []; } }; const jsoup$1 = Jsoup; - //#endregion //#region ../libs_drpy/hls-parser.js /** @@ -400216,10 +381434,10 @@ var t = { exports: {} }; ]; } function O(t, e) { - var n = function(t) { + var a = r(function(t) { var e = t.indexOf(":"); return -1 === e ? [t.slice(1).trim(), null] : [t.slice(1, e).trim(), t.slice(e + 1).trim()]; - }(t), a = r(n, 2), i = a[0], o = a[1], s = function(t) { + }(t), 2), i = a[0], o = a[1], s = function(t) { switch (t) { case "EXTM3U": case "EXT-X-VERSION": return "Basic"; @@ -400270,7 +381488,7 @@ var t = { exports: {} }; } }(s, e), "Unknown" === s) return null; "MediaPlaylist" === s && "EXT-X-RENDITION-REPORT" !== i && "EXT-X-PREFETCH" !== i && (e.hash[i] && l.INVALIDPLAYLIST("There MUST NOT be more than one Media Playlist tag of each type in any Media Playlist"), e.hash[i] = !0); - var u = function(t, e) { + var c = r(function(t, e) { switch (t) { case "EXTM3U": case "EXT-X-DISCONTINUITY": @@ -400304,7 +381522,7 @@ var t = { exports: {} }; case "EXT-X-PROGRAM-DATE-TIME": return [new Date(e), null]; default: return [e, null]; } - }(i, o), c = r(u, 2); + }(i, o), 2); return { name: i, category: s, @@ -400449,7 +381667,7 @@ var t = { exports: {} }; } } return function(t) { - for (var e = new Map(), n = new Map(), r = !1, i = !1, o = t.length - 1; o >= 0; o--) { + for (var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = !1, i = !1, o = t.length - 1; o >= 0; o--) { var s = t[o], u = s.programDateTime, c = s.dateRange; if (u && (i = !0), c && c.start) { r = !0, c.endOnNext && (c.end || c.duration) && l.INVALIDPLAYLIST("An EXT-X-DATERANGE tag with an END-ON-NEXT=YES attribute MUST NOT contain DURATION or END-DATE attributes."); @@ -400673,7 +381891,7 @@ var t = { exports: {} }; }, l.apply(this, arguments); } function T(t) { - var e = "function" == typeof Map ? new Map() : void 0; + var e = "function" == typeof Map ? /* @__PURE__ */ new Map() : void 0; return T = function(t) { if (null === t || !function(t) { try { @@ -401193,12 +382411,12 @@ var t = { exports: {} }; return I(e, t), e; }; Object.defineProperty(e, "__esModule", { value: !0 }), e.RenditionReport = e.PrefetchSegment = e.PartialSegment = e.Segment = e.MediaPlaylist = e.MasterPlaylist = e.Playlist = e.SpliceInfo = e.DateRange = e.MediaInitializationSection = e.Key = e.SessionData = e.Variant = e.Rendition = void 0; - var A = v(n(203)), y = f((function t(e) { + var A = v(n(203)); + e.Rendition = f((function t(e) { var n = e.type, r = e.uri, a = e.groupId, i = e.language, o = e.assocLanguage, s = e.name, u = e.isDefault, c = e.autoselect, l = e.forced, T = e.instreamId, f = e.characteristics, h = e.channels; E(this, t), d(this, "type", void 0), d(this, "uri", void 0), d(this, "groupId", void 0), d(this, "language", void 0), d(this, "assocLanguage", void 0), d(this, "name", void 0), d(this, "isDefault", void 0), d(this, "autoselect", void 0), d(this, "forced", void 0), d(this, "instreamId", void 0), d(this, "characteristics", void 0), d(this, "channels", void 0), A.PARAMCHECK(n, a, s), A.CONDITIONALASSERT(["SUBTITLES" === n, r], ["CLOSED-CAPTIONS" === n, T], ["CLOSED-CAPTIONS" === n, !r], [l, "SUBTITLES" === n]), this.type = n, this.uri = r, this.groupId = a, this.language = i, this.assocLanguage = o, this.name = s, this.isDefault = u, this.autoselect = c, this.forced = l, this.instreamId = T, this.characteristics = f, this.channels = h; })); - e.Rendition = y; - var S = f((function t(e) { + e.Variant = f((function t(e) { var n = e.uri, r = e.isIFrameOnly, a = void 0 !== r && r, i = e.bandwidth, o = e.averageBandwidth, s = e.score, u = e.codecs, c = e.resolution, l = e.frameRate, T = e.hdcpLevel, f = e.allowedCpc, h = e.videoRange, p = e.stableVariantId, I = e.programId, v = e.audio, y = void 0 === v ? [] : v, S = e.video, N = void 0 === S ? [] : S, m = e.subtitles, X = void 0 === m ? [] : m, g = e.closedCaptions, O = void 0 === g ? [] : g, b = e.currentRenditions, R = void 0 === b ? { audio: 0, video: 0, @@ -401207,32 +382425,26 @@ var t = { exports: {} }; } : b; E(this, t), d(this, "uri", void 0), d(this, "isIFrameOnly", void 0), d(this, "bandwidth", void 0), d(this, "averageBandwidth", void 0), d(this, "score", void 0), d(this, "codecs", void 0), d(this, "resolution", void 0), d(this, "frameRate", void 0), d(this, "hdcpLevel", void 0), d(this, "allowedCpc", void 0), d(this, "videoRange", void 0), d(this, "stableVariantId", void 0), d(this, "programId", void 0), d(this, "audio", void 0), d(this, "video", void 0), d(this, "subtitles", void 0), d(this, "closedCaptions", void 0), d(this, "currentRenditions", void 0), A.PARAMCHECK(n, i), this.uri = n, this.isIFrameOnly = a, this.bandwidth = i, this.averageBandwidth = o, this.score = s, this.codecs = u, this.resolution = c, this.frameRate = l, this.hdcpLevel = T, this.allowedCpc = f, this.videoRange = h, this.stableVariantId = p, this.programId = I, this.audio = y, this.video = N, this.subtitles = X, this.closedCaptions = O, this.currentRenditions = R; })); - e.Variant = S; - var N = f((function t(e) { + e.SessionData = f((function t(e) { var n = e.id, r = e.value, a = e.uri, i = e.language; E(this, t), d(this, "id", void 0), d(this, "value", void 0), d(this, "uri", void 0), d(this, "language", void 0), A.PARAMCHECK(n, r || a), A.ASSERT("SessionData cannot have both value and uri, shoud be either.", !(r && a)), this.id = n, this.value = r, this.uri = a, this.language = i; })); - e.SessionData = N; - var m = f((function t(e) { + e.Key = f((function t(e) { var n = e.method, r = e.uri, a = e.iv, i = e.format, o = e.formatVersion; E(this, t), d(this, "method", void 0), d(this, "uri", void 0), d(this, "iv", void 0), d(this, "format", void 0), d(this, "formatVersion", void 0), A.PARAMCHECK(n), A.CONDITIONALPARAMCHECK(["NONE" !== n, r]), A.CONDITIONALASSERT(["NONE" === n, !(r || a || i || o)]), this.method = n, this.uri = r, this.iv = a, this.format = i, this.formatVersion = o; })); - e.Key = m; - var X = f((function t(e) { + e.MediaInitializationSection = f((function t(e) { var n = e.hint, r = void 0 !== n && n, a = e.uri, i = e.mimeType, o = e.byterange; E(this, t), d(this, "hint", void 0), d(this, "uri", void 0), d(this, "mimeType", void 0), d(this, "byterange", void 0), A.PARAMCHECK(a), this.hint = r, this.uri = a, this.mimeType = i, this.byterange = o; })); - e.MediaInitializationSection = X; - var g = f((function t(e) { + e.DateRange = f((function t(e) { var n = e.id, r = e.classId, a = e.start, i = e.end, o = e.duration, s = e.plannedDuration, u = e.endOnNext, c = e.attributes, l = void 0 === c ? {} : c; E(this, t), d(this, "id", void 0), d(this, "classId", void 0), d(this, "start", void 0), d(this, "end", void 0), d(this, "duration", void 0), d(this, "plannedDuration", void 0), d(this, "endOnNext", void 0), d(this, "attributes", void 0), A.PARAMCHECK(n), A.CONDITIONALPARAMCHECK([!0 === u, r]), A.CONDITIONALASSERT([i, a], [i, a <= i], [o, o >= 0], [s, s >= 0]), this.id = n, this.classId = r, this.start = a, this.end = i, this.duration = o, this.plannedDuration = s, this.endOnNext = u, this.attributes = l; })); - e.DateRange = g; - var O = f((function t(e) { + e.SpliceInfo = f((function t(e) { var n = e.type, r = e.duration, a = e.tagName, i = e.value; E(this, t), d(this, "type", void 0), d(this, "duration", void 0), d(this, "tagName", void 0), d(this, "value", void 0), A.PARAMCHECK(n), A.CONDITIONALPARAMCHECK(["OUT" === n, r]), A.CONDITIONALPARAMCHECK(["RAW" === n, a]), this.type = n, this.duration = r, this.tagName = a, this.value = i; })); - e.SpliceInfo = O; var b = f((function t(e) { E(this, t), d(this, "type", void 0), A.PARAMCHECK(e), this.type = e; })), R = function(t) { @@ -401243,7 +382455,7 @@ var t = { exports: {} }; return c(e, t), f(e); }(b); e.Playlist = R; - var P = function(t) { + e.MasterPlaylist = function(t) { function e() { var t, n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; E(this, e), d(t = o(this, e, [i(i({}, n), {}, { isMasterPlaylist: !0 })]), "variants", void 0), d(t, "currentVariant", void 0), d(t, "sessionDataList", void 0), d(t, "sessionKeyList", void 0); @@ -401252,8 +382464,7 @@ var t = { exports: {} }; } return c(e, t), f(e); }(R); - e.MasterPlaylist = P; - var D = function(t) { + e.MediaPlaylist = function(t) { function e() { var t, n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; E(this, e), d(t = o(this, e, [i(i({}, n), {}, { isMasterPlaylist: !1 })]), "targetDuration", void 0), d(t, "mediaSequenceBase", void 0), d(t, "discontinuitySequenceBase", void 0), d(t, "endlist", void 0), d(t, "playlistType", void 0), d(t, "isIFrame", void 0), d(t, "segments", void 0), d(t, "prefetchSegments", void 0), d(t, "lowLatencyCompatibility", void 0), d(t, "partTargetDuration", void 0), d(t, "renditionReports", void 0), d(t, "skip", void 0), d(t, "hash", void 0); @@ -401262,36 +382473,31 @@ var t = { exports: {} }; } return c(e, t), f(e); }(R); - e.MediaPlaylist = D; - var L = function(t) { + e.Segment = function(t) { function e(t) { var n, r = t.uri, a = t.mimeType, i = t.data, s = t.duration, u = t.title, c = t.byterange, l = t.discontinuity, T = t.mediaSequenceNumber, f = void 0 === T ? 0 : T, h = t.discontinuitySequence, p = void 0 === h ? 0 : h, I = t.key, v = t.map, A = t.programDateTime, y = t.dateRange, S = t.markers, N = void 0 === S ? [] : S, m = t.parts, X = void 0 === m ? [] : m, g = t.gap; return E(this, e), d(n = o(this, e, ["segment"]), "uri", void 0), d(n, "mimeType", void 0), d(n, "data", void 0), d(n, "duration", void 0), d(n, "title", void 0), d(n, "byterange", void 0), d(n, "discontinuity", void 0), d(n, "mediaSequenceNumber", void 0), d(n, "discontinuitySequence", void 0), d(n, "key", void 0), d(n, "map", void 0), d(n, "programDateTime", void 0), d(n, "dateRange", void 0), d(n, "markers", void 0), d(n, "parts", void 0), d(n, "gap", void 0), n.uri = r, n.mimeType = a, n.data = i, n.duration = s, n.title = u, n.byterange = c, n.discontinuity = l, n.mediaSequenceNumber = f, n.discontinuitySequence = p, n.key = I, n.map = v, n.programDateTime = A, n.dateRange = y, n.markers = N, n.parts = X, n.gap = g, n; } return c(e, t), f(e); }(b); - e.Segment = L; - var C = function(t) { + e.PartialSegment = function(t) { function e(t) { var n, r = t.hint, a = void 0 !== r && r, i = t.uri, s = t.duration, u = t.independent, c = t.byterange, l = t.gap; return E(this, e), d(n = o(this, e, ["part"]), "hint", void 0), d(n, "uri", void 0), d(n, "duration", void 0), d(n, "independent", void 0), d(n, "byterange", void 0), d(n, "gap", void 0), A.PARAMCHECK(i), n.hint = a, n.uri = i, n.duration = s, n.independent = u, n.duration = s, n.byterange = c, n.gap = l, n; } return c(e, t), f(e); }(b); - e.PartialSegment = C; - var M = function(t) { + e.PrefetchSegment = function(t) { function e(t) { var n, r = t.uri, a = t.discontinuity, i = t.mediaSequenceNumber, s = void 0 === i ? 0 : i, u = t.discontinuitySequence, c = void 0 === u ? 0 : u, l = t.key; return E(this, e), d(n = o(this, e, ["prefetch"]), "uri", void 0), d(n, "discontinuity", void 0), d(n, "mediaSequenceNumber", void 0), d(n, "discontinuitySequence", void 0), d(n, "key", void 0), A.PARAMCHECK(r), n.uri = r, n.discontinuity = a, n.mediaSequenceNumber = s, n.discontinuitySequence = c, n.key = l, n; } return c(e, t), f(e); }(b); - e.PrefetchSegment = M; - var U = f((function t(e) { + e.RenditionReport = f((function t(e) { var n = e.uri, r = e.lastMSN, a = e.lastPart; E(this, t), d(this, "uri", void 0), d(this, "lastMSN", void 0), d(this, "lastPart", void 0), A.PARAMCHECK(n), this.uri = n, this.lastMSN = r, this.lastPart = a; })); - e.RenditionReport = U; }, 203: (t, e) => { function n(t, e) { @@ -401536,12 +382742,9 @@ var t = { exports: {} }; return s.setOptions; } }); - const u = o(n(377)); - e.parse = u.default; - const c = o(n(887)); - e.stringify = c.default; - const l = i(n(31)); - e.types = l; + e.parse = o(n(377)).default; + e.stringify = o(n(887)).default; + e.types = i(n(31)); } }, e = {}, function n(r) { var a = e[r]; @@ -401551,7 +382754,6 @@ var t = { exports: {} }; }(73); var t, e; })(); - //#endregion //#region ../libs_drpy/dsQueue.js /** @@ -401624,7 +382826,6 @@ var DsQueue = class { }); } }; - //#endregion //#region ../utils/createAxiosAgent.js /** @@ -401648,9 +382849,7 @@ function createAxiosInstance(options = {}) { }; const httpAgent = new http.Agent(AgentOption); const httpsAgentOptions = { ...AgentOption }; - if (rejectUnauthorized === false) { - httpsAgentOptions.rejectUnauthorized = false; - } + if (rejectUnauthorized === false) httpsAgentOptions.rejectUnauthorized = false; const httpsAgent = new https.Agent(httpsAgentOptions); const _axios = axios$1.create({ httpAgent, @@ -401660,18 +382859,15 @@ function createAxiosInstance(options = {}) { if (config && config.headers) { const headers = config.headers; const keys = Object.keys(headers); - for (const key of keys) { - if (key.toLowerCase() === "user-agent" && headers[key] === "RemoveUserAgent") { - delete headers[key]; - break; - } + for (const key of keys) if (key.toLowerCase() === "user-agent" && headers[key] === "RemoveUserAgent") { + delete headers[key]; + break; } } 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; } else { let urlObj; @@ -401683,11 +382879,9 @@ function createAxiosInstance(options = {}) { if (ip && ip !== urlObj.hostname) { let hasHost = false; const headerKeys = Object.keys(config.headers || {}); - for (const k of headerKeys) { - if (k.toLowerCase() === "host") { - hasHost = true; - break; - } + for (const k of headerKeys) if (k.toLowerCase() === "host") { + hasHost = true; + break; } if (!hasHost) { config.headers = config.headers || {}; @@ -401695,9 +382889,7 @@ function createAxiosInstance(options = {}) { } urlObj.hostname = ip; config.url = urlObj.toString(); - if (config.baseURL) { - delete config.baseURL; - } + if (config.baseURL) delete config.baseURL; } } } @@ -401706,7 +382898,6 @@ function createAxiosInstance(options = {}) { }); return _axios; } - //#endregion //#region ../libs_drpy/hikerBatchFetch.js /** @@ -401745,7 +382936,7 @@ async function sleep$1(ms) { * @returns {Promise} 返回结果数组,成功返回响应数据,失败返回null */ const batchFetch3 = async (items, maxWorkers = 16, timeoutConfig = 5e3, batchSize = 16) => { - let t1 = new Date().getTime(); + let t1 = (/* @__PURE__ */ new Date()).getTime(); const timeout = timeoutConfig; /** * 任务处理工作函数 @@ -401760,13 +382951,12 @@ const batchFetch3 = async (items, maxWorkers = 16, timeoutConfig = 5e3, batchSiz const worker = async (task, callback) => { const { item, index, results } = task; try { - const response = await _axios$1(Object.assign({}, item?.options, { + results[index] = (await _axios$1(Object.assign({}, item?.options, { url: item.url, method: item?.options?.method || "GET", timeout: item?.options?.timeout || timeout, responseType: "text" - })); - results[index] = response.data; + }))).data; callback(null); } catch (error) { console.log(`[batchFetch][error] ${item.url}: ${error}`); @@ -401777,8 +382967,7 @@ const batchFetch3 = async (items, maxWorkers = 16, timeoutConfig = 5e3, batchSiz const results = new Array(items.length).fill(null); const queue = (0, import_queue.default)(worker, maxWorkers); for (let i = 0; i < items.length; i += batchSize) { - const batch = items.slice(i, i + batchSize); - const tasks = batch.map((item, index) => { + const tasks = items.slice(i, i + batchSize).map((item, index) => { return new Promise((resolve) => { queue.push({ item, @@ -401789,7 +382978,7 @@ const batchFetch3 = async (items, maxWorkers = 16, timeoutConfig = 5e3, batchSiz }); await Promise.all(tasks); } - let t2 = new Date().getTime(); + let t2 = (/* @__PURE__ */ new Date()).getTime(); console.log(`fastq 批量请求 ${items[0].url} 等 ${items.length}个地址 耗时${t2 - t1}毫秒:`); return results; }; @@ -401803,20 +382992,19 @@ const batchFetch3 = async (items, maxWorkers = 16, timeoutConfig = 5e3, batchSiz * @returns {Promise} 返回结果数组,成功返回响应数据,失败返回null */ const batchFetch4 = async (items, maxWorkers = 5, timeoutConfig = 5e3) => { - let t1 = new Date().getTime(); + let t1 = (/* @__PURE__ */ new Date()).getTime(); const timeout = timeoutConfig; const results = new Array(items.length).fill(null); const queue = new DsQueue(maxWorkers); items.forEach((item, index) => { queue.add(async () => { try { - const response = await _axios$1(Object.assign({}, item?.options, { + results[index] = (await _axios$1(Object.assign({}, item?.options, { url: item.url, method: item?.options?.method || "GET", timeout: item?.options?.timeout || timeout, responseType: "text" - })); - results[index] = response.data; + }))).data; } catch (error) { console.log(`[batchFetch][error] ${item.url}: ${error}`); results[index] = null; @@ -401824,13 +383012,14 @@ const batchFetch4 = async (items, maxWorkers = 5, timeoutConfig = 5e3) => { }); }); await queue.onIdle(); - let t2 = new Date().getTime(); + let t2 = (/* @__PURE__ */ new Date()).getTime(); console.log(`DsQueue 批量请求 ${items[0].url} 等 ${items.length}个地址 耗时${t2 - t1}毫秒:`); return results; }; - //#endregion //#region ../libs_drpy/drpyInject.js +globalThis.iconv = import_lib$1.default; +globalThis.cheerio = esm_exports; globalThis.batchFetch = batchFetch3; globalThis.axios = axios$1; globalThis.axiosX = pt; @@ -401855,9 +383044,7 @@ if (dsReqLib === 0) { function RequestInterceptor(config) { const show_curl = Number(ENV.get("show_curl", "0")) === 1; const curlCommand = generateCurlCommand(config); - if (show_curl) { - console.log(`Generated cURL command:\n${curlCommand}`); - } + if (show_curl) console.log(`Generated cURL command:\n${curlCommand}`); return config; } /** @@ -401868,33 +383055,20 @@ function RequestInterceptor(config) { function generateCurlCommand(config) { const { method, url, headers, data } = config; let curlCommand = `curl -X ${method.toUpperCase()} '${url}'`; - if (headers) { - for (const [key, value] of Object.entries(headers)) { - curlCommand += ` -H '${key}: ${value}'`; - } - } - if (data) { - if (typeof data === "object") { - curlCommand += ` -d '${JSON.stringify(data)}'`; - } else { - curlCommand += ` -d '${data}'`; - } - } + if (headers) for (const [key, value] of Object.entries(headers)) curlCommand += ` -H '${key}: ${value}'`; + if (data) if (typeof data === "object") curlCommand += ` -d '${JSON.stringify(data)}'`; + else curlCommand += ` -d '${data}'`; return curlCommand; } const confs = {}; function initLocalStorage(storage) { if (!_.has(confs, storage)) { - if (!fs.existsSync("local")) { - fs.mkdirSync("local"); - } + if (!fs.existsSync("local")) fs.mkdirSync("local"); const storagePath = "local/js_" + storage; if (!fs.existsSync(storagePath)) { fs.writeFileSync(storagePath, "{}"); confs[storage] = {}; - } else { - confs[storage] = JSON.parse(fs.readFileSync(storagePath).toString()); - } + } else confs[storage] = JSON.parse(fs.readFileSync(storagePath).toString()); } } function localGet(storage, key) { @@ -401920,40 +383094,26 @@ async function request$1(url, opt = {}) { ...postType === "form" && { "Content-Type": "application/x-www-form-urlencoded" }, ...postType === "form-data" && { "Content-Type": "multipart/form-data" } }); - if (!Object.keys(headers).includes("accept")) { - headers["accept"] = "*/*"; - } - if (headers["content-type"] && /charset=(.*)/i.test(headers["content-type"])) { - encoding = headers["content-type"].match(/charset=(.*)/i)[1]; - } + if (!Object.keys(headers).includes("accept")) headers["accept"] = "*/*"; + if (headers["content-type"] && /charset=(.*)/i.test(headers["content-type"])) encoding = headers["content-type"].match(/charset=(.*)/i)[1]; let effectivePostType = postType; if (!effectivePostType) { const contentTypeKey = Object.keys(headers).find((key) => key.toLowerCase() === "content-type"); if (contentTypeKey && headers[contentTypeKey]) { const contentType = headers[contentTypeKey].toLowerCase(); - if (contentType.includes("application/x-www-form-urlencoded")) { - effectivePostType = "form"; - } else if (contentType.includes("multipart/form-data")) { - effectivePostType = "form-data"; - } + if (contentType.includes("application/x-www-form-urlencoded")) effectivePostType = "form"; + else if (contentType.includes("multipart/form-data")) effectivePostType = "form-data"; } } - if (effectivePostType === "form" && data != null && typeof data === "object") { - data = import_lib$2.default.stringify(data, { encode: false }); - } else if (effectivePostType === "form-data" && data != null && typeof data === "object") { - data = toFormData(data); - } - if (data) { - console.log(`[req] postType:${effectivePostType},data:`, data); - } + if (effectivePostType === "form" && data != null && typeof data === "object") data = import_lib$2.default.stringify(data, { encode: false }); + else if (effectivePostType === "form-data" && data != null && typeof data === "object") data = toFormData(data); + if (data) console.log(`[req] postType:${effectivePostType},data:`, data); const agent = proxy ? import_tunnel.httpsOverHttp({ proxy: { host: "127.0.0.1", port: 7890 } }) : httpsAgent; const respType = returnBuffer ? "arraybuffer" : "arraybuffer"; - if (ENV.get("show_req", "0") === "1") { - console.log(`req[${method}]: ${url} headers: ${JSON.stringify(headers)} data: ${JSON.stringify(data)}`); - } + if (ENV.get("show_req", "0") === "1") console.log(`req[${method}]: ${url} headers: ${JSON.stringify(headers)} data: ${JSON.stringify(data)}`); try { const resp = await $axios({ url: typeof url === "object" ? url.url : url, @@ -401962,31 +383122,26 @@ async function request$1(url, opt = {}) { data, timeout, responseType: respType, - maxRedirects: redirect ? undefined : 0, + maxRedirects: redirect ? void 0 : 0, httpsAgent: agent }); let responseData = resp.data; const resHeader = Object.fromEntries(Object.entries(resp.headers).map(([key, value]) => [key, Array.isArray(value) ? value.length === 1 ? value[0] : value : value])); if (!returnBuffer) { const buffer = Buffer.from(responseData); - if (encoding && encoding.toLowerCase() !== "utf-8") { - responseData = import_lib$1.default.decode(buffer, encoding); - } else { - responseData = buffer.toString("utf-8"); - } - } else if (returnBuffer === 1) { - return { - code: resp.status, - headers: resHeader, - content: responseData - }; - } else if (returnBuffer === 2) { - return { - code: resp.status, - headers: resHeader, - content: Buffer.from(responseData).toString("base64") - }; - } else if (returnBuffer === 3 && stream) { + if (encoding && encoding.toLowerCase() !== "utf-8") responseData = import_lib$1.default.decode(buffer, encoding); + else responseData = buffer.toString("utf-8"); + } else if (returnBuffer === 1) return { + code: resp.status, + headers: resHeader, + content: responseData + }; + else if (returnBuffer === 2) return { + code: resp.status, + headers: resHeader, + content: Buffer.from(responseData).toString("base64") + }; + else if (returnBuffer === 3 && stream) { if (stream.onResp) await stream.onResp({ code: resp.status, headers: resHeader @@ -401998,9 +383153,7 @@ async function request$1(url, opt = {}) { responseData.on("end", async () => { if (stream.onDone) await stream.onDone(); }); - } else if (stream.onDone) { - await stream.onDone(); - } + } else if (stream.onDone) await stream.onDone(); return "stream..."; } return { @@ -402014,11 +383167,8 @@ async function request$1(url, opt = {}) { let responseData = ""; try { const buffer = Buffer.from(resp.data); - if (encoding && encoding.toLowerCase() !== "utf-8") { - responseData = import_lib$1.default.decode(buffer, encoding); - } else { - responseData = buffer.toString("utf-8"); - } + if (encoding && encoding.toLowerCase() !== "utf-8") responseData = import_lib$1.default.decode(buffer, encoding); + else responseData = buffer.toString("utf-8"); } catch (e) { console.error(`[request] get error response Text failed: ${e.message}`); } @@ -402042,8 +383192,7 @@ function base64Decode$1(text) { return base64DecodeBuf(text).toString("utf8"); } function responseBase64(data) { - const buffer = Buffer.from(data, "binary"); - return buffer.toString("base64"); + return Buffer.from(data, "binary").toString("base64"); } function md5(text) { return crypto$1.createHash("md5").update(Buffer.from(text, "utf8")).digest("hex"); @@ -402051,24 +383200,21 @@ function md5(text) { function aes(mode, encrypt, input, inBase64, key, iv, outBase64) { if (iv.length == 0) iv = null; try { - if (mode.startsWith("AES/CBC")) { - switch (key.length) { - case 16: - mode = "aes-128-cbc"; - break; - case 32: - mode = "aes-256-cbc"; - break; - } - } else if (mode.startsWith("AES/ECB")) { - switch (key.length) { - case 16: - mode = "aes-128-ecb"; - break; - case 32: - mode = "aes-256-ecb"; - break; - } + if (mode.startsWith("AES/CBC")) switch (key.length) { + case 16: + mode = "aes-128-cbc"; + break; + case 32: + mode = "aes-256-cbc"; + break; + } + else if (mode.startsWith("AES/ECB")) switch (key.length) { + case 16: + mode = "aes-128-ecb"; + break; + case 32: + mode = "aes-256-ecb"; + break; } const inBuf = inBase64 ? base64DecodeBuf(input) : Buffer.from(input, "utf8"); let keyBuf = Buffer.from(key); @@ -402085,15 +383231,13 @@ function aes(mode, encrypt, input, inBase64, key, iv, outBase64) { } function des(mode, encrypt, input, inBase64, key, iv, outBase64) { try { - if (mode.startsWith("DESede/CBC")) { - switch (key.length) { - case 16: - mode = "des-ede-cbc"; - break; - case 24: - mode = "des-ede3-cbc"; - break; - } + if (mode.startsWith("DESede/CBC")) switch (key.length) { + case 16: + mode = "des-ede-cbc"; + break; + case 24: + mode = "des-ede3-cbc"; + break; } const inBuf = inBase64 ? base64DecodeBuf(input) : Buffer.from(input, "utf8"); let keyBuf = Buffer.from(key); @@ -402110,11 +383254,10 @@ function des(mode, encrypt, input, inBase64, key, iv, outBase64) { } function rsa(mode, pub, encrypt, input, inBase64, key, outBase64) { try { - let pd = undefined; + let pd = void 0; const keyObj = pub ? crypto$1.createPublicKey(key) : crypto$1.createPrivateKey(key); if (!keyObj.asymmetricKeyDetails || !keyObj.asymmetricKeyDetails.modulusLength) return ""; - const moduleLen = keyObj.asymmetricKeyDetails.modulusLength; - let blockLen = moduleLen / 8; + let blockLen = keyObj.asymmetricKeyDetails.modulusLength / 8; switch (mode) { case "RSA/PKCS1": pd = crypto$1.constants.RSA_PKCS1_PADDING; @@ -402136,28 +383279,23 @@ function rsa(mode, pub, encrypt, input, inBase64, key, outBase64) { const bufEndIdx = Math.min(bufIdx + blockLen, inBuf.length); let tmpInBuf = inBuf.subarray(bufIdx, bufEndIdx); if (pd == crypto$1.constants.RSA_NO_PADDING) { - if (tmpInBuf.length < blockLen) { - tmpInBuf = Buffer.concat([Buffer.alloc(128 - tmpInBuf.length), tmpInBuf]); - } + if (tmpInBuf.length < blockLen) tmpInBuf = Buffer.concat([Buffer.alloc(128 - tmpInBuf.length), tmpInBuf]); } let tmpBuf; - if (pub) { - tmpBuf = encrypt ? crypto$1.publicEncrypt({ - key: keyObj, - padding: pd - }, tmpInBuf) : crypto$1.publicDecrypt({ - key: keyObj, - padding: pd - }, tmpInBuf); - } else { - tmpBuf = encrypt ? crypto$1.privateEncrypt({ - key: keyObj, - padding: pd - }, tmpInBuf) : crypto$1.privateDecrypt({ - key: keyObj, - padding: pd - }, tmpInBuf); - } + if (pub) tmpBuf = encrypt ? crypto$1.publicEncrypt({ + key: keyObj, + padding: pd + }, tmpInBuf) : crypto$1.publicDecrypt({ + key: keyObj, + padding: pd + }, tmpInBuf); + else tmpBuf = encrypt ? crypto$1.privateEncrypt({ + key: keyObj, + padding: pd + }, tmpInBuf) : crypto$1.privateDecrypt({ + key: keyObj, + padding: pd + }, tmpInBuf); bufIdx = bufEndIdx; outBuf = Buffer.concat([outBuf, tmpBuf]); } @@ -402170,7 +383308,7 @@ function rsa(mode, pub, encrypt, input, inBase64, key, outBase64) { var charStr = "abacdefghjklmnopqrstuvwxyzABCDEFGHJKLMNOPQRSTUVWXYZ0123456789"; function randStr(len, withNum) { var _str = ""; - let containsNum = withNum === undefined ? true : withNum; + let containsNum = withNum === void 0 ? true : withNum; for (var i = 0; i < len; i++) { let idx = _.random(0, containsNum ? charStr.length - 1 : charStr.length - 11); _str += charStr[idx]; @@ -402253,9 +383391,7 @@ globalThis.JSFile = function(path) { return await new Promise((resolve, reject) => { if (mode == "w" || mode == "a") { const directoryPath = dirname(file._path); - if (!fs.existsSync(directoryPath)) { - fs.mkdirSync(directoryPath, { recursive: true }); - } + if (!fs.existsSync(directoryPath)) fs.mkdirSync(directoryPath, { recursive: true }); } fs.open(file._path, mode, null, (e, f) => { if (!e) file.fd = f; @@ -402277,9 +383413,7 @@ globalThis.JSFile = function(path) { let arraybuffer = new ArrayBuffer(length); let arr = new Int8Array(arraybuffer); fs.read(file.fd, arr, 0, length, position, (err, bytesRead, buffer) => { - if (length > bytesRead) { - arraybuffer = buffer.slice(0, bytesRead).buffer; - } + if (length > bytesRead) arraybuffer = buffer.slice(0, bytesRead).buffer; resolve(arraybuffer); }); }); @@ -402303,9 +383437,7 @@ globalThis.JSFile = function(path) { /** * Flush buffers to disk. */ - this.flush = async function() { - return; - }; + this.flush = async function() {}; /** * Closes the file descriptor. * @@ -402381,11 +383513,8 @@ globalThis.JSFile = function(path) { const file = this; return await new Promise((resolve, reject) => { fs.stat(file._path, (err, stat) => { - if (err) { - resolve(0); - } else { - resolve(stat.size); - } + if (err) resolve(0); + else resolve(stat.size); }); }); }; @@ -402396,36 +383525,28 @@ globalThis.js2Proxy = function(dynamic, siteType, site, url, headers) { }; globalThis.jsp = new jsoup$1(); globalThis.pdfh = (html, parse, base_url = "") => { - const jsp = new jsoup$1(base_url); - return jsp.pdfh(html, parse, base_url); + return new jsoup$1(base_url).pdfh(html, parse, base_url); }; globalThis.pd = (html, parse, base_url = "") => { - const jsp = new jsoup$1(base_url); - return jsp.pd(html, parse); + return new jsoup$1(base_url).pd(html, parse); }; globalThis.pdfa = (html, parse) => { - const jsp = new jsoup$1(); - return jsp.pdfa(html, parse); + return new jsoup$1().pdfa(html, parse); }; globalThis.pdfl = (html, parse, list_text, list_url, url_key) => { - const jsp = new jsoup$1(); - return jsp.pdfl(html, parse, list_text, list_url, url_key); + return new jsoup$1().pdfl(html, parse, list_text, list_url, url_key); }; globalThis.pq = (html) => { - const jsp = new jsoup$1(); - return jsp.pq(html); + return new jsoup$1().pq(html); }; globalThis.pjfh = (html, parse, addUrl = false) => { - const jsp = new jsoup$1(); - return jsp.pjfh(html, parse, addUrl); + return new jsoup$1().pjfh(html, parse, addUrl); }; globalThis.pj = (html, parse) => { - const jsp = new jsoup$1(); - return jsp.pj(html, parse); + return new jsoup$1().pj(html, parse); }; globalThis.pjfa = (html, parse) => { - const jsp = new jsoup$1(); - return jsp.pjfa(html, parse); + return new jsoup$1().pjfa(html, parse); }; globalThis.log = console.log; globalThis.print = console.log; @@ -402456,9 +383577,8 @@ var BaseSpider = class { this.proxy = this.localProxy; } async fetch(url, options) { - const resp = await req(url, options); return { - ...resp, + ...await req(url, options), get data() { try { return this.content.parseX; @@ -402479,7 +383599,6 @@ var BaseSpider = class { }; globalThis.BaseSpider = BaseSpider; var drpyInject_default = {}; - //#endregion //#region ../utils/fileHeaderManager.js var FileHeaderManager = class { @@ -402576,12 +383695,8 @@ var FileHeaderManager = class { */ static async writeHeader(filePath, headerObj, options = {}) { const { createBackup = false } = options; - if (!filePath || typeof filePath !== "string") { - throw new Error("Invalid file path"); - } - if (!headerObj || typeof headerObj !== "object") { - throw new Error("Invalid header object"); - } + if (!filePath || typeof filePath !== "string") throw new Error("Invalid file path"); + if (!headerObj || typeof headerObj !== "object") throw new Error("Invalid header object"); let content; try { content = await fs$1.readFile(filePath, "utf8"); @@ -402599,30 +383714,17 @@ var FileHeaderManager = class { const [fullComment] = match; const commentStartIndex = content.indexOf(fullComment); const commentEndIndex = commentStartIndex + fullComment.length; - const beforeComment = content.substring(0, commentStartIndex); - if (beforeComment.trim() !== "") { - const newComment = config.createComment(headerStr) + "\n\n"; - newContent = newComment + content; + if (content.substring(0, commentStartIndex).trim() !== "") newContent = config.createComment(headerStr) + "\n\n" + content; + else if (config.headerRegex.test(fullComment)) { + const updatedComment = fullComment.replace(config.headerRegex, headerStr); + newContent = content.substring(0, commentStartIndex) + updatedComment + content.substring(commentEndIndex); } else { - if (config.headerRegex.test(fullComment)) { - const updatedComment = fullComment.replace(config.headerRegex, headerStr); - newContent = content.substring(0, commentStartIndex) + updatedComment + content.substring(commentEndIndex); - } else { - const updatedComment = fullComment.replace(config.end, "").trim() + `\n${headerStr}\n${config.end}`; - newContent = content.substring(0, commentStartIndex) + updatedComment + content.substring(commentEndIndex); - } + const updatedComment = fullComment.replace(config.end, "").trim() + `\n${headerStr}\n${config.end}`; + newContent = content.substring(0, commentStartIndex) + updatedComment + content.substring(commentEndIndex); } - } else { - const newComment = config.createComment(headerStr) + "\n\n"; - newContent = newComment + content; - } - const contentWithoutHeader = newContent.replace(config.regex, "").trim(); - if (!contentWithoutHeader) { - throw new Error("写入失败:内容不能只包含文件头而无原始内容"); - } - if (!newContent || newContent.trim().length === 0) { - throw new Error("Generated content is empty, operation aborted"); - } + } else newContent = config.createComment(headerStr) + "\n\n" + content; + if (!newContent.replace(config.regex, "").trim()) throw new Error("写入失败:内容不能只包含文件头而无原始内容"); + if (!newContent || newContent.trim().length === 0) throw new Error("Generated content is empty, operation aborted"); const originalCodeLines = originalContent.split("\n").filter((line) => { const trimmed = line.trim(); return trimmed && !trimmed.startsWith("//") && !trimmed.startsWith("/*") && !trimmed.startsWith("*") && !trimmed.startsWith("*/") && !trimmed.startsWith("#") && !trimmed.startsWith("\"\"\"") && !trimmed.startsWith("'''"); @@ -402631,34 +383733,26 @@ var FileHeaderManager = class { const trimmed = line.trim(); return trimmed && !trimmed.startsWith("//") && !trimmed.startsWith("/*") && !trimmed.startsWith("*") && !trimmed.startsWith("*/") && !trimmed.startsWith("#") && !trimmed.startsWith("\"\"\"") && !trimmed.startsWith("'''") && !trimmed.includes("@header("); }); - if (originalCodeLines.length > 5 && newCodeLines.length < originalCodeLines.length * .8) { - throw new Error("Content integrity check failed: significant code loss detected, operation aborted"); - } + if (originalCodeLines.length > 5 && newCodeLines.length < originalCodeLines.length * .8) throw new Error("Content integrity check failed: significant code loss detected, operation aborted"); let backupPath = null; - if (createBackup) { - try { - backupPath = await this.createBackup(filePath); - } catch (error) { - console.warn(`Warning: Failed to create backup for ${filePath}: ${error.message}`); - } + if (createBackup) try { + backupPath = await this.createBackup(filePath); + } catch (error) { + console.warn(`Warning: Failed to create backup for ${filePath}: ${error.message}`); } try { await fs$1.writeFile(filePath, newContent); - if (backupPath) { - try { - await fs$1.unlink(backupPath); - } catch (error) { - console.warn(`Warning: Failed to delete backup file ${backupPath}: ${error.message}`); - } + if (backupPath) try { + await fs$1.unlink(backupPath); + } catch (error) { + console.warn(`Warning: Failed to delete backup file ${backupPath}: ${error.message}`); } } catch (error) { - if (backupPath) { - try { - await this.restoreFromBackup(filePath, backupPath); - console.log(`File restored from backup: ${filePath}`); - } catch (restoreError) { - console.error(`Failed to restore from backup: ${restoreError.message}`); - } + if (backupPath) try { + await this.restoreFromBackup(filePath, backupPath); + console.log(`File restored from backup: ${filePath}`); + } catch (restoreError) { + console.error(`Failed to restore from backup: ${restoreError.message}`); } throw new Error(`Failed to write file: ${error.message}`); } @@ -402683,17 +383777,13 @@ var FileHeaderManager = class { } else { content = input; ext = fileType ? `.${fileType.replace(/^\./, "")}` : null; - if (!ext) { - throw new Error("fileType option is required when input is content"); - } + if (!ext) throw new Error("fileType option is required when input is content"); } const config = this.COMMENT_CONFIG[ext]; if (!config) throw new Error(`Unsupported file type: ${ext}`); if (mode === "top-comments") { const match = content.match(config.topCommentsRegex); - if (match) { - content = content.substring(match[0].length); - } + if (match) content = content.substring(match[0].length); return content.trim(); } const match = content.match(config.regex); @@ -402702,9 +383792,8 @@ var FileHeaderManager = class { if (config.headerRegex.test(innerContent)) { innerContent = innerContent.replace(config.headerRegex, ""); const cleanedInner = innerContent.split("\n").filter((line) => line.trim().length > 0).join("\n"); - if (!cleanedInner.trim()) { - content = content.replace(fullComment, ""); - } else { + if (!cleanedInner.trim()) content = content.replace(fullComment, ""); + else { const newComment = `${config.start}${cleanedInner}${config.end}`; content = content.replace(fullComment, newComment); } @@ -402720,11 +383809,8 @@ var FileHeaderManager = class { */ static async getFileSize(filePath, options = {}) { try { - const stats = await fs$1.stat(filePath); - const sizeInBytes = stats.size; - if (options.humanReadable) { - return this.formatFileSize(sizeInBytes); - } + const sizeInBytes = (await fs$1.stat(filePath)).size; + if (options.humanReadable) return this.formatFileSize(sizeInBytes); return sizeInBytes; } catch (error) { throw new Error(`获取文件大小失败: ${error.message}`); @@ -402749,7 +383835,6 @@ var FileHeaderManager = class { return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i]; } }; - //#endregion //#region ../libs_drpy/drpyRsa.js const RSA = { @@ -402757,15 +383842,11 @@ const RSA = { return pem.replace(/-----BEGIN[^-]+-----/g, "").replace(/-----END[^-]+-----/g, "").replace(/\s+/g, ""); }, formatPrivateKey: function(pem) { - if (pem.includes("-----BEGIN")) { - return pem; - } + if (pem.includes("-----BEGIN")) return pem; return `-----BEGIN RSA PRIVATE KEY-----\n${pem}\n-----END RSA PRIVATE KEY-----`; }, formatPublicKey: function(pem) { - if (pem.includes("-----BEGIN")) { - return pem; - } + if (pem.includes("-----BEGIN")) return pem; return `-----BEGIN PUBLIC KEY-----\n${pem}\n-----END PUBLIC KEY-----`; }, extractPublicKeyFromPrivate: function(privateKeyPem) { @@ -402776,8 +383857,7 @@ const RSA = { format: "pem", type: "pkcs1" }); - const publicKey = crypto$1.createPublicKey(keyObject); - return publicKey.export({ + return crypto$1.createPublicKey(keyObject).export({ type: "spki", format: "pem" }); @@ -402789,8 +383869,7 @@ const RSA = { format: "pem", type: "pkcs8" }); - const publicKey = crypto$1.createPublicKey(keyObject); - return publicKey.export({ + return crypto$1.createPublicKey(keyObject).export({ type: "spki", format: "pem" }); @@ -402801,19 +383880,13 @@ const RSA = { } }, removePKCS1Padding: function(buffer) { - if (buffer[0] !== 0 || buffer[1] !== 2) { - throw new Error("Invalid PKCS1 padding"); - } + if (buffer[0] !== 0 || buffer[1] !== 2) throw new Error("Invalid PKCS1 padding"); let dataStart = -1; - for (let i = 2; i < buffer.length; i++) { - if (buffer[i] === 0) { - dataStart = i + 1; - break; - } - } - if (dataStart === -1) { - throw new Error("Invalid PKCS1 padding: no data separator found"); + for (let i = 2; i < buffer.length; i++) if (buffer[i] === 0) { + dataStart = i + 1; + break; } + if (dataStart === -1) throw new Error("Invalid PKCS1 padding: no data separator found"); return buffer.slice(dataStart); }, decryptLongData: function(privateKey, encryptedData) { @@ -402857,9 +383930,7 @@ const RSA = { encryptLongData: function(publicKey, data) { let keySize; try { - const keyObj = crypto$1.createPublicKey(publicKey); - const keyDetails = keyObj.asymmetricKeyDetails; - keySize = (keyDetails.modulusLength || 2048) / 8; + keySize = (crypto$1.createPublicKey(publicKey).asymmetricKeyDetails.modulusLength || 2048) / 8; } catch (error) { console.warn("无法获取密钥大小,使用默认值2048位:", error.message); keySize = 256; @@ -402874,15 +383945,10 @@ const RSA = { let tmpPoint = 0; for (let i = 0, len = string.length; i < len; i++) { const charCode = string.charCodeAt(i); - if (charCode <= 127) { - bitLen += 1; - } else if (charCode <= 2047) { - bitLen += 2; - } else if (charCode <= 65535) { - bitLen += 3; - } else { - bitLen += 4; - } + if (charCode <= 127) bitLen += 1; + else if (charCode <= 2047) bitLen += 2; + else if (charCode <= 65535) bitLen += 3; + else bitLen += 4; if (bitLen > maxLength) { const subStr = string.substring(subStart, subEnd); const segment = Buffer.from(subStr, "utf8"); @@ -402940,12 +384006,8 @@ const RSA = { try { const dataBuffer = Buffer.from(plainText, "utf8"); let publicKey; - const isPrivateKey = keyPem.includes("PRIVATE KEY") || this.isBase64PrivateKey(keyPem); - if (isPrivateKey) { - publicKey = this.extractPublicKeyFromPrivate(keyPem); - } else { - publicKey = this.formatPublicKey(keyPem); - } + if (keyPem.includes("PRIVATE KEY") || this.isBase64PrivateKey(keyPem)) publicKey = this.extractPublicKeyFromPrivate(keyPem); + else publicKey = this.formatPublicKey(keyPem); console.time("RSA加密"); const encryptedData = this.encryptLongData(publicKey, dataBuffer); console.timeEnd("RSA加密"); @@ -402956,13 +384018,8 @@ const RSA = { } }, isBase64PrivateKey: function(keyString) { - if (keyString.includes("-----")) { - return false; - } - const base64Regex = /^[A-Za-z0-9+/]*={0,2}$/; - if (!base64Regex.test(keyString)) { - return false; - } + if (keyString.includes("-----")) return false; + if (!/^[A-Za-z0-9+/]*={0,2}$/.test(keyString)) return false; try { const formattedKey = this.formatPrivateKey(keyString); const keyObject = crypto$1.createPrivateKey({ @@ -402994,23 +384051,20 @@ const RSA2 = { }, importPrivateKey: function(pem) { const binaryDer = Uint8Array.from(Buffer.from(this.cleanPEM(pem), "base64")); - const importedKey = crypto$1.subtle.importKey("pkcs8", binaryDer, { + return crypto$1.subtle.importKey("pkcs8", binaryDer, { name: "RSA-PKCS1-v1_5", hash: "SHA-256" }, false, ["decrypt"]); - return importedKey; }, importPublicKey: function(pem) { const binaryDer = Uint8Array.from(Buffer.from(this.cleanPEM(pem), "base64")); - const importedKey = crypto$1.subtle.importKey("spki", binaryDer, { + return crypto$1.subtle.importKey("spki", binaryDer, { name: "RSA-PKCS1-v1_5", hash: "SHA-256" }, false, ["encrypt"]); - return importedKey; }, encryptMergedData: function(publicKey, data) { - const modulusLengthBytes = publicKey.algorithm.modulusLength + 7 >> 3; - const segmentLength = modulusLengthBytes - 11; + const segmentLength = (publicKey.algorithm.modulusLength + 7 >> 3) - 11; const dataBuffer = new TextEncoder().encode(data); if (dataBuffer.length > segmentLength) { const segments = []; @@ -403050,15 +384104,13 @@ const RSA2 = { try { const publicKey = this.importPublicKey(publicKeyPem); const encryptedData = this.encryptMergedData(publicKey, plainText); - const encryptedBase64 = Buffer.from(encryptedData).toString("base64"); - return encryptedBase64; + return Buffer.from(encryptedData).toString("base64"); } catch (error) { console.error("加密过程中发生错误:", error); throw error; } } }; - //#endregion //#region ../libs_drpy/drpyCustom.js const MOBILE_UA = "Mozilla/5.0 (Linux; Android 11; Pixel 5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.91 Mobile Safari/537.36"; @@ -403090,8 +384142,7 @@ const SPECIAL_URL = /^(ftp|magnet|thunder|ws):/; * @returns {boolean} 是否为正版 */ const 是否正版 = (vipUrl) => { - const flag = /qq\.com|iqiyi\.com|youku\.com|mgtv\.com|bilibili\.com|sohu\.com|ixigua\.com|pptv\.com|miguvideo\.com|le\.com|1905\.com|fun\.tv/; - return flag.test(vipUrl); + return /qq\.com|iqiyi\.com|youku\.com|mgtv\.com|bilibili\.com|sohu\.com|ixigua\.com|pptv\.com|miguvideo\.com|le\.com|1905\.com|fun\.tv/.test(vipUrl); }; /** * 处理视频链接 @@ -403103,9 +384154,7 @@ const urlDeal = (vipUrl) => { if (!是否正版(vipUrl)) return vipUrl; if (!/miguvideo/.test(vipUrl)) { vipUrl = vipUrl.split("#")[0]; - if (vipUrl.includes("?") && !vipUrl.includes("video?vid=")) { - vipUrl = vipUrl.split("?")[0]; - } + if (vipUrl.includes("?") && !vipUrl.includes("video?vid=")) vipUrl = vipUrl.split("?")[0]; } return vipUrl; }; @@ -403116,8 +384165,7 @@ const urlDeal = (vipUrl) => { */ const tellIsJx$1 = (url) => { try { - const is_vip = !/\.(m3u8|mp4|m4a)$/.test(url.split("?")[0]) && 是否正版(url); - return is_vip ? 1 : 0; + return !/\.(m3u8|mp4|m4a)$/.test(url.split("?")[0]) && 是否正版(url) ? 1 : 0; } catch (e) { return 1; } @@ -403138,18 +384186,15 @@ const setResult = (d) => { vod_pic: it.pic_url || it.img || "" }; const keys = Object.keys(it); - const mappings = { + Object.entries({ tname: "type_name", tid: "type_id", year: "vod_year", actor: "vod_actor", director: "vod_director", area: "vod_area" - }; - Object.entries(mappings).forEach(([key, prop]) => { - if (keys.includes(key)) { - obj[prop] = it[key] || ""; - } + }).forEach(([key, prop]) => { + if (keys.includes(key)) obj[prop] = it[key] || ""; }); return obj; }); @@ -403184,9 +384229,7 @@ const urlencode = (str) => { * @returns {string} 编码后的字符串 */ const encodeUrl = (str) => { - if (typeof encodeURI === "function") { - return encodeURI(str); - } + if (typeof encodeURI === "function") return encodeURI(str); str = String(str); return encodeURIComponent(str).replace(/%2F/g, "/").replace(/%3F/g, "?").replace(/%3A/g, ":").replace(/%40/g, "@").replace(/%3D/g, "=").replace(/%2C/g, ",").replace(/%2B/g, "+").replace(/%24/g, "$"); }; @@ -403196,8 +384239,7 @@ const encodeUrl = (str) => { * @returns {string} Base64字符串 */ const uint8ArrayToBase64 = (uint8Array) => { - const binaryString = String.fromCharCode(...Array.from(uint8Array)); - return btoa$1(binaryString); + return btoa$1(String.fromCharCode(...Array.from(uint8Array))); }; /** * 将UTF8字节数组转换为字符串 @@ -403241,8 +384283,7 @@ const Utf8ArrayToStr = (array) => { * @returns {string} 压缩后的Base64字符串 */ const gzip = (str) => { - const arr = pako.gzip(str); - return uint8ArrayToBase64(arr); + return uint8ArrayToBase64(pako.gzip(str)); }; /** * gzip解压base64数据 @@ -403250,11 +384291,9 @@ const gzip = (str) => { * @returns {string} 解压后的字符串 */ const ungzip$1 = (b64Data) => { - const strData = atob$1(b64Data); - const charData = strData.split("").map((x) => x.charCodeAt(0)); + const charData = atob$1(b64Data).split("").map((x) => x.charCodeAt(0)); const binData = new Uint8Array(charData); - const data = pako.inflate(binData); - return Utf8ArrayToStr(data); + return Utf8ArrayToStr(pako.inflate(binData)); }; /** * 字符串按指定编码 @@ -403263,9 +384302,7 @@ const ungzip$1 = (b64Data) => { * @returns {string} 编码后的字符串 */ const encodeStr = (input, encoding = "gbk") => { - if (encoding.startsWith("gb")) { - return gbkTool.encode(input); - } + if (encoding.startsWith("gb")) return gbkTool.encode(input); return input; }; /** @@ -403275,9 +384312,7 @@ const encodeStr = (input, encoding = "gbk") => { * @returns {string} 解码后的字符串 */ const decodeStr = (input, encoding = "gbk") => { - if (encoding.startsWith("gb")) { - return gbkTool.decode(input); - } + if (encoding.startsWith("gb")) return gbkTool.decode(input); return input; }; /** @@ -403303,16 +384338,13 @@ const fixAdM3u8Ai = async (m3u8_url, headers) => { let m3u8 = (await req(m3u8_url, option)).content; m3u8 = m3u8.trim().split("\n").map((it) => it.startsWith("#") ? it : urljoin(m3u8_url, it)).join("\n").replace(/\n\n/gi, "\n"); let last_url = m3u8.split("\n").slice(-1)[0]; - if (last_url.length < 5) { - last_url = m3u8.split("\n").slice(-2)[0]; - } + if (last_url.length < 5) last_url = m3u8.split("\n").slice(-2)[0]; if (last_url.includes(".m3u8") && last_url !== m3u8_url) { m3u8_url = urljoin(m3u8_url, last_url); log(`[fixAdM3u8Ai]嵌套的m3u8_url: ${m3u8_url}`); m3u8 = (await req(m3u8_url, option)).content; } - const s = m3u8.trim().split("\n").filter((it) => it.trim()).join("\n"); - const ss = s.split("\n"); + const ss = m3u8.trim().split("\n").filter((it) => it.trim()).join("\n").split("\n"); let firststr = ""; let maxl = 0; let kk = 0; @@ -403322,9 +384354,8 @@ const fixAdM3u8Ai = async (m3u8_url, headers) => { for (let i = 0; i < ss.length && kk < 30; i++) { const line = ss[i]; if (!line.startsWith("#")) { - if (kk === 0) { - firststr = line; - } else { + if (kk === 0) firststr = line; + else { const comparison = compareStrings(firststr, line); if (maxl > comparison + 1) { if (secondstr.length < 5) secondstr = line; @@ -403354,17 +384385,12 @@ const fixAdM3u8Ai = async (m3u8_url, headers) => { const ad_urls = []; for (let i = 0; i < ss.length; i++) { const line = ss[i]; - if (!line.startsWith("#")) { - if (compareStrings(firststr, line) < maxl) { - ad_urls.push(line); - ss.splice(i - 1, 2); - i -= 2; - } else { - ss[i] = urljoin(m3u8_url, line); - } - } else { - ss[i] = line.replace(/URI="(.*)"/g, `URI="${urljoin(m3u8_url, "$1")}"`); - } + if (!line.startsWith("#")) if (compareStrings(firststr, line) < maxl) { + ad_urls.push(line); + ss.splice(i - 1, 2); + i -= 2; + } else ss[i] = urljoin(m3u8_url, line); + else ss[i] = line.replace(/URI="(.*)"/g, `URI="${urljoin(m3u8_url, "$1")}"`); } log(`[fixAdM3u8Ai]处理的m3u8地址: ${m3u8_url}`); log("[fixAdM3u8Ai]----广告地址----"); @@ -403387,28 +384413,20 @@ const forceOrder = (lists, key, option) => { if (start >= end) return lists; let first = lists[start]; let second = lists[end]; - if (key) { - try { - first = first[key]; - second = second[key]; - } catch (e) {} - } - if (option && typeof option === "function") { - try { - first = option(first); - second = option(second); - } catch (e) {} - } + if (key) try { + first = first[key]; + second = second[key]; + } catch (e) {} + if (option && typeof option === "function") try { + first = option(first); + second = option(second); + } catch (e) {} first = String(first); second = String(second); const firstMatch = first.match(/(\d+)/); const secondMatch = second.match(/(\d+)/); if (firstMatch && secondMatch) { - const num1 = Number(firstMatch[1]); - const num2 = Number(secondMatch[1]); - if (num1 > num2) { - lists.reverse(); - } + if (Number(firstMatch[1]) > Number(secondMatch[1])) lists.reverse(); } return lists; }; @@ -403419,16 +384437,13 @@ const forceOrder = (lists, key, option) => { */ const getQuery = (url) => { try { - if (url.indexOf("?") > -1) { - url = url.slice(url.indexOf("?") + 1); - } + if (url.indexOf("?") > -1) url = url.slice(url.indexOf("?") + 1); const arr = url.split("#")[0].split("&"); const resObj = {}; arr.forEach((item) => { const arr1 = item.split("="); const key = arr1[0]; - const value = arr1.slice(1).join("="); - resObj[key] = value; + resObj[key] = arr1.slice(1).join("="); }); return resObj; } catch (err) { @@ -403446,9 +384461,7 @@ const dealJson = (html) => { html = html.trim(); if (!(html.startsWith("{") && html.endsWith("}") || html.startsWith("[") && html.endsWith("]"))) { const match = html.match(/.*?\{(.*)\}/m); - if (match) { - html = "{" + match[1] + "}"; - } + if (match) html = "{" + match[1] + "}"; } } catch (e) {} try { @@ -403467,19 +384480,16 @@ const OcrApi = { try { log("[OcrApi.classification]通过drpy_ocr验证码接口过验证..."); let html = ""; - if (this.api.endsWith("drpy/text")) { - html = (await req(this.api, { - data: { img }, - headers: { "User-Agent": PC_UA }, - method: "POST" - })).content; - } else { - html = (await req(this.api, { - body: img, - headers: { "User-Agent": PC_UA }, - method: "POST" - })).content; - } + if (this.api.endsWith("drpy/text")) html = (await req(this.api, { + data: { img }, + headers: { "User-Agent": PC_UA }, + method: "POST" + })).content; + else html = (await req(this.api, { + body: img, + headers: { "User-Agent": PC_UA }, + method: "POST" + })).content; code = html || ""; } catch (e) { log(`[OcrApi.classification]OCR识别验证码发生错误: ${e.message}`); @@ -403508,14 +384518,10 @@ const getHome = (url) => { * @returns {string} 拼接后的URL */ const buildUrl = (url, obj = {}) => { - if (url.indexOf("?") < 0) { - url += "?"; - } + if (url.indexOf("?") < 0) url += "?"; const paramList = Object.entries(obj).map(([key, value]) => `${key}=${value}`); const params = paramList.join("&"); - if (paramList.length > 0 && !url.endsWith("?")) { - url += "&"; - } + if (paramList.length > 0 && !url.endsWith("?")) url += "&"; return url + params; }; /** @@ -403532,14 +384538,10 @@ function $require(url) { */ const buildQueryString = (params) => { const queryArray = []; - for (const key in params) { - if (params.hasOwnProperty(key)) { - let value = params[key]; - if (value === null || value === undefined) { - value = ""; - } - queryArray.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); - } + for (const key in params) if (params.hasOwnProperty(key)) { + let value = params[key]; + if (value === null || value === void 0) value = ""; + queryArray.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`); } return queryArray.join("&"); }; @@ -403551,12 +384553,9 @@ const buildQueryString = (params) => { const parseQueryString = (query) => { const result = {}; if (!query) return result; - const pairs = query.split("&"); - pairs.forEach((pair) => { + query.split("&").forEach((pair) => { const [key, value] = pair.split("="); - if (key) { - result[decodeURIComponent(key)] = value ? decodeURIComponent(value) : ""; - } + if (key) result[decodeURIComponent(key)] = value ? decodeURIComponent(value) : ""; }); return result; }; @@ -403566,8 +384565,7 @@ const parseQueryString = (query) => { * @returns {string} 处理后的值 */ const encodeIfContainsSpecialChars = (value) => { - const specialChars = /[&=?#]/; - return specialChars.test(value) ? encodeURIComponent(value) : value; + return /[&=?#]/.test(value) ? encodeURIComponent(value) : value; }; /** * 对象转查询字符串(智能编码) @@ -403583,9 +384581,8 @@ const objectToQueryString = (obj) => { */ async function getOriginalJs(js_code) { let current_match = /var rule|function|let |var |const|class Rule|async|this\./; - if (current_match.test(js_code)) { - return js_code; - } + let current_match1 = /["{}&]/; + if (current_match.test(js_code)) return js_code; log("[getOriginalJs] 密文源自动去除头信息..."); js_code = await FileHeaderManager.removeHeader(js_code, { mode: "top-comments", @@ -403597,19 +384594,14 @@ async function getOriginalJs(js_code) { let key = CryptoJS$1.enc.Hex.parse("686A64686E780A0A0A0A0A0A0A0A0A0A"); let iv = CryptoJS$1.enc.Hex.parse("647A797964730A0A0A0A0A0A0A0A0A0A"); let ciphertext = CryptoJS$1.enc.Base64.parse(data); - let decrypted = CryptoJS$1.AES.decrypt({ ciphertext }, key, { + return CryptoJS$1.AES.decrypt({ ciphertext }, key, { iv, mode: CryptoJS$1.mode.CBC, padding: CryptoJS$1.pad.Pkcs7 }).toString(CryptoJS$1.enc.Utf8); - return decrypted; } let error_log = false; - function logger(text) { - if (error_log) { - log("[getOriginalJs]", text); - } - } + function logger(text) {} let decode_funcs = [ (text) => { try { @@ -403645,12 +384637,10 @@ async function getOriginalJs(js_code) { } ]; let func_index = 0; - while (!current_match.test(decode_content)) { + while (!current_match.test(decode_content) && !current_match1.test(decode_content)) { decode_content = decode_funcs[func_index](js_code); func_index++; - if (func_index >= decode_funcs.length) { - break; - } + if (func_index >= decode_funcs.length) break; } return decode_content; } @@ -403660,16 +384650,14 @@ const jsEncoder = { aes_encrypt: function(data) { let key = CryptoJS$1.enc.Hex.parse("686A64686E780A0A0A0A0A0A0A0A0A0A"); let iv = CryptoJS$1.enc.Hex.parse("647A797964730A0A0A0A0A0A0A0A0A0A"); - let encrypted = CryptoJS$1.AES.encrypt(data, key, { + return CryptoJS$1.AES.encrypt(data, key, { iv, mode: CryptoJS$1.mode.CBC, padding: CryptoJS$1.pad.Pkcs7 - }); - return encrypted.ciphertext.toString(CryptoJS$1.enc.Base64); + }).ciphertext.toString(CryptoJS$1.enc.Base64); }, rsa_encode: function(text) { - let rsa_private_key = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCqin/jUpqM6+fgYP/oMqj9zcdHMM0mEZXLeTyixIJWP53lzJV2N2E3OP6BBpUmq2O1a9aLnTIbADBaTulTNiOnVGoNG58umBnupnbmmF8iARbDp2mTzdMMeEgLdrfXS6Y3VvazKYALP8EhEQykQVarexR78vRq7ltY3quXx7cgI0ROfZz5Sw3UOLQJ+VoWmwIxu9AMEZLVzFDQN93hzuzs3tNyHK6xspBGB7zGbwCg+TKi0JeqPDrXxYUpAz1cQ/MO+Da0WgvkXnvrry8NQROHejdLVOAslgr6vYthH9bKbsGyNY3H+P12kcxo9RAcVveONnZbcMyxjtF5dWblaernAgMBAAECggEAGdEHlSEPFmAr5PKqKrtoi6tYDHXdyHKHC5tZy4YV+Pp+a6gxxAiUJejx1hRqBcWSPYeKne35BM9dgn5JofgjI5SKzVsuGL6bxl3ayAOu+xXRHWM9f0t8NHoM5fdd0zC3g88dX3fb01geY2QSVtcxSJpEOpNH3twgZe6naT2pgiq1S4okpkpldJPo5GYWGKMCHSLnKGyhwS76gF8bTPLoay9Jxk70uv6BDUMlA4ICENjmsYtd3oirWwLwYMEJbSFMlyJvB7hjOjR/4RpT4FPnlSsIpuRtkCYXD4jdhxGlvpXREw97UF2wwnEUnfgiZJ2FT/MWmvGGoaV/CfboLsLZuQKBgQDTNZdJrs8dbijynHZuuRwvXvwC03GDpEJO6c1tbZ1s9wjRyOZjBbQFRjDgFeWs9/T1aNBLUrgsQL9c9nzgUziXjr1Nmu52I0Mwxi13Km/q3mT+aQfdgNdu6ojsI5apQQHnN/9yMhF6sNHg63YOpH+b+1bGRCtr1XubuLlumKKscwKBgQDOtQ2lQjMtwsqJmyiyRLiUOChtvQ5XI7B2mhKCGi8kZ+WEAbNQcmThPesVzW+puER6D4Ar4hgsh9gCeuTaOzbRfZ+RLn3Aksu2WJEzfs6UrGvm6DU1INn0z/tPYRAwPX7sxoZZGxqML/z+/yQdf2DREoPdClcDa2Lmf1KpHdB+vQKBgBXFCVHz7a8n4pqXG/HvrIMJdEpKRwH9lUQS/zSPPtGzaLpOzchZFyQQBwuh1imM6Te+VPHeldMh3VeUpGxux39/m+160adlnRBS7O7CdgSsZZZ/dusS06HAFNraFDZf1/VgJTk9BeYygX+AZYu+0tReBKSs9BjKSVJUqPBIVUQXAoGBAJcZ7J6oVMcXxHxwqoAeEhtvLcaCU9BJK36XQ/5M67ceJ72mjJC6/plUbNukMAMNyyi62gO6I9exearecRpB/OGIhjNXm99Ar59dAM9228X8gGfryLFMkWcO/fNZzb6lxXmJ6b2LPY3KqpMwqRLTAU/zy+ax30eFoWdDHYa4X6e1AoGAfa8asVGOJ8GL9dlWufEeFkDEDKO9ww5GdnpN+wqLwePWqeJhWCHad7bge6SnlylJp5aZXl1+YaBTtOskC4Whq9TP2J+dNIgxsaF5EFZQJr8Xv+lY9lu0CruYOh9nTNF9x3nubxJgaSid/7yRPfAGnsJRiknB5bsrCvgsFQFjJVs="; - return RSA.encode(text, rsa_private_key, null); + return RSA.encode(text, "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCqin/jUpqM6+fgYP/oMqj9zcdHMM0mEZXLeTyixIJWP53lzJV2N2E3OP6BBpUmq2O1a9aLnTIbADBaTulTNiOnVGoNG58umBnupnbmmF8iARbDp2mTzdMMeEgLdrfXS6Y3VvazKYALP8EhEQykQVarexR78vRq7ltY3quXx7cgI0ROfZz5Sw3UOLQJ+VoWmwIxu9AMEZLVzFDQN93hzuzs3tNyHK6xspBGB7zGbwCg+TKi0JeqPDrXxYUpAz1cQ/MO+Da0WgvkXnvrry8NQROHejdLVOAslgr6vYthH9bKbsGyNY3H+P12kcxo9RAcVveONnZbcMyxjtF5dWblaernAgMBAAECggEAGdEHlSEPFmAr5PKqKrtoi6tYDHXdyHKHC5tZy4YV+Pp+a6gxxAiUJejx1hRqBcWSPYeKne35BM9dgn5JofgjI5SKzVsuGL6bxl3ayAOu+xXRHWM9f0t8NHoM5fdd0zC3g88dX3fb01geY2QSVtcxSJpEOpNH3twgZe6naT2pgiq1S4okpkpldJPo5GYWGKMCHSLnKGyhwS76gF8bTPLoay9Jxk70uv6BDUMlA4ICENjmsYtd3oirWwLwYMEJbSFMlyJvB7hjOjR/4RpT4FPnlSsIpuRtkCYXD4jdhxGlvpXREw97UF2wwnEUnfgiZJ2FT/MWmvGGoaV/CfboLsLZuQKBgQDTNZdJrs8dbijynHZuuRwvXvwC03GDpEJO6c1tbZ1s9wjRyOZjBbQFRjDgFeWs9/T1aNBLUrgsQL9c9nzgUziXjr1Nmu52I0Mwxi13Km/q3mT+aQfdgNdu6ojsI5apQQHnN/9yMhF6sNHg63YOpH+b+1bGRCtr1XubuLlumKKscwKBgQDOtQ2lQjMtwsqJmyiyRLiUOChtvQ5XI7B2mhKCGi8kZ+WEAbNQcmThPesVzW+puER6D4Ar4hgsh9gCeuTaOzbRfZ+RLn3Aksu2WJEzfs6UrGvm6DU1INn0z/tPYRAwPX7sxoZZGxqML/z+/yQdf2DREoPdClcDa2Lmf1KpHdB+vQKBgBXFCVHz7a8n4pqXG/HvrIMJdEpKRwH9lUQS/zSPPtGzaLpOzchZFyQQBwuh1imM6Te+VPHeldMh3VeUpGxux39/m+160adlnRBS7O7CdgSsZZZ/dusS06HAFNraFDZf1/VgJTk9BeYygX+AZYu+0tReBKSs9BjKSVJUqPBIVUQXAoGBAJcZ7J6oVMcXxHxwqoAeEhtvLcaCU9BJK36XQ/5M67ceJ72mjJC6/plUbNukMAMNyyi62gO6I9exearecRpB/OGIhjNXm99Ar59dAM9228X8gGfryLFMkWcO/fNZzb6lxXmJ6b2LPY3KqpMwqRLTAU/zy+ax30eFoWdDHYa4X6e1AoGAfa8asVGOJ8GL9dlWufEeFkDEDKO9ww5GdnpN+wqLwePWqeJhWCHad7bge6SnlylJp5aZXl1+YaBTtOskC4Whq9TP2J+dNIgxsaF5EFZQJr8Xv+lY9lu0CruYOh9nTNF9x3nubxJgaSid/7yRPfAGnsJRiknB5bsrCvgsFQFjJVs=", null); } }; const jsDecoder = { @@ -403679,16 +384667,14 @@ const jsDecoder = { let key = CryptoJS$1.enc.Hex.parse("686A64686E780A0A0A0A0A0A0A0A0A0A"); let iv = CryptoJS$1.enc.Hex.parse("647A797964730A0A0A0A0A0A0A0A0A0A"); let ciphertext = CryptoJS$1.enc.Base64.parse(data); - let decrypted = CryptoJS$1.AES.decrypt({ ciphertext }, key, { + return CryptoJS$1.AES.decrypt({ ciphertext }, key, { iv, mode: CryptoJS$1.mode.CBC, padding: CryptoJS$1.pad.Pkcs7 }).toString(CryptoJS$1.enc.Utf8); - return decrypted; }, rsa_decode: function(text) { - let rsa_private_key = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCqin/jUpqM6+fgYP/oMqj9zcdHMM0mEZXLeTyixIJWP53lzJV2N2E3OP6BBpUmq2O1a9aLnTIbADBaTulTNiOnVGoNG58umBnupnbmmF8iARbDp2mTzdMMeEgLdrfXS6Y3VvazKYALP8EhEQykQVarexR78vRq7ltY3quXx7cgI0ROfZz5Sw3UOLQJ+VoWmwIxu9AMEZLVzFDQN93hzuzs3tNyHK6xspBGB7zGbwCg+TKi0JeqPDrXxYUpAz1cQ/MO+Da0WgvkXnvrry8NQROHejdLVOAslgr6vYthH9bKbsGyNY3H+P12kcxo9RAcVveONnZbcMyxjtF5dWblaernAgMBAAECggEAGdEHlSEPFmAr5PKqKrtoi6tYDHXdyHKHC5tZy4YV+Pp+a6gxxAiUJejx1hRqBcWSPYeKne35BM9dgn5JofgjI5SKzVsuGL6bxl3ayAOu+xXRHWM9f0t8NHoM5fdd0zC3g88dX3fb01geY2QSVtcxSJpEOpNH3twgZe6naT2pgiq1S4okpkpldJPo5GYWGKMCHSLnKGyhwS76gF8bTPLoay9Jxk70uv6BDUMlA4ICENjmsYtd3oirWwLwYMEJbSFMlyJvB7hjOjR/4RpT4FPnlSsIpuRtkCYXD4jdhxGlvpXREw97UF2wwnEUnfgiZJ2FT/MWmvGGoaV/CfboLsLZuQKBgQDTNZdJrs8dbijynHZuuRwvXvwC03GDpEJO6c1tbZ1s9wjRyOZjBbQFRjDgFeWs9/T1aNBLUrgsQL9c9nzgUziXjr1Nmu52I0Mwxi13Km/q3mT+aQfdgNdu6ojsI5apQQHnN/9yMhF6sNHg63YOpH+b+1bGRCtr1XubuLlumKKscwKBgQDOtQ2lQjMtwsqJmyiyRLiUOChtvQ5XI7B2mhKCGi8kZ+WEAbNQcmThPesVzW+puER6D4Ar4hgsh9gCeuTaOzbRfZ+RLn3Aksu2WJEzfs6UrGvm6DU1INn0z/tPYRAwPX7sxoZZGxqML/z+/yQdf2DREoPdClcDa2Lmf1KpHdB+vQKBgBXFCVHz7a8n4pqXG/HvrIMJdEpKRwH9lUQS/zSPPtGzaLpOzchZFyQQBwuh1imM6Te+VPHeldMh3VeUpGxux39/m+160adlnRBS7O7CdgSsZZZ/dusS06HAFNraFDZf1/VgJTk9BeYygX+AZYu+0tReBKSs9BjKSVJUqPBIVUQXAoGBAJcZ7J6oVMcXxHxwqoAeEhtvLcaCU9BJK36XQ/5M67ceJ72mjJC6/plUbNukMAMNyyi62gO6I9exearecRpB/OGIhjNXm99Ar59dAM9228X8gGfryLFMkWcO/fNZzb6lxXmJ6b2LPY3KqpMwqRLTAU/zy+ax30eFoWdDHYa4X6e1AoGAfa8asVGOJ8GL9dlWufEeFkDEDKO9ww5GdnpN+wqLwePWqeJhWCHad7bge6SnlylJp5aZXl1+YaBTtOskC4Whq9TP2J+dNIgxsaF5EFZQJr8Xv+lY9lu0CruYOh9nTNF9x3nubxJgaSid/7yRPfAGnsJRiknB5bsrCvgsFQFjJVs="; - return RSA.decode(text, rsa_private_key, null); + return RSA.decode(text, "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCqin/jUpqM6+fgYP/oMqj9zcdHMM0mEZXLeTyixIJWP53lzJV2N2E3OP6BBpUmq2O1a9aLnTIbADBaTulTNiOnVGoNG58umBnupnbmmF8iARbDp2mTzdMMeEgLdrfXS6Y3VvazKYALP8EhEQykQVarexR78vRq7ltY3quXx7cgI0ROfZz5Sw3UOLQJ+VoWmwIxu9AMEZLVzFDQN93hzuzs3tNyHK6xspBGB7zGbwCg+TKi0JeqPDrXxYUpAz1cQ/MO+Da0WgvkXnvrry8NQROHejdLVOAslgr6vYthH9bKbsGyNY3H+P12kcxo9RAcVveONnZbcMyxjtF5dWblaernAgMBAAECggEAGdEHlSEPFmAr5PKqKrtoi6tYDHXdyHKHC5tZy4YV+Pp+a6gxxAiUJejx1hRqBcWSPYeKne35BM9dgn5JofgjI5SKzVsuGL6bxl3ayAOu+xXRHWM9f0t8NHoM5fdd0zC3g88dX3fb01geY2QSVtcxSJpEOpNH3twgZe6naT2pgiq1S4okpkpldJPo5GYWGKMCHSLnKGyhwS76gF8bTPLoay9Jxk70uv6BDUMlA4ICENjmsYtd3oirWwLwYMEJbSFMlyJvB7hjOjR/4RpT4FPnlSsIpuRtkCYXD4jdhxGlvpXREw97UF2wwnEUnfgiZJ2FT/MWmvGGoaV/CfboLsLZuQKBgQDTNZdJrs8dbijynHZuuRwvXvwC03GDpEJO6c1tbZ1s9wjRyOZjBbQFRjDgFeWs9/T1aNBLUrgsQL9c9nzgUziXjr1Nmu52I0Mwxi13Km/q3mT+aQfdgNdu6ojsI5apQQHnN/9yMhF6sNHg63YOpH+b+1bGRCtr1XubuLlumKKscwKBgQDOtQ2lQjMtwsqJmyiyRLiUOChtvQ5XI7B2mhKCGi8kZ+WEAbNQcmThPesVzW+puER6D4Ar4hgsh9gCeuTaOzbRfZ+RLn3Aksu2WJEzfs6UrGvm6DU1INn0z/tPYRAwPX7sxoZZGxqML/z+/yQdf2DREoPdClcDa2Lmf1KpHdB+vQKBgBXFCVHz7a8n4pqXG/HvrIMJdEpKRwH9lUQS/zSPPtGzaLpOzchZFyQQBwuh1imM6Te+VPHeldMh3VeUpGxux39/m+160adlnRBS7O7CdgSsZZZ/dusS06HAFNraFDZf1/VgJTk9BeYygX+AZYu+0tReBKSs9BjKSVJUqPBIVUQXAoGBAJcZ7J6oVMcXxHxwqoAeEhtvLcaCU9BJK36XQ/5M67ceJ72mjJC6/plUbNukMAMNyyi62gO6I9exearecRpB/OGIhjNXm99Ar59dAM9228X8gGfryLFMkWcO/fNZzb6lxXmJ6b2LPY3KqpMwqRLTAU/zy+ax30eFoWdDHYa4X6e1AoGAfa8asVGOJ8GL9dlWufEeFkDEDKO9ww5GdnpN+wqLwePWqeJhWCHad7bge6SnlylJp5aZXl1+YaBTtOskC4Whq9TP2J+dNIgxsaF5EFZQJr8Xv+lY9lu0CruYOh9nTNF9x3nubxJgaSid/7yRPfAGnsJRiknB5bsrCvgsFQFjJVs=", null); } }; /** @@ -403709,9 +384695,7 @@ function vodDeal(vod, rule) { let index = froms.findIndex((from) => from.includes(orderItem)); if (index !== -1) { orderedFroms.push(froms[index]); - if (urls[index]) { - orderedUrls.push(urls[index]); - } + if (urls[index]) orderedUrls.push(urls[index]); froms.splice(index, 1); urls.splice(index, 1); } @@ -403725,11 +384709,7 @@ function vodDeal(vod, rule) { let froms = vod.vod_play_from.split("$$$"); const renameEntries = Object.entries(rule.tab_rename); froms = froms.map((from) => { - for (const [key, value] of renameEntries) { - if (from.includes(key)) { - return from.replace(key, value); - } - } + for (const [key, value] of renameEntries) if (from.includes(key)) return from.replace(key, value); return from; }); vod.vod_play_from = froms.join("$$$"); @@ -403741,17 +384721,13 @@ function vodDeal(vod, rule) { let filteredUrls = []; froms.forEach((from, index) => { let shouldRemove = false; - for (const removeItem of rule.tab_remove) { - if (from.includes(removeItem)) { - shouldRemove = true; - break; - } + for (const removeItem of rule.tab_remove) if (from.includes(removeItem)) { + shouldRemove = true; + break; } if (!shouldRemove) { filteredFroms.push(from); - if (urls[index]) { - filteredUrls.push(urls[index]); - } + if (urls[index]) filteredUrls.push(urls[index]); } }); vod.vod_play_from = filteredFroms.join("$$$"); @@ -403771,26 +384747,18 @@ function vodDeal(vod, rule) { * @returns {Promise} - 处理后的图片URL */ async function processImage(vod_pic, moduleObject, injectVars = null) { - if (!vod_pic) { - return vod_pic; - } + if (!vod_pic) return vod_pic; try { if (moduleObject["图片替换"]) { - if (typeof moduleObject["图片替换"] === "function") { - if (injectVars) { - vod_pic = await moduleObject["图片替换"].apply(injectVars, [vod_pic]); - } else { - vod_pic = await moduleObject["图片替换"](vod_pic); - } - } else if (typeof moduleObject["图片替换"] === "string" && moduleObject["图片替换"].includes("=>")) { + if (typeof moduleObject["图片替换"] === "function") if (injectVars) vod_pic = await moduleObject["图片替换"].apply(injectVars, [vod_pic]); + else vod_pic = await moduleObject["图片替换"](vod_pic); + else if (typeof moduleObject["图片替换"] === "string" && moduleObject["图片替换"].includes("=>")) { let replace_from = moduleObject["图片替换"].split("=>")[0]; let replace_to = moduleObject["图片替换"].split("=>")[1]; vod_pic = vod_pic.replace(replace_from, replace_to); } } - if (moduleObject["图片来源"] && vod_pic && vod_pic.startsWith("http")) { - vod_pic += moduleObject["图片来源"]; - } + if (moduleObject["图片来源"] && vod_pic && vod_pic.startsWith("http")) vod_pic += moduleObject["图片来源"]; } catch (e) { log(`[processImage] 图片处理失败: ${e.message}`); } @@ -403804,9 +384772,7 @@ function formatSrtTime(milliseconds) { return `${hours.toString().padStart(2, "0")}:${minutes.toString().padStart(2, "0")}:${seconds.toString().padStart(2, "0")},${ms.toString().padStart(3, "0")}`; } function lrcToSrt(lrcContent) { - if (!lrcContent || typeof lrcContent !== "string") { - return ""; - } + if (!lrcContent || typeof lrcContent !== "string") return ""; const lines = lrcContent.split("\n"); const timeLines = []; for (const line of lines) { @@ -403819,18 +384785,14 @@ function lrcToSrt(lrcContent) { const milliseconds = timeMatch[3] ? parseInt(timeMatch[3].padEnd(3, "0")) : 0; const text = timeMatch[4].trim(); const totalMs = minutes * 60 * 1e3 + seconds * 1e3 + milliseconds; - if (text) { - timeLines.push({ - time: totalMs, - text - }); - } + if (text) timeLines.push({ + time: totalMs, + text + }); } } timeLines.sort((a, b) => a.time - b.time); - if (timeLines.length === 0) { - return ""; - } + if (timeLines.length === 0) return ""; let srtContent = ""; for (let i = 0; i < timeLines.length; i++) { const currentLine = timeLines[i]; @@ -403855,9 +384817,7 @@ function strExtract(content, pattern, groupIndex = 0) { try { const regex = new RegExp(pattern); const match = content.match(regex); - if (match && match[groupIndex] !== undefined) { - return match[groupIndex]; - } + if (match && match[groupIndex] !== void 0) return match[groupIndex]; return ""; } catch (error) { console.error("strExtract error:", error); @@ -403881,7 +384841,6 @@ globalThis.ungzip = ungzip$1; globalThis.parseQueryString = parseQueryString; globalThis.lrcToSrt = lrcToSrt; globalThis.strExtract = strExtract; - //#endregion //#region ../libs/drpysParser.js /** @@ -403890,9 +384849,9 @@ globalThis.strExtract = strExtract; */ var PageRequestCache = class { constructor(maxSize = 20, maxAge = 2e4) { - this.cache = new Map(); + this.cache = /* @__PURE__ */ new Map(); this.accessOrder = []; - this.timers = new Map(); + this.timers = /* @__PURE__ */ new Map(); this.maxSize = maxSize; this.maxAge = maxAge; } @@ -403902,14 +384861,10 @@ var PageRequestCache = class { this._updateAccessOrder(key); return item.value; } - return undefined; } set(key, value) { - if (this.cache.has(key)) { - this._clearTimer(key); - } else { - this._evictIfNeeded(); - } + if (this.cache.has(key)) this._clearTimer(key); + else this._evictIfNeeded(); const item = { value, timestamp: Date.now() @@ -403934,9 +384889,7 @@ var PageRequestCache = class { return false; } clear() { - for (const timer of this.timers.values()) { - clearTimeout(timer); - } + for (const timer of this.timers.values()) clearTimeout(timer); this.cache.clear(); this.accessOrder = []; this.timers.clear(); @@ -403962,9 +384915,7 @@ var PageRequestCache = class { } _removeFromAccessOrder(key) { const index = this.accessOrder.indexOf(key); - if (index > -1) { - this.accessOrder.splice(index, 1); - } + if (index > -1) this.accessOrder.splice(index, 1); } _clearTimer(key) { const timer = this.timers.get(key); @@ -403979,9 +384930,7 @@ var PageRequestCache = class { if (oldestKey) { console.log(`[PageRequestCache] FIFO淘汰缓存: ${oldestKey}`); this.delete(oldestKey); - } else { - break; - } + } else break; } } [Symbol.iterator]() { @@ -404020,13 +384969,11 @@ function createParserContext(url, rule, extraVars = {}) { * @returns {Object} 解析函数对象 */ function selectParseMode(isJson, context) { - if (isJson) { - return { - $pdfa: context.pjfa, - $pdfh: context.pjfh, - $pd: context.pj - }; - } + if (isJson) return { + $pdfa: context.pjfa, + $pdfh: context.pjfh, + $pd: context.pj + }; return { $pdfa: context.pdfa, $pdfh: context.pdfh, @@ -404052,9 +384999,7 @@ async function cachedRequest(requestFunc, url, options = {}, cachePrefix = "host log(`[cachedRequest] 首次请求页面: ${url}`); try { const result = await requestFunc(url, options); - if (result) { - pageRequestCache.set(cacheKey, result); - } + if (result) pageRequestCache.set(cacheKey, result); return result; } catch (e) { log(`[cachedRequest] 请求失败: ${url}, 错误: ${e.message}`); @@ -404120,12 +385065,10 @@ function safeParseUrl(parseFunc, element, selector, baseUrl, context, defaultVal * @returns {Promise} 处理后的视频对象 */ async function processVodCommon(vod, moduleObject, context) { - if (vod.vod_pic) { - try { - vod.vod_pic = await processImage(vod.vod_pic, moduleObject, context); - } catch (e) { - log(`[processVodCommon] 图片处理失败: ${e.message}`); - } + if (vod.vod_pic) try { + vod.vod_pic = await processImage(vod.vod_pic, moduleObject, context); + } catch (e) { + log(`[processVodCommon] 图片处理失败: ${e.message}`); } try { vod = vodDeal(vod, moduleObject); @@ -404174,17 +385117,11 @@ async function buildVodObject(element, params, moduleObject, injectVars, context } let vod_id = links.join("$"); let vod_content = ""; - if (p5) { - try { - vod_content = $pdfh(element, p5); - } catch (e) {} - } - if (moduleObject["二级"] === "*") { - vod_id = vod_id + "@@" + vod_name + "@@" + vod_pic; - } - if (vod_pic) { - vod_pic = await processImage(vod_pic, moduleObject, injectVars); - } + if (p5) try { + vod_content = $pdfh(element, p5); + } catch (e) {} + if (moduleObject["二级"] === "*") vod_id = vod_id + "@@" + vod_name + "@@" + vod_pic; + if (vod_pic) vod_pic = await processImage(vod_pic, moduleObject, injectVars); return { "vod_id": vod_id, "vod_name": vod_name, @@ -404195,66 +385132,47 @@ async function buildVodObject(element, params, moduleObject, injectVars, context } async function homeParse(rule) { let url = rule.homeUrl; - if (typeof rule.filter === "string" && rule.filter.trim().length > 0) { - try { - let filter_json = ungzip$1(rule.filter.trim()); - rule.filter = JSON.parse(filter_json); - } catch (e) { - log(`[homeParse] [${rule.title}] filter ungzip或格式化解密出错: ${e.message}`); - rule.filter = {}; - } + if (typeof rule.filter === "string" && rule.filter.trim().length > 0) try { + let filter_json = ungzip$1(rule.filter.trim()); + rule.filter = JSON.parse(filter_json); + } catch (e) { + log(`[homeParse] [${rule.title}] filter ungzip或格式化解密出错: ${e.message}`); + rule.filter = {}; } let classes = []; if (rule.class_name && rule.class_url) { let names = rule.class_name.split("&"); let urls = rule.class_url.split("&"); let cnt = Math.min(names.length, urls.length); - for (let i = 0; i < cnt; i++) { - classes.push({ - "type_id": urls[i], - "type_name": names[i], - "type_flag": rule["class_flag"] - }); - } + for (let i = 0; i < cnt; i++) classes.push({ + "type_id": urls[i], + "type_name": names[i], + "type_flag": rule["class_flag"] + }); } - const context = createParserContext(url, rule, { + return createParserContext(url, rule, { TYPE: "home", input: url, classes, - filters: rule.filter, + filters: rule.hasOwnProperty("filter") ? rule.filter || {} : null, cate_exclude: rule.cate_exclude, home_flag: rule.home_flag }); - return context; } async function homeParseAfter(d, _type, hikerListCol, hikerClassListCol, mergeList, injectVars) { - if (!d) { - d = {}; - } + if (!d) d = {}; d.type = _type || "影视"; - if (hikerListCol) { - d.hikerListCol = hikerListCol; - } - if (hikerClassListCol) { - d.hikerClassListCol = hikerClassListCol; - } + if (hikerListCol) d.hikerListCol = hikerListCol; + if (hikerClassListCol) d.hikerClassListCol = hikerClassListCol; if (mergeList) { d.hikerSkipEr = mergeList; d.mergeList = mergeList; } const { classes, filters, cate_exclude, home_flag } = injectVars; - if (!Array.isArray(d.class)) { - d.class = classes; - } - if (!d.filters) { - d.filters = filters; - } - if (!d.list) { - d.list = []; - } - if (!d.type_flag && home_flag) { - d.type_flag = home_flag; - } + if (!Array.isArray(d.class)) d.class = classes; + if (!d.filters) d.filters = filters; + if (!d.list) d.list = []; + if (!d.type_flag && home_flag) d.type_flag = home_flag; d.class = d.class.filter((it) => !cate_exclude || !new RegExp(cate_exclude).test(it.type_name)); if (d.filters && Object.keys(d.filters).length === 1 && Object.keys(d.filters)[0] === "*") { const common_filters = d.filters["*"]; @@ -404277,51 +385195,35 @@ async function homeVodParse(rule) { async function cateParse(rule, tid, pg, filter, extend) { log("[cateParse]", tid, pg, filter, extend); let url = rule.url.replaceAll("fyclass", tid); - if (pg === 1 && url.includes("[") && url.includes("]")) { - url = url.split("[")[1].split("]")[0]; - } else if (pg > 1 && url.includes("[") && url.includes("]")) { - url = url.split("[")[0]; - } - if (rule.filter_def && typeof rule.filter_def === "object") { - try { - if (Object.keys(rule.filter_def).length > 0 && rule.filter_def.hasOwnProperty(tid)) { - let self_fl_def = rule.filter_def[tid]; - if (self_fl_def && typeof self_fl_def === "object") { - let k = [Object.keys(self_fl_def)][0]; - k.forEach((k) => { - if (!extend.hasOwnProperty(k)) { - extend[k] = self_fl_def[k]; - } - }); - } - } - } catch (e) { - log(`[cateParse] 合并不同分类对应的默认筛选出错:${e.message}`); + if (pg === 1 && url.includes("[") && url.includes("]")) url = url.split("[")[1].split("]")[0]; + else if (pg > 1 && url.includes("[") && url.includes("]")) url = url.split("[")[0]; + if (rule.filter_def && typeof rule.filter_def === "object") try { + if (Object.keys(rule.filter_def).length > 0 && rule.filter_def.hasOwnProperty(tid)) { + let self_fl_def = rule.filter_def[tid]; + if (self_fl_def && typeof self_fl_def === "object") [Object.keys(self_fl_def)][0].forEach((k) => { + if (!extend.hasOwnProperty(k)) extend[k] = self_fl_def[k]; + }); } + } catch (e) { + log(`[cateParse] 合并不同分类对应的默认筛选出错:${e.message}`); } if (rule.filter_url) { if (!/fyfilter/.test(url)) { - if (!url.endsWith("&") && !rule.filter_url.startsWith("&")) { - url += "&"; - } + if (!url.endsWith("&") && !rule.filter_url.startsWith("&")) url += "&"; url += rule.filter_url; - } else { - url = url.replace("fyfilter", rule.filter_url); - } + } else url = url.replace("fyfilter", rule.filter_url); url = url.replaceAll("fyclass", tid); let fl = filter ? extend : {}; - if (rule.filter_def && typeof rule.filter_def === "object") { - try { - if (Object.keys(rule.filter_def).length > 0 && rule.filter_def.hasOwnProperty(tid)) { - let self_fl_def = rule.filter_def[tid]; - if (self_fl_def && typeof self_fl_def === "object") { - let fl_def = deepCopy$1(self_fl_def); - fl = Object.assign(fl_def, fl); - } + if (rule.filter_def && typeof rule.filter_def === "object") try { + if (Object.keys(rule.filter_def).length > 0 && rule.filter_def.hasOwnProperty(tid)) { + let self_fl_def = rule.filter_def[tid]; + if (self_fl_def && typeof self_fl_def === "object") { + let fl_def = deepCopy$1(self_fl_def); + fl = Object.assign(fl_def, fl); } - } catch (e) { - log(`[cateParse] 合并不同分类对应的默认筛选出错:${e.message}`); } + } catch (e) { + log(`[cateParse] 合并不同分类对应的默认筛选出错:${e.message}`); } let new_url; new_url = jinja$1.render(url, { @@ -404330,16 +385232,12 @@ async function cateParse(rule, tid, pg, filter, extend) { }); url = new_url; } - if (/fypage/.test(url)) { - if (url.includes("(") && url.includes(")")) { - let url_rep = url.match(/.*?\((.*)\)/)[1]; - let cnt_page = url_rep.replaceAll("fypage", pg); - let cnt_pg = eval(cnt_page); - url = url.replaceAll(url_rep, cnt_pg).replaceAll("(", "").replaceAll(")", ""); - } else { - url = url.replaceAll("fypage", pg); - } - } + if (/fypage/.test(url)) if (url.includes("(") && url.includes(")")) { + let url_rep = url.match(/.*?\((.*)\)/)[1]; + let cnt_page = url_rep.replaceAll("fypage", pg); + let cnt_pg = eval(cnt_page); + url = url.replaceAll(url_rep, cnt_pg).replaceAll("(", "").replaceAll(")", ""); + } else url = url.replaceAll("fypage", pg); return createParserContext(url, rule, { MY_CATE: tid, MY_FL: extend, @@ -404369,13 +385267,9 @@ async function detailParse(rule, ids) { } let detailUrl = vid.split("@@")[0]; let url; - if (!detailUrl.startsWith("http") && !detailUrl.includes("/")) { - url = rule.detailUrl.replaceAll("fyid", detailUrl).replaceAll("fyclass", fyclass); - } else if (detailUrl.includes("/")) { - url = urljoin$2(rule.homeUrl, detailUrl); - } else { - url = detailUrl; - } + if (!detailUrl.startsWith("http") && !detailUrl.includes("/")) url = rule.detailUrl.replaceAll("fyid", detailUrl).replaceAll("fyclass", fyclass); + else if (detailUrl.includes("/")) url = urljoin$2(rule.homeUrl, detailUrl); + else url = detailUrl; return createParserContext(url, rule, { TYPE: "detail", input: url, @@ -404390,34 +385284,19 @@ async function detailParseAfter(vod) { } async function searchParse(rule, wd, quick, pg) { if (rule.search_encoding) { - if (rule.search_encoding.toLowerCase() !== "utf-8") { - wd = encodeStr(wd, rule.search_encoding); - } - } else if (rule.encoding && rule.encoding.toLowerCase() !== "utf-8") { - wd = encodeStr(wd, rule.encoding); - } - if (!rule.searchUrl) { - return; - } - if (rule.searchNoPage && Number(pg) > 1) { - return "{}"; - } + if (rule.search_encoding.toLowerCase() !== "utf-8") wd = encodeStr(wd, rule.search_encoding); + } else if (rule.encoding && rule.encoding.toLowerCase() !== "utf-8") wd = encodeStr(wd, rule.encoding); + if (!rule.searchUrl) return; + if (rule.searchNoPage && Number(pg) > 1) return "{}"; let url = rule.searchUrl.replaceAll("**", wd); - if (pg === 1 && url.includes("[") && url.includes("]") && !url.includes("#")) { - url = url.split("[")[1].split("]")[0]; - } else if (pg > 1 && url.includes("[") && url.includes("]") && !url.includes("#")) { - url = url.split("[")[0]; - } - if (/fypage/.test(url)) { - if (url.includes("(") && url.includes(")")) { - let url_rep = url.match(/.*?\((.*)\)/)[1]; - let cnt_page = url_rep.replaceAll("fypage", pg); - let cnt_pg = eval(cnt_page); - url = url.replaceAll(url_rep, cnt_pg).replaceAll("(", "").replaceAll(")", ""); - } else { - url = url.replaceAll("fypage", pg); - } - } + if (pg === 1 && url.includes("[") && url.includes("]") && !url.includes("#")) url = url.split("[")[1].split("]")[0]; + else if (pg > 1 && url.includes("[") && url.includes("]") && !url.includes("#")) url = url.split("[")[0]; + if (/fypage/.test(url)) if (url.includes("(") && url.includes(")")) { + let url_rep = url.match(/.*?\((.*)\)/)[1]; + let cnt_page = url_rep.replaceAll("fypage", pg); + let cnt_pg = eval(cnt_page); + url = url.replaceAll(url_rep, cnt_pg).replaceAll("(", "").replaceAll(")", ""); + } else url = url.replaceAll("fypage", pg); return createParserContext(url, rule, { TYPE: "search", MY_PAGE: pg, @@ -404437,21 +385316,14 @@ async function searchParseAfter(rule, d, pg) { } async function playParse(rule, flag, id, flags) { let url = id; - if (!/http/.test(url)) { - try { - url = base64Decode$2(url); - log("[playParse] id is base64 data"); - } catch (e) {} - } + if (!/http/.test(url)) try { + url = base64Decode$2(url); + log("[playParse] id is base64 data"); + } catch (e) {} url = decodeURIComponent(url); - if (!/^http/.test(url)) { - url = id; - } - if (id !== url) { - log(`[playParse] ${id} => ${url}`); - } else { - log(`[playParse] ${url}`); - } + if (!/^http/.test(url)) url = id; + if (id !== url) log(`[playParse] ${id} => ${url}`); + else log(`[playParse] ${url}`); return createParserContext(url, rule, { TYPE: "play", MY_FLAG: flag, @@ -404469,46 +385341,35 @@ async function playParseAfter(rule, obj, playUrl, flag) { let lazy_play; const is_lazy_function = rule.play_parse && rule.lazy && typeof rule.lazy === "function"; const is_lazy_function_str = rule.play_parse && rule.lazy && typeof rule.lazy === "string" && rule.lazy.startsWith("js:"); - if (!rule.play_parse || !rule.lazy) { - lazy_play = common_play; - } else if (is_lazy_function || is_lazy_function_str) { - try { - lazy_play = typeof obj === "object" ? obj : { - parse: SPECIAL_URL.test(obj) || /^(push:)/.test(obj) ? 0 : 1, - jx: tellIsJx$1(obj), - url: obj - }; - } catch (e) { - log(`[playParseAfter] js免嗅错误:${e.message}`); - lazy_play = common_play; - } - } else { + if (!rule.play_parse || !rule.lazy) lazy_play = common_play; + else if (is_lazy_function || is_lazy_function_str) try { + lazy_play = typeof obj === "object" ? obj : { + parse: SPECIAL_URL.test(obj) || /^(push:)/.test(obj) ? 0 : 1, + jx: tellIsJx$1(obj), + url: obj + }; + } catch (e) { + log(`[playParseAfter] js免嗅错误:${e.message}`); lazy_play = common_play; } + else lazy_play = common_play; if (Array.isArray(rule.play_json) && rule.play_json.length > 0) { let web_url = lazy_play.url; - for (let pjson of rule.play_json) { - if (pjson.re && (pjson.re === "*" || web_url.match(new RegExp(pjson.re)))) { - if (pjson.json && typeof pjson.json === "object") { - let base_json = pjson.json; - lazy_play = Object.assign(lazy_play, base_json); - break; - } + for (let pjson of rule.play_json) if (pjson.re && (pjson.re === "*" || web_url.match(new RegExp(pjson.re)))) { + if (pjson.json && typeof pjson.json === "object") { + let base_json = pjson.json; + lazy_play = Object.assign(lazy_play, base_json); + break; } } - } else if (rule.play_json && !Array.isArray(rule.play_json)) { - let base_json = { - jx: 1, - parse: 1 - }; - lazy_play = Object.assign(lazy_play, base_json); - } else if (!rule.play_json) { - let base_json = { - jx: 0, - parse: 1 - }; - lazy_play = Object.assign(lazy_play, base_json); - } + } else if (rule.play_json && !Array.isArray(rule.play_json)) lazy_play = Object.assign(lazy_play, { + jx: 1, + parse: 1 + }); + else if (!rule.play_json) lazy_play = Object.assign(lazy_play, { + jx: 0, + parse: 1 + }); return lazy_play; } async function proxyParse(rule, params) { @@ -404543,51 +385404,34 @@ async function commonClassParse(moduleObject, method, injectVars, args) { sandboxString("host") ], moduleObject.context, "获取HTML异常", ""); if (html) { - if (is_json) { - html = dealJson(html); - } + if (is_json) html = dealJson(html); const { $pdfa, $pdfh, $pd } = selectParseMode(is_json, this); - if (is_json) { - try { - let list = $pdfa(html, p0); - if (list && list.length > 0) { - classes = list; - } - } catch (e) { - log(`[commonClassParse] json分类解析失败:${e.message}`); - } - } else if (p.length >= 3) { - try { - let list = $pdfa(html, p0); - if (list && list.length > 0) { - for (const it of list) { - try { - let name = $pdfh(it, p[1]); - if (cate_exclude && new RegExp(cate_exclude).test(name)) { - continue; - } - let url = $pd(it, p[2]); - if (p.length > 3 && p[3]) { - let exp = new RegExp(p[3]); - let match = url.match(exp); - if (match && match[1]) { - url = match[1]; - } - } - if (name.trim()) { - classes.push({ - "type_id": url.trim(), - "type_name": name.trim() - }); - } - } catch (e) { - log(`[commonClassParse] 分类列表解析元素失败:${e.message}`); - } - } - } + if (is_json) try { + let list = $pdfa(html, p0); + if (list && list.length > 0) classes = list; + } catch (e) { + log(`[commonClassParse] json分类解析失败:${e.message}`); + } + else if (p.length >= 3) try { + let list = $pdfa(html, p0); + if (list && list.length > 0) for (const it of list) try { + let name = $pdfh(it, p[1]); + if (cate_exclude && new RegExp(cate_exclude).test(name)) continue; + let url = $pd(it, p[2]); + if (p.length > 3 && p[3]) { + let exp = new RegExp(p[3]); + let match = url.match(exp); + if (match && match[1]) url = match[1]; + } + if (name.trim()) classes.push({ + "type_id": url.trim(), + "type_name": name.trim() + }); } catch (e) { - log(`[commonClassParse] 分类列表解析失败:${e.message}`); + log(`[commonClassParse] 分类列表解析元素失败:${e.message}`); } + } catch (e) { + log(`[commonClassParse] 分类列表解析失败:${e.message}`); } } return { class: classes }; @@ -404604,12 +385448,8 @@ async function commonClassParse(moduleObject, method, injectVars, args) { */ async function commonHomeListParse(moduleObject, method, injectVars, args) { let p = moduleObject[method] === "*" && moduleObject["一级"] ? moduleObject["一级"] : moduleObject[method]; - if (typeof p === "function") { - return await invokeWithInjectVars(moduleObject, p, injectVars, args); - } - if (moduleObject[method] === "*") { - moduleObject["double"] = false; - } + if (typeof p === "function") return await invokeWithInjectVars(moduleObject, p, injectVars, args); + if (moduleObject[method] === "*") moduleObject["double"] = false; p = p.trim(); let pp = typeof moduleObject["一级"] === "string" ? moduleObject["一级"].split(";") : []; const is_double = moduleObject.double; @@ -404618,16 +385458,12 @@ async function commonHomeListParse(moduleObject, method, injectVars, args) { const d = []; const config = initCommonParseConfig(p, pp, MY_URL, moduleObject); const { p: parsedP, p0, is_json, parseParams } = config; - if (!is_double && parsedP.length < 5 || is_double && parsedP.length < 6) { - return d; - } + if (!is_double && parsedP.length < 5 || is_double && parsedP.length < 6) return d; let html = await getCommonHtml(MY_URL, moduleObject, "cachedRequest"); if (html) { p = parsedP; if (is_double) { - if (is_json) { - html = dealJson(html); - } + if (is_json) html = dealJson(html); const { $pdfa, $pdfh, $pd } = selectParseMode(is_json, this); let list = $pdfa(html, p0); const parseContext = { @@ -404645,14 +385481,13 @@ async function commonHomeListParse(moduleObject, method, injectVars, args) { for (const it of list) { let list2 = $pdfa(it, p1); for (let it2 of list2) { - const params = { + const vod = await buildVodObject(it2, { p1: p2, p2: p3, p3: p4, p4: p5, p5: p.length > 6 && p[6] ? p6 : "" - }; - const vod = await buildVodObject(it2, params, moduleObject, injectVars, parseContext); + }, moduleObject, injectVars, parseContext); d.push(vod); } } @@ -404699,18 +385534,14 @@ function initCommonParseConfig(p, pp, MY_URL, moduleObject) { * @returns {Promise} HTML内容 */ async function getCommonHtml(url, moduleObject, method = "get") { - if (method === "cachedRequest") { - return await executeSandboxFunction("cachedRequest", [ - sandboxVar("request"), - sandboxString(url), - {}, - sandboxString("host") - ], moduleObject.context, "获取HTML异常", ""); - } else if (method === "request") { - return await executeSandboxFunction("request", [sandboxString(url), {}], moduleObject.context, "获取HTML异常", ""); - } else { - return await executeSandboxFunction("getHtml", [sandboxString(url)], moduleObject.context, "获取HTML异常", ""); - } + if (method === "cachedRequest") return await executeSandboxFunction("cachedRequest", [ + sandboxVar("request"), + sandboxString(url), + {}, + sandboxString("host") + ], moduleObject.context, "获取HTML异常", ""); + else if (method === "request") return await executeSandboxFunction("request", [sandboxString(url), {}], moduleObject.context, "获取HTML异常", ""); + else return await executeSandboxFunction("getHtml", [sandboxString(url)], moduleObject.context, "获取HTML异常", ""); } /** * 通用列表解析逻辑 @@ -404724,9 +385555,7 @@ async function getCommonHtml(url, moduleObject, method = "get") { async function parseCommonList(html, config, context, moduleObject, injectVars) { const { p0, is_json, parseParams } = config; const d = []; - if (is_json) { - html = dealJson(html); - } + if (is_json) html = dealJson(html); const { $pdfa, $pdfh, $pd } = selectParseMode(is_json, context); let list = $pdfa(html, p0); const parseContext = { @@ -404769,34 +385598,24 @@ async function commonCategoryListParse(moduleObject, method, injectVars, args) { const tmpFunction = async function() { const { input, MY_URL, MY_CATE, pdfa, pdfh, pd, pjfa, pjfh, pj } = this; const d = []; - const config = initCommonParseConfig(p, [], MY_URL, moduleObject); - const { p: parsedP, p0, is_json } = config; - if (parsedP.length < 5) { - return d; - } + const { p: parsedP, p0, is_json } = initCommonParseConfig(p, [], MY_URL, moduleObject); + if (parsedP.length < 5) return d; let html = await executeSandboxFunction("request", [sandboxString(input), {}], moduleObject.context, "获取HTML异常", ""); if (html) { - if (is_json) { - html = dealJson(html); - } + if (is_json) html = dealJson(html); const { $pdfa, $pdfh, $pd } = selectParseMode(is_json, this); let list = $pdfa(html, p0); p = parsedP; for (const it of list) { - let links = p[4].split("+").map((p4) => { + let link = p[4].split("+").map((p4) => { return !moduleObject.detailUrl ? $pd(it, p4, MY_URL) : $pdfh(it, p4); - }); - let link = links.join("$"); + }).join("$"); let vod_id = moduleObject.detailUrl ? MY_CATE + "$" + link : link; let vod_name = $pdfh(it, p[1]).replace(/\n|\t/g, "").trim(); let vod_pic = $pd(it, p[2], MY_URL); let vod_remarks = $pdfh(it, p[3]).replace(/\n|\t/g, "").trim(); - if (moduleObject["二级"] === "*") { - vod_id = vod_id + "@@" + vod_name + "@@" + vod_pic; - } - if (vod_pic) { - vod_pic = await processImage(vod_pic, moduleObject, injectVars); - } + if (moduleObject["二级"] === "*") vod_id = vod_id + "@@" + vod_name + "@@" + vod_pic; + if (vod_pic) vod_pic = await processImage(vod_pic, moduleObject, injectVars); d.push({ "vod_id": vod_id, "vod_name": vod_name, @@ -404868,15 +385687,11 @@ async function commonDetailListParse(moduleObject, method, injectVars, args) { vod.vod_content = MY_URL; vod.vod_play_url = "嗅探播放$" + MY_URL.split("@@")[0]; } else if (typeof p === "object" && p !== null) { - if (!html) { - html = await executeSandboxFunction("request", [sandboxString(input)], moduleObject.context, "[commonDetailListParse] 获取详情页源码失败"); - } + if (!html) html = await executeSandboxFunction("request", [sandboxString(input)], moduleObject.context, "[commonDetailListParse] 获取详情页源码失败"); if (p.is_json) { log("[commonDetailListParse] 二级是json"); html = dealJson(html); - } else { - log("[commonDetailListParse] 二级默认jq"); - } + } else log("[commonDetailListParse] 二级默认jq"); const { $pdfa, $pdfh, $pd } = selectParseMode(p.is_json, this); if (p.title) { let p1 = p.title.split(";"); @@ -404908,105 +385723,78 @@ async function commonDetailListParse(moduleObject, method, injectVars, args) { log("[commonDetailListParse] 开始执行重定向代码"); html = await safeExecute(() => p.重定向.call(this), "commonDetailListParse-重定向", html); } - if (p.tabs) { - if (typeof p.tabs === "function") { - log("[commonDetailListParse] 开始执行tabs代码"); - try { - const TABS = await p.tabs.call(this); - playFrom = TABS; - } catch (e) { - log(`[commonDetailListParse] tabs执行失败:${e.message}`); - } - } else { - let p_tab = p.tabs.split(";")[0]; - let vHeader = $pdfa(html, p_tab); - let tab_text = p.tab_text || "body&&Text"; - let new_map = {}; - for (let v of vHeader) { - let v_title = $pdfh(v, tab_text).trim(); - if (!v_title) { - v_title = "线路空"; - } - if (moduleObject.tab_exclude && new RegExp(moduleObject.tab_exclude).test(v_title)) { - continue; - } - if (!new_map.hasOwnProperty(v_title)) { - new_map[v_title] = 1; - } else { - new_map[v_title] += 1; - } - if (new_map[v_title] > 1) { - v_title += Number(new_map[v_title] - 1); - } - playFrom.push(v_title); - } + if (p.tabs) if (typeof p.tabs === "function") { + log("[commonDetailListParse] 开始执行tabs代码"); + try { + playFrom = await p.tabs.call(this); + } catch (e) { + log(`[commonDetailListParse] tabs执行失败:${e.message}`); } } else { - playFrom = ["道长在线"]; - } + let p_tab = p.tabs.split(";")[0]; + let vHeader = $pdfa(html, p_tab); + let tab_text = p.tab_text || "body&&Text"; + let new_map = {}; + for (let v of vHeader) { + let v_title = $pdfh(v, tab_text).trim(); + if (!v_title) v_title = "线路空"; + if (moduleObject.tab_exclude && new RegExp(moduleObject.tab_exclude).test(v_title)) continue; + if (!new_map.hasOwnProperty(v_title)) new_map[v_title] = 1; + else new_map[v_title] += 1; + if (new_map[v_title] > 1) v_title += Number(new_map[v_title] - 1); + playFrom.push(v_title); + } + } + else playFrom = ["道长在线"]; vod.vod_play_from = playFrom.join(vod_play_from); let vod_play_url = "$$$"; let vod_tab_list = []; - if (p.lists) { - if (typeof p.lists === "function") { - log("[commonDetailListParse] 开始执行lists代码"); - try { - const LISTS = await p.lists.call(this); - for (let i in LISTS) { - if (LISTS.hasOwnProperty(i)) { - try { - LISTS[i] = LISTS[i].map((it) => it.split("$").slice(0, 2).join("$")); - } catch (e) { - log(`[commonDetailListParse] 格式化LISTS发生错误:${e.message}`); - } - } - } - vod_play_url = LISTS.map((it) => it.join("#")).join(vod_play_url); + if (p.lists) if (typeof p.lists === "function") { + log("[commonDetailListParse] 开始执行lists代码"); + try { + const LISTS = await p.lists.call(this); + for (let i in LISTS) if (LISTS.hasOwnProperty(i)) try { + LISTS[i] = LISTS[i].map((it) => it.split("$").slice(0, 2).join("$")); } catch (e) { - log(`[commonDetailListParse] lists执行失败:${e.message}`); + log(`[commonDetailListParse] 格式化LISTS发生错误:${e.message}`); } - } else { - let list_text = p.list_text || "body&&Text"; - let list_url = p.list_url || "a&&href"; - let list_url_prefix = p.list_url_prefix || ""; - let is_tab_js = typeof p.tabs === "function"; - for (let i = 0; i < playFrom.length; i++) { - let tab_name = playFrom[i]; - let tab_ext = ""; - if (typeof p.tabs === "string" && p.tabs.split(";").length > 1 && !is_tab_js) { - tab_ext = p.tabs.split(";")[1]; - } - let p1 = p.lists.replaceAll("#idv", tab_name).replaceAll("#id", i); - if (tab_ext) { - tab_ext = tab_ext.replaceAll("#idv", tab_name).replaceAll("#id", i); - } - let tabName = tab_ext ? $pdfh(html, tab_ext) : tab_name; - let new_vod_list = []; - if (typeof this.pdfl === "function") { - new_vod_list = this.pdfl(html, p1, list_text, list_url, this.MY_URL); - if (list_url_prefix) { - new_vod_list = new_vod_list.map((it) => it.split("$")[0] + "$" + list_url_prefix + it.split("$").slice(1).join("$")); - } - } else { - let vodList = []; - try { - vodList = $pdfa(html, p1); - } catch (e) { - log(`[commonDetailListParse] 解析vodList失败:${e.message}`); - } - for (let j = 0; j < vodList.length; j++) { - let it = vodList[j]; - new_vod_list.push($pdfh(it, list_text).trim() + "$" + list_url_prefix + $pd(it, list_url, this.MY_URL)); - } + vod_play_url = LISTS.map((it) => it.join("#")).join(vod_play_url); + } catch (e) { + log(`[commonDetailListParse] lists执行失败:${e.message}`); + } + } else { + let list_text = p.list_text || "body&&Text"; + let list_url = p.list_url || "a&&href"; + let list_url_prefix = p.list_url_prefix || ""; + let is_tab_js = typeof p.tabs === "function"; + for (let i = 0; i < playFrom.length; i++) { + let tab_name = playFrom[i]; + let tab_ext = ""; + if (typeof p.tabs === "string" && p.tabs.split(";").length > 1 && !is_tab_js) tab_ext = p.tabs.split(";")[1]; + let p1 = p.lists.replaceAll("#idv", tab_name).replaceAll("#id", i); + if (tab_ext) tab_ext = tab_ext.replaceAll("#idv", tab_name).replaceAll("#id", i); + let tabName = tab_ext ? $pdfh(html, tab_ext) : tab_name; + let new_vod_list = []; + if (typeof this.pdfl === "function") { + new_vod_list = this.pdfl(html, p1, list_text, list_url, this.MY_URL); + if (list_url_prefix) new_vod_list = new_vod_list.map((it) => it.split("$")[0] + "$" + list_url_prefix + it.split("$").slice(1).join("$")); + } else { + let vodList = []; + try { + vodList = $pdfa(html, p1); + } catch (e) { + log(`[commonDetailListParse] 解析vodList失败:${e.message}`); } - if (new_vod_list.length > 0) { - new_vod_list = forceOrder(new_vod_list, "", (x) => x.split("$")[0]); + for (let j = 0; j < vodList.length; j++) { + let it = vodList[j]; + new_vod_list.push($pdfh(it, list_text).trim() + "$" + list_url_prefix + $pd(it, list_url, this.MY_URL)); } - let vlist = new_vod_list.join("#"); - vod_tab_list.push(vlist); } - vod_play_url = vod_tab_list.join(vod_play_url); + if (new_vod_list.length > 0) new_vod_list = forceOrder(new_vod_list, "", (x) => x.split("$")[0]); + let vlist = new_vod_list.join("#"); + vod_tab_list.push(vlist); } + vod_play_url = vod_tab_list.join(vod_play_url); } vod.vod_play_url = vod_play_url; } @@ -405025,9 +385813,7 @@ async function commonDetailListParse(moduleObject, method, injectVars, args) { */ async function commonSearchListParse(moduleObject, method, injectVars, args) { let p = moduleObject[method] === "*" && moduleObject["一级"] ? moduleObject["一级"] : moduleObject[method]; - if (typeof p === "function") { - return await invokeWithInjectVars(moduleObject, p, injectVars, args); - } + if (typeof p === "function") return await invokeWithInjectVars(moduleObject, p, injectVars, args); p = p.trim(); let pp = typeof moduleObject["一级"] === "string" ? moduleObject["一级"].split(";") : []; const rule_fetch_params = moduleObject.rule_fetch_params; @@ -405037,9 +385823,7 @@ async function commonSearchListParse(moduleObject, method, injectVars, args) { const d = []; const config = initCommonParseConfig(p, pp, MY_URL, moduleObject); const { p: parsedP, p0, is_json, parseParams } = config; - if (parsedP.length < 5) { - return d; - } + if (parsedP.length < 5) return d; let req_method = MY_URL.split(";").length > 1 ? MY_URL.split(";")[1].toLowerCase() : "get"; let html; if (req_method === "post") { @@ -405065,9 +385849,7 @@ async function commonSearchListParse(moduleObject, method, injectVars, args) { let postData = { body: params }; Object.assign(_fetch_params, postData); html = await post(rurl, _fetch_params); - } else { - html = await executeSandboxFunction("getHtml", [sandboxString(MY_URL)], moduleObject.context, "获取HTML异常", ""); - } + } else html = await executeSandboxFunction("getHtml", [sandboxString(MY_URL)], moduleObject.context, "获取HTML异常", ""); if (html) { let search_tag = moduleObject["搜索验证标识"] || "系统安全验证|输入验证码"; if (new RegExp(search_tag).test(html)) { @@ -405076,9 +385858,7 @@ async function commonSearchListParse(moduleObject, method, injectVars, args) { if (cookie) { log("本次成功过验证,cookie:" + cookie); await executeSandboxFunction("setItem", [sandboxVar("RULE_CK"), sandboxString(cookie)], moduleObject.context, "setItem异常", null); - } else { - log("本次自动过搜索验证失败,cookie:" + cookie); - } + } else log("本次自动过搜索验证失败,cookie:" + cookie); html = await executeSandboxFunction("getHtml", [sandboxString(MY_URL)], moduleObject.context, "重新获取HTML异常", ""); } } @@ -405107,46 +385887,33 @@ async function commonLazyParse(moduleObject, method, injectVars, args) { const tmpLazyFunction = async function(flag, id, flags) { let { input } = this; log("[tmpLazyFunction] input:", input); - let html = await executeSandboxFunction("request", [sandboxString(input), {}], moduleObject.context, "[commonLazyParse] 获取播放页源码失败"); - let hconf = html.match(/r player_.*?=(.*?) { - if (arg && typeof arg === "object") { - if (arg.__sandboxVar) { - return arg.name; - } else if (arg.__sandboxString) { - return `'${arg.value.replace(/'/g, "'")}'`; - } else { - return JSON.stringify(arg); - } - } else if (typeof arg === "function") { - return arg.name || "request"; - } else if (typeof arg === "string") { - if (/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(arg) && !arg.includes("http")) { - return arg; - } else { - return `'${arg.replace(/'/g, "\\'")}'`; - } - } else { - return String(arg); - } + if (arg && typeof arg === "object") if (arg.__sandboxVar) return arg.name; + else if (arg.__sandboxString) return `'${arg.value.replace(/'/g, "'")}'`; + else return JSON.stringify(arg); + else if (typeof arg === "function") return arg.name || "request"; + else if (typeof arg === "string") if (/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(arg) && !arg.includes("http")) return arg; + else return `'${arg.replace(/'/g, "\\'")}'`; + else return String(arg); }).join(", "); - const script = new vm.Script(` + return await new vm.Script(` (async function() { try { return await ${functionName}(${argsStr}); @@ -405299,8 +386042,7 @@ async function executeSandboxFunction(functionName, args, context, errorMessage return ${JSON.stringify(defaultReturn)}; } })() - `); - return await script.runInContext(context); + `).runInContext(context); } catch (e) { log(`[executeSandboxFunction] ${errorMessage}:`, e.message); return defaultReturn; @@ -405320,9 +386062,7 @@ async function executeJsCodeInSandbox(moduleObject, method, injectVars = {}, arg try { const jsCode = moduleObject[method].substring(3); const originalContext = moduleObject.context; - if (!originalContext) { - throw new Error("Sandbox context not found in moduleObject"); - } + if (!originalContext) throw new Error("Sandbox context not found in moduleObject"); functionCode = ` (async function() { ${jsCode} @@ -405332,27 +386072,21 @@ async function executeJsCodeInSandbox(moduleObject, method, injectVars = {}, arg ...originalContext, ...injectVars }); - const result = await vm.runInContext(functionCode, contextWithVars); - return deepCopy$1(result); + return deepCopy$1(await vm.runInContext(functionCode, contextWithVars)); } catch (error) { log(`[executeJsCodeInSandbox] Error executing js: code for method ${method}:`, error); throw new Error(`Failed to execute js: code: ${error.message}`); } finally { if (contextWithVars) { - for (const key in contextWithVars) { - try { - delete contextWithVars[key]; - } catch (e) {} - } + for (const key in contextWithVars) try { + delete contextWithVars[key]; + } catch (e) {} contextWithVars = null; } functionCode = null; - if (global.gc) { - global.gc(); - } + if (global.gc) global.gc(); } } - //#endregion //#region ../libs_drpy/es6-extend.js /** @@ -405364,125 +386098,93 @@ async function executeJsCodeInSandbox(moduleObject, method, injectVars = {}, arg * @author drpy * @version 1.0.0 */ -if (typeof Object.assign !== "function") { - Object.defineProperty(Object, "assign", { - value: function(target, ...sources) { - if (target == null) { - throw new TypeError("Cannot convert undefined or null to object"); - } - for (let source of sources) { - if (source != null) { - for (let key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - } - return target; - }, - writable: true, - configurable: true, - enumerable: false - }); -} -if (!String.prototype.includes) { - Object.defineProperty(String.prototype, "includes", { - value: function(search, start = 0) { - if (typeof start !== "number") start = 0; - return this.indexOf(search, start) !== -1; - }, - writable: true, - configurable: true, - enumerable: false - }); -} -if (!Array.prototype.includes) { - Object.defineProperty(Array.prototype, "includes", { - value: function(searchElement, fromIndex = 0) { - if (this == null) { - throw new TypeError("\"this\" is null or not defined"); - } - let o = Object(this); - let len = o.length >>> 0; - if (len === 0) return false; - let n = fromIndex | 0; - let k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); - while (k < len) { - if (o[k] === searchElement) return true; - k++; - } - return false; - }, - writable: true, - configurable: true, - enumerable: false - }); -} -if (typeof String.prototype.startsWith !== "function") { - Object.defineProperty(String.prototype, "startsWith", { - value: function(prefix) { - return this.slice(0, prefix.length) === prefix; - }, - writable: true, - configurable: true, - enumerable: false - }); -} -if (typeof String.prototype.endsWith !== "function") { - Object.defineProperty(String.prototype, "endsWith", { - value: function(suffix) { - return this.indexOf(suffix, this.length - suffix.length) !== -1; - }, - writable: true, - configurable: true, - enumerable: false - }); -} -if (typeof Object.values !== "function") { - Object.defineProperty(Object, "values", { - value: function(obj) { - if (obj == null) { - throw new TypeError("Cannot convert undefined or null to object"); - } - let values = []; - for (let key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - values.push(obj[key]); - } - } - return values; - }, - writable: true, - configurable: true, - enumerable: false - }); -} -if (typeof Array.prototype.join !== "function") { - Object.defineProperty(Array.prototype, "join", { - value: function(separator = "") { - let result = ""; - for (let i = 0; i < this.length; i++) { - if (i > 0) result += separator; - result += this[i]; - } - return result; - }, - writable: true, - configurable: true, - enumerable: false - }); -} -if (typeof Array.prototype.toReversed !== "function") { - Object.defineProperty(Array.prototype, "toReversed", { - value: function() { - return this.slice().reverse(); - }, - writable: true, - configurable: true, - enumerable: false - }); -} +if (typeof Object.assign !== "function") Object.defineProperty(Object, "assign", { + value: function(target, ...sources) { + if (target == null) throw new TypeError("Cannot convert undefined or null to object"); + for (let source of sources) if (source != null) { + for (let key in source) if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key]; + } + return target; + }, + writable: true, + configurable: true, + enumerable: false +}); +if (!String.prototype.includes) Object.defineProperty(String.prototype, "includes", { + value: function(search, start = 0) { + if (typeof start !== "number") start = 0; + return this.indexOf(search, start) !== -1; + }, + writable: true, + configurable: true, + enumerable: false +}); +if (!Array.prototype.includes) Object.defineProperty(Array.prototype, "includes", { + value: function(searchElement, fromIndex = 0) { + if (this == null) throw new TypeError("\"this\" is null or not defined"); + let o = Object(this); + let len = o.length >>> 0; + if (len === 0) return false; + let n = fromIndex | 0; + let k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); + while (k < len) { + if (o[k] === searchElement) return true; + k++; + } + return false; + }, + writable: true, + configurable: true, + enumerable: false +}); +if (typeof String.prototype.startsWith !== "function") Object.defineProperty(String.prototype, "startsWith", { + value: function(prefix) { + return this.slice(0, prefix.length) === prefix; + }, + writable: true, + configurable: true, + enumerable: false +}); +if (typeof String.prototype.endsWith !== "function") Object.defineProperty(String.prototype, "endsWith", { + value: function(suffix) { + return this.indexOf(suffix, this.length - suffix.length) !== -1; + }, + writable: true, + configurable: true, + enumerable: false +}); +if (typeof Object.values !== "function") Object.defineProperty(Object, "values", { + value: function(obj) { + if (obj == null) throw new TypeError("Cannot convert undefined or null to object"); + let values = []; + for (let key in obj) if (Object.prototype.hasOwnProperty.call(obj, key)) values.push(obj[key]); + return values; + }, + writable: true, + configurable: true, + enumerable: false +}); +if (typeof Array.prototype.join !== "function") Object.defineProperty(Array.prototype, "join", { + value: function(separator = "") { + let result = ""; + for (let i = 0; i < this.length; i++) { + if (i > 0) result += separator; + result += this[i]; + } + return result; + }, + writable: true, + configurable: true, + enumerable: false +}); +if (typeof Array.prototype.toReversed !== "function") Object.defineProperty(Array.prototype, "toReversed", { + value: function() { + return this.slice().reverse(); + }, + writable: true, + configurable: true, + enumerable: false +}); Object.defineProperty(Array.prototype, "append", { value: Array.prototype.push, writable: true, @@ -405505,17 +386207,15 @@ Object.defineProperty(String.prototype, "rstrip", { configurable: true, enumerable: false }); -if (typeof String.prototype.join !== "function") { - Object.defineProperty(String.prototype, "join", { - value: function(arr) { - if (!Array.isArray(arr)) return ""; - return arr.join(this); - }, - writable: true, - configurable: true, - enumerable: false - }); -} +if (typeof String.prototype.join !== "function") Object.defineProperty(String.prototype, "join", { + value: function(arr) { + if (!Array.isArray(arr)) return ""; + return arr.join(this); + }, + writable: true, + configurable: true, + enumerable: false +}); /** * 全局匹配函数 - 获取字符串中所有匹配项 * @param {string} str - 要搜索的字符串 @@ -405524,9 +386224,7 @@ if (typeof String.prototype.join !== "function") { * @returns {Array} 匹配结果数组 */ function matchesAll$1(str, pattern, flatten) { - if (typeof pattern === "string") { - pattern = new RegExp(pattern, "g"); - } + if (typeof pattern === "string") pattern = new RegExp(pattern, "g"); let matches = []; let match; while ((match = pattern.exec(str)) !== null) { @@ -405538,25 +386236,15 @@ function matchesAll$1(str, pattern, flatten) { Object.defineProperties(String.prototype, { replaceX: { value: function(regex, replacement) { - if (typeof regex === "string") { - regex = new RegExp(regex, "g"); - } - if (typeof replacement === "function") { - return this.replace(regex, replacement); - } + if (typeof regex === "string") regex = new RegExp(regex, "g"); + if (typeof replacement === "function") return this.replace(regex, replacement); replacement = replacement == null ? "" : String(replacement); const regexCopy = new RegExp(regex.source, regex.flags); let matches = matchesAll$1(this, regexCopy, true); - if (matches && matches.length > 1) { - const hasCaptureGroup = /\$\d/.test(replacement); - if (hasCaptureGroup) { - return this.replace(regex, replacement); - } else { - return this.replace(regex, function(match) { - return replacement; - }); - } - } + if (matches && matches.length > 1) if (/\$\d/.test(replacement)) return this.replace(regex, replacement); + else return this.replace(regex, function(match) { + return replacement; + }); return this.replace(regex, replacement); }, writable: true, @@ -405595,21 +386283,15 @@ function cut$1(text, start, end, method, All) { let result = text.substring(startIndex, endIndex) + end; if (All) { let results = [result]; - let remainingText = text.substring(endIndex + end.length); - let moreResults = cut$1(remainingText, start, end, method, true); - if (Array.isArray(moreResults)) { - results = results.concat(moreResults); - } + let moreResults = cut$1(text.substring(endIndex + end.length), start, end, method, true); + if (Array.isArray(moreResults)) results = results.concat(moreResults); return results; } - if (method && typeof method === "function") { - result = method(result); - } + if (method && typeof method === "function") result = method(result); return result; } globalThis.matchesAll = matchesAll$1; globalThis.cut = cut$1; - //#endregion //#region puppeteer-mock.js var launch, executablePath, puppeteer_mock_default; @@ -405617,13 +386299,7 @@ var init_puppeteer_mock = __esmMin((() => { launch = async () => { throw new Error("Puppeteer is not available in the bundled version."); }; - executablePath = () => "mock-path"; - puppeteer_mock_default = { - launch, - executablePath - }; })); - //#endregion //#region ../utils/headless-util.js var headless_util_exports = /* @__PURE__ */ __exportAll({ puppeteerHelper: () => puppeteerHelper }); @@ -405669,9 +386345,7 @@ var init_headless_util = __esmMin((() => { */ async gotoHtml(config) { let proxy = ""; - if (config.proxy) { - proxy = "http://127.0.0.1:7897"; - } + if (config.proxy) proxy = "http://127.0.0.1:7897"; this.browser = await launch({ headless: config.headless || true, args: [`--proxy-server=${proxy}`] @@ -405679,25 +386353,20 @@ var init_headless_util = __esmMin((() => { this.page = await this.browser.newPage(); await this.page.setExtraHTTPHeaders(config.headers || { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" }); let content = ""; - if (config.isJSON || config.isReq) { - return await this.page.evaluate(async (url, mth, headers, data) => { - const requestOptions = { - method: mth || "GET", - headers: headers || { - "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", - "Content-Type": "application/json" - } - }; - if (mth !== "GET" && data !== "" && data !== undefined) { - requestOptions.body = JSON.stringify(data); + if (config.isJSON || config.isReq) return await this.page.evaluate(async (url, mth, headers, data) => { + const requestOptions = { + method: mth || "GET", + headers: headers || { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36", + "Content-Type": "application/json" } - const response = await fetch(url, requestOptions); - if (!response.ok) { - throw new Error(`HTTP error! status: ${response.status}`); - } - return await response.text(); - }, config.url, config.method, config.headers, config.data); - } else { + }; + if (mth !== "GET" && data !== "" && data !== void 0) requestOptions.body = JSON.stringify(data); + const response = await fetch(url, requestOptions); + if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`); + return await response.text(); + }, config.url, config.method, config.headers, config.data); + else { await this.page.goto(config.url, config.options); content = await this.page.content(); return content; @@ -405723,8 +386392,7 @@ var init_headless_util = __esmMin((() => { }); this.page = await this.browser.newPage(); await this.page.goto(config.url, config.options || {}); - const cookies = await this.page.cookies(); - return cookies || []; + return await this.page.cookies() || []; } /** * 在指定元素中输入文本 @@ -405861,9 +386529,7 @@ var init_headless_util = __esmMin((() => { const { timeout = 3e4, onFound } = options; try { const elementHandle = await this.page.waitForSelector(selector, { timeout }); - if (onFound) { - await onFound(elementHandle); - } + if (onFound) await onFound(elementHandle); return elementHandle; } catch (error) { throw new Error(`Element with selector "${selector}" not found within ${timeout / 1e3} seconds.`); @@ -405879,17 +386545,12 @@ var init_headless_util = __esmMin((() => { * await helper.close(); */ async close() { - if (this.page) { - await this.page.close(); - } - if (this.browser) { - await this.browser.close(); - } + if (this.page) await this.page.close(); + if (this.browser) await this.browser.close(); } }; puppeteerHelper = PuppeteerHelper; })); - //#endregion //#region ../libs_drpy/crypto-js-wasm.js var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -405932,9 +386593,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => word = 0; } } - for (let i = latin1StrLength - latin1StrLength % 4; i < latin1StrLength; i++) { - words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8; - } + for (let i = latin1StrLength - latin1StrLength % 4; i < latin1StrLength; i++) words[i >>> 2] |= (latin1Str.charCodeAt(i) & 255) << 24 - i % 4 * 8; return new WordArray(words, latin1StrLength); } }; @@ -405970,9 +386629,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => parse(hexStr) { const hexStrLength = hexStr.length; const words = []; - for (let i = 0; i < hexStrLength; i += 2) { - words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4; - } + for (let i = 0; i < hexStrLength; i += 2) words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4; return new WordArray(words, hexStrLength / 2); } }; @@ -405994,56 +386651,32 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => */ const parameterCheck = (parameter, parameterDesc, validTypes, ...validValues) => { let isValid = true; - if (validTypes !== undefined) { - if (typeof validTypes === "string" && typeof parameter !== validTypes) { - isValid = false; - } - if (validTypes.indexOf(typeof parameter) < 0) { - isValid = false; - } + if (validTypes !== void 0) { + if (typeof validTypes === "string" && typeof parameter !== validTypes) isValid = false; + if (validTypes.indexOf(typeof parameter) < 0) isValid = false; } - if (validValues !== undefined && validValues.length > 0) { - if (validValues.indexOf(parameter) < 0) { - isValid = false; - } - } - if (!isValid) { - throw TypeError(`The input value ${parameter} of ${parameterDesc} is invalid! The type should be ${validTypes}, and the values should be ${validValues}.`); + if (validValues !== void 0 && validValues.length > 0) { + if (validValues.indexOf(parameter) < 0) isValid = false; } + if (!isValid) throw TypeError(`The input value ${parameter} of ${parameterDesc} is invalid! The type should be ${validTypes}, and the values should be ${validValues}.`); }; let 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) {} const cryptoSecureRandomInt = () => { 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."); }; @@ -406114,18 +386747,12 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => constructor(words = [], sigBytes = words.length * 4) { super(); let typedArray = words; - if (typedArray instanceof ArrayBuffer) { - typedArray = new Uint8Array(typedArray); - } - if (typedArray instanceof Int8Array || 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 || 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) { const typedArrayByteLength = typedArray.byteLength; const _words = []; - for (let i = 0; i < typedArrayByteLength; i++) { - _words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8; - } + for (let i = 0; i < typedArrayByteLength; i++) _words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8; this.words = _words; this.sigBytes = typedArrayByteLength; } else { @@ -406158,9 +386785,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => */ static random(nBytes) { const 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(words, nBytes); } /** @@ -406196,16 +386821,11 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const thisSigBytes = this.sigBytes; const thatSigBytes = wordArray.sigBytes; this.clamp(); - if (thisSigBytes % 4) { - for (let i = 0; i < thatSigBytes; i++) { - const thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255; - thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8; - } - } else { - for (let i = 0; i < thatSigBytes; i += 4) { - thisWords[thisSigBytes + i >>> 2] = thatWords[i >>> 2]; - } + if (thisSigBytes % 4) for (let i = 0; i < thatSigBytes; i++) { + const thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 255; + thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8; } + else for (let i = 0; i < thatSigBytes; i += 4) thisWords[thisSigBytes + i >>> 2] = thatWords[i >>> 2]; this.sigBytes += thatSigBytes; return this; } @@ -406275,9 +386895,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => */ _append(data) { let m_data = data; - if (isString(m_data)) { - m_data = Utf8.parse(m_data); - } + if (isString(m_data)) m_data = Utf8.parse(m_data); this._data.concat(m_data); this._nDataBytes += m_data.sigBytes; } @@ -406300,19 +386918,13 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const { _data: data, blockSize } = this; const dataWords = data.words; const dataSigBytes = data.sigBytes; - const blockSizeBytes = blockSize * 4; - let nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - nBlocksReady = Math.ceil(nBlocksReady); - } else { - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } + let nBlocksReady = dataSigBytes / (blockSize * 4); + if (doFlush) nBlocksReady = Math.ceil(nBlocksReady); + else nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); const nWordsReady = nBlocksReady * blockSize; const nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); if (nWordsReady) { - for (let offset = 0; offset < nWordsReady; offset += blockSize) { - this._doProcessBlock(dataWords, offset); - } + for (let offset = 0; offset < nWordsReady; offset += blockSize) this._doProcessBlock(dataWords, offset); processedWords = dataWords.splice(0, nWordsReady); data.sigBytes -= nBytesReady; } @@ -406352,14 +386964,10 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const hasher = new SubHasher(); this._hasher = hasher; let _key = key; - if (isString(_key)) { - _key = Utf8.parse(_key); - } + if (isString(_key)) _key = Utf8.parse(_key); const hasherBlockSize = hasher.blockSize; const hasherBlockSizeBytes = hasherBlockSize * 4; - if (_key.sigBytes > hasherBlockSizeBytes) { - _key = hasher.finalize(key); - } + if (_key.sigBytes > hasherBlockSizeBytes) _key = hasher.finalize(key); _key.clamp(); const oKey = _key.clone(); this._oKey = oKey; @@ -406421,8 +387029,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const hasher = this._hasher; const innerHash = hasher.finalize(messageUpdate); hasher.reset(); - const hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); - return hmac; + return hasher.finalize(this._oKey.clone().concat(innerHash)); } } /** @@ -406458,9 +387065,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => static _createHelper(SubHasher) { let result = (message, cfg) => new SubHasher(cfg).finalize(message); result.loadWasm = async () => { - if (!SubHasher.wasm) { - await SubHasher.loadWasm(); - } + if (!SubHasher.wasm) await SubHasher.loadWasm(); }; result.outputSize = SubHasher.outputSize; return result; @@ -406481,9 +387086,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => static _createHmacHelper(SubHasher) { let result = (message, key) => new HMAC(SubHasher, key).finalize(message); result.loadWasm = async () => { - if (!SubHasher.wasm) { - await SubHasher.loadWasm(); - } + if (!SubHasher.wasm) await SubHasher.loadWasm(); }; return result; } @@ -406530,11 +387133,8 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => * let hash = hasher.finalize(wordArray); */ finalize(messageUpdate) { - if (messageUpdate) { - this._append(messageUpdate); - } - const hash = this._doFinalize(); - return hash; + if (messageUpdate) this._append(messageUpdate); + return this._doFinalize(); } } const X32WordArray = WordArray; @@ -406624,36 +387224,27 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => clone.words = this.words.slice(0); const { words } = clone; const wordsLength = words.length; - for (let i = 0; i < wordsLength; i++) { - words[i] = words[i].clone(); - } + for (let i = 0; i < wordsLength; i++) words[i] = words[i].clone(); return clone; } } 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; } const parseLoop = (base64Str, base64StrLength, reverseMap) => { const words = []; let nBytes = 0; - for (let i = 0; i < base64StrLength; i++) { - if (i % 4) { - const bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2; - const bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2; - const bitsCombined = bits1 | bits2; - words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8; - nBytes++; - } + for (let i = 0; i < base64StrLength; i++) if (i % 4) { + const 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 new WordArray(words, nBytes); }; @@ -406705,16 +387296,12 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => if (!reverseMap) { this._reverseMap = []; reverseMap = this._reverseMap; - for (let j = 0; j < map.length; j++) { - reverseMap[map.charCodeAt(j)] = j; - } + for (let j = 0; j < map.length; j++) reverseMap[map.charCodeAt(j)] = j; } const paddingChar = map.charAt(64); if (paddingChar) { const paddingIndex = base64Str.indexOf(paddingChar); - if (paddingIndex !== -1) { - base64StrLength = paddingIndex; - } + if (paddingIndex !== -1) base64StrLength = paddingIndex; } return parseLoop(base64Str, base64StrLength, reverseMap); }, @@ -406731,11 +387318,8 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => return c.charCodeAt(0); } let compressedBytes; - if (typeof atob === "function") { - compressedBytes = new Uint8Array(atob(compressedBase64Bytes).split("").map(charCodeAt)); - } else { - compressedBytes = __require("buffer").Buffer.from(compressedBase64Bytes, "base64"); - } + if (typeof atob === "function") compressedBytes = new Uint8Array(atob(compressedBase64Bytes).split("").map(charCodeAt)); + else compressedBytes = __require("buffer").Buffer.from(compressedBase64Bytes, "base64"); return pako__default["default"].inflate(compressedBytes); }; /** @@ -406747,20 +387331,15 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => * @return {Promise} the generated WebAssembly target */ const loadWasm = async function(wasmBytes, imports) { - if (typeof WebAssembly !== "object" || typeof WebAssembly.instantiate !== "function") { - throw new Error("WebAssembly is not supported."); - } - const loadResult = await WebAssembly.instantiate(wasmBytes, imports); - return loadResult.instance.exports; + if (typeof WebAssembly !== "object" || typeof WebAssembly.instantiate !== "function") throw new Error("WebAssembly is not supported."); + return (await WebAssembly.instantiate(wasmBytes, imports)).instance.exports; }; /** * An async function to load all existing WebAssembly modules. Please note that this only need to be called once. */ const loadAllWasm = async function() { await Promise.allSettled(Object.values(index.algo).map((algo) => { - if (!algo.loadWasm) { - return; - } + if (!algo.loadWasm) return; return algo.loadWasm(); })); }; @@ -406768,9 +387347,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => function md5Wasm(wasm) { let cachegetUint32Memory0 = null; function getUint32Memory0() { - if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) { - cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); - } + if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); return cachegetUint32Memory0; } let WASM_VECTOR_LEN = 0; @@ -406795,8 +387372,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => var len0 = WASM_VECTOR_LEN; var ptr1 = passArray32ToWasm0(dataWords, wasm.__wbindgen_malloc); var len1 = WASM_VECTOR_LEN; - var ret = wasm.md5Process(doFlush, ptr0, len0, ptr1, len1, dataSigBytes, blockSize, minBufferSize); - return ret >>> 0; + return wasm.md5Process(doFlush, ptr0, len0, ptr1, len1, dataSigBytes, blockSize, minBufferSize) >>> 0; } finally { hashWords.set(getUint32Memory0().subarray(ptr0 / 4, ptr0 / 4 + len0)); wasm.__wbindgen_free(ptr0, len0 * 4); @@ -406809,9 +387385,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => */ class MD5Algo extends Hasher { static async loadWasm() { - if (MD5Algo.wasm) { - return MD5Algo.wasm; - } + if (MD5Algo.wasm) return MD5Algo.wasm; MD5Algo.wasm = await loadWasm(wasmBytes$b); return MD5Algo.wasm; } @@ -406827,9 +387401,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => ]); } _process(doFlush) { - if (!MD5Algo.wasm) { - throw new Error("WASM is not loaded yet. 'MD5Algo.loadWasm' should be called first"); - } + if (!MD5Algo.wasm) throw new Error("WASM is not loaded yet. 'MD5Algo.loadWasm' should be called first"); const data = this._data; const dataWords = data.words; const dataSigBytes = data.sigBytes; @@ -406968,9 +387540,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const derivedKeyWords = derivedKey.words; const { keySize, iterations } = cfg; while (derivedKeyWords.length < keySize) { - if (block) { - hasher.update(block); - } + if (block) hasher.update(block); block = hasher.update(password).finalize(salt); hasher.reset(); for (let i = 1; i < iterations; i++) { @@ -407013,9 +387583,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; const paddingWord = nPaddingBytes << 24 | nPaddingBytes << 16 | nPaddingBytes << 8 | nPaddingBytes; const paddingWords = []; - for (let i = 0; i < nPaddingBytes; i += 4) { - paddingWords.push(paddingWord); - } + for (let i = 0; i < nPaddingBytes; i += 4) paddingWords.push(paddingWord); const padding = new WordArray(paddingWords, nPaddingBytes); data.concat(padding); }, @@ -407124,19 +387692,13 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => */ static _createHelper(SubCipher) { const selectCipherStrategy = (key) => { - if (isString(key)) { - return PasswordBasedCipher; - } + if (isString(key)) return PasswordBasedCipher; return SerializableCipher; }; return { async loadWasm() { - if (!SubCipher.wasm) { - await SubCipher.loadWasm(); - } - if (!MD5Algo.wasm) { - await MD5Algo.loadWasm(); - } + if (!SubCipher.wasm) await SubCipher.loadWasm(); + if (!MD5Algo.wasm) await MD5Algo.loadWasm(); }, encrypt(message, key, cfg) { return selectCipherStrategy(key).encrypt(SubCipher, message, key, cfg); @@ -407188,11 +387750,8 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => * const encrypted = cipher.finalize(wordArray); */ finalize(dataUpdate) { - if (dataUpdate) { - this._append(dataUpdate); - } - const finalProcessedData = this._doFinalize(); - return finalProcessedData; + if (dataUpdate) this._append(dataUpdate); + return this._doFinalize(); } } /** @@ -407208,8 +387767,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => this.blockSize = 1; } _doFinalize() { - const finalProcessedBlocks = this._process(!!"flush"); - return finalProcessedBlocks; + return this._process(true); } } /** @@ -407268,13 +387826,9 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const iv = this._iv; if (iv) { block = iv; - this._iv = undefined; - } else { - block = this._prevBlock; - } - for (let i = 0; i < blockSize; i++) { - _words[offset + i] ^= block[i]; - } + this._iv = void 0; + } else block = this._prevBlock; + for (let i = 0; i < blockSize; i++) _words[offset + i] ^= block[i]; } /** * Cipher Block Chaining mode. @@ -407355,13 +387909,12 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => super.reset.call(this); const { cfg } = this; const { iv, mode } = cfg; - if (this._xformMode === this.constructor._ENC_XFORM_MODE) { - modeCreator = mode.createEncryptor; - } else { + if (this._xformMode === this.constructor._ENC_XFORM_MODE) modeCreator = mode.createEncryptor; + else { modeCreator = mode.createDecryptor; this._minBufferSize = 1; } - this.modeProcessBlock = undefined; + this.modeProcessBlock = void 0; this._mode = modeCreator.call(mode, this, iv && iv.words); this._mode.__creator = modeCreator; } @@ -407373,9 +387926,9 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const { padding } = this.cfg; if (this._xformMode === this.constructor._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; @@ -407445,11 +387998,8 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => stringify(cipherParams) { let wordArray; const { ciphertext, salt } = cipherParams; - if (salt) { - wordArray = new WordArray([1398893684, 1701076831]).concat(salt).concat(ciphertext); - } else { - wordArray = ciphertext; - } + if (salt) wordArray = new WordArray([1398893684, 1701076831]).concat(salt).concat(ciphertext); + else wordArray = ciphertext; return wordArray.toString(Base64); }, parse(openSSLStr) { @@ -407534,8 +388084,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => let _ciphertext = ciphertext; const _cfg = Object.assign(new Base(), this.cfg, cfg); _ciphertext = this._parse(_ciphertext, _cfg.format); - const plaintext = cipher.createDecryptor(key, _cfg).finalize(_ciphertext.ciphertext); - return plaintext; + return cipher.createDecryptor(key, _cfg).finalize(_ciphertext.ciphertext); } /** * Converts serialized ciphertext to CipherParams, @@ -407554,9 +388103,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => * ._parse(ciphertextStringOrParams, format); */ static _parse(ciphertext, format) { - if (isString(ciphertext)) { - return format.parse(ciphertext, this); - } + if (isString(ciphertext)) return format.parse(ciphertext, this); return ciphertext; } } @@ -407578,18 +388125,13 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => }, execute(password, keySize, ivSize, salt, hasher) { let _salt = salt; - if (!_salt) { - _salt = WordArray.random(64 / 8); - } + if (!_salt) _salt = WordArray.random(64 / 8); let key; - if (!hasher) { - key = new EvpKDFAlgo({ keySize: keySize + ivSize }).compute(password, _salt); - } else { - key = new EvpKDFAlgo({ - keySize: keySize + ivSize, - hasher - }).compute(password, salt); - } + if (!hasher) key = new EvpKDFAlgo({ keySize: keySize + ivSize }).compute(password, _salt); + else key = new EvpKDFAlgo({ + keySize: keySize + ivSize, + hasher + }).compute(password, salt); const iv = new WordArray(key.words.slice(keySize), ivSize * 4); key.sigBytes = keySize * 4; return new CipherParams({ @@ -407664,8 +388206,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => _ciphertext = this._parse(_ciphertext, _cfg.format); const derivedParams = _cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, _ciphertext.salt, _cfg.hasher); _cfg.iv = derivedParams.iv; - const plaintext = SerializableCipher.decrypt.call(this, cipher, _ciphertext, derivedParams.key, _cfg); - return plaintext; + return SerializableCipher.decrypt.call(this, cipher, _ciphertext, derivedParams.key, _cfg); } } /** @@ -407693,9 +388234,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => parse(utf16Str) { const utf16StrLength = utf16Str.length; const words = []; - for (let i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16; - } + for (let i = 0; i < utf16StrLength; i++) words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16; return new WordArray(words, utf16StrLength * 2); } }; @@ -407716,9 +388255,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => parse(utf16Str) { const utf16StrLength = utf16Str.length; const words = []; - for (let i = 0; i < utf16StrLength; i++) { - words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16); - } + for (let i = 0; i < utf16StrLength; i++) words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16); return new WordArray(words, utf16StrLength * 2); } }; @@ -407726,9 +388263,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => function sha1Wasm(wasm) { let cachegetUint32Memory0 = null; function getUint32Memory0() { - if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) { - cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); - } + if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); return cachegetUint32Memory0; } let WASM_VECTOR_LEN = 0; @@ -407753,8 +388288,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => var len0 = WASM_VECTOR_LEN; var ptr1 = passArray32ToWasm0(dataWords, wasm.__wbindgen_malloc); var len1 = WASM_VECTOR_LEN; - var ret = wasm.doCrypt(doFlush, ptr0, len0, ptr1, len1, dataSigBytes, blockSize, minBufferSize); - return ret >>> 0; + return wasm.doCrypt(doFlush, ptr0, len0, ptr1, len1, dataSigBytes, blockSize, minBufferSize) >>> 0; } finally { hashWords.set(getUint32Memory0().subarray(ptr0 / 4, ptr0 / 4 + len0)); wasm.__wbindgen_free(ptr0, len0 * 4); @@ -407767,9 +388301,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => */ class SHA1Algo extends Hasher { static async loadWasm() { - if (SHA1Algo.wasm) { - return SHA1Algo.wasm; - } + if (SHA1Algo.wasm) return SHA1Algo.wasm; SHA1Algo.wasm = await loadWasm(wasmBytes$a); return SHA1Algo.wasm; } @@ -407786,9 +388318,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => ]); } _process(doFlush) { - if (!SHA1Algo.wasm) { - throw new Error("WASM is not loaded yet. 'SHA1Algo.loadWasm' should be called first"); - } + if (!SHA1Algo.wasm) throw new Error("WASM is not loaded yet. 'SHA1Algo.loadWasm' should be called first"); const data = this._data; const dataWords = data.words; const dataSigBytes = data.sigBytes; @@ -407868,9 +388398,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => function sha256Wasm(wasm) { let cachegetUint32Memory0 = null; function getUint32Memory0() { - if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) { - cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); - } + if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); return cachegetUint32Memory0; } let WASM_VECTOR_LEN = 0; @@ -407895,8 +388423,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => var len0 = WASM_VECTOR_LEN; var ptr1 = passArray32ToWasm0(hash, wasm.__wbindgen_malloc); var len1 = WASM_VECTOR_LEN; - var ret = wasm.doCrypt(doFlush, ptr0, len0, dataSigBytes, blockSize, ptr1, len1, minBufferSize); - return ret >>> 0; + return wasm.doCrypt(doFlush, ptr0, len0, dataSigBytes, blockSize, ptr1, len1, minBufferSize) >>> 0; } finally { hash.set(getUint32Memory0().subarray(ptr1 / 4, ptr1 / 4 + len1)); wasm.__wbindgen_free(ptr1, len1 * 4); @@ -407919,9 +388446,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => */ class SHA256Algo extends Hasher { static async loadWasm() { - if (SHA256Algo.wasm) { - return SHA256Algo.wasm; - } + if (SHA256Algo.wasm) return SHA256Algo.wasm; SHA256Algo.wasm = await loadWasm(wasmBytes$9); return SHA256Algo.wasm; } @@ -407932,23 +388457,17 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => this._hash = new WordArray(H.slice(0)); } _process(doFlush) { - if (!SHA256Algo.wasm) { - throw new Error("WASM is not loaded yet. 'SHA256Algo.loadWasm' should be called first"); - } + if (!SHA256Algo.wasm) throw new Error("WASM is not loaded yet. 'SHA256Algo.loadWasm' should be called first"); const data = this._data; const dataWords = data.words; const dataSigBytes = data.sigBytes; const blockSize = this.blockSize; const H = this._hash.words; const H_array = new Uint32Array(8); - for (let i = 0; i < 8; i++) { - H_array[i] = H[i]; - } + for (let i = 0; i < 8; i++) H_array[i] = H[i]; const nWordsReady = sha256Wasm(SHA256Algo.wasm).doCrypt(doFlush ? 1 : 0, dataWords, dataSigBytes, blockSize, H_array, this._minBufferSize); const nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); - for (let i = 0; i < 8; i++) { - H[i] = H_array[i]; - } + for (let i = 0; i < 8; i++) H[i] = H_array[i]; let processedWords; if (nWordsReady) { processedWords = dataWords.splice(0, nWordsReady); @@ -408069,9 +388588,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => function sha512Wasm(wasm) { let cachegetUint32Memory0 = null; function getUint32Memory0() { - if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) { - cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); - } + if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); return cachegetUint32Memory0; } let WASM_VECTOR_LEN = 0; @@ -408106,9 +388623,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => */ class SHA512Algo extends Hasher { static async loadWasm() { - if (SHA512Algo.wasm) { - return SHA512Algo.wasm; - } + if (SHA512Algo.wasm) return SHA512Algo.wasm; SHA512Algo.wasm = await loadWasm(wasmBytes$8); return SHA512Algo.wasm; } @@ -408132,21 +388647,15 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => ]); } _process(doFlush) { - if (!SHA512Algo.wasm) { - throw new Error("WASM is not loaded yet. 'SHA512Algo.loadWasm' should be called first"); - } + if (!SHA512Algo.wasm) throw new Error("WASM is not loaded yet. 'SHA512Algo.loadWasm' should be called first"); let processedWords; const data = this._data; const dataWords = data.words; const dataSigBytes = data.sigBytes; const blockSize = this.blockSize; - const blockSizeBytes = blockSize * 4; - let nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - nBlocksReady = Math.ceil(nBlocksReady); - } else { - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } + let nBlocksReady = dataSigBytes / (blockSize * 4); + if (doFlush) nBlocksReady = Math.ceil(nBlocksReady); + else nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); const nWordsReady = nBlocksReady * blockSize; const nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); if (nWordsReady) { @@ -408176,8 +388685,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => dataWords[(nBitsLeft + 128 >>> 10 << 5) + 31] = nBitsTotal; data.sigBytes = dataWords.length * 4; this._process(); - const hash = this._hash.toX32(); - return hash; + return this._hash.toX32(); } clone() { const clone = super.clone.call(this); @@ -408280,9 +388788,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => function sha3Wasm(wasm) { let cachegetUint32Memory0 = null; function getUint32Memory0() { - if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) { - cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); - } + if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); return cachegetUint32Memory0; } let WASM_VECTOR_LEN = 0; @@ -408307,8 +388813,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => var len0 = WASM_VECTOR_LEN; var ptr1 = passArray32ToWasm0(stateData, wasm.__wbindgen_malloc); var len1 = WASM_VECTOR_LEN; - var ret = wasm.doCrypt(doFlush, ptr0, len0, dataSigBytes, blockSize, ptr1, len1, minBufferSize); - return ret >>> 0; + return wasm.doCrypt(doFlush, ptr0, len0, dataSigBytes, blockSize, ptr1, len1, minBufferSize) >>> 0; } finally { stateData.set(getUint32Memory0().subarray(ptr1 / 4, ptr1 / 4 + len1)); wasm.__wbindgen_free(ptr1, len1 * 4); @@ -408321,9 +388826,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => */ class SHA3Algo extends Hasher { static async loadWasm() { - if (SHA3Algo.wasm) { - return SHA3Algo.wasm; - } + if (SHA3Algo.wasm) return SHA3Algo.wasm; SHA3Algo.wasm = await loadWasm(wasmBytes$7); return SHA3Algo.wasm; } @@ -408344,15 +388847,11 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => _doReset() { this._state = []; const state = this._state; - for (let i = 0; i < 25; i++) { - state[i] = new X64Word(); - } + for (let i = 0; i < 25; i++) state[i] = new X64Word(); this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; } _process(doFlush) { - if (!SHA3Algo.wasm) { - throw new Error("WASM is not loaded yet. 'SHA3Algo.loadWasm' should be called first"); - } + if (!SHA3Algo.wasm) throw new Error("WASM is not loaded yet. 'SHA3Algo.loadWasm' should be called first"); const data = this._data; const dataWords = data.words; const dataSigBytes = data.sigBytes; @@ -408362,11 +388861,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => stateData[i * 2] = this._state[i].high; stateData[i * 2 + 1] = this._state[i].low; } - for (let i = 0; i < dataWords.length; i++) { - if (!dataWords[i]) { - dataWords[i] = 0; - } - } + for (let i = 0; i < dataWords.length; i++) if (!dataWords[i]) dataWords[i] = 0; const nWordsReady = sha3Wasm(SHA3Algo.wasm).doCrypt(doFlush ? 1 : 0, dataWords, dataSigBytes, blockSize, stateData, this._minBufferSize); const nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); for (let i = 0; i < 25; i++) { @@ -408408,9 +388903,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const clone = super.clone.call(this); clone._state = this._state.slice(0); const state = clone._state; - for (let i = 0; i < 25; i++) { - state[i] = state[i].clone(); - } + for (let i = 0; i < 25; i++) state[i] = state[i].clone(); return clone; } } @@ -408448,9 +388941,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => function ripemd160Wasm(wasm) { let cachegetUint32Memory0 = null; function getUint32Memory0() { - if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) { - cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); - } + if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); return cachegetUint32Memory0; } let WASM_VECTOR_LEN = 0; @@ -408486,9 +388977,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => */ class RIPEMD160Algo extends Hasher { static async loadWasm() { - if (RIPEMD160Algo.wasm) { - return RIPEMD160Algo.wasm; - } + if (RIPEMD160Algo.wasm) return RIPEMD160Algo.wasm; RIPEMD160Algo.wasm = await loadWasm(wasmBytes$6); return RIPEMD160Algo.wasm; } @@ -408505,9 +388994,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => ]); } _process(doFlush) { - if (!RIPEMD160Algo.wasm) { - throw new Error("WASM is not loaded yet. 'RIPEMD160Algo.loadWasm' should be called first"); - } + if (!RIPEMD160Algo.wasm) throw new Error("WASM is not loaded yet. 'RIPEMD160Algo.loadWasm' should be called first"); let processedWords; const data = this._data; let dataWords = data.words; @@ -408516,19 +389003,12 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const blockSizeBytes = blockSize * 4; let H = this._hash.words; let nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - nBlocksReady = Math.ceil(nBlocksReady); - } else { - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } + if (doFlush) nBlocksReady = Math.ceil(nBlocksReady); + else nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); const nWordsReady = nBlocksReady * blockSize; const nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); if (nWordsReady) { - if (dataWords.length < nWordsReady) { - for (let i = dataWords.length; i < nWordsReady; i++) { - dataWords[i] = 0; - } - } + if (dataWords.length < nWordsReady) for (let i = dataWords.length; i < nWordsReady; i++) dataWords[i] = 0; const H_Array = new Uint32Array(H); ripemd160Wasm(RIPEMD160Algo.wasm).doProcess(nWordsReady, blockSize, dataWords, H_Array); this._hash.words = Array.from(H_Array); @@ -408665,9 +389145,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => intermediate = hmac.finalize(intermediate); hmac.reset(); const intermediateWords = intermediate.words; - for (let j = 0; j < blockWordsLength; j++) { - blockWords[j] ^= intermediateWords[j]; - } + for (let j = 0; j < blockWordsLength; j++) blockWords[j] ^= intermediateWords[j]; } derivedKey.concat(block); blockIndexWords[0]++; @@ -408697,9 +389175,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => function aesWasm(wasm) { let cachegetUint32Memory0 = null; function getUint32Memory0() { - if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) { - cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); - } + if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); return cachegetUint32Memory0; } let WASM_VECTOR_LEN = 0; @@ -408711,9 +389187,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => } let cachegetInt32Memory0 = null; function getInt32Memory0() { - if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) { - cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer); - } + if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer); return cachegetInt32Memory0; } function getArrayU32FromWasm0(ptr, len) { @@ -408761,13 +389235,10 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => } let cachegetUint8Memory0 = null; function getUint8Memory0() { - if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) { - cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer); - } + if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer); return cachegetUint8Memory0; } - const lTextEncoder = typeof TextEncoder === "undefined" ? (0, module.require)("util").TextEncoder : TextEncoder; - let cachedTextEncoder = new lTextEncoder("utf-8"); + let cachedTextEncoder = new (typeof TextEncoder === "undefined" ? (0, module.require)("util").TextEncoder : TextEncoder)("utf-8"); const encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) { return cachedTextEncoder.encodeInto(arg, view); } : function(arg, view) { @@ -408779,7 +389250,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => }; }; function passStringToWasm0(arg, malloc, realloc) { - if (realloc === undefined) { + if (realloc === void 0) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length); getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf); @@ -408796,9 +389267,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => mem[ptr + offset] = code; } if (offset !== len) { - if (offset !== 0) { - arg = arg.slice(offset); - } + if (offset !== 0) arg = arg.slice(offset); ptr = realloc(ptr, len, len = offset + arg.length * 3); const view = getUint8Memory0().subarray(ptr + offset, ptr + len); const ret = encodeString(arg, view); @@ -408896,9 +389365,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => this.keySize = 256 / 32; } static async loadWasm() { - if (AESAlgo.wasm) { - return AESAlgo.wasm; - } + if (AESAlgo.wasm) return AESAlgo.wasm; AESAlgo.wasm = await loadWasm(wasmBytes$5); return AESAlgo.wasm; } @@ -408906,9 +389373,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => return AESAlgo.loadWasm(); } _doReset() { - if (this._nRounds && this._keyPriorReset === this._key) { - return; - } + if (this._nRounds && this._keyPriorReset === this._key) return; const key = this._key; const keyWords = key.words; const keySize = key.sigBytes / 4; @@ -408917,44 +389382,25 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => this._invKeySchedule = aesWasm(AESAlgo.wasm).getInvKeySchedule(keySize, keyWords); } _process(doFlush) { - if (!AESAlgo.wasm) { - throw new Error("WASM is not loaded yet. 'AESAlgo.loadWasm' should be called first"); - } + if (!AESAlgo.wasm) throw new Error("WASM is not loaded yet. 'AESAlgo.loadWasm' should be called first"); let processedWords; const data = this._data; let dataWords = data.words; const dataSigBytes = data.sigBytes; const blockSize = this.blockSize; - const blockSizeBytes = blockSize * 4; - let nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - nBlocksReady = Math.ceil(nBlocksReady); - } else { - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } + let nBlocksReady = dataSigBytes / (blockSize * 4); + if (doFlush) nBlocksReady = Math.ceil(nBlocksReady); + else nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); const nWordsReady = nBlocksReady * blockSize; const nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); if (nWordsReady) { - if (dataWords.length < nWordsReady) { - for (let i = dataWords.length; i < nWordsReady; i++) { - dataWords[i] = 0; - } - } + if (dataWords.length < nWordsReady) for (let i = dataWords.length; i < nWordsReady; i++) dataWords[i] = 0; const dataArray = new Uint32Array(dataWords); const ivWords = this.cfg.iv ? this.cfg.iv.words : ""; - if (this._xformMode == this._ENC_XFORM_MODE) { - if (this.modeProcessBlock != undefined) { - this.modeProcessBlock = aesWasm(AESAlgo.wasm).doEncrypt(this.cfg.mode._name, this._nRounds, nWordsReady, blockSize, this.modeProcessBlock, dataArray, this._keySchedule); - } else { - this.modeProcessBlock = aesWasm(AESAlgo.wasm).doEncrypt(this.cfg.mode._name, this._nRounds, nWordsReady, blockSize, ivWords, dataArray, this._keySchedule); - } - } else { - if (this.modeProcessBlock != undefined) { - this.modeProcessBlock = aesWasm(AESAlgo.wasm).doDecrypt(this.cfg.mode._name, this._nRounds, nWordsReady, blockSize, this.modeProcessBlock, dataArray, this._keySchedule, this._invKeySchedule); - } else { - this.modeProcessBlock = aesWasm(AESAlgo.wasm).doDecrypt(this.cfg.mode._name, this._nRounds, nWordsReady, blockSize, ivWords, dataArray, this._keySchedule, this._invKeySchedule); - } - } + if (this._xformMode == this._ENC_XFORM_MODE) if (this.modeProcessBlock != void 0) this.modeProcessBlock = aesWasm(AESAlgo.wasm).doEncrypt(this.cfg.mode._name, this._nRounds, nWordsReady, blockSize, this.modeProcessBlock, dataArray, this._keySchedule); + else this.modeProcessBlock = aesWasm(AESAlgo.wasm).doEncrypt(this.cfg.mode._name, this._nRounds, nWordsReady, blockSize, ivWords, dataArray, this._keySchedule); + else if (this.modeProcessBlock != void 0) this.modeProcessBlock = aesWasm(AESAlgo.wasm).doDecrypt(this.cfg.mode._name, this._nRounds, nWordsReady, blockSize, this.modeProcessBlock, dataArray, this._keySchedule, this._invKeySchedule); + else this.modeProcessBlock = aesWasm(AESAlgo.wasm).doDecrypt(this.cfg.mode._name, this._nRounds, nWordsReady, blockSize, ivWords, dataArray, this._keySchedule, this._invKeySchedule); dataWords = Array.from(dataArray); processedWords = dataWords.splice(0, nWordsReady); data.words = dataWords; @@ -408976,9 +389422,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => function blowfishWasm(wasm) { let cachegetUint32Memory0 = null; function getUint32Memory0() { - if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) { - cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); - } + if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); return cachegetUint32Memory0; } let WASM_VECTOR_LEN = 0; @@ -408990,9 +389434,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => } let cachegetInt32Memory0 = null; function getInt32Memory0() { - if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) { - cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer); - } + if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer); return cachegetInt32Memory0; } function getArrayU32FromWasm0(ptr, len) { @@ -409020,13 +389462,10 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => } let cachegetUint8Memory0 = null; function getUint8Memory0() { - if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) { - cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer); - } + if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer); return cachegetUint8Memory0; } - const lTextEncoder = typeof TextEncoder === "undefined" ? (0, module.require)("util").TextEncoder : TextEncoder; - let cachedTextEncoder = new lTextEncoder("utf-8"); + let cachedTextEncoder = new (typeof TextEncoder === "undefined" ? (0, module.require)("util").TextEncoder : TextEncoder)("utf-8"); const encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) { return cachedTextEncoder.encodeInto(arg, view); } : function(arg, view) { @@ -409038,7 +389477,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => }; }; function passStringToWasm0(arg, malloc, realloc) { - if (realloc === undefined) { + if (realloc === void 0) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length); getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf); @@ -409055,9 +389494,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => mem[ptr + offset] = code; } if (offset !== len) { - if (offset !== 0) { - arg = arg.slice(offset); - } + if (offset !== 0) arg = arg.slice(offset); ptr = realloc(ptr, len, len = offset + arg.length * 3); const view = getUint8Memory0().subarray(ptr + offset, ptr + len); const ret = encodeString(arg, view); @@ -409163,9 +389600,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => this.blockSize = 64 / 32; } static async loadWasm() { - if (BlowfishAlgo.wasm) { - return BlowfishAlgo.wasm; - } + if (BlowfishAlgo.wasm) return BlowfishAlgo.wasm; BlowfishAlgo.wasm = await loadWasm(wasmBytes$4); return BlowfishAlgo.wasm; } @@ -409173,62 +389608,37 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => return BlowfishAlgo.loadWasm(); } _doReset() { - if (this._keyPriorReset === this._key) { - return; - } + if (this._keyPriorReset === this._key) return; const key = this._keyPriorReset = this._key; const keyWords = key.words; const keySize = key.sigBytes / 4; const ctx = Array.from(blowfishWasm(BlowfishAlgo.wasm).blowfishInit(keyWords, keySize)); this.pbox = ctx.splice(0, 18); this.sbox = []; - for (let i = 0; i < 4; i++) { - this.sbox[i] = ctx.splice(0, 256); - } + for (let i = 0; i < 4; i++) this.sbox[i] = ctx.splice(0, 256); } _process(doFlush) { - if (!BlowfishAlgo.wasm) { - throw new Error("WASM is not loaded yet. 'BlowfishAlgo.loadWasm' should be called first"); - } + if (!BlowfishAlgo.wasm) throw new Error("WASM is not loaded yet. 'BlowfishAlgo.loadWasm' should be called first"); let processedWords; const data = this._data; let dataWords = data.words; const dataSigBytes = data.sigBytes; const blockSize = this.blockSize; - const blockSizeBytes = blockSize * 4; - let nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - nBlocksReady = Math.ceil(nBlocksReady); - } else { - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } + let nBlocksReady = dataSigBytes / (blockSize * 4); + if (doFlush) nBlocksReady = Math.ceil(nBlocksReady); + else nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); const nWordsReady = nBlocksReady * blockSize; const nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); if (nWordsReady) { - if (dataWords.length < nWordsReady) { - for (let i = dataWords.length; i < nWordsReady; i++) { - dataWords[i] = 0; - } - } + if (dataWords.length < nWordsReady) for (let i = dataWords.length; i < nWordsReady; i++) dataWords[i] = 0; const dataArray = new Uint32Array(dataWords); const ivWords = this.cfg.iv ? this.cfg.iv.words : ""; let s = []; - for (let i = 0; i < 4; i++) { - s.push.apply(s, this.sbox[i]); - } - if (this._xformMode == this._ENC_XFORM_MODE) { - if (this.modeProcessBlock != undefined) { - this.modeProcessBlock = blowfishWasm(BlowfishAlgo.wasm).doEncrypt(this.cfg.mode._name, nWordsReady, blockSize, this.modeProcessBlock, dataArray, this.pbox, s); - } else { - this.modeProcessBlock = blowfishWasm(BlowfishAlgo.wasm).doEncrypt(this.cfg.mode._name, nWordsReady, blockSize, ivWords, dataArray, this.pbox, s); - } - } else { - if (this.modeProcessBlock != undefined) { - this.modeProcessBlock = blowfishWasm(BlowfishAlgo.wasm).doDecrypt(this.cfg.mode._name, nWordsReady, blockSize, this.modeProcessBlock, dataArray, this.pbox, s); - } else { - this.modeProcessBlock = blowfishWasm(BlowfishAlgo.wasm).doDecrypt(this.cfg.mode._name, nWordsReady, blockSize, ivWords, dataArray, this.pbox, s); - } - } + for (let i = 0; i < 4; i++) s.push.apply(s, this.sbox[i]); + if (this._xformMode == this._ENC_XFORM_MODE) if (this.modeProcessBlock != void 0) this.modeProcessBlock = blowfishWasm(BlowfishAlgo.wasm).doEncrypt(this.cfg.mode._name, nWordsReady, blockSize, this.modeProcessBlock, dataArray, this.pbox, s); + else this.modeProcessBlock = blowfishWasm(BlowfishAlgo.wasm).doEncrypt(this.cfg.mode._name, nWordsReady, blockSize, ivWords, dataArray, this.pbox, s); + else if (this.modeProcessBlock != void 0) this.modeProcessBlock = blowfishWasm(BlowfishAlgo.wasm).doDecrypt(this.cfg.mode._name, nWordsReady, blockSize, this.modeProcessBlock, dataArray, this.pbox, s); + else this.modeProcessBlock = blowfishWasm(BlowfishAlgo.wasm).doDecrypt(this.cfg.mode._name, nWordsReady, blockSize, ivWords, dataArray, this.pbox, s); dataWords = Array.from(dataArray); processedWords = dataWords.splice(0, nWordsReady); data.words = dataWords; @@ -409251,13 +389661,10 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => let WASM_VECTOR_LEN = 0; let cachegetUint8Memory0 = null; function getUint8Memory0() { - if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) { - cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer); - } + if (cachegetUint8Memory0 === null || cachegetUint8Memory0.buffer !== wasm.memory.buffer) cachegetUint8Memory0 = new Uint8Array(wasm.memory.buffer); return cachegetUint8Memory0; } - const lTextEncoder = typeof TextEncoder === "undefined" ? (0, module.require)("util").TextEncoder : TextEncoder; - let cachedTextEncoder = new lTextEncoder("utf-8"); + let cachedTextEncoder = new (typeof TextEncoder === "undefined" ? (0, module.require)("util").TextEncoder : TextEncoder)("utf-8"); const encodeString = typeof cachedTextEncoder.encodeInto === "function" ? function(arg, view) { return cachedTextEncoder.encodeInto(arg, view); } : function(arg, view) { @@ -409269,7 +389676,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => }; }; function passStringToWasm0(arg, malloc, realloc) { - if (realloc === undefined) { + if (realloc === void 0) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length); getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf); @@ -409286,9 +389693,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => mem[ptr + offset] = code; } if (offset !== len) { - if (offset !== 0) { - arg = arg.slice(offset); - } + if (offset !== 0) arg = arg.slice(offset); ptr = realloc(ptr, len, len = offset + arg.length * 3); const view = getUint8Memory0().subarray(ptr + offset, ptr + len); const ret = encodeString(arg, view); @@ -409299,9 +389704,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => } let cachegetUint32Memory0 = null; function getUint32Memory0() { - if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) { - cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); - } + if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); return cachegetUint32Memory0; } function passArray32ToWasm0(arg, malloc) { @@ -409312,9 +389715,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => } let cachegetInt32Memory0 = null; function getInt32Memory0() { - if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) { - cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer); - } + if (cachegetInt32Memory0 === null || cachegetInt32Memory0.buffer !== wasm.memory.buffer) cachegetInt32Memory0 = new Int32Array(wasm.memory.buffer); return cachegetInt32Memory0; } function getArrayU32FromWasm0(ptr, len) { @@ -409614,9 +390015,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => this.blockSize = 64 / 32; } static async loadWasm() { - if (DESAlgo.wasm) { - return DESAlgo.wasm; - } + if (DESAlgo.wasm) return DESAlgo.wasm; DESAlgo.wasm = await loadWasm(wasmBytes$3); return DESAlgo.wasm; } @@ -409624,8 +390023,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => return DESAlgo.loadWasm(); } _doReset() { - const key = this._key; - const keyWords = key.words; + const keyWords = this._key.words; const keyBits = []; for (let i = 0; i < 56; i++) { const keyBitPos = PC1[i] - 1; @@ -409642,56 +390040,33 @@ var require_crypto_js_wasm = /* @__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 (let i = 1; i < 7; i++) { - subKey[i] >>>= (i - 1) * 4 + 3; - } + for (let i = 1; i < 7; i++) subKey[i] >>>= (i - 1) * 4 + 3; subKey[7] = subKey[7] << 5 | subKey[7] >>> 27; } this._invSubKeys = []; const invSubKeys = this._invSubKeys; - for (let i = 0; i < 16; i++) { - invSubKeys[i] = subKeys[15 - i]; - } + for (let i = 0; i < 16; i++) invSubKeys[i] = subKeys[15 - i]; } _process(doFlush) { - if (!DESAlgo.wasm) { - throw new Error("WASM is not loaded yet. 'DESAlgo.loadWasm' should be called first"); - } + if (!DESAlgo.wasm) throw new Error("WASM is not loaded yet. 'DESAlgo.loadWasm' should be called first"); let processedWords; const data = this._data; let dataWords = data.words; const dataSigBytes = data.sigBytes; const blockSize = this.blockSize; - const blockSizeBytes = blockSize * 4; - let nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - nBlocksReady = Math.ceil(nBlocksReady); - } else { - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } + let nBlocksReady = dataSigBytes / (blockSize * 4); + if (doFlush) nBlocksReady = Math.ceil(nBlocksReady); + else nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); const nWordsReady = nBlocksReady * blockSize; const nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); if (nWordsReady) { - if (dataWords.length < nWordsReady) { - for (let i = dataWords.length; i < nWordsReady; i++) { - dataWords[i] = 0; - } - } + if (dataWords.length < nWordsReady) for (let i = dataWords.length; i < nWordsReady; i++) dataWords[i] = 0; const dataArray = new Uint32Array(dataWords); const ivWords = this.cfg.iv ? this.cfg.iv.words : ""; - if (this._xformMode == this._ENC_XFORM_MODE) { - if (this.modeProcessBlock != undefined) { - this.modeProcessBlock = desWasm(DESAlgo.wasm).doEncrypt(this.cfg.mode._name, nWordsReady, blockSize, this.modeProcessBlock, dataArray, this._key.words); - } else { - this.modeProcessBlock = desWasm(DESAlgo.wasm).doEncrypt(this.cfg.mode._name, nWordsReady, blockSize, ivWords, dataArray, this._key.words); - } - } else { - if (this.modeProcessBlock != undefined) { - this.modeProcessBlock = desWasm(DESAlgo.wasm).doDecrypt(this.cfg.mode._name, nWordsReady, blockSize, this.modeProcessBlock, dataArray, this._key.words); - } else { - this.modeProcessBlock = desWasm(DESAlgo.wasm).doDecrypt(this.cfg.mode._name, nWordsReady, blockSize, ivWords, dataArray, this._key.words); - } - } + if (this._xformMode == this._ENC_XFORM_MODE) if (this.modeProcessBlock != void 0) this.modeProcessBlock = desWasm(DESAlgo.wasm).doEncrypt(this.cfg.mode._name, nWordsReady, blockSize, this.modeProcessBlock, dataArray, this._key.words); + else this.modeProcessBlock = desWasm(DESAlgo.wasm).doEncrypt(this.cfg.mode._name, nWordsReady, blockSize, ivWords, dataArray, this._key.words); + else if (this.modeProcessBlock != void 0) this.modeProcessBlock = desWasm(DESAlgo.wasm).doDecrypt(this.cfg.mode._name, nWordsReady, blockSize, this.modeProcessBlock, dataArray, this._key.words); + else this.modeProcessBlock = desWasm(DESAlgo.wasm).doDecrypt(this.cfg.mode._name, nWordsReady, blockSize, ivWords, dataArray, this._key.words); dataWords = Array.from(dataArray); processedWords = dataWords.splice(0, nWordsReady); this._data.words = dataWords; @@ -409741,47 +390116,30 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => */ _doReset() {} _process(doFlush) { - if (!DESAlgo.wasm) { - throw new Error("WASM is not loaded yet. 'TripleDESAlgo.loadWasm' should be called first"); - } + if (!DESAlgo.wasm) throw new Error("WASM is not loaded yet. 'TripleDESAlgo.loadWasm' should be called first"); let processedWords; const data = this._data; let dataWords = data.words; const dataSigBytes = data.sigBytes; const blockSize = this.blockSize; const blockSizeBytes = blockSize * 4; - const key = this._key; - const 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."); - } + const 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."); const key1 = keyWords.slice(0, 2); const key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4); const key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6); let nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - nBlocksReady = Math.ceil(nBlocksReady); - } else { - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } + if (doFlush) nBlocksReady = Math.ceil(nBlocksReady); + else nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); const nWordsReady = nBlocksReady * blockSize; const nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); if (nWordsReady) { const dataArray = new Uint32Array(dataWords); const ivWords = this.cfg.iv ? this.cfg.iv.words : ""; - if (this._xformMode == this._ENC_XFORM_MODE) { - if (this.modeProcessBlock != undefined) { - this.modeProcessBlock = desWasm(DESAlgo.wasm).tripleEncrypt(this.cfg.mode._name, nWordsReady, blockSize, this.modeProcessBlock, dataArray, key1, key2, key3); - } else { - this.modeProcessBlock = desWasm(DESAlgo.wasm).tripleEncrypt(this.cfg.mode._name, nWordsReady, blockSize, ivWords, dataArray, key1, key2, key3); - } - } else { - if (this.modeProcessBlock != undefined) { - this.modeProcessBlock = desWasm(DESAlgo.wasm).tripleDecrypt(this.cfg.mode._name, nWordsReady, blockSize, this.modeProcessBlock, dataArray, key1, key2, key3); - } else { - this.modeProcessBlock = desWasm(DESAlgo.wasm).tripleDecrypt(this.cfg.mode._name, nWordsReady, blockSize, ivWords, dataArray, key1, key2, key3); - } - } + if (this._xformMode == this._ENC_XFORM_MODE) if (this.modeProcessBlock != void 0) this.modeProcessBlock = desWasm(DESAlgo.wasm).tripleEncrypt(this.cfg.mode._name, nWordsReady, blockSize, this.modeProcessBlock, dataArray, key1, key2, key3); + else this.modeProcessBlock = desWasm(DESAlgo.wasm).tripleEncrypt(this.cfg.mode._name, nWordsReady, blockSize, ivWords, dataArray, key1, key2, key3); + else if (this.modeProcessBlock != void 0) this.modeProcessBlock = desWasm(DESAlgo.wasm).tripleDecrypt(this.cfg.mode._name, nWordsReady, blockSize, this.modeProcessBlock, dataArray, key1, key2, key3); + else this.modeProcessBlock = desWasm(DESAlgo.wasm).tripleDecrypt(this.cfg.mode._name, nWordsReady, blockSize, ivWords, dataArray, key1, key2, key3); dataWords = Array.from(dataArray); processedWords = dataWords.splice(0, nWordsReady); this._data.words = dataWords; @@ -409802,9 +390160,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => function rabbitWasm(wasm) { let cachegetUint32Memory0 = null; function getUint32Memory0() { - if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) { - cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); - } + if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); return cachegetUint32Memory0; } let WASM_VECTOR_LEN = 0; @@ -409831,8 +390187,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => var len1 = WASM_VECTOR_LEN; var ptr2 = passArray32ToWasm0(C, wasm.__wbindgen_malloc); var len2 = WASM_VECTOR_LEN; - var ret = wasm.doProcess(nWordsReady, blockSize, ptr0, len0, ptr1, len1, ptr2, len2, b); - return ret >>> 0; + return wasm.doProcess(nWordsReady, blockSize, ptr0, len0, ptr1, len1, ptr2, len2, b) >>> 0; } finally { dataWords.set(getUint32Memory0().subarray(ptr0 / 4, ptr0 / 4 + len0)); wasm.__wbindgen_free(ptr0, len0 * 4); @@ -409850,9 +390205,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => function nextState$1() { const X = this._X; const C = this._C; - for (let i = 0; i < 8; i++) { - C_$1[i] = C[i]; - } + for (let i = 0; i < 8; i++) C_$1[i] = C[i]; C[0] = C[0] + 1295307597 + this._b | 0; C[1] = C[1] + 3545052371 + (C[0] >>> 0 < C_$1[0] >>> 0 ? 1 : 0) | 0; C[2] = C[2] + 886263092 + (C[1] >>> 0 < C_$1[1] >>> 0 ? 1 : 0) | 0; @@ -409866,9 +390219,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const gx = X[i] + C[i]; const ga = gx & 65535; const gb = gx >>> 16; - const gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb; - const gl = ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0); - G$1[i] = gh ^ gl; + G$1[i] = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb ^ ((gx & 4294901760) * gx | 0) + ((gx & 65535) * gx | 0); } X[0] = G$1[0] + (G$1[7] << 16 | G$1[7] >>> 16) + (G$1[6] << 16 | G$1[6] >>> 16) | 0; X[1] = G$1[1] + (G$1[0] << 8 | G$1[0] >>> 24) + G$1[7] | 0; @@ -409895,9 +390246,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => this.ivSize = 64 / 32; } static async loadWasm() { - if (RabbitAlgo.wasm) { - return RabbitAlgo.wasm; - } + if (RabbitAlgo.wasm) return RabbitAlgo.wasm; RabbitAlgo.wasm = await loadWasm(wasmBytes$2); return RabbitAlgo.wasm; } @@ -409907,9 +390256,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => _doReset() { const K = this._key.words; const { iv } = this.cfg; - for (let i = 0; i < 4; i++) { - K[i] = (K[i] << 8 | K[i] >>> 24) & 16711935 | (K[i] << 24 | K[i] >>> 8) & 4278255360; - } + for (let i = 0; i < 4; i++) K[i] = (K[i] << 8 | K[i] >>> 24) & 16711935 | (K[i] << 24 | K[i] >>> 8) & 4278255360; this._X = [ K[0], K[3] << 16 | K[2] >>> 16, @@ -409933,12 +390280,8 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => ]; const C = this._C; this._b = 0; - for (let i = 0; i < 4; i++) { - nextState$1.call(this); - } - for (let i = 0; i < 8; i++) { - C[i] ^= X[i + 4 & 7]; - } + for (let i = 0; i < 4; i++) nextState$1.call(this); + for (let i = 0; i < 8; i++) C[i] ^= X[i + 4 & 7]; if (iv) { const IV = iv.words; const IV_0 = IV[0]; @@ -409955,15 +390298,11 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => C[5] ^= i1; C[6] ^= i2; C[7] ^= i3; - for (let i = 0; i < 4; i++) { - nextState$1.call(this); - } + for (let i = 0; i < 4; i++) nextState$1.call(this); } } _process(doFlush) { - if (!RabbitAlgo.wasm) { - throw new Error("WASM is not loaded yet. 'RabbitAlgo.loadWasm' should be called first"); - } + if (!RabbitAlgo.wasm) throw new Error("WASM is not loaded yet. 'RabbitAlgo.loadWasm' should be called first"); let processedWords; const data = this._data; let dataWords = data.words; @@ -409974,19 +390313,12 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const C = this._C; const b = this._b; let nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - nBlocksReady = Math.ceil(nBlocksReady); - } else { - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } + if (doFlush) nBlocksReady = Math.ceil(nBlocksReady); + else nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); const nWordsReady = nBlocksReady * blockSize; const nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); if (nWordsReady) { - if (dataWords.length < nWordsReady) { - for (let i = dataWords.length; i < nWordsReady; i++) { - dataWords[i] = 0; - } - } + if (dataWords.length < nWordsReady) for (let i = dataWords.length; i < nWordsReady; i++) dataWords[i] = 0; const dataArray = new Uint32Array(dataWords); const X_Array = new Uint32Array(X); const C_Array = new Uint32Array(C); @@ -410016,9 +390348,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => function nextState() { const X = this._X; const C = this._C; - for (let i = 0; i < 8; i++) { - C_[i] = C[i]; - } + for (let 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; @@ -410032,9 +390362,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const gx = X[i] + C[i]; const ga = gx & 65535; const gb = gx >>> 16; - const gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb; - const 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; @@ -410065,9 +390393,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => this.ivSize = 64 / 32; } static async loadWasm() { - if (RabbitLegacyAlgo.wasm) { - return RabbitLegacyAlgo.wasm; - } + if (RabbitLegacyAlgo.wasm) return RabbitLegacyAlgo.wasm; RabbitLegacyAlgo.wasm = await loadWasm(wasmBytes$2); return RabbitLegacyAlgo.wasm; } @@ -410100,12 +390426,8 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => ]; const C = this._C; this._b = 0; - for (let i = 0; i < 4; i++) { - nextState.call(this); - } - for (let i = 0; i < 8; i++) { - C[i] ^= X[i + 4 & 7]; - } + for (let i = 0; i < 4; i++) nextState.call(this); + for (let i = 0; i < 8; i++) C[i] ^= X[i + 4 & 7]; if (iv) { const IV = iv.words; const IV_0 = IV[0]; @@ -410122,15 +390444,11 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => C[5] ^= i1; C[6] ^= i2; C[7] ^= i3; - for (let i = 0; i < 4; i++) { - nextState.call(this); - } + for (let i = 0; i < 4; i++) nextState.call(this); } } _process(doFlush) { - if (!RabbitLegacyAlgo.wasm) { - throw new Error("WASM is not loaded yet. 'RabbitLegacyAlgo.loadWasm' should be called first"); - } + if (!RabbitLegacyAlgo.wasm) throw new Error("WASM is not loaded yet. 'RabbitLegacyAlgo.loadWasm' should be called first"); let processedWords; const data = this._data; let dataWords = data.words; @@ -410141,19 +390459,12 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const C = this._C; const b = this._b; let nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - nBlocksReady = Math.ceil(nBlocksReady); - } else { - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } + if (doFlush) nBlocksReady = Math.ceil(nBlocksReady); + else nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); const nWordsReady = nBlocksReady * blockSize; const nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); if (nWordsReady) { - if (dataWords.length < nWordsReady) { - for (let i = dataWords.length; i < nWordsReady; i++) { - dataWords[i] = 0; - } - } + if (dataWords.length < nWordsReady) for (let i = dataWords.length; i < nWordsReady; i++) dataWords[i] = 0; const dataArray = new Uint32Array(dataWords); const X_Array = new Uint32Array(X); const C_Array = new Uint32Array(C); @@ -410181,9 +390492,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => function rc4Wasm(wasm) { let cachegetUint32Memory0 = null; function getUint32Memory0() { - if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) { - cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); - } + if (cachegetUint32Memory0 === null || cachegetUint32Memory0.buffer !== wasm.memory.buffer) cachegetUint32Memory0 = new Uint32Array(wasm.memory.buffer); return cachegetUint32Memory0; } let WASM_VECTOR_LEN = 0; @@ -410249,9 +390558,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => this.ivSize = 0; } static async loadWasm() { - if (RC4Algo.wasm) { - return RC4Algo.wasm; - } + if (RC4Algo.wasm) return RC4Algo.wasm; RC4Algo.wasm = await loadWasm(wasmBytes$1); return RC4Algo.wasm; } @@ -410264,9 +390571,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const keySigBytes = key.sigBytes; this._S = []; const S = this._S; - for (let i = 0; i < 256; i++) { - S[i] = i; - } + for (let i = 0; i < 256; i++) S[i] = i; for (let i = 0, j = 0; i < 256; i++) { const keyByteIndex = i % keySigBytes; const keyByte = keyWords[keyByteIndex >>> 2] >>> 24 - keyByteIndex % 4 * 8 & 255; @@ -410279,29 +390584,19 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => this._i = this._j; } _process(doFlush) { - if (!RC4Algo.wasm) { - throw new Error("WASM is not loaded yet. 'RC4Algo.loadWasm' should be called first"); - } + if (!RC4Algo.wasm) throw new Error("WASM is not loaded yet. 'RC4Algo.loadWasm' should be called first"); let processedWords; const data = this._data; let dataWords = data.words; const dataSigBytes = data.sigBytes; const blockSize = this.blockSize; - const blockSizeBytes = blockSize * 4; - let nBlocksReady = dataSigBytes / blockSizeBytes; - if (doFlush) { - nBlocksReady = Math.ceil(nBlocksReady); - } else { - nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); - } + let nBlocksReady = dataSigBytes / (blockSize * 4); + if (doFlush) nBlocksReady = Math.ceil(nBlocksReady); + else nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); const nWordsReady = nBlocksReady * blockSize; const nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); if (nWordsReady) { - if (dataWords.length < nWordsReady) { - for (let i = dataWords.length; i < nWordsReady; i++) { - dataWords[i] = 0; - } - } + if (dataWords.length < nWordsReady) for (let i = dataWords.length; i < nWordsReady; i++) dataWords[i] = 0; const dataArray = new Uint32Array(dataWords); let S = this._S; S[256] = this._i; @@ -410341,15 +390636,11 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => * * @property {number} drop The number of keystream words to drop. Default 192 */ - if (!this.cfg.drop) { - Object.assign(this.cfg, { drop: 192 }); - } + if (!this.cfg.drop) Object.assign(this.cfg, { drop: 192 }); } _doReset() { super._doReset.call(this); - for (let i = this.cfg.drop; i > 0; i--) { - generateKeystreamWord.call(this); - } + for (let i = this.cfg.drop; i > 0; i--) generateKeystreamWord.call(this); } } /** @@ -410364,8 +390655,8 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const wasmBytes = generateWasmBytes("eJzsvXt8JVWVL16163Heycn71Y86Rc9MnLG5/UzSXn8fOT3TAtdxxBnnfvzD+2n6kRbSCPRDASd2wnSDYUQnaqNBUAO2klHAoChRQQOiBmk0QqtRUSI2Gp0WgqJG7cHf+q69q2rXOSed04ww4+cztOZU7araa+313qt2rW1s2/cG0zAMc0isOl8MDBjnWwP4S4fmAB/Tj0kNJg7sAb5o0KEzII+TA+o/Q17l280D5xvG+W5wwRo4wJcPHDhgqAdxW7/Zf35iILpp4ADg9ocP0j3pgYGo/4w8oF7QHd+EA+rwLQPyt1+ifgDA3iJR4qYACvWYCjvE+A4EmNCfA4Q1od4vfpZaZV22/fXtW7detv3Ci3e+vvfirZds7+vdsX/rzr2XXLp1b+8uw8YNTdoN+/bvvfDi12+9uPcyQ4QP8/nWrk3r163t6l27ZtParnXrN3UZCdywTN6wb/+2Hbu3rtm5c9uObRt3rt22fdf2jet2GYZ2S+/evZfs3bpm06a1m7rWdW/bQUfrdm2Ut+goXPzGN2zv3csoFHCtoxz/HRddcnEvD8DBHS3aHRfu2/rGi3f27rrw4t6d8mpj/KrsQl76M4nZ3m0X77zkDS+/8KKL/uGKi3ds3bS2d9329Zu29+7Ysa1r7YZuw8S9fy7vfX3v/r/n2//vtove2Ltv63a6Yf2GbdvW9WzavmP9xi45nhXy5kv3XrKjd9++rb0bu3bt3Lhhx66u9Ws3be/aIaGvlDe9qXfvvgsvuXjf1u7u3nVrN2zcuGlNz85tO9evl3d1KA5csrMX9F23cWfP+nW9G7p7Nu7cWHGAkoXy0rqQO/sv3LF12w5gQ0z4u1f9zZatr3zV3/zj327Zuq5r+7r1a9d39+xYu723e+dOyVY1gL29e9544V4A3r5246aenZuohx3b168xLNy0XN60Y+8Vl+6/ZOv2TRt3dq/tXr+uq6trbc+2TbFBvmHfX8u7Nm7r6drZ3b2ti2Roza6etfIuTcx6e9duW79zW8/GDV0bd3atWyvx8cIbLr5k297X79u6qXtt76ZtG7dt713bs3Ht+k1SXBWxdmy76KKt69fv7N6+Y+fO7dt3bVu/acO22B37ei/atXXXzjVrtq3t3UUYrd2+rlcNXY3qMqLoJST1u7p612/o2tmzffvOrrU7u+U9BSUMF12yfdtFr7mAqL5+/YaeTeu7tu3YsGnnLuo21pe8b2sXkWfjjm27SBo20u8meU97gNH+rV0bduxYv6lnYw9hs2P9rrVS8lQn29+4axfpxfoNuzb27ti0q2dbz/qe7dvWlBFwx85ta8Gqndt3EKV7t8VuAJS12zatX7NjF+7b1rOmqzsG5aLei1+//4KtG9fuWrtpV/f6nV07N/Xu2qVkcVUI5bIL91+gbu3q6t24cf2a3u413Zt6t63dHuP7vjdu37Z377Yrtq7rXrNrV8/OnRs39qzbsXbbDilBuubu7N3+xtcH0stalNeu7r9g7yWXyeY6rfkNvW+4ZO8VRMhPOnc4OdMxTcNMuuQH8H/TFfTXSaYcauf/XCNppOAn6L8WukEetZpGLmmYeKie/tJ/hgtfYhkpajUs7oyPDGGbjfSbpP9bRpNJR7XUYxoXTbKmBvsg/KHLltFsmiJhoiNuzNJRnWHT3yTfZtWYdGIKVyKXdfG4azTQj5XCEyKHvykzp9C36ZIwbNe0bNu0RRojMu1UKmPWU4crTCNPyBLyjqD/CIyVo1MvKUwnIQhOHfXA47CpCwwxYa4UFrVRqy1ACYtuzdi2TY+7hCj9zzVAUyHsBP0HHJJ0DDqbckw4sBzfcDA8JoNluXgeGAgT/xwj7aRxJUeYGUYtdU9MMYVDJx3Uty3OAGxTCNxUhyHSs/i/KWpqQHTLMnlAwibhogZLOMJqTBNxLUuA8LYD/B3TqLUShD6hYgs76RgSD9fGowJDplGZgh9xhAkiYtAJsynZlm+nSy517hCSwsIgDdCYRuYANI/HALaCGgh3B/8nnAkZIkIwYvlfNmvQLRggaEr4W9QbXaSWjMP/ZZwMETphXmo+Tf8cyzTq3BS57eLg4KSRSXzIqnelbAujSdnifdsu3Xvhm7bt7926a29vr3HErNGa4C6/YNVrLTt72TAbN4harXXfha+/2LhRrNSayKWdJw9f0XvFX19y8f7ei/cb/2G1l9zyxu0XXbiD7jiv9w3GB63GCCm+IHG6zcpFLUDpIasuaui9WGL0ezMfNZL7u3DXFca3RWPURuAI0D9c+OZe4/3W8lh7iEaA6LNWzB6Q5b9kh3GnXa817u2Vrd+zV2qt23bu3EoOSUYul15yIXW317jRqdVu4TH93tYdbO/lCJIu2dtrXOOkfkhsK5qZefOYc5U9an/e+pn4g/3v9jHnrdZt5p3mx6w7zA/YDzm3WD8Qe6/4jth/1Pq684iYE78z/0W8136HGLe/5nzYuskcMz9qfdh8v/2gM2YdNN9m/lhcZT5ofdU5Joasm8SoGLM/Jb5tH3W+ZF1tfcH8kjlif8W8xz5iESD7J/ZJ+r3HfMgcE/80bt4l3k7Y3C0+Y33Setq+iXB5mv4/xf8+b3/efsA5Rv+usW8XJ6zj9tvtcfFLenye7hnlK5+28fdm5yb6e59zRDxqvuG4uMG6Uhw3d/5I3Gp/3X7CfloMmk8I3PUhuusI//0w/b3Fud26ynkH9XC9fQdd/5gzaH+UerzSHqPr/+bcQPfdZY84t9LvpH0d3XcXwZ6w72KYT1rDaKH/z4unxBedaecbzludLzqDzsPUdtQech6k38/YvxM/tO+3HrN/aP/AnrN/bD9G/2btx9Wztzn/4sxTr2+z3+Y8ZT1p32t/1r4DV+yHnQecb9qPiZusD9nXOu9wvmtdI97rPGr9h32l8yN64hHnc84nzSfFr627nfc5PxG/sH4o7rPTH/xS+x3OfdtFx4B94AyjOJje7burDE94tmd5zrl+oqNQS8fCo4Maz6FGOkiJs8RZuE4nfrpYeJV9lljkn5cuXinouucWh1J9vigaXcKgE/qZTdLvbLLPq6V/qaJ1sd9YNPv8rJf26P/ndviZorW/z8/nj5p043yqzxMvsgy/0G2hgzk6d4uDqT5qky2z3LKQjFpmuGVea5kmHHJ4mtt8n1s990XWbNI/o9uaSgG0l9ntCxpy9hUdhTrP7RRHU4Wkd8YthXoaj3+Ln/AKt/iWZxXtV/hOhy+25Awv6eU8Orbp2DrLS4A4RXOP39BRcDxB4/DsvuLlgHneFiKGUxBZkfEcpstUqq+YLHZ6DR199NBAHxOoU0ynCgn8zqcKVoZ71ACaIcCckclQJ48aGOqJVF+nUBQ+xi3HiUDC6OaWo9zyqNZyP7cc01rO2u03eAnuAcCfSXWJnXRodYnz6SfZJV5KP/VdoofuFUXTEx0vMS4Ayby6Pr/+3JypGJ2rxOg8/asDU0OW+nVeLs5Uv0my1W/WGeu3SNb6rTpz/TbJXr89xuCMZLDfsQiLJUfz4OiyihwFFwnVDAicLOGo01Eg5QBHkzpHRcEGR0WMow5xVFTDURscDQAqjh42FUf95SFPrzUVT/0VIccOmYqr/sqw7WTAV98L2xaoLc7YG03J2RH85rvEfvpZ1iUuVay1ibWjpleRk7VePfhIv+mAnzonm7yAey1ewLE2L+BSxjs1Z9LgTG5xzqRfaM6k45w5ShSPeHI/nUXcuJvOIj7cSWcRB8bJutWW8OCY4sE0ftNd4lb85rrEmKlxYcb0Gr3Uq3JkkjyyUJF1ypzKrNbQvyyb0Nwf24SmT2lCNYtZdyqLma5kMfOnYTHzp2kx07rFPCRKLeZJs9RiPmOWWswTZqnFnCOu5ku4eq2QXB0S0mgeB1friDcBV2E2hwUxM+NlyQiem7MUJ9OVOJmjf5m43cx56RK7Wa/sZmPMbjYpu9kcs5stym62VrKbS3O17VRczVTiavtpcLX9NLma0bl6d8BVPxPy9U4RWM32kGu3isBqdoRtR0RgNZeFbaOi1Grer3g7qXh7I37byIoSXwtJjb9TwqvIzRrpA+k3FfBU52a9F3CwkhWVnKqpglMpcCq9OKdShEAFTuVOg1O50+JUAFBx6hmibMSjE3QWcec4nUV8eZTOIo7MiD7fLuHJScWTBfzCqgppTaeFxo9B1jELPO7BnzGzL7+Ffie5aZYVe1rItgVukzfPG335zTDfdl949wjdt5lo6642LiDra748Z6h4l1qGqWF3jbAMk9xOziwahSTRDj84zRRFIZkB5uf7oA8o2ileWmjAz1mgHP0OCT8RXjtuUrBCv3NmIZGR5PcaiLpkdfJfg0GYI8yS8kL+cZPEUEhEZkyCEMdt0Ipwsxg3IXETOAVughGYNjXkbjVpEkC/4yajxwjUEgLUtKAQHcDJjJACcEw4np0JsBt1yO2E2NHBMEkwSWlxwoq8ypCS6nGtDdasFozS2mDL4H1GtTZYMqA1orUh/kOgPxy1QUeGrG6LFXEBXhP9mFo/1AYZGdHaYFlt9GPGvKTvAGcz5idJywhnM+4pkzLy0nG4VCppcT7RpyyCpM1fe9waIsxKHp6BELPhGUgwE55h8NPhGYY9FR/2pBw2c0EEVzDUyfAMg5wIzzC88fAMAxsLz5LSLOr9jwg1prFk6ZiYyNJUFQKoI0kd6nBShzqU1KEOJnWoC4kY1PkEoJK4J0i2ycCJ4h/MPSXyPpPUdBHXWeYTUuYTQRPknlWLMBcDknXSkkELXpkz2mUbmauCJe0rqQ/fOZ7kO6eTvhPeSW2402HdIV13pCLMkCIkJBBWBO5fFJ1z2d5u2btFatvRVH7IzKhOyy/fmsRlNWoa4ZhdZoBm7VIDFA1YGywxiIcwaPMQRm1tsNQWDvakFQx2Qt45Y2uDnbCjwd5ph4MdduVgy7R+zC7X+lG7XOtH7HKtH7bLtX7ILtf6QTsmKAulWj9TQeunK2j9VAWtn6yg9RMVtH7cjOEwZi6qIsEZXcm/x2SNmTN0LZ01dH2ZMXR9mTZ0fZkydH05a7eOQc8iducstjuzIcnAkJnwDKyYDs/AhKnwDOSfDM9yUhh0kON2aHcGLX1ECzG7Mx+zO3MxuzMbszszcbszvbjdqUDU4ZjpG4qhMBhDYcHUUZg3dRTm4nydXYyvZ/2P6YtM35T7xzN9So+ZKm5cj0Hxea1tTun2nNY2q3R7VmubUbo9o7VNK92edmOUn3IVv0NOS8ue/38c+iHupmeS0q7BvtWGPU4pKwYLlwlbJ5XNgo3Lh60TSeTGpJVrCFuJujzPg51rjElhstsaS4b4kCxutvL/bkrBoUlgIjKvmAx6TmSCk5gO2uH5MKaFnhWek8D6bZw2iEiQ6iYBRF9kSZRFAVcBfyikFiu9G1N6J6b0TkzpnZjSOzGazzgVaE4ORqN5jRfQOe0FtM15AT3rvICG0exqMboJ0C2iWESriEoRfRajzEQ5ZSZjlJmIUWbc1Skz5uqUGXV1yozEpXHYjRl1OQqaDhBl2AclIusDqGMJHepoQoc6ktChDid0qENx6zPI1idueWy2OaPJgrQNCwm2DSO6baC20DY8k8gUhNIUW5slMzNgSpHicqKcB2mSJqSDPM4pLSu1wJIxqbXMc8uE1jLHLePJ2FjGkjI28KyXkCRlzUz45oKH48tQyjAxLSr+NtVXsGAw1S1knfaE12GN6XkYV5WXi1E8wHo0UYr1SKIU6+FEKdYaB4qHqR+raPV1GkaXobGEh5HAMDAcvvrOVDYfWv9sTXCYy5QwySplkhUyqcQpOKVOwVFOQRKF3xrlIF/OK5E2IA7SHYni5X3kciycWYQDnQmL7t3iOVv25qjFs6Sg4pWSTGu8Jgf+040OPUY/llfw/Neq3MHzRludlMqjh+FSPvDvtrxGip2thfu0lDTYJdJgSWmwXmiMZwO8818S6tSKUK7JqOP3qYtFM7yYKffMuWzomLPZDBm1dNF8k589N0d6zqPmhHQeL+12+3V9eIOXJBEh3idJ4khrksU/0H/mHi95di5BZ9Z+pKvPySECSeYPOr61JZf0koVEkW+X2SWDb8zf47QD+lRKqpQk0HEtZSsJpBK0GoGORS1EIEJfEqhTnEgVyNzA9tRyctwnjW5QbtJRWaXiSbCcnYN8w8JdynybbLk2qWXFueVwUmXOA9SQjnqGbKcnugRcgmd3iRuTMmU4kpSOtWB7TKsBDN9zSNKRNmsgd0UODZ4+n18l9bCQsjgHF6grK5Nzrp9RkdFCglpSBUHWy0ts8QTxjSw3snhCZfE2G39PTTbdlpH5vIR6DpM7pOfQI6fySGozXtYzX5FzPZO4Wsh4hnyRUMjxcwQZb3RTehc5jzN++REkPQ/soaiLnk8wygbrfR/1Ze1W+CfQw0CIOA/R8QRSRtSBLZtGOATEfSGyuIcgJ9hhZKSQbyZZyX/T1KizeO9gOt6KLEXW9HMga7oasi5GPsMzA/I5BYOpeaqxGIpSQS6wDgPLnwOXRbpiSL/qyTjZ1ONPT8XJevTpqThZjz09GSdHYSPH+hwnp2ITsJQWP5G8MnEDPFQE7Jkxmydi9s6K2bpEzM6VQSIVNjDJSSmDWxMY3CzmOAbZmzR+aIISiZBRJkLGKUTIWJLsJTMfUTrzEcHMRzrOOXnnUIqtorxzTt7J9ug43ZkMxdGoLI6mLo5GdeJoViOOShSVE480mSxR/qdmlghZ76XzE44Bg5CSB3XqoHjjW+81imcUF66518jfYBuZ/O30h436p+UDZv4uHFjqoIRyVinlLEU5yQSimCn9CBCSASuIaeZXEepRI0gY0jS/KqOeNeDBDH3yeDypzS3LL98aXh6JXc6pSAj+77/Qk28viz0yau4jQm0f0t7kSl3X3+1OBh6qRM/1d7vjuqdbao5EQ+aGaQ3IWEqZiajLlDImEdiUMjkRaillmErnUiNBYgWDHFGZxNXGtFOwWZrGHJamKUcLS6ktDEuPOHKWgXm4VeldXMksQ+YQIps0p/ICgzFbOBtkH5KaNWTbWCPpqc35tbfl0Zw/oCpmbp79EmMhNrdFukrOrTUx4IzWghQ0TJm0qSRm6Dl96kbnwZyVp+R0ntRye8gA1Gj5PIQ+6fLkkpwBzSU4u8yv/Ya1OZjlBSAT4QQ55QVgar0AQMYr63o2qc2ygpnWAtJNQezMvJ2Uk5PZBF4wKd5OyskJG7W7aXJieaeYQVpYrPZCziAFzyBtzrnzkpOcGRmMkWSpwRguAz5UBnywDHiFRGCZwZjQDIYW+SvCVjOXs6tmQZI5SKEzZn3080p2rjTPQ6xP87ZkMAe0cWbDwW0h5wW7anuOmvXRvdGsT00W1eSvbNb3QhOy0hzKeqHRmSibhAqdr95pzegMPdWqrLoc76jMY8rEANuuKFobDCPAyD4OhZFiLIEYWE49iaisa2RFR8MINakPXKXQ2KcnomucFUxEz3O2NhHBgF+cTkR4gFlTiQhXIUXXj6XrJhIV8opkeIkGwtP9oOXpftL2dD+q/IOeLQvPktJqltr9iQQCflaxeflGbdjR4qF57d3bCTInlgz1pfWf04MKyTo9qJD+V2uRS7qmtRa5pGtKa2GLAPIsQZxs0d2f/8cQ9yi2tUpjWyuIbSXufFN5Pv+4ls/3gncl+tB05ZorUy45NF255NB05ZJDq/j2pGRoiedzaONlXBsr49poGddGyrg2XMa1iqnZkqFNmhc9j2ObdkrHNuWUjm3SKR3bhFM6tnGndGxj8dcAo+WvAbLF5H+CbaeaJJBG6rMAUyojZgF0PY0FVGrtayHtmfBwSV7OReFmqnhgTyFDP+aeQo7mVuTzVJxDUyK4x1p2deeRB0R6xUth1XRqC52mONLabBQK/KLOki/qauA8CxaaLYRhrX0ccdGk1c9/FUFOgSPWfv8MEKm1318ladiJxVnJPv3WIt4xeau8M15zG93g4Zp3hld4zW2bjf5+dJDnjgroqFN1tArX6e41fHcBz/b3FwrUd14mZ/NIztLMuCjIPJ9NvhoOKZj9BbPE0WCW6OU4luR1cIgTfEvHUCWaPAvv7YJx+UAn2Y/VbUDXZ3TyjI4fIl8gkgtkic/j9WyWl3x5Dt8w2IjgC0yxfrlYDlSgG4NH/QJPmpHzKpp9hWwQtthFTtDVgmbE6rNVEDKY7ltl1GaK4zSg4p8VZzCu62mgj73WLBzwjBdZPQUfP2sKHn46Cyvx4xWW46e1cAZ+8kQ++kkWVuCHX8YSUUzSssR+mRmn+fuLDMO3N/dc7dmbO6/ePMj/Tf7BOHiIGlpVw+zLDtJZUp7Nrzx4CBeTQzhdqMWlVhyfTPBDnXT8rIXWnqFDhw759USC5ZvXXUN/zrzmKvrbcs1V/d5Kz6Pjg/S3v3/zzY/e/Jm3//JtX7qPyGR5K7zCVV7iIH4P0sHmVdfQnxXX4LCNHu0ndKnJ5iYbTeQpE96Kqw7i70Hq2yNNIYGkgTkYmFM6MCc2MCc+MEcbmKMNzAkH5qiBNfQT38/o9zPecm8lQV9JoDMYaIYHmuGBbn7owXs++K53feOGp2lsbj9hRLg7jLvDuDvAnp6mvweZLiZkjnC3gLtVirsVw92K425puFsa7laIu6Vwb+onW1fo97OkUcsJ+nICnQXuWcY9K3H/+K/vfPzZ335+9lMD/X4NsQa4W4y7xbhzbM24O8B9OeHeyri7wN0txd2N4e7GcXc13F0NdzfE3VW4N/eTTq8gjLCqmaBnCHQNcK9h3Gsk7nffdcu1M8/8+rsX9vt5ojxQdxl1l1F38eqIHrYk6hlC3WPUc0A9V4p6LoZ6Lo56TkM9p6GeC1HPKdRb+klG8xCZrFdD0LMVRWbiZze/7wsPjn9sU7+f6/dLFYBXvLqMugvUyQSSDQbqWaCeLUU9G0M9G0c9q6Ge1VDPhqhnFeqN/cTmnJQYoF5TUWKuH33v+A2fv3/hOwbjXkFTXZZ2V0p7DeG+hnGvAe41pbjXxHCvieNeo+Feo+FeE+Jeo3Bv7Sc1yy0lMTd88ImFrx6b/eC7Bhj3pTQVItPDuGeAe6YU90wM90wc94yGe0bDPRPinlG4t8PK5JYSmZF//vQj3//ue9/xMYn7UpoKmTlr9/MuMx2wMkvKzH2Hrh35l0d+dvC1jPpSmgqRwfKz51tm2qCqS8rM5x+792OHZ791b31VqgqRmTaef5lJKl09tcxc+8S7fnP8rh+OrKpKVSEyM8bzb2dSSldPLTOP//TZj98z8cGrv2lUpasQmtkXQGjSSllPLTRPvevJd3/99vc+9gujKmWF1My9AFJTq7Q1p0lNDsjnGPmcRP6O274786Mv3PrU4EBVjtXEdw3PO+pEbeVZ814uFJs8kM8z8nmJ/KeO3Hj7L45d+eQNhHzd0vpq8pr651viidrQV8KnDmvJCHyOYNcB+TpGvk4if/ihI78/evvJh4r9/rKl9bVh88uuoT89dKVhc2LoKq++32uDGVgNM2CxGXCHroKs5qBy1CVerNZRD3l6vB7g6xl8vQT/8HVf+s31E999aCeDX0rjmgC+icE3MXiKlpPQ5NXQZIs1mcHTiKE01CXeL9dTD3WM/TpgfyZjz+B/9ODd9/1o/p2PXcLgl9KZZoBvZvDNDJ4C3hR0cTV00WJdZPA0Yog9ddnk1XsN1EM9Y78O2J/J2EvJ+dgnH52b+MlsLYNfSupbAL6FwbcweIpZ09Cm1dAmi7WJwdeBLQmAb/YavCbqoYGxXwfsz2TsGfwTE5+45yufGbt6FYNfSm4bAb6RwTcyeIo7a6EPq6EPFusDg68HW2yAb8FnYNRDE2O/Dtifydgz+F8duvWBX739wWdWVyV6rQDfyuBbGTzFjhlI9GpItMUSzeAbwBYWvUav2WuhHpoZ+3XA/kzGnsEffOCGX33kups++1WjKtlrB/x2ht/O8Cn+y0KkV0OkLRZpht8EvrDstXqNDL+F0V8H9M9k9Bn+sd+89WcPfu6jM48aVQlfB+B3MPwOhk8xXA1kejVk2mKZZvjNYAwLXzvBb6UeGhn9dUD/TEZfCt8tXxoZu+Hxk782qpK+NsBvY/htDJ/isByEejWE2mKhZvgt4AxLX4fX6rVTD62M/jqgfyajz/A/9oUbfnn7Rw9/cGSgKvFLAn6S4ScZPtmdPKR6NaTaYqlm+I3gDItfm9fudVAP7Yz+OqB/JqPP8IePT//84YeeHhkbqEr+UoCfYvgphk+Gpw5ivRpibbFYM/xWcIblL+m1MfwORn8d0D+T0Wf4X7jvxFeu+e0DV44PVCV/acBPM/w0wyfLUw+5Xg25tliuGX47OMPyl/IIA+qhjdFfB/TPZPQZ/vH33/2b3y88dusXBqqSv1rAr2X4tQyfTE8D5Ho15NpiuWb4HeAMy1+a4KeohySjvw7on8noywj9gzf//JPP/vP8y6sSvwzAZxh8hsGT6WmCWK+GWFss1gy+DYxJSPKnvDT1kKpI/g9/7aMjvx07/sg/9lOMsvR8GOCzDD7L4Mn0NEOqV0OqLZZqBp8BX2zCjqkP8OmK1H/q0DsGP/CzkSdcBr/klBbgaxh8DYMny9MCoV4NobZYqBl8FmxxAP7UxJ9/9DPT87d+9XAjg19K9nIAn2PwOQZPhqexsttPQvZqlyL+ycemPn1s+r7v/QWDX0r08gCfZ/B5Bk92p7Wy209B9JYk/kfedcMPr7pl6u1nMvilRK8O4OsYfB2DJ7PTXtntpyF6SxL/598c/taXvnDDex4yqpK9esCvZ/j1DJ/MTkdlv59Usndq6j/2k2+d+MzNB298xKhK+BYJ+io5/pQSvlOT/wdfuef7Uz+78aonjKqkr1LUt4jnTyvpOzX9x574wY8++e1//tSvjarEr1LYt4jnTyrxOzX9f/z9T3/h+Ic/8cMrB6qSv0px3yKeP6Xk79T0/9zPho58Y/htn3nXQFXyVynwW8Tzp5X8nZr+x6++/yeHD//usZsHqpK/SpHfIp4/qeTv1PS/cnbo8c89cP3bxwaqkr9Kkd8inj+l5O/U9H/nxx9/69uffPzDm6sSv0qB3yKOP63E79TkHz/58CfG7zz86bOrkr5Kcd8ifj+ppO/U1B85cs9d7z/42QdeXZXwlfn9tkX9fnWOd/jh93zsS/ffe/T/ViV7p+H3q3O8H528/3PfHH/7W/dXJXqn4ferc7wTH3rquoPvGPtUvirROw2/X53jnbrpwS//+83jD7dVJXqn4ferc7yPfOvqf7nqyu/dsKIq0TsNv1+d373+2587+dBP33/kL6oSvdNw+9W53bF3/vzaH7zn4zMbqhK90/D61XndH9354dvvfs/Bd2yqSvROw+lX53QfvO7q993+wEdPfM2oSvZOw+lX53R/+eV//dxvHvjE175XXdB3Gk6/Oqf7oae/+ql7nr3hvXPVBX2n4fSrc7onn/j8U098f/Yrz1QX9J2G06/O6c7+4NGRZ34+8/BCdUHfaTj96rzuL751379+9Z8/cPxQdUHfaXj96tzuiV8OP3LlvZM/ura6oO803H51fnfs7mtvuPkPX3hsuLqg7zT8fnWO96e//5dn7nn/DWNHqgv6TsPxV+d5r/vF9e/5/bNzJz8/UJX8nYbnr871fuwjD9xw+wd+MPHyqsTvNDx/da73xi9e/40nv/P1d/+fqqQvWb3vD1xvTqN++Qumtx46+I5fjNz+xVdXJXyp6n1/4HrxEWlOEb/8FdEHvnXwqROf/eDP+6qSvfRivj8J8EkGn5TgA9d76pc8Czd/7pfPPvXI599Ylegt4vlTAJ5i4KnA8+eU6OW0lzzlxP/sY98fvuVX1y+4VYneIp4/DfBpBp8OPH9eiR7ez9WplzzlxP/IHTe/57sTj92Rrkr0TsPx1ynROzXxb7/h+G8eHPzxB+uqEr3T8Ps5JXqnJv4N73h65Bs/vm+ioyrRq+T2k5Xdfl6J3qmJf+j37xx5+Nnv/7wTmrqk6FXy+qnKXp/fsCWXIv67H7jx6juf+ugT6xj8UqJXyemnKzv9HEQvuRTx7/6Pj9x+070f//pLGfxSole1z68H8W2APzXxj75vcvaBhe+844sU8zQuLXtV+/wGUN8h5ixB/U9f9dvvnHjvrx4/KuEvufipss8vVz02PBbgWxr5LcC3GL6lJtsnr/vR1z/51S9g4VgT8Qrwcww/x/BzpWsiSr0++/wy3QP1XcLMh/gE1HcB3WXoroq4fvW9b33yV9974jGDFzXgy1R4CPorB7sKg13Bg8USVCyQKHH67PLLhg/i87KEbCA+V1VazfLe8fc/fP8dV998wsA6S3w7763oL6ygwS6HSSksp+EXsBg6663sL6wkvM7oL5xBA/P6Cx717PcXfM9EUUDf9IRcQmx4frfVQz9et7WGflZ2W530s7zb8ujnjG6rlX4K3VaeflZ0W0n6SXRbRua+V4uWAQdF2qft3b65Cp+MG13iNZ6BhcouLzEfkH+pqROL3uX387yw3diSE57RKeyCzQ908hfAHhfmdKlN4GM6e4tnFc2zsRgedSv4c7nN5qtzDj4cE/JrXL4Zj8Y7y/hWpYcFHpaPDniuE9xdkLhk6HkT3+xNWvJ3Dr+osGmj5nzw7Z7JxTnN4nGLB2XjUz8TNdzo76MWCj34bVjYbaKGG/09JttaZdusgTpOJkoi+jk8b8nnUSNbdfUMHbZ18+EJOmyVh8cNdHY0AIA2usuaIoTwSTtqKr7WMzsJaQwDRyeo60O4TP0OAm+UHoV5tov2Kzo6XmIMoXGEV5mbKBpXyAMxs69o7y3UyKHjkFw0auwqdh7Qv5XEtwRem9d2YHM/mdDzsGwcBdmCLyCZiqOgquC63uZmu9saBtRRG6MZNvvyHzAlcAp2g6+lTK5NnQQGYQE3EwVSfaxxmtDaRrmGtYliqGEbDYjMialV9mMCjSrQneKwWXCss7ws6NQpJkwfC/XxXYlfh+8uqG3EpBanYOPLdhIkm79Ss/QqtPLL9jzdpj0jqE9LSbEVFPTmL9tNVBcNKwiYqCsafp1qoqJoWCXKRC3RsHqUiSqiXr0+jmGTxqEEswjaDVt9+R+a+DQeq9mF+uI1jeXhIvjoFeuthfoGLI0VzEJ9IpvGmmChYE2SvKaLa4KiIaaX5kuSapMW6S8ZDbN46OC9RvGvioNXB99QmCSj1pQlaa+jwQzSUWEu6uiYRVPp2Thf8KIL4iXGvCVlo0o0UTc2g0V8TCW6VIMPO8yggio35PskVmFDa5/EKmzw+iQ2YUNnn8QibFjTJ7EIESDphh5Cd+Tyx3yXFK551K11zmXZkV/1UONRE1/1hFV6zD75mXH+M5CgwFZCi63IXrIssjEV6gZHXoRhSsoGVGQXZMdgDsn/vSpn8jVp1uas8JvzyMYFts2JbNu8GVXBMFFdEDbLirRL2r4ZrUVavmmtRdq9qOhraKCYSIOiT5HKyG8HrlaZPbY0ewzEncUQt+KIOy8Q4iK/HT7IRNVGcHRMhF94cZscA104JPDFv7UlJ1FFsZ+CRbaH696zvQSHcEvxrN3wUmRdfDtnZl02GhimhGt5rW++Za9fT3GKhGdDrGxdrA4J/ljMRG1cSbfIpIhSaoyIUmoMi1JqDIlFqDEo8gctXVZlaWZ2wW7ExIzinl2Jey4i9Rj3yC3aTJb/JAdR7GcRHrbe4tuyPDTfyXolNZKLHdmsXviaOdQxyVSlYihFDrn0nPxPTdkFjZefZ4/ihkofepScYs50lR4lQbdpzwjqczGPMsPsiaqBmigXLgkXtkxJxmstk5LxWsuEZLwZI9gUeZlxIQaI0USykM0IufAlGpuYUFntmLKKKpQVpcxFiMGgVcrqhTLxnC8Tz7nFxHNWSL9JM7m20MdMqJiOXSdJtp8PlZS0CbzKWVDUnKcU13dy2fbA1916SPm6zUahle22uZrCJy4RkTHhAjspxAoCXDp5HWredIrz4ZCIe0mOQSn+OjtXx2WF/PbNxj/knM2G1/6WQms2mREHTtUH3Ycq+e2l3WT81s0DV21+2RD1UDQLdoBYvNC6FRQm0uqs27Lwqh3UWbeVvSEVSESYnMsmjXFgjCiuRnU8MoBfC/ydLZ9DCNK2ufPVNmOwYKKSvyNDPHljfiAUBRn4fd+U2M6ThEmsz+ZYPaWiWCurO0nU4hBmRl6LfQvL999v4VvYVIYUiGZjUg/pPquQDHosIa0TsseSxZW4E/nglOV4KJlEwY6qE8HRfyEoAQgDjnmFWUhlWTu1Y4/Ly9t9+P6TCwviu1AEd6/Gp6goFSRBM3KC0LUZQStEjZBwJBJATiKeDFF8ncTw/ABBY0kERSZ+fEoEMzJS4TpPgV9h0ma8VM7NEIfN/kKbMnLlLkhGNnTXO7/GH7F6PPuB+pEWbqaQ7H5o39xV9wam4QN06SjPYCAiXWLa4uNjRp+KqBDkztP9+Y9zNadcgngcKOVwEICq1fb03wDpEqhWPEKzGGWGFh6bxCzElBgc5pD5h2jiiQhJYnGETiUAObCSD7HDgUH7IGPtm68MAb7mNm4+L5fIeK00ctH/arqJSJWHt8gQkdz9chsgRxn6K27Z7afwxTabMJ57zVv4xDd0KDDq/B03zhPqvEbNtlLkBAqpsFiNkmkLE2ppt1jxLICN+RcC66VeGdwFxS+IcM4tcHveV7Pc2AO4hYC6b/KtV+acwIxDaFLFl+25beiWItdtpqkPdz1k+ZEsHxeycU5wKa+CshVsQjD1smQUy5I9ouT+sMW7NTiRhZHPGKghI7uTUfWrAtbIxmneDYLnxJPSSKkpEvvqU/nozGn66DTdlqnOR0/Zykf7UUw9aSsv7UcecMJWftqPQthxW3lqP5objtnKV4c1nUJvPRoQV06ujfxf4qtzct1+XVh0JEmTm7B+M5kQmvyEhZtRGjPf5ze9KKiZlCxqG/WYaro6ZSrjVa78yk5IvpZfPqwu80w4osZ4LBLATDiiwGhsXjyiz4uDUQczYXJbWSV+duS25oTk9nFSxBYSXfq/FKvhUKxMbCxBohWcDZsB7SKyRRSLiBXR6TmRaKjS5eNBBD8UI9FgjEQIjSISISwKSJQtJ8+sUCmOCvwwA1ymbP1yjtE/EtSWeCHUOvGfV+vEf16ta0rVOvE/av1fJbNKpXOaNVEqPaJitMPWfzeVfoGt3umqtRGqdUaWd+GZj9JuwdF2pmy6w5I/8xMKjx63uGSmFAM3SL4LGcRkeYhzQiXTpcXFbAQByhaesDB+QRLelKXfquiEsywTMssyo2dZJrQsy50c11rITXJpbhkLBwXeZIBDys51vXmriSDsTWhxuSuzUIyBEyHiBqMxvFNkMwwPJW6el2yGqDzJldkMlXkJ7WWQ1bCiuvHWFjZ3A32q8DVFtyZGYe1BpXCEuedykZ9WOac/STfRJRstRDxUGWFJpRloG0riCIpyCYW8394fjO2s3Zwg8Q3tNgM3nSW/F3vNbR4X/MBV1PVRj61BniVf4bE1Phgs946h5ztQ4Sd4yMNDrRUe8ggWF1rgZ9r1Zzq1jgqt9LzXx1tz9vep3d8s+ywMtdI4jXCcwUCSwUC4K5W8GyBPwF21nkezblmJPJxLsEdjXiY4jeIZZ+d0XqEuu42cZ9GmObvHQo2LWa6sS8x7uR3M41kerFdhnlwcYKf0+jfRjzi3Q7JVeMarcqxHJDLFKDvN8y4TAiu1TBpGmcpcUOl9mkGoB4GlwdN32DeynVxBV0l8RhsLu2bIXkYV1WZKJTxcK2I+Z8S9ZeJF5d7SqOAttRdBobeMjGfkLd1K3pItcTTVP2wVcspxiCAjWTGfjG0tw5d8soyofJFnxDTXjmmtFdNYdzFdFSrj6LXdotmwQAAUDWWmWCymrLqqigqqConlvDJN0q8+xG6OtZKLOvmt1IjlAEPqSj680o4rrdGV1vAKOsIKiuAK6w36INEP1QfSe+JXk0axrjj468nAbbBGiQgfrzXEKOpD05u2zQP/mDOgBtLJsOawfzACuyYlNxQ94WmUw5bgUBNdtPN3Ks7mP2HHH5Tm0s4Eb3U3m5XEFoKiJuOR0bZKM6wzVmmGddoqzbDiXa8y56UCO2kFOR8LQw3yVmEQm1BufcqqLoilqainPcNEWuyNpFn6mmC8zEmNlTmp0TInNbLYS5NhU/KSAxGZOsZcAPoreTkW7NXGkQm5WFYT7k++lw01ZcSMooLDxG9XlXkVssyreAXnMHg7Dxfe3ZVlXvGKgs4MjgKIbnux6sDjvbX8Niy14KPW14A6QehwOQuo1/paFRcwmmylCm2eGm/cQMmLrZ4ij2apJoKL7Z6ipjY5mAwudniK+JE945fofHEZX5yITSEgmQlvWSiSfs7rCKXRz3rtoSD6ea81ksG0yofjZTiyeMHrZFhNNcFyoqL3YUll4WVDaxdsYWSHhZQ1duMNkCEzyXOW9tJUU53xMtUZK1Od0bjqeKa2BWaIM5ttohKx2g4iN2KUE4mVrcSKX+uonqRyhWIlfZ0Uq/uhJ/K9DnVQUOGyrpckx2V6OWafvl7SM6fQy9L8dsk8g99zmtqud0FsqS+VkLGlvlBCxpb6Mgn5rrPCIokg76oCBIL9Gh/TJxN7ICrCYkfaTrlYRSPhHGYGhLhbeYJENr38skoZBwYix9WMMWXBu1Fc4rCkHp4iLZeXWDInShIGx865U+RQkUvNFylgt5QXQBim5itRNDDH+VHIjHm2zHQc56hP/D3eimQTzBOH86omsutEkzmBq4a8ms+qdxAinKIgawpPQtNQ+Vo0wVYoeDcoZ40qGzKlZq/3W8/lhWPoKBLljqLmNB1Fjm6r0R3F4tmOF8BReKVzdRkv2l5WRu+hoFP0nJWVQkNJp6A3K6cXoaj7DjXl4/Mo7D6fjEBn4xP7FAQztWjeo/xyLO8RuYPB2DQfeY/I4M9rWZB8WJL+NHJ1blD3U8a45UbisI5z+eUAZ55Kl1++M7w8VunyofDyYOwVicwsvC58QWJlimamYL3ASEosqsAR4mD3rSKlyPzrX4v6gRSvYUzs9i2sYeQFQ6Ry+GN0kD5KvUzIZEaFfwNqmq22aHGk4iLXuUWt7mAVxh/qz1X9KYvgandj2lbaSSKzRS3i8TPVdoMXNEMuSVr+QVJlIrJbFC/PJam1B/u0TbjR9goW5uAWtvsLC5tbWO1kYc+/MN6wMOm2sPFfOH+zsGrKwu5/YciCwrv0Z9jVi56TJgy5WDQqUdLHEMMO7z/njT4vQmzOiBbIWVg06UXozBjR1jwWCuV5ERJThr4phIJPlnC10YPtazrFGl4BwrOsfB98jUTNjeGD92cjDkIpSbBc2P+wA0siaVYbtg45YJAkWzSGQQeLGCXlUmHrApcAlsSLRjFvY7KxCP3mwNM5lyb0+X81JcJ8iB3QJPolcvanNhgTg+GXz3kVYRD22QzXcwZyrpyv8/q1ITcQcCw2D+brFvubSA7gayxt60qLPYulbV9pYcN0iXo0SFPJcCnSl9Nh4iXGmAlJupT3o5CyRnheEG5HwU1yOwpq/xuapij805XwxwqoRIQ/IrSI3NMB/ppmTgUj0FRzMhiDRv6JYBSRcgbjGOcFwC8xZk258K7cUPx3lRazRPSTGU120KcIrJsdYSx0kmI5W0TMQaGblAVTNynzuiiFmOjgwSGhWRpeaBWBmoyBmoiBGhc6KKzVKwM1Kji9R6I2ZoI0q4lfvn02duc5twOfeLy8g6zYAJhl8waacjrs8iqZpMmJeiUG5EXNMKrkNhlW0oU7TXnfoLxv1ORZurxv0Iz0sB+fOdjnUtBMP9hFz5YrGdW2KNhNhafcci8VBJxJ7ELBU+tmfAjCR02v4Sd5rYraS6XZa+JJdqIUD6cUD0fiUTIsu3RYthqWxNeR+LpL45uojK+7CL5upnjNwiTekxz+nUp4BQ13ljY8U9pw6PclDcd+FybN+MsMW2YabDksTaeGgovtfHHS1G3DcHCxhS9OmbqRCDIWSNtJ26Kp32hwsZkvzpi6Tx8LLjbxRT03K5Ut5TUpsXZhM5rVYzAcMvMgbUCN16JQgfGQCQqp8RmZkyDJv5yAsAqMm9LgUs9kLG1t470gD5Hwoh2mgjg6WWHLZd3upaSRCAmalQYipGFOmoiQbDXSSISUqpVmIiRORhqKuMmaMxnntLQPIayktBAhLEfaiBBWQlqJaDsaaSdCWLa0FHFYo4KNUjqkTzKkj6Nth1UT9lkb9lZGn1FeBzcjQus2bIWHU9HhoB0e4nORlFyShJmmsjNyLZKaxZivlBtPOUUT+TlHrWEnlcOUVFkcDmADRUcESzejD5RUBRXYl81Jz8cmfob/DmOexTkdxir/UolCwcGmltBY2S8wkWGxUaWtU58ucWDv2Xg/CfHvQLZRpigcGlQiI7tGJoFNTiGVYTbwmu4iobHZLCzbTDqVxdrNQhOdtqnmdtidormPDEqH1zrot3htfvMBbznW1TV5LQfwiWCH1+K1HngLKXNTYZnXWuig33ZSj+bCcq+FYGxReXeD/t35++DtbMiKMRuJFmZFcYi8a4rnCpIZLs/wOcWVwmIoGFW7KHgLULlQjzsouBn5ML8XlYQastUbUbrjEC/4dfkDBCQieTUp/RufU9hIvnjLyD9/09Rwm7ci3JCgrIAbMjqL4zZvSdyQK4xwm7Yi3I5aEW7Ni+AGyWmWuCEsK2LlpLnHtzteYixgZxLywB5Oxu0iB0dzJgVHvosluGY0F5QmZbVhyNW15Hl5SS262sJD0k/lKtuioeTZ7eD9NCm2YckEqSXrUqUETymCeym+c16Gd/x62o8oMG8qCiQ4Y+RiVYQM8FQIlZ81FYSSBAP3zlNji9+3Wfp28Py2zdK2hLd4HUo8th6xS2PrYbs0tuYBVoqtB1nzRvFJA8WfQPoZF7feKviTH46bT3LLnVrLoQRa7tZaruWW+7WWw9xyVGu5kVuOieDTHQvfxs25jIw4IrrFCQqiYNcQdC0gc6cvo15tjCSiddQ2r6NOSS6ncAoOp0DFOVsyFTIayPwikuq5kqku3zmc0AwTtYWG6QTJvB2xNCWBKJbOl6084b4VSxesUpbOW6UsnbNKWTprlbJ0xiplKQ+vEkunrHAwpWidcBVaQ66y3VIb83/Dj5R92AJp5icSQefYY3ZNfEgJmbUY1xq8+IASMmMxqjXk48NJYAqtjQbbcuerDEwpkCTBxTuYrB0FdmGkB+NzPDDTfHZ/eGYW8iryY3Mwyit/0WkhqRK9CjS/0wqWtVlIcFFLUiZ63SDR61Zarep62jMO9ekqhNGjtvsurmNWja9D+YGiiSkvpNqVxputYM6QJpCTKiTYsQ8NdHMIJXHjHxu44ccGkeXL98m8TETcfETbLKFaldWDaJmLmL1IfydcAsP7h/LkSj43qkcuTCKmP5w8djgLVvzw7B22Ar3ibXH02RxPjrXZIE2K8TehZRa4ZVBrWWDJX9DVklvm4+o0pybBnvsSY8TRtipV08N0uE0pPfsZl+Y1oK+6xQk+/MB1cI2DBkn+YafUCEisdSMgsdaNwEKZXZ8vtevFG7ENbpHMnGF0GSVzeSQfRhwMh69e72QRscm3Pg7e9JyKHywIw9JSjruaFAy7kRRc6wYrz2hSJ18Pu7zODDM/NaULdwFNaLuAurFdQJtRiyKYCYrorbI+E1QCUkrGRBkZE2VkdMvI6C5iS1niRrkHGRJDpvuk/eeJBl0jGYfhEQVHMT5dwnhHMt55oTGecxXe2LdUouxEKHP2lZRqngQDX4YHyR7l3N6qHkEEpjQ5o1gfX6/MXFfrlf+rxre9jCORk5tjFTlrN9agYn9Cv04i6NeHwKaotUEiGS7dtbBPoZ+SiPrhO3jsVejnJLLhzskW9iv00xLhKC8QoDwGqg+6Mv02qw/bwVICcu76wB2ZkJvWAwQH83bCUw8RVOpvMk6iCYI343C0hKlYfbjqtjFcdZsN56w14Uw1GeXP0MuYwzNpSWL1ToPDHe4WA8V+qkktsYb9VB0ttTaB/Vm1lPB4AsOKMpdjMO3xqfAMAR1NKL5FnJTG9lKeUHB0qj5FB3onwzM8R1GpOgOhr01EX91zNBpGnRRtnnAlLJJe4/pElxiFVeQIlS3jhyQFE1J1I82WQeji2j3GchnhyOOO4cmUieHKtIvhy9R9Djizfs65nPielNMEzeVNyamE1jItpxtaywy3TGotszJEjGFCWHRbE7bUfBkjjbsFhdmHnC7jbRzTky9xOOOe4K/aEsFXbWq2w9tqxtdIW2pbTRRGQU4KKBhBZqfHM2TkGa1ZMWTkOao1cOQ5ojVw5DmsNbD5HtIaOPIc1BrO2u1Z2sIzQ75rQP4pbJnmlkERtcxwy5DWMmuooClsmeOWEa0F702clxi8grlLXEotN3KoNWsHBDeKh7llRq4V4ZZruWVaaznELVNay0mGNam1oLIJLITNp/KlQ5dxk0mXjnCQTXzjkIGnqSUvf7VpKk95yi8HU55KL56t8MUzgopKlx8VsiyDlw/yU4KjXY9zd7wmNvZCme44IoIeZ8q+GuS8UHD5ggpX/ya4uKbCxazCRXCtHCycXFMBBVHMojV4523g7a9Z4U60Bndm7cgxhTm2/KdNMGbE9VvOey7ZN+l59Ycq3ijdkd+K32EX+5qwLrt+E0ezbtE427fzfx9MNc6WtJB8ENVg4rVigxiviTT87/mDhiBRX5p1PxI0SJXO6upco6tyRlfjpK7Cjq6+gZuRtsKODl1pNqRCu2UK7ZYpdKJMoRNlCp0oU+hEXKFz4RlehNaGZ8PaS0aDX4CmwrNB7R2Ywby09UEhjLj0OUikUVEiDU0iOZuX6FtlZL72MtMfwCrCZdi1tlO0YtfaTtGInWk7RR671pJqFM7AT7JQkBUnVsplh064a627v6+wCjE9YWCg6lTrfrwg31/E1lp79uL4TcXBZ609WOz8pr17/UZsPVtsv4z+NF22j/4mLtvX563wPDreQ3/7+oojj40dtrGc0vEKe+jPyj2+8FbS8b59NClYcRn9abgMh2l6lMIzNOW4KYcmL4dn9hFE6tijsdt91aFGQpf3zsCyp+XeCnp+xT6wm1C1GFWLUS2+85rvX0PRTC3WQuX2+HiflduzD9964y9wEYyLYPRoZFjnAgTyQCCvIZAPEchLBEinar0CB3/eckJgOT1fCwRqGYFaicDXf3Pw9n+iWJUiMkBLMrQkjzxJaOTowQQ9uFxyvSrALchyreTo1Kul5y16PgHACQackIA/fNe3HzpAwTFYk9xDIbSgH4w8T3/zwCXPuOTlyLFoNM8IpIBASkMgFSKQkgikMVfJgvQJRqC2Ium/d+h7X7UYgRSgpRhaikeO6q15erBhH1a2NTJYB2AdDawTgnUk2HavluyRl+MYn6gmKZcD4BwDzknAT3/o/q87DNjxUhh5isfsyL+lIunhCxwgUAsEajUEakMEaiUCNV4Cn0plJc9zivTlPD9y1bPvvIIRSABagqEleOQQwFQ48mVVyjqFbH14iQWS55jkuYok/+Y9T8+8mSQN0p7Y42exaPkU0o5Foh6jkAMKOQ2FXIhCTqKQAQJ5SfqA5+WkH/nmBybfQvO1RaQdPMvyyFdVKev14HnKa1iK5Fd++u2HTVYzlvZsFdLeyShYQMHSULBCFCyJQh2kPbUU6T//ti/fJHjki0q7HPmLq5T2JhJ0EpeGpUj+xd/fMYapqpL27BLSXiudTlXy3gxpTyxF+mc++9vrEjzyRaVdjnxDldLeIaUdQqSRPAnASQaclICf/dHvrr6c+KKkva0Kae+pUtpzEJE83tsnQ9JngUCWEchKBG55+/wPrmAEGgCtgaE18MgblLS38chfWqW05yHtFoQNMpOl55P0fAqAUww4pUj++FPX9vf5bRDKhj3+Mny2yyO39kAgV0A2G1g2eeStxZrL6E8btbQWrTft8xr7vHrIUi1kKSdd8Zv2gdFJCDv120hilFWcawT8RobfKOHf+8jPjxxgO9MGYG0MrI0Hjo9HGujBZfSgDbg2w7UZLvls0qY84OYZbl7ChTdBidk+Ft9GejxVkeBX/+tv/4PgtkIy2jBui3724bPvPZCKuMXp81oAv4XhtzB8ctlNEOFaiHCORZjhJ4jk+EqMuiYHA/iNTLZ2kK2Jycbwv/y5q5812MrYAGYzMJvHbWP/OTXuNOCmGW6a4ZLHJl1yANdhuI6EK8AJtm6NBLd1UXof/eInRpVx8WyM25YjJoWHTMTtDXxkOzBoZwzaGQNy2R2IEmqhoDmpoMAgC3mjfluwfSLBb2WytYNsTUw2hv/UzJGnJPw0gKUZWJrHncYyFDXuGkCtYag1DLW9D0ZMAKpgqEJCtSAJDZAz3jZyUXp/9JqHH7FZzhu8NMadoh8YVEh7qc4R4TwXGLiMgcsY1JC4QZJqIUk5liTGoBEWhvptx3oCgt9Cj7cDfjvDb5fwH33kvicchl8DYDUMrIbHXUMjD+Q8A6gZhpphqDSFhCIDqsVQLQk1CUmwAbcFX80uSu/vvvPHdyEHR6C9Goy7Ro6Ypb1U5TC1qwcG9YxBPWNA7tqBJNVCknIsSYxBK+CnkO5rYfjt+/BGoh1Ea2KiMfyHb/7tvVcw/AyAZRhYhseNKpKBnNcBah1DrWOoZFQSsNS1UMScVERATUESbBJCorfL/K5M759f+5V7KX5Jc/oR487wiG35t0Tl+jCdBQZNjEETY0DmRUCSaiFJOZYkxqAFWcsGlD91edwuPV4P+PUMv17Cn/r6tYP/xPDrAKyOgdXxuOuwOEiNuxlQmxlqM0Mlo5KFna6FIuakIgJqg8fZ0hrQu/4U9P7KH574HcGtQZ66Tup3HY8b0l6qcn3Y6RMYdDAGHYwBmRcLklQLScqxJDEGRPcayFsTjbue4NfT402A38TwmyT8X7538K5+ht8MYM0MrJnH3Uz416lx5wA1x1BzDJVMCilSA6A2MNQGCbUNkpDBuPFpRpOidwZwMww3o8Z98wduo3CxHsvgmveQ40/TD2xKzR7oWVzl4Dhq4Dja2HEAPhmXJOSoFnKUYzli+DmPU+P1oHuG4TdVpPs3vvxvXSzm9YBVz7Dqedj1RLZmeq6DQ54a+Is29hcASxaF9KgNYNsYbJsEm4cgEOvwGsNlacmwlrRDlJpYlBjsTx4+chMFq00Q83oMu4Z+wO6aimLuAL7D8B2Gj5C4svvOQNyaJNnrFiX7Vdc9eo9gMW8CsCYG1sTjxmrGejXuBOAmGG6C4ZJFaansvlnMmyW5AbeuIrkn7jsxT3CbIeZNGLdNP4uLuQB8wfAFwyfb0lDZfddBzJuXovvJ793xU3txMW9S484CbpbhZhkuWZT2yu47A7j1S9H73e+bvd6pXswtwLcYvsXwyba0VXTeMTFfnO7HfvxveHu2lJw3Am4jw21kuNai7rsOcJuWovfnrhv7ZKJ6OU8CfpLhJ4MwtbLzrlLOb3/X295x+dJyXhYeJxd139XJ+VXfmXr3FdXLeQrwUww/FYTJlZ13lXJ+0zf+cN2bl5bzsvA4taj7rk7OHzz608k3Vy/nDYDfwPAbgjC5svOuUs7n33P7u/qXlvOy4LhhUfddnZx/6EN3fK6/ejlvA/w2ht8WhMmVnXeVcn799IPXvmVpOS9z322Luu/q5PzItcfvfEv1cn4a7rs6Ob/q3ydGB5aW89Pw39XJ+fzkRw+a1cv5afjvQM5tje424NsM35bw3/PP735IwncBzGVgLo/b1eS8rnoPTvSuh5zVqyg3UzE8Hpr5/tMybiGPj3G7PGJH/i1LNWWq9+CBnCeUuNoVU9pHn7zpsxQ/LKs4DSWUTu2/6wC1jqHWSahNSAg0e8tA70QYHpfT+1O/ve/DFsu5wDS0g2ClT5Foql/Mg2eAQYYxyEgM6pWcZ/F1jUpol6c9Pnn9PIpULKs4DSWUTu2/mwC1iaE2SajN4IOLcYPe2UXp/dVjj/+ajGkHPH6NTDPVnCLNtIj/rgf8eoZfL+G7Hq926oAnT5wizfT1w798lOImp2K6hVBS05JF/Hcz4DYz3GYJtwN8cDANTRLcRkXv8sTiLx/7zL2ueoFg78HaIfpBmsmpKOeV/Hcd7GUtdDMndVP67+D9QcJLhmmmcro/edXnj1DcRKKeBbAsA8vyuCEoDj2YXsR/kyJ1AG4Hw+2QcNPghMB0LIUs26Jpxae+fN2XEsiNoHDAHjJuDv0sLueV/HdTZf+NZRyEBNM9tSjdD8/f9BGZ0G0EsEYG1sjjbgTd6MGaRfx3PbJutbAJOWkTpP/GUh0SNqZ3SqUVy+k9dOjGH8s4kZDEuAX9LC7nlfx3cyX/jUyLlDdHo7sD+A7DdyT83/3h91ddgRxFpXcHFgtKzSL+263kvxtA7yyxA6vAQrtSTu9//869N7+Z01tZvDpoQeqZ5RxcLxU9JNBLPTgnFW3Atxm+zfCllLdBihwetcOTuXaITxOLD0P/zVd+/Jt/4hcXOZVsbuFBxt8P4y1vqQNn9102bDi3BIQsj5c/ith5gM0z2LwE+4unv/TJfrwRRjl0b2VfYSWRqtBXKBASZ/QVzsDbXNiPwnKCvKKvsIJ68/oKHkmQ38e7RJ212ze9VeEmUV0ClYi8LoE6Ryu6RCM2ieoS2BbqjC6RxSZRXQK7Q63sEjb9OKiidfz/iNaBBAosTCZ2+2KVUamEgsebEqD0lnilLc+TqriM2nfAs9SS9KJZaCqaRTP/z46f2JJDwQQDS5cEF+TOdwu8EUsQHlzYmms55B8wsWQhibqPnSJPsSPXjEqQDhccLqdPPb6piNrzJKgH+grpoiGbnv3DH/6Q2LO7kEJpFIuXwxMTVxtGIcnbjKXlGeDnvCR+LHnRIp6a5ReLAgWmUiQ+B0hpQFh8Y7QbZVcIqT286AjvoRhEmlcMWMUBTERVR5aXpp8MU6hHUWjGKCdRc0CiHEiUKyER/FuO2ChJxLvfrOlTVGot5PDjUaTJVMqRxisqNceplMIycsK/WadUElVlAkqlMQxXZs7lGdBIYx27ohSW6KWDW/WLklLJSpRqDimVUyBSHBWVUioFSnm83VYhzxSbMxTJhsxykrUEJEuDZOkSkr0Y4UeX6JQk6yR9U/TqJD4JLOBqkfRKkzVS9GqJ0yup6NWi08tFKfGAXikMph7ygTdEKTWSlFcf0qse4wpu1S9KermV6NUS0iutQGBP23J6JRW9pCZuyQlZO2kCJVelNlpBiaLwAxGiW31AtxToliqh20tROb5L9Ei6ofyIolsPcY1+zqIZLNONBhLQrT5ON1fRrV6nW6OXiuiWxKBqIS2eK8+AQ9KrDelWyxWTzfKLkm6NlehWH9ItpUC4XrIC3dwY3bDtxitzlka7HkU7pacx4jUGxEuCeMkS4v0t7HuXOEcSTy4XCxX1HGIj/ZxHIQQTkOKsgICNcQLWKgI26gQkaBEBXYwuC/Ehf8BnwMP1siEBeVfC4Fb9oiRgphIBG0MCJhUIbE1ZTkC7RPBsWTOQiRfVxOI1iXLbGSssjWXxtjMuqCPCza1495lRQb9YJuh6rvpKZwJN+J47w/WZfP4EXfAX3eQ0wq+x/Q7ZPs8VowR/lY21ff4y2Y4SVHX0O66+xvaXy3Z8Gd9Av/hKG8vt/BXcjupPo8Jf2W3NoPJGu1wZ3iEXjy+TH2NzD7WeemAlPsaW2OcHUYlrUtuQS3D1Ayc8G9cKVQiuwWWHZ6Pawj+FR7c1YirCUPSApYH5v+T560K4Hhi0mA/PQIG58Azjng3PMNqZ8IwhTAseJwnmlCjd90yEq2XpaLJsWzRqvNEM1ryCmlAbahwUcUNdG+iMC51xS3TmdYSH2yVeK3UGyycFChoopXktZKVTnO/XSqVxEf9IpamNK01WKU2trjQ1KOIXKE0GEl0H0cdEJ6PEOePVhUpTR/zOBLfqF6XS1FRSmtpQaZDIRi+8k1uZ0mRYaRR5ygj5qCoBHjNKjqZXgTEKFKtHKVZPoFhYxELhG28rs6huRRvHhbpVU6ZbdYvoVoPSLbtEt1qVbmVKdKtN6Va2Kt2S36QTxZdLmX6uumXHdCsT061sFbpVE9OtuphuNcR0qzWmW23/JbqVCXQrD93Kl+jWRVhm1iUukLo1V6JbFxTy+LnUz0jdoucD3crEdatG6VZG1606bKUZ6FYWgt/ASYAaeQZEsl5DqFsNmL0Ft+oXpW7VVdKtTKhbeaVb2Yq6la1Gt4QsZpi/gQc/YvLGmNRqsn4YRRSbZzF7HGcoXcClJYuW0h8Ue9JueCnOhkX0wcUGNKgvObjhxX1SxcKGVX1Sw8KGZX1StcIGZEOCUsXckO2T7A8aIFYzZjemaxqKqGTEmqFp8iS3yWqugRbPyiHItkiDpa5o2jvPbbLuq9JcLrekukEdpvZQykdMpc8CS+NpAqoQwLd46gF8D6a6maVDBWXGRVpjWajn0+qLZa77Z1BHZiTndiDnzpYcxcIlct6PTFCXuFzK+QLL+bQbyPnlsiTnIAqIsKDje1H2F9i8MRD0LAS9jhpNiJ8u6A2eEwl6DaSwFRuW4m16jRLBGq81FPRWJACDW/WLUtAbaFgk6KYSdJMF3Q4F3aFL6AUAskrQTdWR6dUEgr7g+iYE3dQF/ZirBH2aP3Zuyr/TkifYEdgsm8PTE9OurHg4woU8KeqzlDgLz5QbtKoeMK3k7vAMq42qkxC7eyq4myZVceDqQejRkL0IrEFbPU1TiwgW23y7HNZEcDfF0RVh4frCYrDmg6cpoIhgOZB6pxzWmKPuznuZirAQ0M7xx5wVoc0GzzueHUHDrhZcbC2Cx7XFmB1hy53cMq21SM0eCr/1CqCMuFIhhy3pM3E8ZXWLW9XxoE1UAweOSnOhdSDkB173C+nEJOX0q/P07DSuHuerRCT96pjTLR4V0lV6af3KrNNtzeHKSbqS0q+MuN3iGSHjE3bskX1lWzJjRhSeMXNJ5cJVokluwS1khcCICDB+8OmwQUPKt+c/hmK/AjmE/G/B9uFEX3H045OG+m5S4Euc4pjeMEoN43rDGDVM6A3j1DCpN0xQw1Ss0+BkKKFiDMEfNQvlye38l7ENhkTxJ6ZC8G1CGjB5MBcczAQHU8FBj/rtlL+dYhkpci4IKLJbcrVeAl+O1cIeyDq9a3TCTXAT79AceIxxbuLdnAOHMWbJrxDQpPzFKDfx7tCBuwisB5pU2MbMWKnsB3+5LcHik+3K/mFZJf+gRYHTbuCjYdm/aQUOMMsmXxtgQkKaLx/gXPkAZ8sHOFM+QLZ1FUY3FYwu8XyNLoPRyQ01YuyT+2nERie3Z4+NbsQuG92wXTa6wCBXGCCb5OeVfWmOTO0y9s2WD3CmfIDT5QOcKh8gu48Ko5uwn2/2pTC6UaeMfSNO2eiGnbLRDTlloxt0yka3sDj75p939iV50u6UsW+6fIBT5QOcLB/gRPkA2SNXGB175eeVfRxco3hJCfuG3LLRDbplo1soH918+ejmnEXZN+s83+xzefbglrFvsnyAE+UDHHfLBjjmlg1w1K3MPoQrzy/7HI6F1e7iPUGdBKF2Mlyjj27SjAbcEaUWggEvi/ILwYCXR0mGYMArokxDwNGV2pg9lW8YCqdPPJMKpMUMB4rpVyAdZjRzosOVylYILQfieTz7UhTA9D6cwHpBAIRKM6hhNXN7WMMKn2bfrte3WohdG/p4WKJQFn+0iwN9OC4m9vgmZg0O74IVzo3kVBxbKIDaAzRrwWvIYiKccBnx24IjER5Z4ZEdHjnhkRseJcIjhNrYmctgN4lAksPFfp/G83f8XpI/ZjYIZ96zGVQa6CsmUKfIKF6+h1E3MecyZJdGiJgRImaEiBkhYkaImBEiZkSIyVmAKRFj6gFIBUKBqGpDM+DNleNpwirr4vDe1EjTGHKydikmvwbX/+I6UQEj5HZk+FmSEQbQMJ8nRpgaI9RX5xchDSk5ofa0CzlhhZywwAnes8UzOW/5x8PMKecEgCzJiYvkhPqCIJ5+bcCD8/+EeHA+EH4dCHpOzv5T48DrJAdeG3DgnIAD5/0JceA8IPy3f6Ic+FvJgXMCDvQEHDjrT4gDjPBL/0Q58FLJgZ6AA50BB9b8CXFgDRB+seSA+afGgRdLDnQGHFgmz1u1PAsnX5Lw2AIeGzWRBWphrTJq5csZbMRZ/OBnJ43i6uLRz6oSNh84W6wdSPIqK5u3sYk2pvF475gEp4ni6zfsYO1VfK2VjZ24cJWLjVIIIfdEPFuiZvPbdn5iSzaoEO2bWn3MWS6e3CVGVEm/YS4bL+vE2n35D3DpcN7wwYwKs9mqek9Umk3Wxox22VQ1h+e1lhFA9ixtXyouDDZrSaCd4rBdSCAkkysFJrB5G6awzrl+UhVZGrGpJVFwZFzqOVyXBqXASJ7jm7fZHj9jylJj9JxQe2Whx6iEqsGFjWT1H1kYjMcaLw2GHQNF2MTFwbDDYFROiMuD0YDDcu+qQBiPOCpqiAWfp0V5NyzvI2L0dmK0tmN0XpzCqJskNzohQhtVENr4IxI6ERE6ERL6RUEh34DMYUNA5LAhIHHYEBBYNmCyjjqxOSsT7S6Y7HMCdZHbr9mZQlIMhHXhUXo7WHcoq5Hy3m2oJq3tE2XLoqR2rChpCmVFU2qjCi/JJUotJlVQlFSWIt1IPEzx0QatKKnapWKjt0EWJXXkptCsr4kQHdRZ3eIluBoYilFiGgEOJBQHrvC7b/Hb8hd5cism4fExXm5iw0TsmAS2cpEvtW0S5Pg5qH4i3BLtP6P67hKqD/q55RKZ0iUyubREogAzP+MuIZFBfewJbSyyPva41iILlY1pLZNWXBQtuVN8JItybJD1cd4bl1e1hvt/BTtZxsUyILXOHmYHZ2zpX7hvkiwyFpkjWYQsQjkoVDamtXAts1GtoSeOcGgF1wRWMNoXUNnAaa2hVVVwi9u/Sa2BlXPCivU/bkFP05ki0QDvck3e0l7tElBRNvkFr9dNwoFJtSJITD7xbj/0T38MIf0f//Q//ul58U8pVW4x3B9gPzZLk6hzgdMQd+ZbYaMWEnI5SjvYg0PtWGbDb6km1a/g/bF38wJt6eLScpuOtNqcHLtR2qj9sh8btNGcCBsR5g/yugrLSxdIG7NclnwYgTXfmL/HaefKmLYs1j1sF7Q9Cm4N3xMHexQcsaOKtHKPghujFmSCDxONZy3U6kf5XWxXtMxTNuBWubiLxIFP75S1LC1VSZnb7jaV1sqay9x2v6l0228KC846XeII1pih5C1+3S6Bqu9YFD5lemksKyF/z9vC4D1r4S8kA7Aj9e5Cu+QcI0hSUOhU50l1/iJ13qzO/9Lj4pZYQIhX+IWUur5cXf8rjwu4Fl7scUFYLIYCF9noE+sKK9QmuIHvDnbCudzxwLw+rE2xpRQIEpo0iW0hzZEJ60QOG1CyppyTeVUO69SIiNO8Q3qDFENsEbU6WMUmRRVL9M4Mm1pV1VD/f4V6mekSz4BiNV1iHr+1XeJGISk5IrwXEx5uWPJ9AXX5GxCwuDwPMeSG7EEJZEI1F5RQlSp9DmuhZ0vxRcZb7QyIrcGjGv2wSC1eUP3W3yDFahDf/nl6ldwmT6+i2+jpVXaznl6Fl+3NPPZutbysqjq/4ZZgu2HC7LglST1nMYrUuPE8GAtZRp53LBebjcIGnjquQdTlqDWRXd4Gb2P+Flg7j+V4jb/BwxJNukgXvoqgkEfQhYveWwobPOxd7gtVlx6GPeO16E4M24TrLsyv8Zp0B+bXelHpcRjzem3j71LXBQlbXm5RW3WL6oKHyp6KcnsqvL+im/iJ5SX21NDsqZGhOe/wkzTnbSsu/DzaLA17nbfyosyAldhPaCXXPvW7wnjL97igq98Txlt+gRdG+5vCeMv3PZRi91+ixVv+/0bE5cmNu87wFAisZV3lqd6xgPXPPNUxVq3+ucd9pjzV0f/mxTMrCsJL8bJa7Bko1dKO1FIZcNZOPpwScoskvjwmpKU8ImjiLve3IMrXScovCE3WjgnZOCNARLW3RWTpoS2u1Bbsie6lz8VHHkgR4GS3n8e0RHj5V/IiLgim3O0g77Uz63xnN/Yy8tw+Fl5CQshdR7AiKC81ipfP+l2vYW4nta3zIJrU4Qavi6coQdBGnMYEhQ12y6nCNVEpXMOSVy+S8Ui6I7mOJHopWW4ul+X8acnyX9JN/ETzErLsLZM3TJka846oiGLMlLaMuGOz0AQOFrYhvVuJh62Lh62Jh50na2qG5l1jva0ZyjQ2R6zjzrV+F/R+Z1S/x4J+f2oqEYoiqQsiUgUbzJyjKLVEHPUXdFtGi6POWSSMWo2qrIGxPZNOwj29/xeqtEZmWFYxnmYcjwp88QM6BZpTkNuKiEJNpDTnspDz5o88TCTd2H9jmZJuVLBGSTcpWKCkGxRUoNbNCfYDr2hMBi2vRZqRDmlAmqTpaJRGI6sZjVl8VHNGiETOWxVK9p+Fkv3noWSndMnGUvRhzG0FuSQH7ijiKksyy3xkbYZszdqQn3Kl31LWRrJd6UiyCh1ZgvMvCrQkuUQE3Rout18ZVrP2wtLchfDTFmm5S+bJalwam7cE/pizrSnPVw/9uVdQR3/meepolbdSHZ3hteqdj8vFkBywkrXPawyysFzRXxOyycLafn9tyCwLq/v9dSHL6vR+pyXLEgX4iipYRv7D1fyHq/xHOcMS5Qxbf5oM66Tb+JnEEgzLhwxbEzJsbciwdSHD6soZNi2kYaQO83c5dJAmg6MORPyAPQey4F47XEo7zUl4R1aeeqA9fzuqvB8/wVXeZ54Myr6rhqmwIein+G+ILGqKE09GkYXMUvEuqiVJgEmzNAkwYZYmAcbN0iTAsph+miVZqgrz0uecpVpqXirNmxxhtC/zaJCn0veMDTJV2sYzw0Guyg/Fl81dydQ/YOugJV1GkrBvK7pv8u1wvukL6UASNLW1X+E3d0SbVZ5eSjEV5mmcWM4gG8sZ1FWZM5BMyVZmSp3OlOzSTEnRbXXVMeUFSB3qW6AQBslgu6ROcVGBTcZZwUTTdxBuGXKuTX+PGtH+iUe45ZjWciu3PKq13Mktx41ov5Zkl4ziUjKKwwT9bltOpydsrxkBJ82OpZwTURPBTC6QAOyaHnA+mtlFe6czn0o+YWBWsrFvK74MrzQp2h0IsgjsHaKNFuesKJFy3OJ3epiVbdxseN1v2fyygzS3YqAFwa/0VPoDO8khxWXtQd71tkI38un8yqx4km6w5PtHnpSZ3kZ+30Wzuu6hQ5zhKl6KZprlXS2vbIyuXCAfqHDlfFSb4CsidgVNhY0Ev5+4J/eGRakdaTptuVsDAnDgQzeLElQ4Nu+SfWjvLCNDOGSXGsLnIxv6whvDF0DvVNJ10OJEaRBFhJnxsdLM+GhpZnykNDM+XJoZH9IaekpS5TJZryfTZT5fz7fLnL+ekpcbj0RZe5dthxtsn5QJdq4Zie16k2N7vx+WhYadwLf7HOQjv7zZfDWnJU/xLi1MvVfx0qJT23Hlj5i11vLj/5PAfl4T2Eu9WA2EwVlSGOTOwlHgIneU1TV4oUyD58s0eG4xDZ61wpUT+ISQEI6/VyXUM0S+Et8iSn2LUL5FfjrHmcAETx+QDjRhgc0g62IRNdl18Nao1Kwygt0w85wRBG55sv4YNDVxLnAjsO7mlbxvITNelgt0XzAzXu1LrVNmUxYV1KUzgxVfcpUZizJTUWYoysxE2LCmz9uY/7YV7Cs+9pS+9HniqWiX8Ukbuxo9+f+JxgGB9Tmj7m7fWYXFVknkXaz8l02Z375bVKqMJF/a0B3YbQortQKxctQWuQLN+Gip9MWwVfJi2JJqRRDvsYoUu8hvV0sX/+AbMHwly8vByNJNCondvOBtgZNE9GcEeho2UfHm5Zydx7cmhAUu8PZUZn4jEaZigacaYQi1a/3JTwVUcnhK4mBGXUiHPeFbPFmuIJvfyOvSxrEDBrClW6YtP+WlwoVK8yQ7gpdm8RcQjubLHOxSSX+ntJYZbpnUWqa5ZUJrwQcm0cyCFG2MRHzS4UXq+FIomKYwfcZsSa8puhOeYRLUgjo5+Col/6QpEfOTUZcBWnYZWnYZWnYMLezupAmwRE4B7RT3O4UMT/wtnM05vlsQ7Lh9fmeSke1TTkFwNYAtnqW27SINtGKuAgkkfkbe7yI9QdNsXlZOPUauwpEGGCMM8RzkllmtZYGZPKO1zHPLtNYyxy1TTmxskw4bYSZlEZQkl5v/pYkihBSTpHg+w0Jxq8zt0NGkgw3j8MwM94gNTTMRVa2+gB8RXS2Frx9xaDLA2LfCtokA5/ClOQtmwJlSvMcspSCBYNPfedEBhUAFCdTzkcI9gu99lXBPOJpwZ6RgY8PiiZAuUMtxJ7LAJGzhGerdjIZniXC3N8Zp2IkLcea0hDgZVcCIia4VE1s3JrLPUVjTz0FY039KwnrYiQsrKDpsK2ENYbwwuEr7C0z/DjZ3UvjWbZt7Dvhtm72hW3Ku14Y3msY5dMQWuUDBHBa38XuipKrFIzJSika5pEaXuJFfFXGwzICVoEE4bWLG/Y68POnwRupWcc1FgaBdThLhrDZmLF9wtQaLV7EGm8yT6oxGW8wLE06XFyoXBWofsMSyy2StZE/hhk5z3FIL89hakHyw21zgT6xGZK0cETrOBVO5WLP4DB+Sm8Xm8oylVDqbeSuhlOSaNXsUGaFyE1RugMrNT7nxKTc95YZHMA6jNjvIMUmMETt/rUkkTchLhLP5CokrhVcomKHoHlJbYIXinBHS2zKwvjFnEs0THP0gDs4x8ROViS9KiS8C4iNmcTE9dRE26EELWmXQ4mJPKVDeiiif+O9O+ZhGvVpGcDD7hJw8fCaqbSYq1zbj2YLN9g+Kw6aYfuecUPostbBhAoaDt1UvHnPCvaeL89zyqNaywC3Hw1oL6Oqouj5rK2uclgZJMmnOKaTwe8JhPKb4Uek7JMBrrVKAh61SgDdaOsBDVgQQVRww1jRsgpQNFGM5YqmA1cGbOn4JPchNGZrC6EEfIjRXeq+jDk8AZ3lb4Vg4eMJRH7zKyDAlD49xXDUXbkzMlJKDCFuOc0tUucLBYh82WwiM/5QDwexz8K3Z6nzrhFOqXeNOqXaNOaXaNeqUateIs4h2DTuab6XAqty3pnW/KotOzfz/7L19kF1Hdh92v9/3zJtPDDD46HsBEAMQJIckOBiCIIk35OCDIAhwl2utZf+xjtZl6mFtLzg0SVkQOevFricWy55IVIJNsVJjCSWgJKICO5SEcugIW8WkIJuxkZiSoGg3RuTdCHIoF2xzFcRhljm/c7r79r3vDYjlUqu1LKI47/a5fbtPnz59+nT36XPMvJrVc4qamdUeb3AfCK5ZK5cFkVECB3JpEBklsJ23MzJK4FCPRED05Qt6ehEr1XPaMRvf+f1CN52QOZqXziKaE3igJOZiawyi8ge/mq+XLjF1eLkuspuKmf1CNxts/2Wkew8+Y3vwyUpG1si1Qt7lGlE5EWAONapyArAhnMobD2O5cWUaXlE9zWWVgnfqIQbbT9F8g6kFXvCKM0u4ysySyMySmJklafDJqF1pUvtqcvoZ84F1TdrHx6M13ofhPU89qVTtToxMKrC605NKNZ9UkpydPoKCOe1yquX0yil1ezQapAlZk4aqQe9r8NOYi5cjMAzsZXw+RHPUIA45X1KDqqIGVXnvNW/HUYO/ANkUjckk4bpPizvcmqWTNv/EadD7nvgBxPn1Ob7SJL0A50CDqpbTr3rb9BvG1ajhT5CMzlxL42ECt7KaYaPzs7/EB77v/ao58MX+2jd+1d2peedX82vpWiGaNwaHK1FTxMhpufM0+wU+PUnav4vRONtl4EHZYpOP08B8KdtUvd/avZmCU7mkE9k42OWStU6FSqWJvxtQB9dE8UmbouukLWerhTU4ZgrPD7VILkxRLEHLU9RyfBtT1IW4PEWdi8tT1ErcO0WdLorx5Thbq6uFII+eIw1g7Vlp1OqT1kB50jJTVtA7ZQU8ZQ30m7I8Z8pikwPKcI5FCDtIYW4ilDK95StUg5+UQJw35KpNIK4bcu0nEMcNesHFgKoFEDFF72nyQgl11ctV1MtV1MtV1MtV1N0q6rqKBuKB0IzY1DOiOHKqmdnw9R7l50yP8vOGUX4s5E2GLMY55C2GLDkKZU24y6hir7EecqWfLHgjMrM0DxE9+HhB+fEHiymOH17HYFYB1rFn9aemyqJ0alWtcGpWG51Xf43ExlBnhX7aX4vN2C4top6GusMi5C0rUGhd1XnVTtKBtkYxYugNK4Y04PVcLtGEF2kRdCkwu6qkLyh3yydmb27FQbgSlAfh6aA8CJcZ0jMEd4dLgaiwZsl2WibXi7GzXj4d5+vl12JZL8fsIDKGeZO7XmawXd+9HRQWy6Ks+O0dtmGnk3LDlpNyw5aScsMWk3LDbhYbdoMbpmVHL9u9bTddPoIrLxa+dndsqJ/WwNmnp9d0vFUuy5fyJ3qBo78yvctvLPFKdbwdaC0N/llixyQ9ZuctsTZd1xKBISsO5CZDzjmQRWGaoEClJXEla/rmqvZgg537wmlDUjptSPRpg2YDYRgmtOWB2OEBeMzRxw1CX8paMtKwfdIZlNIXAzdLi9el7HKVhggmGR/HT7Fjjx/DSAshOByr/Bi7q1koJMq1dvgvF0LmWrsvU9Q1v0Cgqz5p7b5GuQp8qv3YiBUodg6+VlNbuxMWR0AxQmiE9kg45pN3nRNH7jqTe/8uhtaaBfZutKzpCJtZubfjsce/ojfT0AmIUTEBMWLjzZRXrJV8xSpdPsvuTGWtX5FJkiQtnwkhBEXKajiJXePPFF5GU6iYpEkI2A2OkbC8Nq7466QMImSk420fYStUIi+Tsit+eQl/pljfB/BnGmh/psHxlC+Ziz/TBMExAglhQCTCPF7wZyohDCLsVHoqamGjC/eP2CAQTlhxM8mfb0XsEliFx3HcpYiMGf62Ir7shGPSA62YT12xL9n+9Rh8Xe22vxkI3b4Z5H4H2GMC3A+I4kiUAJENQcRTPtTdhE8sRaMTjwlM5aCYzTwF9im0T5F9iu1TYp8q9qnKNxcPaNXREzUPHCs3tLAQYy0ogc+EEB3K6pD4TEjgM6HKNkIVNsP45DCriiMCjVkoihiRoJdSoGoW6qgzPseS6WinyM2uiuSpqp+4aTIoL1nZ/jnXJkUP2b3m5XTBYIXHQFObwrHxTAwfxHobyRNhc8ERGDc9ETYXHdiiFjaXHNiSj7hIsWNBGuNIk4XNFQtj65xY+1DeHTjj/VlqfDJjPTPLmXNF5+JT7cgmlPbfFejT7MAmYD5gE1Vu3LO7hWxFOniGDuCalaTob4LHDj8ExiwX3XQJKtK3wz7+KL69JxjSUX9olEVbPF5tij5XkQ1PNkxeLaBDvpgBU/IilwQALj/fztcqFmsWFsxjc/6X2XHo2FkuJIAB5FG944rPKo3y0XlcOjqPrUVKhGt5xjwpws8F2C5Ao/H1bXq2SImMeVI2jl6O0EMR7v7obo/QSxEUJgtoA3DJAVQ5KhtuGBkQevxCwGvisxlu9/h2E8SLFTZJjkCIMTok3kjZinjfOnLswyLet46wo2oh5xhy06l7hSE3HMhphlwvInMtYMpGuCxSntgJ+KboMvQ01eetqFpMqUgfvBeodSEsUetcWKLWSuhSS5B00VsOhVapbxzWvf13v+6s/m+8qlNOVy5zOy/AiS6yvUsfdLZ0buI7MLY+gGIG4i6Cb3FVOdoKjJfxCuw/fXQFblVxJCrcxUIeNHcO2xj+8fZv+lyWvbtO5Y3NvXIyG1fjL2fjc/5JSr588mXFaeJhehxTYx/9iId0zFyDZ8IaCypuJLrL3Kt6Exj6PQ031+CF2RvWsIoZuNQxl4Nyz1wKyl2DO3LV/r2DmsEnaZ3vliSGlTDkrOFnXeAXAzFui8UlhsejTe6i2Y1qXIGuyd2SWH+DMBgQBzH7LDIb1RGULh5fV014F817pJcxtldMCIo1uqUe/HFzi9luPpsQOGl4g9JsiUyxVsCzuGspbR+w+qAewXAJOU0vcR/EV1xvoriahuJSa6IkNkVBHNARLTrcVbCO7lSeF9JEsnTKxy2lqvmYhftsm8JyadCm4DWy5XbH9O5wkReEzMeJYXEx24ESZtkHvxdxugivJckLMIJ+DkIxZq8mvOAQdkraN330wqIYbaFOlO1hB5zApwLlmemFstPIiGlYSAIiWVgj81lCTFHTs3jS7Oca3ERwx5Ns7uwCZKM36rzFoEiDGlCcWZXXYvpckEufnIRFHj/dw+PLPTy+FKwifxZxY4dHYUOqK8nhlaAsh0/3yOHlohxm9lwqSuJFK4lfC93BdDHMB9OgM5hOh7c3mAadwUTfrDaYsOyUVvoW0xu+JmSW8+d1X5PSGs9EvNDllmY55171NTmt0Y4l6BV4/aoxQ4EnhLOuCWfVMcnUjULDnW+2ivSsCNWLZ0a/MCvGhRkxKcyG1cJM2Pg+ZsGbfp/X7/oav1mRRw4PQTcsshnWj0VWvOKV2fWq1zOhGtpNE+mgOtgTAZ66Iq68PHtFMnvNYtnNsxfb60538wkMhzT2DtV73+Fds8U/upRPlO7k9mcT0kdNSEu8OxHpqD9mOlr0y5rjTa+sOt7wyrrjdW9V5fFzPTyQiXICg2y4S2ImEJUFOgzvHXhuX2O8ed2yIrOYiCUQOjuaa+8OXvOlM5d9IxpKvY4ziItEb5xB9Pa46Wz/T2VnX+ZtLN3GHHtfdIwrgSs0sW01qDWPXGxe4LB1onjULBTuT4zeUS13/QpqXGGGusYsM43z4zFVaf9F1XB2nOpWDhp9oWZP6KpFrQFXGYWMp32gTvOPv58nZ5jv1tvf0e/SOktA4oU6DL3QdrOW4Qnb4Arf1/YyM3xj20se8J1tRz7rBPnUgBCiM1TLx2I0t+UueyUF1qoV2OqHj6FuOgyV63yIsxZrhmrm0kFLGjCU7U124FLVDDVgofD0UtMM1Sgz1BVfz6hRkZnqlqRN22Ut25MDtrcbtqu5yCsuM8VlZopzZooNM8V9manhMtOAy0wtl5maLjNZmqlYMxPO0eGB72PLriGHCi5jtQqMNdBHXrVXZa9qhvCv0GyZzwZDHIn28NkweGbw9vmsTh8Oy/HqR/EZIvDF9hye9VfipZy3TiP6ZS4joLtmwyrnJ9JbsxF7om85adF0+yitKeBalpfPspbgywY1HFB8AcHcHT4bstzVtNzVskJrwF4zb6uRsrL8PfEZnxr047T2x+C0oQKnZT4LrmqnzWYLNM0umnvsNAOPdpb+3teNhQJ2HtiAEJu89ng0tiaTZrMqKWxWVW9js+ocd2LVUTtkFeSqHbIKctUOWQW5asdSsKrasRh8bL0DWzWn/16+VUNM4Sgff6ZclMaol/Motol53ZlHkvTKW5FeeSvSK29Fej1bkXpztiFX4no6lDqxYTrU1x3qmw7FNrvbffZqHeyb3O0147W02lDVSHyZ6iMEPvvK4kkJvc3RECb5ulxM4winLEfgfE7MYwnhdLxzkn1T0+v9HYzCk/sn2b+1kTD81wgVSfFNUA25zXwNLVFqanxu79LZLAEa9luerxKWYXkJvPmkB2DN5UVW+FYKszbP1lrCDrg8mQ1pOdsu8OWwkbYaOiIdOWJlIjrafjPAjGALbjKj2Nprwkq1flJUeQwlCV6zQrjpCOGWrXDIYmIEs8Or43PRV9Nx3qshntp7COYcQVbVx0CmA6C32m6BfylfebiMGfCNw4qwJMx9YnvhEI4FfNnD4rMvdoArF5qt51szxBJ94zBLrL/cls+mgfn48mGvbDbIaHibwvlQ3BxyVHOr7rSmqtrPQsQmdVWxZa6w9y2caR7GlXXc/KwYN8DaKXAdKcgPjTVQqfPqkCig3QCPP0NL9QoyVow34DE1Lm6AfSEEzgh8mRsCPifAOOGbtyHfvDUnIVU5QFFVuJD5wZO1Krii6KrGV6wU+fal0DWxNorGw7Kc+VRwmUQISg+HNSIw+xLKQKCmce5XWUtaSKWqJigOly1BNSW17zJLUJk9vR/42UrJUiXfVWqUjEhYrJmzFS8/BPHcYxZnHrgQluYB1xtB6ZDFKx+yCItA3GMn+KKdonE8es6kmIMSQRQciEPHLBQOSmw3f/TcFwoHYZ5JccVXJj7PVU7hC6188sv7zGYDbtlPPS2kZU9q+gs8MXj2LkaRkI6pGV/Fx9xxTOIemOIaoj5m/rzyz89NG1Mzz1S55PfB6PPm7Wf7vNyVH5r1vjSHZpdCXCv+f+/001dwSD7l7czW4meK1g70M0rSfxgPu7J1JHj5cT3p1vSzJZvEj6LVOj9MZONqVK1V40hEpJtTr7azjV38VrNNnfqLNPejp7MNC8jiZWuQ9DKFn2YWqQ1q08JCt9tpvKg20sS10O0MvKjgIQjfQtmc8to0vjYgWeVkNZugDLSKHlxQQ5R/8EU4vQxVwDU0s/WUJOV+EF9QlpCyNF+kgZohc/yiGsQxOhdfW1CDarjL7n0kc4WyVF/ElXlkrnDmAO9okE2SOKCnShdeAWHdMbRAdXY7tRdJmNKUGy7QHFbHvWwunN6iNdQumJ3QU+tFROnFxX+pmqY0ZB7UmSvS9FAyD3JmRquBILTrgCU1bzobxEeCiTQu4fprfKUHNFsQzCv68yaMXaa8vdkQcKan2cxHiQ35usatrcC7juAlFGig3a8snODKTnQ7X/v3//m7MZdby9FqAi2uFKY3Y12NFmww5Msw/5KwbDplOm+qOa40d6m2LrJJ2I502Vla7zdEy6R/aQ3Gvd83NcagYkm6vivdDtyb3BeCQkW+DYvt7k+PwZweTRzD6UJaVOTgarhXVsW9uSruVE9L414D3Sc07g16boGFDcn64F5bBfcG0yOULmuotbYrfYKr2mq4N/rj3tKUeGUha/ZpF0ILa8qPCerwdQE7KT3OCTV0fYJuof54jofW3//t3/+jxI4hLO4XnmOu1S9aL/LAZ3AjBycvdjUXPmfGhH0nLZBefk5jkr8d4NHQYGJ21YSMiaRLSqcZ+6Ee4uhdwaeSf16T8asa/CJxEWUe16g28xeDTJrVkB3gLloN2WoB2bUW2XUOsuNAdk1fZFurIZushmzci2wtf9tkZBurICuSo6l7O5elPFCaGolKoa4QTQ8MR49INpRqQDVisW/8P//m5kuGRUh7yEFNLkF/U7EsC0ZvCK0sHzfzrwZe5DbkgEGmcqJZdlA19SB0yHoCfFtzywAyTTOCKmCZRPDoV+WgEeA5SKSyRtPiPsZDo1BMI/+mqttbKRdjcB8SFBj39aDm6rg3ctxHkWHVSuNe3BOutFnAne0ha6uTQHAv0D3JcW911Rrd9bKAM31QgSBMckk1vlqPxFqChAX2qDGXqxZ4jzjvn/2Hf/5P/qbIy4qdTYvvRA7X+Mq55kTnbbyK9Bh0BuQo8JxkPGWk5J83zIBk01TnhR2Q1PDCi6oZkH2RbRnp0RfZZgHZukV2vYPsiO65PsjGqyHbXA3ZVhHZWvHtgJEefZFt5NIjU+zBCQroGmKFNST41pN8HqKnQfo7oZTaRDouxMmGhS7NjZ3/87/6O18RPWOj1uYSqI/UCTHGcIQ+2Uj4bsCSErUq335UY2UUQdurGqP8RcwbW7b9+kWDdc0qnwdRVVHxrVZc+MIblOPi20GuzfD8uBBqABK9qvXfGEIgggxLenESTZgwUgPFFzHjBGRbxRcklQdWR7bC3L4astUCsustsm0H2REgW++LbGM1ZAdWQ3agiGxQfNtkZBODbOlbkSYD3EggyyjGWmbwXgJkRqwGSECc+flf+z3pYW59ZN61QPYBlRhasMiJ8w+gjSQqygHSHy35oipfwK8Fi9TAEJyBrfyrChdTzQFNJvSAxrhNZJFJNIL6nSgrTx3cq0zDlmlXFSqixrxflTJPFBrTkN4VNKtGiuNamtRvi0lczKW91QLIwX1MUAg0V7T64i6LtSTHfRC436rSMu4JV9oq4B5hvAerk0D6KnBxb+UMPgAVkItLSaQIMnxtdQjFTDAjGDZJCkSsMo+zOEqJHf/9/3fp/0oc6cEvBvIX1JqUeZxfyKDM3w7yCNBDSQ/K/G2jMCAn7YActwMSkX9F3iVau6vmn1fNgCzjlJgByS9ahRcDqyM7YKRHX2SbBWTbFtkJR3oM5tKjjGxrNWTj1ZAduCWyrVsi2yogG9tl7wBkESSyiBODqNudqDIpAmPBnUcCcfa4/jyB8USXD3g1e4IX/+APf+VfVEzP182bev4mZsyjPm9EO4g1OVnni2R1SuMAorkuKMRWMuXfNl60tcVumbJAigTfFti/LoQIIByrqh8ewgj9cBfOWuWbgRz3hFlBsE1wNKurTfrinqyCe43pYUmwzuKeYAT3x120pH6411bFvengDgr5Uk8ddbRU27ZkAAOx3rcJ0qm+EbtxgRHqFiG/1N3oGqksXsDWEor3kfQXVLRgpoW67IPBMEjTd0RQYnWvjY9GZPOqyZzq08ATxWNQCm8vKF+2jkakNMrXxsk8vx3D1tawW/XIghmXbdnkoqqHNUlGuGJ0gA9ytFH1sOxqjaHq+gI20CF0207VVa56WHbV2vA4weWNoOp1yGyqHpWi6lJ17FY9E1Sx+wkVsK1Gdf5h2XujwhkyQbpkDdXTMlL04vEeDZzU4DX0ptvl+zakRYbo9DVmtTrWozePd7GJN4LxmLdqVNqi0evypR1CbhJ0HBW8GtxUn+ihINTXoT/WqKy8VgAibQUnCBu7EChtjMxhNSGUa6DsZuM7dwePvBLhjs2F5HgW6Jivq/wTl41ytdj4YpxvwS3JRTHwbhtjzWi+NSDeF9Md4s8xhTLO1psBe88N5aidXQrcpKWAsd48E+N60EywgmAv8EkW4B4y/Alg15pS4g7AuNIL+CZi4LjVDNh7TAAHJRZygSFLDuRcLEpN7rg0wIWnm4jMEONA+EysQz+GSF2Os5ij0JgYJQQ7F7Mf6VD7yg1zX7lhjx9p5xuaHRA4R98ucg+vgs41vu6f+6sJ2OcMt9FCrjDEceLH/mYC50Z3wN5mAudGN7dtJd4dXow0VTHRXoy6bU1fYm+Gt3ew/wGg4hQHvcbxxgMfBvTnhlu8dcSDG3ofyPXd+1GmPCp6fFce7wQdrsSIM6XvixZu5jPpTSjjlajP6w/EAYhhQMrhH2nF4lPO8F8C/ktum9+SfvyW/MD4DadC7f/EmW66zHSzZabbd3xVppvKme6BnOnSnOl2aqab+USZjv3+sXPZEAbzUzqSKh/Zz+pbhbMmJEBnl/jASVZhSKZQwgaj2iGbdE1Y6haX86RbXM6TbnE5T7qlD99djBwhXtFdwh0kjWr/KnPhSpzthr8BZhWv3OnXvTJjcNDfIvMw5F3r4SNw2OSznDIO5A46Ln79AD7vO0Ng1KbYb71/wfWSceof5F4ytMOATA+iu0BOr2u7x5i56d5J9J1PY+0WibWbitgsbhZmcVfLrgRnu8aV4K7clWDJLzHpei+T5nV+7pz/craPvV56at9ZuTPtqaTld2jo2rvk2tY9nG/FOi79JV8mv7fwG84EF2Fgx9KNnXsmhtvEkDCdFfdUKXbH34i7aVMIy07FiSLpg/gNu+ndYAB9fxzvq/o9xuM36Hc0tLcsCBlwrSM4N99KcIb9BGeYC84xjj5lBWc2LgycrXGFJ2lXzMTWjJhZLNsijGytiUSIbhVmzgZ7xaju/AabyvVI0LorQRsfLUHblK3uStDqrSRoNmRjxfFAzepq3B2m2VobAooHabbOxuLiIZpN2ohcvXKztqrcnCSF1bruWUcJ69hnLSUm8hE3ymCUSLIsTvfg92acDuP3apzeg99343Ray8mHvk85GbCh2R02kl7A5mjb1LqcRpSeUmtzkbCdsNsdXgrM7Lfim5CDlFiE+3b6PQnnrMyKzHbimECIAl+WVnS2VBOGaOt5DKOCAQKQ0ryByJDt06KLMNhLYFqObNRECzj61sNK50Bwru3i9zFQTXGLFAhl0hHNF/dqrrtPZGX6CH7fidNHnXbEbjti2w5YIadozjlejubDbJE1hUTaFOfTAXzrRJaCyyyuV5Jc0C6JauJAxOXUsgMRn1O5Txym/GKyO7wRaeEfsI+omhb/FyNx+BSwZ65AO3zKOvh2jI3xsjm2vGPj9+wxPE+otXhmKg460RRN77eEwGsU596s5vTw5h32jsUK/MAzI3wFhk7L4YY4lytwdJfLk6thbjYdsJtWIz/uVj0y41IosYzFFZ5xg+f5QUMNOf3BAzGYoe4m8ReJqNGk0iJvzJoljttLAEIFPG2xLd+ajwhpIYhExe07m7Y0I9W14zIZgBHsdO29SyOK6uyjWISXcEhBeIXqQXPrsiL8BqGnI/jwlljuuOxuyXA9dEbb26EAL4cSz7nfcItNBCVhTVio5aMIFmwbbAoWbuvtQJdxtGJ0i5b4MtJt14MrEpxht639XJ35ByYsw8et61zcSAf04BzC0AgQxTdwbNUCtnRdL2Xmw4xgG6RkUy5b2m60gRMDHbN1Wz6psbCbcoXbCrHbTV+eLwUc/y/gOzRTarstF7dntquHc2bmS1t7XZa5JjdmpMt65e/bIn+T1PSTSKBQ7DdFAjE5TnKcPzjDQGhM+lMM+FCbCjCH1nS0h3/m5wWVajypBT6uhOVT4GlK5RMgbkTk098Spczkl/ROey+h1Eu4U0G/b/GdigDX11Tcfj+Qd7D+hGyCegTHpyQdprHrEqqHJMpL0PHVPWpYDcO/0eQeb5pe7ZkJdtLP8EwwhbPHKe9rwYx3r1iG3iOfNdnryUogAchwHAjkOLG+K/3NiS1dtW3KRBjfBTnwOimAnjfjeeI2dEBe7e3C2y9su1szgdbWxOMMBzZTQ/JISjRjPMBXoARjwN8Wl043fan1HU8LOk69S6n1NvUNSm2wKP0BPpzy/q0vCL3HCji8jxsUcf3zXsn7Pj3eJ0g+MhN8UTyCMjr3qhE14qDzOvXBo/IRundEHj8QJK9oJP++z1X/hq76DJKdd5yqT/nagwBnf5VS223qNUo5owZdzfeoSC9uZDU1e6AF53pYFjBZR9g/4YgJJ3WfdgwK4LABTht15aJmfOIsj80yiXHYQVWEEDmyry9joGQwWfQVqN3B9uTZ6+TRrlB78ogbVFlIKrlmGR1gE3VBryEcn3nzyuNFhLYDDa3K1WMHagdgxs3O2FdjVd2l3RBi1fRmvmoCTxVS715wHZl+y6RsFMxOQKOOXfUEfFcUK4dLfregtbGTM5o/dxBUhPmO9u/CO/FFv5/rRR+9bMkAEdg309tuptNB/0zvu5nEGTJC1BgvyZE4t6B+jt1+rlgzcCouscVVnH6umH7uybPXyaP7uSeP089xoZ99DrQcAts3NIrzKjJdDX9emjl28Y1nJpW6c4ZD62DIEbmrkJVMHrVTXiAEyIw8vkWP98sjBKaSx8vy5ZR8ueJrH6PmNtk5X3shNYALvvZTagBXGDCdA64yYDYHXGPAvuMWQD2j7pLq4cJhtzy+R48PyCOcOKS6ZUFXZfJ4U1D9rBSC2xq86WCLXWLIdQeyzJAbDuT1gMs4uJtLPMPvr9gokswneH/Olwywxa/ql7Ld0DvSWoEZaLBT9zq4g9RQKQ+51Eiandx3ioFK+0y9U0+OF7QvLHP7/TengkkJ5XQtOJ6FW/S0gVjkO8xdBR0dM8S7thMckwET5diYNr4mv4afGTSKFngcknNUIqiOSZzOcQ6aSst/45k5beT+mjlS3BfTJt+WEHlti8WtSYhsC+Awga/5LhofaDSU9QnN91Vel0ftY9ieE0T7eKoZVm3VxlSTTUymIwyqGC/92dBkOmAOD0K5K+pEcyOlysZ4fxwDfIad6YGTQFO+qIcNCZ5maVlubhfJZBw6nlJCHa9w2YFITMMlx49H6HiN5KBlN/1s426SLRvPppNC5jX6sh6HprUbEINObPM1cuElMtcVon7XaSOVf7L69gOHF7bsAlQ4CBvB9OMFv8w8F/3VuAef02Qb4tsVn/sB1fOZdMyqQLpeeGiD8u/yplPfOR0KCGAXUJ3fucbxkK9fM4q7T6gP8d7oqQD7IaGd9qGKr4NixloG30UL880LYjC+7htqoSV6A99uC3VUd27DxPwe7xwMO8dngjP4bdOyBb9jM8EHaNOoMAsPDl9iPoRqzQxzzaRwzTvMIhJd2WhZHG74nN91da2sqmyAZqPNcWi8i85YWL/HI3VKbZgJvoB1/EzwrOLIzy53PoqLjcjOtSoUFvHIy4xjviqPO/HDEHhs5Tjb5TtQUktDGtDkBqgBqbMlddaozkL3ZHXpoIA9vMf6zUDea6Raw/s736/ijhHsuM8shkx+xjLX3BgwnQNeZ8Bs18WTe6EpvaBi3Vst3Vs19BbE6zqpcq2tbtA6KRxRhgxDKlm15EKJ6KfAkDxo/2f6qS7w9jfhspEWQQFH0ivdhg7sbeiA74dVIZCwgVzDtbW0IdepY8WuOOmHfQrijlikGubqV35jzJcbYxGv2WGBgz2STTBi4qeNz/BldcoYmRtjm9TGz+rQiyvchnziY7klMsxClhly1YEsMeSKA+G7pxgBrgTbx0tTIVQgBGp3ewkVuDxT74QnVmObHxiyplf/R401R0i13Srzw2IgYVaLH7X/tv6k49tPRF67foM9luf6GhzVfcnnG2si9XeHs+JPM3T8A+tIkdcdAEeKvOYAeO6+6gCY2K47T57/Lxf9e7rzjom+u+RArpTmLhN997QDkRlvxYFcZ4j1KNas6P4zV+HtFIv9r4NCyfL0KjNrxd6D/3gzq8jloN/8iion5hE9gsPAw7NsqnsLbt8ju73PU2VCUyWWYfPK56HGl0n9wvYY4lrUnemYg4NE4hy4sDvmw8vcn01afwKTlp2usP/zfU8JA30nG78YXjSfBssTQlSaECI9IYBbr5YGywUz5bBb6Dy6MISiXxKIV4KyQLwclAXipaAsEC8WxwduvnMj62gkPK3ViZHLM9VtTnHQu2MOPq9ifB/LdObLdFaR6axRms6i/tNZ+EMwnfXMEAP5DBH9cas4t6OIOPiEPzwT/ceaOtNaoxRE6z+12TP50zJ7ijMGP3fG4Jesi/rPn74zf9LalN20YDTMitf13L049UhFNlz2djFs8ITdbjP8PGyxO9Op1+FbunYu9bA570ykHm+OO8PV4/1xZ7h6vEXuDFfpvQFsbXu8Gd8SKKhfE7PLUfkZEwfqxFbDAmjjCMHDlL2Tfkb2eNMydq/7XdOdeWf6evRaT3rMvdKpWb4ZwS5F2W9wkHep3zUzf2kUY41OROQRSJMzRqCLoGCs8S9Svky3Ml1LdFeDODyxbdUtFyRmpSP9wrAKCkMqKQynamEoVUrDKN/Di1mIxGZjbY0OPJRLFhK12IsLHXeShs9Kbf9oRuvb9Tkti9T7GFz2PRKciTE0z2zJrFUkfsMlDo1EoU0I37VbvMaZLJh/ZQjbiu3j2awY80oUMfijyB6cF5m8GKQTEAqdRw9H+zrfvvH1n07SeuffXP7S18J0becf/m9L/7SS3tF5/5986XeSdFsnSSfw0WtBNigBRZeD7AHxk/9qkM1gp3AqWAqy3SQUBtNR+n9MPUCipapmskbaUruzSloj6LiK0jUKh7CVdCurq0F2KD2Mp9NB9kT6pDqUHlFPpE/R71H6PSbKTfYpGFJl96dt9amz2a50CtWdC7J95/HwRpB1zs+pr56ibOHJ7GnOO5euU0+fzR5Lh9T96aTala5Xn5oLzNvH0w14O58O09uN9HYTvfXN2/2pwtsD6XZ6m9LbTHXSzWpfukMT5E5NsJ2aYHs0wR7S7/fq9F36/d06/xb9/h79flq/v1e/fxiGn2zTf1411VpabHC71NB5tY6fviIYdtov0rrjCTzSmgNvCF8AR9QTBHnk/CmVUAn6E87XacInABWZcPY6ZQSojjpOqZG8AsldRQVDpvAnGDCiHpGy63nZVG0FBcfqDsY6UNu62R2C9dR51S4USghuU4cE67YpmIBT6hBBHqWS4/OIs8WfHDJYByg61qWqNqF+yKDePk9fmLq2FT6s4lJWdpC/OcTJbepRqaRerqSCStrA/xSRwRZkkYZ3jmxdAeFHQJpTVE4vlRnfbSY3k70O7PsQpIqi1nUdGoPo509lT1CxFsk/Bwxp2D1tkOV+pFYkaFkFV1gNoxD9RgpNa+Mq0kFD7kMMGAIhRggfqiMpUztnO01mzY/MhHGZxENENofEbTUC7A+53MccksKDxxbqxvOqoe7WTHhKDZ9XG3S2Txt0N6gnhUOGueBPM/Bu9SRBthAWFSpBf/KkwbnBl4k5e0wZAYKpNeW+O6/gSYPzBjVsCn+SAXcDsy3CfabsTzNhSaFRdzHWo+rObnanYL3+vJosFEoITqrDgvV6UzAB71KHzwqlIypBf3LYYM1FRrpUtZ7yArqeLwOex4kg6rorr+uwaQAsBfmbw5y8CzdUUMn6ciUVVBIDp1NEBiqrhHQMSmxwEB42lBjtQ+WcBJrGDbW+m911nrsxLlN5vdrQdWi8gUomzniSirVI/ghzxqiaVJ826HJPTp4nZjnM6QpowYQgCt5daFybCZEYQjD2mhBUR6VM7QYIcbfJ3YSfk0lp67AhtkPiYcLDIfGk8PVhl/uYQ1Lchn8Y9r6qpe7VTHhKbT+vlM72TE7sp4RDBOVnGKjUUwTZTljUqAT9yVMG5xZuzwtfR5QRIGpyjXKrnOJPWXEH2knh25GbQNu7mRLuM2U/w2SNVFVNd7PWeTWm7ulm9wjWm86rjYVCCcGN6ohgvYkLfoqB0+oIQe6lkqtUgv7kiMGai6zqUmnB36Lc3BoUQl9wXdN5XUdMA2CEyd8c4eQ0CIpKWuVKKqhkE/DnMTtdRnoT33V0EE6UEkqM5X1tqRxZEmgaj+G+3bTMoZvKVN5EfMR5laaxAmc85Zb8WeaMMfWMQTaCw4IWuPqI4eqakIHot73QtDbuCW50CMGcc69Isyjn6yM59jVQSedmvibsHxbKVMsk3k5lOyTeCDY/lR0BX0cuh5DKtlXtZL4eUHssX+84rzbrbJ/J0T0mHMJNUp9h4GZ1jCA7CIutVIL+5JjBecDl62OGr7dS7s05zscsW7BXEc69A7kJtKObbRZ6mLI/owm9Rj3UzQbOq3G114qO7LxKC4USgqk6KlhnXPAxzSZHCbKTSl5DJehPjhqsxyFB1hjGyogwR6U1KIS+4LqSvK6jpgH0DcOQv4padkolA+VKKqgkA/7MGUkZaYcSgnCmNgslxvP+O5ZzBuG71+TmBhCqD51ngvRQOaOyOe9mTePN4Ixjbsl/njljXH0m5+utNNLB10dLfE3021FoGiG7BrfZBwwhCMAclhb5+miBr/eY3MzXVSHbVkNsh8Q7qGmcN9VEToH9UZevmUNo4fHnNPa0UjEKFS1kfsQ8VuxklEbqs+axZgczLWn+vHncaklBi5oJOIydgIWP3TejNUV0cnfIu85tdX9Xbw1OqV1dvTu4Ts3R4/t4HFKP0eMNPOK27kzwDT4hVQ/Q41XeUVQz9PguHhO1mx6v4HGbLCkoiR1mdYesLCh5Gcm1ssCg5Nu8OyzrDLGmC2niBU5v4XE943QRjxvU4/T4Jh6H1Tw9XsAj/NzNBK/jMWKcTuOxwTi9hscK47SMxzstTq8ieZfFCSYY6m6L0ykkt1icFtnogHE6SU+bGKWX6Emp/fT0PD1tVwe6bKBI+IzR01+kpyqj81nstTI2z2C3lZGh1aO6x+LyJKWmLSoHKXWvxQQHEQ9bRHAesVl16GkXPe1Q++hpmuscp6f1OHzhOidwqsB1jtLTVq6zTU97bZ1NmKPaOquwQLV1wlR1p62T93WmAloPB1gNzQTXfYHQungQq7qZ4JrwxmE8n5M+eRLPKwI/gudnGfwUHj8n378Z0LibCfZK6kJAAobtUOmLo8g2xV8cw6OSPK8DB1lczgTfksKf1MkzknxKJz/PqWM6tUW+P8Nt0LD3NNI6+YbGVSe/IHjo1M6Ol0401IPqvkOtQM3yJi6Nq+D5bueSpyZgG3VfF6+Pt/+7SOqiYTY7FZBkmJjRz03Kk92nHjwkDn9lE3a202bjK0Uv2Jbx/7gjiF5JsEuyEvOdZ3hGbP9b3z0M+uh/OKDy5iMn5Q8Egc+mktcjRP/u+O3fibBJ5cN0x2//TNwK5SUlfsFHLO/3OLL7VHA9ag3qVwmLFb/9WwHKvB6x+bPc0Xw97toLLeY64Gt8dS5L9H0Hhr0qsIrA5ErgKYFVBXaKYe9HbBPEpb3KkA8cyGtwrimPr9NjRR7PAEV5fAO3E40dKDVld/BB2Bxr6EtLvkrOtn/ZlxTCs7P17c1wvhVIpl/iGneJ3+4ZHyX+PIN26hYx6L9m0BbdIAb9DIPW6/Yw6H0GNXPkP2DAaA44FdvWEHlMa4h6pjWIZ+7b1lBj3uO7Dz8TOJTXaP6doEB5hv2toEB5hv0Hv0B5hv07P6dzVhPYv/bz3sjqDBOKZo3d/u9ha3cXcPOxPbgTCPt647AiT+vRNF9vNtbkCb68+ElRGSb+p+4dT7YkrRVvyJZhXxQWDVZn0dafDhYd/GgW9SWTv4daJ/cy6DV7qaT2t/+XsDmsLaL7EZLkc4mS7/tWKEgd1/mwxCeJxYer3gy7pV/WJ4z2PsiSOYM011vkVE/lADlJmsgBN3y9v2wA1zWSBqCRvJY3WxqoovbXwmZ462bzLWA5ouxp9umgLOP6Njv4YWx25DZbv86bre8zCj+JHGA8LzHsTOSy90WRF5HL3hdEXkQue58TeWHkAMNWGHbKyAF9KYZYluQAyKvlQGDlQGDlQGDlQGDlQGDlQCBywMYBbg6gSVf79+OV4LbYN/ph7MfwI/txMeztx5t9+vFGn3683qcfr/Xpx6u36scrn2Q/Nj6yvRf7tPdC2Nvec2Fve1fC3vaeDnvbuxzeor1L4SfY3lpDVxdyOJES5y7loud/kCtyMjXdCC1jGhJcDy1rGgpcCy1zGgJcDS17mvZfCS2DmuZfDhFTLG86kEHLL33iLeeaSo2+VGx0aZzaqbnU/qtRT/uvRD3tvxz1tP9S1NP+i5EdomUSXIg+aRKYyno6/0LUv/MdqWQa78gl03hHMpnGO7LJNN6RTqbxkE/9Ov+a/0m3nGsqNfqabxv93iqdf66381d6O/90b+cv93b+Um/nL67e+Tc/cf43lbEFmx7IpMzqRzZvu+nl889oV5Q0C2C/RStBccYDCXDNHKYLXzTCi68HNeXxdLA7nICXoN3h5xSWJyLi3UtwV4LdAfxVsNOa5bDwbgkxUwnMtzkxhN2Xl8LdtDw3PlIuRoWXFyK4RAnYpiDQN+Xsy2uE4DOKLRE/1/EOLJhYE5TzPa/96/E6vf4Vyr0WPOTftJJCJguaIaSD2LOANUDg9i3HBQsF9i3gmjCwawHXqIQ9C1hAU7sRMAAgfD3Ku1MF7V+OmtWGTE3KrBtmrP5uVg25cm/WDLnmb1YMq60OelYQ4L8PtLL3A6+2ofJlRsMoTaxC+dIBRd1pOS7pTktxSXdajEu6082opDvdiPrqTq5ub6TH1xg/udf3WuAKC7n892rgSovLsrANXHFxSRa2visvLvr64rEjMOR24Xt+SVn4lg+Rce6TlJr/UZB8pQ/JT/ch+XIfki/1IfliH5Lf9G5B8i9+chTn9sQwRPrpNOi8MvSyNm2palOXNdr0xZjCbO0k6QMSAKaWDkusmAmavDhQzP1pQ0LE7KI1Ri0dof9H1USGeD/3Z/W0qXZlMWJdpWMqSMdVPW2pON2sPLnJmj2WziOmWDt7PN2vHksPqMfTg/R7iH6fUJ6YcMmJdXZvis3U7L70DlSosm3nufmoe4oPEChfeFIOiLO96Vp1+Gz2cNpW96br1H3ppHoStkXy9pEUZ/nZo+kQvd1AbzfSW9+83ZduwttOup3eKnqbakLs0IS6UxNqRhNqt34/q9PG5ugunT/T7+/W7+/R76f1+wcRepTdkMP2Yk030ydV7fNqbflAfa163LXOkWP1AfX4WRzF8DmNOf1+PD9XX8Purih7lTICVEUdfLy1tpC7igrapvDHGcCni3vkvMuUfVibAoSwRiD4MI6ZtgjWd5xXg4VC+RzpMcF60BRMwDvUY2fltCukEvQnjxms2dAh1KWqQUL9MYP64Hn6wtS1tfBhFUEHsjn+5jFObsVx40OCfrGSCioZBP6niAy2IIv0ICixtoDwHpCG7RF6qMz4bjW5mexVsV7oIUgVRa3tOjQG0c+fyh6HXYRB8hifWg0rayjC/UitiNCyCh/IakYJ81PWxwz2oZoz5H5Mm0g9JOeWjfzE7bECj6wxuflwryqUaRtiOyRuE9kcEg/iaO9U9pjLfYe17UWM01LCrw4rHW0xM3RerS8fqa9X+11buSPaOmc/n//ySXldf7Lf4FyHlwA56g0pI0Ah6mCTnPWF3GztYm3l9mujnEzKDvOy5fC/ToJ3J2M9onbgjJyxnswN8PbnFn7zgvWkKZiAO9X8WaF0kNt6zRusuchAl6omKS+gk/BLGxqDMrUzr2veNCAwBm7znNyJo2JUMlmupIJKQuDEBkc7y0jD4a02gtqvrc00JUb6UDkngaZxHVY5O8XaLCxTeVKt7zo0Xk8lE2fsh0GfQVKszUbUOmVNRbgn150nZpnnNAKECSGC3CZq3uAfGGk2r7HXhKjnFjfzOY+EMIDSuWF1ptZJW4dy6z1L4iHCwyHxOuHreZf7mEPSuqqoB6kbYQM6ba0YtpeNUZjYB4VDIsfYZZM6qG2KKrkV3sHcvi82fB1QRjZYhDEGm/+EhdwQdxzxgnNvR26xKdpUtHx8SltQJjCkacJW7m5tanVKbcwN8A7mFn4HBGsxcjnIwHvUgbPW6sZYiB3Ibc9gNGgMuDYSYQ5Ia1CINpRQ9+R1HTANSIyB2wFO3gOCTovpY7EStpXbCPx5zN5TRnojKBE6CEewQNoktnJBmcqBJYGm8Sgimtwjc+jGMpU3Eh9x3k2axpvAGQfdkj+lbeWeyg1WK0zsGC0Trq5YE5TthaaxZcsGhxDMOdMizYKcrw/k2FdAJZ2b+Zqwf1Aok5RJvN1Y+h3Qln4RsD/g2vI+pW1AN8OEMDjPB/WGr0nTmiqbiiTGtrnimIuEbNsciZWQsWezVrctl6+fMHy9uYiztbpNcgukJ1xGZ3qYso9qQo+r3dpWblYb9p5SaW7hZ82ElbFtTk3B1rb5TrHRMWZs1tp2DObS48ZcOCXCHDK2cqmxDoLZsCp8SPiOw55tzhreToltZsFWzto2j8HwpiUja6qMdJESbBmlKTGW959j20z4zprcxlZu93kmSA+VUyrbofGUcMYTbsmf1rZyR3O+3gxjN+LrQyW+Hs/lk7VtHodhX8sQgg3P7hRLv6BsrWz4esbkbmqTyTuFo8bLJN5GTeO8ShNZiW2zw9dHta3csdxkyChUtIRxzIvMZJQG6lO5pZEZzLScsUZHmy0paEHzAGyKHoBNERYlsk7akg7QiutJtixSyifl9V4xLPLVHeo+MSzy1Vq1VwyLfNVWD4thka9qalgMi2CFMSGGRT6tCu4XwyK4FdklhkW+2uoaFvlqi2tY5Ks1rmERos47hkU+zb73imGRTzrIfWJY5Kv16hExLPIVTNDZsAg4jYhhERzjTYhhEUI63S+GRYjNuksMi3y1wzUs8tVO17DIV3e5hkW+ylzDIl9tYJxO0tNGRukletrEpj3P09N2Nvf5IuMzyoZFPoeCgGGRT9PN/WxYhCuxu9iwyFd3O4ZFvrrHMSzy1bRjWOSrBx3DIp+DY8KIyCe5MsFGRD4N+/vZiMgnCbmLjYh8NesYEflqt2NE5KsZx4jIV3c6RkQ+WGQiq2H1wzZEvoRhncAijk2IgMG8NiHy1QSUYDYhAvyAmBABfFBMiHzifipgJ1sQ+SShKDHFBkRwVTfFJlK+2sbmUNNcxiExKkIZT4hRkc+7BlhK1/T6ks2KkHl/blaE5EFrVoSUMUHawiWsF39qeq3HhkUE1ioyGxYhecAaFiFljJB2Nv7XzH/6FSYFLcex20AyB3sNtEjn4MMR7zPQkAvgVEwFneT5bnqMl84+bnJ5iOk78Tx2mJ/vLC5+UDmBTZzqC53F74Yn6Gniheee43jyivOGyBs6eUObN5S81Km48XVbeScXFij3rtvMDednVc4bI2/s5I1t3ljyDkog3o/O2FpQzYWFjg+Z6Xd2cvEJvkqcrxL7VSJfraG8o7eZl0ZEp3mbeRsLgkvCf2lEYKuGvqzgy4rzZcV+WZEvh1WDI8PfXu6RBYT1RR0VxHjmr2r4quZ8VbNf1eSrCcRD7rRvM/cG3ZbaghpWaxD7V1UZsBbycEHV5PU6sMAUl1lHmXWnzLotsy5lkra5oGJ8sfc2v6jTPLIBkUe4MsTtWM9ftvFl2/mybb9sy5cH1XpED+bv2vx3EwwkF1QiMIV4WGgTp1JER19QayWV8d/N1PCDC4juUuP0FlpBUMMHJM9WkgT0iMiZC2rLglrH0Dv47zYqCbA7FtRmBkzR1LN1QW2TT7cvwOZ1QbUXCAjADkR1W0CUaaTuRIThBaUktVNV6YVKJXUXFawWVCapu6nYFHVw6h6VocYpSU3z33tpmiVEdqBupO+juYUQuVPy3E8Skh5pgqYM9y2o7QzdxX8foJIA27Wg7mXADE1G9y+oB+TT3YQgvtq5QEAAZkkI37mg7pLXDxIu9OpuSe2h+eOuBXWPpB6igu9eUNOS2kvF3oM6OPWwmkaNM5J6hP/uVzuByCzqRvpRdRcQeVDy7FMP4FHtQoZHF9Ruhnb47xyVBFhnQe1nwCG1W+1bUHPy6ROEIL7as0BAAB5T91BZ6iF5/TjhQq/2Smpe3Usv1MOSOkwF711Qj0jqSSr2YdTBqafVI6jxkKQ+hb9qD9B4DDUDdkB1KLGgnuDUp9VDQOrxBXWA00fUvHqYyn9AzVJLM+rjLXDFwPF9os5GHaC4gdje4ycQXhxxssYRtWcjAqiOLajoBP3tkp6ooxtnI/TWJp5SIyglom/op7VwAiHIEJgSAX8aCoAGAZ5yvykUcFQjESE8EJfVpNwbOTr50ROIykSawwa8J8DICYR1UkfdAta7iQ2CzHpBBk65EfywQaLiBAL7qg1u5kFBtqkO0gsH2UE3U8NNTDJ+OqTcpGogGVJ++hmlj0cZ2WF+v6AaguzkqqW1BFkuZZjkkgTYDRnZEEW5mdecQEwkVmkJY8rekhatcTM13cQEY8dBP/E0AFcYw/g4IvkguE24+WNUjZwBvQ0WdCw6HAgj+wABYjd73U0MkIzlxsT4iSl/vID6OKoqSca6tGjA/SZwEyG+q6BOhOtFgiQifuocth1hBlEeoaRRD3uLkkjKWSS9EggmpGW3ETi3tiBtcnMCgPsm8GnGAcNUqSAnkaA4NtZe25WRU5EqAswCKGIT+xqRcpJVy+GGxlJCgqBlW4FddcFplINdBaGvErwOb4ldqLGLaRlcxg5fJmpHV+aonmpujd0dt8buzu8Ru52rYLft42G3eTXsIsbuPge7QkFVN1FhTLokviM9YhI1pfm2inIKbKAQMxGsjkFCwpG7/n5kj2j+PoHfE5YBJPSyrk4nKvI9/HXpoUI1neDhth3sCDqgaIZVVi2mprEOaTGlMVIVTZjaCQ4ZyqjdgywEq6IehtVWR00Qq+qRk6gHBSGnrQWEEgf3aRC8gPstSGBxv5c7ULBPBHsH9z09uK9Ojx7cH7193B/S3Ff5HnDfLfhGwHMfqgq5qrBfVYZnHOKEai+aHjHBoo+stECjMK8nVo9pqVNF0WFP3XEBET0OI/V4VyR1TXhGy7BQdVBkgWgFpGQQ/daXf/pfnOwzGh9haeqORp0TsqKm5npkhX7dWyrLigOryIr9PbJi1XJc7A73yAoHu4o69D1i98Qq2D358bDbC4VufkEdYa0tWA1XkWtP98g1W6yTqOopNVafQinc25GILpZrD0NLPGwWf2sxwYIdudTqqqUy2yRSHqEwh0KOLKhPywIOAZN5rg2tumAKIcAjaOGTWBlBja3pRsblRha+q8Cx2jhpsQeAqayMCD/dogDiIbZML9+k48zcpIMiAIYa66ZjRK+N3XQjLfn2Hc98deyAXJxSG3XoSGxAeQhTgBCZkXjWGYelxy9sCe94xX/ZP7nZ61wJjQvr5aA796XFSLwXseOb1wNjBhWK55szDmAnAG9aSzqOv8B+1mwOX/vTYyc5b+QvYFbzagDLEwmj5l7L6lzyjra8OWzkBH/t/Ff/Ea38drTfDh73+L8bv77yC/rxyqM/r5+u2Sdv34/BSY7HHqWvsVMv9q9z07cherjGK9qp17J2kbYUWB9OS0G3/c+1azQaBiZsDfsJU663M+vszYFoZ28OBPFHWsp1ecZOoK74Uimc8HDMmJY4nL4Q5B6nq7AJrAt8OUijj3I5jaCBVe3Wi/LHVOaqPqfZDPqC43/sEkPOOZCLDFlxIBcY4no2O8eQ5aLPsiXER4HTLAmQxpdGmNq4khnxfUz0waymcV3wyTa4lM4GBKdso0ttdr9JeGWbXIpnbcEtUz1UJ/yy1MUNcVy4s6dNX3+bOC3NwCNBN92s2O0mPK3D7CodD8GTRM/ZLNLel6ZTYorO9BfSkY6XwqVupLK0Ct7FliP7GoWBso9IxH+t/SAJgwbG/pT4z8zgAUucYbFzrNiJWhAb4onHzbx3Yli+DtjERNeGQorhPq9tE1VxY2r7Q8IjsWNNhDlAfKAhfm75HTawk4egYfDIhuZbUUN8xg1p5vqJs5ROnj/eYN9w4DGEoGvAQWhDjSCmR9hodBa/csnrrO28/hXtL7zzFgB3dl49ZRyIMxVjQ0VeVCEK3poOPMxHaQUOKUFX1FOFw8kKfobpZ7rL9mMJXCx1PNWYBOVG1Jr9rZBI+Qoi6KFwcWo1TRiOpBU0apjwNNEihqT5Fdk4rmDjuErNTmndqHOMSg7YaKejhMpJ9qzZBDrTaHbS4Rh8jc4xhP3iqJ8xQsfT0nO0/Y/Dzof+CYhfdkvqOMjPXd/f5KjARSFkXN+/GsjY6BVE2vs9RkpNDeuuHhBJlJmwVYMih7JRnW6LFLKB+mRENEUOZROrSqLKLSRR5fYlUf32JdFpH6ECazmePoIEDtj0ko/YTIM2vegjNpNh+XHVLEueLzpBjBND/I9JdpfgOalzIhvyNtUPE0kv+3B1nJP0kg9XxzlJL/qIV5iTFJFh1luSjvWSdIX9Tc7S4Mz44iOPX5KC3XSKGjcu4+60DfhHiecF9lLKTlohD0krDF5RFVLfTPQWdnBb1bE8qxiXCX4gfhCwyhZ5iMmhQ+lQ0Swrc5bJmSVnk9tmkMqfKINUIUMqmk9G+vMJRwEe+d74pHE7fLLBUnCjpeAmS0FlKZj24QdEnMANO/iJXgnhhHZMOvyyywRnfAGe4wv0m9EGwwrcuyH2DRHXjBI3g5RniPeDWCUN1dAccLkfB5zxmQVyFs+ZO2fr22Do02Gfwt8PJDqQmoIyTZRqxgU303pKFe6MbVtfyiIzp44jcIBOBtyo5xHQuo6JJHm+2Gc/cZamVQ7IXrPhBvNAi3nwxbbECmNOGnNbs+K7yqvmzl9k/wpXfAk6yx6nM8whi64uZ/wBf//6bVG71d55bzrOjMXb7aKTRzziLjkQ8Zq77EDErejp/noznr8I17i+CfvIAYdvyTLSaYhx4DrhTIxQEfe/p8Oi+98bWnc9F8pKwfK+cD6vFKC9Bo4HYNGll8OyLr0UlnXpxbCgS3Mv3Sxq0zeCbLuudkUuQ9TV9rMiNs6EaQs0EPFwOSxNL1qcnAsleiQLjbBXaIQqcCaXc4ge6Wuh4TlCAx71SYTrLmcpZRyrM0w8q7MwgyNyph6jjbiTGn3FlirsVZ259jIT8o0wD25zhSFvOhC55/yWA7nGkLcdyHWGvGMvZ/EK80zIAWnhmiXMKp3gQCuwaukbX7FqKX9cl2lJuv0aA1QRhXp+cUSwrOcXR6Qh9fziSKjqcrsz0Dwl1dga5A7sNddbPEOuut7iGeL6mL9Z9jHPbrlJnt0IdIc40S90d74aaBezsuRzPZMLm7qeyYVNXc/kwqauZ3JZ8vV6Jl8JmTmqzBtTDmtUc86IhDGgywbOGGNWkEVTgTt0ODFdsdzedFeocrncXaGKu+aC721/lRUqbwGIU3g94hgd8QqvxyVDzgTO2GXIG4EzvhnyJkNOO/xXkWbJCBY9gqM6FTzO08tpno201/MVobZRMxQHc2z/94G5CyjTSVEtkvUUCzCOecHUL4UZBOk1G1wJJZRZeXkmy3UOGmicMv/dLNgsUc4uhMeziLeIaEWW5CF3tS5XkWkQy0xe62NxlUCrq5DaoWdPlSAHC+sTBDQ6WIwPYtHBIhaBFWEM3q1ZJGllA5bjmCxmV/wRj40IPQ8X7AhpTanLvJdg3FJH7N4hAkkt5CJDTjuQCwxZdiDYe8BMncvqCHtAiyHHfI3gIomdsDewDUAyN8gQrBUxBLMaSB1xjEDE+6pwjN8Kh5/jGL8VR+YGpKjFyvmCFpaYmRKJ8Zu4UUw8tq8L2ztx9RGrVdjFO2IgIlGVVaXFFjQhzbjogNrYs4+cfYWIL2JLo93GrgRy8YxHrjIxJyoIsXh4cp7jHHE4DMJpBz1jMo+caSviCT/CLGkhlxly3YHsO05/rjmAWeS4WsTkSoDLt0LnkmzjrgBT335sDM0jDoOt5G3xdajud5BviSP31i1uWHW2hcLZWgslHScbFiJn6yz0hofIMUznbNJCr3MAGOGvoEzsz3HzeeeD5H3a1HM6NXHJzyoI2qQqoioT6PPy5llEADYLAT2wwDxQuitmtwf5JPvnU9ZjuYSpTIcX4Y2WQNUwViOM2oBBU7gLmEjk3pe6pG9gP4jDYVEKzJ+ACRJsV8PFMH2VcICR7SHfFPae5m3ohlT8WaMl0/MuAc2C06Uzav06I1GJ2xlYrw5bZT/i9eqI7ow0H7jY/tCdkVkoyc9sTHfGZgvFpsP4ap2x7Atd6ro3hrg3qro3oFPVaey3bKM+L++e5SAKIG7e3irCf4OuFYk1liA4C3b38uAs2OYi2g0YGnOssQrTmMTHc0znCt92nIIFFD9te4ZFCkdlEcqrKbVNgrOIEF1TEqKswRJ5WYPtEaDSFRN2tZqK3MzMmiMTqWl3aDeLzLR7s0LItSI1s9Yt5WbQKzcHvie5WaNMA67cDFaXm4TAskQtQWQS5iSNHEcmiUw4JQZMdIWLLKDdFQaygGpXeEcDWryKaJk4B2AFnmSZ6UszMJjfvCxMzy1mnkgC/qL4APthE5ay2LfbqnI2X+JY5TmDL/K+Xs7aN1ly5TIKm0EDWv7kMuqKLzMGZFUuo7A3mGi5tslCsY8Yaxmocnnm8+kIS8p2eQjd8OX5cxzqom3DhSsbLnyTDb8+aZfn6+zinT++4YvDhqk81kSAXottYiKPUIGQuDZABU8HZksgQFkSu4b3eors3/Hbz6q2VmIOcYSk+WJv5ps4yi7CN6kNFvuNFvsexv+c1ERCt2El4SFMTSIDmSkaRMUY4Zqw4yHiT9DD3LpFDWG6N9VupaTKh+EdlJzIR2GTku18+A1Skqb3AYuU7E+ha3j49bZXplMeV2Gf16fCnLt732ruZmVgS85nlNqa86LXtd3OCkDTJma7vZ0/7U6Cfaa/Sr/pb4J35LJtIsdGrAQze3Kb7f7JWhvhPjKCgngDEmXbWUeGnwmkwnMsZ1jt4/5BTFWmRdWiNiszwS6gpqrcoR9B6lJ/D1sOG7EcNmo5bMxy2Lgqd+vy996tWNzrXnXk5bQjLvOFoBaXV7ySuLzslcSljSGtpaUNMs11QospCEsWh+XAU7GViKwmFEZQ4o6gxI4gmiNl17hMURGoo6qpo75YmTpGIJWDIFbHCTSRgyBZ1xConYMgXCcIVM2V1OYPbFSNFkbVWGFUjbujysirRj6N5ENK9INNH0M/UGqTHTlF/WBdST+Y7KsftLR+MOAidTv6Qc+6KthnNASvV0PweldWRkPwHQ0BW+CjStmhtdYOLTNLrrG7rxO5aOf5tGb3+sxMOmLTMocO27TMnnaG1PNmQdb1zpjuEYLp6GHbySO2h/3eHv4+ZkyjYd/GjDl4qxlz0DJKvm09bOXZiJVnvuphhc+xJMrDQkXYWTG8evlfXZIAjdGcL/sBndPXLzkLh84KJdv/bWRkmWdlWd0mlBvHisjRcOVXHu+qaqkGJC5g06Tx/qZg6ysR9kNuBNbx8EyAcy1c25FLHk64Sd9uffm8AA31Tkg0r0LZt8mnLQ/RuFESV+3pkkJdkqdLEt8qjZQ94xAjybaQCvSplXj7acDa2qyeAhg6eLaXp9ixk9VgA3Gpdd0BTHTF1Y3LJYGzvy/+sog52ApxjzcrgcS9MhHCEhFCTQRfo762H+p8uzFHHTrrBjsyAw7DtlEakDUtFIHYNkkrrPLDHrlIoHNTrMQJOBjbGmlPNlJuEQkf5e3xvtjBas/DeT48yQYg9rcQLpHxBeu9C+TeX/y6Qf0XfdxODMRVD9/Uw3PENxW5YZ3rX/q6MGYnSIFHwNV0XoED3tnJlD1pkSad1pjg8ImDhUe6TjwCpdq5UzopxEuVhg9q+HoNTxV7x0vbwmlsvMINweY3SbSUPes9i/UHtJsAEQUZdDDlaLlwBHQAnAn5NudDmFZTuOXsoAOBa8ffz55Fxa0U77rsO96+h36w/iZdXwdTY2qv8JK8nU+97BspqxNI5SCc+A/hSpIB1ShhJ91BXFvKmU8E6Uvs6NcvL7II+K6cDQY4oe5925SXCGabcRtFT8QgyTZbmYthQmuwujNIaAk25AwRWoEZYTlmZTnz0UsYGNvOguYkH5lYY0Li6SxOPTmcmTDoyJs2Ed+xgPNYHnDgViK7h90HxvQYrjdiY0KCB0IYwCIFkhE2rMyqDbXtb2Y7zmbDJFYQek9C3XJUbOio3OEMOhgrvzHfqnWoh2E6yOZK6PTKl7Ntc/HTk2rbXPg0OJNwIO0KGKMhOGAy6LelKGoF2DphyQappoafYy1ZtyC8RQsKqIeE/NnnVOUQdlISYlmVnMAjcfCHH246kfr29JUxENodbWka8jZfEwewPofApendETEYiAFfmg6g4/CwFb9axMnQcUQqxZYJmrb/W7brB/IpkiXIcE/fX/GFCdOIGr1eO6T2M596CduXGdMxEvhVH4POk8kg5B5XYeFYLqXPKprYlNunEiWoNRx3+e5Wx1gDvKX8Qzw4dXs9vhws7fR45xS/dmNtGE6AB4UFV3xHJpwU2KLGrxXNeenUnKd2/NTco19Ot/OVXiojxe8rXXQOuJ1UBdjUhieYI8NDLRz5fUDvCMIswF2tppjNsm1qx9IpVgI6XwR4m9r+1Z43z6765nOQNfzGL7wBCCEGOzDNxfl92GhGjc7Z7/Jhx01IYT70w6HBr8XSPE/CIyMgsk/o+aWq8MqUi/ZmHu+z/THwy+Rt8AvLB60+9HCMp1SZYyY1x/gOx5Dqyw5JA1czxJmnM6dSyplLA2c7hY86h7eX5s5L7Et+Nq2YMSr7nUBlVOrSX9SlLp0akrqs4A+c885BqcutCWedLzX9nPqmZJHjzULZrULZA4WypT+i/jVc8bWY2XbWGRVXfYwt7qxEjdCsCBMU6pkRUve9VrCORNYcl8PGFxDNED4jzkzV8tc1TEdKSVCHPHYlL2y3Hc7m0BSqfPvcK+hR4rxnzhPrabmJPgdLYlrwopxj5bM8F7LQt1M/ij8oYF4L2aljLW0WGrxiuM1pY0ZlHGhpfkMT/U50APVQcdRotRbDKWrgpjppFHwGCD1UhVRCh4YHD5G/8gL9BIcmM1CBBqp3tMV95rE3CVaa34Rggnm432waX/xaB2zf5EFxgeUcPVwkpOZbTDn6ypOFgZWf0iPUDXy0LJJpzpflhW/7AWu92HJg03Jfy3LegOW6qMzbLzVoleMfEBK9xDv2WkBq0emDSocnJ8U1qdEKJXZ0MLco55fc4lPf5SWM0Xe53Zh9RvKhbzuDm6XHMcZ9QUw3ZO5d5A47yja4ah1cIfAcwGeGR3BQx44hqeO55s7mzoVFIwJ5XphjtxPH27/pN0yRpakgcqYC9DnWqSFPJuykNs9DhOFj0dAQxciwxJFhi7chw9bRh4mWYYuQYY3+MuzWOqDpK0YGGorfSLVPU9I2a45OyfaREwRqFyQBkZaG1GXwq0jxC760to6fM346nKtXYR/1KmxgfmWdKvwy6VIR5IkSVsnCyflWzLoX6V0QiRwretJm1kuCRb6CEDixlUXwJXY13bSr6ZZddQ/YnQIj5ta4Ddtnpp1p4H2IF1wlDTmz+web7Zp4ix02W+2wucMOm7HeYYMF4jb2gKzq8KYS4PR+nxpn18g8QsexgDCT5ThWmhO2ECzEcLMX/kBYYjzLfQ4OePNDWuV/m1bmnfe+Q0w91Fn8I2PMY1Y3JY54/HYWBTcQg1mFg6Tx0r+rv09l/h5V8nuTwdpXfKz6FyO96sfQrvJSkGn8TtDtvPUbl7Sy+TalXreptwqpNwupNwqpM4XU64XUa4XUq26K6IFlMdHpcsCpd3H8PBNckhQWvKMkdiW1t5uN8Q5KwD4xsnHe9QvYCUe2hjdSAnZugphMpyXRpLU6X5ThXliCfvnBZVR+ikHivnqPd1EWvRchbhfxdDqEbStPyBj7MDzhDb4KfNde9mE3U5EFJLbQIn01qGL3G2iFb0BmTyKrW5DZt8gaFmT2NrJW7rl5JngtFMZbBg6XOdIBnMXXxAO9ufdAXDDk8WzzTsgrGS/XYkT0Xg6ZXXRwCNhvJe1lBFRz3AXDvt7ahOFai7UYw46MtSdrKddNsXYxfJmH5NVARNY3sG1Zo97bT6K9gqVR1V6qmoLiU9UlMEThiK+qK2DIBA4Bq7p+hsB5K0HaOYQvi1Q19oEcJZh2tG0jBm0LBiz6cQ/uHVgdAN8DLTb8gb2x3tPAcL/s26W+9Le7H6AK20vao7K7A3XOL29Sibbg7GOhp0/5ohnChXLSfovnm1O+RD9a9Ft6+4defZVJ/KTsx7G0ZhspTDA0tFXYfo2/ZUFezeLjKjyErsf9HP2qig3lQNwixV3+5h9jMsTd2y5c21dl22jfcZlmLeLsYN6V5tPcNAfAXHzNATCnX3UAPBryk5gAEZJGZY+GG+alEmnBx+3UuP2d6E9cRBnhZMSSEUhGFhkxZCSQET5a7hTkDUSQtDSXPb8dsOz57cDInm8FuKJEKIYw4xAZlGgZVJGFQDogkiCtUWkwoq1DLh3EQKhrsUSic1CPjboWSx4Ouw1oQndVNmRBSndnts76+m9SY7QMYlnUElmkGjPB2/iNiChGNtUgkmp9RFIsynqvEIohhERgxCJAMAgSmr8FpYQPA3JhkQDFSi4qErSikguKBA2t5GIiAS0qVkhAi2rB6XIu9HKpwhp1NRd661gmWUKwBIM6MBVcC9ImfpdCUZdeDRGNGRKJFHHY3dO4bM3LoDvPCvSiT8txqNPaQzqbhoLH2/8Nr8regE0kG9I7fHE51NLeSH7kPxPIoH8D5su8LSp5fP3+S0G/t2tv+Xbilm/X3PLt+C3fjt3y7egt347c8u2wfvvtqPAWFxrF9b4sUJaLa2aIbAdyzdchOSzkOkPOFeNrwN4WExxp1QE2sWGrnDZERupq/J5q/J5q/J5qijE1lnxbja+r8dOGzArywXUnvIgU6opaqdiVtYKcK2yp8INcS3wex8UvnJ+b/So9fPjhh5UT7FryVDopxl6GHznmEK8yXFwvAtcCf7Z/Q5ZIAc9DSxJSgPQLXnhKhJv2r3BnnQr0Dl3QMiVE+StZsQUiKWBFHGlFUURoJ9zjsZBs63AG9Hn7D0PcftAT1oWgNGGdC0oTltvhU2WeUGW2YTm55OyzRJiwMINC2JhGtVuRBBrxJCJBUw4YhGYdT/KvN+oE9+DeUlwVCYaiVQcG7HS0CwZscRQQmQtJJWjI17BIFVJN7uYZVVeoQzk4BbzmALiK1x0AI3HGATCabzgACSXzZmGMUN+g0uAH1ws+esHP6/PL9fnl+vxyfeWDxOXyQeJSUUUbbcj5ZqAPewJ97hro86BAH8oG+sgo0Ce2gT5VCvRxbqDtSjg9LYdQJg1eGp0R7S2SFR5fr6apS7p5MZJ4sphv0hrvn//RRNCSkLLLoT3ZnQr2wWcAzSNQGTDlEmhWHPNRkR+GAuXwJPk64aoeeKon1FHbRDqSsEWDEpWIfqoQFtg+4ErgtfJtFlPtfxQqE2nwW0EepAS2rHjzXpGBvhGIARNwYBFyyc/ZBtWxBuzz/Qwb4hMK+mCunNtgm1QSPuFVHf0ukoYfdwLe3YH+arvWlCtnKcu+CC0dpMyzZeN2V2TLXvTx2bPKm9PrNEodA132eH+ZMvt7vM9riY3ete2+5svJuAVcZYAT4OUKA5wAL5cZ4AR4ucQAJ8CLx09oJyiV6k6lv5Vu+w8ioSZ36LsSKTCP/wSlmv6eCp2BzZAPnKH+FkPedyBvMuQ9B/KG28N5bxKNYOQweNZMyBxfEqqeXtyc0bJ+JeBTn0WjEtFksMyxFHWoJ127iTprETQBaW0bGLDLaaZvSLYqG/kuw7Q1IW8E+shfDncj5Vtmy3zNEqoNrhLOydjiS1MVJqmRNbDR/MLcAskQSpwbHe5mNA+pxhNGlAuB7eGzNI8I4eRGYiGGGok8E0Jt0Mo8E0GtbYWeCaA2ZKWeiZ82bMWeCZ82ki+Js1EM7lJgnkEbmKdtA/MM2cA8wzYwz4i0YNQJhcSzwmkn7J0ZskEP0nJtqIC1BMcroH3TL+PNksDgbsTBSL5IH85X50P5srydr8d1t46yLRPP8af0Hv+i35AeWfSNxOajlwu+K9T5NOec78p9uJgys46eGng79LTvzh5ZNZ95ArHdyWr53BMYdTEqCJK4IEWSggipFORHtSA8av0kB08O7S+6s8CftMzQmyF9ZIacWgR6h+Y/Lq7yXa7Kt3tE7Pkk9no5ze/ltKiX0+JeTkt6Oa3Sy2nVPpzmFzgtKnBaXOC0pMBplQKnVVfjNKjF7e9Gf8ZtP7zclkV9JFuWuBxXEUyyqstzNaVNpFyua+h5tOnyXUvPpwO34LyijKsUOK9W4LxGgfNa/ThPolvTUrj9y4HpW30qKez3x9q3A06/NqVP69KfVenLRPox+v77sEde9EiLHlnRIyl65IQrJXQQ5C1e45fWBBvFonTZP54lfLYU8NErqZ/ZUCd8Ia11/LSuh/pQp3ooa2J9QdD2l+OszsMKIRdq7Q8j1WwFXFnaZLzTFgwMOxXY5lRVNJlFz3deWUjXdGB3lXTpxfPphEqwgMH1s2leygzyll+6ln5IaU/bVNXLMEQc6rRPpJOqpupdeFwa63gEil7I1ne+++GHH3onjqcbePMwHZcCcEHPP5zCXDM5nG7iDdb6XZ6n1pzISM/32P5gIzVlAkZi6BgcmPjP0SvUdYhWMJTdT+E3gnLgPXsjRYaGGlNjbDv7nJRU+sfkMd6XmDi/HqcRE5AK9tiYcb2c6EdqXTcd5Q3liM2U2J6hSoWnFWKtWI12s2FKAa1hVcEPrHZTOMYcRtaKfkm5+WWHFxEbVExky2LsZRKl4uOIYDkp1nEITiblx+IXOKReERhKiLkWtmAmxP+ddjSTsB1v+2/hTgPv6TpWlbyn65hU8p6uY0857tpTjrj2lIk1TE9w/6DkNyMx9w/WwvsV7q1VaKX7Ml/iyGKdo0qtTTgMQ2POwyEK3/n3D7TYitxrpJm++hGbMvkmOnXGJkrPeekWlaUpET5TW05mm+fCT3Vw6pzOhYtzP/XyyWOTavPcT548Nq+h8eLcTwL6HIF/IgdXFud+Qmf+Gzm0sTj3Nzgzci/k8Nbi3ILO/ddz6NDi3F83Rf/VHDyyOPdXdeYfz6FrFud+XIpG9h/LX2xYnPsxnf0v5dBNi3N/yZT9F3Lw1sW5v6Az/0gO3b449yMW7c/k8DsX5z6jcz+dQ+9ZnHtaY2JADyzOHSbQPGU8fPLYc5PUF+lccDJN1RbEutwy9/LJue9++OgzMJBrULelKXVd9lPpZuqGNNtCZWQgf/jyyaf5mYgev3xSpU8/x0kidoWTnCIiN+SlvCXitvK3RNQh51Mi5kj+koi4Rn8qr4l4G/LXRLRNzrdErK35SyLSdrdaIs6d+Vsiyj2mZKFKBqo8ANinJkm2ZKBHxvRgshhy1Btqy7FWjUbGlt3hLE075gRoAEJ8MD8tHYCUH8wPSgbYLZ97kOIjAM0AxuZgft4ygLE7mDsbSbT/S9XC4rQqhjcc1qQiQ65hjP+z6pEW34hq5q+qh+Gtr6oasPtszLdwkRCWG9SHpGtUT2YpjW0asdTCZ85nmWrAIpkGaEUsPCgDZ2xzxqqiofjMecl8knMHbu62zj3Budu9uUM394TOrTj3RG/uyM2tdO4pzq0IXMi/BXmm8B3lmeY8U/zpFs6T2TzTOs8s55ku5Ghk6TGmEGH6fBZBTFdhfRQdZ8ulGGfAlDVka7otEIr6ijV7vQgJo/SZ83P0Lj02z6fyDYUCYfSF+YZdZ/zCz7Kh6fLPGa8aiz/LZleX/wsNCF6mvqYuOwrZp6rzrQCnZP6JVOFnP0vElKajCGv+auflE+kwUuxkjaQv3oYunhkjmaPMx/qjmnqZxhjEGTXZ+Rd8USAODQL4kuTWttFa+DVAQEXtBQtM1r5ITSSsFTzX8TyBEF8RroubwtWIg0sJiTQlghHJJhtU2QjTHm5wY5rpWnJtho2omvRMEyPcYVKtx9s3A+L42LkSI0OkcCMGx/HUmxgF9AO3kDHihRnUsi26xcROP0qDn7mKkAj57thx6WW+8w8NgH2llThBs4BmCOKEHxV2SNN5oQ8pMy1xPhEfivZ1IlIQYvqgSV3XAvlK+Eb0tqqaDdCbEKZmywRPfPRbPkb3NOZKcRUD68eYJ2Nj/KiLELJwuTA3Y17uKm5ozPtixvYxEYc8ucuY0MzD2B8jVYZtoXt4tXPmS2xedfFLhnmN/X3L6YkmN1s7P+uwCkA8DSdSTbbsTwRfeNtjz1vJ83JnL+pxgea1HyHKt5hMcoVpXoXmwqhnXNgYbZfNweqiG5Gurbf0i+Pwqm0KKX2dxZ/TJl30xduevlaWcLNhmJbgas8uApx6DYBpUYlvvKavlL2tgkGxA2sfzxpbPLmr0fmOD8vXxcWTnWqn2v6/o84o/3Q7bfk93nnxROen2N+RBnWC5+XGRXB4UnlHWGen/HhFiu57v/t1j/3oEEEhmuRo4ZWO3EjF3dfOJnrEeeNhvgjbwY396gt/JfOOv0CCBDz0/PHOI91GllBNnZvf/LonXMTabtJ+L3o+rZBM8UNuQPsfxhmpanBLQT/H6Tk8CrtMLNxhQg9lWfaSJQ5YwJ7UYW+14YVOdKKLYEko/cAkXkyKdSzVoGAmz0I1TnkD04f3LSq2Qx32fPsD29IT4G8aFu2fjZ8tIkzgBsycYaIKNEkVPgoHUccR0+PQiYxqw43OENWigH8dsW0+TEWpqpv/OxefEeGOgi2hUB8/irkfNrNR++04Teij/zlgI2bpGpYs9O7nYnjgbf8hrLsWeUGG5D8N2AETrcoy2L92blADujDN6FyXplAnU+nPZ3z3hgZglXiU36GznwO3xQ1GOZFYcAn8cyc4FcKPP8MfKFkjtP8ViUCv/T/FWSim25228Ilmop8kaXF4UnNN4LgmtMiwK60XMu8FQis8wUa4hihHWhUVEIfpLgCpK316wCeqMw/SQhnEjeDi2BMgGAW73YcyoT6aiP6w3dDI6RwznS2VD7ViQ+WYqWz7yofJrF8icKWz+C/5dZr0EhqOaODTl1iUnYe/ssBjgG+iPJ95nZu/q9sSay0Ko43LJZZlaxFPnKQHM253dV5W4YsnWHjGLImoO1RMvUGDAfePO7Cx30SsC05GIc+fAPVA6UKt5gjQL9bqm1p9p1bTOKo70HWHQqWQycjbSKyvZIFLNI+nQ/R0X5o57Imx5xF+YM+Ky56ECLNnBTbSFWFPz7BnRX5g89rgYvkYk6sH1WD8xnRJSrxeAa9XSrxeyXm9p7BQDLt7B4B1Ipb/c4c3JtwP8uRh6MJaGmOWKQlkktUR/bZ/MVINVqshaQn9WsPSLGBZQeTS/AoBT694wjAVp/Kkr5gRosQggRAC5nfC+LphOMORxspRFQ2nP4w4D3Wu/qjaADrVtNlZQsYGpsw6P1NlXT626rwKJF79l6albA9/eFL7z++ckheE7DI9yQ2R9n8ZQx8KOGAiD0tIkjOmiHma/L1DpA/AxtRrvxlD8rd/haZu2AkRw8jI0SVnwRFSVGK+yNul2SvueA0S0VxcXiYVWYVoQkur8A7la3wCvpEKrCnfAZnSgZPcSynUvh8e4nStac1+H/I3nqodiXTbaof5soNpHO5LkhbA72j6k57PBo93fpwoCFbyhCu844pvrZgpWdW6hyazFnpiQLXUoPSdsFAa6nLSWOdOA8YNDUWZvhThE8NglFbQU2BHbUfINqFdqu+4nLlXeJtrJohM+bEpPzDlY9iEVBaGEry6H+8iXGhnBXSGKRyKAZY/FzNpaGmZtnmB2jktSV5p8jFj53Vg2gROr+Gpjqdlxh5PyK8G6Amk7TDPQlRVYD+RQIDTjHO4xTRt7ac5gn5U7XjmMY3fjtvfxBGlzJCA0AxZbfQIo2AVERT0E0EBX9NQNRFBNYiLGsQMfiCCmFO1Js1toB/ohsRpQJp7JNb0ZMmk+yf1JAjRcXZxhIbCa4gWr1T5cfADNbp7HLdoDPMd0EMfXOftb3GoUZpVT2CDKzbqU6wpgElOdP2mnWq0+Behz80IVhP6pBW/oOU+zTVdvswTMyfSql84zvKWkXfYTPSEqzzhKtLw9CwlTCiSDN+hhHwoy5Ri5JH+tiiSEhnaTGVWAR1Cm4IsIvVu+3f4pviiRZTl481eRCH8NJZhg6MFeWCkSJORAMRITo7oE+CnivATTz8V6YgK85Oph8TiORDow00zHzlqPkDHARcm6ze+LhM+N9l98yreLH5DEotutteQWNJvltxsryOxrBPLbrYzSJzWidNutjeQWNGJFTfbm0ic04lzbra3kLigExfcbBfdN28jcVEnLrmJd5C4pBOX3cS7SFzWiStu4htIXNGJq27iW0hc1YlrbuI9JK7pxHU38T4S13Xihpv4AIkbOnHqmyC8Ttx037yKN4vf1P3jZnsNiSX9ZsnN9joSyzqx7GY7g8RpnTjtZnsDiRWdWHGzvYnEOZ0452Z7C4kLOnHBzfY2Ehd14qKb7R0kLunEJTfbu0hc1onLbrZvIHFFJ6642b6FxFWduOpmew+Jazpxzc32PhLXdeK6m+2G+2b1ia8wsdrJOsNcw7OnM7Hy3EgTq0cTK9vVYXumMLEGpnyjyKWcCRMra6l9J1Z2deGqk0da3vcrSUm1o2UyLpc1fn9NMCq7CCukMMRb+pxeyan+/8/e2wDZdV1lomfv83PP/e3TrZbdtgw598ZvXhvscVNlpC7Hb+KjQf4p44rfjGsqb+rVKxePqvG7nfcmso3RA9mSHcVugkk6oDBK8EAnOLht5IkgCnQSD7RBIQ04pDMRoQfES8eY0CFOpiEGlODgt7+19t8597Yt2ZLsBJUT9Tn7nHv23muvtfba6/eKIOiEIsBuEEAxodh7FykCKc/KNPKsrAY6+a5JtELaom6N601jJkgUU9vVhtm5e5GOYS1a3Sb20It2ylvbCe7UJRzso3/XTih+uNeiz9AwTDaXuq6ewtFIdVTWqKvjc6vboDS/6lKQwLqrXW9StZiidgdXkWk4NY8a8Y1t5BOHYyBUbJFWJ7mvcwb9erdGocf4ZIsy59f0J2FKylveJ8O7m9n3q08+S8CA1g1mS1y2cQL/37t1/HlrO8xTyCgKqj2EkCKO9M7dxX6xu6jdnX0L2rSUwYPIBBTPVEgAWKpfICZX3jnsRyNqpIKqAAl1Ng1Qx0nNpoGUPqRMFjN5S/3u5jYEuhZCTwT+kBILynL1k1YRUAp7JevvQwbxUge9jtqdvhXtVv9HQpEZ6K6pmCv12ACyIdq7hj81JQCqLyBjBjRjwJainjdnijfgS7CL4zNIf4UTsv6q+TJ0DCFUvOpL0JXM7O4JqoWj2hSahtnzIcBIekts5oLMlrCqCvZZ0255qfbypCMPxCiiinY7JuRtYN4p6xrV0Iu5j2l9HGvnzF2ufYfHOXYn63fh69DiiJ6Uk+FE/W5ngBKSCiUklhK6hNL1vMEEQirGERQbgeCMU6D6aAd/OopmUp26QJ1GWkw5iaEc0s8Q5QS4c5QDw/0l/R+UeJti8FNLyYaEdEbedJLrL1H1pV1taRE93dVuMe0w4aQeltdQ9g7UE9C6dzDmS0djTBGIq8SjNiKz2xjpXVDbb4X93CM0deI8HvqE0nKEMsaE0iBCAeJ2KMC9tq13QV5/Qs0xf+DAzgD36nL2UfTdGhW69hQNJUOgUot1XuPdUfzJFJgbm1LbhUQXKBYKkDQKchJN8gzR90oERxmEPAHefVvQ+PUD3CZ5eDNSDRB9wnM6yUdxWEXEOBI3UfiTwhihcLVG3hMIOgXh55H6587eFgxoS3lAebobqRtBRxGUyEjE1MYI26TIaoBq2wp11dC3FIL4RRHgT4riVZxoibFGTacNuk803asBa4LHCjWRu43oMC3Roerav1VUNQp+yMb3R9XlBaz6tm9RcioiUHF1kKsHyPFERveWAtdWBUHmtCkKI3sU3GIKhkKmcRoUPKZwk3TtSNbAxfXIh3UMeRmoHeo+LHdCTKiy3BPIIWQY3XghiJmOV3jdeO4xujCvU7XobmiWQ/O6cQsCfl3hzUQZlOkdtDBkHogx/Ldy/TSihuzLIWV/aXH2F2h1YdQqNh4j08fqr/v2guVfNxwpLr4Q4Av/I+gbLw3YcWMvthP1wNQ/rshJDN4UexEQMZyOYy9GIibH5NgLo4jz+Mrg/36TuBVXNk40V9fPUc+gLR3DRDMEN8AWr3ZkMpIwxpBHUnxZmGOJ4uJ7QU80Az32gMExWfJxiv0QC5qKF2JBM3EhFjwRnftT8rDFrW8Sl7Ar8yh3gvSC1jO7ZdFrjNGrsd26N+Oce6W45E3BVtVwYZ/QRH2CVYGp/x5+fxFFe9OUUfNQ5+hFQsLRKMBfeP2oP+nFeUYPiUXhIawPpFiD+NKkNzq67ouH023YqbBf5XU8jNzqf/VcrP7/NWz113n1a4wIWH3Bq18fttrhuVttBItyJy272mqN2ryqdV67cfaCJ5hWVnxUNWzpk0uVXfEmRHL/XbPqTS0Xc1yd4HjtSOvXdaxYL9CIEDAiBLTMOimc1ssIkipe9uVxY4USJJGwUS5HLBG5EWZrVDZxnk2Pxc89ThbHtcc0B3n0AjnKgj6SRaZK+E85XkV9//vUNVw/laRJKT5MlqhUp8dLKclH07bC+VNtP5TcoGNbuUZBSlkQMtu6X3BYP9IlmCxNKVJeriKTjXqwQtnzUy++LKWkpuPq74LXtkSZ81Mvyiyl5CkXYJheG7xdL8QgXRu6Q8jnguC8lhN53SYPado8WR2bRiSzebHGbDoQ+sieHWrY6JdibAmA2Zr+aIvKp9nMq0iIYJNxIe7YJk5FRLLNiIJYZZsOhfpYoFQlvDgtCmxWXZDcNgUSgshGEU+pl1oqpeJUqZdeKqUQp9RLMZWS9JV6CaZSStybemU6aACLElHR6RXBujp7tCiXXkuLE9RI6saZjgyEBMnTK1SX8lyMq0kQ69UZozyIEpque005HJVTLykDVoTQ9qTXNMWpKvZ7nU8zGs/6vU8GX5GwyVvMhVEhpYi3INge/GuNdxmPvYSfozzDEh6PMRxK+L6FoeVgoGnAZWegzm8gNMaQ5LVIq0eD+9fbg5/Ez6XLWk7LkDvq9DOoEfhzR89ULMoNULrUu9RlukPBPqdCL0gIoI6G8Y1KSPby7LInRGTQl/JQXx1MoWVS7tke/ID69VV9jPQntwdQ1rvc0XnfS1Y80fcyFWcuFw98YbyyslYHUKpca4YR8CEpsDFbtJZqTckh3kFkP1XqJYd4B5iTtGLkEO/gs0FLRg7xDkzrtGbkEO/45RotGjnEmyS3nATN3kJy9H7S4PQ25rOQqb2u23Ras8PrcJYcOwW1C4Efdeyity2QmhZ2DQvSuoV0YBdAGITWMkPHA7LFF5JXm/ZmwmELnbnq9iZ1uX1jC35hiBf9+lRdL1F9o8QVmiWu0S5xlQ6jOt/Jazm9nbwOFjeKrsV1A1nl2M0Cad9cDmDtq0VbO3sLBzoPMHHxukaMmA8aKf4Qy1+tpgNOObwitms/CUmnzF1yTo2zUeZUzQqnypgtefzMcRmkyuhBFdAbAbqPWHSvGXSvaRKFKaMOoutYyFNaotDeTLj8ipTWqGlvUrvWSJwDO5KCBWwZ17W1QlAdkDXbDwOc/MhIHbckZ3kRbdom4ibtV9Ws0cJkjQa8BcM7Fyj9wzn5ywmaI+uZFtGLIdLoM/xjsx2Syzlbgyspw4w/N6oBGcQmVzZmAqHDSY/nk8M6035kmyb6mvJj24QTBNF9yzalfU31jlusks5K5o1tCj2SrLBwkBiqtEO1HmSBGyoJv2aQJBn74+SqB/bGW0+SfFv2JrWLixq3nDKlnAu8ZnOB1wj9DUOUw/CedM0lvA9sHTzCezmI9+Eg3keDeB9vhvfCFiivZHUXzu/O4L1gvE8s7xEUE2NvJhxIBVWFsDd+VvWUE641Pz8uWywor0G/fmmQfVxQvpsSTkeVTOiRZiPIULZEiWcJjgJ/Dim+wYmloIY3cBTFagTbL4bWa/N4ViLoplxVIFEsU8sRr2WJWha8lsWIyn16+RAEWMAhBcgjUd5+FIO9KdrHb06aBPBHozhXJwbkeCfGHVss5ZlpByU1o5joUGZfEfyJbsy/79bhncpfW416IQzctkRwndsXo66kc9KuPKIDsvR9LTnBYtKVXCKY31fHxS782uigg2AUm2ARux/DzYPZZJ8B5689wc1ffwKbhwPIF4qp+PA6EiH1wT4ATAJgNJ4WnM34dEYToanoaVA2aQn3ZxoOsklrv1zEc1PtMi+btNYNkwtG+ycevaPXzPZm94XnUet0UKvxClCrcWqohdhMg1s8+VlRRa39oopbyDNRRq4NahmCW7efajUFNTJ4D0CMbRcfecdTQfYeGA8/qq8iXnKYKCSleROoB7FTd7/gLhfd5dOh1qMKzjzFl0vuhUdUa3vn5AOc3Gr/0ovBO9T99AMH1L8TunXtzWhL+W7jDe84cGBnPvuvyPyimmfRfHIEr0zg+oXaO/DjSXX9TyF9bPbAgX+FCryq44CSkIGwSJU6i5UnY1WtGCfflOII4eIhArg6FmU/BQxB5iJ6lL0jzH6E3NzVVS/y8CviKoJUQdCiGUkSBDgQhk9ARyLdF0xS0hHQydDfNDbCKiash1VMWAurmLAaboIJK0gKj7wvdkrTCKb7QXLRV5i6EPUSKmJoMF61HYj42azG+nAXgkiv53KqwHfxv0KfD5pJ1JvmZ7P6ZwcQEKcoh/LITJkaUcTgqClTO7EiDFtjUZJMpTPiUzbwkEqpwqNf/UFIZ4gn6JoED6qxiFiSQrJZqBa6ZdxPK0ZT5OlVRCEaoDYpLESDPH4+qsL/UFSF/1xUhf9stAn890cEJ8W+AKoSmAfgxTazswgzWnSfT5VW2hhTzXIjFESvdgjz641tSZY7Ck5ITHCCB89JeTIs1feroe04VdmqNfkTGMWpf0E/Ph6ax3MDSY9V49vM09uGPLzGPBzIfyt0/ltOsMWDalRGpEHCAxvEJD2wWrH1eu1fGvj5c4sDio9SxW2bfP8sTYHQeQ3ZnZpf3iLrnNBpvyShUvIxtCcnTVA+pa+B5Y1q2gbZARYNQmNJBpYBU/TJNaJ6G1wbtVur7rRRZaeNeKfF2U6f52oUY8EXN7UDXR6DI4rqJG9T7NUeE4NEe6wg51EQZoNChXHVvLUtNcabeKRG3nyrRiqSDgIu5Wpjg5Kmwmb1uYjV5yjA3IqaOwW/74KpEv1L9aHoXrJ6tyn/ThDvDJoP7Dz8uYUD7zr2obnJd6jNvptSqQ3aX3d+5KP3HRnJHpCas+78xqf/8E876p5M9Fmfl82VRcqc6NI6PTmLclQRPHyRgaWsXtMXGljO6rV8sYElLcPkWHBgSavX8WQtTk4lKAmB7ge1x/XnkWZBfxU5FvTHcGzT3xih/NpmL10R/Z1h9lX69LLAlJfEECJ6mKwOt7TFeZARyOLzIDtdkNXOg+x0QdY8DZDZH6b9op29T7KYQr/hzYJ9emjgk5JPR/4nEJTmf2N02Dd2tUMuunGKH9lyJj5y4Zn4yP/0qj8y3S++50x85A1n4iOXnYmPfP+Z+MiVZ+IjP/iKPxJk/wuFNvwLVKQ4LdmsLY1oRvVHWAp82JcCX5mcR2c5qtWQNr8wLtv7JOS8JXg5GXdayDnga3Db8xP5O6c8PK9bs6qa+g8oQcpUMTOq9yiIqfwZnECgVmrgT715qvUeEyTt5tw/kzoGkV/UvgqcsTuiksIoWYZyLQOF4U0hNV3oPaTykSgMH5OrHFhkRtHuuBq9tW2FQi0iZvkoy4YhJ+N3aWNCnQgpdw2cxXPCNXCqz8w1rAecf8w0aLXvberRIhUmEdwBp3sKKauW8LtYoAavi3lq8LqAD4QkYNpO2MAyJ/LsUVg3ILMqOf2goCPgIcEeMU20zQpSkbUjHmuLXHng4JMn0Fk7PXqgJHSYkn/ApHiycNEZnnJ3P1GCis7vlLn7tAQTSvuolpBN1RS8I40/KOynJWt+ytb81KyPqK6PqK6PqK6PqK7PENC59ZGD6yOr6yOr6yOr6yOGIQGvj+QziF0XyUuFeoM5DgQ8RrtUN3PCIO3UFuHBjyoyg4aSPoFTES11TWsoQ6oIJUg6McWBa9x+SJyahpJ+E/PIDglyz2QNpV9dKCQ/idBT4YbkJxF6KtxQpxZd8Foos+i810CJRZ2XVwg5aY5qMTMQMI1cWDYXmjK6sM8ga2n25+SiRviBhMQU64A/WFRJIlmImoZzgNgajWeOq0rxmtetAYaXO/Tc1Hi9Q8+TjRc89NwgeMVrvEj+JG7jPml1qLKLOkDy6kTEf4yaJ+V2BelYl25OXOnmpLQ6dZxmeUVj/RvwXi7dHJ3b1VEHZQN/y8H97Y2LhOgkGlUM5gIVGPQpY3L6CjA5/Q7B5LrFZIojNAbzgA1MtmRswNalMisWFVYsKqxYVFixx/6GLZu0y0Yi0uALwtg8IRwR7JCPmPI4lsBHniNJCX7kW1LzAUjGr9SHIHmnNCwIGRRT3vZMpm3Dn80WbU3gbpO2bipum7auKm6j7o3YrvRWDUcALbaw9gtc2968haxqi8LZuplruIkuCFdenLmFmx8EzurcwCOYJzF/yn6E/zJ4F4VzjOCeWqWe2qWeOqWeqlMr9TTFHU31mz0x3CFAOIcAhZ8KOTGeJfhznpcrz8uV5+XK83Lld7dc+cx5ufI1lSufOS9XniG58pnzcuV5ufL1Klc+48mVD4zLlOXKOSNXWpmSgprgEx1VBUFZEQSlFgSFZt5xhXmvBew7bf1rOObLR36fWXNhFY9XE/r7rJrw3+fTgebT5KmqBKCWn6GrKgWfqrhqpiM3mU5spsPEE1uZi+gGCelKOxBK3yaVPejamV5a2YSmN9uDpgrKcE8ziirilWDxipOVXRZOMSQEiYIDsJY+nBMfxqkPX4375lAg6U/THjP2WXRIWX9PceaNPDUR5JQQgB0UehHB3ASes7ofr9fYn0FygmFpXo+R/vGlDgkN3DXcIQEh5Q227dlDQguOCeVDQjNv8SEhLSgtG8aHHEGS00sMkVtrDNga+TLcHDHmxBZVEo0qchOxBagCy2RSRpWE08A2/T1q/8AeVUaUQTSRw9Ekb1q3zFBnHqC99irrlFki5rhCzJxPTYGRN/RpvZ9fRaKP3s7fWpFLU26ePn2xdHrTvZxqZ3iRU7xHhF58FW8RoQkFtTtEqINF7f4Q6mhSA6UpHBQ48xn49BpF1fLKCG8Bp1juvJ3FztuIyeqf/KLhDYnd41/5+JA+dNgIIVf4UJ/1hKiaB/bbTw3sNQ/st28KdiopNevhYl5FzokqbmZVObrCnEPHnCFqAt7aVYdTpJQ3j2EkJChg4yyQkDhtEhJMQqeygZwqCdVOn4RqrxMSqjsSEk7K1Meit+hNgUDS1JuG2wVizuhiAqWTt2iRlep15+qWD9+ny1y9U+ArxIpNcMIcOiHKk/MxBMmbI2an8YBW7OWEoag86vjsj1pmP9IsrVmThcjzcuB5OfC8HHheDvznLgc+c14OPKdy4DPn5cDvNjnwmfNy4HecHPiMJwf+/ZahdmYjDdbZ0uxJU01tQFbfqFMUh/oTVtTJrdKUSJ3cLs2J1Mkdf1KkTh7xZ/Xy6mSkoRhQJ6clBCd1clzCcFIn10o4Tupkqwc+XXWym+2Rklp3oaTWnffVuq9QnVwv9ZSWeopLPdVKPVWntpk62ZBoxdwhnTq5yVw8eq1tHSUTlWf75uqZ5aGcOQs4l1k6JReJ9FTPGomRq9lVoir9JiXpN624SoTWVWLUSr/ZoPQ7mmfn0FUifr24Smgxma2Y58AHIf7O80FIPMtt8uott7Gx3CbfSZbb6DX3QUiG7uElH4QEMcFDfBC0/4ESI2vaB6HmfBBqw30Qkte/D0LJmD3gg5CQD0JyHpPNpqwxWQw3/AfOImzswF8ek/Wh+r/0n5H+L6rsydEp6v+i0nTkWZpOiumguirr4NL2+YPWd9hBi4wkQ/SmtZLetHY6etOmpzdtvqTetAnZr/nyetMW6pzSVXtQcmzlbZYcayW96dnQibZenUJnM51o6+zoRGub60Rr35E60dThbPi61YnWhutE/c39FHWi6etFJ7qm3fUY32qnqBOtnQ0S2kwnujkJvSqd6HASSk+fhNLXCQkNs7Oel7POy1nn5ayzLGc9c17OOi9nfYfJWc+cl7POte35vJz13SVn+XbM3xmXF3O+vXk504suRX47sm9RtZOIFnlU/YXO1pjhIqpVMqb+HvFSfEcYXW+L+rsgnN0ywghRIorqpnRsKyjpAvUXWlxjkIuAJVDd3YYXhN6KSkmto+IYtZNObsSm7m/Z1P1tm7q/44qK2CIi1MNtpCGOKAMVT1Zt5upqie4PSVeUZQTP1f2FtpuIkqNP2M4iygV+ke0yotzoF9uOVXcbXOcBJXHQLXdZiOx23l+3UfbV7laFbNsoxetkv/c9mHkDWmctQmE3reNPitTxW2HYmpSTPSh0m0DKS3R5CQTWReQaZqVMCFKcv1BdIH8hdjf1mnYP05txnbIZhjYWD5ptzlr4vaj9TldvwPbLQcdmF/7e/A28/dJCEsVgEg1FZGpUI7uGjV3y2DHUlKfnD1w2ecASfyAt6OHqvKGbDDfyhiu1Ze8NCH3edLiLZCiLjDmcl+gIGaMiP7qKsTmhkhseUgOZUyq9YXG6RgtpcSfSUqhac6oAko9Us7JrZA94zRteHvbcCYPCdzkUvsuh8FwOhxDtiP0ek2vTfpIJddR+lUl0zH6YiXOL+7ZHlpNyXfTGQZPjjiYn5TFdesla6mMbwpV4hYHGLKi2vDxBIhE/06P5FSX198oVUaGGyKs/Q8UaIq8OAGX0j7yM+7UhFAlBwRFlpq4t9wRBW94KanesF7zAsea6unOsm2ZFLqUN7DCNVtAMrJydW2LtIVEXoX0vboti49klJNo6+Ve6EJWiFQXGXThWNVFcsondJXbFJXN5U5tKqEXOPHshYa++mSCs1TcXEbbqm4ttjSWDphtKloLnptpIs/vjXg0jq3EZr4z3eNrqNxS8qOJavkMeBDeraRjatYO0hdpumsYattBKy1ZvaucTFr4XWaQ7REh6sT8uLBS+TgYqkHvKnG9R9GKiao/1HRJdlLYlY15ijHnJoDFvRL12iQlCjnQQsuIjbdjFYm9HHiVHk973YjRj5KzSewOut5CrSi/H9Tg5qvS6uL6AUL7X80im90YQDRW4os9Qdas38JVC3ZyvFM52+Uoha48p5Y1lDHWUIbOZ/HsIqZA1lzlLw8tF7DEXRvPvsQtAfOVCe6MGMGFv1BjMSmxza+AxFSMDGCYyZt13tljXnXHrtmN29sRfTZ+FVEoSORYSn+KenpzKnk6QdxXWvOmn/vRTf/q0Ci+1gZfYhSbgSV9O0TStbbC+v8+Z9e9JafFTs/iuuhQqv1FpOxDzb6BcZsS81ONQzEtXvAbipcteA/FSy/22+nzRMjjibH+0RY6wDLmkZEh5KQThZVqCTwrfLW5ZkFfUFcHvo8aryH42JgUPv3oLXxXRHV1yUlIvtym7Nyqf0kEPaedRTw4nO0UB2ynx4RFqUDCVNDCJSnh0DrIN89Qw4RoOUUPmGuaoIbUNSmTG1axUzxSE1JDUhdpl8ih7f9ii5DD3k//JCyyjiu0Cn/kWufc8L/Cd3ugOavtbanuO28a47a+p7Vlu28Jtz1DbCW4b57Y/pbbj3LaV2tSeLp8WvQt2iH/DWUWo66C4vJ9Th0FxaT8f46tL+vkWvhrv5+N81ern9CFFoTuEqc6J87QsxNVqfdyE9cJkn6OHSzTdA2a6BPlFBkGgp0uQZMed5wM9XV4Qansu0NPlNaG2ZwM9XV4WajsR6OmGerq3qtmCtvV0pZ2utNOVdrrSTlfa6Uqeri1GSuopzIUQqVfj4dOUXggYmdSJhMZPjc8HjFBKTqQJSD1YtbUBaRRHtJhGOxhQS4mPFh+pBGTIjpum8QjJlBoYdLTKNbSWqDjeqI+Hc7QWgeNkKJpiJS0JxV9ib6acJyUOvFYMgzuV9Zyk3OBgxxOW/B6VTHSkx8PBs+YtNY6dqbfMOHTWvSXGmbPjLS+0AC1vaVm76ZYV88Ky3nKmV5U6okM+DZw7GkVHEmmDc92sWgjXyWkRWP4rpAQYR6FyVMCuW7D8P/goSY/dUSbGSao/QnTYHZPXelBb9Wndg4TlCeMOWh7voBFZfrCVoULulWvC8DnaCkbt9LnkM2AUMYy2WrhpaF1uoaXha+0O4L9fEoW8HjXfttHG0ZYI2GEIPix0R0yQIQ9vTGMhqVEg5P0pmSJSlhPJE0qCUydc+Edt5RGxetomFUePLGOhmj+az8cofIFdQFp4rwgeowUqGH7MDL+XOJYfM8s3CLlATbnPduapacJfjEPUlPlrMUdNqc9zYo2cs5J1iAkruCY1XEjHNsZXExrepFUb56tUr0YI7NRo6fcy6vUyZjYZAnqoIW3YsMbNOYLtLbvYvEL7IO2KeOukqGyHG6KyHa6Lyna4Jirb4aqobIcrYuh2uCyo8Auvk9oHUZoO60wHanIlnmB8BKtKGGuPqcvadlOLWJcZvqaP+sIaN6VXn5jQVvoFjC/tE3+z95c4L2XDFIxTrqEN4zdK94AKymOY7S0q7WtKjsHMaNBX9Umys/R2Odfbo+d6JJEGoxlJpKFoRhJpIJqRRBqGdG822qBArZXsCcu3SJxggihk9t8jMwve971pnhCl3g3H8AD1nNdwueM7OxysX3AchVnYDmg+eSS0z1Nhtw/C9ppSYbdgphdfyopN6H6hRlE8Eknxqv8h3ZOiecwHpeShYcqpnB7UTGpBbmmjbHtBrp98cI34oyFrdiJ8VH8E1cK8D6mT6NAPSRTkkPpgrY7gkvVc6oLNUaQ4CtlQVPdnQN2Q4kjSKHFu61iX8JFb26FRHGktWScfYcWRNuXRn0mU7lT/1Y2uO8ZBQHtQx9oQFVP9Re9X+CO3y+k8hp1iiiqGT9Gpmercw3vb6FCICcTugGAKj0+4Bqrwnbn7aS4Zb88Isdb6TGFwV1GFEqFWMIZKu0bzU0do4tUhN08TD8cJOnUn6LR0gpY4OOtCstOAKdLp1fgAXfMO0AH6nkKNQl2p3B0/dCnzlaB0Foq94wcXbXTHD9oBY3cCCUDRQas+uCQhXL/1kthqL3plhpZ6aUB7gyotN23rEdKEyLCO4Fqxm2yYcDjYGXQ7SMun/o6gHJAs7t3dbZlWwCBvdGt4CuRSCFNjpIJk1svu6Y3u5Y0JGiklD5IKYQuVxcTV+D29rSihfesT+Yj6bXbrE/fs7XX2omwCtNBbVXtn55sfVGftcX6kbrojVGiTFjEDkqIGtlSyKxXzSZpD5im5eJeaJ/xhoZWlMxbPUwzOk4IOS/MMX2/zVFxC0Xu2iFOumh5fNBVyNuh83Eugp+2QblONMjQJMt1AB0ZDXTbzzi3w/M4bJoqEXIhnKIgkidzU93LMgmUXFKI9kmd559Yn7Pg72L2ptqFiJAdARXCdz+vE3PDt+gziqYkttYVhOgApQa6bgOdhwzUsInZahPNc4iW5hASXkC+BEuI0USL0UEKeSZSAlRW1zxLaUPLwVFBCnkeJ00eJQKEE4KbOZtCSqSslpppNZO1vUHJRDXGnko2uUg37v7FE3gXYpYtZdZN9JAqa79oiG9o9zaq81GtKNtopnFgtsuk8sHp/JcWv8qHmKKk6HpJObj/MChZp5DVZPGI0TLblYVGW6WRxUJTFPvVNUZYMSYVyQk3lgOCjCIWtTaqm7ElSs+0XZLcGfqi7AyJ7gI7CP9yNzJhvoDMiHfHUkTHKDnIMIZ//wpk8uhFzQvE+/SjthuQAFChJL+zTb1B8k+v79dSJMmWhV6Gg9Gz+pMiQns1fclDiutdAUYlrXgOFJa56DXRwdughUcxzHBkrRLfeZGUL5fb7u8hbIwJIN3SrtIun9ASX8xQH9KGMY/6W6d9FmDpIaXJY9MJCUnFDnMyuRdml668OPi1MDwrb1e5xDdmtXwx5Rbot7qltzn/q7lmtDGihO0kjIB+mVdbCA03xiU+EfK6DUqLNq639GEofVvu5kjSbVwfvE3z+OQifg/YO+RD+xtvlrOC+9puByuLTdmovCobFAYnJXd+2KK2ff00Me+oD5x1yyBt0/FdPuw2pFU295hXBVvUGOEnezBvZkk6zqYTky5ulTxSyG/Jpjk/HzqxnlC/7HUnhQArN/Q2q+euif6Ug/68rgq8J5E25InhO4AR9mQI6gDgp1wRBMFzVEJyV3RRbrulMU6LX2QG/M0OX1J86hV8RBHRCn5VGY6TpHeenK8XfCh7N3yBhSuh6mR+Y0oIoTekQT+lK8fP6C+/T8zmo5/OQns+sns9+PZ8jSC0tX8l8widyo4tScuPE3U/snH5AYeOLL75Y2/3EzvyBAwfQQ/G3Fsj+/Ifi6XCoaGiIVw1zr89TAD9TnnZPzQ0l64DfpTL0F0WJXBT6Zr8fGnpzUFKM7npWCcIclX0s0hxG6FdDQ9TuUegxHtbRcKeKJZwg/+Srg1VWWbI5YhU0GPJJhBips4JrRrpfVhipTy7ESDdEhZGuiwojXXMNGNA4jhWkNjWTytqxCSOXVnWRapgVAb9/Ofkg38A71DWaY9ut7yqPY1MDlEYpP4MXGF99Xz9P3kRmkcv6eU3t4DwJwVe5rhonoRmJDRdV4yUCrmhLZFVbIqvaEmm1Jbbhmur+fCyo7OFmpx1nej43iyKwKETV9Gi2+uO56ucPicoAfI4zrRmOb2eQXjwmc3T0qfdTHec/4TRuWUUDN1HR0OUVDd5kRcM3VdYAklp+O0sbkaKNuq4Xy0gxR+qq371AClZXrQQzvdSl4jjd/5RQf0+/k9TEli1bgi1qD7osCHau/PzPfOB9v/fHh37w3/RAtjWqLCyKox9eCopa9ltxe0yLlK2tCKIPguKz97/v/vh6/e5o6d1RJRarLmqhGJNjY9FYk3QVkXovU2KC+u03/tt//kZyvbrj92pxJ+l00k6TahMUn59757tCPA2yv5etMeZYcfFb+H6ivk/O1cfMHcUnF3/gbnFIWDG37THFQ4oUzh5iV/uCnKrNzb1nKcBhqI7VFiTx6hZdtXGyX+zXLbp4Y94vTr6bW3QNx4l+saFbdClHxbTWdQtXdFRoU6zplhFuWdW3Gd9eO1MExXsFJEc7TolxEpbWLQI3nKXLon3LEotmCpmuJEkGjBHG5MxguO2HFK2FtbcUz//0kr4BV+Or1G+OrOmKTpmKKDYCC9HxXNjy8u+2UE0ZGkvvLkFVQWz53VWorpShOok69k8FBBDTjUQ3cqemTfo8TbZhATAAFO8z1fkuD5/v8mbz3YIag98AHqq/n5atURylPgn8CgndRlrA2+ILaKkD49rq/N2y/SvB3gJrzAFrP0/bgmrW3GtAzal7zXIFODv8NYpPBdlvK7hYAK07AI1ZAPmflpVPy8qnZeXTVVjNPzQUVq65AqsRSLRHfkXDpg2GHV3XjlrNMmXjxCuyA3Gr3fTpGlq6EmFHPmET1Tu6xjdi/Q01Dly1KitTY/WgWxm1iRcNvNlolviQ1fNrfiSDRCRJmJRHHWePRV1hXMcUzDPemYLSel/sL/iIWryN3/3DX9y7XU6otf+nj3/1U1959/ver4hSMcKd9/3ewU/8/N/89Zf/I2GBwYyBFZmwxiW1NsKuzcrPeGsj7Noc9vFYL1mItWm9Oj5aq85+TM/e569Zib9WuWuVt1Y5a5WvVrlqlaeWOOoAP90cciWOdwqQ6zSrcx81c/c4YWeAE1b5YJULVnngAAfcfArLpzkFEImaRF7LPhCCTvTNP0oiTZ9oIjbnOKKR1cm3XxbtW2eEz20++xJbOoXZkwgnQfgprkJc1ZrFFzHHNxZHFb/KPh8FvMryWjtVVnVgmdfc3MSp0vHEqazjI6dJxLWm4l3qf2bs82bskM4wrbBZHAP/vbRYN4/Mu3O2wZtO/AqmY38v8XtZ/r0s/97uShOb78glILhdxjWXdxlkaV1hpSbTH3z/mAvR1bptM46BPGBcvWdUTOzLsbI4ZSZ39btqNHAzqOEPfGUDcs/Hn4B8cTnYTm0DvQZBAVc6ADRA1B4YHq7arPsKSNmuJoKrEcJpXIExXk5Xo3lGOvfRvJ238mae5A2FGupxRI/H+rQz9bbA3pMnu/FMFvvu3N1XbHL58U/e0y9qP57LPqR09RCGXzwsvvD1X/y9e/tF68fzEHn2wt19qn9Oz/7sS/d9UPaL0R+HYjKGc+U49TWu7knjltHtVvxkpI/4xd1oj/nXX//P//Aze/vFBT+ex6SA390nBwl69pFf2vjVfeURxWZEjz/0S09Gm4zo5x566qmfKI3oUhrCBRgRWCJuLlQ/hAQ7MKL7Hv9Af5MBrf7a/U8nmwzoI//j5/50zyYD+rXfvKc0nKtoBBM8nCm6uYiHMzownN/6yDf+YM8m4/nQh5ZObDaen/uLL71t2HB6qXr47gf/8qM+hMJ8DD9N6a1OeQz0gw/OrXwmcqOIVNMzf3DyiFqd2HRO3apfNvGNlH+uXlv68v33qwWu64GoMRafO/rNX1cY03G9j/c5CdSdNIAt+AxPQ3/k8ff82WcU/o173f/5/JO/ds+Q7kHkGnb6x59fmBsrD+C+zzz4qXtKA7igNICtAwNY/ofP/lZlAF/+hQffI4cMoD0wgC+858T7KyB48BeO/8q+0ggmSiO4cGAEX3ts/fGoPIJ3/rf3fPYnhoygMTCCk5/+rf9QHsB/f+eTn0y8AUTokhZCPc8vGuj+Xe9/7Ct7XPfxnb3ozn7xO397e7+IdP9ouO9rn/6keq1p0E5hTy5V+4d+5++eU91lFYSTgJbCO/XGQxsH/2O/uJC+r77Onzt2/B8//BPUg+5VDYsYSagePvZL//j/RdQXulcNaz//tY/to07QOV4joLb4B/TBjZP/9Hc/Sd1EFE2sGlXr7337a8ekmYga1Z3qwRYimDtVn/3iW5898Mf3Uk8x9/TOLz356D1eTzEQSAL1QxokXvnE/KUDHX18/vN/dE+lo4u8jv7yo1//jVJHJ7/5U98WXkchGFbMg2t4vf3l4V/78F6vO7V0dzAEjz3yQQWTxKwRPcCK/KcXf/X9CnoNgxP0AF0++umVEwrmIw4zRvpmmOOGwfDHP770Rz/aL7YalKR2TON3P/q1xxPXaWw7/dn3f/TknmGdfnv9t/eV+uygzwvR51i5z8998r2H9wzr9LMvfPDbQztd+8xHdw/r8+AD7zxUnugoOt1qEcd1+sFfnt+IhnV6/7c/84l9wzr92LNf/cpPDuv1kx/+4hek16tk3uP6eu+jv3DiXvRFoXp5AmO2kqZhuSZvhzodRHoivxi+G0govl221J8EltMAEk6EMFU4ozU/Bic0CirYHxoLK5xBRfY56ans5BXBomStOZwh1e3HZfbXAhcnWSdPfupXBt+ktn9Ue/pddyiZ5wuSfsr2N/7uR0g9/6RkXbz5Kj1TghBqDGQHIv1KzK+0OdUDvymuVkPRQhn/MPtcmGs3P1LU75d9E0mttftkvjhpXWtPWl/kFmcrSGGvYCdYbZnF+NzsK+PM3mUGGOkBioJC5/Pkpm29ZJedrRKPsoM6oMKGXKjXQ1YiU2LFVK2+HalaKbIbsi/ofiXsQ8/e0p9jU8iPWaCYuIxpcnltOiddOKuiqeWcdLW7aq/tnHS1w2qv45x0tcsqawvZTV6w+ybdLwsOzC+7sSrsHbHWeLWAHesCq3i77m+dPBL1eDbIrb/pu70uCr1w1seerWp62Tak51ZfrEuXbFj1I120phqCdOGaanTSpSlRw5cu4pO8MK0ToDU7AbUMkhNuvZeOqFpjvi4rKvU1WdG5r8qKUn5FVrT2y14DYeOSa4AZJuLj4rnpL0J/qfZJxV3ARusngcFqMIbSGBbGEmZQzItd8FGsOYhirUEU04gx68KEDCLud4FCGhE5wiAjZKjEMjStZ27LOu22rT9vx7oJj/CEMy+W4VzNJTrbE0nOGcJo1QHjKfkI/Do7x0g/ROtxdo+RGoLU9iGOO5IahNT2AWo7LjUMqe1nqe1pqYFIbe+itmNSY4QJ0XpSKkiK+y0khYWksJAUFpLCQlJYSAqGpIvRIkMmp5g+LH2c4CzTj0gfKTjC5GHpYwVHohyUPlqsGhumhxcrxs7u4Yaa0gsCyHHDGcQNZyV9rhRXNu2stWY+hEE6OM7aMXIbG9f2DJ5PC38yhEfHRGUuT9JcsjM4F3nO8TzezmmynO/+/hDG0L8elWFJbOLUTpsYPBF9w+LDMokPv0wuJE9r+WZZthOzOe3MZx8thBablkkDSJxZFi8wOmo7PUsDzzP6xLwKR6SmRLQlThiwlFjjtmc9qmMj+3MebepoPISm6Wg9ZOjnywMYovaAk9Z3gqayQ54QUOwa96X40exXtQeHEnx6xnujdTGjXuiLZywBTHlBSsOhVPvugFJ9MyhZ75S2fgnRNIDHvHDBoiTuMqQ5Kc0AIG+vAvJ5/UMX9Ct3cbXlUtDvSjXKabka5bRUjXJarEY5HalGOS0Mj3Kad7Pm+XHQb/jSs6YN+5C0sza8LOMD1HTfNysSfGwDMjZ5WDCpOZISdnaEc5Kda6YUPgASuL59hxxnPhRZnjBeccK4RK8zMTP9uYT9aSkiquHPZrU6GyN0Ge8WG/ArvZ2hhLTsKFNGWh3zWHOCvo2NTJ3oYjl93XLnEwJmcUy9zJ7djBI7y5qdf2rZc53Zc8NjzyRHPuTR4XZLD4YKHbEYGnSUZChwM2oboEiM9YTgPfucd9v0yHZIxGA1gH6jGkC/Xg2gX6sG0K9WA+hXhgfQ+8RiSP79hF4c6328tO/PCW//1ujFTnjHSujFTrhPltCLBaOjJfRiwehwFb0eIfS6/QxiV+gg3uyGr1OIrwWDEGfxrwxxFv/KECfn8ArESXArA3z6JeA9debg7WSdo6NybJ8oO+EjdVFYaEiTJ7+EJzGcNhFvt8cMXWFM9nXB0IJqxx6+GTV9H3NGTN/JnNHS8zInR+Ykl14cAjHra6nHSblXl6IggWEepSigz3TFAGN2xVcECxdUzoCJYGIv4Q+HUNTUD+u6ttB+ZNFIQOTknU8aUhtDAaGZFOuYn1M0THK1FaQvcHqKnMc+J1zdKKr/VOOp9lwOgQyKE55ty5/nHvapUUAtWJeVfUPkKYmvXn6swK9VlZD4a9NlxSQe90zyl5DE596Y7Xka0WSQsXsmFwys5d1x3iD3oKFjU9KM2LQHmVXOjFrFzJhVvGxhOcAOUebjmEjHplCILGLUrX6mYTVBTavPaTk9D4ajCGKPl92XHYrBj1xqBkrT5zRFga//AV26jA6gSKc3Wg76A31dW0oqzErRBQQleHmFTyWLKLGrYQSEOmO5Kd+6CB6DLHjCm8B+NgpgIj039JOCkQgRSk4Rxko2mpiHWtDDtXiCNs+aoaE1UUgOSJGDBUcjLjhKEXXCIpeBZmph17So0M5LyLsmdpA5O7o6eDuYOcqz0R/poLrPbDxMvjaF5H7hEjPvHZKvNaxAOtT5WsPsv4bFi2J3RwrF0bzZ0dINn5451/seu8zWfadeZuq+3y+zdN81mBn6flHiVXsICuR7LmjN6Syqlj7iVkXSrFihtfcwZE0wj72BWaz5CH3i6walXOpVM2jfFXp1IJ6DB71RHnTPefdXV29S/hClHxTMS293LFYn7KTmG8AtNX+Vg/xVgp1yuk56We3imr0GHntFyiNeJ4orOFeLwmSYfUryVehWxQggeTlYamVgJ1se2MmWBnYyTuszuI8dYaQg/n6E+m1qavAK7HAekL1IfSUcwk5VQTNZhUxeBcxEFS5ZaTzpAFh+pAqVJu8ggqlQjTC02cYCV5eP5xYY7Y0LPhMlYGrVzVo5ylCWAhOzMiS16mbZFyTIXf3vMxnvi0zGVRs6CAchwdvoOoWl/Z95KXRwnUMHnxRatWfFSQ4mPOgdDA6b8MJKMKEfvvDwQHjhwWp4IaS35wTixXgxZ5n/PWdCB2c5dHCFQwcfMqGDt7rQwVu80MG070UPUkRS5qIHKQmxfZrpAMIUJp1hAYSZzppRpZizElII48MlHEEYm1xYsYkgNEtFcIFhjpdqMH5wReRWbjSRRTp+8KiLH+Tv+fGCFOz3PAfOYTk4Xkn3oCtRpn52HIor8qRy0Ag/UlJ1SDF/NT2cdc3qlyiej8d+0IvXW68M935ZeoPC8SKTdqnMvgdZPLMCPyCGD2hzgyF7t+BiXU/1kOxqDreglTy+QcSpeaxWwSl69CnEQglNDcd2Gm6odTdG7/QofOUVUkgdctFkTIFdwZi4OsDx1wZ2hXUTzlcBwJFyiNmcAcCsBsCi6AqX3aocFLfmKev9Xh7yWjaM4n9I4NwtHNy38ZLBfbXhM6/Ey82Z8E9/MkuCUU6j0qyNl1tn2/xGJV5u3YuXe07Hy61zvNy6Fy/3nI6XM2SwUYqXe07Hy60L2kj4LLzuxcsx3zgkK3xjTlb4ho+sU1V8nqyifF4RWDCiSzgAbsLNasIEzKVewFxWCZhDfNpl4S1+oJmvMrzG42HUcJXHw6jhco+HUcPTFp0517o26u9QI4xMj6UAuMur28NV1R3kmuomc8yzMLleS5uV2VIuYYo+RwshsBBEp2cjJk7PYtEX3LAdqk71nqFFAS8qLnNSkLMDeVFxNE4vKm6S5Rx7P+WJFqQfUT1eosPkWoheKIXJUTrQ5n1jMmXL0JqVO+aHOtTMa5eSdXao+aBxqNFEe4Qdar5CbV8tO9QcYYeaec+h5hHtUGO+Oj/oUPOINqXMDzjUzHsONfODDjUg/CEONaB8TfPsTROxNw1F/3JmOC2sPFLxpikNUnvTPKK9aeaHetPM+940854tY569afZv4k1zwHnT7HHONKwnh3Lq31uAGMvClL+BzQ26AswOugLsH3QFWKx4ziwNes4sk+dM254i1Erp762S50zTSha9ut5F9UyOaKZedpbZwytCSkundVoueccslbxjFkveMUdK3jELVe+YI2qTmWfvGN5mgCj/yfeO8S2sREq+hZVozbewEjEuVo2yR6pG2YXNvWPOen/OO2ah5B3ziPaOmbfeMfOed8whp4m2SncPjRqDaNQcRKOWVe1YMatt9TpWzOo4rIDhfX3AqaRh9b9Nq/9tWf1v2+p/2ewOm3vZO+YczCU62xNJzhnCDHrHPG6MR553zId8D5eG7wlzrOQxw54wT5Y8ZtgT5mjJY4aTJB/2PWbIIiDhKvMTVeeYhnWOaVrnmJZ1jmlb5xh2k4GPTNk5ZsMTNgxKrPtOL568b51emr4W4kDJYcZPQWHQYtlP59oxHEiJNMCNa88gapB4ZDxhvAn5njAu9Nl6wrhwX2vXccHQ1qzjoqKtVcfN5SjNJT2Dc5HnHM0HnWPWSAT6cHbeYHSGDUZOge8ZjKx63TcYlZT6L2UwMmr6V20w6ryMwahh7TEj1iKQWdPRSxmMrJmMDUYNW/hgmMGoaaWhlhVx2psbjCLfYGQtU6+twWgTMwYZjGAOiKvmALYiCMJIbTJaLw35FdsA8s0sAGy/UVtBxPUoo/ZrrYJunTMDEpdDPZfWiLKJyJtzdN5E9Do0EcnXj4koMCai162F5r9kIt33RuQwmOk1XTohzuU8guG2dOla8m9AQ5t5Tqvbzke6nbyFbO2KlNuFxHsdFkzw026LE/PmrUo24pbO0tvOocBpw18PolOLC6IVIvtjm8GfqpZl3jio8FgbDR0zjk6e4VN6HB0eR1sXdNLjiPxxRHYcUWkcqRtHlKc8DtSCKmTe2NYbvTpAakxkhlR3Y+quEN2WhVhwBRrUphKKAFbsVt7gtKf2GrbvFgpcXTtjkjUThDsV8HQYPHlHvUULF2gG2dYvBvrFNiFPM29nfyTUZzFD+nqmeNAI/0ChWtuiWmxQjUqWkfYfqT7Vb2zK0JjSC7k9BJlV1b2XbxWZdvx0qxnuvWyrKe7N/qEg1MEqYrNXK3JdOzDe2BZagRpPG9qmboeB1cEtYNWxsKLV01gwdAnzVnUzaVc2k7beTBysOhZW2RBYuRJDFlZRBVZRBVZRBVZRBVZRBVZRGVYaMmGV8sJXRnmhj/GhBVdYwviaw/gQNdA8ypNVypOvjPKkPw5pxyFL46i7cci8rikvzInkZH4qtOaRWpXSQktpjQo4GgyOvFGltE6F0jqa0jqbURrqknGJMsKe0GBPaLEnrGBPWMGesII9YQV7wgr2hAOU1mbpdkoNZlNKaxCltRlWbQOrtoWVtJTWqCxZQ9eObVQprVWhtJamtJaFVbtMaRVYSQMraWElDax6rvSPhlbPVQbS8PKOYBpizsnNwMydyAzU7LmGRhjnUfZDvEdTTR2ISpT3emCPNkOkPdqVgDSjor25dZm3L3cu8/bk9mXeflwagRJg1AgMTAP0H9j+vWJ3pn9RQSdRQSdRQSdRQSdRQSdRRqccaVU4vUqg/juyvhRkz4RBc2FU1qqWlYWhlpUFE6zLlpXHjGVlkS0rJN9dGXyc2j5ZtqzcQNaGBc+wclgbVsxHFwYNK4e1YWVhwLCy4BlWFgYNK0vDDSuLfFjnGQyLVF7wbCuHK7aV0ji1beWwtq0sDLWtLPi2lQXPtrLAtpWTm9hWXnC2lQ3hjCscmKAODNnNFiim/k3JrWDFcyuoW2EcpWGdR3ZASSJ8swl8H2ueK0EvLXsQ3KDhWrKNwN9hUcde5Kk18Z6yOYQzq4YLbP9gyRzr+bhv/1it6t1Wqnq35arebamqd1us6t08RVzV/nHW+3P2jyMl+8dhbf9YsPaPBc/+sS4GbAZrLpLIrLTBB0/F6uND052TjM2g5Q5Kxv7BKlY2G3RohSv61LrVpzasPrVp9aktq09lzSrUqmX7xzmYS3S2J5KcM4QZtH98iHjBiZL94wNS20QYgmzrkIM2kXfJQZvI/XLQJvKtQZsINOyHJYwhfzsQHVy3BpCGNYA0rQGkZQ0gbAqBHaRsAOHii+VgWi6+WIqx0sUXy0YEG5DjoUUpIEfjRSkgp204ECJqO5QV4swhhwsPfiEYCA/WFSZdGlhbYNI3iuj6kr5RRJeX9I0ix4PKZH4YcxmIDn4VU5HnHM83M4CcHJEpl62YD2d64aWQmDkpiSdynxSlMrWh9rLwhG5yHPSlbtIIOjkp5ChSV03EeOaviDyEQK3Wk04EJOdulw9JKj6tfjcn+11BInfGals/XEE7SlEG+Rauml1swdiaE1Y2hlwEio4RKHUUm9JcJAm6MuoIuvQUPyQHhq5mCMmBoS9HptoBw6iewsvCSTpgNLdLKhQ4iReYt86qLed/1oANPQVUqA3NK0EZtP5IQs3Y7VBCzdany7D1BhPqwQC2QHlyzsNh6zYqrkYz2fA6oKme9BoIGE6pGGIQ+nGKJeHE+rh8iJXVdUySLxO8Phm8l/AOvzwokBNuewBX2BDVtQt5HVmmOJO+f4ig5oepGXK8b5DAj68I9kvyM8VpdVKeFIQHdPZHIQm1uIQyk/K4IDRYFYwSjTxCSWxxPTqA1LRTkCEMA5F5CstXALqOOP8QbQuQu4IfYIIKyTfPUP12Q6u6oqEi4xQ554k7qJmH2wNNmaHGf0O6oR+Rm+t9mO5b5BNG+RwTquGMsanL+MY7+GTDp2Sac+XQQ9PFY3yD6tdGPGBayROBG1PI0eweTUIj7BMtOQJ6ZA2gXA6VB5NQcHXwVqRt2i5vpUUGiP43Lf7r+i/BNsrspEBzixp+dBMPcEphhVoSaD9Q/Ej9M6ndS5mMa/pMLFBjNmoqzFLv39gWyDKcC6wwVSeL85TLDQJGXRTeRiE/6O+Ncl61YfA96O64vljrVkqNrF6MudSfOhvmLS7dF4JRImipRIBKPiQ53ifBeckuUR4RHpJ80vDIcA41yIYRIvEDeJ7Usn/A5aHQOSypn4VOllevhU6WDxHWaJlUSIGjqf/tWanOM/rjBXEPxWm+SN7RxPjm1DOYV2gAHGUKXvSg+YmwP8Ey3VLSyks0Xc41y4uNZ5eC4vuLI3+tDri/gByqPIky5ObCKuuaDSusa39YYV0mFrYCMZoUHXn0CPsMX3wfa+YvA0YhS2sF2pelFQXX9Fo4F9W6dHZt6nhJalCpAzEOxwH0mwpNkXL0pm3bkM0Lyg0NeE38odl/Q80XQrP/hpbOF7wGYgTzXgPN7ZDXkOrJmqGB7OE1GhNriE15d0v5TT5NB7vagd0hPS5BrS3DVNE5xcr+YSa3ctTJfml2fhyfI2/jpB1EsaW3Mxrdbnc0tR2gQCXtBQrnPfSlx84ER/sIb2JuzYnNrHktG3RQDnVhZbseK4L6nJRvo/yyqDKmbuYU3wezh52uAUDUuf3t4DCILqE6ngEXZEtKvg+p+l1Dw+7tiiPUEEVH6bzxPef6EJLHY1PPb6sd5xKFJNIsexfY1kVd0Bs+DRc6HEMYKc/WatFC8hUY0TOO/bneTpkmqFR4RuKFjY+kSuGjJIJYjwtw6d4YiSm9mm2b7Pe2kCzTczxDbQjjJOx4qC70Vk5SyzyVJ0utlq6eu/hco4hLrLIust4QIbmAJPm4vt+aG7eKC3LjdHFhbrwxGrlz03Dbk9pfblfImdzdjdkm7ivHijeD8zdtBy3bQdt20LEdjNgOQt3BPAVJJFrGYBvBSZaGoqaH3+rvSWw1Ecy6RADxjSSJcCzJCkUgnCQOOS/IqqtLMPWCXcwlH1ECBOVM5td3qklmfyz4Ru15hJ1v69WIOZCZeRuF5xjhBfRA+2K0jWVer0GLVFRzvgYFBjU1e5BlEyPLhvrAftIjqaUBQlwcIEROgeITIkfUDCHDeXKdePPuXn1XOyFrAb2KqtzWd8HABcIXgNJEVcRcAZPI67p2wgNVGziRZkylF2fggYSMkLHawOSM6uKJ7kV5/YnuxYri43yCNsPetvziBw4Q9qDUYZxvyy+a7U6QBNCLkDly4pZ2oocTm8UGraW0/Hl8vcnWHkHmi0k+VM/VObl47u/U3jZa7P97s7dBzf2bajWtkZe8n/HRIij2kUn/P9yt/sgbt8E3h9SAb2nTyiHpA7NPnLiOC8bxFV3AjHkn0CrWCLUidtkfaowKmbE7jDLTIKwluBL8+vkEEy6eqVEw7xqcDXP1lGFfOWYseS18zFj0WvicccRr4aSJoRf9EBoWsiK05O1x6pObcOpVcXqselW8JK9eC6rIvxpUkX8lqCL/8sAuROLwENyfJm60FBBXUPTLPOAQr5jERivd8eX5wO60xkzhvVIxU6gOpvk4OQnP+dDzViA2Xsv94yJx+6QkdAlOKFQ+uqacNdcreDlVOtCTlFK3N7lTLJN0ktibzAmmrFkwN570up/UCJ/KXscGj+TsGzyissEjOT2DR1wxeChhsxc5g0f0MgYPrH/KJrlNDR5J1eDxf3gGDyoO6yuJA6f+9aI5oDczJgtrfCiZLGCW0Po2iNg650tziDXi49/V1oi4ZI3Q5eeS89aIMzqX+Lw14rw14rw14jvRGpFsYo1YsGLE/siIEdAqDYoRc6ELy1S37w21GIGQzNxGpH6Q5IZflsMiUvm7LEccDHlTNV+lZ2U5Qr0S8ytVOWIudHKE+mFVjqC9flCOmJe5Dha1EamRi0jFAIzXBAbnCxGlQWohQr2T6NENESJIw2iECHVjhQj1+ulHpOJrHP3yAxYgJhP1c1yOyhA7ol9tEwlGvtiwh6GgP6h+Yd4NzMISPH/eFxWWwgqGLoYVDD0SVjB0Iaxg6HxYwdBD4aaiwlnvL7GiAhSqiXVcQOITiAoGuxgWRlRYGQx2XJYD2+uSHNheF+XA9npEDmyvC3JTUWF+IA3nqxUVzsFchjkunNGJJOcMYTYL3DwWDgZuPhn6ogIHbh4NfVGBAzcPh76owIGbj4S+qMCBmw+HFVHhYAhRYSBw89VKChy4eXxI4ObT0scJjpk4Vgrm5KiJJ0vBnBw3cbQUzMmRE4dlZXN9BMLPYODmqxUUXiZws+5JBcdLgo8fuNn0pIJjJbHHD9x0czlKUs9A4OYZkRTOFZoPyWoelSWFOVsMZmmowmGpXAzmqUoxGC0pDC0GoyWFJU/jcExrHMxXlwY1Dsf0gX5pQOOw5Gkclk6rGEzuV4IpSQpLnn/lsYq6oTRILSkc0/qQpaHqhiVf3bDkqRuWXknuiiWbu+J6CxATXL9clhRUo2saKK6yR9dW4Q8ece8GZmEJnn/gSwobVVl2vSrLrlVl2dWqLLtSlWU98bcqKZz1/pykgO3RSQrHtFJhySoVlk69AIrmPIcGd9e5wd11dnB33b+5pDBYN+TVSgrnYC7DJIUzOpHknCHMZpLC80NSPDwnByWFZ+WgpHBCDkoKx+WgpPB0ValwTJ5FSeHwEEnhkSGSwsNDJIWDQySFh4ZICgeqksIL4rykcCqSwrlC80FJYY78HL7UkXE1xUM5uya5Jma781J2zVU/u+ZDA9k1/bxnnF3TT43G2TX97GkPG+XXZeXsms+Ws2ueGMyueeJ8dk2XXdMsFcGlm7DLAC8XZ9hMTifD5vUEqVXhkl7eR08PSJd/k/1WW/1hL7S9XJdehLnmNn4c+vpArPqGiWf3syOumVSPqzrV46z000k+N5Do8XmvZX0gGeSG4VyuD4NwlL1yVpegYUfIBIkf11428SPTgp9/8mxlueRsEuc09SGx4JdOXMkx8y5xpWYUl1aombv1Cf6qKk+4pso2jnk7jRtqif0YJoGhkll6rZIwc1W41JKKRAQP0SJ66B6FHt2wcUafOrarpzklzFwVuUuYucoJM2PHCvwsjMQK/PQM01WMn6oSxWSVbng3qCbMjAYSZoYvmTAzOocD/OeeSJLTI/z6iCkxpq3/3gncFRRjozeXyoLRe9AkztWyYn36XpC8k837pjBdLuuQbwqLnZBvJc/ESflWQ6QLlRz1zF5MZbzJP+m1KKHJlMt6WthyWceFLZd1wtELTWeHPKyT4Z8Qbrjb7c/K9bme9oRk16EZ6GaDGhg4BnNYJ1hZELpKF2syFjhHLmHUryn8CSyYUA3Yw+aP00MPZZ/yGggZft81qLkGjwl8aZp6DzMu4KV9IkT2UFSMm8oFrH5JC7GbHVMX2FRT1/qXBQmNw5XBY7TYv0o2GmMmEJlNR00T9rmfgnVI2WM+LikHNtTACEewUaPgG1cGwZsExqj2Njy9OrgaQPok64Cuhr8+eyNEfHlU2Dwxrq8rxfSbyBOFvCxCrY7xtuoN4qrSUpgtmSMtEdqKOdLSqcFDVmaQ+71JVU0FtS4LMxbzScquW8k7tdK4LotzuS2Vc5XFS1KA26EE7J3BxcKIU/JryCVCPghU/It0Cn9CPh9voKUOjJxJZ+bAY0Z0Yg4cu6Kjv0GOkK6mdaL/6toxLj4lyx9U6OW18PHrc17LnwTmQKDH5aMAIwH36iHCYI0rLkrmLS4GZtb+Ywz0aZ72f5WOIVLDp6THEanlM9Sy4rUcpxY1Vm+UhCELkkmTd1BG7feHvGOwCxJJM6bcGrsh2dpy/q/d42bu2ci9Y2LJRm54om8jNzzRt5FrXCyV0NLIWCqh5co3HabyTW+vnhVfRbksObhgTFQnvAVjmjruSbdMUk97LUxRx7wWrlD3pNfCqHDUtfCc9FLptXBLBWB/lRUKBti04n/BCgUDbGr7M1YoGGBT2+dZgDPAprY/ZDHPAJvafpeFd+M3YDD9LgXr4E0G1oGFdWBhHVhYBxbWgYV1wLAO/FJZbGr/aMdUUzfH4mCn3mcgsQecXNgJ9YFfn2yVGrz6ZCvU4NUnW6YGLxZeUX/glycL6Apky2e6D4V0zKJQvgVUN6gcxI8PHMSfHjiIHxs4iD85cBA/OnAQPzz8IN5r7oBjd/NRKrhjaM47jz8idBZoOpfnJM9F2VzIbx/yvJ08hxWjmPT8VSrpmPd73k4dR4nlKtMcliapPjNus76pa45cGnZ7b9t9vWU3dF3LPAMN02Eb52rGDTiYdiPeNaw4SPvilC8wUqrHSV+kpDyPuS90UpLHCV8s7dVzkzFP63F6DZqIPZcB70QJ6ZISxtVK6JaWcK3uI1pjEyyLFZYNaHheQ8QSmyKWYMTa1f5OwiXhcIkmxiQhFEk0Xx6n4gGcSgZwqjaAU+kATtVfDqfiEk4lJZyqlXAq9XGqvglORedx6vWBU1WMquJTFZuquFTFpDIe8UH32x2Z7auRf5qY6aWXwn4qt8trckrsMg1rKvIFp1BG/5A5AOsogARhKfuMgTfOkyaiUnj63nNZfR6Wn4fV50Q9LXqjW8tb3Xqu32RyoHdrTQRfcGRKi0KKEAoj7urWEGLL8TL2dUV4tbdwxTv6Wl67sa1ENPX3ZnViq1OINGS2FOJK8QESAVO4PBa/qK+f865PQKKiy53RDvnDquXAzzwVIPFnSu/8KCJYQJjb5Vvp8hgu99DltTMIPcTVNX1EiuFqWl3dpv4qAi0eUV/KPoIgFyW75LU8mXGZ2Uqh47FWene30DSR0Qx/ONCuy/Fx3a2F6I5S0FGzj7xxBqSN7piFEYzvY/iTdmtN1WPnxnacj6uXtuLtOr8l8LhOpn+8taU7Yhe5rZPE4Y022/JHmsj8dXM7UeOsq87V/2/cRlmddwbdi4D0Y3kToVLtfjdRr44AKbsX46EabApMR/iGAsDF2R+EapkuQozwZG8bmdD39i7c27sAJHVBftGtT6j3iUjyC/Nttz6xd2/3IjW1FB9GvJmaR73Yp7AAEVUaT9gmYgDQwCRqefMmhQm1bkIBdgCR6hZtFzeR27g4jnVBHizOB6dmSpCq5Vm3rnP30Xd0oBagUMcfDdQY/1cwGGEYTKCXFBRb53m2CR4c+Ni7II/u7dHMa2qKauYTdsYpE7xqvlDNtTuRjxTieiIEmuqImqrqt52P4mvdhKCZVqE5gW+mQ6A5QdDMStCcMGDUQLXQtOBU2FTzsClVLwUaT5K8c3M7Bag4ukst5CWuwwvV8lGvd/RqT3QvUYNWQvKoggQFqoITKNBxhkHiXi0TYugn6Ev0gmBiMRYETCBPYOmI4QASF+HuruIT3SaFWBUh5zQN79KJI9QH4mLv7q5EKnKgIWL3EL1nI1wbeYQ/SfF2jtJGOty8Ye7wSJg39pTe2DPkjbT0RjrkjRxDkgoKkYLC9QToup7IXV0YsJp2be14ZZ4M7ctfL+Zv4GkBs7GHnl8KiBntFDvAs4olariNeVfxyLsNJ2pZXl1e4EbTwLzBkY/IazKUFDKPFBoc5JmLmSK8G4Hoee2mbV0BqlCrhGkJtXxtgYywsOEoiTpvkEYponjY3oX35BMWZS/Mo5373tmLDrwjj/IL33Fg55sfVCibMStsMGOk1LJK+LreYm3P309adu9BbocWxbYAVEoqQBo89fO4OPpuQ/6dvJYtIopR8bji2M8MNHdUZ8+b5uL4Tz8VFG8sDuLnCF00DQdMwzfassbJauYEhaybVI46Q7qLSxsa8ualsCGBwMtgQwKBl8CGBAIvf03AqRxN+ppqtnRT19clS9cxYuXquiZJZKzzelIaBlHOVXObDmiEe3jsAnxXKducC+umFDd5KUsLJbsGnfqpXK6dobhCP93LNEeDOqMsBTretiOcKmRXO88hIrNUU1dy0VmT/2BKaxeReZRgG/uATXyo1nyQ1n146gB3CBoRyxtRezDTfFRJnBnpTPOpixenJOnSkhKFVUu9rbU45TTVe+IvNHsU3x3l8c2Gu8XEjtQrCETtRjrPSEgRqsgsEiLTMZEVEQhdNW8lPkOZRTgTiaK+psksQstqMI5dNDgVQiltEgTnUtokKjLop2hZp6yCQxIn3ZY3HkUCFZ1i5UcponldJ/tpIlb8JvLoS/uwpZ9SsWSS9kt5nl7ZgIcPlzK7SsZuhQlUGUE1Zc8I+EQxhkuPEKZySj1xO6ee0L/nX1PmiVkuJV0aazkfCR9L/HwkG0ElH8l6UM3iorH7NgZqXdfcCOF+0aPUlDY9fJ3bbwfsHJ5U08OHCFzm9PAJB8bfDiqSuwgFZSk9vMbwmmUP2PiUoJV9RfBYuccfpaT1MX9NDUtRZy68rPW2F7DHXWpsnAJEDSwqhVgnXckDi7uSf4KgZDK6qe/5EdYcEDrr8Rq2DlS4zwDvGeA8w/lOjqwTBhkod81ktb9qSqrBpFUDaa3S4b2Ry1Aeqq5chLafLUWYAG2O2T/7NKH5ffYjPhh07hF15vxi2xhXNzzj6r6BM44ztC56htYntTPyIvvvLlorq9BW1kVJv2G1+HMlIysHCz9bMrJaY6xnUCgZY7VB4fiAPfPEgM3zWWdkfc4ZWZ93RtYXSkbWJ+UO+bSAxy2HhJK181cF3xXRHT1SdCyLdv1i1imEvi81OyfnbK+Um0Mp+u6AUrIZlLoaSsi6n2g7E1VjmXN2pkU2QxGk1wILSGNoopQDervllktKpXEBhbeydiaHmYfs1ONskoishmW8ooEhU2T9pUdElu4XhFuE7RYYZgkcpMwCODCWjfCDoB5YDgz8afEaddv01mzQQrbufKF1eLXzhNbqTecHrTWczgvaWdBKCYuXnDc3a+GYavzVMITDpjFrS/TQo2RLjJ2G0NoSNUFo392SHXLdmNo8O+Sab2pzdsiDZId86xm0Q4YO4jgivz4hzibyMsTZkF6GOFnbywCfHoT31CC4J18C2vmZgzZ5b5NS9RMd2eJTXa4OK77zEO1r4RVB0AlFIEnNp07fAR1HYjooZE/F6vRUEvxxlCe9lJWmEkhTBdIK1na14RzRHUMVh+uja4tWNwV1j+2Ut7ZD3KlLuI9G/05tl6JHaoHUqsBKZ3XKLFRDEA0Qhy8k5ZuKlCAG19BakdxV1O5Qf5XolWrR6/99FEf5pvr0j/U5N1IdokuSPRXm9Uk5oT4vINOr66xQ5ysBtcFML4VmIuHSEfSa6ok0ifRir1VISMNpcU+/18heVEcRSIJ5Q53okY5HgVCJBlQTC+Ur1HNqorNKDcf9Ninx2nTop8mqz2MUSd7qI+9jwJ0qefFGEg/TGSU2x9e3dfdJjmRVeaxjcgRpWUT22TB7N88v+1l6c1xPjH3I1CqSVqRZHPopnTgf+nTKvYRZF4to/suQ7pqkMSikgtTHcSHUwE/Omp9pIutuUVfjpmiFTg6LhG0tXZ/ClLTALyKueHJ6aNRNCj56Akg1CPHJAEIJjVBBGaECh1DXviKUki+NUmZYTusNTemkvHQ0hg5H3NUvkD/yZtKAKpRLHcpBZVYDhqlZ3ghBkdGPctUlQJc28qeioE+Wb9nJlX0gH+HzrVERkEqVe8tGA+SLgzK+J29qQ+FWp/i469vq5JyP9HGb9kbVd387VlBNFXYrOOy7s8843sglUAym4Y0HzfIGhQm2Ak5DQABbUrgYMS42gItQG3toqE5ReSdv5ZjBtwX+0K1qxi2QFHMkAFhUTRRsRik30yZIm489uqtdz3GtRlMsKwQt3lgceVAn2zINS6YBhMCqLmjY1x40+GzRHMrAuVndXHwVP//+4ukHzM+DPKW8tADv2A5igRzv0NiVb3mUDnYNGhfbK0Yjsu9EUM0pKF+cd+ghLQweQoOD6whpxpr0RhtTgTFt530KTacMe5WbDgaPbdSFHZdm1OokxX7zVE6SSYwyrLIAGegxBjzGgEagk9syjfaEoduXfnncpEsTRPuTki4DPrYR9qtNQ0oRNM/kMKgP+zYfEM/BHAM3xyAPNH7m2DufaYkOCpNlM72aV5dMHfZ348yvGLPeM2RxDQRp7CH3wkuup6guLn4n7O8u0rsLsVs9VkRITxLQo3vSn4HZQlGzOiHdxPVyWHsB3YXibzHpXunz6eCX992pPtGts8ebomyobGO1MmEQNof+hodZHWTpWyjNBSN2ggEJzPDuXlyEb4OufHevqa5UC6UlpdTBqnnv7l7U746okzdMiOHbewpeDZhPQAgFsgrKu2ZQkge6E1KrNwp5M5gXWGZUhDya4sP7+sWSen1GjefH1K+u7e9W/35in9rJi3eqZ2vm2W60xPjnun5xJTfeTY3HXwz6xffpluLN1LbyopL0/qVpWwp298EJx5Bi8LXouK02mTvAYmEJyJHh8DUYRKeI7kLNrrt5JCiOds7HALTI1UB4DHHeuSNv35GP3cGEkdfvIGN7yIrjiDTASgBTokcL9qgW7EjgrMV98k0i4EuBK+ntC7Xiqfvf+a4IAdM1SMojStLh7UuJaCO9yMw44hlHNOOIZhyZGUdmxhFmHPGMIzPjyMw4cjOOzIyj8owb6LVzrntNGOGaPOn2ue4+BqoljGoNHkPrXI8hAqrFjGr1fFThQr2vxAxgghJo7siTO/KGxTtYfa+7447ixRfD3ZRRkmL10uygRAHYnuA9mG0svE1HWkUUkDDP0ZkkRSFfZHC9OmZw6GSAAwc/Ampm2GOeU4KndnoJB6I7eNNzxWmxId60TQ1KiQmKfajDxv0xya6K79I5QpKcke1ATCJGl7K/EkUP/L6waRTpVEEbRo7DBRmlQzCku40N/95+t1YE3PRPFKQ2o8T6tBuG8DBAVlY4g8NeE8FAHVMUAKi4gT8hPww5u2v1YUGhBcizeq9aGpyKEBU5Az2MGtRuLu2KHAj4CjqA3hYibKg/pL4LEBKEpjWEVoNBENUNiAQkMlEB0SXsADXBIJpgi6aG0gT7c+W9OkNJibOUQxfVvS2UYkCJzDtFwM0GUg2111lI4TDYhWgc5U2+wzBqectCqsWFDwcfMqQawyBV15BS0o6GFKUDHoBUjZBN17tSwvp7Q74hxZdxrFuWNk5tMAEF60woWA0fUaCgj+BXFJoC1Stlco+0vgR61FJ4TuRpL9s7wjnJLvyrYke4BOpqQyFn9VgIBP1dfWtVqntIqzw1VO08SY5rk/3smxFZrOD7Q479yx9ZCqwuaF41LPkNh1TDot8AjdARv2FWNSz4DftVw3zpG+ZmD00DJXm1Qi77FcKgy9kfaZKLC07KS2y9CUR87Wor8oOsm+gqzkYFZmC530vAoN35Tnp+hNrXb8PzI9SOgOueH6H2EuQMkexHOOrUYb0xvbgoFqC7RTED3R30crobaORGnC4uc1o4/Tn1pWWbJkPhSvZhydrdJW9mnFpDp5cqzeyIHJjZghyY2bwcmNkhk1qiMq05qaeVnPFphTo/AqWHnS6HCYfs3W+mxTr+SX9abPHL/WnZgCA3LRsSZGdmg4J4fnauW9hjFlFqbYvtZn7wRR2xGG7mB93yqMXqfEwvgfCTz24BXut5A6V/B7E1xFN/g5RE+sKcV4egd0DoTel3KF3AT7dki8siZOzhSbmZm+Te12UnZXYMDD1dy73atM7uf8bLg+s0l706wyZp8KBjYj+H2L5f144N8Pmhx5IeG6twYq3CdShpFKcEbSY4ErXwR235CEBU57vdGCeEUebwSqQMyXctI8Dt5XUhFtrOx/Ls1ifyLB+59YmdwV6806Z3Rqjurnt9hN4bw3t7uyNUpLfL1Q4V94tRr6YPFY+SeKPmq5pei92kAvKDbNd2BuSZhrLPaqKJPm1SDWxMtJ23TmminSET7Zz+RNv+RKlCdKK1O/CNJK1cDykT/JHkLe/rPIpRHsde1UFTTXDkFvi3sFtYn/ZvnR1/Bl4boU7p4H0UX9IuJ+THGtovqhGP3AK97k5ylx5pdrOqM1JYcUYKNeA5i0SYsyOaOgrBq4AUR6jFXnJdhqcOj1adYg7LqsdOWPHYCfXKozIQabxDVAOQ8PIkP07aahWbyTM9NzWXf9+OeUo4tdtqAXKGZ61+26eJM3DiKnA0VDSM8DnzMcCmRZQZsgLOXABvW5uuouTCQpuuItZQGG89s4QJLyHGGF17WusHjRx/0/jf0jpIx2CYIylIQAdvXaPgy0PZwVDmICAmgGctdgXJI0U62ruLAlojU9Ig5JIGIZU0kPxQUkmDlBKJkA8kJRJCwXfti0/1Q1DHICXNlOSXtcoqRmtkihik9ImmGzkFaVL9Yy5lQNy/SbPkUgbNkjPfGXXeI69dqtlbrZVQfOUvSH17+Cu64Tdam6S1n5TT6ovXUKr/T4S5S83uQkFMYPtk32r7tOySOylHp/NJTa50SrnvyaKqdcIG5pl3ELdcis87IirxeQuiEp83LyrxeYdEJT5vjhoGAvRmhZly9nYW7Uz6eZrcI15sPk/uYVk1eB+UVYP3Q7Ji8EZgTF4Odn9hINidU1PXd8jnlYCPQBfSKW5woMthqQNdnhd8MNrgnBdsLiUnHoTm2Tw2lTRiJLWUsohNDyQRmxrIITY5kELMW9pKErGJqun01SVXMvJzacxrYmDQq2Jg1CtiYNjLojpuFgA9gRAyopFMAxuvAxt+05n4G05c06bjjj5ACRSNkxj+LTpw55ZSMJh27TLRYFFu8wqZcLA4t5mFTDxYkvupXyggrJb7yV/IZTnNy+lfQD6iRDtRiXDiEtUkJZKplegl3YxYZPbNEid47WlFvDSt6KCw71ic4vmVib2KZwNYNoBjAxg2gF8D2OXjlguu/s2WiGGWWRKmstqsDnJmIQtum1Si6DliRU/aOHeq16n+PWoD/HQNR+23wS3HqeURr+VpannYazlGLQddCyD/kNghr2GzFfgbZRF7kgoOTZNKS11cg7RiFIcQmbEGvJEpkag2yYeotBfDASC6EWI81Us6GOb+QwoR4Fxj5jFp9mLwrqgtOH9pYtPEhZXYvbASuxdWYvfCSuxeqdRmqhHP3OsEcVQinDOdIcYt9jOdofZXL94uU4AGCKieI+OYWziGFvzjefl0tVpON5YdoOoC2sOVPZE3Ako2Bn9dJVKRRjbMhX7wFOX10n6ua4FbfpqrXyF2ourVnFWdmtOyT7MtKkRDvp0cqRGkeDmve+YhiuvgEa8h99AtDMwgj3oNUxWkdYiG+rAKKDk5r9L+OjSRmPqMqa6FIpNGY61dhk8G3pcvC98O1YGpLDhNabdoBagSlO2IBOGAkkRRNVWStXnPvJzxSX+TttwSPl1SwafxCj61KvhEdV7l1HbDV1zCw1aZ5vSnHvYaLilTrh7MYa/h8jL9c3cetANDyJFzUKbUWIygwkNPds9zz6T/jFKDMJDVBB4CZoZXB7NCWwsow9nXQo9CF0WFRI+ICo0uiAqRzosKlR4SFTKdcw0Yjc7geG76Q2yxUQ1xvx4puW8sB5VeVoLKOFaDykj9PWLKc0OXVEDsmq5wXIkHQaXY1MbxRFMmfOBYUVtHRLaWfdqkPwUzLC0dXRUCcV8RnW0gZ2Y/qI92dNaAvnuqh2is6KZt7kcUKUBX5OYPu0xU/FUAu9SUSWcTFV+khknX8CfUkLuGz1LDhGv4NDVktgEamHRH8OZCQnMcUT1NwQdJKjA6j6FLBEtHCO+YVnfzZGyepvCOCCBUwpw5AkYkO0RewbqIdvvIS44WkWAfeQnUIoQ/wTbrkqzRwFCvbhoQuoaCfBK1Hurmtl5IEVnxjRR9i6ZrESHRFTqQQrhAClEKpKhBKWd/EiKwQi0pB1KEXiBFRDJk5KW/jIgMI4/jR0zQHsuPaEOJPJ4fkWAUOaZPs5rmrDwAHraYPxd+wdh2gsG1jCYfYyUJLXIxchEX9nLn7IgzZLmDdsTSsjtpE2Ttuod23cN5PQqkEMXC4lirceRkUEUjLZV5mDYrqsg457Uwvh4SJWR7OyNb3DzLCE1hat99oCO5DGKkodGTX1yiKP0ILrfXwJb9JTRME4kWJ9QNx7u+9I9e8H904Bn9oyJAak8Dxb+itFl8uDCA/CK3NX1YcnotPl4YcH6W29o+RD/NbR0D1ODNsGDMa6aSNxw/aTpG0nIcpG1YR64/MQJuQaHC4E5/TvU3V4hdf7Up62waX0qMfugkleX5L8Kc/64IToZQiXI62ZNhRXv0qOBWaI9ILD4Zss2Swoxs8RyTTdJvUSyLs/aH29WvrBkk7GfPWA89yhvMZUUpDRXJZIqVPbHz0nsfpYi1QDsAyuLTOgneQoRiwSYP3JLgs/cHI5QVNnnZuJLf+3EmsAtlcvm/N0Lx4sBVYKHWn4pQvjiwh0FOYXZfhNhxs1yUYPCbIdbrENSpHQyhrlYkgP6xtYMMz80d5BAUWxQWNuuaEmBOwnt1ZIf6ig+QL9hKC6Q7WeF8fr5ZjGJltFlMz2bJhH65Q+2iCf7ybIJCKx89m6DQ+kfPJii0CtIaz0gHAavZIQ1zc+idj+xR+FBkD8hzkTWXzUbWXLY/suayI5DarGFMfXcTlOCjcs4GAaoowVkyJ2WOfy7Nfg/jobPvVfr5Ij+fIPsZP6ej8LUz/Hydn2f4Z5yf08n46UB/AKWNcP4jmxu9wOdmfrrMTwlZI/VUkWmRklME+7ZcFh4KMSu6XA4RMCiYIHQVkpDLpea2CknIxVJzW4Uk5FKpua1CEnKh1NxWIaEGipBY8RooimLVa+BQizWvhZUO614LZ0XesC1qmWK0zHktJ2lhZr2WDWrZ77Ws8+J5KWvXqGXDazma9Hfer06gudH7hOtyR7gasXrkSKLRWHo16b0ynLbFluuyLUy0h7wWJlhXl556m5UagXWGbe99TpS87A+fWla8Fs4Sueq1kI7KpIQ3vSyqXpY1o9R8cM3wQSVEzsa5SX8IVP+XRjMDtrosOSiBtyjLDsVwdmhdiBkHyXihZpWA2f9RU7Sh1FkJdJgKe71T7oVy5XK4Ko4quc+GrVDnhegie7J9cV+x8thSgLdRs7p5HUxm8DhUNyu/uRSwFI8U5XGxsMj3lJfjBf0QttKIc9WQXaVGRmfz8XLeIZPfg4wuvUZbXFz83OPk3r32mHVVpygA2GebvVTHGaQQdhulOIOeYstFs38jMoajUnqUx+24CBDK0Sl+TI0X+UTV1XXtGmYuzcxT3EXmDvlOujF4EY2oRvajWPcKuRUWPq9X8p6E+oRciIDWxpVaGlfq7O6cvLO1o3uoPbZD32M7bA7MWwkjHKUyru3QdR03MkKBC5QiCSELuyKzvjD2wg+qhyBpRErfuVsJYruL2t3Zt6KuIGM8WQOjGcQc8fqKOwtyUi29nIvd+Ekb7xJA88aNlGwAYQ69MQpogK+ygPBhfMYiJcEXChYzXYG7kD3v1RtjONfd2YuHdRTtJmMjmW8E1ywXN+ZxV2iDaKFAVhw5qgMu4DhRLB11QTkNCrqBgZPt3QGSl9dLR+Or0OCdnWHi8BNNX4p7T8t3Ce49LR9y3fpaGUSN+VqZVDvJBPkIhURQHirCJQhkmGObgIm80ilkh5le+y0UwpS+Ra1GaobezlOOIAq6gl5tz+RIHZM380wBvN1ncDcNuIkbqKcz3RB3CtytK8hvLWNwoxy8Egir66rwoAVwtwjqcMJ5Sx51Qwq5EnglptGGwKe8DRdQCvsSCu83Q608tBNsF+F15BpZgwt+J2/MwA1ZFLLbQl4YRcbAi5TcQ6J9eRSr62hGjWhfH0m84JTQ7KlPAIMSxouI8aKh8EJ9olXcywEdYkZNxhsDDzvOG4w6COOCE+WL6gXOwVKMYpVGFOGx7oh0TCNtMteBNjYsWtXgeKMmM6omozXMhqRfPpSCWfgAE3jJYA2ZrUl4p6gtW/HzjYZM2dNnLWA1PbFRzi/SS/En6NW39WplRlozDivVRGNUiaJI7qYgKjj5KEpOXRIThCqkbIwndWQp2QV5UuKgRMkupkilOqUTXawG5UQXK8Y1yzQsG8cs00BaVC//wLTxmfR1xAH1Mymv0joQUg6+tYe0EtAY9Bq7OLPINNJXcDKJaFcuSQdCWS5kRQcS5e4nMZJdNLHpCHIVcToQL30M68qc6kNr01a8homysltr5LzK9ikrhfV9fVc7JSm+mtQhpeSyOG/N0v6U2mQyKbmmYJRIc+dWQ/2ZJIV9jRMwsaNC9rSO+ll1GgU+G4RaH1VZl6iyLtHAukT+ukR6XVqPEsowOK/qcooS7TexyUgTPdLEjpQXFJlB1OwJDKR+vEr7u715N3kdy33ahjApJ22yndDCJ2QvjV06twlnu9nXhzYfvuaULKqGtGFwMZYz6qtPIJDmCbWpJUV4IwUWvvAiPNUpa1hMib4Ur4Vmr9fJ27MwBqhmZAhDFNsD/KTpntzOPxjy5DZsY/QkLj1BUxdT3KuoTGfzqqk9ghx+7EUE5z9O4MNZ//gr3pgot0+HPxaRl77O7rOq08Z4aUFeEVWKl6BK5HgRA1SZelRZe3mqTEzuGU2V4jWgyiYrxBXHfaopGzqViTDqEkqnotNwHBDdljOb79elSfBGi7JxmLqM/hOE5yty0bUXDwh2JNzPlRsVaagzJ1hqYAIW8HrCRZCWrfc2uU2rS2yaNkEIj+zf8uc4rWOrm5i0AHx2iUr5AIwOUHonoKiUD8DoAH2tQ1TKB0ANnhsO+yYsQvLlg1uCBPIwGfAjbTXsxdSTtSNStlzTlWS7ISLidF9S+0XWbWc0gwns/y6Vco4XXBbcSXzBeUBMUeLBiqd7ZgpJ4Sx/Hdt/s29Kbf1l46vCvEvfpve0DB1jS80bWtKr2TxhdDOh84TRjcLEpu0wJk+x1CwpkWZCd9e3pc1tArNsrj1MdPJ8IsSS+8+0c3twiWjDsp5n0jk9uAS2YVnLM+FcHrSSJ9RKnoF67S0rFbetPNyxkvCIlYEztlWNOvcfAq06w+aBObUStGlrowok6dXBTVAuZG8KblR/46uDGww6M9bbGgM2LYcHi1JaDg2NUloOz2ncJorwvMZtBnzPbdxmwM/MkV5RKsByw5kDi3V4H5jRuj+j0ugfGTL6h4eM/mB59GY2PAGMWVfXGLUjzezoR+yMOvZg1LZHJj3zSs28I2XTpyxZOknRNV82fcqSpZMUXXNl06c0lgHfJSIxFledSTkyehJdVckEsmjnIcXCf78hm/tSsPCpmV58KRMGpS2gHLKc3XaYhLxPulTIIb+XaIFbNcErOHK+wt06MJmS8yIBcfiWthJEjLJANeHVppLUExbIh7iTmxxqiOejFKVU4za6ls036ngG7mhcySO4kiM1a5jX+UCtdv2IhQEqppLd0xv13clbRmrrbclb+DN+T29rPpaP3vpEPqJ+m936xD17e529jEUj+VbV3tn55gfzLfk4P0LqzZFcu5VrJ3OIpVLxWONdriQ5HSNKfsmp9UvuIOKsP3x8lUF0OzbLWZcyqw3xzDf+2RH5fyfs/53MdIWOWvJcwL04hjwyuUmzwzLv3EKS5Kl4muPjN1LcNn6Nnoq5Ly8pnMy+QoaIxLhm24uXWWGk/g3x7//P3tsA6XGd5YJ9Tv9+fzMte5xMLO2mv2+9W6OLvQx7jTwk5kY9G0lWbGOzlQVfoApTm9pyzaS4HtkYp5A1YzzkCtYBkZgwBhNUiS9WLgnoXnIXAQaPg0gEmFolcUAJStDuesEBwyrEXBRQ4j3P+77np3tm7PHP5Gev44qm+3ynu885ffqc9+d5n9e8YzVPWQHNXCOgtFqgaUcvmvjeDiFaYvMvehC86MEr9qL7wYvuvbx3m5kvw4w9adfZIIaJRpGYnjBHiCIMeoyu7iGl4W5qx05ycZnPK7mZ9s3UrFn85af1uS+uUn7MFE48iIlLX1qVn574knX7pZAGupX2InAacqzTecCxTucBxzqdF3Oi69sSp+Sm9JmLAJxCMYnJfGUE4IwICyFNmHF6YQG4C8pfd0nMAnC8R7BDoQDsGUxBZ9pCm6cttHnaQpunLbR5GvTKLOmENl8xg1cP60e/JIbHi2vsD7AeDMlGGwlfZ8OsXL8JfAZYxWDehRCQONMEUR0kwlmTuJiaxAZekMqStOg1zV6TY330NLNTPrgqbsv9cVvuj1tyf9zSxi2XZuSwbgEjb8wg/qnG3Ru8imWLVrFosio26Xh5KyHxL6kSb7RJmkYbgtpI782fWzB7gASEha6msCO2vJiV94Ji7OMgqhy1B31CQVwDqs6aV1x+WtGxeS/SBLzD7Zt8P2YjS1ovoYkBfMVehKj9nT2DbHNqP8frJIjXYX13WPBXRuE4+TyWGQo79qp/x6j+LX36ncv2g2d9+jDp03ezPl31bsa90YxUWLAJtc3xLem+AYE2U0S0aCY9xSgma6M3CGiK/cLSH7HdNbVBLgkHuSQU5JKwDTyhIBcMlXwaILS+GgZRM0fY0gNNwLxhng7Te2x9mQ+ERbzazwdpOU20IL6FXLsFRcpwfAuMyms6wF9p8QoYFvLnMSxgXYW0to65r8PFM6b5vK5mfl3NGutq0TL35V8HwwKtiasRRb/Ll7qe7S8KbH/eFvFvuzrn1feoA2mTuYDgkH1eizdahNsRb2kr4i0ViQpf80qL4Pv2ShhiKxUSfENJycLlzN65HVPqbmL+rKhgAVOygDneXSOZ8azdzYvYqaixir3Zz1pTeRbY2U8LPpkWB0aI90fkawcl/SjbbjtLX+kkQxqqbDt/Kf6cxwAMRqYkkZLeaJ0uxz5FqrybKg7SqL5E6mGBDe/m5S6zyx3Vm9K3gTdb1rtTwphNA4KdUsETR/42XvKYdVkRezLWPDVP6QhyeFvcqmdkL7P0ERt/l62Ug6rPqx4pMQoUXIeH3WDV68qqh8bIqgf+9pSXPSXLnuJlj3iJ8Pu6656pHq57itc9tfG6p9y6dyFyC5+Z9Xfywnc7v05Llu2m0e173EXh6nenn0e2B7L8vdkuf10W79IXWv5WFC9dAWuzZCU6F5QwEjzcINfl/iYL7anmpNgNjCTaLE4PCnVYUSNF7i+L/Cy4/G63DKZ+GUzXeD06Abf33Y5CO2lQaEcyI90y6BMDyzJ4RLWWwcOqtQwuBQVFY8IHCyG+U/7aZ9ZZCIVTTBbCo6TRf7S3TqxKbeNC7ldBOtcg8CHxYSIkJpE37pWJEOE8ADZCJP6a4cHbcSJf28AUvYnAlBkfl4KUE9EbokX3OTwXzZVfcEEAzZelmlEq7oOZsREqQQQGr6XPRfL7z8QsvJ+PGkEUdvEOxJJzbbHkTOS7Hyzca8SS6zhSZRpZn3gZ8i62ZqjKuTDuKfatCINVzofxU3YpqDYKV7mZRofnwb9UqP1uNfdtUTRbvnMZkSpV/G3Re9TsDNby64KQlTv9gEnMQBixMhOsU5sIV0lkfbguCFfxKe4lRCSMQ9vRjjGYaEch9NtxChyzcverMSv/P4pZ8WEjD/RsjoAjLk695HzcFpFWujzcZxwP/FXRNru6k6zE+Qz/WvEVZ9jL9q3RZxRO/1whQ7cRIAD1uGSvpY9ntm9OdWgN7uxWWG5Q4rNh/mKDkJoN8882GKnZMP9Mg5KaDfNPtTmpzxIn9c1tF8LLYADHllR+PGY0C8hr/dm+xI6QKv+94lyPkmCFxplSmw8Tm/J8AF9Mz13B/s2zitMMyMjyb+Dnf7/y7yW89xHBKXt/IIlICRlCnCNM2eBjylkwUuXDRtYz/3CTT0t66fJMwlRHX4gsgy5egD18KiK50DkzK8IsyVItROHPRL4dBJV9NiggqOzFoIChsstBDuepNVnUDyuOjJ8Q7LJ9N4n/wHbGk94xwQ6uU+vMOUa5LjdSLjDO9WJjfjHS9dnG/DobzC92hD4VzEIuQaRuwYem1zYjw8XIZWRYVi4JgpmBb+1LqiQtbpWrWZZwi/qVzuUYrKlVa9GdbK3KpT+3QYk6kCXYBXZakOxkgveEZxbJnnpHs0WyB8Nlkey5HxlVF82BUb4dPC65H5fMj0vqxyUOJqp+a681OQISBpcCO10zy2wrg5loW0kusqei8JWSLfps1Fox3ooFYw0Tw8tYMJQF95o/r5sDXzvZ2Dhb6K/2tOZVeSmnYL76gT9/HAi1Ot5H1kDz6YEgCF6BXfoMQvHO6LnyjwjP+EFQgjYRZiRoj1LJE8e1iU+PbAPlL9Pne0ZTTB9FDZ3TFv8MjSQVFJzRD/cRmucMcdvC0VdevfGlPVezhFrwIfsU3OFUhvKnHKUBwm30WX1NvEpRd8SJuZrNlV+M5eCIxtUnM46VW81IE/H3LylKZ5XuiqH4IT7jZZEuwJpcH8nmrEVkpDnyaCkTySDhuAozWQ5nMKteE18ANOIEteUCLCXl5+leF1NuxIWUGzGlT6SD1HXqZNro1KOpdOpEo1Nr+zKll+IQcyVhgWe1dPV4LHHRzRr1/bHTzCIeaxp+o8CdpsE5nnphyqyOx8ykPaX5+IQ5fhLhHWep5qpvOcw3EWGiCWBqymAfoKSxCZZ7FfzC5dLKpZzT+dmYygdid09GsZnmyjqeUN7zejkogP28vqh9AdwK9bNBQYWCZ4KCSZlItsBOpLI+8ourUf3f8JCsPmiOP2IKytMxxZ6VMlPMDKlPUkRA/fQvmDqv5frHUX/J1q8fwk876zPmT/kpDl67kLW7d55Kwv49nbU7eC5r9/BM1u7i6azdR/e1tDu5mtUn0cvXy3Snbj4VdPNE5oOTMr7Z8cwv6TkXHcv8kl5w0dHML+kdLlrJfHCSxMLZ78nFPtH0ZzaapH4iFYqapH4ylVUwqc+msjSaHqWyXpruprKIrvkMzReEFW+X+cp6bpRN9dYoP5W2R/ls2h7lJ9P2KD+Rtkf5ZNoYZf58m6N8GqP8rB3lcx1dNEVoS7tEYmqDb+lc1OJbOhO1+JZORy2+pVNRi2/JfEXr0C3ZrOJ4QeV9CSM/PAvq1y29eJfSi3cfIYqxat304gmnFx9ENkl3AsKlNbnGhc4lzDUucW9hrnHBHYW5xi25aOQEH4vbsbnGBbJTukC5SRc9V7mQuikXZzdtuWUQTIdc44nPNb4mYX1SfQ0T1ieNmfZKJawnCji8GXgvror69USo03w1+UaZYhtmsB8pm8Eeiaa/aaZVmMJeU7jR1yd5/ZlvrBUOnDpwzA3tKqe+cVa5eMNVLm6vcnFjlVNrp6NaOx3V2umo1k5HtWY6qldiOsbPs8rFX8tVLt6SVa6yZqz3Bwxs3wQzShjYvvkmEXXMfwtfj5Xt13o6ZVDqkrKRXKclcfJpzl6ikeZhiWxdSpyCs12KKNk9ymd3HV4eFbPFYbhJLozfVxWzkzi+mN+3bI6nzPFXY5TOHF5eHnaqHJfqD8/G71w2F/vL8uCy3F2W82UAyz0X3THKEoamIHcBnDw9POGd5KBZWlp9LqLnvBPPnZTSc29CWcFn519/3/Jy1VlGZGnrupyuyxvX5c3russUzwpz7IL5/z6CFsA6RCqEIqsQqQ7Qw1X5Po7QlWOzQUbmItPoEU+u3Jt25SJNFTm6Z4igq+Mrq5EYEQmhRez3WDBOhD+U8gNWidXwh0n5AYN3Kvyhkh/I4BX+MCU/AMFxJvxhWn4A9f658IcZ+WEM61L4wymgIugQf3bzZKIUDfVqZNM2JLv5hDzgqhprvZMxeidjjXcy1nwnY8EMGgtm0JibQWM0g5aviWbMEwatJwzoCYPGEwbNJwyCJwyCJwzcEwb2CdPmCf3WE/r0hH7jCf3mE/rBE/rBE/ruCX37hCkE17ae0KMn9BpP6DWf0Aue0Aue0HNP6NknVIBhtJ7QpSd0G0/otr6N4And4Ald94SufcKkeUKn9YQOPaHTeEKn9dUGT+gET+i4J3TsE0pgTF78973Z1cg8AfTNL2Hl2ewyuQxGFnwoHKyt2Gu8RO6q+7v6ksXUZpSh9ZrIDWyEVjEa38OA7fH6irfXP8BR1B9STJgNWREYuSNMuUwoDz4EdMTswUNkY1nRSMTUo4DtDmSN27FjdBxyYlTKVt1x6IrRNldkERijS1yRRWmMLnVFFskxmnDe37Fd+pxiGOFZ/B3sMsIHt9CIvN/vDbmnNEVA5HKzjMC43kGAzJBV7h0EGZ6fewdBhibm3kGQoRe5N8wj0SShXuXcPPEBzYQLNHIoeEILyAO/4O8RTRiRo4yvMf+mZkOvyioISNtWBeFql1RBMNulVRDqNlElAVhAFFpC3hxVZgWOSfKhZx5TZuHtD3Q1GFCi5aLqSpMRO111/RAUGIKuH4ICQ9D1QwBab3Ne+nNElQVDgJdipLFXtj9of40+9Rkc5UBtzrHRRLWNLsP9mri20Wu4LES2jV7LZSG2bTRJZYQlGr0OW1JUve4aXbCgNOlEqNc64eo1Tuy6zAlkgjpJP1yNWXLOsQY5JzuSVH0FgGt9+vz6UQ/uZnMRLwxqmUg5GZOiWygSM8HHzeTGt0ufH89+hN//JXn6n9VIdwUARA/PwKN+YG6kKBCB+AKutM6z+JQOfOnntXef0df4tG750s/phugYW2YZKzvGlnyGRsA05YIGFpwgOFdyIFQcyqoN2tCXifYRjMs0L4ZXYq5wxpH3rpFeAebaN0r3EJ0CC7JRIMhmIshGgSAbQZAtSJDd7C5jlsciEGQ3Lf/2RJDNKUsuCbI5C7IvYUvsQp5+CdtQbxnpbhuCbESCLAmiEQmyZPCOAkE22kiQLbwgKxdZQTZisTQKBdnICbJFU5CNnCDbbQqykRNke01BNnKCbL8pyEZOkB00BdnICbJjTUE2coLseEuQ3WJRBU8Ybz1hnJ4w3njCePMJ48ETxoMnjLsnjIdi79YK1tNbLlhPbblgXW25YD255YJ1ueVCacHLJit2ESt2kVPselZGrdLe33X0GNtLj+sg7yERBDB+hwAT5c185BLBnYCBmtkCEs8WcMwnGGPT01GfXoxXnxWfXEwMPz61mJh9fGIxMfpojwIh8wzb1C6oyuamqzgdWwLSACUh8SeCnxU3XiLjXez3mujph8MI6Gbs9zZvtnOR0pd4452Llr7Um/AI+YGyCW623qkPQjDa3YZmlA6asc1BMy5x0IxLHTRjgrfYy5rQDLbLYdRHfW499ehh8RuMBtx8KnxIPAejMW6/lraOOOBo1LBIjlJ6DyNvmLSBO2adHw/tmqOOTVxmxnHUtQnNkJetV5XhS9vNNrReCLnqupMp4USwJrrCnSAa0Z2UYXI0TXj3wk3UTyienmbu9ihdOL/ibjVwr7ZTjblXWlTj7lWmpKjwK0zIOmtfHblIXvlXlxJYnBsoDyz9nC/996A8+wRqwMdV8hfAU7/8bMLAasV5DhMQw6GlOiQnu7Jlp7yiZafc0bJTTrTslP2mnRJDX3CHEIzDY3KtG53IzU/+Cmtdfiaxd1luQnHt5xO0IwTrXuE/xKAnIVj3av9J75K26YN+sNGK42RF/dsOBwJACi0sG1YXinlHVj7SuCjCy8ZE4cjFKvU4kKWD5a8jAarrMg32UAORub3eqC+cf32KsGlw/u0dEJ9zOkhqwiqnyNVt07vbhw3MCgtav4juernR+DuOVbBLrIId8wROyBUQGfZGpnjOPATcf4UZRo4CKphDBYlkp/QOH/rQ/g8/T1KoCHT4KX3FtjQCTL+EjrSP6ObM4E5UyI9aqespR9ciBRIRkVKVEoP7o2rfIKtgHli8Y9QnTj6ATs3p3kGKaLqc0l6bxi/O1fnCXYNC2A8pkSrs7V/B20Cd+jlVG0FvHtUWoBxQut3bOEnXfH1obpd+G6fhutWUpYj1KaD13E4Z0YE/O0hHE3OA4dOLLmiZRyHoxO/XbnA6PDhdGoRBpzLDjA+2M0/Zdjv7B1AsIgDtMrpTXWCI+qN0mwJlHXIVy2FiXgkS/eGM1HUazHKb6Q8CyAoEhGge7T7CeUDTFzMtHwn0xLDXwZREEmXYlYkTEXxOedWZI1pEIulDqDcNc5PKjiK74HpEcly4vzo3VfGwI5rothrkNf9EiOftZJTZMzBiOmB0faFALBqo+6tREKLur0RBSJJ4BQoCksQdOJ9prCtFuA7158gMEuqUor732K4GQs3+mOXZAwmnHHUQM2u0nMctpePZx4Cjqpc+ankvF+vIkjlqhtYSCeTRj1p+PimnUBizjBXAUzpteAYtezLy68w0Cp4ICqZQcDIowLZlBs2d0xy72p+XOL/SnyN9tRkxe151uMtdCV0wk43pIbidsqwkeD26Vz/3GC06TzxmFx1bqxAj5Cc7Omcj5OnYYubPcW63iAPJi1Fa/kPMxa3kbuckudsFLyA4WUD289vlfrTZl9/LV9FFR9dm0V0Jcs12QumvkXjpcJBrthdKgI3ES5D38sANaHOIaZdXTLtcY9rlH9MuJxl4n9tJ6M4rSj8XAhkqm9XXMZJzKMD5kKScZM9QILmd7yUjsxTUrQLu3/K9HP9FRKqk5j8lybM5hOFpPsv2VJnlQDILA4MnBY4rYGPZVpWjsuGWfw1eQSv31Va8BUQnpsxitzhHEe/5ArHcVBk7nDPJ8c2Ztpn91RPZ1TkiBs1+MsdcKL6aPdLuKHZHiTtK3VHmjnJ3VFCGyX1MeMqh1UoYPs2TruOAwQPEZhpzxGK+gIzuQybmqHMOir17gUI1jQw4N3pFW1iQGXgkLczRBDxknRHLMWK5bArWeupm19VzRPERAvvTFrA/bQH70xawP20B+1NvtJYh2yMx7kLdeDpmSpG/+SOzyF1Vr/yxLHKPddQkRLgjzpBYiDhDkm9Jy5e50z6WhSNynpiXUND7Ii/L1NxwG5uxYaeHgXp4CZuwUbETczj8Iq3vhL9mOSziJ2EFjmjXJgpWEnKJh9X83KOQcJJA6M9hJabxFMwvFBZ+QrNFueN1WopA7nilly3iHa8Ws9m84xVntq13Qns9o0SI/+BWM8e0CzAcjbcoUcwecRuTsN5aSaIr08Ty75T4g3KjFAVRxyDpIYXwUleKLWGCmzm6zJVC4XsNdWb0WlcIlXCSejx6XRgUOU1Pn9JvG3bNZBywo+SwGmnCSqX7R5cL88JtlPw4faEo5UtMNbpkwNG6tyE/jeYoZR1EKRP1SO6aZ/brMXdiNusJd2J26te4E7NNT4atv5WLmy+ajDXVNcSt8cTJVRltdoxM0/hSN21HJSQeQ5D6Fpfv11UfhE/MWWLrJFxUIOpcY8mJIRvQlKKtxVeJiFWzz/ec8uM5JuNZbG48t5lqdEmfx7PYaDxtZ/ZTYxjqj06Vh5U0p1e9jiRfmbuvJWFcTi4j6dm5owo/xcctsTBPb0ZETdcK2cHN9N47IDpYEll5PpmVygjeb4imq4wjh5zMmXFkkZNJM4488kJrxqFJp4OCKyXcVBrQwzKJzOMzc2ZBIQM11hhaMEsIqhLGzxEF0Df/wKxX/w+E0qMfIyntyMdkAfvVrvWF+IS7xLNxRolEQTxGFYG84A6JPa5HSxvJp7Ezvu4l4nriF43rib9hcD1x4A7hQDCB6DjPCA2n94gEpxURmFrHCA21dtcjBsVfzzXZQQIjE/wgO+OZITF6TgPFszOegg9kZ1wNqcok/Bs74xLejJ1xMRxzCJq4iaCJt9j8C6fl1uIqQN69tQ4XsD1vrRm+Mk/YaldCvMXuEJhittalA66grXVLRURdH8BoJJ6Ts8x+wGmwq26xPK9Eg80bGux5ZTXYKmKiesr6y/j/dYzcosPe7JQys7SWt/BVLmigpUCdVmsUqFNqjQK1qtYoUCfUGgUKUbrZK6w9HVtXhz2meLuT7YU9G6bQFx1v67A3872suhr5upXNm2N+Kv8o0GE31kdracfXYEC3QCNtj+nGGmnOGmm+KY00/8bRSLONNdJ8SzXSjDXSfD2NNMOIZayRfq1U0VoFyujlVhs1MqfE32tWSf+PJ0glvfiESHT/1NGJsFzqEN2S7LHsKZEV7lgjgwoowl3khbs4EO5AlSJYl83uy4x0iV4k0qVr2ra+aPfiRQgjoL0U0abLOJcoEOxiWhgKUYatjBezYGYFu+AUelYo2BEqyl5/WofXx4Fgp4gva4Setbv7yglLM/yYmS1+zDQ/ZnqLHzPFj5na4sdU/Jhqix8zyY+Z3OLHlPyYcosfU/Bjii1+DLMYYi2skt4Xc50txmsYfr1XcVEI+xpcjwl7XkGWh8RVqSeUJGo0omSVFELqRaQQylwy5ZfIKaqr509WIiDiWzyZXjNZCeK+2aiSrTWqZD5ViWajyoxQ6UUBlR6hUBXZEpF2L2G+y3bGnkQy9jiqScsCqTeb60bzPYaqCnPd5MQZ28p10wX1IyjK4/2Uqk9y3aQUL3I3Ro3UYSMtVb3Dwgh5OxeznaLxy20b/nIr+BroF9X4BUVG406R6yYV4vjEesYS5kS9e45wuLhetW57Nzk/+R5bkuLm5c+aFzDGbTRvWhSMW5x5ytLKfkhAFOcjYnwB5RvYZBOQkxQBfiCRhAj36ptAJ1sv6Sq6MlrS9WOLbzGTsn5O4fw5Zc+/SudfdedfUT1K4UdUpem+Aa0MBDkwguAuXdYXTzweQXiV+RD88oHfp19SI7jtgMtjFxK7Vup6gJrMnwOctvzGRJyd5HEjNlGAxfYy1bwpmrsyiurd19FaBPsndbFC1VHM+XXoa8Gadw8Eb6OGXr/d/DTgNAMp8tdFQDGYwZsDlXRKdx0VuK/pJclci3PDjAMMKd9dgRmqwwqHXIWcKxxqVbinXeGeVoWDzQpp/WOmgJIUGEm753QBOwJImofslWg13+aGQdbjHxJZ0KlH6kpIsPXiDbjsqkiZ1QJdrF+/AOdI/YPXk76Rmel8YKgpCwWkTbWwS19Rc7K8qyIsXJQV8wBdejvGFYa6/p24hux3l9xZm20qWkD12FU/MNKm+GS0F22jN2NuSg7X/Zg9lN6opEOjnOBkKdm/ndOgxVhGQXEbm0/nSlBpGAU3ZW6UZ8zh5xiTBY+sOz5rjj8vx0+a47/g49kUBv+kvv8PHieDf1L/gvnhBqI8Mp/WLnwHFHIBp4vlQbqVjqbM0S10dIU5upmOqjnKLW52tfoj5o42/3i7IZ8LGvILcow+JNymhNu0cvIF23SraxO3pO9aUviWnDhpW4LlFFzwf8CcvARz2U6DSY+P12+hHM/G3Kwnfv8Fm3WLa9bNbqikMU/9vm0MKMspy+V7f+txWNhPoZm/KM3EbKZm3tvRHbYgHW+Y28sv2wRXPmsz2ZGeFo46tiA9LRakcxJrCwXbWZCY5+2WyiX5jebKG/gqTzth6bq9wcMGP/e8wcMGP/e9wcMGPw+8wcMGP48FBo8g1Nlm4tEuE492mXjIsiEWkGudBeQkCA08cRlaROYO8/MEmztKNt2co6fPhM22nQuaHXZusLZzYx4Ymgah8fAmxo5xjfEGioS5BjCYPJNyC8SoFTaaG9FpHRvQfZTye/bC93PbegauW8TABZSEh6ACIOExqMBGeBAqYBG5OwMiInNnBIZwZzCapeHDbrsmfpoTeDrrmZkw5c+S9awk05neqRklynxwTzRRR7oBMqII8wBkRBHmAciIIswDkBE91oOMWG3e4SP7j7Nd42szYW20/lbO2Z68Sqrs0OhHtB8390btwLmXakfOvVc7dO7V2rGTt2vem3m79YfevxrVO2T9OP4Bc3L0A8K79DtFnC6qQ+oggFiSFZA400PspceYSuqoRLAGTcL9PieGNSsvslT2gA9Ka7WP3K6Yj7Pqu424QkoA5+OA7OnSSrmESLgQHlTw5GmarMO8L8mTBlHVTJtETme8YquMaSbm528PCzQsgayH0OxUocypLWNs7Obm8Sbvt8v9FbvZedQX4ANaUddQihWnTwZjNIo9PjYmfGwSZN1OCR8bQwiJQ8Ea+FgMR/lLGm7FdZXVuJGYwD2n4gMtTzAKSBo+IQD4Gp3pHY/M1buReWWpuB7Cffm5uMp/+/2j4ndnn7P/i+577M0R/e/84g8NZEmrivKUKn+K8OwrCDoktlRaC1bd4Agv5ImgoGoOsOYRPxYUlM0B1naAC5a25NVC0n4Ir5iDI9CitP5xUPvXhxZKrKm0UJlfy8XK8pV6CnvLVnomKDlh3SyuhJlKTwUlvDo6HUToRIRvmr7uFU6oZCdfre4q5zFIRxTltyH9iRQpU/Z2ARNxW6bbTZlqt6RqN2RyrtkQr/lpBsCbkasiNz7qrprCEPYiicH5p8jxf+EvLRrVFvzVRgUVwgzfF5d/ZklOjbb1hcJD1mMboGPDdLBEcBQ5a6qq/CChLm5gPZE1lw2J7LOQyD5vEdmHP6ZV/iKJ7C8EgGAObA0KOLA1KJgUDFIrsDUoKJr4jG8mIvvG23L884qqlHc4pvV9A2vS3oBqnSwRQrV+nTCtn46+EZnWQ8g03exs1HDIxPVTQcEVDLBthHfElnbZPQ6kuSHT+g2OaJ3YO4VM/YYhTf/r9rhx1u4XHfxCQVs8wKSCEMc6EnUmYhJpUqxv9WxuU6xv+fPaFOsMF3+i0PFi3nS2k+Bf/pqyHOvnFHIeci77c+yInzE75LXE7Ppziksdx/c5xTnsV4Xke8ZLUicC9SENxUMWNTO/CltRM/frsBU1C6cBOFHT4poDUbPrtQFIi4eVCIOpFwMzLwDmXvSzMdM20Jr1vK7XFZzMD43jnOIJRENQfjSuosAH/5uKMwGa5+6Momsi6S/hvH6Sy4Jt514qsePCO8+XFZVlvsu6/iKX5b7Puv4ClxV2k4r+T4VBAcaiMrMciwJRnFJ0/QCdpKPL0HM6+q8wHHT032KM6OgqUZ8i+R6VdCIMRJz0PNpWEgmVOtHGSrt7l3Plr6QiwTgN/GMc1LZDfqOAS9mIEvpRhPZQiGCpPRQiLrSFCBbbZ3yNp9sCgXmbRA0XSjBHtUg4XiiwwQ5ebqCSC0HJCc1veqkpYU3RBLG65xGtJcNhRJmaIGbyKD6gbSJRtAmiOqX2pKlGIuOPHSS3zcHvITa1KX1YQ1DdT8Inwy9N4VMEqkEopCZbMX4j0zNXkKdINIGE7GkzOagNO01LweLPeSpIoTnD6A9O/BgI7ofD32waXfKT9z7hvOIQXWAoVqYFS2swjRtQPLw4t3f8ot3eGyEav9Zu77jBU8ZMDQBFUaAyf5EI4HL0DnxspFxL7xB7eodYLiK1KbZObgpBIWiFJq6HrXYP8mO22gtZ8GO22qda8mO22kM8yY/Zan93xY/Zau/9FD9mq7EI0/yYrUZWzJiPjQWkT3d0KtkOXiVh/MYiYTzf5EGsjz7YoD+sjz24AUnjhY1IGpce3ICk8fCDG5A0HnlwA5LGlQc3R7k4HTAuTnvCxVfJCl8lK9zwC32RZIXT63AVfqDQPV7WfETKSjNMmF1jKxIk7AHWKxIkfEQxYQiwnS2ANalbbI1H7rIb+DK66nAQopqyYXkpCFEdeGk+brmQAkCwOBKesKTydJsnbWI+W4AsP+JoQH4f8TQgs4+4GpDZJ/XI32v0m1lx4wDZmbBBttlBg8Jmj69tdumdU3lAfX9MMSw98HwdV5ZkJdSURx3LB7JK/q1x54gZ9axPzKwio774xGToV0Qfb3qjkJDqDH4BMLLv9BYisPPW24Zf7ETDL3a84ReDTpQ0dKY8fBosyyu6ktRHZ0ijMLNBnF+7KXCygRb3OHKLGw+nSfIKTJMgqdRLnSlJY6b0KrHMPxuFKanINi9pnDzztEvj5GmpXRonz1mtxYpmp07hvYLCRgTX05uZuoZNZA4QPXCGtTFncxt35rjSGfWYtAaMNUkL+ZyFsGeOxHhsjexj+vwqg983FoPf+SaJXigFRS0pqMnwd2Ejhr+lBzdg+Dv84AYMf0ce3IDhL5SCvgZ8fa9y3b3KdRdy3f1coQeLGgtY6QiZ+2ZiQrwZdpie2cMXF+vIuXfNgthhsGXnh0eEuaw6b5+vo31zvWFWJ4RbMxO9R8a8oXZe5PSmZLES1oChrlRaIZh0vsr2E4GsBt+D2YdtEnPFScwVJTFPOYl5epN1CwU5zCEykNkVjiZsl5K8HI69HpE89Uyrcqzo1wsxwXCs6pmvU3Gm48ImN2e3oE1uDjoDU1GZS2l16BNQIK0oKCgd5uZiBAURJVSH3P6d67ePunO0yHXNRjAbDcexhHUBINbV4Nt1NPum+4YlyqtiaGYboMYxbtetDy4MM1J/7kE2YvP3kPxdpL/jVWmmif+/+eGgGRHz07K5WYYTjg7SDABeFACwu9bU4tJKE6SSKidVF8ntxxg4zXJUTmryCJxW/djU6ZMcCIKd0/+4GtWvq1f/0fpn+xxxTphjGlZgoMPByHkw8mAw8o0GI3eDkX9dBsPhHXqSrY9ILuDx1Qht15xIMQFiFDmK02FW9QiDQYRSIwbM0szVPHM1zVz3Y2vmzhKGI+Ypq+2UlQgpmY9xez4S7QDNy8x8PKb5SM3i3pzi7H5qjin0kIGSsLu9+pl/WAW51dJ/tm8OIh4Fb7V/eS5XhUBaEc12cMG0HZEMlboeaJjrgSQAv5gRaAiLn+F1gsNF+Rg6U0L7vLnF4h3mncJTHg2FgsO82gRnhE63sFwKXJoLTnR4EruTIbvqh0DrH7TI9cI8tXk3qqZQjeDDhYTNxXPDiGYj4ZDNNFnwwGCzauWI20QsoilTfJ+UuRWkUEshiA/0XUADVSmHLYJIjmFIRoihf2jNMgNh3lOt7yTrT1pfVAujwpyOAFOoZUjMeM4NOzUticOI6AwjpllZvKPOMY2yuw7U9/74crEwRx615/mxeL4f+xv+SPDkEhwOHYmVRBAiltd0nlwvxV31c/dezBcgReLvXH3vUvL2uryrSsDQj8BFXIS+4bqM4idiBEvSwYJ8BWZA6HPBjLDd1xQ/kS8MVc2z4uvW/WEk6wiGgD7Ee82me5DXjudpFV2e8OWLltX8+cdsHPEKGINxckYtEOWdogVwPwNYFD4URUGnkfsUovAjicKPJAo/ksS356BrD38kwd2omkK1cEPo3Z+r1GzT5cdTMx2i8j8acbs8mXKqLqwK5W+k+HzIKUfnDzA1Lr4uoC7i8g+QwnTpLyjvLYgRITeYPtaxWUTrC59/PGKsAflAy88l44T1n6MXwPvxkqalt/wT/j7kzSXuBaf7CBSfcJgFECamXv30nz8e0T9YAw9hGbrrRxckQFmV70LuV/tIYZTUu+tlbibzI6mg1XRIwEpqMv1DnldJnQox429N2+kOXO8i6l1cW69WB8jKZO8uARUKY2s+rjl6+bbXSnqtXK8t3o6baHutXqjXtKv8bfDYxugDH0j9opajBrsr66N2QG7CGCwdrIu6KP8xqSfoj3lL/He+/tEFxFWYy6TIfPrzyC9bRddvN9KhHVkc8i2GkdzEfOl8yVDXZj22Qwbff0Xi2fycmY43DiJ7D3PBEXOExTumLdk070aaIe8l/kzeE4tRZKawWUTQ9/IjNEt5EC/vo7z8tJ7Hi5XH2Z7eaIpwWC+a/hPqd0nvZwxy+ce6PoafjnFVfCZskhngbpeP96h+fNcIzub6vHkLyGm3aN+HWS3MZnDnKF5IOMmJfWGY8AdwI9WjXYQC02P86bMxEn9iIKfuK/RlHE94PvIEX8Oe5SVsxhGS5JISxoSpWOP6r95NwQDPPGCDAVIjh9TPvNeUjuojP29LewC1phSb0gJtjhKz1I3MlENE3TZI+SMwqw4HQHpxQNwkC3/jZFzi7CxmIErG5QwvqTpGbhheGgdQPdP0S7FqdGiZ3W2Uh2rA5ohYQgs6nBKl8sY04jXaTUeM4PEQh4wxPqeDgslmuBfFCpZVxqFnM0QlxZ/hwEzF+1ICxoLGhcIp8WeSs4dMsHJRErXTJEaJQGkpPsGSgtoKM9zbCD0s0Wj2bdAF9LwJGt2qfyPCDIn3Fl1Ex6rJwyIGoh0Q8+p3v+dxfFMX3vO4k7LT+qx5YUzRGQutdDsSjXjJpn3RGSEla0bzjS5zsD+Lohu9xiH3CV9HlMqm0W8mzoMSKXam9G2j1PQuRbDea4kEl4uvMx3jYL3cB+vla5jIXivxfdeZ4ShpLFh/TAPmrMi9XtIeE2dujUJWsihkJSPQhSVcG3f8ZOPDgpHQXfO4nmlo1xF+kehcsCQN5VM+HyEWI8a8vLIUetQ1Djnlg+ulh4hSRBhlTh8LWGtxhtFK95ixQDidKaP0La8jPgccXf5WijG9e47G8W7Ilq+rLr+Fdt0u4VHGcCFayFnbe4xfuCLq/YdcdxeVXQQCWvoNQNP/C+0jX4hHSoqi6IcGAhNW5bsTANcuqZ8jrHvI+KodPOtp4mHw4HasNBofkEakcWHN1wUFG8PYO8oDSvKpNva5akOfJ9ugpZLzTgaoJc9lDrsEDa5ZWszJ9CghBhHzTjsC7ylNQTHMOHTPSKMHWA25s8oaUzE31fwl5jUMYwqYRXRU0piKjGUWvGEAjBIE/9RcOB0DnLTAgCb9eRGipEne/VZVkilxGs4KPGjUN83joT4VBbE7TKUfQK7xSef0uJH3N5yLGKk1BS4fh+eimCLvvqANxkK0MXW6dXlnXf6ImfnRDZSMPvqugQ3Jkc/QI9rdbabbL3aq/WKr9oudbIPRFDXFzh/eRKgt5W2sDrSbYOdVz8ELM+dSKdY+rbPBk6puOS+vdnfwan335N2ei1ovN4wZLpvdk9fruicJFcwn+6eFdQ+8ymr3YhzEX1dWu2lmtZtiVruKWe0mmdWuZFa7Yti3sIS4AUvYaha7qS1nsau2nMVucstZ7MotZ7ErtpzFzjHATa9DAPelXG/jdcVh0kkV/RcVB34WvBP44MsjijMxV0Ai2MLD5DXHcjnyu/YSec9pKw4iOSN40TWznQc7c8Rs5/C4D1pbwCpx5DbXZfjsx1sbAVz7ZdXAJQMAsK0Kkcn0WV4THzXjcVU0DV5i52pP3FKfOlkxc3te7l35QkIuoIDqEqPYfUnuh7c5cPcbc/cbd/cr3f22hfc7qjz2oaAbkgFnGms5rVm0VS5pT4NBHnn3KHLGu8cRqNg9klYl91jaIcJHn1YiSbxC9+R0Ict6biqKdkXhQ3A4Fd2rd0XfZoVCyAhAdPsJxvR5xzXPL5vyh1MDHdM8wSRzjEg0RzXPMM6LaNMDAXGOKcaZEWXbPqJZ1OHUiAzX0MiJOGP6eyl3dIJ7eBl37TUsFnAqRRd5qStzzWGCWEzBtL+fIeAWHp4I8pu1gdbvkfudH2+9yTwSgWuXh6EpTRzTLWniqG5JEyu6JU0c0cG3RB/9rxZrCdWmX+VT++bgU3uVgezFAb9fZSB7eQxkn8hVbumI0itoJ6hixAqBJ7JKaZMyAsO3N4xxqdlyYVZNiZaJPOXbOelOXCsWd0GmVWUcOJHOwjNSXqPfhlwSu/StlL+Lmf3BQPaHxGF2K5xfMB3FtSbaLvDrFDX5yig0GJ8i6HuGXbh+6oiLv0ruoHnQi7PXFq6j3CxmUGxMZ7p8hnbkVYeQ5fwjXMhq7Y+1hj8QGxiIgvaRjbjS80P6xPUCeYgBPdC4Cx4A/PTiHWavkxuZ+wI7wSRORlGGvjxA0qGir3vlrzEljYIRsUB0fU0UUGwLN8MIhMT1ZPcD1QESGsHiS4mPYlqz0/Jzmoftc9r7UIlLFXSkI83ZPRRn9+AR4XZxHiPvvWEuVRpm3axmj7Q7it1R4o5Sd5S5o9wdFbT7s3+QbEO34e2+DSQI1xHDk2Jne75gJg15Mx2DqgKDKlF/EcbjlWwXm+tG0i5OFoMBWDtOGNNRLK7gYpfl5U122ZhQOkKXsFeZ6UubPn8RTYnAlF1tf1wjTqRenCD7WcoWgfEefUikKyYey54waxs5jn/TUuT/8m+vglD1id8Wn/zHc12w/e+Ipcv40LArqBpim4rQ02mOXZuyT0anZqOqew/Li1zfE0CrwL43XWnOg6E5D4Y39bCBj9lmnDQleX9CCf9C1Db0cGbJQLpno9Q60v2tkMHeRogPWJk15VBQ8Iw4criMy2+z/FxkZhUjX7LGyEeXpJyb8zZHDhdXATmcNV4dbnNFLLW5Ii40zJRVM96xEBvSqMGmc6uzut3KfwD6prWd8mEYsfBnH5dRZ/GZWRul42bxZbH0bZSsgjMfDRU3meNIMO+EjkNb5khgNG4izA449NDb/cT1USm4HdIgKl2vP1cokpfsv7OM8Sg/TdQp8jSKyuSnWYsLPZeHOSFxZ59w8EkaDvJVZWxXL/zbnfIvt8POhIQJFDb1cjuS7Ygv2eDlyki2Bf23eUFeRG7FYzHVMutWLbPuZMusWzbIL0Ryt6SHPda7iUQI7Voxb5u+7PszrVl7P2Lzy5qt+EsJcBLxQv1uzZBYRN2X72+mNT2nmuHEEj58xrF/GIFfgoTXcnidcRxePHnOyDJweP2bLil7G3wN5Wkl1wyU8HA4UiSxTZwKItUTZwVwkeqpMwK4SHUJ2wba3DbAoc1VCD8H5jzzmPM0wJzz4cVIsN7Sen0Dr0PUYR67lSD4PfEdRbuOqMoGmR9uqtlLiswOPPJyVSoDzhorx6Fj3E/p4JkYrOsGsnxs8NhS9h5GnKfMTXGZbGnCEgF5b6Eu7+Iin0DUKMat4Z9ZM/rTawZ/as3Y+3h0GzAftLcI2tvh9jYw9YmnF3eY+sxh6nOfylDy+DWzjx5hW1amssVACCUffmHEwprwJeXI7JP7IIZiw2SxSc8RGHOCc8EBWzIk+hFTHZqDpoaY38zM3xablQmLoSKElvnGwPbIfLCIgwBXY1ITtWZFOTuT+tb9fBLj5HY6oUyQnnExFsbFmIkaieSIiR5B0HjggDAwgog3meuNkLoznoerL6BvT5h1MkEDjEzyFlP31v0HzL+3czR63HxkIo9M/COTdR4p+3vKwLKEE+oyltYsleZwlDDuhM+BKwnoPIkKC94w0ha2gxwEy/l2LK/FHglKoexF5AoshRq0/LdqKBm//GOB8iJGfW3xTMSnr4aSjvqgZdhXRHOf0KtgFFMc4pviEN8UN/FNGF4ixXdIz9Tim+JGNeLOh5uZmHJ7SKN6vYyJOZwfJcNMkEARLIKVEVDSOt67HXglNT+mI0UjlpkRouaDX4m8j1Dy7yLWUH6GTDyAqphZDFNSECssedIwwo2MdKcUWGJEQoiF1EJ5ixVFc6IOJjCItTgXQJXtFbiYfV7zTvSMKts/TmzA8fhGn0TvY7kaX2TQd/cK80UOB3ZTmBz161GlufZoHB/gmLk7Ob+V0CoRVtEsBkzVhvEebjNfFM1l87rfQruKmb5DGqk5GjEhQoUR+vUL5F7/wRsJ5IscvQeoprY1if20Q+ynqE/sp0brI/ZTVIznGEK85uvoMAVqz32ACT5A5PaqesDdlR/Ubp3pCjRnfizWKgI+G7tl96qoP0eZO3pQzfYPYqeMNYhgU08Ea74dwghQ3obM1sr2DSRwJXN0sQlQHLgMt56vxu3rpaeayYIWMGwcuJ2ce5HsJrJko9QOsTFyMlIAUs28VBHhdTDUeR1DeR6m9Vcim7CU6pkOpgm6mAP/ntItgPuKzfE/4NhMbW2O/zmiuV0DrVRsH/JcJCyn0dEX6mlEOAJHaz4R83OBrsTVGE+8ftKLetTMTqOZ1IQOjbGKo9S2tbNOW7lamibmW8uDFiVBS+OgB/RBasku4hs9Xf8ZtEFu9viCWVq7+7cDlLhx4wHfrjK9aG7R8zy5vZAntyc8uSMNamDz9rbNA/KKPMalAOQJO4HZUWVMBBvzYhizjT6cO3GTRFi7WaHCWRFV+BDRxuEA2BAgtavBeJPH9WyuExYlT7MoWT8gIMCYnabsSgbY71bR5P6Ilt9TNl1QwpGsjysubKW7PSUiIqdNdcGILpRSEzENIhcPWS2mvJdkn4c0y9ormtnmjCY9YBobo8mYmkYzGNkrfoiv5Shaqqmbz7RxsMRPFCSiyaQJGZv1hW/vsIbp9fPUjPulGYddM06pAWHtd+on1DVmVCLh8nsyzJTODbzchv9B+LAZOB0t6APKBbyyDHq/T9vDBcs++DKQUn3iFZZgG3GWz7QjMRW9OYmpfJuLqZRU8B5+cX9QQGrLclBAesvFyBeUEpfpCgoflWllX/02c1Svvm/V6EEQwX/JHDz7PmHvrDg01gb8Zs5R4QJQRZo8EaTSFZf78SCVrjBIHQtS6QqTlH39AcWqeUWW7/SscmmKnlIuT9EzSmRN0zklAqjpuLLKQ3vWaMoRYIb4lBJtjauH/Lp8r5CElx8UMvVyKzwfKpWcDUrcFAvH18y/+NZ6+ZfNuL5evgAa5Id/WQb54Ryi8WKlzEryLbweR+yaQlKC7ZR1Pae9UPCxV6HI7Lg9ktDM5F3wEQZkSCSRDZZgI7JlzJpqmRIlXCO24ppZzJWL1ejgzCzwZntzwpgKxTQVimkqFNMy+oiGyLRuxLROGKsR3I2qkYEuiNXIEH+Q95xawLZoSEdd6sR7OLDFqw6CljbXwXZiJDmjki8MEjI2Z4iEybCPsoiH/PaBiKd03GvfPKHU6EZYsXZXCHuKI2fNUd6zbbZiX2Gjckjs65BsxNEAEPs6pg3FGrEP9/Nin+8Yi27QHczBDicq4IST7Bq5kgJuFmMkvVfQJ9TlrkUVGVycYIhWGJFpP3eEWtlx4AIzHEPpPDaMKmxH5AdP253BDmGOMK41UnJsZ47m4dIyXPGa4cq5IdKbrDVcGZj51xkuS3AfrTtCEY8QDx/ydWBWk+xcYIQLtKAglnYV3lsmHiQ+Etp6PAzIPM/hGVaWpsc1ZOlnGuYc+GVjpow2O9s/xHzCJoFIi6ILFCxbXziZcGLpVySRsVhg7pY7EZlV+T1yFcUXheaXhGkrQvNLyp7I0PyScVFofhF/JaL/tWw4sRhj3JZEPJW8ksbeDBN7M0zsQv95tQhbpl+BlgWGoZfaOM2EjmIZenNFWHNrGIp52Q/aFhInZv59oFGUuvpYQJtOWOm7yUYUE3+edIb4JbhCTuYiyZFylF4nrEW/pX078GZ3k61z0j9aWlN6c0yrMQWbWVJnZmHTC8YjqeVtzKx5GdNr3sXUmldRrXkTQbuKNe3qBO3qcrtmhEqUIBKpI+3MHFtn7mg6C8fP2XHEnF0+QvJLYVyIxVz0WKYzgVRG4gUBhIfQLJzsiA24Vtg4HUnvHKNHJJ2zBWRJ8wzGyF0Tc9diZw/F0XRVPBKY5a+mkLgZscqLW0XiTG3iIAqhRdQTxUWmtK/OmhWJbQg2YxBKeIUibOuomFXvHHUOsiDE7DE030Z9/DAwa3PnrR+uitk3HZ6NDh486F+IrddBva653cDU65t6vtJk+2ZG5TWVOkGl4DLKD1+x8eSgNZ6oZPeGrfVNq3oHD9r08nEYElfcPJB1EKN4i3dgzDD38ogcCNqPbZ8Ct/EFUdRtTFvAzJwE3RqVShLWkIc49vG3Mcffxj7+Npb4W+3ibzWMmS4vKCWDIQE7RiSuZq55ru9iw3UQi6sdu6M0fsg6xtVMLingkIxoozkg13mcXhxcumw50Yomc6d40OjjN7vO/6VYnFw3tPf9uUpg+jkaUmfDXLeXXLRPP2Sqx+XvUWyGqv/Gn5rN/QTE08vrJ82f8lMJByOfgm3pNDNnqqFgZkwHonKn3+wmea/jtO9X+ATmRh7fgVwhsaPnLb+c2Ism4Jz8Lo4ZKeFJJnd75NztAkngd0QcADs4fGqyoq+WsVAor8y9ozeqFUyi6A3RLyiL0lkRLpzys0SELAniiwGd7ZDoHdL8kKpqmHDDbh1xciR2z2u45yMyUPOOkqzjduaoMe+e17AfRFvkno/EDc6uR9PgH2D3fNxwz8MCE7Xd8/C+RqZtr6x7PqNVfSTt0hx5naznng+CUNHuPQMKproFsTCJ3atJDLBTiFS02KYGiYW/y/x7Mii5QPPuWl9wngqu9gVPU8GVvsBOVSeSyVSt/w5fxBRP1nr1QXOy8ktWKVYeB56Ck78+h9+/hSdaff8vmJNjtnL9tz9F/v2H/jcfjX9UWDnOp6oj5tmc3INYljiGeh9NPH1nHf+wROZ3OCSpA0s3hGiqHN8+KuZHPWZSAFFBb9iHoZbgO4j8MTt1re8yO9TrqnQeUcrZwlz9L+X4Pylz8p1y8kWc/Cs5ic3x49EcvVR4SBCjj5sNEBf4sm4Ghb5O7qynF0hj4BYmdx14eXcFYRdG69qFaoBg7Zd3N7L5gYlAqAeGCOO7Z27UN+PMXh2mQ8iJQpqsjXV8B4EFqUhVPaSwwLqU1d/5hiiGYnVVNBhpvAtlmqaCpqmwaSpsmlrTNNMqHjtzuzFzOwzcS74fVNLv5Fl2Ld1xnIbuJd4POtfe7W+IsEjDVcJaFTRUfMA5GTZ7z6ZGiSKW9Ypokc0ecChwCsY3Q0S4Gdv9WwFMMP/cvP3AICW+/1XzRSBENa2fixbKC/EsUG5vWvjwO4ddStm1k+icIPQQ+shoyvfAoFEV9+D4rR++Z5TNLv7PoF8BN1XP6Onx91XZbGT+uXk7h3Rq83nBCTb7JgD41GGAULvmLxFxmT8FZajEt3ezhMG/lbPpffcAqqY5WDLacnzoHsTFEgSk/D64Milyb/w+87TqneasOrxMgDFTW6O2KUVBzEWZuRwIElM1Iy4vU7/KTVNmkWaiAPSC6vXoQbRgJryv8ghVMY3SfP2mKt2+zmhllGeMhgmjVUIqpeUkx0AVGKjO7OL3ElKuuIesAv3lYb/qUJ87TOQgje+jgTQC1JQUSF8zdgWNXWH6awYto6Ec5jR2s3hqh6vSW87wlvECsAvTGJs/bzLvVMCT5n+LWNPgeeFX2UULtW1hFy3soCEd+1bY5CUt7DRaSEOYyxvuUiu7RgY2j+2Hb7if8ChrjLKmCxXlCJpl6bE3zNARMtKTv5yTbpGek4mABgUJOe2QxiRTvcD33fyPV+mB2RDHYhVRLP+sonzcpjFFTy/Wpz+IF3tVpEZZ3dtLFHWgFcnq07+5Sjskkp4DrnnsBJ9j5OuL8mMPrEaW0chsHM00Pz0WyzOfRqhHaYSQH6hvukwwRM6+NMr3DHocN17nBzh0PPeh43V8F/iSErMgmhW9N3cT8TylDAWHAJdT/lTeOWtQCZz7jVUJc86RDzMF21sumNNa3Wg+nBx2KsTXplV3fgQCpVHnRvOpmSkkIkcKv26n6u4fpBy9myHb6fxovCr2DXJTsTtXjclajKsoIwwxtmNRqFLLArThMGQum1Kfup9J9zN0v9/sfvkteGlVDjGmwHsEcHbavkuaLlo4TTKvbZCfB8oJAR1ILeC/bOWMSS8gjan8T7RImONtSUSNEqoBI/+S9EoWSfoRFrc9AzovmNKwn9kWrUa2SWmvxjs5714EEs0ufcSeGTWPkgyiuDyBAzOs9dGPCHTRjNuA9Ylij6TVYcXOdS1ojNArXU7xTj3XO+V612y5CmrDDVOe0z2j5bzn30PQqs990GYRahe8P2NA9FGXamxVSz4rdb3onxiyE3ok2Oh/l7CKOkOJaKjK1eIlsW4wYGAsc6XL16aDzC6Uyk0HuV/wMqswkx36W4WZ7Mg1cC2QMpRtKgqXg2kxVUfNOO2VVhIyxGRpCtcGjnPGeSRm5sq/E9UwyAptw3SOBJBHDtEJUZEMdgphkbvnCccZACMlxGoGo3Yt7bUC9bu1hePMuXj3C0P9shaOc/cGUL/IpcOK2oHnUTvwPGoHnguQL0z6W4QKd58BkFRoUZBYbS1FgEAfh3Zsk+BdzMjMwsdM6eBOaG5i8oo1z3e+x+2LgHiMOOOXspFNTKKjxQZxVAka2bTqI/9BvmuzHRWLLIJ12DJAYO0BGc5ptxyQXF7UPzhH8KT+fvPZ/098/Ilo/wFzVu09sIfk3g6DtszBXtiizA+jsQNmERxA0RtUWETG7lgAmhDturd4o6IttIN0LDvgKwHRQAfUchN1CnyKWfR7zDVmNpd3fnY1kki1rH7uM6uRyx/To/BH07AqB02Z/3xMG35kbtTbS9ynPbbPY8EvjOqKFu43LcIlZkupSHcC9x1kC3NR/eHPfuQLGk/rQeW9Crzkativ32uaMRyzQmrDEfJz9BOBE0zF99AZOt1H+7q2fSkMcOZhVZ92at6V+hwRYJRfItJL62n8f//2EakyF81gs/JnjhBQaVo+TjczWxwh2M1T0GwsyvPlipGC4DsbZC+txf1qHC0ety02d67GpcUg+OsS9Zep5BuOHlFKciMt0fr0WdkYsJ2GZ0Z72ujMzBsY7EzfYn6RmBnMx2JeTmxmVbKbX05c/9Rn3fsnar13m3OJ2uiQndq86X8iQJ0Rpzp4qygufzosAgIF6CeNPxOAJnWAfVLkDqpTSBvkHBOSjMLZtxPO9MXge6Gu6gQd4avMNzp4A1BGHZb8fjJ3qEczQB0iijGtfI8eaYga44Ru2QTzkmoyL0HWUddvr2LwGYF6x11R/5gRca7fzoxLKTN7KWafysDslbSETyWMXhmxbRqBddnSVkH1dRxWkJrelRqBKsGdcgR2mAm73xQUYI0zIj4RKZmJAkarlPmuiPsExRmxvyRzN1G0jNFM7l0q9m8fpJZkPSE+MBCsvH4OEBy03SyuoOnJEHM0R8Sj2bxZ8W6fg4MjoXd9Mq1zPo5qs+KeTNmRcBgkToeF2QrEiMzjVD+M8of/QsiaSKjU12/HL/fjl/vdL9jiIvql34FMlYIWiYcXXYSkehL0JDj4E3wUif3zNLQxxwqWYftNb/SXJPaShO+aMlkYXUCAF+YXSwLKLn8fxqg1W8MQNHNHQCyBXGTFBw/DsOKZedjMv4XonIOh7dACsqAx71lmec/4yUhVLtJZhxRrcj5CMiKipj4YP9fnI8s9H1kmTWQ81Jre2z9PK25xYQrMX6S5j8s3MKsV8sXHNJHqu+uDNFO3z7HefP12swJVkciGXM+VX15xbicNf665CELkx9LeI5nucFxNOT/KmAK3QPoMQbrKf477VhH3LUm2pn0/DFZPbC6W+zapyaON+HuCGMbDNEzP6rlv0yo2E83oTfOURVLv5lSJcZWu68HQ7MHQ5MHInAcjYw9G5rhvM/Qa7ouMuW+7JKH0qFVxwH1rVmmjGVNCvyz0b2Rt7lvTTuqQWWo7xH2bEKK4Sjh7fUpkSEz6qkw3DiFyDiNz/XbI1jeS4Z+SdeXfzgSyUPFO/ZVT8XZCFSW1fH4I1Ssm+kjz0bPunHJjk5rzwlk+2o6dk2v5aDu8NCvHRxvHzWZ1uFmdTTRLWzpYgYt6Olhqi3BXkmNKA2dKiYXJM6WlwfZlJvwyE/8yk7Uv09HB4i0m9i2SxBLQwWZtOliYxhlsnADc3JERpBcjo4iINEsKa/a/eexs65PCZhuRwn48UzHFlCoLcyh4b73I/hQXXMJeksJnlQzyGFhsw3UwqVNSyS8n1i+ONQ1Ut+WnyCN+VBHU4QxZ4o8SiMJcIEo6O4v+V6Ef4yfevNYvo9gvE7FfJoolSI5ifppcnYFfRjWr2SPtjmJ3lLij1B1l7ih3R/B+gD/Y+WVupvybYE5kv0zEs1X8MuwwYr9MBL8MfV3wy7yi7UrFYxT4ZZR1TDXHqemXuYEUMDPyTq+wLJeco8IUXIu3PuMzrF7tElu6fKbKYyUphkR5qCRFkiiPlCSgQwD8cNkx+JxI0myolXiEPJ7TeoSeUG2P0EnVdgk9qto+oY+otlPoQ6rhFXpYwS309M+uItM5u4VOv8ecnH33Rp6en84sk9sqWyMoz3kxV/kc26xgNjOO9ygQEEGYISmb4HqDhOMnNDuZ06aD+aWFNLYDGqmphCo5E7XaOmPbal422ReVNDdZp7kNhZixG3GQMeW0RIkCHaVCIwQZyMBHk4eGiIJbP/K0XzPMbYOgzF6rD9NkVHNhfooGKGBFcdiQThVE9zEMoMV+c6u1vgRpYbCUBYlggAkK2W6C13KC8wO1vPhHVN0TcXyxSu0QYy2VXJiKcRH8aNqRU/pyd1KuiZR3tf6shguiT4a95K3w3vcpZT3FRAYWgiAmklJjUgAQpc2EwOJSYyqXGlNXfYT8a2zAt9a/R3Y2fqn1Mzh5+LjDCJvhNi2K3GRyWTEtud0qpVr6LXwPlIRg95wY56YYFGeuadGioZezHcdrtllGpeHA9OZN6zGQvAQap8HysE/y3MxCPcOUwZjS1CdlKch+ibO3YX2NpaACtmTWobZn3dc56z7LWfc9zroPcdZNaRm2WUcmhLv2OGcaHt33qwWiaVV9/ucluwjYDCZE7KSMbjkZ/Y1kfuHngzRsFpdJud0KHHeMJr4UZoO7QhwJlOWNEisguOZwWAVvmlK3VUHqtsqHuxuV9k4ObDSHk3fCbFTcVZu3Red3HTiwK9oBD46v1qVqXVetK9UQ25T7ajlVy121XKpNQOTx1TpUreOqdaQa+EBSXy2laqmrlkq1PnQrXy2japmrlkk1ov3w1WKqFrtqsVSD9pP4aglVS1y1RKqRoTBIU4Zlz3w6xzMbAGKZgRnzV36CWCSuimYw9rFZT7y1YZGW1usHUd1lTdz8T90E++tV0XeQlkAGy7R8kGAwMwNGKjLynCrvp5A0XXc5liXZ5eI6CfBng8n7zkhihEPSTxKWjPMbGVpzLXa0PZU6wFaWCU7ELPfJQxFGvzEK7k1uOLNEoR/z0IEJ7k1L3VF1jW7VJEU2YTghfuqRaCERtR2SI+7i28M2z8Wls+o0yCGsAShuZA+3eMgm1XCYgZxlhcCEG4sbgXiSJbZfM2qF4wdlxBmQdG2PJMJScmtbNGUsW5XFVMayW1lkZSwblhXAMofI1Ov0LRURzr9MxnL9D3OutSO1S6Ht/8Knqx/l11DRyKe0HxVcdLlPez/qcNElHqsz6nJR14N1Rj0qglB17ah/jdIiN+KhJDHSs0hWLPhoB0CjSl5dl4/6UHlwZFZL5eONLY3u2VTH/MUcV5aTE9IgfzLsZ7mb9jyCDkPac+6eZ6jkYdUMTNf1Q0HJ2SiIz6GSJ6MgQIdKCHFtI3Ssz+cgsuvZ2G7TiHeUf63wF8Bg/a3mBZvj/9E19tfNKn4n9C3JOUhNvio6CEewcv6aw2t8OqGXh/0+K0HJORvS7mUSJzfudoMxJEnhIImjx6iE/FAoQghsl0T1u6ziU6k30tuI/UdIAdlY89IDME/16LJCGF/t7HY+HDu9nZPEzm/nJLEAYuckcSqHm/EctB4uVTzWMxIJxbOb3s60j4UK4uZdhjofOO8y1PnIeZehrgjk6ifsN2Ajf95sYdK+iVc6mPQVDia9w8GkJxxMum9h0sBIh9H0x0mU+t1UpdDRT6dGwyfoWMQGC4od4RXQbNAabHFPa4lxI83jvFEjz2lnJqPi8s8UZInptryIJFEkC5LgQ3aJVgWj/1l5UWHOrVuHFxWuNKVXNenjp9gty7kwp99OHEaR04saKd0lD4jw7Eyznnoz66n2jnj+SbnlHiTMmz70iFyN6zR1ZkVxfheFj6H8c6gwqxu0+SEVdOz8BpWeCCsd1etXuhhWOm4T3CtEzFF96uAx9fZh6lKixND/HVn5fjLwrDcU8lLW1Lk2qMO6w9o6z/qXkvL3zbRKGKfjmqN4PiJN3AMmwGMKIwrxQfrypJaYSXPFaW3nSVB41haeTklnL3/NyIXlr5t/PhBqAkxxWO0b9bhlU5xNUXSCIKd0JDqBpEPcbMK6IfhJ19UJXkKWvLFl8lFqpxPQW+DMo1FTJ+Akg1YniJ1OEDudIHY6Qex0gtjpBLHTCUhSo0fEoiTA1ko6QSTJ30Qn0GIoNAWBThA5TSCthE+jrRNEThPIKxu31dIJKNNhn7WCSPSDbtVv6ASbE3E3JfPv2JwGMbk5mX9icxpEuTmZv785DaIgo4OrpqmadtW0Uw0ip0v1SCI0X0Sv965M5xIC4yQYmBlUeRMfBdFm2JWPKY7hXsvYsxIEZkkk7pEgMEsicQ8HgVkSiXuyzdjzRJuxB0JPz0tEXS8u2VjdNmPPtbwhX/D24lHwO9p3u1hQpNiUHFN2CzfdLpdJLpkZOPvVyXBfJ1wNd5PNhywRdFy0FJHxx5X2wq7mvZ8Y2p8KN3HM+NTv/127/5N16skoHKqS2fpFBuhbpZ5MVifDNLjcPsl/SwGE/PzTNh8qx7d3neWk6jkzkrWnYHTkbmPt0fnnmHaJkQKWxSiGdbGX+Vt2Rt9xTYQNf4iqnzFtYl+6ql+Hgk8EBdtQ8IdBQQcFj9uCOrbrG9vHSGKZYcu+k8SSUIVJQwEvC4W7PBTsCj6pVY+QFzYHL4k8f5na+MvVxKrAp+Mg/tKcrBN/eTpm/8TTnJgvTNJtfRTnlNyK4vnK75XLSB8+Eq+JrDscrwmtW4rXxNZd0GuC6y76LN0SkfgK37xpKV9WjW81JuICCaJ8QLkgyoeUC6J8WInKaGMo72R1KgiiPEdPfiYSAmJOMm0KfRGETu2V4Z1meM0QazfE5pLg+kiu55/L9+rgiXgPtw8EfBHbx8rFNvJxes0QTq0ZwWrNAE6uGb9yTeRjsWHko0z3VzrycTUhyIiTjZziChFUmDRklVprMNXfiAZT7Q2muikc6ZbB1Oxa1v654g+P+MPD/nDJH16I3OExFdpNbye7KWYSy0laBJaEFnUWhYT9iGI9JsUiKihcygtdihQkWFWkhoBw1bP2zrhh74w3I/sgcm0TggPgT5sQQyYAmtqMUBNvRpICV84mJCmw6G9CfEuQnMFX61G1nqvW88Ig5z+oGvkPWMv9jUxdshjyJ7IaV4xC0h3Fryaur3h7/QNz9LrYiTyUhCs4ZCZScqaYOUFv3MwXSmUaE0OFDYzPLLnjqOdKhP5x1HclQhA5GrgSoZAcjbkSIZkcjTvjj+nb2wEhIepV2vq75fd7Ep4ziiA2qdRPaGHhpY1SvNI+6n2piC0w55U/n8T5pD8vcV76cxj/AmFuSj/saNqOMo3kWVU+Gttf8PeoGjhTCflJyyPmtVYBjWTf7THmZOCcueZkzHl6YyTssm7g2ImCMTWC8rBwnHXHbLnFQHH0RS7tJCdRYSaz6zm5JEpTUvmSSeSSyH3vyflxCYUduRLzUi/F52FLetWlrhOXuB5sc80vXduLdsMJ599hDom4YRZvyESlJwr1xqyyZe0KjLtTnojUmXDFg8nWtK5Zxsxk79BMp1AVggE9GnuiRe91PhfmD7N4P4iGknuYeSLLD0A21Fcif/2UnrJ2H3CBcxpt2lu7TMpiPv5hikgGxUujYoiM8P7ldRfDwqCXDtBpqF0AT0ZZy64ncGreTymNHFiw+o+MspuCa0FnTfcD+JD8FcDOSh7MzHkliKCv6NElWdXhxxEPHD3nxkHK8M1LzJYwO334Wmvr789Wh7/TWo/ZTF5lH8aCNvdhBGFd402Xuc1OFUSYiunviaCgElugtR2bM4k/LWjJ+VaFWm/Abk2G3C614RFam652+wv72Gn7ORvZ3emq6I1Dsw0/whg180KIjQ4wUzfd4jqAXZg6zjNDhs+U4EIYW/JlmFehwbJW0DETHSqSQKriw1VCAzDsmzFVBILDRhVV+XbyXRNFGkBa8h6jy4XjDXrw0iGQPFJ2S2JUuZRs8jSUlyAu09qIzWh232hHv7PLWjwpT1lke1FlB1rGXI6t4K8mEsup/WoisanKps7+M2sqpdD43lMpo93POcfZFCsND2qvKZATPpbpH4s8aV1mZn52CfA7Zb6SrH6ntvAnxDeN6Rh43wziGBPFpxh4OTfTC+mlF98yYD4hyhC9OGfqUNTe5J315I8gG5uRyPWQKRfN+2DXE3maHPhfHE2ha6lq+aYqlyWyYCcNCzKxnV7wNl0tE036CGig6VXodyoCv1PV8jtNtvxOZcMKX3jdz/mdcrcqdrzfqaYlngYiIamTEwXEGFDQ85DbGdszpgMJuh2GLO2r8qGiUIK0yueZdYPXBIIw53OIbwNMldhcUYnC5fJ68Q4k707dU9a9fepvb/ab+d5I2emuyciU3zVnPaM3UZHeRxxzyTr08hkHrdTsmax/4seXQULP9mtOw6uYnrvLF/tS0qwz/sgbvlHV8I06rYFn+V/D3ZVb1njRjsmDtJOPPCU0EHQ8zSe9CUbIhcDyzb0QbSdDeGNsgxqBXf9d8hYTKSjDVr55wHgFwQ4ZjKe/2cB4iYDxIgHjxUJxMxPqvkIXHWi6AV20aLoBXXRh7dFOG+4EGnPA0+fmirN4yfzoM130tU4bvtrpwFc6HfgKpwPvcDrwhNOB+2JBdJuGdeQKq/oaXN3hTBcvEUe02exyw95GavFLSGnXW0b+hjU4ou7W44i6z48jskbn9SBFR1ZeEFK0svKCkKKjYRUjtSsLKjrmfqh3BOihHS8KPfRfFixox1pY0BdS8yXkTZCD+WrqM7/DkVLWnlKfCwugHj8dFsCXcD4sOG1PDluMgWA8y3fFoTrBMIrrGDtI1crPxyzPIr9O4mRjUsBPW4nEXPN9QwI9/GtWM2+AFAwifUkLXP4hYK7m97fuG0BX/1O+Hw4/zYdAvf+bubE41iqxWAqhPjUrVhRV3uXPS1bUdvn3uSh0+Q+4KHT5j3FR6PIfpyLoTDeMSmSXIpGny7LoFBazSASmPh9NwlhvJeCxayxegu4TVeYWUZ+oxSMjf5h/7qCAoWzvQDMXji1G4b4DA2YabpdqiocwQ7iPImfsYOOM1OsbqrT8vZTAAYnEr4l66qOYRT99KiioAr5Yr6E+GxRMB5yzVDA+hxf3/byPjTGWyhwN5hDxKet94kAjqYuuK8RPI5CNCIlLAsTDuxwCbn08jyB6aCpeGb2D2f7xbS0tIsVAUv/E4v7t7GDusXDlAWwOs0a3wSV3jCQzE3ScVKxE/oH0qAER7LyDvvIDIfE8bPYsJKr6XkWccKZkccFsSUYcrX9cwbRttKY5fONGAKrvk5Klg3O0DqBs2ZYt3U08c/9oxFAKlaIkBXsH9ALX70naez6QXAufo+t/5eFPDPzS9S6PfzJyBBX99x4AxVgwXf93HgHFWDBd/9ceAsVYMF2/xmOgGAvGKCiAwMaqFvArc8Cv3AG/Cgf86jjgF0PAgP9yKB9NCEWMTdA/sm2F+C7bwRDhZXsYYrxsF0OUl+1jiPOynQyRXu1evvmV66X/HD6f6tR7CRyEgmI54QBkf8E6YIpsfTDFi8g3TWCKnIKVSDDKX1be6HXAFMULgiki7y+IvL8g8v6CyPsLIu8viLy/ICJ/AT+J/QWaRs36CxRHf8FlX3kX/nree4jvAofYTPUdVL3abPVJqr5js9UnqPrkZquXVH1is9X7FZsJNlm9oOp9gUWZ6lFQPXLVIysKYeE8LtRof5/qTgshtGMfWSGrzSOEXoQTbAOE0Et3grUndX/rEUL9F4kQCkT8jRBCKysviBA62kII9VjG6wUi/uZxQf8FA366vT/Fmh5Tlgcn4qzYBA4ZJ3CgDF8rksDBY39WJIEDkbXEIcjB5nCYkZsRPcz38DV0yRHJb0AWT9YtDvsMBxbzuuRzHFjM6wWf5cDCZfoO4FBpzmsVQIV2OEzQFY6+/0rH3n91I+XDNTphzpvTgpmw7TjjMynYtFWxNOC6in1ULvBK6FJuZQ2nKpz2wxl8CVm0oshmf85CpMHXrAVGG4Q59sPg1lr4eMKRS17+yDXyQbzowUsag8dMOTrh1hOf0dU+SJMM5lc2gjK1cGB6g/uORlAmWuTOicqoL+e1sk4iCpgH1ZRD7pwmWeWToLnEPGWIMlHSs9OWlqKcLLJI5AqRu1sfffRxoxCAlwO866aMKOFJ+7P0FWzDRebP1CmiZkG5idZvossETQKTtdZ3z1GKUpJ2oUBHSNRKpPoxERyn5Jzp7h3gy6HgeyIwJevlHsoqYOpIFTLN7DWFiguVLdQo1FyobWGMwpgLY1uYoDDhwsQWpihMuTC1hRkKMy7M6u6+QSJxOKZLoxjqALG4prwsj3qwcvfqn3rg2Onojvq5r/zzj85h1WT/XYEfi+aPB+qle398+e4F3lTJWgpCEaJZQrAn/nDGUnPAeQuSeewc1pbeGD8miOARnJPo/YhS8hD5Exx7sGuahSzaj6wc+w/QE5RcTXSaksYmA/dbBuOtz6kErcb8guebPzdRM4UsToNu0syOEWVGoyU4sul5upBB7FyCC3OcQpOqCKFJ5tK97G4OHxVL5iusDPCgkqGakgMQ1YSmG59x8snLQen0AgGlFwgoPSeg9FhA6W9kjuy1BJQeCSi9hoDSawoo4GxcB6XT+5qhdHrPg9KpHEpnh7MbTTqUzoRzk5YOpdO3XlSsJV1rTYwb1sRNYXMmN4fNmdgcNqfcHDanvzlsTrE5bE6yOWyOA93sWAd08+9SpSi0JKKkcQ1jX8Z+o2LO8UjGEqeQC4EiHQ9UfYgy09IBe04T5BQvepQJDvyJOUjgsgZ/Yn1oDp4387FesS2N5sGvmTMzeE6O1cxRguecgTvbw997hnjuKT2xTbFMbITcLjNkpa1mKmGhp2Nz00Xw7CyCQ0Rfju2lr6SxWPk5+NAx1b3jEayhyrR/jnLWoKnleWDZJ2TSdmVaUoq3Phl+ukKQwRQ1Sas5CTfHpr9KhH6y4gM7cHrPIIW3mAcOQRyVbhNPVkzk7ogads+b1oRRUvAGiDfZ2u264i62hr0uPEeBv7froCdsGuyG/mA480N/8AvEGJp3hulBASFdSHVE4pBbOtA1vI7PPUYFTzy2EdHjB1OdL/awAE8znY+2YwoSYJ8tmZaJXtNoTd5+T8KQMi26YNGB+yUCoE5FqRwxUec4hxJR5YMfJ/gF8vshMNdQ3nu4m0aDd4y6s2+6b9hjXFiHqFIxUiDo7T4yP1LlP8ZAQVfsF6qKfWS1QdKavZwFclYNx/s56AilK7ntzCi5SbITUHLEypwm9FuPMn/SaUYrGT+zsg+LaEGSwt47l4djfZpVyY0Jkx6mbrwSITqkG5JrnbABa+9Z8k1A2/ORi0KpUy/WUf3sP1uCHQzM8kVHt2NqPnDR/5bUD7vrpNvV2M34rNG7gWln1V0eXVKNfffA6LHDgalwqfl/lygLJ0zlS4dlNTbq3QzfaK3uME2+xPzXWxr1q96he0ZjVb8qD1WDg6NLvw9sCdX4oap7cDhRDYbbqq7ZVscR1j40V1Rj91SXVuVocPCtZGLv2SrguTrP3EMnL1ryHJjtY+Qf2Mb0v+OkRIuSj5YsILFQZj4os6KupCpfZIYhfBTzlWbiLo1pE+EPZaqrx2/EKkSJuCIAcOp4YWQEnrzKpDoBJiBzUYpRpMMk+SdhIEVEMB0myQRZWgbWeD0P4bcyfzRlETOSSLxAn8biW5AoHNHVZgNcIPY1U78A3bmCwXwepZ2KNP6EfNMHISEawfxOm1Iwv+sABxoe5FxURiblNIuaje+Q0Ok3f7kSJaR1jeKA8XGSyoYSXmCGch5jkBJMhH+pFDnK48oy/4mvXCT3ZL9k3dVQAJB+dmSUBEqIADlZOp/V6joiIzadjxqdT7jzUdh5PA+jm9/F/Tbi5J3Sb0p4huSjhFkTpYHubmRk6nYS9HhNbUmfq4njjnKKYPFB/J90UkknJWuCVU/222yWGJ2IuHdJJMewzPeGEUNrlJ8p/j6LMur0+N7FjPf6Uuhp1iyTz/Mf511T82MTSsdJmuVFp9vrD8bGy22XXDpBAZnv/LT5bIry/036l+F0CacZTidw+uyT5rSP00t7JD0/iYJu+fGEbLHJHDB/uv48VSNBr179pPkAfwVbNe0zXOGv6bJmhf42vuVH8ZsuH+VbKr6Cq540P5UfMyfl78S2+qNPUgs/3qhe/4S5aR3zVYftA8b5iuPcic1cMYZOP+w6PcY3+IlGp+0NfuZJf4MHnpQb9HGDf/qU+aWHG9Dp33/KDjFS9tRPf4ruZk67MqYoiNcdgDOfCgagQwG0qFziarDM1/87TsdwSinwfsX9mvG9L6CXgzV9pxbxI458Knhf9oUeRYWsNTgJ3/Izn1xvNP5vlCZ8xdP2ipiv+NAnwxdgn3ECpfnzTJrTqNBpTRrNt1yhx9kxS8Ixe+iTwZhJ9SVUTzczBcBj/amYgaVmX/iUIBPBVR2xpF0f+QyzUKpBRMe+AHaW7bSQEGjJqJOg3MHPu7RZuEyDjdrD4dQCRQYpkkOIRiCKZrdghcCeCICd21lSJMdH+T6AIkktWGkQFpFbha3YruQwlYRkxktUErIZg70J4l9AaAwD/W6ofaZLd1ISGhhCItgiR8heQtTROfGRcvndQybZ22OkrwMEMzPCb9ygjk6RHngPm5buxgJrLmHqaF01qKPBFaW5d66NFAkYBWwJzrlwOCiiKMAoYNaKOAYwCri1qG+3G2nAvMRzZ5gRE8Hm9WH3AtP9pFCgI/VTXAXyMFXH1SXQMKhu46fqJZzIe6gvoJpQZ9XncSKWzvppnAj7FM8a7ahqmZep/M+wp9IsgbwdEwISScZlelF4l3WAK8rkHMVa9YxY9sRXzESeqp/9ipXEnzRSUL2tfvQrThhimmnqR+93U500HDeQmXfPExx2raMmYTtIHthB8sAOkjs7SM52EIj269pB8pYdJCc7SN6wg+RNO0ixTOlTkwCWNQOLqoUmqKafJpGCl++nyQM/TeL8NBglsWex71HBZaYCl5lyirxyiry2jp3NVOcVqtxs9YKqT2y2ep+qT262elm5bPWbqT5B1avNVp+k6lds1ve4Q7wwvV9MtVo/6JrDJD6kJDM7BVyz0wW/x0D1mzf5p4QNCUKxKUHwlA8zZh8Mpwgexc6AZv5l3sJR4ixp5l9mLrT0JCfJS/GRNQwzj7ZYaFIfkJ34gOzYB2T7SOkPKURka6FIMSLmI+VnCJk1A65sC6v5jpFCFnpNGVTJPMpE2ZHwJDGETJWfSWjDtEdKkEYWb3E24Nh5KkyV7JprRyFk1Dn5vP1dMybo57W9qpHFwcI+gjwOZuyVuFMc2CvhoiCXgxl5Je4YF9stcJEgn4OgRTiyu2C4RgPxETvER+IQH6lDfGQO8SF4kMThQZRgoDgE+rOpzhaRMIlgw1Dr6ndQokcQWRP2kn0fap4A9YGzhNf1KiF7dMpxB0ZBJONaAV2PbI2Lew8QQ7rR7G6izM2Efma+VvYjWJcBIatoUcydxnXTQMslsKSD77TSwudL/pSix0txNexwaiSo8Wu0irQ+/PjjZDevD82ZXUiBxjkRUuT9A+Td6fQHPfxxxTcN4J+lZNSEwzp6aE4opOsBYHRxu3rPVw8efMQ8MFVRFDH8ePEtRsEa56wH+nqAN3ffdGAwYOp32Kzxw7R5NgPyfsaovJQaTLcfgszXg2I2ojxVcbvF5HNIZZeK/NhAvo/rWxfqo4v7Bh1+6tHF7xoUrGO+XlIzkNW1PrRQ//A+arNtZ8GtwqPznjzbtqxotCyRbEmuIO+RpsnW0ISO6AXvHyBtk7zF1bCp2r9acw2eRvm/zPa+XHWXPap73Ea4VCG1PiXX/PV1AE07XgU0fd0ATa8ilF4AofSlRGtGa4gHUFsOcVW+O2XJgPGiLDkcZLPq3UTbhh+ShsjAXHTnQ6yiuGWeDrGKIh2cC7GKqYdGOKyisJdNtAjoeG8LOeosDZl21GQMJ+Cjax0LCzPX9Xm3J0Lw5JHyVwnuAjDKiHDcxSAm0u4QNxF7UvDIwVA1dra7eauT8Sg/Ecsqwc+4ts3Kd3WblO/KNiffFW1KvjW9bY8H+tnv2U70iJiLIiIp4lJZ4c5HYWtJ7e1jmSW5bOULjigH7/CyXOyjpC0mxMVQW4yODIidNw/aAfGwz4+yBBCmxd5pYysSjitpe5wt14XrgGe6cCHNZtkoArf0i1g7N3BLv/S1M4ySORM51I6snb/s3NJyWhFEyHqXT/nD3fM+DsYerRdN45+BkqoSSqFqjm5PdIeTHKQwwR9wOST3Sx8OaYKv8LDbQJrJufr87//x+w6yyddogF/9rb/5gy/89M89WBIQbvbejz3w2+/94l//5b+hyBpqRT0RRMBM+AiYTYSPlJuD1r0I+NomXNvJ5qB1JN02YlY4VPE3QOSTWhWLTATfFk0AyQM79WXsYmad68tGmpud5llydLTMLKmsdgl3zJTRYMpHYxaPHqbP6mzACP+Q5YiXD56Zb+JAy2BanDjQMpg5Jw60DGbXiQMtg8hLoTuBIcf07nZKp1Q+nFCQ7fmo3filatbo+tuXuSfa9IR8u3falAa3s5iTfLhiSfA84k7vWwZsj8N6K12+jwIvrxwBbJT4sSJm8/LHNWODcLwSMxq+RSI75ZfhqhXcO9kK7i1bwb1Fk2QW7Zjepacrin290kcjxhYCL8Q7p6ns/mBLsnkeHrAw+1hiWPllBUGJTMv/sArCG/lFCGoOU+ACRxQRxOcazTBWS8YzuQ4Zz5QLRHTkuBhzGA0+bFaoigJ+8wUKhV8WGiVWvX4NCy/ZBY66+NrzHBdV/lEiQMz4qohfJBZ4bhi1mHC32je47u6lWsvKxmWbqVD//J+Q7ZtSsvfopSMTRlI+mxA+gYyzNM8x6HdzxvM7AaCBHZfmCDUJ9GhE5+yyn4f0aMK6uxE9mnYPRmcWzLOZYwl5aht8aTEL4o4e2MWNEv405EuL2VYaN/jSYuZLixt8aTHzpcUNvjRp8JifFMrFPVcdP6W6fsbJE05Z1DWFxcrNxuiTEt6pmSZbGl6fZUuLd0YLji0trn9WNdjS4vonVYMtLa7vVQ22tLj+8jpsaf6LnCG+lVeeLU2Si/feBXXKEYazHWvGC6PXkukTLHqUpxGS6IiCnTifpxiD8kfKBzVo5KSebtKDEzEC3MtCC3wt8fu6OUUdbgBBvPRXBqy+sQgpYXJEzZFn3uWgK58ZsXB2HQKKnfQRhsylndnGaKHcdvQGOqQ30C16A92iN9AteoPEvSxPGZ76gH/uaUAGIzF2DbJzDAlTYDRC++NGaH8VMVs28WZYxsJqLV+ht2UVwZidbRAYhoGLQikYchX37NiedN8hcAy5k977DgHcc9jgrkMNd1ykd+GGSflItB5rNGY6/pQj71vSdjpONuVQlkuLhlwqL/uUYh6d8l/ziXAZ4DWfEhssU1yupZNMkGijYnZFKTdFp5TTl8ztyv8op8w6Z+56yx5Hj7P+PSvRbWQLCXhjHGq9xcHJwfpToRJHwfpVqMLN+ED8zIqsLhA/t6KrC8Qv/EDhfVe8rsR+UfEril9O/FriFxK3y/MLpfzTPPFW17KJnlBrenI8YBNNPdCz1Zejak1n7GtbpzdH1CvaHXRmiQiS3o+gaRdJGl3By3H5DDFCyEpHz2MPKkG6CusbZIvOCA46u4lW4godYXW39ICT4g0dYWEfSXbwEoVIboMFfiRgIXhgRxnhxjgS52TkPrsnIvfdPRm5D+9s5L68pyLbXbPB6WvZIIT8jPIVka0ImRPcOeUVqhJ3foTImmJ3vsI2Und+lHkz7V5VRTv1zDXx7fUZ80Gy0iKouBrfNrQ/c7ZqKh/WrEufNn+NTIuvzh2t4giuaFaK2HWq78cVD2i/y6n6Ie03QFU/rP3eqOoPab9tEle1215V/ah2+2u9wvkJh5qOJNkyE29wrAfRkVjPuiZpgDrcLBc+7eOSf4pG4loiX0Ww7pys8LOkE0T1iZXHI/avP6IACOAJuUsvqUpsdbtIXoWB7qEHH4/KX4drlQYV2t8vAd2og9RR5Mx+WuDlrOVjg9vp4kl0qOKzGcnlNIppbwj9r5q3wvi2QOvvBFp/J9D6O07r77DW391I6++0tP4Oaf2dhtbfaWr93eVhpwVGPxM5IlyIe6Ha78950QlQ5fbwxUDUTzjKXZQsKWdsW1KB+n836/13st5/O4sXbx8S5Pi2YWG197ihvW8KcV5uDnHe3xzivNgc4jzZHOLcYcQnGhhxzuS01OTUso5CxhXeAF2FxyRBGkNO1vpYOszINK6Z8idj9kWMubqrVnj1OYC0Bacy5eKvkjo2b2ZcRnA24OBGiMUZdgAeRVrgVKBtadUhAwz/qGhmrvmx1oC/wRVySLxShHQk6F2tF5iLBwx0uAseAOPO4h1mGbAAuioljxwScury7xUhmln/nXLJ2WP7RyMveIzk7NOkvE5TYnbSV8wabfOdWTXZJSezuvSkLzCiQhx8z4CyZE4lFy0JR9NQ/a4m5qJsSPaCW0aK+FxsTnaohoBTMrAm2WMWQgBrGqhyBtYge3vBWJyEL7M52ZMmsAbPnnYbZNyABbU4yqI2i1nUojkTW4PwmLECHkn2gIQ2cf7A3u/cRZbXTdcT4i6CJ4geTZ6ic2s8RTHvzpPeTEQbsxNFYyzt1iT6DeZOcubKuGkSDU55wGf9VJp1k8iDUOzRelAW/ww2iYoZwZlEyb6waVeSqdvfTN2E65ab9duYuhObdQnFSPm9KUxK5G25UcOWG62x5UZNWy7HWbsJW6W9xxLKOFz9f+y9D7gdVX0uPGvNzP5z9tnJJMR6SqLO3qbXwy3cxlsKXOS7ZOWahDRSfCy3j9+f57l839PnkW8fv9YT04i3mBxKirGiYkVFixoRC1SQIKhRUU4EFQtqUKoRUVOlNVZaY0Wbtla+9b6/tdasmXNO/kDgihXbnD2zZ8+sWbNmrd+f9/e+yceHY/SwofQ9ayc0+bOOwbvkmjLZae2JsescPZsd4b9FO+RRTn6l2oRXbmzNtv/Oernk3UP7z3sAP7VHnL2R4P1lf2CnO4psZQDGZ2YKkGllXfqnbWYQaqbYIMQkvS2ExxlBD9gTTL/E/AGXvJnZZHr5MJ3agnTE5k1A49m/A0WiTnc1tjyBmM8lF42grzvNCkuFfn3Wlk2caNTmgaSNmzsRNFAsxdRUOaHOiR2trNM5Z9haPkA6FJN1a/nUPD/Hi9laDpI/BI7URvyzZZBiEscrcxFLEokpLPULDD299ZiwIS9vL7RhE+lf7JdT2LsBlYSoSgQlI6sYWSM5ba8JRD7uPp+acye8ZO5ahBn+PHt5gVZswurRMtuoNWwcuXDLAcKneSEUvDxrM7a3bLqp7JoTMBRnHk3B+rIaK7T6A+EhvQOCNtYKzKwVaAeQL1XRjHfE5SqDzHGGsXY/DSlId1TqCorQG67EKbfzOlsFJWHl6rKg72xam4mIj4uyeoYVA53fs30DrAiKsAiVYKltRxZ5qcLyRQjCs5eAzgdmA8IiiCCJtCUKZNuOtDnrEbCeCf2r/QBz0olM4ynC0B90/WhBhxIXZ5/BOqhrl2nxJkJEO/Ys1EeG2bjmUXUp2V75DfEeaA5MW87MHUrc5MJz2BK9G+ncAR33bKPQ32ZM63TCFyW/cFLL9P1eKK/a42kRTgLwzGKiK8zu7/i6GHvGYjesyI5b7bj2mYMPzaIE6tB3HPDyR04EqvQRFeuE6U32NbjSeTzKQ3/mxe+rRVmiVaZ6PN5o/zPUC9hbGmZEG2eQQRgoQZun08w9pKvNjd/ksf2cn8w2OFq7vul+D0sYG9aE/K5m2AAGcSoVb6JNncFObMmP3bncN+navu17O8WgOWW4GQq/Z+uWixlqJ+hCGLU7BBldPA0nCwdkBKwVa/td22SJEXUcmZO0IBXTBa8yio7xfXFZFu6un9jf2c7+1I17UK9lrn2vh7kinewVbnfcAPduwjoO1t8D3HvXTcRhy0Pgb27mb4izBQpXm1ReDB5xxbtncVNLkiQ8LPnE9kisKUF1h/ifRq/vAyRirVbcSrpaKDiVNzUV+izlUERivcPIS/F5TGKqcc8Mb+OGh6mrQCmFZRG3ZAqEAvHhivfvEXVX2xUf+wu74xvWp32f3fc2woeLbyvXzb7gR+5e7u522xnF91DTdRXO9avmXuyQTiSyVQxtJbFkaZqqPY5qCI+78SkbaM99mWpvc0Snnt563nI+Itco4zHpuQ2zWiHf0UoX36vEtM1is1Y38OBlrLScNJWWK3HcgBd3SssS99Uh1AvnQEXNWQXXhJTxcCQu8MHg/Q6xz+a3yko8eUY1Y+sSHrg72iPxgWB0i36ycOTH5BmreL1J/bvgaLAuQ+ZkhRVxEt6jaMv+C12h/1rrVFAmLK6dFY8CoH7+JJeM+oXBo0hrHoULbseqho0OfzzS1ghOW+dtv3IcHtafPSgLrVRCtVYmJiPJzaRjVki58suKyi/82luVk3JGtevDFF551ORagyNbTSxlzsI0LnNmW4lX8SVbYDpsWD7MBZGYg86A0gPy3FuSRmhJGqGDamOsLocU66tB6ccB3bPNhLWfbSSvXwfiB8AjpFIbJoFr+wLk+JldjCUy4Rg4UjL9OMuhZz0ltBeQPS7AKZGcdjbUJHr1bmdnxCffgRedR9hOjA0Wd/JNJquCNAjjhoLVY66LOtE7mjjy+PV9LS5MBnE+dHbbNq4zroWmQIpRfP/l0n/5YfvPzsopSRVrHUeXLPRKq9krHdwDe8faSK74FZ3hUoucRdwaJQy+pfY8IXLnPdbJcjJ9+EezqJGY+bEvmmjuOJR5/3VWNf3XlJFngTu6UJ/2Ti3e5ch1ZQBRfFc/yhMX6gu4SPzUh/p+Vr3ZpBHqi7cl6BqhHP3HY4FM7q6BIxGF5RWSKNRHhOSFR42QnNQvPVq31h77sqOGI07qzUeNdJzUFx0NbrHAyzXrcItfzHRW6UPkFcMDebjxQrXFWG8zvruKD92+B/LccyY1WsLrnkvCPnfhn1wUR8IakosiSVhmclEsqRainIpJIZWSy9vbvc6OXcxpmMbadIOt/9S2swTbAdj6OfazfZXBAdFBiBENcU3Cn0n7h/5H7tKQuZuxW+CXaGGGgudRrLRfMHEjuiq+UQjH5VU4ji0WZRW/Y/WUKKv47TMwG+RVOC53pVmrwJB+qsyCCLohHIe4XKu2eOaIrfk6t6yqc6svnqn9nSyeONzeBByTltS5tWrhuDwOx+XNcFzeDMflzXBc3gjH1R5pLRrXcumKH2a6F9bPfGUiNNIdUQlpVxB74GRMIm6nIl1Uh7ZYaT1MEuqXnZdOmWT9qFd8WZFdnmMwzNka+/ycbVc/sP1zmR4T34LjNpFlagyIf84lmNLt4x60ZMHrcsEDiRA90hbVFtjjbt2z6/bWskP7r7NxOVyWcyXMQdf+N5jkRQDF3Hht4DU4CSiDPjyQKbs2wlHUmxmocMATaRPcWFx5PVmHSNkreFdzxaWzYBg49Ed+wbj2Ei4Yuy/x7kdXIAZKOOs7ZAKotbMn7ewdRTttt7HHugarvu3I8bLrumjMdVlHCjCxq2u/tt46EUzl+Dr66QmAy0d8RI0TsTSzbVsofdMS89orGepofS17U+BnsTcwT0/kUj77hezIEBcfDgkAlgrXIhqSutRzNe/HBIH81ARdsO0ejLPUTouxAE47FsA5LExHH2+YjkBx+BIsgNg53jCddGGYTo2ZxoNUHsx0S2axg0kD0V9TTaoNso6MI/sKRiAqvd6xzwjaRwdkjxY8kI4APhLNQK26fl6Su7L2snNdcQ28O4+sT5rIekcQGOzAOoFghbU6FsGgtFE2Jy2OiuYimP2D0Y6oYC6C2d8b7YiK5QR33yFJoTbuvaph7wHIG2RmzL7AbrUYh7EtDIZGutN+ojKRWlCZqB0rEzGKHfoGGhVlu9IZUhKRqqNks4CS1ZW+mof1a6evFnE0ZgEl6y9TH11fyXRaz1jRpFfzlUcfU4bK1VC3Ipu+Fdn0rWDTt8Smb0sNdVKl7xOx7VoNm75Fm75Vs+lbdZu+vZ0B4UYNdev0xCWoVD1BpY5fgqp1uARVVErNVNVR2Mju2PGjqgOSY4ujObYjxy47mmPH5diJo7LpfaIJ05bD1h0M0GRCrbww7s4KMZdC0s+TuC2kh+tPkBYvjn+wjwi2u710a+FSvdUeFiU1EtIv9ueyx/sjKxS4/ab4Sy2o4x0R0syp2cxESDOHKBfZ6JqWK2HYdTFXwoTraq77PZFsQ8v1xTIfuFLEkwO2bGXAlq0I2LJlYckd98sw1uUA+FRP0n0sIEt7HG+FJa4e6jG2TVjWZGitDAjs9Mxk0r6CnBsyio6VdrYqZZGZkD+F9y3xGo6JDSbVfNQz0hLGZlmNEFk5f49+KHmnvAJhLuCFkk5FyUqQlULr2Ze4jZtyEjl+CZZMMZQTH7LC+SHK1pNI67i3WdEN+eYBFktpwNnTog+mXRYlNCKpNSKJG0EvIivHMIuvGBEvMkl8T4ZntaZ8DXoor8gsccsAuyDF5RE0ufQN+Dd0ohnTsn6gfUXHrQFt9ivIediPifiyRg2YWLE2zTLp+4K2MbMJ4Yzj9TMm7oyt6owtd8YEZ+z25FRQqu3iMXZo5MNQH0adbH+NHta+a3tcLyUaCCq3RCgZsw0CEGSfoTeFgg6r+nKKAdEXjLoRuUR3XyRPK5Pe/S7eH0KzWS00GxiAA7difh7Scc7ltwMlL6E2J7RrDHPkEjScLyLrasSzxx6RzR57RDaLI7KOes+xB4oAyVqJx9Y8ym1IjGYO78RgbIbqoraj014bhWIXisHmc2OwucB/ohhsVsVgM+mx7LA99hhjsLnrj0xisJncvrvnOAYb1NEkAJsfYwD2vkzmNTuq2m5U+RQSeZile3LulpGUBtVSZP1rqVRCGTRZ1dhBWjpIs4O09B5wb+B91ohhM1ChhKo09wlxfHbxdY6ATolx5C7hqULBxEwegc1wqN1sOeza3dg1Bn6+9f02L9GX/BVzBO44+4R5XBfqzOvJ0JAjslAcyoZpX0vC3lXnj2God+Fu5xv63dLlpChYZu13RATvINh30mn38FoqXAspZDw7dCZGPMuXuhgOYwKX7IOmsjoTcUUsvTUu6TnpnDleEpcAD1mCJ+1aSK2gvFcGCcZOELoxhxA1KM1VPqBih0iKHHEbq1eHOBbzq1QDNjfi85UILyDhObcP1Nx9mKPGsZseVFsCEu/PJB/vGaEZvS++Tly5mdUSRxB0uW3lrHaRlt2aD33VS4Wxz/6Acx93vlCEEnHYrKZ7zF+6KNCc3/oBDKqpnFRTYrpx8SKAuXnmnoDer1BDxeR36Uqh7ZWutGbjtUosNmQgryCjlk9yF19Lq7+TepW1We1Fk3BRlMjyigwP8H1vHGDOCq1iHm7eY8QRlYNgig4c3Jd9yXfoevVSL+wJxx6UZ4FcdwNflPl6wbVpzjFnRcdcpeY/5pGqTTkb4NQcfQtxP65uUa0t1U1rrldbr2NY19+tFHN/ORjuTa6h0+VTVOfiuYYOJQvWpLxMThyVuVyvSieDZk9WvIIbocbFBcQ6C57PRxUWqHFZNacwZHJOXUg5pyxkYk5VSFWO7otCOgvWhKBJx7vCZefcCper5la4XDG3wmXH3AqXmbkVLoeSBe/mZcf1biqaoI9lKju84vFcreNaSZ8O5NMnDzLoHVcqC8rpHQMhPWyRlluRR1i27TgJesfCHFMK5yhCUa2G3nEeyeHSbOcibtTxlD+uNI9zf6923eSd6dIrIx8f+eOjqQ8kvcNpXuc3NXQSgMZUpYJ0i7XiNjKt/fJhC+EUKHT/5K/syvQ3Ai3F0ABeUqZljZLVSfvs2ltAHS3F4GcmwPzR0j+MfDCbAplhVz4aognfyAKoLMMaVpHC2vHVw/i454FZrMk96gkyZkgAoFiiDqQvI4Zo/EW9VPn/Eh7XgyXEs+RyFk9wi5PlmJ1o2pltIpFLNWQlFMHK/OtXZhP+SsQ9OHv0MMX9wah4nZ31EJZpeZ1Dp7Hclt8zhDcptdjBqlrhVkzmTnKybythI6WeX0rweBsCFYr7ttrJnuxUfSQk1UBoQClJ2WM9Q9tsGS3KEnezAyXqFzkcntRQViNlpgsOEO+SZzuF4Cd79mjjVfHGxdUGbKw/dE3jHl4hIx4axRVIcNpF2b78oA34BAWBzgXp5GX7ZuXXr8CvTVf6PhM6l7T4PE/S4brK1yELEeJatkCHoYxB7SWuO6G7O667peN7boBlBJr1bs2VdvGEY6IcDnTDJ8xDN0wY50f32pHRdnzCytwaNpdi8wZskhl3CTbfgU3y8BbYfBs2M2xC58PswOYSx9KrzE+/4H/bJ3Fx2CQo8mFsVhS838Vm6ih4lXkQm31skmL3c9hcHCh278JmN1DsfvwLvs0tbL4/HMyg5rvDqQhXvCr8FmjTUxKgsgD/0BJ8aDMwL0ygCOKb10isfU0qiMWZL8w6zB4Md3Pb52eTEVLn2vyJPXAlUznliCBH+6k9QmRHicn3kBBMHPMl933+8VxSPZZL7ng8lxQzxw7aOzLhyQZWB7MiA8DFj8C8J5VB6+3whj2Qmc9Yk/+7GV6dyxWNtwyQOUGeW1OQjGnbiUDJiCvIaDRkYPfIAP1Qwu7BmY1ns9+9gf2dwVjIECYMGQrYDBHEjSmMLErHMYeRRQk7JjGyaNXMAGo8ByT2bPNFp9HHtV1zlkyY/L3jWKqucG20g224MdrBVt4W7Vg9Zf+5PbCyZNAAcF9PsFfsDmtf/brCwX+qRs9NkjXFZdsBhC+z5yZvUshD2Cb2pDfPqvroCnZ5Jzozbwt1a/JAis/KuMEXhViwJ4/YxpA4AyljLHyxYsS7DNvLRuyGsA2hi9gSOJXz5Orm4i9R1MwVzN2cScHc6hHGD2YzQlYZ6JS0iSq9gIWSAJYTY7ALR2+5PAv30BOM34wjqTxdn2r3HPrmLIGiGe+keKeibkSHDYN5gFXnRN9RiIMSfd8Ky/qkxJx8TIiqP/mkIMHPczgcgvWRHUd8UJ1LlWEf9NZruKxMFX+lIFnhziWIf0KEgpZQx6WA0QD8hOFHQK8lmIBjJDaaDbrWlOggDsU+8YhThpBbcpautSAFcZpXiNO8UcOWlvKToSCm58Wbum4K/Mx8W20byM6M1WuVwHWTgKrRFV7IJaXLGqZGV2ghBwUuqu2OsBmEVxLEs4vZrebQt5yt9+HM883sCkkdQNWEJKaUimyRBPwQrXqYgjMhtVOSdScAF0iisl0tSPtS8c3gNJcocM78PNK+CO/aXNqXGRXxvlyiIuKXdzeJX97WJH55Y5P4JVDDPMnELxJUeJ+Llj8xM83d3/55mmlyTjGtxhTTdeGrzDO8eVx7q5plWnNmGf4qf2rMMge+42aZJ3aw3HboF4PlqT9YrvrnJ2WwbL90zy8Gy1N+sFy9fc+TMVhmX/2LwfLUHyzX7nCD5b25armYY1JXnNSh0hQ1pXNLTXUoNdUoNdWCuHP6jqFYZ9sL+mq+UlOR2zKsOpxAgan1K4cQ2ZkoXbplgtQfGZ+J4CiRDJ8epvicijiweUjKE13Bfra6eDCjFF2PsBGWi1Mjt58D7ScpJTsmpbx2bR+aJnp9vyVo+cwnWl1Sk9+BrC+FakztSmv7ib2URE/PTKDD5xTFQweE0kqWxbLMNWnUezJpeuSSTzrGPnI8MXIFsC73AI2ZRz4oBbCMC1Jy5u8kmZpSgwaR8I65n+Wgcs0ZXOLQh/b4rGt0fl9dG06+88P+5PaH13/Y0SUdsU37Ptxok9n/YVeZevjrbf9gdL27Puiud8OCUSDJBRXXpC7uo+txH30UcR8dxX3sMcUe/STHfPSTGfPRLuYjw3Re9tWndLznvlR3XWo38WAApp9L0RJizmHKUAjSvhvFP3IUJA79gsTIqpeGWssOk5GDLtgXuFRQHD1o7irHQk3UjK8gHmtUEOOJgc+I9cw7tGRrx07y3HQOyC9jRNxyB/aXjJs45a4ggEk5cc1dlS3zbsPFrgLgpHTVsPCYXe+Wl8Ernxj5mhh7tkU+AlAuFk+98LDfQcqyJiQVnROdGx2qL1FT2pNcq/00LolY+6kvWVr7aZEUni526c9qDWNbFs3TlhCNcG2WJnna6j/PJHExE+IxpHQs/k9kE1/giZzP8UTOAotU24WouCPJzMDifKpncXZnsV9couUM0ONEYan/ith5++28303M8x3BGicLHXSKF71KaFbziMtoHogUgpnS3B/t8AjfsKMTZVw9/PGiiAfas07HOdRVjStONi5YNq430bhcUbvaGXXW6STElwL7cxpVJrhLPBTtYBsejnawkY9EO1A44kib3TJ8k9y14FPcXJXMwxQ9I0zRC6I6NpQVqkMSq4LsoKVxPGEId1WYAym/uLfCEcuO+5Mg+wA2Saf7ADZJJ/wAwaYID3K6rA2PC3/yP6VSJkwaMS21006qUCeqQp2Yo+PAzaJ57MEk7qG4HKsVzWP3JjFQw7cpAmroiCr7jDDTPw6gButbXMAuiDoBrYHEfXFX7jPTZVLcmgvCi6w+dvtKJrwh04PBY+2OT6E8fEbs2fUCpc5AYQIopzn0Dcd0WQol/NezxaLxY1s1cDTfM5oA0OJzAkRzcGgBuXF9Wi+MPEDNZbTfwMVxAFwxB5wduhVuyJZXTIvZXbwuFwgCL0joqNkuDSxdRVTVXn4sSdCJxvIfhrQd5yY65O9tq3kGOe4nOO4nc48zapOA86Kz85z8FXbyEyizig+ADgpYA8JapQu06wIdusC5okNpte8CfcQukEbPbQkfRY+pZdfr9sB7NHekW4aoPTUH7QnRrm3+1NajtD1pLcNpt8j7a8PsFAHiHnmqXIIzEZ5RRzeKxva+CTOks1VcK4ikA3pgh8HG5RQvB/Umh1sbcMK2dWw0uavswkRQrdk6PQCGIS9FAjor+7S4hn1GqoeLXzUsLh4uEYsPKPVyHLuX+lLo4QmvGi4rl5TF+TeVi+xvF59/06suHvYvFtthUbnM7u+vOfvV5dLyBPnKbtiFGyB20C/iT1aCBklbT5poEPZdh6rVyDm4hvRZu95o0pzr8uS9sv9CEql1BZxkvWh0xRS98DyrbvJisWdy62GzLai4tWdbXPbPvym0tA+tclSp2h8t2g43HOMI587FQ+9OSc/B08xwqowtZg8N8hcS4NIKrkjL7P/BLF2RlrgiLTPzQ0lgE1m944eeWKglaIovpepYVJvt/T5r2g63Z0kIBtGYbaNFzxVExdKlS9tLO0vxX3ds6dLeeH/poqVLFy+d81+xZGkTuWUWg7+GuxOgP05whYdK9ml8WsLiA3wq8InwHBDpmhyfFgWgTz9AdoCwNWP4RBhQD5/GOFXhUxef+vjUwadF+ASAMNqiAKAg+TrRaQ6TQve3i0/0zctpUQY3q0VL7WwhDhKQ2h3bziFL0Oqp6rv4nvNRKfQauPslTgcxMSe4syfY5/AwSwMeBr/gLQOZI78GbbHJtwirqPjv3089+e9ex6+6TTDQHqCeuQBXIIHzfGpwmDBjvZDad27g2vc8o2FF74GWLklp2rT+yzE7/12XScFWMRxj2gmiFmnZluxaj9mrV1FB7iKpn3F6HyAxje1qT2hesZR6u9wb9d5i994BmItMxGIqVDMlC0IGHbKYsnjknGHGe/FxMcAXwREj8Kp8bakYFCN/nWoExfKy+klmTwi0IsUBy6zJYlqGmFedo7RscJROxByl3u5cVQt6pVHQDP24SoxIhl6u+IdZFvv/vcOm/zi1JmO98DgSEcODLy7PfPDylKRjJ2qyV9O2OiXpFn+nnGQnxTrJcle6OuX/1ztswtJ0lgQjz5Dfr2pQJIlBFZVzizkVF3xPNErCy6rgu3AOQEDKZ1EpMsE0zR/PPf2cBjSbGF9vzq31JHgWyXfdJTWJRWUHR/XjXmG0rHaICOlktUN0SkO8gIphZwn13Bmlk+s6o6bWJaaEfdXd92IEV/JmVUnwexdwKV92PFxK2rjF9nm9Sp5anZKMm2XrBZlkD/2pw0jCe+z9wqP82fEo/znVY6QBDYGeJOQy5hCqtIVQpe0JVdqeUOWfFOjCPGFK168jFWFKF+raNcIUxxCGHAYIUyRXMshFhKhJmNKmadmeQ5jSiohIdn/EE5G0SERCykYQpqCUCaQgKAkKYZiKMCVfT6Qx2Hu0FCCYvZ/gHDr7CV/f0xGwdZMfpWrWmDRr7CiaZXuJHdTx/Cj29K5Huk1+FKxCPfKj2OuM4WbSskcstlG20xvHkgJlzN5rYJ5ledu4m9uq3ASLc3ofdCHnK1SNaF1UepQ5+K5ZYE0pGWU3f1ht2ju7fafdOtHss3+KL2VSRHRBmTgijkINXMUfqAWK/9udGmXtVbl3KvDoACFadnr6Qj/12PFb/HPmfzQOzkKoCSvWBNi7GCCALTRBqMEfkAoTlV8kiWHgwBWQca9eKxW0SopZNYpZNf0kFpdjP0uKn6d2kPbyzORPFDH/XlyxeIDTYCa05yj+Rdm9LPwF626Ia5bankl9/to+605fiLK0rBfAQY6kIvVF2igJCjtENurUaoeIlJ1c7RAls5XVDt+NocbedaP5MR7Wf5CONA+9w25cvdOXoKkgAljpCdge2aHM9nfOIoPC2za7sHFj+FUqbIal7r0hU11X3NhrJtQ0qgra1r5akttD17EkNgXP72K4oh0pj11k7dLzyPfbLRdXbL+X5tb8Qrl1B28imfHHNth+7CBQW9jRPxyXV7a/sZ+XvTWsxWiVPfguHVx0fNhfohJHweU+WmNUPvakYcUSaxiPlz3OaciLdcuxETatP16OQ0igb6++aMo2EmD80rYAr/iY2bXHv8YJxUUOssgHsGvrkNH2tsbuIqp6bLDNG0PJxSLMLS0egYZwsNnroSXWpRsv/s1+U3YBPX9UgYF6yrSnt0zjVItN+9x+G45kxZojsatOQMrzU7csRuZ2Xn4c2T4WQnZ8I2exSMBv8Vy/5sE77FN9tpnZ42e28bIvdMAIc+/c46tB7C0XH8ZuOMx7w+7Cnml/6ImelCZ+O/Wy9gtwJaUSjKxYkuqC9md4pUHqw4cCsMPF49K58bhsbjwunxuPa82Nx7WjeJzjC6xIj6ivHlI7IamTh3ROKyRyXGQuC5E5FWhXJ+feTTk3ujgxN7pYzI0uduZEFxuhRTYhDc3qhKa2Q/Nb4ZbywPeUzeF7cvLwYk5emUoa/WCo+yIJHv+cRcPJ89ymQtfLb86RueX5Mseu5pya2SXoBZWNWVymZK6z7prnwPVTXeT+7WvKWOxtyljAZ8yCCeamQ5BTcpZ+Pony3AR+4RCVQHlElMfd54jHp7xuhZqrWwGX0UtdnMMlF4WaYhblTY9vdeTxReS8YtXtj3ZMNJUtiqayRadZoCZP5VtpQMKkjxEJk0ZPzTNuEAljG3CDYOyCvAgArWxKjIRJAxImdcTrWH2vobZfAMNkCwNYsgBgydYLEKaO2K5DtbMmgCUXAEvmFEfySnGkidbOxFdvMUO6gN5IOg+AJX2yACypB7CgTeh8TrpfP47T6/ue6tMrub1qvvCTO7eiudnjnVhrfvpd+Rwb6vH/LxS0Tc5T0Lbsab/09IlfPnH5imc881nlYPjslb/yH54zSXvwW7ftkWozJg++iK3Cb+3B1hK/9QFsLfZb76ltvRFbS/3WTO13j9y6R0rjuPU9bHX91tduja+3F1s9v/VpbI35rY9gq++3bq59d03tu7fUrvfHt8Zt+eEH4nb+DbYW+a0vYOuX/NadH4jPsvsDcct2fSDus+s+EN/R1bUj31jb+pdb7NbT/dY/3BJf4Vu1rb23xO28+5b4eh+9JW71+2u/e9ct8VO5HFsn+K1Lbonbcu+ueOuRXXEPfrf23UPYyv3WV/yRvc+nwSkY40KUroX3OY0J1Br6gcw8xb/bEOLicmC9NZMM2mbXvtkEbId8pa0hPLTGbMtss98o8jojuzjso1q2a8bAJDFu9HnWZO6a/joqr+BDH5av2Wq2lfZIZY8bLlpuz2B9htJ+sFZ9nz9Y34dBXPaBfWmX46KlYmf+nnVHrNO80bocY7DZ7SzcGkEwZqq4oBwDxE6D2LQjznXHrndterk9+ZVyEfayUZGNyu3xHOW7iKC3qE+GKsN0w3KubWTZBRgFtLunJL5c2ZxJBbFUCtkd2XbuEg32gmK04wPMdKMJC+s5/QYCM3HKdN5T6uiUusofPE8lCB84mz7wIuUrZaVj1rAqb6ZnV2NDsveUG4CEpgB0ZaqWROYbAGU027jOvmQLgJAblhNAiSgSvswGYllUASNrx4Vgkf2MrLRxxDWtUpO4pvRiNcIkrz0LTYcM8UjRpOCWUZX3hKAxSa8c7cike0xY6cnj5bhl1LqhEm4ZRYk5p8KGmBSVjYMKhD8eTp6k++CIgu4G9LLkSdJlB5w4TswSsdCqCb2yxhXqzIlaUb/no13cM7MfnwXnzP6PB6Za4ZzJmaI1hz5G3x2pP3Pt7fbz5R/3rnvbESmbq3GKJWaXP8WBtEFTlEZrSKV6kUWMQrlE8ZQPONUYhfS5mR8a7uHYIbGu35Wua1XPyO5xjEIajEII0FWMQnhw7rgsYhTKwChk/f7DMgp1eszj9Dse6MrUVr4go1BWxoxCWkiGNB5U7hzpilGIQk6HZxTS4ZJkFEKasOzVGYUy+yR/LE/Ss0UJbdC4EP13zN2PzAb2oEfw+cEfPW72oA+nR2LtOAxvxwZO0tqMhZDeceLO2Jf4eWMBGo3jzZ2hQxhlPu6MimZxki7OydbG/qTQYDTys9kIOWTX/elJyUko6kukqO+ziS/ZS6Sob0+0g0V9/6XaZk3fc31JH07YYMz4XKrzilAfxj+Bh23mQkFR6yUIU/jfTn/VE+FMepbdigZHjFolBK9lkFrNalKr1Gwt22u6l213UlWSLoqIWOGOV9imvDjF+3T4LHk4L4R6d/XRc7DqwMGqAwerDhysOjq7cLA6y7wcFaeI9wLe4vgGJ0VhJlKqEAnaslRrHGh431tnkwBaBlo73i5G5sBbqZokb7DX6fP6q6qmvwq/Ky2lKrPgUEmo28Dbxzn5bJ22qfNJ5HHudlEUoLw7IeSuBIMD42bbOoYSui5Q30FLb0Mwt81QZsu+0Enxm2WnuAFJJfs9QHudyuXsMGTdqXzODkPPnaprOqjwtF1zkd25auRmKxJ+i5ZPmRb/Ayx+q/qgTyNllZ2nO4JyRnQUogNd/DkZmJxJkTIG6gwGCE2zzG4zpuq/kf2MjlPtQ+itMO4kYk6cFKPoXhtZTtcvx7DydKnUxFprUAKVXbcid8u+QaDyEPNTAGBgBgyd3hG8NPQEIHN2s4ie4SZx5ybbZF07TOXmY+jgZ8p35hFEyx98l59yx9xD/2LqkZdXhITqIYeu/cvMIS7tVHGRTKA7lI+JQL95UnhhJA+AG+xJLlXKqEUB9WJzOcqve5Jw6XGORRsz1EsrFpPgtpkey6j1zJjaxRJhu6h0Oq62TcX/xPlWcz3lZH1vXGSNHMHz4QN3yhgMmQsYUocL42Zeaa8t1dulZybzpdqrqsykp52drLKXnna2rDKcnnaWE/T9kU9dNTKinWUjx6SRNXRkHpaBVlgA2mHq74TUbDckZcfmoCNdLqP31lQtqWcy+CqCVXXYFiGQ3PyhtTZTjDufFcUIbku+QtQJWy64j3j/qFyM6Jt9CSY229EJI+YEU2zeVBb8vMx0NntC6EUlZdXGmZ3gBMdsEhIUPUS0luDP+LCz1o5zdd4mvo7J+sFSgZc9zelRLmVIy3718N0hz1g+bTQco8tiPy/B8vByrAsQ2bH7O+dB4AQ5Cft5gz3fGGjMR2Q7F75LP88hNzLoIrA2bhxt7rjcHVywE5iL4XYf24vLZdjDGy2L9aPBYtvEvn3lbAOXhHd/ET915Wo+hbAY1mybLg2Teh9PdbotjwkKVPFD0aPiO1f8VF4Zj2K4yKMYyvymNch0X4pE9xGgDIIl/cfsyccB+OD15Sp+VyTCLYUs/mWRMLiUy/i3RdKCUjHjORIkd3ijioihZeZxlAnnhKkHFhVeCYc/mAMsLsNLNBleomA5oYcXqKgRTIHQBHwCc2Wnzi8hz+27Czy3UMJ0FE9MCGv+lz6xfJ4n1prnibXneWKdeZ6Yajyxbnhiv66w+qbmj8hcA9/oucml1sAvSa/hHmIebnPOnDgZHueqCvd+UzmOBzhW9jwVTv353ee8BckqmEvUwAPEnKrizLZp2zj70tt2MSI/s3UEBnlwr13q9sxcPCLBPPZt9/tmZrZh78yObVL7KtNeVjzosenx467klAmcnKupzOounrkQ4dzOFgRRMAExpoK/WhQbQNftriSkrk/a6Mm4YJ/JNHt+ZjIGTu0zE3i0FNNkOAhWXlZ8QYtaUCZH5XJUq3ZUiqO0O6orR0Vfa3xNrwQ5mAfdam4f6S68kvl8r+Q16eN/JaWe8OfqlWxOot05k+ixv3/HNIku/MT++XBPrDy6J3bVz98k+jP8xBYyV/jEVj1lDJWfuyd2y4JP7NLDPbG9ydE9sjt+8ciO+yPbm3odLZFsaGY+i7dkw7zoDbOiI6LPWTE+VNygSbGSgK6CsTtV9IdpscieeyXp7wsmQflZFSy45uesQFB1PZIOZqeUT/WTYvFAc4vhOHMtS6dQEoZ9EhJuX8fKJ0p3aVwYpQ9Q33PVXfuusUe2ioKajZ1RsTcD+RzcpRYcPy1Xx088nAv/bDtdAO/QGvVjwuFW0eANvGWkB4olYMcvliIIgfsXk+rZG0s1oOp6PyXVJ79CmkRgbTPuEs1OwXnZKbk9hfw0ZeR2JS05aaUZt9adLp4VgqticYopgZPaH5+Lw/Mi6Cn03pOq1MfEjqEeRcmwHuYRfmVVKXUgSLN4ce00cJ/NG5yeG75uxrf5zoV6DIKKVsk3qKHVslOvSV50mt7tRNOvUNIQvChXqFHxH/2rX6lOu3e/IfOdNmW+06bMdw1JhLZcwAZA/LPBb4/5yANSd6t5vr1S+a8n5/nWheYc58CfuXzg/gBBSYTpVAKmAupW4fkgO0pl8TOE1v9UKXRcRUAFSXUkQaw9R4zjrt9HGFgEqWEkOcbUMJ4cg2o0J+Ao9AvB1DyG1WgH2FkFlMypsdz4i+dXGz/j2NXGz1iAECdxUudu0tNNwVRdQ3lFpAgRXqgumBrrqLuo8kdS3QlzopCHJF4qvPiyCvla4J4Y7A8aKcJeVGme5jXN03aUke2WY8iXh6xsl8VPEYQ/9SLfBJ0zNsXUbFZWAvItArrKIPJN7ZfUiXynyMqzvpu/c/pKVJYRQdEAmO8Ko5G9fiUo2qoA811Rd2GiBNGwLvk9SqcqOrcTsrgTGmdro1k5U7aBuWEhre50rpzoXH1RucUecw720X2zlmfX2wwj4BPDlnmOPTkB8iAdb0MPCeqDrNo2l+jiBk35JXCDp0GCmHK/yYBPnFKpQ4iR3JXYpY8qwYl5EIk8NajGBFFCdgZO2sy7qml7EHiH7AJh/i2pasZxWJ5nidJdoA1S86/2S2Qzf4QzpoN0nAJFKa/A2gf7hDsESBCBkS23360yX0ECAuUYW8ziaTvrjG1YXiYUGYI6VoLDiG/QJW7Zrp/2VElvnsbbFumpRVol2eHaHVqepfbQdtTCNGq5ju4obi66zjVWTZtVmw7TzF5PWPfx3LArCMneEBJ4s56xwT5YUWDXXoE95QwFTTDJwcSprYNJDTOYcjKM9Rx9ruvCMqTz8oXTebU8XpxpE1F0n8hzG6Wu5NF1JY+uK3l0Xcmj60oeXVfy6Jry6FU2b0a501PRQhJ6V4iIEW4+3PcOJdN4tf7xRi/EGXxaLq2l5diLM0r0IYVhnnm5NM7LYc2rknOODEPWuHemKt8mtAiA6lC9Skst47YRMQ3t6WEmkz4fdu7k2wj7EYxNGWTgeqZNi6/MXSFTdZj/pMOnNHzKwqc8fGqFT+3wifNO6kUMAhOVxOdQLINo3VqCmNvTdiwnTi3DtAW7ctE0G89iXe30LEPTdGiaDk3ToWk6NE2HpumqaVKuL2JtgCIlvMg8XZVSA8HdAZuesddZRrO4Z971UTt3nmLu/aibO+/AXKkFiAI4VuL4zsqg4rexT1NoXOADFEfDNN7hlD0YqxZCWava5FhApTE106xnNJoCBiZdLdm8ssMVjba/YepNUUjEUZ+lyDB+zGVdJHpZjqFlblrKMVthQkkALcNa5zTH7G3nSH/wTgSIpQJUjOAsHSAdDlJSXVb4+f3v7On4Ig/IFkduQbkpSGATSAFLpk0s25QdMbgjA6NH7go/5H3Vb8Vuuxux8z2m8rRRe3uaT6lJxTmaSwiZ35HU2y+H9t6YBiq+zOXbtCDWgO8DiiE3LxpxjsrN/2DdvF3AxjeUbaaf7ks2bKIeRW5OYf6USDCpr4Jr0V1n/ynXbVoeZLAo4NVaG0BgWK+uf2AWFTC7vxZWZNPb6K6wN9k4DZxSbJho3LxjTkuL25W3pFjJRqyipiSfPDgvYUTAoqpUNQBI9J90+JSGT5l88iIiorjhqCE4F9g37A9HxZ2RigYENAY6PBcPaRmPMWQqjKjEw4XkUZROMeMNNXxJSst+2fphi12INalDO3UIU88hTXSFNDlqKWF7Vrs0tSukSVuWJs2lqcOlSRjxGHHRYYVKuEJ1gifmkCb+c3k81H7l7A21XyxMSiI3icd5uBt182+IxCQJnfFjRZkkAWXiNMNs57esvSDvCNgZFBKfoneqoHhYEPXDxhSfRj8l3FHcrNcKgmSZGI/JlOkKYo+PY6y4kr7ZBNTD7N/CWlx20N57vW2aAJGoy3a/3f61JHke53D7KwpX4EYLPcyLVNy6Vu0yIp9NKUm5lrUZ5l4LCXIB3+GA0VBuCKexDVVRQ/U8PzZ/ssy3yA681P20GCSSjVo2dFDixFWcCkZEsxbTZUIMXtxDGdZyTXhxkZHJwsFQJM6RS5zDsyhcf52dJU4H3No24XbbM+bG66tSSDE4rsCjEnuBD8OI8qmdxdaSLoJGQw6jIaWPK0ZDdtiVUIwGLpj6CTIa9HpHDBPAbAsYDTSo5zMaUjzF42w0kKjf2zNrKWSUzWc0EFOU4DD7lL7/3j2wEK7+8z0yl78lFc4DV6SGu3FMF9bsy8KqQK/ca92f5VzqSL+dlAx++2RX4uO3V7pwhN9e4aIRfnuZM9f99rgr8eE2lwbM21kpDCbFW+lPniUFaGcIeKhwU3gq5FApSF4c0agonUP+cF+ghNBCmFPW+REmoyKzKtYc8yNMRKGwKtp8d5NBQcIP3HYJZCz3MgtXRBRyO7WG9UpfpvbayrLOvGX9lHhJjmxZ/+y/JH//JzSjr36tM3j+GPHWYAor00UtdmE6xT9ZS9obMsWZ4hfL/oE1YmdmLjYdblmPC39G7svRlHnFtHkV6z/dLusyW7MIMb+Ny0s1VSbnsrsKdqQ/5g/tlL9xOT8Pq5OZi0fFmc7tKj6TyzzPJ1/qaVolMkKgigtyiqlpHKV9Q+3YKz4At5FRJLvAgI8MDxRxyyl+Hcjuis8xTub/HFAumASBaQ/uxjcjjmVlf8jUwQfguLv+ykbnEq+ZgV+Pvo87W5lZG1c+Z+7MKUpmik/nPNOJve/oOPJjtNCmlOmmtdD5hbeGMVvckg052lOT4rN1bDbyvUkE+69Ro5KWrSlGg+zxVynGgIYd3mMbNj8DQXgakP8TXdN0mnhEDtsULoHrVWuYIdSnzMXTgzGne5qVXeie0kC3G1jkZOPlgAham4Uf1SYazdwhf1+OPdrt0bIH5JSgesqCg6gZmyMfB87eHo2E0ww/S92Z+fKL9ySyj0Geuef8WiI9EMXJCKFGcEbiL2XW+5rWqSA3dx57hmF/I8Nwhpvo6hmGVRJf8Jm1yWqm9Ym1KO3g82pR4sHDuKrUg9O5gQF6Blh0Oy7d4K5whQ+pCEWFOyOQvu5MCCO5U/TAnukwnAwm3VR8j5btheImXzBPvetZNI3CatlidmNSVgTXhJ2MmfyjluRNWHHnW3MzKdF0ZTeesYnrYN5cB7P6OpjJOpgfbh188hdAkqdrdF0iLO8PJZEi70oK8joTVC+8THqPOZwpmf9MiScWcavpZY/ByvmFVXP8rZp7tG5ty7bKmKeAPcJdDB5MI/QkXJccAFunUd0YcV2OORrIHieOi4UCm4Gzbtkve+ffVPbKsfNvWpNcjGO6PGbMU1+6w8d4XB/HXTwYaxBbdjjpDlvrBdRr7vrTPQh7HHjzHl90RJhCK7BdjrmW9DzdpbuKtGZc2nOxvZD9ICSXkuhxPJdpxXMpVfXhDnGSOtGlP5lt9BjTab1e7xGtMgnu2dak4kUJzxHVELyzcqo8Dg8HD3XgSqIm8FGHrcotlbol4hIY0rHTDcTLUfKVbNyU2YUgh7doUleltUC1UBoCKrlcTwNznU2VeoOEStBl1kLJNpSpP7kLQtFMLVvLxZpgxV4zLra45w0aOLMbXJlcOAXlIOpN8/WCtaaFSKEPQpHgUu6rKl0KITqO5X/QIh24P0QbJrHWuyoY94dpXLUmQwYVRonkb5VL1qYuvEHfuYwoGlWgEQ87yOFYVNtnoNMijkblMoWr8AQlU5vKcvzioTXyIsYOhZSrRsK2xyiiy9Tq+TK1uqx+YgcAyl85RnWDsUPFmVrVzNSqZqZWNTO1qpGpVVWmVrlM7UEtyNpdR13/s/3q2TnFP66kJ6rxkaKWqsaHC32n6tiOyLqlF7JWqHRFPwdcvc/zUM1TssDg5FDvQ9sI3GRgy+weW91O70h1O9ZGO1zdzq556nYOJFLoFNXtvBZ9M5DvzK63IUhzdbNu5wfH3OO346yZ73HbPU9Aj79dPUW7fBad87S4y/fN6fK/1owpl75oXNWKxlWtaNx6ML1FWisnwzBIpRhVjqIpmqCY2tEGGjEcIaRN+4CODRL4/uuyRtnzyuummH5xK1S1tzfIBKzBmu2LUBufSCjBHnUSV2LrGJ3Nihe8zLMJFK9zpN+tC5VM2a9u2mFHR4IPl20HXAC17toeiFp0254pXGGY8Nxl4gprwJjjbj33HTCQeyN4hEngVq9sWa/94EO2b3/VHPqORxLYtcLs+I5L0by9QuhnK9G+AdaxuHz7sP8r1a+pjOEPZCiKzZuGLSnwmVp0QtJgDFlaLDmB+fHxpT1my5cwiz5e9Exu/9imtuyfRT27zKbj/Z4Zt3/Ge2aV/WPds+faP2M9s9T+6fbMCfZPp2d+yf5p98zT7Z9Wz0zYP3nPnDgAqMw8Q5AEM2qQ49nNKhAgWCtliymngRjbsqnMN0lKRkqmWDuAZMipduGKwJczOoi1VODLrAG+zBrgy5o4S9EQZ0HiKwZfZgF8mZLVVPSnej/SQqsI87xt19Q2VuZxKfLuSJH3MswrICFse4LtMvEPQCvNmv0ffJS6QYbQ+rb5fthkhdYBt9m2hssKTbBHQgQT6ujMtwV/COqa8Plh+5nGQtuu5Pr/snvu/xjO8WL76evQZLZtatsV6zR9oVwCTm2VymkTRudMfmxbc1EzZSKnzuQq94Nv0F1xgZb4y+9a6PL8BN3sF/b4sRiBSKzNivjTmM1s28cCo6TN/E2LrOX/on0ma1cEtNjvgBb75gAtDszFVUzMi6u44LHgKvZWuArgbDM7NW4UZEXYPEYUxUz18VBVUX19DVvxMnd+oiZwDaeqQXDFgTqQ4gJ7uCkiHEVRw1G8TGAUHScii9iiICeKGnJCQLmXhSzi3maVOvpUjClXpR66V0ykOVXpybF3t4q6O+rq0M1HW3Zehk8TcfV61MEFAYxF6NsJqUSfAzUs5JZ9ULYYrfnpR773qe++/s1vowSRWnPJp6/86Ft+8Hd/+/sI7UiNun8YqvYwlDBMh5yjTzj65+DKy5m36n1fq1YV2k2aUoTMUFG9rZIiFBlCUNkEKUIiNukkYD20joHQ+2YOG0gYeIQMFCSeDsjAFkAFcq18Ush9mSFslRGrL4hVUp+E7YxcCB34GQbLh4y/C6Ft7jybwL2bExLYlnY4SCAumhLW6SGKgRfXnhFkuOTQlWukZWsBDt0MoA3wr9G3XeOf6WSdOXexb1TvKwji2pW3G8AMeGBG2dscs+dHrRqK0noyvQ/6wJYwPTHggnBKooYaPEQ98vQMBaNe9jba3gF6ZRwMpEJPbA1K5hc6ZbYRMQYEahVPp+nL4M50zPZT9sn2kwy6AEE0zoaJtVN8hGaetSyFS4gJGbAbIdTx6KMp8xhaXsMBoqb2awIARMUA8f7fQtw0AcmLwncIij6aTKPImd6aHoEOUMF4UlJP3YV4IevW1ou2hXnLRyDbZx7+lA9M2EOmwyIa2Mt5a2cmbYnllCCVddWkLxC9lcBlro5Uuqa8mYCTPMkFperJpAJXjgr81xUu98UEJaS+4hOFpL+95ozL6mzgD7qkRMU0SHV0Mm4EZN7+RGLnw8xP3VyGhZEk7NrrnP9hK+zy1PHDdtjFiAAwxPEqkEBQPai/UU8dnGEQJ+jIk9MnJd3AuaLNSTXKFW13xowr2u6MGVe03VkXUQf5S5wATsOTB39fHCTN4whpKw6PtuPYaEc2HJlLxaFql0lqb1i7HUkfxYUsOSWB0Kb9kwMEQyCa+KYZM152Y8LccLt9Td5n/yk7y42dSO0farsQIDy+JE1Q8ToJdARyQpN6RW2vecQaW6bxRYoYFrasF8JZsxOudi2uls53ATufILdil/Cn2z+njsyO20UYM2fJj3k6p8kcZEcTmE1O0hPkabZr+wD6H7oYEFB9SlIiykrgnbUdV4Da6fR00v4Zg1GZ09bEO5PTTrCv6a2qL9I27mZkB8DPEyN/HzhiUq8y193O27WfT5XGD9qO8yxHjgsRtZzWepn0DmhB3AQOVYYgtcARJTJdfFJyr1BX4yTSWeuGoY+vu3h4GDcBByZhceURcUjXWk+pTWZ9LDMkWDECVLKfliNGmW2w0yohbRIIJPKbC4i1us3M1mkQNtCHdS1ww9auxJtC9DKT4J1jKJ30zDZlLdCvAkOp3y5qgX5lOnGg38fmvd5MoC7Th4vPhiLkb+kYCx3AZrnM24lDRXugGUA8HoGGaEuEM0sYbUlivp/EoaJbzrxM8GOiogP0rLUw9EwvgDlLYlR02CiTChWdVKjopLLnk8qeTyp7Pqns+YSoaLmGQ0XL6ROPila4gQsD+Czx4GhvCSYeGS34MUKYrZWzR+Re4H9LTrnp+S+abLfcfypttXRrnv8y/EO6cAE3PJis67fgpD+SiLP+j4l46/+Q0F2HezJjJ6u+MkNBododGjoy5jkDzrFKWGqduExa3CS2klGbXmL0FtN+eaisHOQmZRo3xIvsqQVZMTPTOY+sNn92j329/6P5Pv7MKnPz5+zfD6XFe3Q/lXzLT6w1YSbNvZ+2f3Zq8/Dd9u/N2h4gilr2XD99FIbKOw+OrbMb37/0jI2gF9jPnfs/x52feeMfjEx7wyZ8sfdbm0dmeiPacIX9tP8lPHxmxn5+x+aNm4Qseuan60fmnmvPZ0HcYW9NMtQBuZlV6QWsxn+rjz2/5/J34f34Rf7uyPm7h6J+drpIpyRPQxRpvQgXBEJl1twHimXqARW3u3F+asU/LDPhyRX78OncsbLiHpYdKyrmYdmxrOIdlh3jFYEyd5A+GU9aV8zHbFWPzolbjVC0d7szZu0PsooquXQZ4FNHsWWjnbhElQFe2cgAr2iMoGWNETTuR1CEFuBSV/EbWxcpj3AumV3D6Jh2CL1wrEoS9M3qfKLWOslLu263pkpgVPBErHcyzMoWEEtgFM2EUTQjo2jbsIqkfR4LTLFai10i2fpcOq4F4wOYnEOCk+kzEJ/gdcw8XWjHCTVax1jcQvRoXtWLpUTU+HqxTBxo/IyKi5uZFENatU3kK8vwNhezuZQLEQSBS1b3mpcdEnqMvBklOl5giXym2eVZIs3DP5pFKdmM3/GQJqjO9DYPMlMO7OvvahdWy0y7BTKW2ujN5if37UmEdmwzrAvWNJc5WVNldtb0GBkAmMI773Fg4Rs3Ez9LwLoaV7wz59JAtb/MzHzRXeJpWwYpyW4FtWVHqfC+l+cRKBG3BrbN9CBnqaU9Rdj/tC1Ql3/5iA5/mTOUbi/HfzYuZ9GxdXYTAO+qIkO05SdohLUcmIolIy99YQh9IL8wkGl5mtTFpbnCXk8Is2zrzK5o687c7PSbf+0ALoVT2iY8LIxYO+krFmkLHstuFqwv55rVJ+YKaYQZtenMZBG3xreY/dga51ZrS/i6b7iSEhuZlg5xuI7qrWnxJg7ETl7KEYnXB+RehiY6XIajy/X9BWZ5OeO4lasDFnNr6RZzcN72hOZWDcyEj7OpNZ5aH060xlNg21JRG3ctLVOZJ5zWDpPgAqjTHOkm6c24AnBrgGs6RRROBMI8Mw8jOoCOXSGpJOeKYLKWnpIiDHS+Nn9NfR/N652mC5zJfj7Lpcv1Gn26Ptnu+MlH9kjxMpuAODItaTspFfcrZyCIRirfflyyl6x57UPfefM/7n7DV3Zve5FwOMs1v3UcrtmXiNX4QFYL83ZnU68IHznfnqZLfuoQma8ZNl8m2qyFXFOCsmtSueZdh7vmgFYbXaC090BtkP9idB/P0f3HtdGNx8Wz2g5F2i6zAyY56rRd+msMyuuQtkuPmLZLJG2XSNoukbRdImm7RNJ2iaTtEknbJZK2SyRtl0jaLpG0XSJpu0TSdomk7RJJ2yUubZe5tB3LsiRtlzJtZ33nRAwm82o3wO1Y12Goa1/3CWJT201nJmfDkNormrUag3sZzCTuKMIrJ5wCZ4/8SJ/ke6L4AIqHUjfIe/fPM8TnG+DnSQD8MANNzx3GHB3FW1IXS+45uBGh426UUAyInodzZx7nYG2O9yO/f0czvN98bMO7dwewtbXyMbrs0LwCGgbR4iijdvTlYhl89qRKASXis2f02Vv02Vs0GKsU0BlApvqclYrKxNRxKhNrLVQmpqMysdVTHrVfLxDTjQIyz+/8IS01rdosliomF5FMUBuVTtveA2xOvrFOdIuFBS2GwgVoDQwvixXLXBg1cwGfd8zF09YClbUU6DTotzNBrKA9DPAyAvnTg679bA9tSWgKQAfs1a56FHg+UChsEbiMNWE3b/I4s4ESqlSA6irq0HNQmkHgeM7fLHA08CVAoRPzDctMy0ouJR0+3B8Vf/AetfwUXkWccZRQUuFCSSFqxNxj4nOPugoOpRJAmTPwkscSLNobSgir3KP7eAwjrAyfJuKBGhUnFqST8blHFVKBrhaxE2oRq8xjMifzmNQzj1K36FijGD/6QOWuBbiUsSZ/KUsNHK0uADZqc5nb5TvnEGmDTbZlVuH/N0AME2a+PTr9PRS52E8sR4aEX6tPcMMzR7l5Zg8PhLqOLeo6toOmY0vodduk1+0wpM3KaXuhVnE10j0d+0TXMh2GXbeLFyd4yfHA6V5jd28759TNw8gvtx3KHVriZaXXZs+tBn4HfAh8zeyY/KDjOWtbLkn7qRr0oD4YsUrsd3HNfXPimgfmhjEn5g1jXvC4RmZSByFEm8cYtJypPgYQAiOgUSjzZe78SQVCYCzzgjBYEx8SSipiLzv07tSk9iqTwF3j8s6MEERRg1gppE0umEotpF2mPvvcmhReGmaf2w6unHuXUWN+cv2eM61cOl6arIzKvzOsha2Il0ZcfQrAbitdc1wSGteGKEar7IQkdO6T4qn9Ogu8NF0M5mYSOhzrLpqTdcYzYk/WWWcgiqKFAYLEI8Ir0/v0Ywge/iI4ODc4uCe806skcPUcLqXJmis+n5zP9RjPGKscRRywvl6MAmgeMDPs4M/WV10HYN2j6bR5KPk9BKg2m6/dvicZuTLrzGxl0sZ++9IpOa5xRGpPinT8mkf3fOXXfscO9USWzuvs5b6dbGTXb+Xib1sx4n6k4P0VswXPTLU8M3Ze8wxZ4zjps23xAatGIgyJgMvuPYlQL6ALzHPKdKq4Euv8KnThfpfDh2kIEaFccNWB2ysXYGxZbU/U8OJ50K2o3tIYLZ5Toj7erjOB5U2qsLxJJpbTsIvoxqIpIZCGJU4FOJL5EzXfSOdPxHwjoT8hTYyU/oRZMbQ1cbj5C+xXs3rk6ahceRHfvN3gdsjD4qFJK2eniOI/cS96+I2p9LBzarYdhQtJ/ijrMBZNYTiWv+++a9ZOB8X3M+sn2s33YxPKauMirYZNyItZv9FuXolNaI9Z/9FuXhY2x7H5T3fOivqY9Sft5vfu9L8dw+Y3wyYkdM19d/rfdrD5yfDbNiXWsAkBNIRvlXk7NqHNBmCLMtvDZiaj8uFPzkKj7PaM6ynCquPOWzSP2K+KT0NK4WOpDyncv/DhD8aH03m7FwdDfU3wvLOfdLcRPKKvaq/WWOlE2OHixB1wQfhVqFMpPkTtHVQ5zqi1PtfsRSEitYbtSlQMY7mGTOQalKgzOLmGSxS0Iipthuo0NW2GLCpJjCUR69oMragkMZZEdK2MVRHZyrOkiLEh15CFmT0PU/oczvkisIF2Auf8PHIN+xw4pWStiknM/deQSHNJbo37jLJyAIQzU0O2tNSJhDovHItr0eUMUuzNJMbYkbo75Qg3A0fn62ZmZi6CF7ZcEOSEmoPM6ESODCGIYySY9kTLJ/FnNP+xRnBelMOMkQs0ICvGOJWFCxfDzF14mV0YeOE2OUcJzMinGFyHuwypt9SHQwMfKfaPBvaKxHi5CqgJO03wiAS3sAO3wFC3JBSufredrD8tOX9zF7hHb7P/ELrvjX671CUrk+KXaP1OSmP9rDHJcPykPnmQFk/nASUpS+2ucsCo1soy5gz1YLjl9vgJHj/hj5+Q41cscLwufpnHF/74ZQLPQ5AzUKKibIt51qIt/EwJ8X0VeSsinOaD76F44TLbdWXxtIHYbu6sqJBORFw+/MqUcEXjfsbzfPZGl7VOxGwBvrX3CRdQAkItq3hoxU+2k8G0ZA9LUNEnz03spGuv8FHNcBnlOQfatjlJEXrJRuZRayuTHk+DGC8lMV46EicO2Y5Sw+zdwuzH4o3MZ2BesVe6BFBO+Mnmq4J64flmJG6C9XggfLELXPL0J+aKggFQIiJefcoEaGY9+Ftc6ZnAbkpXfD1ESZZ1jcgo2kaHpi5ZpaT4u8WAAZUg10rp+PqyNbBvTQ8mDdQa4R553EzZNe0tLMCbYnaw+oJVZYmIzhHjkhQPRvhAJo+eNECgZ2g6uWTFXuIp/Nv25f9CReIfvaZpKGXS1nwzv7JRaKQS80+4O6N85IbQbzyt3GTrSIqQsfMy+0iX461hhG3YRqUDQJ1m228Os+UgviTLIU7QkqiLbcRzRsN8TSJBttJ+UUUshpn/DHSf+4w/YH6aPK+vnRcAUmwUgVN20nnjJUF8eUDonQhgnQ9lLK3w56AkKtthQ4982C3AkdjIVeKba/Mcwlo/eiyv6W/oxmvKOd7VBunaa5o0XxqHwLX74VTb9ybpu5E/GiZzXxldvTI6ekkXuODpT8T1tLzR8mIm87yiO1OUY23VF/tV4ONDSktTGHA22YBH/NusUgVf9x2PtolMhgDPo4svHaTmkos4J9tjH7V+qnp+4v4bcHC8yAHQeTz/Sy59YbbaHXXwDjhT17xncY9XQTm9++aF/+2aj9vx5q9SZmjSQJl7XjGgifatT/zKyLZw2ZZSjz48zO2v9v90zX/627OvYSvPnjbv3PP2R9MRuMXLdPsd4Xo7h/ZleP6Ws175G9//L3/3v12Dy/sWr975HjCghR37z77mGvte5GV+zZD/MFDz/Hd9+qK93bffefY1z7/5otc/41PT956985rnZ//y1re97W1ftR+JPMBxz3/Rf/3m0h980h73jfSet/zuus/guP/9TcMrV274Ij6+6b/jv7+xH3fa/ytb7965E6kTgeQn7w79+J7ejQT8R3wWghxNG4wWqTBalKkW/ffSa8J76gsdqC9Eiz0rvqtKJ/gpU7EjTebpNXOcvhQ3lyu4UtyjI00mmhiPSwtlsm4W4iZRIW5dX13FflfdYUwaDmNSdxitAamzgL9lsgJhpVMSZwlkKKILgSSh2pUkSUuQuIbswQ6LeyewuDmwuHZyXW7fmhpUFmRn7EygUskVytUKv94jL2TtB6xUz4VjkgmYlgtVPL1MY5Cts8ef7vgnW7AvU/iLBNlmJ5HzMgPItoP9DmTLpA5BtinidJOoHmAWg7OyXYcw6Yn5rz2O9kSsUQFImwYgbU/0ZnKGojK/Mn1PU/FJrzb7bH+zisUlZczeN5ABTzTlgSQ3d7s9meyZHJlZtyeXPeXI7HZ7WrLHWqy73J627ClG5nq3pyN7OiOz0+3pyp6r3OaYrz63PsMbFeKmoZmueALkKL4uqMx8XVCZ+7qgsuXrgnxVV+FCnlp8FgZvxzymPVyHwTWPi7JNPnT5bBJK9wNNY7Q7C86TXSFhtbOhZOcOnz70GEJ8vwjpJb2Px9VRlRmQrfXF4KlUt9Be4cAA6yIGOdg7J3/PWs+oSs0c24QONitZP7SYVc/Z2G8JtHvKrhAtMGANpKZp0HLreraWeKXW6OQEHOuPJtP2+zZLZgLN0TbwZFCDMHFKwx1cvKTacIZUOxzg274xG0BLYu5IM1Jnc8k9XCLqCxm+s/fxMrmPnuvCUphDF8sZrw1nTP0ZM/fhL4487DLhr4+Jfv59DrXrBJtnLWCQWBLsrxAWAK7/WaWom2yUFZp0+FteMtRTYBnHSNk8Zf7rqAeplRWCmDv09T0Jw8AVnts8LCIi1l+y89fmYWvaVctjaS4eztC9IEIjyW8qjOz4CXyCTdLVgYfJ/p5pEYR4n7HFLnUjWPGy0q+lgJrajAq/oT8jebtIQyvPi9oOHax32Mqk0JnPfwJZslIYZwl3nrBfu4PxU5BzVUuyoL/IEBiVxEQxiMQxw7jCmEwq4zJmD1kLNmE+jQULi1m8HEv2RCrKw5E3uKUtPlLQXzxGy/Kr4+VXS3mELL8a780Es/+y/KYnkSA1xfIL5ffULb8c6Vx+NVYPwFRaWH41p2S4gYpLi9nxCMlhlxCWqqPlV1d1LBJ4tK2uDh5kUW1LhqoMh3n5kHa0ixPSiYKoGpe00zLS8S0bDWXqWy51nQykqIBx0S5CQnQMHm9HLi+vznICMFOODYVTpTJmuPQXIzE7C5p5lHgQ6mHNGTDxzVkRRjhrbgROWphl5Fguk3XL3YqoxF3QfivhePbvgdnKc71iWipXOTAnGDRCaFDaXsiPJ3q8bwfmxYu5bFT6ijl83fuq8xkl0ChOGTwtTaoN73cvSqVUH9hET5Wz44Y9ga6XgKLLd+8hgyTNkyvtBmvVOb55ShbRsGR0eqhR3qiZYMxGFWeGecjd4qPURMpWFw+S59Dk8OQd4dTLPXDE7+QgARBIHpu5/waUWUo7Zv7Cfr529x7PZ4s0e+MqtmPsZciog/Q3FhhhKvbhxNptY+zeIK9IuPNHPujvvC1GePF3KaM+UYWyI0s6N7CxyNARXwSMFi3CAnKg1Nqlp3nvuChOthrfKKRbq/CR9fLLjv3K9PhDeLPQsCdifNDiHgBQGGRFcCQ/D6u1E7pfLtf3zOE4U1+WeanRsIdPCe1+ihI34Z+Qxc528snsFS+I07E3YFuN9nGW5RdsFQuMO7K44k1+5Mt2zf2bVIK6EhVqMRZEzELv7QFjtfeoMFYLQVseD6YKdodHtqjjhGyp8FR1ZIuOkC0NOFXAuDi8Su9q7SUBPGtYRywK/xTGibDkUKpownzoX0dEYWMeSAUKLkLVZWj6WSebwkTCwzIXMQMvvQwusP0pPC3osoLNkuAlH+Ba3KufXWjJJELqR7LfE/i7ANpsOTutTktW8bw3uL9oljjAC6Nh79Yx337FmPKA0mTYZF85ynmQer7UjiK9hSonnB/hS9rHgk8doZvvOnS2XYEFN0mcDicQOT1gPsxwwQz5sYquUni2m2DtNe6hE+6hW0F1SkEnlARlbljuTBZ71i5PFSN0bJvw4FLHuqg9g8J8Bwf++9cjXUf7Y79nDZGa5Ehk6QypgA7bq2pBCS1BikigqqwFJbQEKSJ9qqKWxdYu3IE5TExRwYispg0ihdV2sBdvBKsttf1cybXiN2rkgHIafus5lf+NeEVwGbnE2Jl/H4Cc7Ixr3zKb1Bgk9qt/1/1x/Vvn7Y/fV+PbzFXfFFsblo253m6YRyFxZ1imYzcZbNdDTvq6KYZmB7n9dCLAm8KkkNMa4nlQ1fss/rMRQ7vs9K6CyebA95C/AFON/bueKzFX5mEqasdpUDvm3gx74Tnavd5ibpvfH8FKSVjdZE+zVkSRTbJ+HSkY7LzF16nxnayO6/oE1c/5MpEvaW2M8VFukRcVjtrzFD61CShyu6Fd8bxEJq+Kc94U8q3iBOnf4cSkI5gtLsCfySdaHt9V4n4ird6l++nlYoZjQuKWgIGMpnkXz/bhd82Cx01Y3Dp2OvpNux9Qjm41OLvCmVuNzi6hHN1qeHZBvtkBqq2LgS0pasI7HCqxeEnZndSTBOmmgg8M0EKS2Ii0nbjJzOvQzNrmGsrUtlmyLqZeu8Vx1u2NxfbOkkqPM8xWsbolUuA8kjNGxWfpJhQQc2Q8wB67Uv6skF9O+NDvBA7Wkhkn6SxLT1JX2bhyKLG9lfIrFJLYN+IFpYZhZxthHvrmLImQNYtTTi1F0g8UTfh0MhwaTYsbrXqIOXg7WomrR2vsmcxd38ApzqnOedCds/pVX1w1WXxdmxmcHiQuv8/qNIGtZr03OGzATu0BmLPJenFFnEW0TzDsqblKj4aJN0Su0FHuaoeWBFcqmfwow3VIVWktc9BudPzGAbvRjRJe+5VHSIjmqp1Gij9SYkslwa5ZFdEqBX3KRGKfIfvF/H87bCDiGEN+u34D9tJ+5cCUOzU6RPfeX8sVsssYgyk5cEnAX3w+c4U+1nIqpasmpHrx5ADRhzu7EiZa7iI14ECgrtKE0NzbMXcibxk8P3bu3V3kZEd2pNkiUgPKhH6g725PCpgSPxRfHEV6JIygNpIoR6FfWlEz0sLHrFHnnEn02V8kk4vQOkhBnyhqIEBXROKlYE1QVdzLYWMIVrsE75zMR6sc3JTDxlEYujyJLw5ViMwpYe4T4vZKaqusxABgZIAW3msCJOaCAJq9MHx6Wfh0kf/kd3TCV0X4NBE+rZ4i57xm59f0toRpiZn+6lRIuwUNBWicvNGuZL9ubvtTx7zzmso3E3esE7tj3o4GU0jNHWtV7hjfWUy43h2zVnNats7Ngqsnpm7OxF8makBA6J4n4Jk5ThieZtna2M9kyKcuSAj/KxFBUetSSZlAxW9b+WE9+Fu9cChMZ+9WLaYTNkIiOqncN3sx+mX/oshG/O9yGFwqIbmS+HEo4dk1EhtKGNzgYGs+UaLbc8wnmcvq2wlutZ0n1cXIyeA+72YtLvw5IPXPv+liwT7acVS8UwpVYDBRxILeUMKOQxZ727QQ/Ut0IIfXjotIcbtcB1HzLUN9U+1qLU6ftathpnlnHp2DbmxewRFYdkI69r1KzI/e5egED/8loR1iMlktX+CWX68PgMUMeAcX1VsmlnAaMdxJRDpQKDJyaD9hYV42Mgev3yPWcXG/OlG8qdxNf5lQEUrhVck3psKLwsKUFgA3CpNQshaMMk6YcZMF+xefK1a5icDwUvEdbd+1p24Gc3J8LUL/PgwLXbjUU7Y6phwOLEYSEZLMEpk/0FnSV50TuQK5eovx8CPbe0n1IxpzeJnWyktV/crTND3eix3tjyQ8qIVyjv6xCJLYb3tvdnkQD7p1zXYFKYDhmbvu2wPTU8WhZVewh69n5/kaCQ/tO91udWUFxayrCExVMTD17tv3CDDVutcAITrkY6SPkvTdop8wzkYpdHt0d62E1e31pwXPZ1srIfOknsHuyZefmudLKaQXfyAAX1/nY6PCS0xVWTdIfHA1UFKAJajBRaEaXBSqwUWhGlwUqsFFoQIXRWA3F7eCF8VBdFvPqi66ShoR86nVGlE2GjHRaETRaEQnbkRvv3NXajZ8ESYJno0zRfG78vgmPKUUXvSQsi1ce+UF6FTodd8E3YChaeeZ+1vwctH+FnWc3loV6U1LomtSr3DaFuMOO4sxb1RQgEy80X0Md/j/PUXv8K+P+g5n1FP0Fg8qcRMqv2nVwm5T5DTFLlNwpmZiZwouU3Cm4DIFZ+qAqmMEF3SZJmOXqYxdponYZSpil6kTuUzzOkbfUXHNhCDDtdR/Y2ptUB8cB84DjdDGuPHZqyeWwqC4VfkJ+W+UeDQljThrxs1itDgRzyOZcYk14gKECkKbc2y1s72pttpZamefyxgMfmy3WrTMxOxpbRaUTWvzQPgrGDBrsTIbMf4BTyOKTgsYZ4RQeQPOVzDSUrtRk/CsqgvY+7U9DuuMT05eF3Y+uBYxtG1X7LDfEJS0ZtuLMtm0Y1FuWaCJ5iomzMxVNzqzWM7mapIPk/GbuTHK+O240WX8ql+bMkYerRH7D5GWZWF+QUjTzi8OuOEgURi8jzntxovC8ntEaU3jnjYLHgVTvDuQwD1bBvzZUjxqX3KvtH5Sere2XaV+m+bQXi2UheeICMyama222+5miL74z5IetjdS/MQLGe/QTEFxWeZJgbPdroWt3p08m//k2eFPruTkv6E7guWUBd9AsG2HvKl6M9bj3veUTrdlzpr3OicyA6mQn1LBpVKSlHKgymJUvD0jVFCSRrTyTkoLeAPWiB6wZqyE3X1SOjlom9n3zCbFGyS9e+rI3CWbweZwqQ9/fc7v7YBmbAUcYx5eP+DRQo3HOIXSKn1ozOauTkaJsX5g7s3Oc4vBk1QC01YyWKo7TcKdduROC7nTCbnT0t7pzrfuie/0Wtk8XneaHfFOn9TH+sTe7JEf60P1dcstWcnP2aJ1masZLf1d8lld9Wd7UKL3GSceipmLvAGB+8hOtQ/hmA7PYx62n4s/1/D0zb/+EP2NEljgq9bazwgzXfRyO+H1RWJJJgq7fePOPY7Hbxl3PvIuv13IpVbIpW7HpWxPYCq+0V1KvvksvhGXyNxfNaLW0Hf8GSmteIz/dU/MyC+lNA1tP/yrMz1X1Z3M6LZPlusrH3qg/bLzapn9tblVSQhfU0lhIsTmS2+yPpQetndS3zswzmzvJOYh1zv2GN9Rrg5ynoZcHhrydhXnEg7Xnp4PNxxwQx12dy1x/aMsOJgucw2DBL9+OfLTz0fpzvq+y+76nLMEUCgDYpda0VgvPpsGdZAJsdTB9GxtkeAersR2ZHavkNrnsL2soR4y3lAPOZWkxOdUvmaITxJTKeb3PuXDTGXgoKTONUgFk7LSnVWbhxk5MNKNywHvtw8lw6eb1qzaai3rcsd1a026GQD962DtUeCImLKOQNWSMIwVfvJf9TJ5cNiJ4ZkzWmjnxBulfJI/D4yHzBgExkNmYQSl5NL3Pm5ROg0hBpOtoQFxPHMwiRDhfk6+6vUBFd7hZGx2vr6GCrdNv/71TVT4rtfXUOGT1hIye4hjCVepzKokGFJUcgm55zmg7ug0ZQOvfe/8eO1q9xy8NttBvHb49MB8D1kd00O+Xh37U7a/eeIf87wD+Nju7Wd0AL/bgQA96CplmFXGCQxjc8CPOF7q4J33vPNiTmwx4Q6CBTXCHT8yMZ2QUfxTgpZW1Uj253UCVeHEqn7ieTVE6B7UTtwY0HtfFw1oFQZ0tTsL41yfWQGt7MA+EAZ2+PRFBA/iHIlUy+h6lkQ8DFTIN4V3FyxTQvWRyIG5WhzCTDVLY4YCIsqd8mLuEn8kKS3VWuvhCRtzpAMm1Ud45PxJyjAwK6rYxWVSVR/1vq4C/xGXHrg4xZcR3sn8qhONqqwaVTpw1BA5nVeSK9zE+yAdIa7sHNJYIagZEkOVV6SxABJ3+CRZYx6RxrbEUeby5klj775kFqSxBy7xpLHXYscSs9vvOA7v68rwvur53tdsnvd15ZPwvr7egSYKugL2/Tz0gABakRKD3ejq1ysor/29Xic7IwEYxHCJej7NZUeGiWf/yUTEE7/l2QWpZDdmED9IZIMGffHH2vxErj9IQ0tqv9kueNuB5q85IOU8HgulhebUBfXR6Gd7dfaqyr8kaQF6Vgg8SDqJ6/ReB0vadkMm+R8J86DbIkgUJ5iqRqtZodWsz2pWZzVrs5qVWc26rFpV1pyaLBf6PM1ZV563ulk1VU1aN742mrQcjjCVVThzia4K8XWPCjScMptbo/F7WrAPHamdGAc3ndiMnMiQJcpcNipjhigPqahJKQCJCxPTChPnSk2iwsWiQRjTqfPFlBVXjKvLWS2htFUSATkDQ774z77cLroZ7yUVf+8hPRLyHR9mPvJMYCxuJnU3k/JmsvhmdONmdONmdONmdONmdHwzOr4ZvPHz34yrUvhSmJK82I/gm0Em6thTBNGGHO9a4gcEBIr8OmuxW9cNyWGQszw6Z3l0a03xf3C23oqyf8esAEQdVNfsUXaR2uLIDrYiJd5aM6PPt/92dgxaax35tfAg4O8lbnb0NdI17oN0xAw5qY+8kM59j++mTj+qezr9Sb2lzykhbCik/GtbtOKripBtmPssB9W/Bg4dgeiqhJlonKiwwrccbVsqS3l9hfeCNNgBhbKjWOHlJ4dZ4fmqSaRBx+uFnSpnZJ4e2omXn6sdxp6CCM1ElB4eoHdrf7L3q26RsQuJOfRVf3i+AXPRZjTU3C97mYLB4VIIwPPLSoJ9MjHbT2tcnWzC2g282D/OhGgsoZ64b9OAN+Nz8ky3JqlWPTvn3ftvsxC/eOTfvBFw/09oBNzud/h1Aq3Butnsh4NRP+BztaPRDwdDP8w+EPXDgQfm64e7Hqj6AYdLPxwM/YBfST/cbT+tecfV7331nTf/9Ir/5wj9cfD49QdaNd+4uPurVX/gc7Wj0R/YL/1xVTwuZucdF1dH4+KqMC54fvbHbBgXOzEu9BH6wbXpePQDWtN79dx+2B2NC3yudjT6YXcYFzvicbFr3nFxeTQudoRxsTuMi11hXFyBcTGbHKEjdh+/AYHmwGR2TIAiYYFllpPdDu2mrxnNeqy77TYly83ZG7PVPrsxq4cdyW60o8xGR5bCWY3ySMls4MO/eSaYGW3IwmwX8Y0swYSHxUjcCHk8sDaXcNXKbKq4FU4KmwHAEKghT3Ofx0n861lzvbQETso5/3MwI0qfIXwc+UE7n79rHjjXPCnCebFc9XyhIClsE991dJitkAn0tzMZ3c6Bx3g77zj+t/OOo7udA/527nG3MxHdzr7HeDsbj/vdbDyqm9nnb+YNVUmlCN+1WHDoqw4p3nIaEETmtm8yfYsXWcouWDqPWDW+kcImfsVSJ1fnkJxTtozeuIkKltmZCaTnyBdPnc7C7HOX0WbbC+yUg81Ssx6L6y5ast8dkmbbzIPymYQtKGFdkuBz7upScgeZW2Z3+zNDx9xh+ltGkWCqj7kmStiUSgBcmBmT3g9UjCITXNjngAvr1nFhBBkmqO3V6MksgMRKB1n48n0u5TA+Mvs+ynRCRWRo/lpOyW8fvk+SDaKlmA0V/uRrJQIDdTlO46SD8Yg2V2hNJNgdzjhsgtr45S3zwMSCCIJDis13y3fss79rHeMtfwo/yhe65b+UU/Lbvfv+197yLXiHJWnVAVpYTG5J0Id4BFaz69VLWdYBW9pL7NpFUnORFEA0IzPEJ0LWev5jzoqOuUrNf8wjSTiI1M30R/ZtdYDg3l8pBoVOSQpySazjb6iiqUbmOcUn8rV9V2gMFU5HxpWNjKva+RXnG/pvnuF8Q7/9NMc17Lf7jpjEb4d6IDk5+nfQOOUvN065pHHKbuOULB96WEGpNxfUQfVEckoUkfZROB5bG7k+ayavSvhuBlK1kn9rQ1JJmZseuO27WoT47I2fAlCHGijzlgdmk4qt4BSkT6cW6UTZmeHN/AqTmLYHvolbEOLgDAxOfL0BhUqcwAhT72DmmhomoFvA4G6PwKuA2dV0MbWmAKub3Fz1QFU7rKqtWZdB89GOUoFrRBEDw5AflHvL+ZnvGI54UqVwUcHehlMYcd19CXfgYAAu5Se52nSECmwvCCil3fY6Y6JG6UrMyKWGK2TyugkotHGMqiT4BAy6qgEGnWyAQcsGGHSiAQYtGmBQz7fjAam9TxGSRea2Fp+8ILNYepUOs0BymJaOp28tqWRa65f3hYoyJjeEX2v9dHuuXHDOUqUc4mOuULh0Op2EA01scTWwprPleeCLqDonl8PykbnElevhkchLXRXu8Tb2uhh5GfMQ+tCxfWlYGrxWxNPIKYZIMRLqaHk6bcc0mWxAW8JnipgGzX+gK3JXk4hwRtkqDmVDDQMY6rMevZ4GDFRq9r9H8FepZJ5Ts/dayTwzzrDvWoe/El2BJCqU9oQtTLd/XAXz5BiC4rzIxuUyQH382y1VXptJwuD12Hdq1PGNfX/craxlYObBrKLnbb6mT7HcrgvIjKL52jU/Dc1Ppflp3PzUNR+Ls+I7jeank0EmNzQ/jZqfRs3XUfPTuPkfe3KbL42/4fg1/skcOjJwbjhOA2cPfYyqcHlcSO4FFJVJXFIJKZ5mDacZ88yZWAmxbCk3H20Ct5EaZCbtneZB/mlAP2Rzs+gxImKxzG7Dw0zp1ZG1ib33YTd4osA++tDaL3ZZk/j+qcPMS74H0q7SFWbbNcctBE/Ckmd74eSwwt2GvjdjIBokQZTmCsQYAfr45OVe8OZEFsdVUtBUYmEFOKSghSUbZW2VhDk6vMw3eUiaT7iG23kcS9n9aqG0UsB5COtYHejRhHk0QR5NiMccgEe5YHaohtE4tuxQgGhcV9lLFeysuCZ1KZWgrzoOfVXl9FXH5+qrRuUlJ4veal1f9eRaTUtNb3VZQ291PNZb9Vp9vfc5h+Jo9KJER0my+PMoRGnIPmVCN6d+i/YUvJZL/mh756WQNxHl1KSh2qSp2jRXrim6TBBpco3FjOJL9ZUv1VeuVJ+ZgpRAZF+MHIotmUGnY6bAS0UaHX7QMjcD7AM2PtPabNqb6hmBV14HBZl6uX1cY2++95pZ4LvvvczF/N6ltNqWbpXmrsmQaEGwsUxe+ao1asdQ71hjp7vLhtnF2LJ99juBWA3FlS+6aXGPHWF7YaZMeZA+v4QWjR7QsQKCoNS/k9HaeyGNejuKZkotJ/wde1yGE7LvMjBLXGf9y182N17nAOg3q6Bg56wurhxuOma3Knppbgk0D+pR8QOYkir0gINKyLSYDaUwe8jkjZKSaU76CquBSw/ynBDMZXenrpo287ZU6oKKVc9SWAgv1V11fx+znHLMbieKacjNPJTN7YZH3S7nlM2pyi3ncR+4fW7QwMnYEoAqbs1ix9KmSM+W0OZ6P36ZFrcqRgAiL95+XuFc+GEiFGqFkCDf5Lo9rgNN63WgYs3ZReYwdaB+SvXYMz+lpq6JC9WBcj3LJn0ZfKgDjUs1XUUPsZPvh4thEr/MTQVCEu9o+LS/AvSfjJeiU+X8DrMNAMoeemuq8jRy095CjWR4xMe+SIv35T2tmi9xf2U+JYRtzMN2RjIIF2iTYN220+gO+qCdtVHwyRzYyTnfx+8Gmp9ccu1rLrXAJCIdfjUZSkG9GAPKQF1oRMwkdvWK0GZf7pGIu5GYXTeLu8E15/6bnbvx55hMmDM4GGrHHA3OpNcJb9DgEGlPYNdJLgTmeHSKu7FxgMQ3Ep0XehtgGyOwWLa6AmaVgqm1Ozy9zb1vbtDbCE/lz1w7D83fzqvc+nwwgPGSYOgDmnSgLuNDHtAYo5A6oZ+JaodIARXVDhEL6lQ7oCYUNhToSUhEAYKS80vP9HnrQj0YESDVWap1g6Xa92in0aOTtR49UO/R2NzKVleGDHv0YOjOnfN35892o/c2qamk0W9TKlI4kk92RYGrxayai+Fm3hEaatBG9O2iYA2HQUpeS+gHQR5B1HuUbUqPiGHh5MNCpyTioPwMhsies/iwlUQ1lMGJ6V2tBHt2RZD/K30VZZnInQ0pI+XLI0VJI4+09Hx5pJfQE8OdQlLFRxUfRVT/WMT1j52o/hEZm5e5ikdSC5V6ntateEJaNynSpsfYuj+vPVb3cGFe2kebyaNVJCPHQiVMrtkwBeFen3pQ/jH1Bpl/xDm9fD5JUDOTsdlRYmo6LX0dFigtbKc6PFecJXNWTvyM/0iRHSWYsoRvyqrgynfAakxlmQsGjBdfKBzyL8U/qwDgswuLROJLBOUZjk9dsB47ld/JYFjmqKNi0+r1qhKzIKaorumSNmVkMoKHsrqoSyaiLtlcUReGExbGAwV5lwAJet1Rtuf0J6c5b6t7cS65Qsg16KrAwFQMyqhaBfPEWcNERKR9gQq99Ul72F9K5Qok3JF12n+9K2kpvch0Vc0Saljw85PFa5kU4i/x23Y0e4ptk8BvU1Uk7qYjqnzQCJunk3TVSbrWSa8+ipac/mQ05GY1v3id0FMIf0TKc+2HdtqJKDZykm33Ykc2r2Tb3s81JdtmcfC4L1WyO96NHWPFZ+TXjlfDvA97UznJLpyERV3Fl9LAcHG5873jDB0etV1bMnGeApDdB+s3ZOLRYm6lB23suCfI7yVb7B/ohFWkowzR2UseUosrcnZTRTSCJc2413ULdt+kjrsPd/zTzy7YX9v/sq6Ip8whHNxCf7nav29jx/wCeQc+G/2aHfAgDm7HinhvmmO7YUoNhlWdPTJtsEemDfbItGGOpg32yNRFgA3p5FJ04lnzmW0zc1kABrRqiruzI7A+yeSe9ZC3ZdQk3UxWJ5+eZs8U97pKdyyBF42GSoInxX3es+xdWjk+kqJjfCQvnjn0rp7zstdZH+jZQ10sH2bFikFSNlTgbJOfUTYQ4V4kLUSqpUM67AdHql8csKPjvQsMovmH0bfvWXAYHbiHA0FG0Ffu8W8cN+/C5gnRgLoeO7rznuc2OU+PIyoModcrTECR15n7nJYnic1HZg7JpPdETY+mv6OjlOzwFjl4WSSUHZHSVjk0oQfjqh3FnN8Em4XKMW4wCMk447LKBTpUFeVgvI4MPIlj4FGegUdCD4GDR9U5eE4UWT9PwlP7tod0bici4rkCz9JoTxyO9ChyECYVESZE5ZhgY1UwNnK3MdPBVitk6ODx9yQHM8fVH9cLufa9ub79K5XeiiQlGI8ftZMa0gplKmxw9qXBZHvRiJfFK1SC+AwrEaIXa8t07aa+Bp5JjVgWyIWE5YDnu9PZs1wkMYuLRLY5fzHeMmsK9l6jSAoxL83BbHLecSQ4SMA1YEiJ5AgHJiXXwoVlh8aqIcWsuS9mPahdQDrDn4e1CCcc0FLnak+5Hulfc0CPit+Xv9D3xJdmPwFWdpe4UYyBcONDecS0hFdcfveQALIye3Un6VXF5Lj4O6LnzHtUpctYAbdAaQVacwx7MDrokRCZMHHC5u8hblnSY0vFaE7N7l17JJziUzGvEUkRd5TL3V4731HrmV8gRAHvlAtHylJOtmkt4Svesk/riuKEG5d8kWHnyOtQJlIwbJ2KXPqm4oR6Qomo7EAE8mSLi9j79x6Q/nW0bSnywkgcFk8NWu3+emTLN2ySY5UZE+bfrXKk9kwo9rh+Uj9DFJilEvh2FSrpWytlqQLmACnInEyxSzrAqoGcwKUQOesJfx7iO61JvaxU0JhucZEt/jTFvgkM9RZ1Heo9bg9zSqMHrrXT1apiV46Z0kca9odIwxEjCS70IJEEYXze14wk7I8jCftrkYT9IZLwkzkk11z8t5Ok2NWlaAnsVMmzs+K85RMICqG3gvBCw/md93+lQMrsenxC0lRuLor/v7svgY+qOhc/d5klMwkZkH29iQhhyb4HUSYQIAJJIAFcwDCZuQmTZSbMwtKihEVLK61o7ZNqbdFaxd22tlKlGlrbYmsr+LTSaltsbfW951P6utE+n/y/73znzNwZEgVZ2t8//A5zv3vPfr7znW875wx1e1Xodw1tWxBsEOx46jyETAgeCEMhDINwEYSREEZBGA1hLIQJnIh71nsnreNHu7k3cwqWcKDiJ6dVJR2qZL9IWPaLhGW/SFj2i4Rlv0hY9guH3RsVcSYHytQpZ5Ewr5LQNiesbjkqqXNIJ7+IR3MPHo0lD9lASdVNciCfMV2K7XpO8OlqQdQ+yEfb9bl48ahSa+zMdVyP10YYeBNirvP6zbnw8sbNtEmdX6/T8gieN40Ln97CLxnEVDs2b8Zirq9lm2Excbq/pAhlClb3EOuUupaqTu++LyYsoLwJe61wXqd3jxU2Or27rTAeCWSFPSB7WWG8bGyPBT5uBQ4rxA59WO3e3pNau2N7Umt3dE9q7Q7vSa3doT2ptevfk1q7/Vb48QFrt1UKFIrFs7ZPod/NxIdvlFagE6zT83mFHnAZ5fpmrvMaC68sy+gJNtAySun+THupVTzHjC+jGyw6K+TtkKehu3NI28RJc64mrlp1LRC2uetB0sN3SL5VFBz5soZKE93NLzDWves7h+hMUfCKAiVHTXqo0aLWy/lOdH7plHQjIaYwspcqtEND8XLWTPxyfagiPDftMQM3XwBjlTSVAietrc8+1Sral1Sp2CZzaQOZdRt3Yk71sYZFaWYn7au1AQ31/o5PPRtqT8bDmxNPk+HE5v0VPzXcBk94angef/J0IhW2cddq1MbYuEKRm1I28M0eCVl4Jtnek44OitiqK7YhOlPIr2olv6OFBcBCvlUr+c5L3IuJXX2vwgYiw0I34ZREmCsovvu6EJn5AV0PIzRUQl9CyCOhXSnQp17nkrWAtqbk8vfX+ummeQ69gdBoCR1CaAwK2ZvRS5LfJkS21MHFkNx0K6pwbj7V2mo1i54icegWiSOkCFE5IXOwwWz32cJ0n+0W8hLHRbTcn2q2l7j4+Qc5Lh57QOBilCWmpliuE2eJFqWxcHlpLJyRxsKNTmPhPGksXGKR5mVqg5SZSHNuy+xNHv2DOyw1dKZZllRGkzlG9INqoaVWc1YS21M29Vo27eZ10j07MK49LDm3UpyIEodaGefQg2gz39ZigJiPZgen52/Qo9BUz3M2EDTe//VBrgQjP1bvDtznIYfcq0RQPe/kaWDxHk4PmtdDD5zPg2xQrkJK0NWJV5R69+K2EZRicVZHyBRCznpeuswGU31f5RvXxotbcHEOkKJYGEHf30/kS5UHHPV9h7TBOml+X1aEtx/PiysA6cw+zb2WzxLPr1Tep/QLfKjnNXzYo6DEt5dc9RUyLexRcsWWgE46LpyiVokkxykt8rf7UPnKT/z27NLcqxJelOSoMD55qMZo4qqFOGzxRPDQlRYJTwTGn5zUgdgs0Q5YCNA/Z3PiRuQcPfEob1C+nNuFJsVz8SYWPF9LWTeOi+dqI/d6QdFDvydXT8aHT+vG3cPjaItwgNfncEVZMob2VW6kYgvHubuJ2uhcY5DPMnM173CSo4QKJ+FIqFgxURMez4UsaxYbaqgSGxPYfBHC2VK8EBqeCC17RRYOQyfOghFeiAMkYMm7Q5x8JcwEu/vTT76SRgJ80vmSp+LMMogX2dsvfAY+fpEvPHtmRb7+7FkX+f4zZ1bkw7LIcKJIsTEhRSMgi9SSRWpUpOY99JR07KYi6SYIugFZw/JIuYlFkhMoL2/lR0+KjzUfUvNliXxZIl8lLd8BPH4GyPdj9I9G/XO8/+P0TzDtvL2fPUAicwILTrMlaN7xvv5UP+PDL5+Q134Elu+vqKeWdOKmgx+vJOyr/j/KksQTKsd2HaSS2hMlDdSHo5NsoTQgqMliNOIueYM07+Gv4sGwWIx4gmL6vyqK6eYOg1yZxnW87Lu5Wm3Zzly1lkuPtd9wrshiltvta7fA/MnavNPQa086Wsah0Wd7UxY3iwuC17tgbzU/JGrLDfDtWTQezNCceN7tKb237+GP2Xv4bfeDB0XviSdo1hPfHrj3vPsfOcjSO1BJ60DF2oGKpQP3Pig7UDxxxMNirk5tkHB3189g7vAGnLhPDL9lDvkFGU/lZ84tF9MziP3Ie/vvOBcvrItFwrp4F77VycZx7++kdVFuaHzC8nX/7yy2R2kAOUedJVwLUzoryBLnp3p3vyb23nJCScoTheiv4n3uUXmyMNEXhSzmCu9FMoIr8khHRKh3HpW3nYoTTDuSl0jI+2FUoeUl2qnyi3zRH4P0uir30BFyq8KvFCTFHm3Pk6ocQy78Qil8jjrr3mdO7ayV6VmfI4yd86FK722DKr0TioHVqClTk9epWtRc5J0vr14kd3FX6keFfyzqdCfEq5TtGuek2QN1Z7miXM8VKP2My6V06bqBm9Mf2cn9rmq5ZYWR1MO4L6F7haKekqqWUapc/UbsRXRexTx20Fa6G3MSrszw9sYcbaBs2+SGw8Tmlo/YZJhkOT9qq6GI6V6DOz5stOmPdqDqBj/tE+1xZALWaf+pRtZafn+SKvef4okPCu2x92bgrj9bNu3HSuz7XMXOI8lrTz2AGD69cKSfzuVNkrIjR5Kk7OiRJKHjlAEjvI0RnBTh+JEBaF0DzYXElgFNbhnQLFsGeD/crgxyr57VZ+r0s3vvdLK7lg04zQba2DTA1srt9sTWSm3ArZWtqfZ4IbGJza+Kdz/vXYsvy730YiBT+r4jSd+MhCX92gHzR83Q8PmnUYIl+wMDZb8qTaAQSDE5cTwwrCXoEP8yv+8PD0S+U5HnAid9qjK5+EBe9dynitaP5WkHYPM9Os/RGd78xLMPmatS+c99BYXWn6q8gJGpm/atcroic0mxF9BoDj63Bxg52iHgfR03cngsXXoAXzhTps1z9ycPLXjh/oMDeB81CTzGK83FNWOJC3LzVHm6oQeRlyvittBObq5tUzgec0sh90Lg9xitEHYWxi3wwjNepdUYtSpOeXEU7TROnn0ImX/pHqthDb3keXRcnRYnTjzQ5blmirhNnlMxkNs5XTW0Ljx9gRynxN4gVGfAMNBmZ1a3DhotcVQjuzTnIOnQMdZlqPXkxAo9dZvGjdE5tG0T6pgglfwMT7wTAMbQvQR7kci84DtoQUwOZiZXKTtTvK6wmpa7A8UKqZ9B9b5wetWr59fO0Spkk1sScjW6p5rvKMXbx3n38Yvec7ixQVtAlgKdX6HKfVbci6S2JE80hGqliVpxQSfRaRqNgKFZa4X+FlSrxjTZY7j1tG+k9btf6RdSyO2K9b5RziPgPMdc30wcbm4k8qND+8lsncdoC+Dk0ynwzoOiwG+cToFzkyZ4jXT4aNzjtvj5ZFckRy0F/Ui46UYV5+Xhje/8vAX31dyQjXG9gD8o6m1ZPq6GubjFsGzn/d6T2XgS3083dM5SnAkzIm5i2V7bR3/OHbhN/cbaD+hD9nZDHYf610WM+zwj+XqOLUDej9QIipE4XMQzVCV/IG5lcpMafTTfEJx6AEkdM9JZwVMXJ28q1ntdHL2FRhkRe/Fg0s2hd/rRvc9Kul58J7niv/zOAAv6St5z6hzvPtqWk8U8z6ow9/fRJSw5ivfh14Sal78Tcsf9HP/xpNlcRld4onsbj4v7du2cabb4FQKapF5d9DYTVxc5O4Vfoeeb/IAJ7gJoqB8ng5cUawbzBuumHa9yIfCURXPXq8lFU3bPQk7YcdZ7vqLTHdN0h5vcYysoMOfEoVYH7jiYQnsT21kXpgnuwxOHJJD22kOHJOikERlPAj3XDvFJQyQBBbb6j5p+u56S0+9XA08/dKTEnJay5M2Tx29P7ASmU11vT7UM96VZjnda4beZMP5ac9y9JzXHPWm25r1pOe4bMMfpiUEUl6XgeCkGk5f4eJ5RDToPzn0pt7Zx6i7ZQ26nwMET+n9Y5BTLF3rP19vZp7DPP9/Xn3SstWDJ6/tOxZIqvtLPQgIvVBvyBm07Z9qFdyNKCHQHtyaaN18s8zrtBGTWlR1QzWm5EpKWeOH8clvKTZDuOoGlCVcUZ9eQTMZU+lMUPOWG+y2L+8ihAuuxjusjXmOd17aeHEtmf/g2ro9w2q3mEhrkOYfOQxYb7xinnJvXIeWen6uME/wa9lzMQJC5axIYTYd6o7OA5vmiwrfU8GVdlz7ETikW6rR2VFPSYwki4bFsnjlGm2eEKOU5zMnLMUEdqqHnvXvEsWLIwHueUyTMzyblHrboZIn+A1Kkh8zcXYmdvgrRlUyiC+JOqjcfE1uCia3SLJ/+nPikkJJEIWFdDKuSR/9xC5fT0w8LRn6Cr1xDfCXzvsnEkRIGw7O776fzVjkSz0zEZjK2PmjkSvx86zYdsTbNhu8dTviqWc6YkaZ8SZdpS6hh3X75xP607Zdv7rdsv3xnv9A4XZ5GwBQ8ES55sAZJHq9zCx43ZuyXxgyY7Q/igZAWInM0jWwdSyNbbwOcELCPSaJSzFEVSbnBaQHf7r1oXC5nHXu7gGo//qt+3N6991fCul2V7FlxlK7oY84M4OFPOE0h4Tt/6cfDKvv+KhIW8glk0DE7SH4MPKhdEacBCiWRgj2trsfencH4HN7MFQ2IOjrXYDDvdfWQAfnD4Cfk6svZx1CAuEsSa6HiuZm2d3t22+gQBcVzp40SeB7TxMOj2kck2SOTfEMm+brGsWuQJNP4dm/F85Qqop+UDx+o0H6aWoRbXMXx+IN4hh5yNfgCWRdGVHeAuK8/khJ3byLuVCZsyZ9XhYDm+ZHNc5uNRDWDn2KBNLCM44Dk3k65BFYSAUOrw1tgeZfq7rmIkSkXPiQQVOIcoaO4LoK0OdYbI2Cms6S4j/nyc8vW8Z2Yd/dzT4u7BUp5vqq5CxPLVXLTBpe2DTo1gJ+Y7nlRFScAwJyxbBwQXjKqonL1762/67f4uewiDbmAdv5OKBw4kU56zNNBAWnbwaFbPa/rvEdhTnMPEj7dZqStrYx3KZOXOnKjvFxJ0xpGHk2awRKHRr1zaz8tHwp3SJ7OpzIKC6o3jzalTeWXhFsU0KRKkoQrcXeEhlnrRIh1miI6WVH0PPpP5yfL43+ZnusYUUythhkwvFxkID9lTDqaUMGTXPeALO6+nwte7qLBMIrWSTxLkcuFieW8XCg7R3t/NICnz2CpCji9n6Ug5f3HT4UKQJKCIQk0FFKzhbMiFOpndGWZxocE2JuXEtgzk/NQlnlMh4R4XtITEz5BAgaNnCAT1shTpRYEcN1QIl41IsasM1e+xzfuPOa5yOLSnFQHyCdnp2TB5QVUWMIDSmJLlpyrNbjuHxK3UCr8iSbbC4ljCV6QhxGkGjE4bpI2HrBfhxGyJTSAo71HxYGTyaMq3LlySj+Cy0z04VplMz5ckcvG8do9pfKRtqK7SprlFJtoHv2n84nt+T5QgEm0SOgW1RIT6wJf2nMSq5Uu+QCnjEuL/5SPmGYw/F/S+QozGGE7yiy7c1JJ2WQ+KVK4YbtkKCQ3PFCk4YNEorOgJOOYOCIqn3k4+8h7Q/FuJpWvgtIubi5m/IhXAynrqcfW1mVbTqzlL4UqyX0xo22muvf6dQn6kcBKQoRLxNpscaUnysvd9/mZtB48XXbwWDyO/TTijD+NOK7TiDOBuSdSZ2qDTLERCXZRKOM5ooy1zifo2CifUCoelZUzaJm8RIW5JzB5NCSXjVP1kjBuA6dXSKHiHsMSU5e2ZDnWc0quu8eItciTq4hpSGpWt3s0legVV9LdoEmuZxj8escgT7S+C/6fNH+ceyQbcHDHE7X27gQO1DskzclyDJPKn7SDZxPJDh3hx9+mJrtIztHkTkAqXhX8PuE0HrGJUQs5DR/CnZE9sYh7FEtMEjzLCadMJk4P+T7N2uoezohE0ThyD0m328Obi0dS4iTqWueWW1qhn+5SRG9w3aouiCgmG5GUvw2G5/fASGS7MxnfskIoks1ZTbyEEB66IpiTkjSNcBTz3KLwhiWGk+aze6iQ1IWN5waNV53Pbp5OYEL6y0x8mcEEPyefntZ5G4XIwjtKFiCZ9KdsFCVpSNWpXnlEXd7m2huWnuxW7B6+LJAe7JC8utga0Un5D5F19XxD9dLIp0vrtNVQ96rrABsxC8VI6Sn6Dp2+zquvT0BcUBeDhlu58apld2LO1rld1P8GW8dfYwHaujocqsSsd2dZ2tUpqzpWm5PJgFQiWK5K3lwkhFH5uc6SrQL4mwoHi1kiKpZ3McrVFzOohkiWl3y8JPlYyvOlDnpcswDfsgLfsQLvW4FvWoFtuqglbhmDaZb88ppiAV6ypvmL9ctnrF/2W78cVS3ATRr0nPcdtAKN43RqCPN+ah9ALzIOCgTM5eLbFsljk32p/xmkBzCstAP7AIJ8lHmfIPnduC7xqMjHzJTH9UiGcRRflvoK708AZ8YNZUx2uOcNLfF4LPn4G+RDOM8NwC3WBn7f2sB+GkM+Ql/Sks+36MnnJyxxnlTcDsZFTd524MUPaPTEp4+DSI347aK4ToK9G/kvMIgqdGrtTW++9YX/2X/zq/u3uHXID/8z8D8P/jce/xvutjFgTjHyd/77oRv2/df3/vgsj8xfvbT1S78++IP339u3BaF3333rtRceu+XtPzC3BrPf/cRRZQS6F0PyGzS/r7vbDBhrlpnReHespiYe2hDx9eZNW2OEQ4YvZKypi0TWGOt93XGTKdCzTgg6BBVC4dpwj1nYa8bMSLdpFhb4fZGOcGHE7AhGY5FNhdGIv7AjGFsbbyvwh3vyi02/v6KkujrQVm36q0pKC6M9UPZ6059fXFBdUMSjdwfbCiLRS2EpuJLhTGKsAH79vl6fPxjbZITXm5H27vAGeCfjFEGcCvj1RaNmJBaESrf7gtCiGiMYCpgbjUtnG91mKBn/GRtjGQPGD5kbWqEk4zKeQsbfojGWhW2NxKMxf2G7Wd5WXBqoqCpuLyk3zYqyyrI2s6Q6UFlW5a8o9wX8geri9opqE1sS8UEn+MMRkzct2h30m4VB6CtoIWN5ioc1QL63QX1gNHZvh9H4g+KLxcye3pgRCxuB4PpgwDTaNhmfMCPhs+zqULwnvy3YEQzF8gPBjvyigqqCYp4IXsbhLVbpAahRG9SoEbpnytmPbiTqg3IqRDm+7o5wBGL3RLEob98N0NzvThy0uVD8eNXDrsbBhzDZAm9lVD2JuI29OIrpiGusaQiHTIG4F6DzGHtLPY/dF/aZvVDMKs3DWjBvCOMgSLgIwkQLXAXBlgZfZIGr077XDABPPNdt6O3yR4vXF5dDO/AkCJxcE0S5EsYyL7HAk9K+GwPAYwaczD3BAE79qNndXgCzOW/ahUMXxN/gJ0ygauUFlRaqdmoloxANaxnEh5qaJd4rDV/UiCPE2Eibh62Etj2mEMHSBOGVAfvBDsEhiHKv+MW4LlwCIWQyIl5DIGRD8Ig4R8UvLpXDBG4MZ0iIoFwIoyCMFnHWil/s57EC78aLsZsoxsgYoA45EHIhXCzm7yVi3k4doA55EKZBmA5hBoSZEIBX4MQf46wRv4UC14HLYiUQSiGUQShntAhY61sp8L5a4PMshosA1Xc2oz/l4rqOTz/00/c+eP2pPetbSjzH33jp+/i+4w8ZnTc82vF05E+hS2v+0vi1LcuGLN211nbnQ7/YPmnMT49dc/TLtoOOVzZXjPpVb1H1VUP+VuzuPzl0xJVr77/574F7G//xjPP5A3/CPGbd/+MdmM+ME7d9gHn9sWJCK+Z3ZNsfHsE8J3VfNgPz7fqu938x7005118k819919M/wTKmT7ujDcu5WrnqFizr6DuFI7C8jimlHVjmp6544nNYblZB5mtY9oSF31pwIQjeUQfRu2qV+lnCs1TClfNVh+RKUugLBIj2rnJ6WFDg8VhLXSQt9jY3FBQb8+qWGYGwP95jhmIG8B7t4UiPGTjLegbMCFSuXFROZg/V0jOIRk0XOHsZSzJPl0OYc87pFpVRJsrw4nyMBHtMIjM9wL4YbabhiwF344PnEujeGMQ5BvXMOY/jBS8jvhANVKaLxqVCIbok4Xlp8FUKtaV2ELo2dwC6VjvI3J83wNy3xrXStboB6FotG5hezmen0sv0+koauGAAGlg7CF1bOABdS6+DpJf17FR6+f8zXbtCjCfi9yIIV4hxRXixgKsEvIQlecTTEW4aWHJtbYTQYAK2mxEDZgnNoFA4YnSZm4x2mKmwZBu9kTCyrAFEcljdW2GyrffFTET0uiwPx5OxAj/mB31YD2BzO8yQGYFYmFMy3hgxxvM5FcB4EdMXMESOvNRes4eXnEgzSuBiMk0M5lkUiRrPHN9AokR8Q8wXCV8iYDPkj2zqjSWzCZj8hQGtN/zBXuiDmLkxliPTlYp00WBHKJkIIeDhO8xozFIGzj9cp6EeQCcHqqm1ifChbVPMjCbTzxN9KOEFYu41hrqpR4CwQH0jRjTe2xuGegaScetF/zSl4URTGg6dCY4sTcOR9PGKt4GQx9vCG5KTQA3+gdaqNdkePoeHi34cZPzE8OUk4o8abLzECz5ePWY06uswcyzlyHHGEfqQcUhWnaNAJEemv1SMgYQvP40xkHG9YgyWSboEoRkCyhjLxXvZnysgIL/7cQXtaCxAcvamEMhLIT9OxNs8Hk4XhiuEh2eymC5jyfWaKyP+CTzEwqGpPMRVzLq+ew99FaTo/3RfCG7v0FBambOdtAKdZZn+cCga7jZbzUgkHGnt9YWC/ta14XAXlF6cIjRdOszDV+ovpGL/knnlzQu9JSVl+H95BfxfWoXP5cUly+qb6pbMK64oaoH5sNYXXWu0x0N+zmQB0Q6FY0lELcBy4rFgN1dKMPUiD5eYxgmslfAlkpI0NyfeFYp3WEgv8KHBUIcR9a81e8xTS5FpikUbrrZg/TUQVkFYDeFaRhIbvm9lxB34MBjzgtHebt8mI9jT220ibvh4eyJmLB4JAUIDmeI9acRD5sZe0w+ldm/6uBMJ5kjYT1MpFoF28b75DbQBqWV7BrWhzTKjUUPjcjXHfP6uGperDivCApY2mmePL6eBowrrHk44utRJFErCUgo4t9z2mawb0G9pq86yUEdNDazn3aIuZ6tpASLMe6WcR43wUds1grQ5rwnqcSE4/OMjqM9xxc0asM9z2sJxiByMtqKiJG9aMg2uABlnX89ovC3WbeaXFJSJ+hElYWzPSA8vI6Cek3JStVtAmMIBMVtGEdVeJGiHhBenwciNVFjgBgnD3+HhHv6L+JIx/caFN/4tS1EU5j38GJD8z2Se06rDoo+1PgzVwMW5UaFFXsJXKiQQSfiqNPhqhZgZCa9SiIRKuFUhYcoKF1vgtrT43Wn536KQ0IdENUEAgcuQ3+edj+EUCtc3R9MUWiWYAQmjEnqiBd6RBn+aEdN0vhSoG8cQytSIekkYlxObBV6VBq9Og68dAM6xwBvEMifhjYzGQsKb0uBPpMGfTIMfEv0k4YfZeVA0A4UyIyGfWNXZ3rEezjghzo20wCVpcJkg0RJG4bvOAiMzO8oCY9yLLHBdGrxQTGcJXyHa2p4uaVniXCviSPg7YnysMCodkDjgnENFrMGIvM9Je54s4vz3xR72awg/gbAfwtcg3AphC4RuCFeJsOhiEpyyRTsGC/g35OzH7LTYzpbx55TtPCeq+UPjUxXzHSzJ6qw953M+yrG4ewLRuoMCp6xLwomnYUn4+/Az4UeC7MIYcssmfrQhV8YZ3JCbapiV8c+XYfb4RKthFurzTzTJBiedTw72fCAqyKqGWOYFeZXwGrGUSBjjOizwJwSpk/AnB4CnWOBPpX3/msBpCT+UVv7DaeV/PS3+q4xIzGJfm9ndEg4vDoc66sVK0gQrL3K0nZap3gUB3xenve/G91ybUrexFzo7FMPMoGvNU94247ypD8FgBANzw2Z7e9AfhC/ijYwowCXhQLw7HhVQE2r2IYv55gb+GG3guv5oMtfeeKwhHFsIArAZWEJqIdGqFWYkCEVxGXIeLUHwJDMmYbaZy7IXgsQvzk2V2s56Pod7o4VS5IcS+iF/1Pn9m8CXM5ggRUaR027Pe9GusWJ9eNHSoix7xpobFyqmpqsuG9PnTCy2vnLCK6NogFcpCTVMWOS1vlLhVVFqQoUnzLe+0uHV+KKcogy7bcYQTR0L4HCoYabdSYuBaoM3nvPotcHYyYvJB+MORkufhHHuIWvUw0gjgCEEAf040B6yDkJEfJcaDswPWZ84hPWMWM2Nlu+bBE3Aeb8ZwnUQAHOjMGh8Ol5vmXNbIMxFPA57oyGYkNZvff8ibMPwS1LZBqIGi0xs51ZLfbfhN1/E14O1jS6RKkaImHjmjbSm2f4v0sYT6W1cVr/C21JnLKq7qml57eL6ufjUGAwsD3WFwhtC4WCARCfZjhsgpDfU+v1G5CUkTlo6KRiNAs2SpV2z2sibxv4xxUN+E1M93HfCDr+Il0gng7EgsCvhEPRMHJVlxlSKOw1+uX2xsaGl7sqW/Oamurn186HaIFfNm0rscXp+3qYmaJi3pb6xAaOxXnifNUC82iVNzVyftgI6rq3bJGABtwd1Q98FWoB+L2+Ziz/13nL6DLQ9FPMlYjfEe4B2+wlormtprlu6vK5hbt3ylvlV9LKuYfmSumXQC/Maa6+om9ti1M+ra2iBNtQta1i+eHHj3Ja6FqO5ZVl9w4LaevlUD61dULestrFxcZ23ocXXkVe0scbAtuV5uI/JAvhVLW3BP0Osnyrzvn8YONDnh2EMTcx+Q8RS037xezMg6k2WUd0FAamu9d1nIXBNYlcwhLrEz1m+3Yy9HI4GESut73cjhUC6HfN1fC4tr+Wx9irru1sgtEQAo6HP5vliPhDFwgEzkFIO1iti9viCIYgEvSKwFk07KfFuxbzws9S9yt+0en8egs8fi/u6ITYMZZsZEYsuwLC8m6KAJjPSgxiNq3MoaAaazJ6UfG6D0Lgep3moI7a2UbDSzWasMRIwEQnSZpg1LerR4XNihkG/+32hcAjYge7FPL/6sDU+rpr1IaAYvd0w1WTDWqFoagk+zQe6AKzGfNTrkW0JetREPIYxmU56rHNqIfEBWeBSfocZKUx64O2BslBfjgqM/HNdJtfvkYiQOYOo3E8ZKXkkfIyR0E39CPWx9OMXz74+vWZPfqTdX1lWUQX1KpXWIlPWKx//autgNhv8sa5hnsG+BHVDTvyo6BMJv8WE9HR2dWrzRYE188f4snGqIhSkupkernRCb4ns89UHybEZqA+yXK4stncmtXsnIyngNCQpS17npdYdsHz1+EjoZCvyqX57GXnMNYWjsTqYmr0gzHNGvRZnF/C5TRFzsPe+HlgoCPm4ELPQBLIWmReMokVngxlIpoPFxtwYm7sWVlCYzpE6MWS1fDTPK0rMLSB8qBQcwvmSrvning/kDzq8UpKNiJ/zsc8XENeKngyoj5dwgYDPQ9HSBMHmFZIiD9eCDAuM447eTY1tnUBh6wMg94GMZkbQPtJfSNb0I4W0+mIaJur7jnh3HiU1oq9A+oFdDcYMbqxlJwqJ1j7rJCVkdF3cFzGNSBiV9FEj2OODdICWG4s83DNKxrdnULtDZocPmTDDFFJu0DegiRZp+T7IY5olj8JMyiMVYXLYOxAv2xKvNPOcGAZOS4odXpwqxTaBqN4Qbg52hJYEQ/FobRB1CeiCgTTYsi7che0A/sP67svMe/h3wFF9yzXo7DgN8sVX3XOjG+sJCz9LT4mHW62KNerZfzUf/DtLaBSeYcSBSl5Vvpe+qhKuUcm3QsLSd1XCf1DJ107Cb6nkbyfh/1DJdCXh8fbU+EvtpCqX8EYH1UvCmx20Gkl4u4N0UBKWau9E/Z3U74n8BbZJWOoJ02eGs4xmhozXkZGaz9cyzgk3cEY+u3PKUn12L0DZgMetwRDwy1GT6nAA6rBOcATngDs5nTpE13aL9pdT+7HtIy5U2YLbOCDKlj6KEkZcQ/9XIFfLISckTOwrFsq0919jzluaBJgOTbq5guqPq4WdeXe/C9TzKyMGpZ5pa5lMPUWsyRJGg98kC9wsekfCqNkabYFRUzXdAm8V2C3hbWkweu1mWmA03JVeYCw8VPnPw8J5ValYeLcF0+5Jg796geoWRz5tri9ETEhbDBlko81oj4R7ALnbTL8vHgU8Qj6lG3X6ESO21gd4j7xYfbWHG5GPiXbhSoEa51MXa1/r2iB6wCB6buJLtUyzUKSR8KI0GHFwiAVuEfC9aX0XMKMxYMB4qeigGQ3HI37T4Ot51FjrA84rEGxvNyPox0iKhGhmDdX/TCyJ0upyvi2JO2o+2pIo45zullAZ/3S3hMr458vy2DvrNC2PjP4G/f4vQKKtbFnZpWkWnvM/jzv8gsvYdynNk78K+i7hE2nwB2kwso5W2J4GO9PgTIVWHwlnpcElaXBpGrxMOD1JuDkNjiq09kj4erFjRsL3pcEPpMGPCHlbwo8qtNpL+HHhZCXh74nvjSE/96KlpbLrrB0Vo73BENeqlZCtjvy0GTMv83CP8D6xxkofHvJrrTHQ5SsCOB0PRUyffy2qxA1U+sh0uPZOGnAO/xMt5KcxO5ZdfsHnRoIDf+7yVA48SMpoA4rkDujRmcam5L6xkBEOBAyhdZ3ZFo8ZHbBGzplDa8YFqHenzx9uC0LVN0OZaGVHfQnitIRxvZ18gXkYpzeVcz6THQbeJ7cfZO5+5wURjZ/0piKahM/RdvVBK8HdEtCRv9bDXUDQaw6ZXAl/l9EWufQJ7ycerB2WbCNvXmFomjHbyC822sMRgx2AtDMseYwRxE7C4xXy3pPwXIXE7guJGMbcVMQ4HY3NhUCE/rkXnOD0+MTWp7J51CdyCzmUFUlycEYgjsYroDjdsSAKaJx7zbGku1gQKgkjLo22wOgSNNICowEm2wJ/MQ3+d0YbOST8ahp8VMAXUiC7si5VIDsdvPH27QJCctd52wjUEw7FuIv4fJpPiNMolEg4RwScYy/XkXK6bz4pptN/ZZqStDy8Ynyt8GUWuFaUK+G5afHni8VAwshIT7fAKEhNscCLBS5IuCMtPQrrA29g6ClAvcg1RauNKUaxMXu2UWxNY23TPjH3JfxIWhueEPgq4X5GwvA52AzSikIG9+QpJRLQHfZ34RAeWuDhXuK/Z7QV8oIIAAtTac4APiUJZB7Es+Q8ebcw9tpCMt4+rwwmBJ4NA3khtvmAwF9/wTb6JMbUecWF4R8GYlw3X3FhVMfWjU0nrjjzjU0yDW1s8u67Haj0sennc3bvW5Q6u/3heHeAW9SCoWAsyB2NjNha3K3cCtjDnXyGLz4nB0CcipvRQioJKjYHysC9KAsFBdTPFZVbi8Kg1agej6GN93FR3h8ERd7HkuqxByA8aIEfSoMfFu9mLvFwiv0ohMcgPM7IaThgRv2RIJ/7QK6CUSNg9kZMP1rVZxmoHRS7NXcvoZWQuzHFyR+nFWVWQflled9iSe6Xf7cUgPGkeu3bEMJR2jJrTf8kBOHuY9QR88zeX0IGn8bmxCs2vMHDRaYGKKKgM2p4m+oN7vwbLsC+DPfMBzrVvCnkxzbFQ771gNcoZ8v4FNfoQT9kMy0OZtBs+uMRs8ZYsXFlONIVNZY1LLBETsXBwEqzzVqBDjO2jNeB+29F03LHyOTeydOkflw2b5m3YR7q9sibD6dkiglZRhD7bgR7CdMA/aVrjLlNyyHHaNw0uoNdZvemZbHuBWaIalNjrAT5I7whakQ3RWN4AoPcSoyZQWuhzRRzbrh3Uy3u+YeKQKfzvkD1ZDv6KG6A/pApYPhC4RojEKRpSVt4YdUgh7b1Jq0b0B8RUYPYWmhvDHXNsVOs4+yFRg+7DwL+xiAsgDAawt9grH8J4ZEG+oZhMzxfCSEPwlSWPIgEOTHuLsWIi5sg4KkioIP7ZLGyfNzyhDTn8/vNaBRa28IJg7EYVZVGcywc8XWIlkspAOQ8XztMCgM12WJcz/ZoACJHhd1YKq0kv23y8IMc7lFoJdnP6A85Vdxr9RTSUI55Z0mtOqP5gEKcUJVXWxgQMf44yNcuJU7kqZFU/g8tc/xH7OOrm5P7uSO+Da3rTRTGWiJBcW7HWujtLnzySYOGVK3PXObh435sKR2i8IDgkPzd4SggMky49eEuyCWCuB4F1O3ehKPGxyu8CXeld2N3b/pXcEzesyzVMfkccAxCE8ZPLCgTa144HBOe8uzD1fczmz18r98Ohcbai2MElBqWjXA8xtghy9g/D2GuGBPp7BmKA0vZG+bLhtGLXUGnkACGJIaDr0Xhdq65415FMDQx7r5pbFgb9K81NnDmoBsnIqSNh6K+dhMGLehDZ2oYXp7dFVFOkoGdWdHi4WvRtS0kyb1gqSO6Qv4MwovYbhp2oy0MK88GM3AmKrEXLPPvMDszU9QRy1r5Ulr9/j0Nfhn7nBMjWp2pp4BO1NQQkaipgV5E4xgt8Ui8gEJzx21Bl/C4FYo7NWpwkmKgXMiV5W2mGUpOhEHIkPSq+eJyD6e596gk0Sb3hyYOC4qHguvisjijHhaztmAsCiiB/lNrfTBMsBYcgnzw4CuZn0cnXkvCI3UhEX/YiSkDzKoY1KAVmS2oQtwsAC48Ap0yxWhu8bbUtS7xNi9CIXjZ8oaG+oYF3F6AS7EvYTiImOuD4XgUqAPvFsDaKIx4gN2wwsPrg2bDafCMGqGTYn5KOFMlTV4TT8TH6tTaR4Fr6umB5UEwtsFQO7A00bdWkNsYStiocewxe8KRTQYnh2QYhSGng3pEY13MWOnhWpdy+B0yQFfxxEg/V5JbW72kibS+wZAG2zdx1OD2EgPPNJHGY7Kg4NSiem5eSarz9DIS8aCc/SupH3DzC5Yj4fkqmTskvEAlc9ErLLmB5ucC5+WcQO0WarQ8Av4FhF+mxUEJ8nXOTyZ4jOUhZG1RCAO2rRGPxGqMxxrbl/DeTPq814Xb+W65SLwXIK8wISwGeprYS8etC+gsHvLxvWtLfKFNi2H1ic6NwNQyo/MAUfz44wugPFO3ESgZ3/yAaWrj0U1ABbgZG5/xndxYh8/EoC2Nh2O+uo1+E5joQEM41myaXbR9grMY84FsrgS+zLwayDA6qAegLaJiuAtAPPLNc80xH/C+ZgyZNyxgIUyBbktRi8Ph3mVQVTwHKfl2XhDoLxS2CQqvQ+t+fdRrfZcEViL1rcWGeolg1m2EzorWRmBRDTUFe2XZ84Dae2HOYWLJ8yJcH1oeRbf7ueFQiI+AeADE9rbxkRMZLE+azBaGozELmEwBPWvGrGA7kMRA+kYE6eTvD4cC630RY4MvGEtlSDuv9nA+aoBJWrjBF+0pLCgojCdxC1mxrmihyA+PLIH0KGGPYinzyspi+Pzr4tCHwMfHzI0vX+3hWsczK48n5bT3fUhfYSnvo4lLry/SZUYKOWmmI73mXePh9AV5Z+SpgyH0AIaxRNcKjE4klO2EeFiOjF8oyk1GMWBYQh3cypk8xofth/iTLOnQbWhoejmUHtbseAjzO34N0QWZBo+fGWaBcePdJEt7B+IRB3KxaFpFrshlqyh/m0rydUEBY5tX0SahWr7uL4nHOLk+g9W/hvLAv4OriMeQv7+38AV/4H1G1mg8znLq1JnGCRHv76to05XMhxw+gKVCWs/1M9EaTp6BCOG6bqAdE2GKCG9ATl5NOFW2mjZ8/d7CN+C2iR5fzL/WjObMnj371NVyTV632R4zjEiwY21s2hqXYSAM79fMdNFLfOZ6lyjkj86mu0Q5X15Nx0Q9uJrasOZD4hxeTe3FjGRb/7ya+v/3ljXgbQj/AeE/IRj490nXTNdM+DEKClzXzYT/jes4AD/X5bnyZk5zXWNt739BWF20sQh3p5YUlRaVFZUXVRRVFlUVVRcXFRcXlxSXFpcVlxdXFFcWVxVXlxSVFJeUlJSWlJWUl1SUVJZUlVSXFpUWl5aUlpaWlZaXVpRWllaVVpcVlRWXlZSVlpWVlZehBFNVVl1eVF5cXlJeWl5WXl5eUV5ZXlVeXVFUUVxRUlFaUVZRXlFRUVlRVVFdWVRZXFlSWVpZVlleWVFZWVlVWV1VVFVcVVJVWlVWVV5VUVVZVVVVXQ1VrIbiqyHrakhWDa9SxvIdCP8N4V2cD5G42e7rjqIiAyRRmE2RmMAJiT30Be2P3G0HX5HfFI5lXSuNz0r4zbXMq3RXH8wRacauVprTuP7j/KHMzVBAFHoAvnss+cn49SI+VYHi8spGcSZwbIZMOMDegTTI+6hraEOizEOeCWN1CZNNAcYuEDaJ3+V4blgdyVKjFq0hXqluDVlj664lnFT+yX/M++PvHWTuUvVD/7S0Px3/mHfn9yHpKyNOHb9YRDDs1xQUFKxGrlHiBxCNFAKDTzh39/loM+k3fTQOcs7uBBgtoF1izWkDqTOEcisOfx4+TAMBzaTuRnYRMvuzj/hRtc3DcdfeRviRnmdYjK2EkW9EXY6UYXy4xESootC+WUaQtmvAOgLyqZFH3PA03gRZ/yuhLFzXrm8j+e/GNtoUml72FlH2KX0H0guqNdEVgDazCvcTyAe32yC/wI+9UjSbzW5XHXanI2Ooa7x7TObYLM+QrGzdow0bdlHGSGWUPloZo411jFPGq5NGGtoMLd9doBRpxWqJcr/6gPqg/pDzH+r/2v5P/UA7mfHIxk03ffaeopVX3rRr9/hfDcletPh/3y8ovHzV6tbf7vjs52659YGvP/X0D374/I9//ebvTzJ96LBpxWWVNbNm11+xesfn4OMTTz39wx//7MU3f8/0rCH8a82suvn1V1wbMHfccuddz//sxayh0+BV/cprVl3bGjA/e8sDkOQHz//mzd8fzxpaVx8w+3Z848Azz77y6vE/br/hpnvve+bZH/zoZy/+8rWFe7770x/+7MX6hsaVV13b+unP3fz1bz/57MEf/ujVoSNHXbPqr3/74GRfz7pf/2bIpFB4/ITW665/9LEtTx8YOWripPkLGhqvvHrVtddv+dYPXn7l9eN//EskenMs/m9TCgrvf+zJZ3/04qu/uWPO7XuKbp700ss/O9nQePU1Dme2Z2rhu++FwpWzL6+t231Lc0f80POHjxz9xVsfnGRGa+623+jb5jnH6fahWx8e0veQbVLG1nHaGKeiF+plukNTHHbHUFdT9jDHcoemj3dlaE7NoeHcydRtmtuuDBlha3CMc6x0qPaRWU36XC1fU/Sh9uzMGn3CJa1Gj955Sd8h27bHtbH2bf+nXeUYmTE6Y3jm8MxOu8s+1n6VY4ZtvmumnqkrWrF7pj7W7tb6HoZPhcVLtL57nZdq2dqljirnDNu2k0NHOwuH5ms52TnZfbv0bbePcY/YeZut0DbLoQ4ZndH3TG4ss+/nYzNtfSdtfb/J/J+7tMqMrauG9+139v3E5ho9S3PZq5zznZn2mHuidrV+VUbf9tHjXSMzFut9n7E/dG/mKL34bn3rL6c4Mm22vvs8W//iUIzpdvj6Wb3vGW2clp3F7IoCjVNtDofqdGaoLptbHaJ7lKHqMNtFQ4crI9RR6pis8bYJzslKp96lPqYdUF9Uj6gvZ76S8XP1VfWXyjHbG+pb+tvqu8Zx/YQKiKpkTp11WUPjzV/+8lc+edPn/+2ebzx149ftjoyK2Zet+NPhI/rw0RWVK1ZuefDRx75bfmzYpz79uS8nMBERsaExYK769pPjxjucLvfwURXVNfseOPqLjMrdt+xzuGZd1h68+dZw67Pvvnd125/fP3nHnQWFU/OW37X37q/ee/++R5468JzdnTliQs3ldUvvu/+Fn+51jBmbe8lll7/1znsnf/BD3bj4kil5pVU1C69Y3NS8fAUi3Rq/2d4V3Xjdls/c++Bjj/cffvSxUPjz1+Z+0qbp+Vq7phQW9G2boBVnj9cnZ0y0zbDN04dM73vQPlmfrOc5y9wNc7dWZox0OUfPqqvW/M6MopG2HG2cTZlTpS+yFeouR4ZjjjFVz8yo0GpsYx16pqOpvrI0q9RR4HRtnbKsIc85feTYKeOHj8pogALmZY1xuOwLnVMz4u7LvdPts2wu+1K7YvNotr6b2iYudLr67rs2t87tsmddVGN3VczUR/V959JAc+bCDNf8unELnc1Z9Vsd810TtAX1ldoQp8te7XBtrRjT96SSXZK1/c72uLvvuc8s9mftKLz5yLYFd39nW7Vjur7KPsU135Vnu2jb49eYi/Rqx9A5iAO3n3Du+Pn0jHve2lqarw3VnVt3fVrvsmVpGQ7PrWsWZMQu7furK+rsHTG/747hmSszxvR9ausC7Yba7BE7mib1vTGj75V8bayubp0zaWiNTdlxrO9v0xbrLl3dPnTe4tl937vUrujLbePK1K1DZuqBzBWuvkerJmTN1DMA7+19d2w/Co3O0mKZVzlgFmVn6lXQmDxnbsPWlswRmk1zZEzQ3Da7y2V3AlXt+8klrh32QQm0+G1FPRbRaHOth29oQu+JPAuMutSRFhgPy0VvDdzajxw9Z/1xzz1/4EJ1a7y3NRamA1+5+7WVF3sP6T8wvdt1g91iW8NWX7SXDRtlTMo01kx6b+beGdOLjJnh+47NVPetyZ/4v2sK2AdGxZdPrqn4P+WNCsWVUzk5643Kh4b4qgtH311dNP6NBX+amLP4eOcbjY3hnKa7DtzdxF70LTWP3L2U/TJnGTv2RnPRG77lj/727hWH335jhcFCK48rJ1eyXuZg+cBAqPBPWeguGuFRTCBsqqroFysTx13jrsnIUEbrSgbQAdsM7VLn9NGKUQkJdCcQMIdLnaDUYHLdCVFc6lhFVauBYOjIbCgTVU1xI2yDCMpwdSSQkxosC2I7NJc6UZkFaTMhZR5kD7nC4Cm6Q3XzXLFKUKiK8Hi1Wk2WMkFZqOgKZK44laWK6sh0tilqhtt+hTqOc0OVQxQo0eZWJmco7bpih0qpY1Rd8+hZ8GhXshXod22COhH+zVEVh1NR3RkKkHElruYq6zVdzVDs2mvQCVBbB+aoOu0uVSmaVKwXAWxT8jIyVQMaqWhVCq+IVuNU1T2akqU4sEBN/eEcpnw/h2mfVdYYzB5Uma64DLVJZUhQlTGqTbldHTssS5niHOMu0IoU7LKpylw78mmZ0K5CpRRyVVUbtHu66lTexW5TgPnweFDkUX6rfMHGNGilnqfpytcgf6Z+0V2sf1KpyJ4GrXRpxZCjQ5mtTbYpzsuUTLUsA2aY0qphR9qVvYrmHMF7VVFGKkMcmu37TmzIKOxROw4SDsB/Qb3s8DtOXe7EN50KT6yYGgyojWUo6l9gPAAblN1Qmq4Yrjw7HyW7qhVAZzMHdIaybCRUBHL5hF3DXKEHF2JRCrQD1jKmXK4vxecCdRQw0ppuczpVx0T9No1V6iVOZYgy0qZkQ05DeS42wFhlts4cPQ62pu84W8zNB2jwaIUp1xFqtc6x48x77Chwt1AT755fiIfD8mHnL8VDv3w4IR92voYPCvtkRm8kHIj7zUhUdXaDxBL3dZiKviwejbFM+ITqdDOQ37ZJs3FT1YTigorigiIjL2GyMkBALMkvKs8vrppm3+Drhmj2ooLi6oKiTNTW5LcBS91hhoYVFZQUVJUYeeXVVVWlps/vm/b/AN50Nak="); let wasm; let globalThis$1; - const heap = new Array(32).fill(undefined); - heap.push(undefined, null, true, false); + const heap = new Array(32).fill(void 0); + heap.push(void 0, null, true, false); function getObject(idx) { return heap[idx]; } @@ -410384,9 +390675,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => cachedTextDecoder.decode(); let cachedUint8Memory0 = new Uint8Array(); function getUint8Memory0() { - if (cachedUint8Memory0.byteLength === 0) { - cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); - } + if (cachedUint8Memory0.byteLength === 0) cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer); return cachedUint8Memory0; } function getStringFromWasm0(ptr, len) { @@ -410401,57 +390690,36 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => } function debugString(val) { const type = typeof val; - if (type == "number" || type == "boolean" || val == null) { - return `${val}`; - } - if (type == "string") { - return `"${val}"`; - } + if (type == "number" || type == "boolean" || val == null) return `${val}`; + if (type == "string") return `"${val}"`; if (type == "symbol") { const description = val.description; - if (description == null) { - return "Symbol"; - } else { - return `Symbol(${description})`; - } + if (description == null) return "Symbol"; + else return `Symbol(${description})`; } if (type == "function") { const name = val.name; - if (typeof name == "string" && name.length > 0) { - return `Function(${name})`; - } else { - return "Function"; - } + if (typeof name == "string" && name.length > 0) return `Function(${name})`; + else return "Function"; } if (Array.isArray(val)) { const length = val.length; let debug = "["; - if (length > 0) { - debug += debugString(val[0]); - } - for (let i = 1; i < length; i++) { - debug += ", " + debugString(val[i]); - } + if (length > 0) debug += debugString(val[0]); + for (let i = 1; i < length; i++) debug += ", " + debugString(val[i]); debug += "]"; return debug; } const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val)); let className; - if (builtInMatches.length > 1) { - className = builtInMatches[1]; - } else { - return toString.call(val); - } - if (className == "Object") { - try { - return "Object(" + JSON.stringify(val) + ")"; - } catch (_) { - return "Object"; - } - } - if (val instanceof Error) { - return `${val.name}: ${val.message}\n${val.stack}`; + if (builtInMatches.length > 1) className = builtInMatches[1]; + else return toString.call(val); + if (className == "Object") try { + return "Object(" + JSON.stringify(val) + ")"; + } catch (_) { + return "Object"; } + if (val instanceof Error) return `${val.name}: ${val.message}\n${val.stack}`; return className; } let WASM_VECTOR_LEN = 0; @@ -410467,7 +390735,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => }; }; function passStringToWasm0(arg, malloc, realloc) { - if (realloc === undefined) { + if (realloc === void 0) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length); getUint8Memory0().subarray(ptr, ptr + buf.length).set(buf); @@ -410484,9 +390752,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => mem[ptr + offset] = code; } if (offset !== len) { - if (offset !== 0) { - arg = arg.slice(offset); - } + if (offset !== 0) arg = arg.slice(offset); ptr = realloc(ptr, len, len = offset + arg.length * 3); const view = getUint8Memory0().subarray(ptr + offset, ptr + len); const ret = encodeString(arg, view); @@ -410497,13 +390763,11 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => } let cachedInt32Memory0 = new Int32Array(); function getInt32Memory0() { - if (cachedInt32Memory0.byteLength === 0) { - cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); - } + if (cachedInt32Memory0.byteLength === 0) cachedInt32Memory0 = new Int32Array(wasm.memory.buffer); return cachedInt32Memory0; } function isLikeNone(x) { - return x === undefined || x === null; + return x === void 0 || x === null; } function passArray8ToWasm0(arg, malloc) { const ptr = malloc(arg.length * 1); @@ -410605,8 +390869,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => getPrivateKeyContent(fmt) { const ptr0 = passStringToWasm0(fmt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; - const ret = wasm.rsaprivate_getPrivateKeyContent(this.ptr, ptr0, len0); - return takeObject(ret); + return takeObject(wasm.rsaprivate_getPrivateKeyContent(this.ptr, ptr0, len0)); } /** * @returns {string} @@ -410691,15 +390954,13 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const len2 = WASM_VECTOR_LEN; const ptr3 = passStringToWasm0(hash_function, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len3 = WASM_VECTOR_LEN; - const ret = wasm.rsapublic_verify(this.ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3); - return ret !== 0; + return wasm.rsapublic_verify(this.ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3) !== 0; } /** * @returns {number} */ getKeySize() { - const ret = wasm.rsapublic_getKeySize(this.ptr); - return ret >>> 0; + return wasm.rsapublic_getKeySize(this.ptr) >>> 0; } /** * @param {string} fmt @@ -410708,8 +390969,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => getPublicKeyContent(fmt) { const ptr0 = passStringToWasm0(fmt, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; - const ret = wasm.rsapublic_getPublicKeyContent(this.ptr, ptr0, len0); - return takeObject(ret); + return takeObject(wasm.rsapublic_getPublicKeyContent(this.ptr, ptr0, len0)); } } function getImports() { @@ -410719,12 +390979,10 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => takeObject(arg0); }; imports.wbg.__wbindgen_string_new = function(arg0, arg1) { - const ret = getStringFromWasm0(arg0, arg1); - return addHeapObject(ret); + return addHeapObject(getStringFromWasm0(arg0, arg1)); }; imports.wbg.__wbg_new_693216e109162396 = function() { - const ret = new Error(); - return addHeapObject(ret); + return addHeapObject(/* @__PURE__ */ new Error()); }; imports.wbg.__wbg_stack_0ddaca5d1abfb52f = function(arg0, arg1) { const ret = getObject(arg1).stack; @@ -410741,21 +390999,17 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => } }; imports.wbg.__wbindgen_number_new = function(arg0) { - const ret = arg0; - return addHeapObject(ret); + return addHeapObject(arg0); }; imports.wbg.__wbindgen_object_clone_ref = function(arg0) { - const ret = getObject(arg0); - return addHeapObject(ret); + return addHeapObject(getObject(arg0)); }; imports.wbg.__wbindgen_is_undefined = function(arg0) { - const ret = getObject(arg0) === undefined; - return ret; + return getObject(arg0) === void 0; }; imports.wbg.__wbindgen_is_object = function(arg0) { const val = getObject(arg0); - const ret = typeof val === "object" && val !== null; - return ret; + return typeof val === "object" && val !== null; }; imports.wbg.__wbg_randomFillSync_91e2b39becca6147 = function() { return handleError(function(arg0, arg1, arg2) { @@ -410780,17 +391034,14 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => return addHeapObject(ret); }; imports.wbg.__wbindgen_is_string = function(arg0) { - const ret = typeof getObject(arg0) === "string"; - return ret; + return typeof getObject(arg0) === "string"; }; imports.wbg.__wbg_static_accessor_NODE_MODULE_26b231378c1be7dd = function() { - const ret = module; - return addHeapObject(ret); + return addHeapObject(module); }; imports.wbg.__wbg_require_0db1598d9ccecb30 = function() { return handleError(function(arg0, arg1, arg2) { - const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2)); - return addHeapObject(ret); + return addHeapObject(getObject(arg0).require(getStringFromWasm0(arg1, arg2))); }, arguments); }; imports.wbg.__wbg_crypto_b95d7173266618a9 = function(arg0) { @@ -410802,17 +391053,14 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => return addHeapObject(ret); }; imports.wbg.__wbg_new_ee1a3da85465d621 = function() { - const ret = new Array(); - return addHeapObject(ret); + return addHeapObject(new Array()); }; imports.wbg.__wbg_newnoargs_971e9a5abe185139 = function(arg0, arg1) { - const ret = new Function(getStringFromWasm0(arg0, arg1)); - return addHeapObject(ret); + return addHeapObject(new Function(getStringFromWasm0(arg0, arg1))); }; imports.wbg.__wbg_call_33d7bcddbbfa394a = function() { return handleError(function(arg0, arg1) { - const ret = getObject(arg0).call(getObject(arg1)); - return addHeapObject(ret); + return addHeapObject(getObject(arg0).call(getObject(arg1))); }, arguments); }; imports.wbg.__wbg_self_fd00a1ef86d1b2ed = function() { @@ -410847,27 +391095,22 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => return addHeapObject(ret); }; imports.wbg.__wbg_new_cda198d9dbc6d7ea = function(arg0) { - const ret = new Uint8Array(getObject(arg0)); - return addHeapObject(ret); + return addHeapObject(new Uint8Array(getObject(arg0))); }; imports.wbg.__wbg_set_1a930cfcda1a8067 = function(arg0, arg1, arg2) { getObject(arg0).set(getObject(arg1), arg2 >>> 0); }; imports.wbg.__wbg_length_51f19f73d6d9eff3 = function(arg0) { - const ret = getObject(arg0).length; - return ret; + return getObject(arg0).length; }; imports.wbg.__wbg_newwithlength_66e5530e7079ea1b = function(arg0) { - const ret = new Uint8Array(arg0 >>> 0); - return addHeapObject(ret); + return addHeapObject(new Uint8Array(arg0 >>> 0)); }; imports.wbg.__wbg_subarray_270ff8dd5582c1ac = function(arg0, arg1, arg2) { - const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0); - return addHeapObject(ret); + return addHeapObject(getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0)); }; imports.wbg.__wbindgen_debug_string = function(arg0, arg1) { - const ret = debugString(getObject(arg1)); - const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const ptr0 = passStringToWasm0(debugString(getObject(arg1)), wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; getInt32Memory0()[arg0 / 4 + 1] = len0; getInt32Memory0()[arg0 / 4 + 0] = ptr0; @@ -410916,17 +391159,13 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => */ updateRsaKey(keyFilePathOrKeySize = DEFAULT_RSA_KEY_SIZE, isPublicKey = DEFAULT_IS_PUBLIC_KEY) { parameterCheck(keyFilePathOrKeySize, "RSA keyFilePathOrKeySize", ["number", "string"]); - if (keyFilePathOrKeySize === RSAAlgo.keyFilePathOrKeySize && isPublicKey == RSAAlgo.isPublicKey) { - return; - } + if (keyFilePathOrKeySize === RSAAlgo.keyFilePathOrKeySize && isPublicKey == RSAAlgo.isPublicKey) return; RSAAlgo.keyFilePathOrKeySize = keyFilePathOrKeySize; RSAAlgo.isPublicKey = isPublicKey; RSAAlgo.keyChanged = true; } static async loadWasm() { - if (RSAAlgo.wasm) { - return RSAAlgo.wasm; - } + if (RSAAlgo.wasm) return RSAAlgo.wasm; [...RSA_HASH_ALGOS.values()].map(async (hash) => await hash.loadWasm()); await init(); RSAAlgo.wasm = true; @@ -410966,32 +391205,20 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => * @param cfg {object} the config for rsa */ updateConfig(cfg) { - if (cfg !== undefined) { - if (cfg.encryptPadding !== undefined && typeof cfg.encryptPadding === "string") { - this.updateEncryptPadding(cfg.encryptPadding.toUpperCase()); - } - if (cfg.signPadding !== undefined && typeof cfg.signPadding === "string") { - this.updateSignPadding(cfg.signPadding.toUpperCase()); - } - if (cfg.hashAlgo !== undefined && typeof cfg.hashAlgo === "string") { - this.updateHashAlgo(cfg.hashAlgo.toUpperCase()); - } - if (cfg.key !== undefined) { - this.updateRsaKey(cfg.key, cfg.isPublicKey); - } + if (cfg !== void 0) { + if (cfg.encryptPadding !== void 0 && typeof cfg.encryptPadding === "string") this.updateEncryptPadding(cfg.encryptPadding.toUpperCase()); + if (cfg.signPadding !== void 0 && typeof cfg.signPadding === "string") this.updateSignPadding(cfg.signPadding.toUpperCase()); + if (cfg.hashAlgo !== void 0 && typeof cfg.hashAlgo === "string") this.updateHashAlgo(cfg.hashAlgo.toUpperCase()); + if (cfg.key !== void 0) this.updateRsaKey(cfg.key, cfg.isPublicKey); } } /** * init keys from key file or key size */ initKeys() { - if (!RSAAlgo.wasm) { - throw new Error("WASM is not loaded yet. 'RSAAlgo.loadWasm' should be called first"); - } - if (!RSAAlgo.keyChanged && (this.RsaPrivate !== undefined || this.RsaPublic != undefined)) { - return; - } - if (RSAAlgo.keyFilePathOrKeySize === undefined) { + if (!RSAAlgo.wasm) throw new Error("WASM is not loaded yet. 'RSAAlgo.loadWasm' should be called first"); + if (!RSAAlgo.keyChanged && (this.RsaPrivate !== void 0 || this.RsaPublic != void 0)) return; + if (RSAAlgo.keyFilePathOrKeySize === void 0) { this.initFromKeySize(DEFAULT_RSA_KEY_SIZE); RSAAlgo.keyChanged = false; return; @@ -411002,11 +391229,8 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => return; } if (typeof RSAAlgo.keyFilePathOrKeySize === "string") { - if (this.isRsaKeyContent(RSAAlgo.keyFilePathOrKeySize)) { - this.initFromKeyContent(RSAAlgo.keyFilePathOrKeySize, RSAAlgo.isPublicKey); - } else { - this.initFromKeyFile(RSAAlgo.keyFilePathOrKeySize, RSAAlgo.isPublicKey); - } + if (this.isRsaKeyContent(RSAAlgo.keyFilePathOrKeySize)) this.initFromKeyContent(RSAAlgo.keyFilePathOrKeySize, RSAAlgo.isPublicKey); + else this.initFromKeyFile(RSAAlgo.keyFilePathOrKeySize, RSAAlgo.isPublicKey); RSAAlgo.keyChanged = false; return; } @@ -411020,9 +391244,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => * @returns {boolean} true if the given string is a rsa key content */ isRsaKeyContent(content) { - if (content.startsWith(RSA_PRIVATE_KEY_START) || content.startsWith(RSA_PUBLIC_KEY_START)) { - return true; - } + if (content.startsWith(RSA_PRIVATE_KEY_START) || content.startsWith(RSA_PUBLIC_KEY_START)) return true; return false; } /** @@ -411041,13 +391263,9 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => */ initFromKeyFile(path, isPublicKey = DEFAULT_IS_PUBLIC_KEY) { this.errorIfInBrowser(); - if (!RSAAlgo.wasm) { - throw new Error("WASM is not loaded yet. 'RSAAlgo.loadWasm' should be called first"); - } + if (!RSAAlgo.wasm) throw new Error("WASM is not loaded yet. 'RSAAlgo.loadWasm' should be called first"); const fs = __require("fs"); - if (!fs.existsSync(path)) { - throw new Error("Can not find the key file in path :\n" + path); - } + if (!fs.existsSync(path)) throw new Error("Can not find the key file in path :\n" + path); const keyContent = fs.readFileSync(path, { encoding: "utf-8", flag: "r" @@ -411059,9 +391277,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => * @param bits key size in bytes */ initFromKeySize(bits) { - if (!RSAAlgo.wasm) { - throw new Error("WASM is not loaded yet. 'RSAAlgo.loadWasm' should be called first"); - } + if (!RSAAlgo.wasm) throw new Error("WASM is not loaded yet. 'RSAAlgo.loadWasm' should be called first"); this.initWithPrivateKey(new RsaPrivate(bits)); } /** @@ -411100,9 +391316,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => * @param publicKey the pointer to the new RSA public key */ initWithPublicKey(publicKey) { - if (!RSAAlgo.wasm) { - throw new Error("WASM is not loaded yet. 'RSAAlgo.loadWasm' should be called first"); - } + if (!RSAAlgo.wasm) throw new Error("WASM is not loaded yet. 'RSAAlgo.loadWasm' should be called first"); this.RsaPublic = publicKey; this.RsaPrivate = null; } @@ -411112,12 +391326,8 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => * @param publicKey the pointer to the new RSA private key */ initWithPrivateKey(privateKey) { - if (!RSAAlgo.wasm) { - throw new Error("WASM is not loaded yet. 'RSAAlgo.loadWasm' should be called first"); - } - if (privateKey === undefined) { - privateKey = new RsaPrivate(DEFAULT_RSA_KEY_SIZE); - } + if (!RSAAlgo.wasm) throw new Error("WASM is not loaded yet. 'RSAAlgo.loadWasm' should be called first"); + if (privateKey === void 0) privateKey = new RsaPrivate(DEFAULT_RSA_KEY_SIZE); const publicKey = new RsaPublic(privateKey.getPublicKeyPem()); this.RsaPrivate = privateKey; this.RsaPublic = publicKey; @@ -411165,11 +391375,9 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => */ digest(msg, cfg) { this.updateConfig(cfg); - let digestAlgo = RSA_HASH_ALGOS.get(this.hashAlgo); - const digestWords = digestAlgo(msg); + const digestWords = RSA_HASH_ALGOS.get(this.hashAlgo)(msg); const digestUint32Array = new Uint32Array(digestWords.words).slice(0, digestWords.sigBytes / 4); - const digest = new Uint8Array(digestUint32Array.buffer); - return digest; + return new Uint8Array(digestUint32Array.buffer); } /** * RSA sign @@ -411225,9 +391433,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => let keyPath = `${dir}/${fileName}.${fileFmt}`; let keyContent = this.getKeyContent(keyType, fileFmt); const fs = __require("fs"); - if (!fs.existsSync(dir)) { - fs.mkdirSync(dir); - } + if (!fs.existsSync(dir)) fs.mkdirSync(dir); fs.writeFileSync(keyPath, keyContent); } /** @@ -411260,9 +391466,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => this.errorIfNoPrivateInstance(); return this.RsaPrivate.getPrivateKeyContent(keyFmt); } - if (keyType == "public") { - return this.RsaPublic.getPublicKeyContent(keyFmt); - } + if (keyType == "public") return this.RsaPublic.getPublicKeyContent(keyFmt); throw TypeError("Key type should be private or public"); } /** @@ -411271,10 +391475,7 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => * @returns {Uint8Array|*} */ strToBytes(val) { - if (typeof val === "string") { - let encoder = new TextEncoder(); - return encoder.encode(val); - } + if (typeof val === "string") return new TextEncoder().encode(val); return val; } /** @@ -411289,24 +391490,14 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => let inputLimit; switch (op) { case "encrypt": - if (this.encryptPadding === RSA_PADDING_OAEP) { - inputLimit = keySize - 2 * hashAlgoOutputSize - 2; - } else { - inputLimit = keySize - 11; - } - if (input.length > inputLimit) { - throw new Error(`The input message is too long (${input.length} bytes). The maximum length is ${inputLimit}`); - } + if (this.encryptPadding === RSA_PADDING_OAEP) inputLimit = keySize - 2 * hashAlgoOutputSize - 2; + else inputLimit = keySize - 11; + if (input.length > inputLimit) throw new Error(`The input message is too long (${input.length} bytes). The maximum length is ${inputLimit}`); break; case "sign": - if (this.signPadding === RSA_PADDING_PSS) { - inputLimit = Math.floor((keySize * 8 - 9) / 2 / 8); - } else { - inputLimit = keySize - 11; - } - if (input.length > inputLimit) { - throw new Error(`The input message is too long (${input.length} bytes). The maximum length is ${inputLimit}`); - } + if (this.signPadding === RSA_PADDING_PSS) inputLimit = Math.floor((keySize * 8 - 9) / 2 / 8); + else inputLimit = keySize - 11; + if (input.length > inputLimit) throw new Error(`The input message is too long (${input.length} bytes). The maximum length is ${inputLimit}`); break; default: throw new Error("op should be 'encrypt' or 'sign'"); } @@ -411315,17 +391506,13 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => * Throws if private key is not instantiated */ errorIfNoPrivateInstance() { - if (this.getKeyType() === "public") { - throw TypeError("Private key or public key has not been instantiated"); - } + if (this.getKeyType() === "public") throw TypeError("Private key or public key has not been instantiated"); } /** * Throws if node-only function is called in browser */ errorIfInBrowser() { - if (typeof window !== "undefined" && typeof window.document !== "undefined") { - throw Error("This function is not supported in browser"); - } + if (typeof window !== "undefined" && typeof window.document !== "undefined") throw Error("This function is not supported in browser"); } } /** @@ -411396,14 +391583,10 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const 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 (let i = 0; i < blockSize; i++) { - _words[offset + i] ^= keystream[i]; - } + for (let i = 0; i < blockSize; i++) _words[offset + i] ^= keystream[i]; } /** * Cipher Feedback block mode. @@ -411441,14 +391624,12 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => if (iv) { this._counter = iv.slice(0); counter = this._counter; - this._iv = undefined; + this._iv = void 0; } const keystream = counter.slice(0); cipher.encryptBlock(keystream, 0); counter[blockSize - 1] = counter[blockSize - 1] + 1 | 0; - for (let i = 0; i < blockSize; i++) { - _words[offset + i] ^= keystream[i]; - } + for (let i = 0; i < blockSize; i++) _words[offset + i] ^= keystream[i]; } }; CTR.Decryptor = CTR.Encryptor; @@ -411462,32 +391643,21 @@ var require_crypto_js_wasm = /* @__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; }; const incCounter = (counter) => { const _counter = counter; _counter[0] = incWord(_counter[0]); - if (_counter[0] === 0) { - _counter[1] = incWord(_counter[1]); - } + if (_counter[0] === 0) _counter[1] = incWord(_counter[1]); return _counter; }; /** @preserve @@ -411507,14 +391677,12 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => if (iv) { this._counter = iv.slice(0); counter = this._counter; - this._iv = undefined; + this._iv = void 0; } incCounter(counter); const keystream = counter.slice(0); cipher.encryptBlock(keystream, 0); - for (let i = 0; i < blockSize; i++) { - _words[offset + i] ^= keystream[i]; - } + for (let i = 0; i < blockSize; i++) _words[offset + i] ^= keystream[i]; } }; CTRGladman.Decryptor = CTRGladman.Encryptor; @@ -411542,12 +391710,10 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => if (iv) { this._keystream = iv.slice(0); keystream = this._keystream; - this._iv = undefined; + this._iv = void 0; } cipher.encryptBlock(keystream, 0); - for (let i = 0; i < blockSize; i++) { - _words[offset + i] ^= keystream[i]; - } + for (let i = 0; i < blockSize; i++) _words[offset + i] ^= keystream[i]; } }; OFB.Decryptor = OFB.Encryptor; @@ -411599,44 +391765,12 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => unpad(data) { const _data = data; const dataWords = _data.words; - for (let i = _data.sigBytes - 1; i >= 0; i--) { - if (dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 255) { - _data.sigBytes = i + 1; - break; - } + for (let i = _data.sigBytes - 1; i >= 0; i--) if (dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 255) { + _data.sigBytes = i + 1; + break; } } }; - /** - * ISO/IEC 9797-1 Padding Method 2. - */ - const Iso97971 = { - pad(data, blockSize) { - data.concat(new WordArray([2147483648], 1)); - ZeroPadding.pad(data, blockSize); - }, - unpad(data) { - const _data = data; - ZeroPadding.unpad(_data); - _data.sigBytes--; - } - }; - /** - * A noop padding strategy. - */ - const NoPadding = { - pad() {}, - unpad() {} - }; - const HexFormatter = { - stringify(cipherParams) { - return cipherParams.ciphertext.toString(Hex); - }, - parse(input) { - const ciphertext = Hex.parse(input); - return new CipherParams({ ciphertext }); - } - }; var index = { lib: { Base, @@ -411698,13 +391832,33 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => Pkcs7, AnsiX923, Iso10126, - Iso97971, - NoPadding, + Iso97971: { + pad(data, blockSize) { + data.concat(new WordArray([2147483648], 1)); + ZeroPadding.pad(data, blockSize); + }, + unpad(data) { + const _data = data; + ZeroPadding.unpad(_data); + _data.sigBytes--; + } + }, + NoPadding: { + pad() {}, + unpad() {} + }, ZeroPadding }, format: { OpenSSL: OpenSSLFormatter, - Hex: HexFormatter + Hex: { + stringify(cipherParams) { + return cipherParams.ciphertext.toString(Hex); + }, + parse(input) { + return new CipherParams({ ciphertext: Hex.parse(input) }); + } + } }, kdf: { OpenSSL: OpenSSLKdf }, loadAllWasm, @@ -411739,7 +391893,6 @@ var require_crypto_js_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => return index; })); })); - //#endregion //#region ../node_modules/simplecc-wasm/pkg/nodejs/simplecc_wasm.js var require_simplecc_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -411754,17 +391907,15 @@ var require_simplecc_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => cachedTextDecoder.decode(); let cachedUint8ArrayMemory0 = null; function getUint8ArrayMemory0() { - if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) { - cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); - } + if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer); return cachedUint8ArrayMemory0; } function getStringFromWasm0(ptr, len) { ptr = ptr >>> 0; return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len)); } - const heap = new Array(128).fill(undefined); - heap.push(undefined, null, true, false); + const heap = new Array(128).fill(void 0); + heap.push(void 0, null, true, false); let heap_next = heap.length; function addHeapObject(obj) { if (heap_next === heap.length) heap.push(heap.length + 1); @@ -411786,7 +391937,7 @@ var require_simplecc_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => }; }; function passStringToWasm0(arg, malloc, realloc) { - if (realloc === undefined) { + if (realloc === void 0) { const buf = cachedTextEncoder.encode(arg); const ptr = malloc(buf.length, 1) >>> 0; getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf); @@ -411803,9 +391954,7 @@ var require_simplecc_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => mem[ptr + offset] = code; } if (offset !== len) { - if (offset !== 0) { - arg = arg.slice(offset); - } + if (offset !== 0) arg = arg.slice(offset); ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0; const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len); const ret = encodeString(arg, view); @@ -411817,9 +391966,7 @@ var require_simplecc_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => } let cachedDataViewMemory0 = null; function getDataViewMemory0() { - if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer) { - cachedDataViewMemory0 = new DataView(wasm.memory.buffer); - } + if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === void 0 && cachedDataViewMemory0.buffer !== wasm.memory.buffer) cachedDataViewMemory0 = new DataView(wasm.memory.buffer); return cachedDataViewMemory0; } function getObject(idx) { @@ -411850,10 +391997,10 @@ var require_simplecc_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => const ptr1 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len1 = WASM_VECTOR_LEN; wasm.simplecc(retptr, ptr0, len0, ptr1, len1); - var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true); - var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true); - var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true); - var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true); + var r0 = getDataViewMemory0().getInt32(retptr + 0, true); + var r1 = getDataViewMemory0().getInt32(retptr + 4, true); + var r2 = getDataViewMemory0().getInt32(retptr + 8, true); + var r3 = getDataViewMemory0().getInt32(retptr + 12, true); var ptr3 = r0; var len3 = r1; if (r3) { @@ -411870,17 +392017,14 @@ var require_simplecc_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => } }; module.exports.__wbindgen_string_new = function(arg0, arg1) { - const ret = getStringFromWasm0(arg0, arg1); - return addHeapObject(ret); + return addHeapObject(getStringFromWasm0(arg0, arg1)); }; const path$2 = __require("path").join(__dirname, "simplecc_wasm_bg.wasm"); const bytes = __require("fs").readFileSync(path$2); const wasmModule = new WebAssembly.Module(bytes); - const wasmInstance = new WebAssembly.Instance(wasmModule, imports); - wasm = wasmInstance.exports; + wasm = new WebAssembly.Instance(wasmModule, imports).exports; module.exports.__wasm = wasm; })); - //#endregion //#region ../node_modules/node-sqlite3-wasm/dist/node-sqlite3-wasm.js var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) => { @@ -411973,9 +392117,7 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) column_table_name: [s, n2], get_autocommit: [n, n1] }; - for (const [name, sig] of Object.entries(signatures)) { - sqlite3[name] = cwrap(`sqlite3_${name}`, sig[0], sig[1]); - } + for (const [name, sig] of Object.entries(signatures)) sqlite3[name] = cwrap(`sqlite3_${name}`, sig[0], sig[1]); }; var SQLite3Error = class extends Error { constructor(message) { @@ -411995,9 +392137,7 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) return ptr; } function toNumberOrNot(bigInt) { - if (bigInt >= Number.MIN_SAFE_INTEGER && bigInt <= Number.MAX_SAFE_INTEGER) { - return Number(bigInt); - } + if (bigInt >= Number.MIN_SAFE_INTEGER && bigInt <= Number.MAX_SAFE_INTEGER) return Number(bigInt); return bigInt; } function parseFunctionArguments(argc, argv) { @@ -412018,11 +392158,8 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) break; case SQLITE_BLOB: const p = sqlite3.value_blob(ptr); - if (p != NULL) { - arg = HEAPU8.slice(p, p + sqlite3.value_bytes(ptr)); - } else { - arg = new Uint8Array(); - } + if (p != NULL) arg = HEAPU8.slice(p, p + sqlite3.value_bytes(ptr)); + else arg = new Uint8Array(); break; case SQLITE_NULL: arg = null; @@ -412038,15 +392175,9 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) sqlite3.result_int(cx, result ? 1 : 0); break; case "number": - if (Number.isSafeInteger(result)) { - if (result >= INT32_MIN && result <= INT32_MAX) { - sqlite3.result_int(cx, result); - } else { - sqlite3.result_int64(cx, BigInt(result)); - } - } else { - sqlite3.result_double(cx, result); - } + if (Number.isSafeInteger(result)) if (result >= INT32_MIN && result <= INT32_MAX) sqlite3.result_int(cx, result); + else sqlite3.result_int64(cx, BigInt(result)); + else sqlite3.result_double(cx, result); break; case "bigint": sqlite3.result_int64(cx, result); @@ -412057,19 +392188,13 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) _free(tempPtr); break; case "object": - if (result === null) { - sqlite3.result_null(cx); - } else if (result instanceof Uint8Array) { + if (result === null) sqlite3.result_null(cx); + else if (result instanceof Uint8Array) { const tempPtr = arrayToHeap(result); - if (result.byteLength <= INT32_MAX) { - sqlite3.result_blob(cx, tempPtr, result.byteLength, SQLITE_TRANSIENT); - } else { - sqlite3.result_blob64(cx, tempPtr, BigInt(result.byteLength), SQLITE_TRANSIENT); - } + if (result.byteLength <= INT32_MAX) sqlite3.result_blob(cx, tempPtr, result.byteLength, SQLITE_TRANSIENT); + else sqlite3.result_blob64(cx, tempPtr, BigInt(result.byteLength), SQLITE_TRANSIENT); _free(tempPtr); - } else { - throw new SQLite3Error(`Unsupported type for function result: "${typeof result}"`); - } + } else throw new SQLite3Error(`Unsupported type for function result: "${typeof result}"`); break; default: throw new SQLite3Error(`Unsupported type for function result: "${typeof result}"`); } @@ -412077,9 +392202,8 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) var Database = class { constructor(filename, { fileMustExist = false, readOnly = false } = {}) { let flags; - if (readOnly) { - flags = SQLITE_OPEN_READONLY; - } else { + if (readOnly) flags = SQLITE_OPEN_READONLY; + else { flags = SQLITE_OPEN_READWRITE; if (!fileMustExist) flags |= SQLITE_OPEN_CREATE; } @@ -412089,7 +392213,7 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) if (this._ptr !== NULL) sqlite3.close_v2(this._ptr); throw new SQLite3Error(`Could not open the database "${filename}"`); } - this._functions = new Map(); + this._functions = /* @__PURE__ */ new Map(); } get isOpen() { return this._ptr !== null; @@ -412161,11 +392285,8 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) _query(sql, values, single, expand) { const stmt = this.prepare(sql); try { - if (single) { - return stmt.get(values, { expand }); - } else { - return stmt.all(values, { expand }); - } + if (single) return stmt.get(values, { expand }); + else return stmt.all(values, { expand }); } finally { stmt.finalize(); } @@ -412232,16 +392353,10 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) while (this._step()) yield this._getRow(columns, expand); } _bind(values) { - if (!this._reset()) { - throw new SQLite3Error("Could not reset statement prior to binding new values"); - } - if (Array.isArray(values)) { - this._bindArray(values); - } else if (values != null && typeof values === "object") { - this._bindObject(values); - } else if (typeof values !== "undefined") { - this._bindValue(values, 1); - } + if (!this._reset()) throw new SQLite3Error("Could not reset statement prior to binding new values"); + if (Array.isArray(values)) this._bindArray(values); + else if (values != null && typeof values === "object") this._bindObject(values); + else if (typeof values !== "undefined") this._bindValue(values, 1); } _step() { const ret = sqlite3.step(this._ptr); @@ -412255,8 +392370,7 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) const row = {}; for (let i = 0; i < columns.length; i++) { let v; - const colType = sqlite3.column_type(this._ptr, i); - switch (colType) { + switch (sqlite3.column_type(this._ptr, i)) { case SQLITE_INTEGER: v = toNumberOrNot(sqlite3.column_int64(this._ptr, i)); break; @@ -412268,11 +392382,8 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) break; case SQLITE_BLOB: const p = sqlite3.column_blob(this._ptr, i); - if (p != NULL) { - v = HEAPU8.slice(p, p + sqlite3.column_bytes(this._ptr, i)); - } else { - v = new Uint8Array(); - } + if (p != NULL) v = HEAPU8.slice(p, p + sqlite3.column_bytes(this._ptr, i)); + else v = new Uint8Array(); break; case SQLITE_NULL: v = null; @@ -412282,14 +392393,9 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) if (expand) { let table = sqlite3.column_table_name(this._ptr, i); table = table === "" ? "$" : table; - if (Object.hasOwn(row, table)) { - row[table][column] = v; - } else { - row[table] = { [column]: v }; - } - } else { - row[column] = v; - } + if (Object.hasOwn(row, table)) row[table][column] = v; + else row[table] = { [column]: v }; + } else row[column] = v; } return row; } @@ -412318,15 +392424,9 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) _free(tempPtr); break; case "number": - if (Number.isSafeInteger(value)) { - if (value >= INT32_MIN && value <= INT32_MAX) { - ret = sqlite3.bind_int(this._ptr, position, value); - } else { - ret = sqlite3.bind_int64(this._ptr, position, BigInt(value)); - } - } else { - ret = sqlite3.bind_double(this._ptr, position, value); - } + if (Number.isSafeInteger(value)) if (value >= INT32_MIN && value <= INT32_MAX) ret = sqlite3.bind_int(this._ptr, position, value); + else ret = sqlite3.bind_int64(this._ptr, position, BigInt(value)); + else ret = sqlite3.bind_double(this._ptr, position, value); break; case "bigint": ret = sqlite3.bind_int64(this._ptr, position, value); @@ -412335,19 +392435,13 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) ret = sqlite3.bind_int(this._ptr, position, value ? 1 : 0); break; case "object": - if (value === null) { - ret = sqlite3.bind_null(this._ptr, position); - } else if (value instanceof Uint8Array) { + if (value === null) ret = sqlite3.bind_null(this._ptr, position); + else if (value instanceof Uint8Array) { const tempPtr = arrayToHeap(value); - if (value.byteLength <= INT32_MAX) { - ret = sqlite3.bind_blob(this._ptr, position, tempPtr, value.byteLength, SQLITE_TRANSIENT); - } else { - ret = sqlite3.bind_blob64(this._ptr, position, tempPtr, BigInt(value.byteLength), SQLITE_TRANSIENT); - } + if (value.byteLength <= INT32_MAX) ret = sqlite3.bind_blob(this._ptr, position, tempPtr, value.byteLength, SQLITE_TRANSIENT); + else ret = sqlite3.bind_blob64(this._ptr, position, tempPtr, BigInt(value.byteLength), SQLITE_TRANSIENT); _free(tempPtr); - } else { - throw new SQLite3Error(`Unsupported type for binding: "${typeof value}"`); - } + } else throw new SQLite3Error(`Unsupported type for binding: "${typeof value}"`); break; default: throw new SQLite3Error(`Unsupported type for binding: "${typeof value}"`); } @@ -412403,14 +392497,10 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) throw toThrow; }; var _scriptName; - if (typeof __filename != "undefined") { - _scriptName = __filename; - } else {} + if (typeof __filename != "undefined") {} var scriptDirectory = ""; function locateFile(path) { - if (Module["locateFile"]) { - return Module["locateFile"](path, scriptDirectory); - } + if (Module["locateFile"]) return Module["locateFile"](path, scriptDirectory); return scriptDirectory + path; } var readAsync, readBinary; @@ -412419,26 +392509,16 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) scriptDirectory = __dirname + "/"; readBinary = (filename) => { filename = isFileURI(filename) ? new URL(filename) : filename; - var ret = fs$2.readFileSync(filename); - return ret; - }; - readAsync = async (filename, binary = true) => { - filename = isFileURI(filename) ? new URL(filename) : filename; - var ret = fs$2.readFileSync(filename, binary ? undefined : "utf8"); - return ret; + return fs$2.readFileSync(filename); }; - if (process.argv.length > 1) { - thisProgram = process.argv[1].replace(/\\/g, "/"); - } - arguments_ = process.argv.slice(2); - if (typeof module != "undefined") { - module["exports"] = Module; - } + if (process.argv.length > 1) process.argv[1].replace(/\\/g, "/"); + process.argv.slice(2); + if (typeof module != "undefined") module["exports"] = Module; quit_ = (status, toThrow) => { process.exitCode = status; throw toThrow; }; - } else {} + } var out = console.log.bind(console); var err = console.error.bind(console); var wasmBinary; @@ -412453,33 +392533,28 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) HEAP8 = new Int8Array(b); HEAP16 = new Int16Array(b); HEAPU8 = new Uint8Array(b); - HEAPU16 = new Uint16Array(b); + new Uint16Array(b); HEAP32 = new Int32Array(b); HEAPU32 = new Uint32Array(b); HEAPF32 = new Float32Array(b); HEAPF64 = new Float64Array(b); HEAP64 = new BigInt64Array(b); - HEAPU64 = new BigUint64Array(b); + new BigUint64Array(b); } function preRun() { if (Module["preRun"]) { if (typeof Module["preRun"] == "function") Module["preRun"] = [Module["preRun"]]; - while (Module["preRun"].length) { - addOnPreRun(Module["preRun"].shift()); - } + while (Module["preRun"].length) addOnPreRun(Module["preRun"].shift()); } callRuntimeCallbacks(onPreRuns); } function initRuntime() { - runtimeInitialized = true; wasmExports["z"](); } function postRun() { if (Module["postRun"]) { if (typeof Module["postRun"] == "function") Module["postRun"] = [Module["postRun"]]; - while (Module["postRun"].length) { - addOnPostRun(Module["postRun"].shift()); - } + while (Module["postRun"].length) addOnPostRun(Module["postRun"].shift()); } callRuntimeCallbacks(onPostRuns); } @@ -412489,28 +392564,22 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) err(what); ABORT = true; what += ". Build with -sASSERTIONS for more info."; - var e = new WebAssembly.RuntimeError(what); - throw e; + throw new WebAssembly.RuntimeError(what); } var wasmBinaryFile; function findWasmBinary() { return locateFile("node-sqlite3-wasm.wasm"); } function getBinarySync(file) { - if (file == wasmBinaryFile && wasmBinary) { - return new Uint8Array(wasmBinary); - } - if (readBinary) { - return readBinary(file); - } + if (file == wasmBinaryFile && wasmBinary) return new Uint8Array(wasmBinary); + if (readBinary) return readBinary(file); throw "sync fetching of the wasm failed: you can preload it to Module[\"wasmBinary\"] manually, or emcc.py will do that for you when generating HTML (but not JS)"; } function instantiateSync(file, info) { var module$1; var binary = getBinarySync(file); module$1 = new WebAssembly.Module(binary); - var instance = new WebAssembly.Instance(module$1, info); - return [instance, module$1]; + return [new WebAssembly.Instance(module$1, info), module$1]; } function getWasmImports() { return { a: wasmImports }; @@ -412523,16 +392592,13 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) return wasmExports; } var info = getWasmImports(); - if (Module["instantiateWasm"]) { - return new Promise((resolve, reject) => { - Module["instantiateWasm"](info, (inst, mod) => { - resolve(receiveInstance(inst, mod)); - }); + if (Module["instantiateWasm"]) return new Promise((resolve, reject) => { + Module["instantiateWasm"](info, (inst, mod) => { + resolve(receiveInstance(inst, mod)); }); - } + }); wasmBinaryFile ??= findWasmBinary(); - var result = instantiateSync(wasmBinaryFile, info); - return receiveInstance(result[0]); + return receiveInstance(instantiateSync(wasmBinaryFile, info)[0]); } var ExitStatus = class { name = "ExitStatus"; @@ -412542,9 +392608,7 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) } }; var callRuntimeCallbacks = (callbacks) => { - while (callbacks.length > 0) { - callbacks.shift()(Module); - } + while (callbacks.length > 0) callbacks.shift()(Module); }; var onPostRuns = []; var addOnPostRun = (cb) => onPostRuns.push(cb); @@ -412633,17 +392697,14 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) 334 ]; var ydayFromDate = (date) => { - var leap = isLeapYear(date.getFullYear()); - var monthDaysCumulative = leap ? MONTH_DAYS_LEAP_CUMULATIVE : MONTH_DAYS_REGULAR_CUMULATIVE; - var yday = monthDaysCumulative[date.getMonth()] + date.getDate() - 1; - return yday; + return (isLeapYear(date.getFullYear()) ? MONTH_DAYS_LEAP_CUMULATIVE : MONTH_DAYS_REGULAR_CUMULATIVE)[date.getMonth()] + date.getDate() - 1; }; var INT53_MAX = 9007199254740992; var INT53_MIN = -9007199254740992; var bigintToI53Checked = (num) => num < INT53_MIN || num > INT53_MAX ? NaN : Number(num); function __localtime_js(time, tmPtr) { time = bigintToI53Checked(time); - var date = new Date(time * 1e3); + var date = /* @__PURE__ */ new Date(time * 1e3); HEAP32[tmPtr >> 2] = date.getSeconds(); HEAP32[tmPtr + 4 >> 2] = date.getMinutes(); HEAP32[tmPtr + 8 >> 2] = date.getHours(); @@ -412662,9 +392723,7 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) } var timers = {}; var handleException = (e) => { - if (e instanceof ExitStatus || e == "unwind") { - return EXITSTATUS; - } + if (e instanceof ExitStatus || e == "unwind") return EXITSTATUS; quit_(1, e); }; var keepRuntimeAlive = () => noExitRuntime || runtimeKeepaliveCounter > 0; @@ -412682,18 +392741,14 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) }; var _exit = exitJS; var maybeExit = () => { - if (!keepRuntimeAlive()) { - try { - _exit(EXITSTATUS); - } catch (e) { - handleException(e); - } + if (!keepRuntimeAlive()) try { + _exit(EXITSTATUS); + } catch (e) { + handleException(e); } }; var callUserCallback = (func) => { - if (ABORT) { - return; - } + if (ABORT) return; try { func(); maybeExit(); @@ -412708,12 +392763,11 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) delete timers[which]; } if (!timeout_ms) return 0; - var id = setTimeout(() => { - delete timers[which]; - callUserCallback(() => __emscripten_timeout(which, _emscripten_get_now())); - }, timeout_ms); timers[which] = { - id, + id: setTimeout(() => { + delete timers[which]; + callUserCallback(() => __emscripten_timeout(which, _emscripten_get_now())); + }, timeout_ms), timeout_ms }; return 0; @@ -412750,7 +392804,7 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) }; var stringToUTF8 = (str, outPtr, maxBytesToWrite) => stringToUTF8Array(str, HEAPU8, outPtr, maxBytesToWrite); var __tzset_js = (timezone, daylight, std_name, dst_name) => { - var currentYear = new Date().getFullYear(); + var currentYear = (/* @__PURE__ */ new Date()).getFullYear(); var winter = new Date(currentYear, 0, 1); var summer = new Date(currentYear, 6, 1); var winterOffset = winter.getTimezoneOffset(); @@ -412761,9 +392815,7 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) var extractZone = (timezoneOffset) => { var sign = timezoneOffset >= 0 ? "-" : "+"; var absOffset = Math.abs(timezoneOffset); - var hours = String(Math.floor(absOffset / 60)).padStart(2, "0"); - var minutes = String(absOffset % 60).padStart(2, "0"); - return `UTC${sign}${hours}${minutes}`; + return `UTC${sign}${String(Math.floor(absOffset / 60)).padStart(2, "0")}${String(absOffset % 60).padStart(2, "0")}`; }; var winterName = extractZone(winterOffset); var summerName = extractZone(summerOffset); @@ -412779,8 +392831,7 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) var getHeapMax = () => 2147483648; var alignMemory = (size, alignment) => Math.ceil(size / alignment) * alignment; var growMemory = (size) => { - var oldHeapSize = wasmMemory.buffer.byteLength; - var pages = (size - oldHeapSize + 65535) / 65536 | 0; + var pages = (size - wasmMemory.buffer.byteLength + 65535) / 65536 | 0; try { wasmMemory.grow(pages); updateMemoryViews(); @@ -412791,17 +392842,11 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) var oldSize = HEAPU8.length; requestedSize >>>= 0; var maxHeapSize = getHeapMax(); - if (requestedSize > maxHeapSize) { - return false; - } + if (requestedSize > maxHeapSize) return false; for (var cutDown = 1; cutDown <= 4; cutDown *= 2) { var overGrownHeapSize = oldSize * (1 + .2 / cutDown); overGrownHeapSize = Math.min(overGrownHeapSize, requestedSize + 100663296); - var newSize = Math.min(maxHeapSize, alignMemory(Math.max(requestedSize, overGrownHeapSize), 65536)); - var replacement = growMemory(newSize); - if (replacement) { - return true; - } + if (growMemory(Math.min(maxHeapSize, alignMemory(Math.max(requestedSize, overGrownHeapSize), 65536)))) return true; } return false; }; @@ -412814,9 +392859,7 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) }; var UTF8ArrayToString = (heapOrArray, idx = 0, maxBytesToRead, ignoreNul) => { var endPtr = findStringEnd(heapOrArray, idx, maxBytesToRead, ignoreNul); - if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) { - return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr)); - } + if (endPtr - idx > 16 && heapOrArray.buffer && UTF8Decoder) return UTF8Decoder.decode(heapOrArray.subarray(idx, endPtr)); var str = ""; while (idx < endPtr) { var u0 = heapOrArray[idx++]; @@ -412830,14 +392873,10 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) continue; } var u2 = heapOrArray[idx++] & 63; - if ((u0 & 240) == 224) { - u0 = (u0 & 15) << 12 | u1 << 6 | u2; - } else { - u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63; - } - if (u0 < 65536) { - str += String.fromCharCode(u0); - } else { + if ((u0 & 240) == 224) u0 = (u0 & 15) << 12 | u1 << 6 | u2; + else u0 = (u0 & 7) << 18 | u1 << 12 | u2 << 6 | heapOrArray[idx++] & 63; + if (u0 < 65536) str += String.fromCharCode(u0); + else { var ch = u0 - 65536; str += String.fromCharCode(55296 | ch >> 10, 56320 | ch & 1023); } @@ -412936,15 +392975,12 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) } catch { return SQLITE_IOERR_READ; } - if (bytesRead == bytes) { - return SQLITE_OK; - } else if (bytesRead >= 0) { - if (bytesRead < bytes) { - try { - buf.fill(0, bytesRead); - } catch { - return SQLITE_IOERR_READ; - } + if (bytesRead == bytes) return SQLITE_OK; + else if (bytesRead >= 0) { + if (bytesRead < bytes) try { + buf.fill(0, bytesRead); + } catch { + return SQLITE_IOERR_READ; } return SQLITE_IOERR_SHORT_READ; } @@ -412979,8 +393015,7 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) } function _nodejsWrite(fi, buffer, bytes, offset) { try { - const bytesWritten = fs$2.writeSync(_fd(fi), HEAPU8.subarray(buffer, buffer + bytes), 0, bytes, _safeInt(offset)); - return bytesWritten != bytes ? SQLITE_IOERR_WRITE : SQLITE_OK; + return fs$2.writeSync(_fd(fi), HEAPU8.subarray(buffer, buffer + bytes), 0, bytes, _safeInt(offset)) != bytes ? SQLITE_IOERR_WRITE : SQLITE_OK; } catch { return SQLITE_IOERR_WRITE; } @@ -413001,8 +393036,7 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) } } var getCFunc = (ident) => { - var func = Module["_" + ident]; - return func; + return Module["_" + ident]; }; var writeArrayToMemory = (array, buffer) => { HEAP8.set(array, buffer); @@ -413011,16 +393045,12 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) var len = 0; for (var i = 0; i < str.length; ++i) { var c = str.charCodeAt(i); - if (c <= 127) { - len++; - } else if (c <= 2047) { - len += 2; - } else if (c >= 55296 && c <= 57343) { + if (c <= 127) len++; + else if (c <= 2047) len += 2; + else if (c >= 55296 && c <= 57343) { len += 4; ++i; - } else { - len += 3; - } + } else len += 3; } return len; }; @@ -413035,9 +393065,7 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) var toC = { string: (str) => { var ret = 0; - if (str !== null && str !== undefined && str !== 0) { - ret = stringToUTF8OnStack(str); - } + if (str !== null && str !== void 0 && str !== 0) ret = stringToUTF8OnStack(str); return ret; }, array: (arr) => { @@ -413047,25 +393075,19 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) } }; function convertReturnValue(ret) { - if (returnType === "string") { - return UTF8ToString(ret); - } + if (returnType === "string") return UTF8ToString(ret); if (returnType === "boolean") return Boolean(ret); return ret; } var func = getCFunc(ident); var cArgs = []; var stack = 0; - if (args) { - for (var i = 0; i < args.length; i++) { - var converter = toC[argTypes[i]]; - if (converter) { - if (stack === 0) stack = stackSave(); - cArgs[i] = converter(args[i]); - } else { - cArgs[i] = args[i]; - } - } + if (args) for (var i = 0; i < args.length; i++) { + var converter = toC[argTypes[i]]; + if (converter) { + if (stack === 0) stack = stackSave(); + cArgs[i] = converter(args[i]); + } else cArgs[i] = args[i]; } var ret = func(...cArgs); function onDone(ret) { @@ -413077,43 +393099,32 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) }; var cwrap = (ident, returnType, argTypes, opts) => { var numericArgs = !argTypes || argTypes.every((type) => type === "number" || type === "boolean"); - var numericRet = returnType !== "string"; - if (numericRet && numericArgs && !opts) { - return getCFunc(ident); - } + if (returnType !== "string" && numericArgs && !opts) return getCFunc(ident); return (...args) => ccall(ident, returnType, argTypes, args, opts); }; var wasmTableMirror = []; var getWasmTableEntry = (funcPtr) => { var func = wasmTableMirror[funcPtr]; - if (!func) { - wasmTableMirror[funcPtr] = func = wasmTable.get(funcPtr); - } + if (!func) wasmTableMirror[funcPtr] = func = wasmTable.get(funcPtr); return func; }; var updateTableMap = (offset, count) => { - if (functionsInTableMap) { - for (var i = offset; i < offset + count; i++) { - var item = getWasmTableEntry(i); - if (item) { - functionsInTableMap.set(item, i); - } - } + if (functionsInTableMap) for (var i = offset; i < offset + count; i++) { + var item = getWasmTableEntry(i); + if (item) functionsInTableMap.set(item, i); } }; var functionsInTableMap; var getFunctionAddress = (func) => { if (!functionsInTableMap) { - functionsInTableMap = new WeakMap(); + functionsInTableMap = /* @__PURE__ */ new WeakMap(); updateTableMap(0, wasmTable.length); } return functionsInTableMap.get(func) || 0; }; var freeTableIndexes = []; var getEmptyTableSlot = () => { - if (freeTableIndexes.length) { - return freeTableIndexes.pop(); - } + if (freeTableIndexes.length) return freeTableIndexes.pop(); return wasmTable["grow"](1); }; var setWasmTableEntry = (idx, func) => { @@ -413137,8 +393148,7 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) e: 111 }; var generateTypePack = (types) => uleb128EncodeWithLen(Array.from(types, (type) => { - var code = wasmTypeCodes[type]; - return code; + return wasmTypeCodes[type]; })); var convertJsFunctionToWasm = (func, sig) => { var bytes = Uint8Array.of(0, 97, 115, 109, 1, 0, 0, 0, 1, ...uleb128EncodeWithLen([ @@ -413148,24 +393158,17 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) ...generateTypePack(sig[0] === "v" ? "" : sig[0]) ]), 2, 7, 1, 1, 101, 1, 102, 0, 0, 7, 5, 1, 1, 102, 0, 0); var module$3 = new WebAssembly.Module(bytes); - var instance = new WebAssembly.Instance(module$3, { e: { f: func } }); - var wrappedFunc = instance.exports["f"]; - return wrappedFunc; + return new WebAssembly.Instance(module$3, { e: { f: func } }).exports["f"]; }; var addFunction = (func, sig) => { var rtn = getFunctionAddress(func); - if (rtn) { - return rtn; - } + if (rtn) return rtn; var ret = getEmptyTableSlot(); try { setWasmTableEntry(ret, func); } catch (err) { - if (!(err instanceof TypeError)) { - throw err; - } - var wrapped = convertJsFunctionToWasm(func, sig); - setWasmTableEntry(ret, wrapped); + if (!(err instanceof TypeError)) throw err; + setWasmTableEntry(ret, convertJsFunctionToWasm(func, sig)); } functionsInTableMap.set(func, ret); return ret; @@ -413175,69 +393178,65 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) setWasmTableEntry(index, null); freeTableIndexes.push(index); }; - { - if (Module["noExitRuntime"]) noExitRuntime = Module["noExitRuntime"]; - if (Module["print"]) out = Module["print"]; - if (Module["printErr"]) err = Module["printErr"]; - if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"]; - if (Module["arguments"]) arguments_ = Module["arguments"]; - if (Module["thisProgram"]) thisProgram = Module["thisProgram"]; - if (Module["preInit"]) { - if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]]; - while (Module["preInit"].length > 0) { - Module["preInit"].shift()(); - } - } + if (Module["noExitRuntime"]) noExitRuntime = Module["noExitRuntime"]; + if (Module["print"]) Module["print"]; + if (Module["printErr"]) err = Module["printErr"]; + if (Module["wasmBinary"]) wasmBinary = Module["wasmBinary"]; + if (Module["arguments"]) Module["arguments"]; + if (Module["thisProgram"]) Module["thisProgram"]; + if (Module["preInit"]) { + if (typeof Module["preInit"] == "function") Module["preInit"] = [Module["preInit"]]; + while (Module["preInit"].length > 0) Module["preInit"].shift()(); } Module["cwrap"] = cwrap; Module["addFunction"] = addFunction; Module["removeFunction"] = removeFunction; var _sqlite3_finalize, _sqlite3_reset, _sqlite3_clear_bindings, _sqlite3_value_blob, _sqlite3_value_text, _sqlite3_value_bytes, _sqlite3_value_double, _sqlite3_value_int64, _sqlite3_value_type, _sqlite3_result_blob, _sqlite3_result_blob64, _sqlite3_result_double, _sqlite3_result_error, _sqlite3_result_int, _sqlite3_result_int64, _sqlite3_result_null, _sqlite3_result_text, _sqlite3_step, _sqlite3_column_count, _sqlite3_column_blob, _sqlite3_column_bytes, _sqlite3_column_double, _sqlite3_column_int64, _sqlite3_column_text, _sqlite3_column_type, _sqlite3_column_name, _sqlite3_column_table_name, _sqlite3_bind_blob, _sqlite3_bind_blob64, _sqlite3_bind_double, _sqlite3_bind_int, _sqlite3_bind_int64, _sqlite3_bind_null, _sqlite3_bind_text, _sqlite3_bind_parameter_index, _sqlite3_exec, _sqlite3_prepare_v2, _sqlite3_errmsg, _sqlite3_last_insert_rowid, _sqlite3_changes, _sqlite3_close_v2, _sqlite3_create_function_v2, _sqlite3_open_v2, _sqlite3_get_autocommit, _malloc, _free, __emscripten_timeout, __emscripten_stack_restore, __emscripten_stack_alloc, _emscripten_stack_get_current, wasmMemory, wasmTable; function assignWasmExports(wasmExports) { - _sqlite3_finalize = Module["_sqlite3_finalize"] = wasmExports["A"]; - _sqlite3_reset = Module["_sqlite3_reset"] = wasmExports["B"]; - _sqlite3_clear_bindings = Module["_sqlite3_clear_bindings"] = wasmExports["C"]; - _sqlite3_value_blob = Module["_sqlite3_value_blob"] = wasmExports["D"]; - _sqlite3_value_text = Module["_sqlite3_value_text"] = wasmExports["E"]; - _sqlite3_value_bytes = Module["_sqlite3_value_bytes"] = wasmExports["F"]; - _sqlite3_value_double = Module["_sqlite3_value_double"] = wasmExports["G"]; - _sqlite3_value_int64 = Module["_sqlite3_value_int64"] = wasmExports["H"]; - _sqlite3_value_type = Module["_sqlite3_value_type"] = wasmExports["I"]; - _sqlite3_result_blob = Module["_sqlite3_result_blob"] = wasmExports["J"]; - _sqlite3_result_blob64 = Module["_sqlite3_result_blob64"] = wasmExports["K"]; - _sqlite3_result_double = Module["_sqlite3_result_double"] = wasmExports["L"]; - _sqlite3_result_error = Module["_sqlite3_result_error"] = wasmExports["M"]; - _sqlite3_result_int = Module["_sqlite3_result_int"] = wasmExports["N"]; - _sqlite3_result_int64 = Module["_sqlite3_result_int64"] = wasmExports["O"]; - _sqlite3_result_null = Module["_sqlite3_result_null"] = wasmExports["P"]; - _sqlite3_result_text = Module["_sqlite3_result_text"] = wasmExports["Q"]; - _sqlite3_step = Module["_sqlite3_step"] = wasmExports["R"]; - _sqlite3_column_count = Module["_sqlite3_column_count"] = wasmExports["S"]; - _sqlite3_column_blob = Module["_sqlite3_column_blob"] = wasmExports["T"]; - _sqlite3_column_bytes = Module["_sqlite3_column_bytes"] = wasmExports["U"]; - _sqlite3_column_double = Module["_sqlite3_column_double"] = wasmExports["V"]; - _sqlite3_column_int64 = Module["_sqlite3_column_int64"] = wasmExports["W"]; - _sqlite3_column_text = Module["_sqlite3_column_text"] = wasmExports["X"]; - _sqlite3_column_type = Module["_sqlite3_column_type"] = wasmExports["Y"]; - _sqlite3_column_name = Module["_sqlite3_column_name"] = wasmExports["Z"]; - _sqlite3_column_table_name = Module["_sqlite3_column_table_name"] = wasmExports["_"]; - _sqlite3_bind_blob = Module["_sqlite3_bind_blob"] = wasmExports["$"]; - _sqlite3_bind_blob64 = Module["_sqlite3_bind_blob64"] = wasmExports["aa"]; - _sqlite3_bind_double = Module["_sqlite3_bind_double"] = wasmExports["ba"]; - _sqlite3_bind_int = Module["_sqlite3_bind_int"] = wasmExports["ca"]; - _sqlite3_bind_int64 = Module["_sqlite3_bind_int64"] = wasmExports["da"]; - _sqlite3_bind_null = Module["_sqlite3_bind_null"] = wasmExports["ea"]; - _sqlite3_bind_text = Module["_sqlite3_bind_text"] = wasmExports["fa"]; - _sqlite3_bind_parameter_index = Module["_sqlite3_bind_parameter_index"] = wasmExports["ga"]; - _sqlite3_exec = Module["_sqlite3_exec"] = wasmExports["ha"]; - _sqlite3_prepare_v2 = Module["_sqlite3_prepare_v2"] = wasmExports["ia"]; - _sqlite3_errmsg = Module["_sqlite3_errmsg"] = wasmExports["ja"]; - _sqlite3_last_insert_rowid = Module["_sqlite3_last_insert_rowid"] = wasmExports["ka"]; - _sqlite3_changes = Module["_sqlite3_changes"] = wasmExports["la"]; - _sqlite3_close_v2 = Module["_sqlite3_close_v2"] = wasmExports["ma"]; - _sqlite3_create_function_v2 = Module["_sqlite3_create_function_v2"] = wasmExports["na"]; - _sqlite3_open_v2 = Module["_sqlite3_open_v2"] = wasmExports["oa"]; - _sqlite3_get_autocommit = Module["_sqlite3_get_autocommit"] = wasmExports["pa"]; + Module["_sqlite3_finalize"] = wasmExports["A"]; + Module["_sqlite3_reset"] = wasmExports["B"]; + Module["_sqlite3_clear_bindings"] = wasmExports["C"]; + Module["_sqlite3_value_blob"] = wasmExports["D"]; + Module["_sqlite3_value_text"] = wasmExports["E"]; + Module["_sqlite3_value_bytes"] = wasmExports["F"]; + Module["_sqlite3_value_double"] = wasmExports["G"]; + Module["_sqlite3_value_int64"] = wasmExports["H"]; + Module["_sqlite3_value_type"] = wasmExports["I"]; + Module["_sqlite3_result_blob"] = wasmExports["J"]; + Module["_sqlite3_result_blob64"] = wasmExports["K"]; + Module["_sqlite3_result_double"] = wasmExports["L"]; + Module["_sqlite3_result_error"] = wasmExports["M"]; + Module["_sqlite3_result_int"] = wasmExports["N"]; + Module["_sqlite3_result_int64"] = wasmExports["O"]; + Module["_sqlite3_result_null"] = wasmExports["P"]; + Module["_sqlite3_result_text"] = wasmExports["Q"]; + Module["_sqlite3_step"] = wasmExports["R"]; + Module["_sqlite3_column_count"] = wasmExports["S"]; + Module["_sqlite3_column_blob"] = wasmExports["T"]; + Module["_sqlite3_column_bytes"] = wasmExports["U"]; + Module["_sqlite3_column_double"] = wasmExports["V"]; + Module["_sqlite3_column_int64"] = wasmExports["W"]; + Module["_sqlite3_column_text"] = wasmExports["X"]; + Module["_sqlite3_column_type"] = wasmExports["Y"]; + Module["_sqlite3_column_name"] = wasmExports["Z"]; + Module["_sqlite3_column_table_name"] = wasmExports["_"]; + Module["_sqlite3_bind_blob"] = wasmExports["$"]; + Module["_sqlite3_bind_blob64"] = wasmExports["aa"]; + Module["_sqlite3_bind_double"] = wasmExports["ba"]; + Module["_sqlite3_bind_int"] = wasmExports["ca"]; + Module["_sqlite3_bind_int64"] = wasmExports["da"]; + Module["_sqlite3_bind_null"] = wasmExports["ea"]; + Module["_sqlite3_bind_text"] = wasmExports["fa"]; + Module["_sqlite3_bind_parameter_index"] = wasmExports["ga"]; + Module["_sqlite3_exec"] = wasmExports["ha"]; + Module["_sqlite3_prepare_v2"] = wasmExports["ia"]; + Module["_sqlite3_errmsg"] = wasmExports["ja"]; + Module["_sqlite3_last_insert_rowid"] = wasmExports["ka"]; + Module["_sqlite3_changes"] = wasmExports["la"]; + Module["_sqlite3_close_v2"] = wasmExports["ma"]; + Module["_sqlite3_create_function_v2"] = wasmExports["na"]; + Module["_sqlite3_open_v2"] = wasmExports["oa"]; + Module["_sqlite3_get_autocommit"] = wasmExports["pa"]; _malloc = Module["_malloc"] = wasmExports["qa"]; _free = Module["_free"] = wasmExports["ra"]; __emscripten_timeout = wasmExports["ta"]; @@ -413288,15 +393287,11 @@ var require_node_sqlite3_wasm = /* @__PURE__ */ __commonJSMin(((exports, module) setTimeout(() => Module["setStatus"](""), 1); doRun(); }, 1); - } else { - doRun(); - } + } else doRun(); } - var wasmExports; - wasmExports = createWasm(); + var wasmExports = createWasm(); run(); })); - //#endregion //#region ../utils/database.js var database_exports = /* @__PURE__ */ __exportAll({ @@ -413342,9 +393337,7 @@ var init_database = __esmMin((() => { return db; } async startDb() { - if (!this.db) { - await this.initDb(); - } + if (!this.db) await this.initDb(); } async endDb() { if (this.db) { @@ -413355,7 +393348,6 @@ var init_database = __esmMin((() => { }; database$1 = new DataBase$1("./database.db"); })); - //#endregion //#region ../libs/drpyS.js var drpyS_exports = /* @__PURE__ */ __exportAll({ @@ -413385,32 +393377,31 @@ globalThis._fetch = fetch; globalThis.JsonBig = (0, import_json_bigint.default)({ storeAsString: true }); globalThis.require = rootRequire; initializeGlobalDollar(); -const { Ali, Baidu, Baidu2, Cloud, Pan, Quark, UC, Yun } = pans_default; +const { Ali, Baidu, Baidu2, Cloud, Pan, Quark, UC, Yun, Xun } = pans_default; const { sleep, sleepSync, getNowTime, computeHash, deepCopy, urljoin: urljoin$1, urljoin2, joinUrl, keysToLowerCase, naturalSort, $js, createBasicAuthHeaders, get_size } = utils_exports$1; -const moduleCache$2 = new Map(); -const ruleObjectCache$1 = new Map(); -const jxCache = new Map(); +const CACHE_OPTIONS = { + max: 100, + ttl: 1e3 * 60 * 10 +}; +const moduleCache$2 = new LRUCache(CACHE_OPTIONS); +const ruleObjectCache$1 = new LRUCache(CACHE_OPTIONS); +const jxCache = new LRUCache(CACHE_OPTIONS); let currentSessionId = null; let lastClearTime = 0; let sessionCacheCleared = false; -const sessionCacheStates = new Map(); +const sessionCacheStates = /* @__PURE__ */ new Map(); let pupWebview = null; -if (typeof fetchByHiker === "undefined") { - try { - const { puppeteerHelper } = await Promise.resolve().then(() => (init_headless_util(), headless_util_exports)); - pupWebview = new puppeteerHelper(); - log("[getSandbox] puppeteerHelper imported successfully"); - } catch (error) { - log(`[getSandbox] Failed to import puppeteerHelper:${error.message}`); - } +if (typeof fetchByHiker === "undefined") try { + const { puppeteerHelper } = await Promise.resolve().then(() => (init_headless_util(), headless_util_exports)); + pupWebview = new puppeteerHelper(); + log("[getSandbox] puppeteerHelper imported successfully"); +} catch (error) { + log(`[getSandbox] Failed to import puppeteerHelper:${error.message}`); } globalThis.pupWebview = pupWebview; try { - if (typeof fetchByHiker !== "undefined" && typeof globalThis.import === "function") { - await globalThis.import("../libs_drpy/crypto-js-wasm.js"); - } else { - await Promise.resolve().then(() => /* @__PURE__ */ __toESM(require_crypto_js_wasm(), 1)); - } + if (typeof fetchByHiker !== "undefined" && typeof globalThis.import === "function") await globalThis.import("../libs_drpy/crypto-js-wasm.js"); + else await Promise.resolve().then(() => /* @__PURE__ */ __toESM(require_crypto_js_wasm(), 1)); globalThis.CryptoJSW = CryptoJSWasm; } catch (error) { log(`[getSandbox] Failed to import CryptoJSWasm:${error.message}`); @@ -413421,8 +393412,7 @@ try { } let simplecc = null; try { - const simWasm = await Promise.resolve().then(() => /* @__PURE__ */ __toESM(require_simplecc_wasm(), 1)); - simplecc = simWasm.simplecc; + simplecc = (await Promise.resolve().then(() => /* @__PURE__ */ __toESM(require_simplecc_wasm(), 1))).simplecc; log("[getSandbox] simplecc imported successfully"); } catch (error) { log(`[getSandbox] Failed to import simplecc:${error.message}`); @@ -413446,168 +393436,247 @@ try { } globalThis.DataBase = DataBase; globalThis.database = database; +const STATIC_UTILS_SANDBOX = { + sleep, + sleepSync, + utils: utils_exports$1, + misc: misc_exports, + computeHash, + deepCopy, + urljoin: urljoin$1, + urljoin2, + joinUrl, + naturalSort, + $js, + createBasicAuthHeaders, + get_size, + $, + getContentType, + getMimeType, + getParsesDict, + getFirstLetter +}; +const STATIC_DRPY_SANDBOX = { + jsp, + pdfh, + pd, + pdfa, + jsoup, + pdfl, + pjfh, + pj, + pjfa, + pq, + local, + md5X, + rsaX, + aesX, + desX, + req, + reqs, + toBeijingTime, + _fetch, + XMLHttpRequest: import_XMLHttpRequest.XMLHttpRequest, + AIS: ais_default, + batchFetch, + JSProxyStream, + JSFile, + js2Proxy, + log, + print, + jsonToCookie, + cookieToJson, + runMain, + cachedRequest +}; +const STATIC_DRPY_CUSTOM_SANDBOX = { + MOBILE_UA, + PC_UA, + UA, + UC_UA, + IOS_UA, + RULE_CK, + CATE_EXCLUDE, + TAB_EXCLUDE, + OCR_RETRY: 3, + OCR_API, + nodata, + SPECIAL_URL, + setResult, + setHomeResult, + setResult2, + urlDeal, + tellIsJx: tellIsJx$1, + urlencode, + encodeUrl, + uint8ArrayToBase64, + Utf8ArrayToStr, + gzip, + ungzip: ungzip$1, + encodeStr, + decodeStr, + getCryptoJS, + RSA, + fixAdM3u8Ai, + forceOrder, + getQuery, + stringify: stringify$1, + dealJson, + OcrApi, + getHome, + buildUrl, + keysToLowerCase, + parseQueryString, + buildQueryString, + encodeIfContainsSpecialChars, + objectToQueryString, + forge: import_lib.default, + lrcToSrt, + strExtract +}; +const STATIC_LIBS_SANDBOX = { + matchesAll, + cut, + gbkTool, + CryptoJS: CryptoJS$1, + JSEncrypt: JSEncrypt$1, + NODERSA, + pako, + JSON5: JSON5$1, + jinja: jinja$1, + template: template$1, + batchExecute, + atob: atob$1, + btoa: btoa$1, + base64Encode: base64Encode$1, + base64Decode: base64Decode$2, + md5: md5$1, + rc4Encrypt, + rc4Decrypt, + rc4, + rc4_decode, + randomUa, + jsonpath, + hlsParser, + axios, + axiosX, + URL, + pathLib, + executeParse, + qs, + Buffer, + URLSearchParams, + COOKIE, + ENV, + _ENV, + Quark, + Baidu, + Baidu2, + UC, + Ali, + Cloud, + Yun, + Pan, + Xun, + createWebDAVClient, + createFTPClient, + require: rootRequire, + WebSocket: wrapper_default, + WebSocketServer: import_websocket_server.default, + zlib, + JSONbig: import_json_bigint.default, + JsonBig, + minizlib: esm_exports$2, + iconv: globalThis.iconv, + cheerio: globalThis.cheerio +}; +const GLOBAL_STATIC_SANDBOX = { + ...STATIC_UTILS_SANDBOX, + ...STATIC_DRPY_SANDBOX, + ...STATIC_DRPY_CUSTOM_SANDBOX, + ...STATIC_LIBS_SANDBOX +}; +const REQ_EXTEND_SCRIPT = new vm.Script(req_extend_code); +const TEMPLATE_CHECK_FUNC_CODE = ` +globalThis._checkTemplateFunc = async function(html, parseRuleStr) { + try { + let p = parseRuleStr.split(';'); + let p0 = p[0]; + let is_json = p0.startsWith('json:'); + p0 = p0.replace(/^(jsp:|json:|jq:)/, ''); + let classes = []; + let $pdfa, $pdfh, $pd; + if (is_json) { + html = dealJson(html); + $pdfa = pjfa; $pdfh = pjfh; $pd = pj; + } else { + $pdfa = pdfa; $pdfh = pdfh; $pd = pd; + } + if (is_json) { + try { + let list = $pdfa(html, p0); + if (list && list.length > 0) classes = list; + } catch (e) { log('[handleTemplateInheritance] json分类解析失败:' + e.message); } + } else if (p.length >= 3) { + try { + let list = $pdfa(html, p0); + if (list && list.length > 0) { + for (const it of list) { + try { + let name = $pdfh(it, p[1]); + let url = $pd(it, p[2]); + if (p.length > 3 && p[3]) { + let exp = new RegExp(p[3]); + let match = url.match(exp); + if (match && match[1]) url = match[1]; + } + if (name.trim()) classes.push({ 'type_id': url.trim(), 'type_name': name.trim() }); + } catch (e) { log('[handleTemplateInheritance] 分类列表解析元素失败:' + e.message); } + } + } + } catch (e) { log('[handleTemplateInheritance] 分类列表解析失败:' + e.message); } + } + return { class: classes }; + } catch (e) { + log('[handleTemplateInheritance] 模板测试执行错误:', e.message); + return { class: [] }; + } +}; +`; +const SANDBOX_INIT_CODE = es6_extend_code + "\n" + TEMPLATE_CHECK_FUNC_CODE; +const SANDBOX_INIT_SCRIPT = new vm.Script(SANDBOX_INIT_CODE); +const TEMPLATE_CHECK_CALL_SCRIPT = new vm.Script(`_checkTemplateFunc(globalThis._tempHtml, globalThis._tempParse)`); +const CACHED_REQUEST_SCRIPT = new vm.Script(` +(async function() { + try { + return await cachedRequest(request, globalThis._tempHost, globalThis._tempHeaders, 'host'); + } catch (e) { + log('[handleTemplateInheritance] 获取HOST页面失败:', e.message); + return ''; + } +})() +`); +const INIT_HEADERS_SCRIPT = new vm.Script(` +globalThis.oheaders = rule.oheaders +globalThis.rule_fetch_params = rule.rule_fetch_params; +`); +const INIT_JSOUP_SCRIPT = new vm.Script(` +globalThis.jsp = new jsoup(rule.host||''); +globalThis.pdfh = pdfh; +globalThis.pd = pd; +globalThis.pdfa = pdfa; +globalThis.HOST = rule.host||''; +`); async function getSandbox(env = {}) { const { getProxyUrl, requestHost, hostUrl, fServer } = env; await CryptoJSW.loadAllWasm(); - const utilsSanbox = { - sleep, - sleepSync, - utils: utils_exports$1, - misc: misc_exports, - computeHash, - deepCopy, - urljoin: urljoin$1, - urljoin2, - joinUrl, - naturalSort, - $js, - createBasicAuthHeaders, - get_size, - $, - pupWebview, - getProxyUrl, - requestHost, - hostUrl, - fServer, - getContentType, - getMimeType, - getParsesDict, - getFirstLetter - }; - const drpySanbox = { - jsp, - pdfh, - pd, - pdfa, - jsoup, - pdfl, - pjfh, - pj, - pjfa, - pq, - local, - md5X, - rsaX, - aesX, - desX, - req, - reqs, - toBeijingTime, - _fetch, - XMLHttpRequest: import_XMLHttpRequest.XMLHttpRequest, - simplecc, - AIS: ais_default, - batchFetch, - JSProxyStream, - JSFile, - js2Proxy, - log, - print, - jsonToCookie, - cookieToJson, - runMain, - cachedRequest - }; - const drpyCustomSanbox = { - MOBILE_UA, - PC_UA, - UA, - UC_UA, - IOS_UA, - RULE_CK, - CATE_EXCLUDE, - TAB_EXCLUDE, - OCR_RETRY, - OCR_API, - nodata, - SPECIAL_URL, - setResult, - setHomeResult, - setResult2, - urlDeal, - tellIsJx: tellIsJx$1, - urlencode, - encodeUrl, - uint8ArrayToBase64, - Utf8ArrayToStr, - gzip, - ungzip: ungzip$1, - encodeStr, - decodeStr, - getCryptoJS, - RSA, - fixAdM3u8Ai, - forceOrder, - getQuery, - stringify: stringify$1, - dealJson, - OcrApi, - getHome, - buildUrl, - keysToLowerCase, - parseQueryString, - buildQueryString, - encodeIfContainsSpecialChars, - objectToQueryString, - forge: import_lib.default, - lrcToSrt, - strExtract - }; - const libsSanbox = { - matchesAll, - cut, - gbkTool, - CryptoJS: CryptoJS$1, + const dynamicLibsSandbox = { CryptoJSW, - JSEncrypt: JSEncrypt$1, - NODERSA, - pako, - JSON5: JSON5$1, - jinja: jinja$1, - template: template$1, - batchExecute, - atob: atob$1, - btoa: btoa$1, - base64Encode: base64Encode$1, - base64Decode: base64Decode$2, - md5: md5$1, - rc4Encrypt, - rc4Decrypt, - rc4, - rc4_decode, - randomUa, - jsonpath, - hlsParser, - axios, - axiosX, - URL, - pathLib, - executeParse, - qs, - Buffer, - URLSearchParams, - COOKIE, - ENV, - _ENV, - Quark, - Baidu, - Baidu2, - UC, - Ali, - Cloud, - Yun, - Pan, - createWebDAVClient, - createFTPClient, DataBase, database, - require: __require, - WebSocket: wrapper_default, - WebSocketServer: import_websocket_server.default, - zlib, - JSONbig: import_json_bigint.default, - JsonBig, - minizlib: esm_exports$1 + simplecc, + iconv: globalThis.iconv, + cheerio: globalThis.cheerio }; const sandbox = { console, @@ -413626,14 +393695,16 @@ async function getSandbox(env = {}) { lazy: async function() {}, _asyncGetRule: null, _asyncGetLazy: null, - ...utilsSanbox, - ...drpySanbox, - ...drpyCustomSanbox, - ...libsSanbox + ...GLOBAL_STATIC_SANDBOX, + pupWebview, + getProxyUrl, + requestHost, + hostUrl, + fServer, + ...dynamicLibsSandbox }; const context = vm.createContext(sandbox); - const polyfillsScript = new vm.Script(es6_extend_code); - polyfillsScript.runInContext(context); + SANDBOX_INIT_SCRIPT.runInContext(context); sandbox.$.setSandbox(sandbox); return { sandbox, @@ -413661,38 +393732,30 @@ async function init$2(filePath, env = {}, refresh) { } catch (e) { log(`[init] [${moduleName}] ungzip解密moduleExt失败: ${e.message}`); } - if (!SitesMap[moduleName].find((i) => i.queryStr === moduleExt) && !SitesMap[moduleName].find((i) => i.queryObject.params === moduleExt)) { - throw new Error("moduleExt is wrong!"); - } + if (!SitesMap[moduleName].find((i) => i.queryStr === moduleExt) && !SitesMap[moduleName].find((i) => i.queryObject.params === moduleExt)) throw new Error("moduleExt is wrong!"); } let hashMd5 = md5$1(filePath + "#pAq#" + moduleExt); if (moduleCache$2.has(hashMd5) && !refresh) { const cached = moduleCache$2.get(hashMd5); - if (cached.hash === fileHash) { - return cached.moduleObject; - } + if (cached.hash === fileHash) return cached.moduleObject; } log(`[init] Loading module: ${filePath}`); let t1 = getNowTime(); const { sandbox, context } = await getSandbox(env); - const js_code = await getOriginalJs(fileContent); const js_code_wrapper = ` _asyncGetRule = (async function() { - ${js_code} + ${await getOriginalJs(fileContent)} return rule; })(); `; const ruleScript = new vm.Script(js_code_wrapper); const executeWithTimeout = (script, context, timeout) => { let timer; - return Promise.race([new Promise((_, reject) => timer = setTimeout(() => reject(new Error("Code execution timed out")), timeout)), new Promise((resolve, reject) => { + return Promise.race([new Promise((_, reject) => timer = setTimeout(() => reject(/* @__PURE__ */ new Error("Code execution timed out")), timeout)), new Promise((resolve, reject) => { try { const result = script.runInContext(context); - if (result && typeof result.then === "function") { - result.then(resolve).catch(reject); - } else { - resolve(result); - } + if (result && typeof result.then === "function") result.then(resolve).catch(reject); + else resolve(result); } catch (error) { reject(error); } @@ -413700,18 +393763,11 @@ async function init$2(filePath, env = {}, refresh) { if (timer) clearTimeout(timer); }); }; - const result = await executeWithTimeout(ruleScript, context, 3e4); - sandbox.rule = result; - const reqExtendScript = new vm.Script(req_extend_code); - reqExtendScript.runInContext(context); + sandbox.rule = await executeWithTimeout(ruleScript, context, 3e4); + REQ_EXTEND_SCRIPT.runInContext(context); const rule = sandbox.rule; - if (moduleExt) { - if (moduleExt.startsWith("../json")) { - rule.params = urljoin$1(env.jsonUrl, moduleExt.slice(8)); - } else { - rule.params = moduleExt; - } - } + if (moduleExt) if (moduleExt.startsWith("../json")) rule.params = urljoin$1(env.jsonUrl, moduleExt.slice(8)); + else rule.params = moduleExt; await handleTemplateInheritance(rule, context); await initParse(rule, env, vm, context); let t2 = getNowTime(); @@ -413734,21 +393790,17 @@ async function getRuleObject(filePath, env, refresh) { const fileHash = computeHash(fileContent); if (ruleObjectCache$1.has(filePath) && !refresh) { const cached = ruleObjectCache$1.get(filePath); - if (cached.hash === fileHash) { - return cached.ruleObject; - } + if (cached.hash === fileHash) return cached.ruleObject; } let t1 = getNowTime(); const { sandbox, context } = await getSandbox(env); - const js_code = await getOriginalJs(fileContent); const js_code_wrapper = ` _asyncGetRule = (async function() { - ${js_code} + ${await getOriginalJs(fileContent)} return rule; })(); `; - const ruleScript = new vm.Script(js_code_wrapper); - ruleScript.runInContext(context); + new vm.Script(js_code_wrapper).runInContext(context); sandbox.rule = await sandbox._asyncGetRule; const rule = sandbox.rule; await handleTemplateInheritance(rule, context); @@ -413775,27 +393827,22 @@ async function initJx(filePath, env, refresh) { let hashMd5 = md5$1(filePath + "#pAq#" + (Object.keys(env).length === 0 ? 0 : 1)); if (jxCache.has(hashMd5) && !refresh) { const cached = jxCache.get(hashMd5); - if (cached.hash === fileHash) { - return cached.jxObj; - } + if (cached.hash === fileHash) return cached.jxObj; } log(`[initJx] Loading jx: ${filePath}, hash:${hashMd5}`); let t1 = getNowTime(); const { sandbox, context } = await getSandbox(env); - const js_code = await getOriginalJs(fileContent); const js_code_wrapper = ` _asyncGetLazy = (async function() { - ${js_code} + ${await getOriginalJs(fileContent)} return {jx,lazy}; })(); `; - const ruleScript = new vm.Script(js_code_wrapper); - ruleScript.runInContext(context); + new vm.Script(js_code_wrapper).runInContext(context); const jxResult = await sandbox._asyncGetLazy; sandbox.lazy = jxResult.lazy; sandbox.jx = jxResult.jx; - const reqExtendScript = new vm.Script(req_extend_code); - reqExtendScript.runInContext(context); + REQ_EXTEND_SCRIPT.runInContext(context); let t2 = getNowTime(); const jxObj = { ...sandbox.jx, @@ -413837,103 +393884,72 @@ async function invokeMethod(filePath, env, method, args = [], injectVars = {}) { case "get_rule": return moduleObject; case "class_parse": injectVars = await homeParse(moduleObject, ...args); - if (!injectVars) { - return {}; - } + if (!injectVars) return {}; break; case "推荐": injectVars = await homeVodParse(moduleObject, ...args); - if (!injectVars) { - return {}; - } + if (!injectVars) return {}; break; case "一级": injectVars = await cateParse(moduleObject, ...args); - if (!injectVars) { - return {}; - } + if (!injectVars) return {}; break; case "二级": injectVars = await detailParse(moduleObject, ...args); - if (!injectVars) { - return {}; - } + if (!injectVars) return {}; break; case "搜索": injectVars = await searchParse(moduleObject, ...args); - if (!injectVars) { - return {}; - } + if (!injectVars) return {}; break; case "lazy": injectVars = await playParse(moduleObject, ...args); - if (!injectVars) { - return {}; - } + if (!injectVars) return {}; break; case "proxy_rule": injectVars = await proxyParse(moduleObject, ...args); - if (!injectVars) { - return {}; - } + if (!injectVars) return {}; break; } injectVars["method"] = method; Object.assign(injectVars, env); - if (method === "lazy" && (moduleObject[method] && typeof moduleObject[method] === "function" || !moduleObject[method])) { - return await commonLazyParse(moduleObject, method, injectVars, args); - } else if (method === "lazy" && typeof moduleObject[method] === "string" && !moduleObject[method].startsWith("js:")) { - return { - parse: 1, - url: injectVars.input, - header: moduleObject.headers && Object.keys(moduleObject.headers).length > 0 ? moduleObject.headers : undefined - }; - } else if (method === "class_parse" && !moduleObject[method]) { + if (method === "lazy" && (moduleObject[method] && typeof moduleObject[method] === "function" || !moduleObject[method])) return await commonLazyParse(moduleObject, method, injectVars, args); + else if (method === "lazy" && typeof moduleObject[method] === "string" && !moduleObject[method].startsWith("js:")) return { + parse: 1, + url: injectVars.input, + header: moduleObject.headers && Object.keys(moduleObject.headers).length > 0 ? moduleObject.headers : void 0 + }; + else if (method === "class_parse" && !moduleObject[method]) { const tmpClassFunction = async function() {}; return await invokeWithInjectVars(moduleObject, tmpClassFunction, injectVars, args); - } else if (method === "class_parse" && moduleObject[method] && typeof moduleObject[method] === "string") { - return await commonClassParse(moduleObject, method, injectVars, args); - } else if (moduleObject[method] && typeof moduleObject[method] === "function") { - return await invokeWithInjectVars(moduleObject, moduleObject[method], injectVars, args); - } else if (moduleObject[method] && typeof moduleObject[method] === "string" && moduleObject[method].startsWith("js:")) { + } else if (method === "class_parse" && moduleObject[method] && typeof moduleObject[method] === "string") return await commonClassParse(moduleObject, method, injectVars, args); + else if (moduleObject[method] && typeof moduleObject[method] === "function") return await invokeWithInjectVars(moduleObject, moduleObject[method], injectVars, args); + else if (moduleObject[method] && typeof moduleObject[method] === "string" && moduleObject[method].startsWith("js:")) { let result = await executeJsCodeInSandbox(moduleObject, method, injectVars, args); if (method === "lazy") { result = await playParseAfter(moduleObject, result, args[1], args[0]); let ret_str = JSON.stringify(result); log(`[invokeMethod js:] 免嗅 ${injectVars.input} 执行完毕,结果为:`, ret_str.length < 100 ? ret_str : ret_str.slice(0, 100) + "..."); - } else if (method === "二级") { - result = await detailParseAfter(result); - } else if (method === "一级") { + } else if (method === "二级") result = await detailParseAfter(result); + else if (method === "一级") { result = await cateParseAfter(moduleObject, result, args[1]); log(`[invokeMethod js:] 一级 ${injectVars.input} 执行完毕,结果为:`, JSON.stringify(result.list.slice(0, 2))); } else if (method === "搜索") { result = await searchParseAfter(moduleObject, result, args[2]); log(`[invokeMethod js:] 搜索 ${injectVars.input} 执行完毕,结果为:`, JSON.stringify(result.list.slice(0, 2))); - } else if (method === "class_parse") { - result = await homeParseAfter(result, moduleObject.类型, moduleObject.hikerListCol, moduleObject.hikerClassListCol, moduleObject.mergeList, injectVars); - } + } else if (method === "class_parse") result = await homeParseAfter(result, moduleObject.类型, moduleObject.hikerListCol, moduleObject.hikerClassListCol, moduleObject.mergeList, injectVars); return result; - } else if (method === "一级" && moduleObject[method] && typeof moduleObject[method] === "string") { - return await commonCategoryListParse(moduleObject, method, injectVars, args); - } else if (method === "搜索" && moduleObject[method] && typeof moduleObject[method] === "string") { - return await commonSearchListParse(moduleObject, method, injectVars, args); - } else if (method === "推荐" && moduleObject[method] && typeof moduleObject[method] === "string") { - return await commonHomeListParse(moduleObject, method, injectVars, args); - } else if (method === "二级" && (moduleObject[method] === "*" || moduleObject[method] && typeof moduleObject[method] === "object")) { - return await commonDetailListParse(moduleObject, method, injectVars, args); - } else { - if ([ - "推荐", - "一级", - "搜索" - ].includes(method)) { - return []; - } else if (["二级"].includes(method)) { - return {}; - } else { - throw new Error(`Method ${method} not found in module ${filePath}`); - } - } + } else if (method === "一级" && moduleObject[method] && typeof moduleObject[method] === "string") return await commonCategoryListParse(moduleObject, method, injectVars, args); + else if (method === "搜索" && moduleObject[method] && typeof moduleObject[method] === "string") return await commonSearchListParse(moduleObject, method, injectVars, args); + else if (method === "推荐" && moduleObject[method] && typeof moduleObject[method] === "string") return await commonHomeListParse(moduleObject, method, injectVars, args); + else if (method === "二级" && (moduleObject[method] === "*" || moduleObject[method] && typeof moduleObject[method] === "object")) return await commonDetailListParse(moduleObject, method, injectVars, args); + else if ([ + "推荐", + "一级", + "搜索" + ].includes(method)) return []; + else if (["二级"].includes(method)) return {}; + else throw new Error(`Method ${method} not found in module ${filePath}`); } async function initParse(rule, env, vm, context) { rule.host = (rule.host || "").rstrip("/"); @@ -413973,16 +393989,12 @@ async function initParse(rule, env, vm, context) { let u1 = rule.url.split("[")[0]; let u2 = rule.url.split("[")[1].split("]")[0]; rule.url = rule.host && rule.url ? urljoin$1(rule.host, u1) + "[" + urljoin$1(rule.host, u2) + "]" : rule.url; - } else { - rule.url = rule.host && rule.url ? urljoin$1(rule.host, rule.url) : rule.url; - } + } else rule.url = rule.host && rule.url ? urljoin$1(rule.host, rule.url) : rule.url; if (rule.searchUrl.includes("[") && rule.searchUrl.includes("]") && !rule.searchUrl.includes("#")) { let u1 = rule.searchUrl.split("[")[0]; let u2 = rule.searchUrl.split("[")[1].split("]")[0]; rule.searchUrl = rule.host && rule.searchUrl ? urljoin$1(rule.host, u1) + "[" + urljoin$1(rule.host, u2) + "]" : rule.searchUrl; - } else { - rule.searchUrl = rule.host && rule.searchUrl ? urljoin$1(rule.host, rule.searchUrl) : rule.searchUrl; - } + } else rule.searchUrl = rule.host && rule.searchUrl ? urljoin$1(rule.host, rule.searchUrl) : rule.searchUrl; rule.timeout = rule.timeout || 5e3; rule.encoding = rule.编码 || rule.encoding || "utf-8"; rule.search_encoding = rule.搜索编码 || rule.search_encoding || ""; @@ -413991,86 +394003,59 @@ async function initParse(rule, env, vm, context) { rule.play_json = rule.hasOwnProperty("play_json") ? rule.play_json : []; rule.pagecount = rule.hasOwnProperty("pagecount") ? rule.pagecount : {}; rule.proxy_rule = rule.hasOwnProperty("proxy_rule") ? rule.proxy_rule : ""; - if (!rule.hasOwnProperty("sniffer")) { - rule.sniffer = false; - } - if (!rule.hasOwnProperty("mergeList") && rule.二级 === "*") { - rule.mergeList = 1; - } + if (!rule.hasOwnProperty("sniffer")) rule.sniffer = false; + if (!rule.hasOwnProperty("mergeList") && rule.二级 === "*") rule.mergeList = 1; rule.sniffer = rule.hasOwnProperty("sniffer") ? rule.sniffer : ""; rule.sniffer = !!(rule.sniffer && rule.sniffer !== "0" && rule.sniffer !== "false"); rule.isVideo = rule.hasOwnProperty("isVideo") ? rule.isVideo : ""; - if (rule.sniffer && !rule.isVideo) { - rule.isVideo = "http((?!http).){12,}?\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)\\?.*|http((?!http).){12,}\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)|http((?!http).)*?video/tos*|http((?!http).)*?obj/tos*"; - } + if (rule.sniffer && !rule.isVideo) rule.isVideo = "http((?!http).){12,}?\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)\\?.*|http((?!http).){12,}\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)|http((?!http).)*?video/tos*|http((?!http).)*?obj/tos*"; rule.tab_remove = rule.hasOwnProperty("tab_remove") ? rule.tab_remove : []; rule.tab_order = rule.hasOwnProperty("tab_order") ? rule.tab_order : []; rule.tab_rename = rule.hasOwnProperty("tab_rename") ? rule.tab_rename : {}; - if (rule.headers && typeof rule.headers === "object") { - try { - let header_keys = Object.keys(rule.headers); - for (let k of header_keys) { - if (k.toLowerCase() === "user-agent") { - let v = rule.headers[k]; - if ([ - "MOBILE_UA", - "PC_UA", - "UC_UA", - "IOS_UA", - "UA" - ].includes(v)) { - rule.headers[k] = eval(v); - log("[initParse]", rule.headers[k]); - } - } else if (k.toLowerCase() === "cookie") { - let v = rule.headers[k]; - if (v && v.startsWith("http")) { - try { - v = await request(v, { headers: rule.headers || {} }); - rule.headers[k] = v; - } catch (e) { - log(`[initParse] 从${v}获取cookie发生错误:${e.message}`); - } - } - } + if (rule.headers && typeof rule.headers === "object") try { + let header_keys = Object.keys(rule.headers); + for (let k of header_keys) if (k.toLowerCase() === "user-agent") { + let v = rule.headers[k]; + if ([ + "MOBILE_UA", + "PC_UA", + "UC_UA", + "IOS_UA", + "UA" + ].includes(v)) { + rule.headers[k] = eval(v); + log("[initParse]", rule.headers[k]); + } + } else if (k.toLowerCase() === "cookie") { + let v = rule.headers[k]; + if (v && v.startsWith("http")) try { + v = await request(v, { headers: rule.headers || {} }); + rule.headers[k] = v; + } catch (e) { + log(`[initParse] 从${v}获取cookie发生错误:${e.message}`); } - } catch (e) { - log(`[initParse] 处理headers发生错误:${e.message}`); } - } else { - rule.headers = {}; + } catch (e) { + log(`[initParse] 处理headers发生错误:${e.message}`); } + else rule.headers = {}; rule.oheaders = deepCopy(rule.headers); rule.rule_fetch_params = { "headers": rule.headers, "timeout": rule.timeout, "encoding": rule.encoding }; - const originalScript = new vm.Script(` -globalThis.oheaders = rule.oheaders -globalThis.rule_fetch_params = rule.rule_fetch_params; - `); - originalScript.runInContext(context); + INIT_HEADERS_SCRIPT.runInContext(context); if (typeof rule.预处理 === "function") { log("[initParse] Executing 预处理..."); await rule.预处理(env); } - const otherScript = new vm.Script(` -globalThis.jsp = new jsoup(rule.host||''); -globalThis.pdfh = pdfh; -globalThis.pd = pd; -globalThis.pdfa = pdfa; -globalThis.HOST = rule.host||''; - `); - otherScript.runInContext(context); + INIT_JSOUP_SCRIPT.runInContext(context); return rule; } async function home$2(filePath, env, filter = 1) { const moduleObject = await init$2(filePath, env); - if (moduleObject.class_parse && typeof moduleObject.class_parse === "string") { - const sessionKey = md5$1(filePath + JSON.stringify(env)); - clearPageRequestCache(sessionKey, "home", moduleObject.host); - } + if (moduleObject.class_parse && typeof moduleObject.class_parse === "string") clearPageRequestCache(md5$1(filePath + JSON.stringify(env)), "home", moduleObject.host); return await invokeMethod(filePath, env, "class_parse", [filter], { input: "$.homeUrl", MY_URL: "$.homeUrl" @@ -414078,10 +394063,7 @@ async function home$2(filePath, env, filter = 1) { } async function homeVod$2(filePath, env) { const moduleObject = await init$2(filePath, env); - if (moduleObject["推荐"] && typeof moduleObject["推荐"] === "string") { - const sessionKey = md5$1(filePath + JSON.stringify(env)); - clearPageRequestCache(sessionKey, "homeVod", moduleObject.host); - } + if (moduleObject["推荐"] && typeof moduleObject["推荐"] === "string") clearPageRequestCache(md5$1(filePath + JSON.stringify(env)), "homeVod", moduleObject.host); return await invokeMethod(filePath, env, "推荐", [], { input: "$.homeUrl", MY_URL: "$.homeUrl" @@ -414155,10 +394137,7 @@ async function getRule$2(filePath, env) { async function jx(filePath, env, params) { params = params || {}; try { - const jxObj = await initJx(filePath, env); - const lazy = await jxObj.lazy; - const result = await lazy(params.url || "", params); - return result; + return await (await (await initJx(filePath, env)).lazy)(params.url || "", params); } catch (e) { return { code: 404, @@ -414170,8 +394149,7 @@ async function jx(filePath, env, params) { } async function getJx(filePath) { try { - const jxObj = await initJx(filePath, {}); - return jxObj; + return await initJx(filePath, {}); } catch (e) { return { code: 403, @@ -414200,52 +394178,50 @@ async function runMain(main_func_code, arg) { function clearAllCache() { const excludeList = ["APP模板配置"]; let clearedCount = 0; + const moduleKeysToDelete = []; for (const [key, value] of moduleCache$2.entries()) { let shouldSkip = false; - for (const excludeName of excludeList) { - if (value.moduleObject && value.moduleObject.title && value.moduleObject.title.includes(excludeName)) { - log(`[clearAllCache] 跳过清理模块缓存: ${value.moduleObject.title}`); - shouldSkip = true; - break; - } - } - if (!shouldSkip) { - moduleCache$2.delete(key); - clearedCount++; + for (const excludeName of excludeList) if (value.moduleObject && value.moduleObject.title && value.moduleObject.title.includes(excludeName)) { + log(`[clearAllCache] 跳过清理模块缓存: ${value.moduleObject.title}`); + shouldSkip = true; + break; } + if (!shouldSkip) moduleKeysToDelete.push(key); } + moduleKeysToDelete.forEach((key) => { + moduleCache$2.delete(key); + clearedCount++; + }); + const ruleKeysToDelete = []; for (const [filePath, value] of ruleObjectCache$1.entries()) { let shouldSkip = false; - for (const excludeName of excludeList) { - if (filePath.includes(excludeName)) { - log(`[clearAllCache] 跳过清理规则缓存: ${filePath}`); - shouldSkip = true; - break; - } - } - if (!shouldSkip) { - ruleObjectCache$1.delete(filePath); - clearedCount++; + for (const excludeName of excludeList) if (filePath.includes(excludeName)) { + log(`[clearAllCache] 跳过清理规则缓存: ${filePath}`); + shouldSkip = true; + break; } + if (!shouldSkip) ruleKeysToDelete.push(filePath); } + ruleKeysToDelete.forEach((key) => { + ruleObjectCache$1.delete(key); + clearedCount++; + }); + const jxKeysToDelete = []; for (const [key, value] of jxCache.entries()) { let shouldSkip = false; - for (const excludeName of excludeList) { - if (key.includes(excludeName)) { - log(`[clearAllCache] 跳过清理解析缓存: ${key}`); - shouldSkip = true; - break; - } - } - if (!shouldSkip) { - jxCache.delete(key); - clearedCount++; + for (const excludeName of excludeList) if (key.includes(excludeName)) { + log(`[clearAllCache] 跳过清理解析缓存: ${key}`); + shouldSkip = true; + break; } + if (!shouldSkip) jxKeysToDelete.push(key); } + jxKeysToDelete.forEach((key) => { + jxCache.delete(key); + clearedCount++; + }); pageRequestCache.clear(); log("[clearAllCache] 已清理页面请求缓存"); - currentSessionId = null; - sessionCacheCleared = false; sessionCacheStates.clear(); log("[clearAllCache] 重置会话状态"); log(`[clearAllCache] 已清理 ${clearedCount} 个模块缓存,排除了 ${excludeList.join(", ")} 相关缓存`); @@ -414261,26 +394237,17 @@ function clearPageRequestCache(sessionKey = null, sessionType = "unknown", host if (!sessionKey) { pageRequestCache.clear(); sessionCacheStates.clear(); - sessionCacheCleared = false; log("[clearPageRequestCache] 强制清理所有缓存"); return; } const sessionCacheKey = `${sessionKey}:${host}`; - const isSessionCleared = sessionCacheStates.get(sessionCacheKey); - if (!isSessionCleared) { + if (!sessionCacheStates.get(sessionCacheKey)) { const keysToDelete = []; - for (const [cacheKey] of pageRequestCache) { - if (cacheKey.startsWith(`${host}:`)) { - keysToDelete.push(cacheKey); - } - } + for (const [cacheKey] of pageRequestCache) if (cacheKey.startsWith(`${host}:`)) keysToDelete.push(cacheKey); keysToDelete.forEach((key) => pageRequestCache.delete(key)); sessionCacheStates.set(sessionCacheKey, true); - currentSessionId = sessionKey; - sessionCacheCleared = true; - lastClearTime = Date.now(); log(`[clearPageRequestCache] ${sessionType}会话开始,清理${keysToDelete.length}个${host}的缓存项: ${sessionKey}`); - } else {} + } } /** * 处理模板继承逻辑 @@ -414290,130 +394257,39 @@ function clearPageRequestCache(sessionKey = null, sessionType = "unknown", host async function handleTemplateInheritance(rule, context) { try { const muban = template$1.getMubans(); - if (rule["模板"] === "自动") { - try { - let host_headers = rule["headers"] || {}; - const cacheKey = md5$1(rule.host + JSON.stringify(host_headers)); - log(`[handleTemplateInheritance] 请求HOST页面: ${rule.host}`); - const script = new vm.Script(` - (async function() { - try { - return await cachedRequest(request, '${rule.host}', ${JSON.stringify({ headers: host_headers })}, 'host'); - } catch (e) { - log('[handleTemplateInheritance] 获取HOST页面失败:', e.message); - return ''; - } - })() - `); - let host_html = await script.runInContext(context); - let match_muban = ""; - let muban_keys = Object.keys(muban).filter((it) => !/默认|短视2|采集1/.test(it)); - for (let muban_key of muban_keys) { - try { - if (muban[muban_key].class_parse) { - let class_parse = muban[muban_key].class_parse; - const testScript = new vm.Script(` - (async function() { - try { - let html = ${JSON.stringify(host_html)}; - let p = ${JSON.stringify(class_parse)}; - let classes = []; - - // 处理class_parse字符串解析 - p = p.split(';'); - let p0 = p[0]; - let is_json = p0.startsWith('json:'); - p0 = p0.replace(/^(jsp:|json:|jq:)/, ''); - - if (html) { - let $pdfa, $pdfh, $pd; - if (is_json) { - html = dealJson(html); - $pdfa = pjfa; - $pdfh = pjfh; - $pd = pj; - } else { - $pdfa = pdfa; - $pdfh = pdfh; - $pd = pd; - } - - if (is_json) { - try { - let list = $pdfa(html, p0); - if (list && list.length > 0) { - classes = list; - } - } catch (e) { - log('[handleTemplateInheritance] json分类解析失败:' + e.message); - } - } else if (p.length >= 3) { - try { - let list = $pdfa(html, p0); - if (list && list.length > 0) { - for (const it of list) { - try { - //log('[handleTemplateInheritance] test it:',it); - let name = $pdfh(it, p[1]); - let url = $pd(it, p[2]); - if (p.length > 3 && p[3]) { - let exp = new RegExp(p[3]); - let match = url.match(exp); - if (match && match[1]) { - url = match[1]; - } - } - if (name.trim()) { - classes.push({ - 'type_id': url.trim(), - 'type_name': name.trim() - }); - } - } catch (e) { - log('[handleTemplateInheritance] 分类列表解析元素失败:' + e.message); - } - } - } - } catch (e) { - log('[handleTemplateInheritance] 分类列表解析失败:' + e.message); - } - } - } - - return { class: classes }; - } catch (e) { - log('[handleTemplateInheritance] 模板测试执行错误:', e.message); - return { class: [] }; - } - })() - `); - const host_data = await testScript.runInContext(context); - if (host_data.class && host_data.class.length > 0) { - match_muban = muban_key; - log(`[handleTemplateInheritance] 自动匹配模板:【${muban_key}】`); - break; - } - } - } catch (e) { - log(`[handleTemplateInheritance] 自动匹配模板:【${muban_key}】错误:${e.message}`); + if (rule["模板"] === "自动") try { + let host_headers = rule["headers"] || {}; + log(`[handleTemplateInheritance] 请求HOST页面: ${rule.host}`); + context._tempHost = rule.host; + context._tempHeaders = host_headers; + let host_html = await CACHED_REQUEST_SCRIPT.runInContext(context); + let match_muban = ""; + let muban_keys = Object.keys(muban).filter((it) => !/默认|短视2|采集1/.test(it)); + for (let muban_key of muban_keys) try { + if (muban[muban_key].class_parse) { + let class_parse = muban[muban_key].class_parse; + context._tempHtml = host_html; + context._tempParse = class_parse; + const host_data = await TEMPLATE_CHECK_CALL_SCRIPT.runInContext(context); + if (host_data.class && host_data.class.length > 0) { + match_muban = muban_key; + log(`[handleTemplateInheritance] 自动匹配模板:【${muban_key}】`); + break; } } - if (match_muban) { - muban["自动"] = muban[match_muban]; - } else { - delete rule["模板"]; - } } catch (e) { - log("[handleTemplateInheritance] 自动模板匹配失败:", e.message); - delete rule["模板"]; + log(`[handleTemplateInheritance] 自动匹配模板:【${muban_key}】错误:${e.message}`); } + if (match_muban) muban["自动"] = muban[match_muban]; + else delete rule["模板"]; + } catch (e) { + log("[handleTemplateInheritance] 自动模板匹配失败:", e.message); + delete rule["模板"]; } - if (rule["模板修改"] && typeof rule["模板修改"] === "function" && rule.模板 && muban.hasOwnProperty(rule.模板)) { - try { - await rule["模板修改"](muban); - } catch (e) { - log("[handleTemplateInheritance] 模板修改执行失败:", e.message); - } + if (rule["模板修改"] && typeof rule["模板修改"] === "function" && rule.模板 && muban.hasOwnProperty(rule.模板)) try { + await rule["模板修改"](muban); + } catch (e) { + log("[handleTemplateInheritance] 模板修改执行失败:", e.message); } if (rule.模板 && muban.hasOwnProperty(rule.模板)) { log("[handleTemplateInheritance] 继承模板:" + rule.模板); @@ -414423,11 +394299,14 @@ async function handleTemplateInheritance(rule, context) { } delete rule["模板"]; delete rule["模板修改"]; + delete context._tempHost; + delete context._tempHeaders; + delete context._tempHtml; + delete context._tempParse; } catch (error) { log("[handleTemplateInheritance] 模板继承处理失败:", error.message); } } - //#endregion //#region ../utils/binHelper.js /** @@ -414435,15 +394314,10 @@ async function handleTemplateInheritance(rule, context) { * @param {string} filePath 文件绝对路径 */ function ensureExecutable(filePath) { - if (process.platform === "win32") { - return; - } + if (process.platform === "win32") return; try { - if (!fs.existsSync(filePath)) { - return; - } - const stats = fs.statSync(filePath); - if (!(stats.mode & 73)) { + if (!fs.existsSync(filePath)) return; + if (!(fs.statSync(filePath).mode & 73)) { fs.chmodSync(filePath, 493); console.log(`[binHelper] 已为文件 ${filePath} 添加执行权限`); } @@ -414458,23 +394332,20 @@ function ensureExecutable(filePath) { */ function prepareBinary(binPath) { if (!binPath) return null; - if (!binPath.includes("/") && !binPath.includes("\\")) { - return binPath; - } + if (!binPath.includes("/") && !binPath.includes("\\")) return binPath; if (fs.existsSync(binPath)) { ensureExecutable(binPath); return binPath; } return null; } - //#endregion //#region ../libs/php.js const execFileAsync = promisify(execFile); const __dirname$3 = path.dirname(fileURLToPath(import.meta.url)); const _config_path$1 = path.join(__dirname$3, "../config"); const _bridge_path = path.join(__dirname$3, "../spider/php/_bridge.php"); -const moduleCache$1 = new Map(); +const moduleCache$1 = /* @__PURE__ */ new Map(); const methodMapping = { "init": "init", "home": "homeContent", @@ -414487,7 +394358,7 @@ const methodMapping = { "action": "action" }; function stringify(arg) { - if (arg === undefined) return "null"; + if (arg === void 0) return "null"; return JSON.stringify(arg); } function json2Object$1(json) { @@ -414502,15 +394373,12 @@ function json2Object$1(json) { const callPhpMethod = async (filePath, methodName, env, ...args) => { let phpPath = process.env.PHP_PATH || "php"; const validPath = prepareBinary(phpPath); - if (!validPath) { - throw new Error(`PHP executable not found or invalid: ${phpPath}`); - } + if (!validPath) throw new Error(`PHP executable not found or invalid: ${phpPath}`); phpPath = validPath; - const phpMethodName = methodMapping[methodName] || methodName; const cliArgs = [ _bridge_path, filePath, - phpMethodName, + methodMapping[methodName] || methodName, JSON.stringify(env), ...args.map(stringify) ]; @@ -414523,13 +394391,9 @@ const callPhpMethod = async (filePath, methodName, env, ...args) => { PYTHONIOENCODING: "utf-8" } }); - if (stderr) { - console.error(`PHP Stderr: ${stderr}`); - } + if (stderr) console.error(`PHP Stderr: ${stderr}`); const result = json2Object$1(stdout.trim()); - if (result && result.error) { - throw new Error(`PHP Error: ${result.error}\nTrace: ${result.traceback}`); - } + if (result && result.error) throw new Error(`PHP Error: ${result.error}\nTrace: ${result.traceback}`); return result; } catch (error) { console.error(`Error calling PHP method ${methodName}:`, error); @@ -414538,8 +394402,7 @@ const callPhpMethod = async (filePath, methodName, env, ...args) => { }; const loadEsmWithHash$1 = async function(filePath, fileHash, env) { const spiderProxy = {}; - const spiderMethods = Object.keys(methodMapping); - spiderMethods.forEach((method) => { + Object.keys(methodMapping).forEach((method) => { spiderProxy[method] = async (...args) => { return callPhpMethod(filePath, method, env, ...args); }; @@ -414548,8 +394411,7 @@ const loadEsmWithHash$1 = async function(filePath, fileHash, env) { }; const init$1 = async function(filePath, env = {}, refresh) { try { - const fileContent = await readFile(filePath, "utf-8"); - const fileHash = computeHash$1(fileContent); + const fileHash = computeHash$1(await readFile(filePath, "utf-8")); const moduleName = path.basename(filePath, ".php"); let moduleExt = env.ext || ""; let SitesMap = getSitesMap(_config_path$1); @@ -414557,14 +394419,11 @@ const init$1 = async function(filePath, env = {}, refresh) { let hashMd5 = md5$1(filePath + "#php#" + moduleExt); if (moduleCache$1.has(hashMd5) && !refresh) { const cached = moduleCache$1.get(hashMd5); - if (cached.hash === fileHash) { - return cached.moduleObject; - } + if (cached.hash === fileHash) return cached.moduleObject; } fastify.log.info(`Loading PHP module: ${filePath}`); let t1 = getNowTime$1(); - const module = await loadEsmWithHash$1(filePath, fileHash, env); - const rule = module; + const rule = await loadEsmWithHash$1(filePath, fileHash, env); const initValue = await rule.init(moduleExt) || {}; let t2 = getNowTime$1(); const moduleObject = deepCopy$1(rule); @@ -414587,37 +394446,29 @@ const getRule$1 = async function(filePath, env) { return JSON.stringify(moduleObject); }; const home$1 = async function(filePath, env, filter = 1) { - const moduleObject = await init$1(filePath, env); - return json2Object$1(await moduleObject.home(filter)); + return json2Object$1(await (await init$1(filePath, env)).home(filter)); }; const homeVod$1 = async function(filePath, env) { - const moduleObject = await init$1(filePath, env); - const homeVodResult = json2Object$1(await moduleObject.homeVod()); + const homeVodResult = json2Object$1(await (await init$1(filePath, env)).homeVod()); return homeVodResult && homeVodResult.list ? homeVodResult.list : homeVodResult; }; const category$1 = async function(filePath, env, tid, pg = 1, filter = 1, extend = {}) { - const moduleObject = await init$1(filePath, env); - return json2Object$1(await moduleObject.category(tid, pg, filter, extend)); + return json2Object$1(await (await init$1(filePath, env)).category(tid, pg, filter, extend)); }; const detail$1 = async function(filePath, env, ids) { - const moduleObject = await init$1(filePath, env); - return json2Object$1(await moduleObject.detail(ids)); + return json2Object$1(await (await init$1(filePath, env)).detail(ids)); }; const search$1 = async function(filePath, env, wd, quick = 0, pg = 1) { - const moduleObject = await init$1(filePath, env); - return json2Object$1(await moduleObject.search(wd, quick, pg)); + return json2Object$1(await (await init$1(filePath, env)).search(wd, quick, pg)); }; const play$1 = async function(filePath, env, flag, id, flags) { - const moduleObject = await init$1(filePath, env); - return json2Object$1(await moduleObject.play(flag, id, flags)); + return json2Object$1(await (await init$1(filePath, env)).play(flag, id, flags)); }; const proxy$1 = async function(filePath, env, params) { - const moduleObject = await init$1(filePath, env); - return json2Object$1(await moduleObject.proxy(params)); + return json2Object$1(await (await init$1(filePath, env)).proxy(params)); }; const action$1 = async function(filePath, env, action, value) { - const moduleObject = await init$1(filePath, env); - return json2Object$1(await moduleObject.action(action, value)); + return json2Object$1(await (await init$1(filePath, env)).action(action, value)); }; var php_default = { getRule: getRule$1, @@ -414631,36 +394482,28 @@ var php_default = { proxy: proxy$1, action: action$1 }; - //#endregion //#region ../libs/catvod.js -const moduleCache = new Map(); -const ruleObjectCache = new Map(); +const moduleCache = /* @__PURE__ */ new Map(); +const ruleObjectCache = /* @__PURE__ */ new Map(); const __dirname$2 = path.dirname(fileURLToPath(import.meta.url)); const _data_path = path.join(__dirname$2, "../data"); const _config_path = path.join(__dirname$2, "../config"); const _lib_path = path.join(__dirname$2, "../spider/catvod"); const enable_cat_debug = Number(process.env.CAT_DEBUG) !== 2; const json2Object = function(json) { - if (!json) { - return {}; - } else if (json && typeof json === "object") { - return json; - } + if (!json) return {}; + else if (json && typeof json === "object") return json; return JSON.parse(json); }; const loadEsmWithHash = async function(filePath, fileHash, env) { - const scriptUrl = `${pathToFileURL(filePath).href}?v=${fileHash}`; - const module = await import(scriptUrl); + const module = await import(`${pathToFileURL(filePath).href}?v=${fileHash}`); const initEnv = module.initEnv; - if (typeof initEnv === "function" && env) { - initEnv(env); - } + if (typeof initEnv === "function" && env) initEnv(env); return module; }; const loadEsmWithEnv = async function(filePath, env) { - const rawCode = await readFile(filePath, "utf8"); - let injectedCode = rawCode; + let injectedCode = await readFile(filePath, "utf8"); const esm_flag1 = "export function __jsEvalReturn"; const esm_flag2 = "export default"; const polyfill_code = ` @@ -414674,17 +394517,11 @@ export function initEnv(env){ getProxy=env.getProxyUrl } }`.trim() + "\n"; - if (injectedCode.includes(esm_flag1)) { - injectedCode = injectedCode.replace(esm_flag1, `${polyfill_code}${esm_flag1}`); - } else if (injectedCode.includes("export default")) { - injectedCode = injectedCode.replace(esm_flag2, `${polyfill_code}${esm_flag2}`); - } - const dataUri = `data:text/javascript;base64,${Buffer.from(injectedCode).toString("base64")}`; - const module = await import(dataUri); + if (injectedCode.includes(esm_flag1)) injectedCode = injectedCode.replace(esm_flag1, `${polyfill_code}${esm_flag1}`); + else if (injectedCode.includes("export default")) injectedCode = injectedCode.replace(esm_flag2, `${polyfill_code}${esm_flag2}`); + const module = await import(`data:text/javascript;base64,${Buffer.from(injectedCode).toString("base64")}`); const initEnv = module.initEnv; - if (typeof initEnv === "function" && env) { - initEnv(env); - } + if (typeof initEnv === "function" && env) initEnv(env); return module; }; const getRule = async function(filePath, env) { @@ -414693,8 +394530,7 @@ const getRule = async function(filePath, env) { }; const init = async function(filePath, env = {}, refresh) { try { - const fileContent = await readFile(filePath, "utf-8"); - const fileHash = computeHash$1(fileContent); + const fileHash = computeHash$1(await readFile(filePath, "utf-8")); const moduleName = path.basename(filePath, ".js"); let moduleExt = env.ext || ""; const default_init_cfg = { @@ -414711,36 +394547,24 @@ const init = async function(filePath, env = {}, refresh) { log(`[${moduleName}] ungzip解密moduleExt失败: ${e.message}`); } log(`[${moduleName}] moduleExt:`, moduleExt); - if (!SitesMap[moduleName].find((i) => i.queryStr === moduleExt) && !SitesMap[moduleName].find((i) => i.queryObject.params === moduleExt)) { - throw new Error("moduleExt is wrong!"); - } - if (moduleExt.startsWith("../json")) { - moduleExt = urljoin$2(env.jsonUrl, moduleExt.slice(8)); - } + if (!SitesMap[moduleName].find((i) => i.queryStr === moduleExt) && !SitesMap[moduleName].find((i) => i.queryObject.params === moduleExt)) throw new Error("moduleExt is wrong!"); + if (moduleExt.startsWith("../json")) moduleExt = urljoin$2(env.jsonUrl, moduleExt.slice(8)); default_init_cfg.ext = moduleExt; } let hashMd5 = md5$1(filePath + "#pAq#" + moduleExt); if (moduleCache.has(hashMd5) && !refresh) { const cached = moduleCache.get(hashMd5); - if (cached.hash === fileHash && cached.proxyUrl === env.proxyUrl) { - return cached.moduleObject; - } + if (cached.hash === fileHash && cached.proxyUrl === env.proxyUrl) return cached.moduleObject; } log(`Loading module: ${filePath}`); let t1 = getNowTime$1(); let module; - if (enable_cat_debug) { - module = await loadEsmWithHash(filePath, fileHash, env); - } else { - module = await loadEsmWithEnv(filePath, env); - } + if (enable_cat_debug) module = await loadEsmWithHash(filePath, fileHash, env); + else module = await loadEsmWithEnv(filePath, env); let rule; - if (module && module.__jsEvalReturn && typeof module.__jsEvalReturn === "function") { - rule = module.__jsEvalReturn(); - } else { - rule = module.default || module; - } - await rule.init(default_init_cfg); + if (module && module.__jsEvalReturn && typeof module.__jsEvalReturn === "function") rule = module.__jsEvalReturn(); + else rule = module.default || module; + if (typeof rule.init === "function") await rule.init(default_init_cfg); let t2 = getNowTime$1(); const moduleObject = deepCopy$1(rule); moduleObject.cost = t2 - t1; @@ -414756,8 +394580,7 @@ const init = async function(filePath, env = {}, refresh) { } }; const home = async function(filePath, env, filter = 1) { - const moduleObject = await init(filePath, env); - return json2Object(await moduleObject.home(filter)); + return json2Object(await (await init(filePath, env)).home(filter)); }; const homeVod = async function(filePath, env) { const moduleObject = await init(filePath, env); @@ -414770,35 +394593,27 @@ const homeVod = async function(filePath, env) { } }; const category = async function(filePath, env, tid, pg = 1, filter = 1, extend = {}) { - const moduleObject = await init(filePath, env); - return json2Object(await moduleObject.category(tid, pg, filter, extend)); + return json2Object(await (await init(filePath, env)).category(tid, pg, filter, extend)); }; const detail = async function(filePath, env, ids) { const moduleObject = await init(filePath, env); const vod_id = Array.isArray(ids) ? ids[0] : ids; let detailResult = "{}"; - if (moduleObject.detailContent) { - detailResult = await moduleObject.detailContent(ids); - } else { - detailResult = await moduleObject.detail(vod_id); - } + if (moduleObject.detailContent) detailResult = await moduleObject.detailContent(ids); + else detailResult = await moduleObject.detail(vod_id); return json2Object(detailResult); }; const search = async function(filePath, env, wd, quick = 0, pg = 1) { - const moduleObject = await init(filePath, env); - return json2Object(await moduleObject.search(wd, quick, pg)); + return json2Object(await (await init(filePath, env)).search(wd, quick, pg)); }; const play = async function(filePath, env, flag, id, flags) { - const moduleObject = await init(filePath, env); - return json2Object(await moduleObject.play(flag, id, flags)); + return json2Object(await (await init(filePath, env)).play(flag, id, flags)); }; const proxy = async function(filePath, env, params) { - const moduleObject = await init(filePath, env); - return json2Object(await moduleObject.proxy(params)); + return json2Object(await (await init(filePath, env)).proxy(params)); }; const action = async function(filePath, env, action, value) { - const moduleObject = await init(filePath, env); - return json2Object(await moduleObject.action(action, value)); + return json2Object(await (await init(filePath, env)).action(action, value)); }; var catvod_default = { getRule, @@ -414812,9 +394627,13 @@ var catvod_default = { proxy, action }; - //#endregion //#region localDsCore.js +const ENGINES = { + drpyS: drpyS_exports, + php: php_default, + catvod: catvod_default +}; const __dirname$1 = path.dirname(fileURLToPath(import.meta.url)); const isBundled = __dirname$1.endsWith("dist") || __dirname$1.endsWith("libs") || __dirname$1.endsWith("dist" + path.sep) || __dirname$1.endsWith("libs" + path.sep); const possibleRoots = [ @@ -414843,15 +394662,29 @@ const options = { catDir, catLibDir }; +startJsonWatcher(ENGINES, jsonDir); /** -* 支持的引擎映射表 -* 包含drpyS、php、catvod +* 创建带超时的Promise包装函数 +* 为API操作添加超时控制,防止长时间阻塞 +* +* @param {Promise} promise - 要包装的Promise对象 +* @param {number|null} timeoutMs - 超时时间(毫秒),null则使用默认值 +* @param {string} operation - 操作描述,用于错误信息 +* @param {string|null} invokeMethod - 调用方法类型,用于确定超时时间 +* @returns {Promise} 包装后的Promise,会在超时时reject */ -const ENGINES = { - drpyS: drpyS_exports, - php: php_default, - catvod: catvod_default -}; +function withTimeout(promise, timeoutMs = null, operation = "API操作", invokeMethod = null) { + let defaultTimeout; + if (invokeMethod === "action") defaultTimeout = 60 * 1e3; + else defaultTimeout = 20 * 1e3; + const actualTimeout = timeoutMs || defaultTimeout; + return Promise.race([promise, new Promise((_, reject) => { + const timer = setTimeout(() => { + reject(/* @__PURE__ */ new Error(`${operation}超时 (${actualTimeout}ms)`)); + }, actualTimeout); + if (timer.unref) timer.unref(); + })]); +} async function getEngine(moduleName, query, inject_env) { inject_env = inject_env || {}; let { apiEngine, moduleDir, _ext, modulePath } = getApiEngine(ENGINES, moduleName, query, options); @@ -414869,7 +394702,7 @@ async function getEngine(moduleName, query, inject_env) { * @returns {Object} 环境对象,包含各种URL和配置 */ function getEnv(moduleName) { - const { jsonUrl = "http://127.0.0.1:9978/json", publicUrl = "http://127.0.0.1:9978/public", requestHost = "http://127.0.0.1:9978", hostname = "127.0.0.1:9978", hostUrl = "127.0.0.1", proxyUrl = `http://127.0.0.1:9978/proxy?do=node&siteKey=${moduleName}`, httpUrl, imageApi, mediaProxyUrl, webdavProxyUrl, ftpProxyUrl, wsName, fServer } = inject_env; + const { jsonUrl = "http://127.0.0.1:9978/file/drpy-node/json/", publicUrl = "http://127.0.0.1:9978/file/drpy-node/public/", requestHost = "http://127.0.0.1:9978", hostname = "127.0.0.1:9978", hostUrl = "127.0.0.1", proxyUrl = `http://127.0.0.1:9978/proxy?do=node&siteKey=${moduleName}`, proxyPath, httpUrl, imageApi, mediaProxyUrl, webdavProxyUrl, ftpProxyUrl, wsName, fServer } = inject_env; const getProxyUrl = function() { return proxyUrl; }; @@ -414887,6 +394720,7 @@ async function getEngine(moduleName, query, inject_env) { requestHost, hostname, proxyUrl, + proxyPath, getProxyUrl, ext: moduleExt, moduleName @@ -414902,11 +394736,9 @@ async function getEngine(moduleName, query, inject_env) { */ env.getRule = async function(_moduleName) { const _modulePath = path.join(moduleDir, `${_moduleName}${_ext}`); - if (!existsSync(_modulePath)) { - return null; - } + if (!existsSync(_modulePath)) return null; const _env = getEnv(_moduleName); - const RULE = await apiEngine.getRule(_modulePath, _env); + const RULE = await withTimeout(apiEngine.getRule(_modulePath, _env), null, `获取规则[${_moduleName}]`); /** * 规则函数调用方法 * 提供统一的规则方法调用接口 @@ -414943,71 +394775,83 @@ async function getEngine(moduleName, query, inject_env) { invokeMethod = "action"; break; } - if (!invokeMethod) { - if (typeof RULE[_method] !== "function") { - return null; - } else { - return await RULE[_method](..._args); - } - } - return await apiEngine[invokeMethod](_modulePath, _env, ..._args); + if (!invokeMethod) if (typeof RULE[_method] !== "function") return null; + else return await withTimeout(RULE[_method], null, `规则方法[${_method}]`); + return await withTimeout(apiEngine[invokeMethod](_modulePath, _env, ..._args), null, `规则调用[${_method}]`, invokeMethod); }; return RULE; }; const pg = Number(query.pg) || 1; - if ("play" in query) { - const result = await apiEngine.play(modulePath, env, query.flag, query.play); - return result; - } + if ("play" in query) return await withTimeout(apiEngine.play(modulePath, env, query.flag, query.play), null, `播放接口[${moduleName}]`); if ("ac" in query && "t" in query) { let ext = query.ext; let extend = {}; - if (ext) { - try { - extend = ext; - } catch (e) { - console.error(`筛选参数错误:${e.message}`); - } + if (ext) try { + extend = JSON.parse(base64Decode$2(ext)); + } catch (e) { + console.error(`筛选参数错误:${e.message}`); } - const result = await apiEngine.category(modulePath, env, query.t, pg, 1, extend); - return result; - } - if ("ac" in query && "ids" in query) { - const result = await apiEngine.detail(modulePath, env, query.ids); - return result; - } - if ("ac" in query && "action" in query) { - const result = await apiEngine.action(modulePath, env, query.action, query.value); - return result; + return await withTimeout(apiEngine.category(modulePath, env, query.t, pg, 1, extend), null, `分类接口[${moduleName}]`); } + if ("ac" in query && "ids" in query) return await withTimeout(apiEngine.detail(modulePath, env, query.ids), null, `详情接口[${moduleName}]`); + if ("ac" in query && "action" in query) return await withTimeout(apiEngine.action(modulePath, env, query.action, query.value), null, `动作接口[${moduleName}]`, "action"); if ("wd" in query) { const quick = "quick" in query ? query.quick : 0; - const result = await apiEngine.search(modulePath, env, query.wd, quick, pg); - return result; - } - if ("proxy" in query) { - const result = await apiEngine.proxy(modulePath, env, query); - return result; + return await withTimeout(apiEngine.search(modulePath, env, query.wd, quick, pg), null, `搜索接口[${moduleName}]`); + } + if ("proxy" in query) return await withTimeout(apiEngine.proxy(modulePath, env, query), null, `代理接口[${moduleName}]`); + if ("parse" in query) { + let t1 = (/* @__PURE__ */ new Date()).getTime(); + const jxName = query.parse; + const backResp = await withTimeout(jx(path.join(options.jxDir, `${jxName}.js`), env, query), null, `解析接口[${jxName}]`); + const statusCode = 200; + const mediaType = "application/json; charset=utf-8"; + if (typeof backResp === "object") { + if (!backResp.code) backResp.code = backResp.url && backResp.url !== query.url ? 200 : 404; + if (!backResp.msg) backResp.msg = `${jxName}解析${backResp.url && backResp.url !== query.url ? "成功" : "失败"}`; + backResp.type = `${mediaType}; charset=utf-8`; + backResp.cost = (/* @__PURE__ */ new Date()).getTime() - t1; + let backRespSend = backResp; + console.log(backRespSend); + return backRespSend; + } else if (typeof backResp === "string") { + let statusCode = backResp && backResp !== query.url ? 200 : 404; + let msgState = backResp && backResp !== query.url ? "成功" : "失败"; + let t2 = (/* @__PURE__ */ new Date()).getTime(); + let backRespSend = { + code: statusCode, + url: backResp, + msg: `${jxName}解析${msgState}`, + cost: t2 - t1, + type: `${mediaType}; charset=utf-8` + }; + console.log(backRespSend); + return backRespSend; + } else { + let t2 = (/* @__PURE__ */ new Date()).getTime(); + let backRespSend = { + code: 404, + url: "", + msg: `${jxName}解析失败`, + cost: t2 - t1, + type: `${mediaType}; charset=utf-8` + }; + console.log(backRespSend); + return backRespSend; + } } if ("refresh" in query) { - const refreshedObject = await apiEngine.init(modulePath, env, true); - const { context, ...responseObject } = refreshedObject; + const { context, ...responseObject } = await withTimeout(apiEngine.init(modulePath, env, true), null, `初始化接口[${moduleName}]`); return responseObject; } - if (!("filter" in query)) { - query.filter = 1; - } + if (!("filter" in query)) query.filter = 1; const filter = "filter" in query ? query.filter : 1; - const resultHome = await apiEngine.home(modulePath, env, filter); - const resultHomeVod = await apiEngine.homeVod(modulePath, env); + const resultHome = await withTimeout(apiEngine.home(modulePath, env, filter), null, `首页接口[${moduleName}]`); + const resultHomeVod = await withTimeout(apiEngine.homeVod(modulePath, env), null, `推荐接口[${moduleName}]`); let result = { ...resultHome }; - if (Array.isArray(resultHomeVod) && resultHomeVod.length > 0) { - Object.assign(result, { list: resultHomeVod }); - } + if (Array.isArray(resultHomeVod) && resultHomeVod.length > 0) Object.assign(result, { list: resultHomeVod }); return result; } -; global.getEngine = getEngine; - //#endregion -export { }; \ No newline at end of file +export {}; diff --git a/drpy-node-bundle/localDsCore.js b/drpy-node-bundle/localDsCore.js index 7ce732ff..db53f075 100644 --- a/drpy-node-bundle/localDsCore.js +++ b/drpy-node-bundle/localDsCore.js @@ -1,12 +1,19 @@ import path from 'path'; import {fileURLToPath} from 'url'; import {existsSync} from 'fs'; -//import {md5, base64Decode} from './libs_drpy/crypto-util.js'; +import {base64Decode} from '../libs_drpy/crypto-util.js'; import {startJsonWatcher, getApiEngine} from "../utils/api_helper.js"; import * as drpyS from '../libs/drpyS.js'; import php from '../libs/php.js'; import catvod from '../libs/catvod.js'; +// 初始化API引擎集合 +const ENGINES = { + drpyS, + php, + catvod, +}; + const __dirname = path.dirname(fileURLToPath(import.meta.url)); // Determine if we are running from the dist/libs directory (bundled) or source @@ -42,20 +49,49 @@ const options = { catDir, catLibDir, }; -/** - * 支持的引擎映射表 - * 包含drpyS、php、catvod - */ -const ENGINES = { - drpyS, - php, - catvod, -}; + +// 启动JSON文件监听器 (仅在开发环境下生效) +startJsonWatcher(ENGINES, jsonDir); //const query = { // do: 'ds', // pg: 1, // extend: '', //}; +/** + * 创建带超时的Promise包装函数 + * 为API操作添加超时控制,防止长时间阻塞 + * + * @param {Promise} promise - 要包装的Promise对象 + * @param {number|null} timeoutMs - 超时时间(毫秒),null则使用默认值 + * @param {string} operation - 操作描述,用于错误信息 + * @param {string|null} invokeMethod - 调用方法类型,用于确定超时时间 + * @returns {Promise} 包装后的Promise,会在超时时reject + */ +function withTimeout(promise, timeoutMs = null, operation = 'API操作', invokeMethod = null) { + let defaultTimeout; + + // 根据invokeMethod确定超时时间 + if (invokeMethod === 'action') { + // action接口使用专用超时时间,默认60秒 + defaultTimeout = 60 * 1000; + } else { + // 其他接口使用默认超时时间,默认20秒 + defaultTimeout = 20 * 1000; + } + + const actualTimeout = timeoutMs || defaultTimeout; + + return Promise.race([ + promise, + new Promise((_, reject) => { + const timer = setTimeout(() => { + reject(new Error(`${operation}超时 (${actualTimeout}ms)`)); + }, actualTimeout); + if (timer.unref) timer.unref(); + }) + ]); +} + async function getEngine(moduleName, query, inject_env) { // 壳子可以注入环境变量,内部自行构造env inject_env = inject_env || {}; @@ -82,13 +118,13 @@ async function getEngine(moduleName, query, inject_env) { function getEnv(moduleName) { // const proxyUrl = inject_env.proxyUrl || "http://127.0.0.1:9978/proxy?do=node"; const { - jsonUrl = "http://127.0.0.1:9978/json", - publicUrl = "http://127.0.0.1:9978/public", + jsonUrl = "http://127.0.0.1:9978/file/drpy-node/json/", + publicUrl = "http://127.0.0.1:9978/file/drpy-node/public/", requestHost = "http://127.0.0.1:9978", hostname = "127.0.0.1:9978", hostUrl = "127.0.0.1", proxyUrl = `http://127.0.0.1:9978/proxy?do=node&siteKey=${moduleName}`, - httpUrl, imageApi, mediaProxyUrl, webdavProxyUrl, ftpProxyUrl, + proxyPath, httpUrl, imageApi, mediaProxyUrl, webdavProxyUrl, ftpProxyUrl, wsName, fServer, } = inject_env; const getProxyUrl = function () { @@ -109,6 +145,7 @@ async function getEngine(moduleName, query, inject_env) { requestHost, hostname, proxyUrl, + proxyPath, // 代理路径 getProxyUrl, ext: moduleExt, moduleName: moduleName, @@ -130,7 +167,7 @@ async function getEngine(moduleName, query, inject_env) { return null; } const _env = getEnv(_moduleName); - const RULE = await apiEngine.getRule(_modulePath, _env); + const RULE = await withTimeout(apiEngine.getRule(_modulePath, _env), null, `获取规则[${_moduleName}]`); /** * 规则函数调用方法 @@ -176,12 +213,21 @@ async function getEngine(moduleName, query, inject_env) { if (typeof RULE[_method] !== 'function') { return null } else { - return await RULE[_method](..._args); + return await withTimeout( + RULE[_method], + null, + `规则方法[${_method}]` + ) } } // 调用映射后的标准接口 - return await apiEngine[invokeMethod](_modulePath, _env, ..._args); + return await withTimeout( + apiEngine[invokeMethod](_modulePath, _env, ..._args), + null, + `规则调用[${_method}]`, + invokeMethod + ) }; return RULE }; @@ -194,7 +240,11 @@ async function getEngine(moduleName, query, inject_env) { // 处理播放逻辑 if ('play' in query) { - const result = await apiEngine.play(modulePath, env, query.flag, query.play); + const result = await withTimeout( + apiEngine.play(modulePath, env, query.flag, query.play), + null, + `播放接口[${moduleName}]` + ); return result; } @@ -206,45 +256,142 @@ async function getEngine(moduleName, query, inject_env) { // 解析筛选参数 if (ext) { try { - extend = ext; + extend = JSON.parse(base64Decode(ext)) } catch (e) { console.error(`筛选参数错误:${e.message}`); } } - const result = await apiEngine.category(modulePath, env, query.t, pg, 1, extend); + const result = await withTimeout( + apiEngine.category(modulePath, env, query.t, pg, 1, extend), + null, + `分类接口[${moduleName}]` + ); return result; } // 处理详情逻辑 if ('ac' in query && 'ids' in query) { - const result = await apiEngine.detail(modulePath, env, query.ids); + const result = await withTimeout( + apiEngine.detail(modulePath, env, query.ids), + null, + `详情接口[${moduleName}]` + ); return result; } // 处理动作逻辑 if ('ac' in query && 'action' in query) { - const result = await apiEngine.action(modulePath, env, query.action, query.value); + const result = await withTimeout( + apiEngine.action(modulePath, env, query.action, query.value), + null, + `动作接口[${moduleName}]`, + 'action' + ); return result; } // 处理搜索逻辑 if ('wd' in query) { const quick = 'quick' in query ? query.quick : 0; - const result = await apiEngine.search(modulePath, env, query.wd, quick, pg); + const result = await withTimeout( + apiEngine.search(modulePath, env, query.wd, quick, pg), + null, + `搜索接口[${moduleName}]` + ); return result; } // 处理代理逻辑 if ('proxy' in query) { // return [200, 'text/plain', 'hello world', {'User-Agent':'okhttp/3.11'}, 0]; - const result = await apiEngine.proxy(modulePath, env, query); - return result; + const backRespList = await withTimeout( + apiEngine.proxy(modulePath, env, query), + null, + `代理接口[${moduleName}]` + ); + return backRespList; + } + + // 处理解析逻辑 + if ('parse' in query) { + let t1 = (new Date()).getTime(); // 记录开始时间 + // 构建解析器文件路径 + const jxName = query.parse; + const jxPath = path.join(options.jxDir, `${jxName}.js`); + const backResp = await withTimeout( + drpyS.jx(jxPath, env, query), + null, + `解析接口[${jxName}]` + ); + + const statusCode = 200; + const mediaType = 'application/json; charset=utf-8'; + + // 处理对象类型的响应 + if (typeof backResp === 'object') { + // 设置默认的状态码 + if (!backResp.code) { + let statusCode = backResp.url && backResp.url !== query.url ? 200 : 404; + backResp.code = statusCode + } + + // 设置默认的消息 + if (!backResp.msg) { + let msgState = backResp.url && backResp.url !== query.url ? '成功' : '失败'; + backResp.msg = `${jxName}解析${msgState}`; + } + + backResp.type = `${mediaType}; charset=utf-8`; + // 计算耗时 + let t2 = (new Date()).getTime(); + backResp.cost = t2 - t1; + let backRespSend = backResp; + console.log(backRespSend); + return backRespSend; + } + // 处理字符串类型的响应 + else if (typeof backResp === 'string') { + // 构建标准响应格式 + let statusCode = backResp && backResp !== query.url ? 200 : 404; + let msgState = backResp && backResp !== query.url ? '成功' : '失败'; + let t2 = (new Date()).getTime(); + + let result = { + code: statusCode, + url: backResp, + msg: `${jxName}解析${msgState}`, + cost: t2 - t1, + type: `${mediaType}; charset=utf-8` + } + + let backRespSend = result; + console.log(backRespSend); + return backRespSend; + } else { + // 其他类型的响应,返回失败 + let t2 = (new Date()).getTime(); + + let result = { + code: 404, + url: "", + msg: `${jxName}解析失败`, + cost: t2 - t1, + type: `${mediaType}; charset=utf-8` + } + let backRespSend = result; + console.log(backRespSend); + return backRespSend; + } } // 处理强制刷新初始化逻辑 if ('refresh' in query) { - const refreshedObject = await apiEngine.init(modulePath, env, true); + const refreshedObject = await withTimeout( + apiEngine.init(modulePath, env, true), + null, + `初始化接口[${moduleName}]` + ); const {context, ...responseObject} = refreshedObject; return responseObject; } @@ -257,10 +404,18 @@ async function getEngine(moduleName, query, inject_env) { const filter = 'filter' in query ? query.filter : 1; // 获取首页数据 - const resultHome = await apiEngine.home(modulePath, env, filter); + const resultHome = await withTimeout( + apiEngine.home(modulePath, env, filter), + null, + `首页接口[${moduleName}]` + ); // 获取推荐数据 - const resultHomeVod = await apiEngine.homeVod(modulePath, env); + const resultHomeVod = await withTimeout( + apiEngine.homeVod(modulePath, env), + null, + `推荐接口[${moduleName}]` + ); // 合并结果 let result = { diff --git a/drpy-node-bundle/localDsCoreTest.js b/drpy-node-bundle/localDsCoreTest.js index 28322583..aba50247 100644 --- a/drpy-node-bundle/localDsCoreTest.js +++ b/drpy-node-bundle/localDsCoreTest.js @@ -1,5 +1,6 @@ // import * as localtDsCore from './localDsCore.js'; import * as localtDsCore from './libs/localDsCore.bundled.js'; +const start = performance.now(); console.log(getEngine) // const a = await getEngine('爱推图[画]', {}, {proxyUrl: "xx"}) @@ -10,5 +11,24 @@ console.log(getEngine) // console.log(c) // const d = await getEngine('设置中心', {do: 'ds'}) // console.log(d) -const e = await getEngine('B站 ᵈᶻ', {do: 'php'}) -console.log(e) \ No newline at end of file +// const e = await getEngine('B站 ᵈᶻ', {do: 'php'}) +const e = await getEngine('30wMV[听]', { + do: 'ds', + // play: 'http://em.21dtv.com/songs/100093410.mkv', + parse: '_30wmv', + url: 'http://em.21dtv.com/songs/100093410.mkv', +}, {requestHost: 'http://127.0.0.1:5757'}) +// console.log(e) +const end = performance.now(); + +console.log(`耗时: ${end - start} ms`); +// process.exit(0); + +const f = await getEngine('央视大全[官]', { + do: 'ds', + proxy: 1, + url: '', +}, {requestHost: 'http://127.0.0.1:5757',proxyPath:'https://dh5wswx02.v.cntv.cn/asp/h5e/hls/2000/0303000a/3/default/b90af013c16e44de9e4f1f56dab91f63/1.ts'}) + +const [statuCode, contentType, buffer, headers] = f; +console.log('resutl: header:', headers, 'buffer length:', buffer.length); \ No newline at end of file diff --git "a/drpy-node-bundle/spider/js/30wMV[\345\220\254].js" "b/drpy-node-bundle/spider/js/30wMV[\345\220\254].js" new file mode 100644 index 00000000..dd83c31b --- /dev/null +++ "b/drpy-node-bundle/spider/js/30wMV[\345\220\254].js" @@ -0,0 +1,404 @@ +/* +@header({ + searchable: 0, + filterable: 1, + quickSearch: 0, + title: '30wMV', + lang: 'ds' +}) +*/ + +const dbName = './data/mv/song.db'; // 数据库路径 +const pageSize = 200; // 每页显示100条记录 +const fixUrl = 'http://em.21dtv.com/songs/'; +let songDb = null; + +async function dbQuery(dbName, query) { + if (!songDb) { + songDb = new DataBase(dbName); + } + await songDb.startDb(); + const db = songDb.db; + let data = await db.all(query); + await songDb.endDb(); + return data +} + +var rule = { + 类型: '搜索', + title: '30wMV', + alias: '30wMV点歌平台', + desc: 'KTV点歌源', + host: 'hiker://empty', + url: '', + searchUrl: 'hiker://empty', + headers: { + 'User-Agent': 'PC_UA', + }, + searchable: 0, + quickSearch: 0, + filterable: 1, + double: false, + play_parse: true, + limit: 100, + filter: '', + // 推荐样式 + hikerListCol: 'icon_round_2', + // 分类列表样式 + hikerClassListCol: 'avatar', + // home_flag: '3-0-S', + home_flag: '3', + // class_flag: '3-11-S', + class_flag: '1', + 预处理: async function () { + songDb = new DataBase(dbName); + }, + class_parse: async function () { + let classes = []; + classes.push({ + type_id: JSON.stringify({type: 'cate', id: 'cate'}), + type_name: '类型', + type_flag: '1' + }, { + type_id: JSON.stringify({type: 'singer', id: 'singer'}), + type_name: '歌手', + type_flag: '[CFS][CFPY]1' + }, { + type_id: JSON.stringify({type: 'song', id: 'song', name: '曲库', lname: '曲库'}), + type_name: '曲库', + type_flag: '[CFS][CFPY]1-11' + }, { + type_id: JSON.stringify({type: '华语歌手', id: '1'}), + type_name: '男歌手', + type_flag: '[CFPY][PY1][AN:喜爱歌手]2-00-S' + }, { + type_id: JSON.stringify({type: '华语歌手', id: '2'}), + type_name: '女歌手', + type_flag: '[CFPY][PY1][AN:喜爱歌手]2-00-S' + }, { + type_id: JSON.stringify({type: '华语歌手', id: '3'}), + type_name: '组合歌手', + type_flag: '[CFPY][PY1][AN:喜爱歌手]2-00-S' + }); + return { + class: classes, + filters: null, + type_flag: 1 + } + }, + + lazy: async function (flag, id, flags) { + let {requestHost} = this; + const parseObj = executeParse('_30wmv', requestHost, id); + console.log('parseObj:', parseObj); + if (parseObj[0]) { + const _data = await req(parseObj[1]); + const data = JSON.parse(_data.content); + // console.log('data:', data); + return { + parse: 0, url: data.url, header: data.header + } + } + return {parse: 0, url: id} + }, + proxy_rule: async function (params) { + return '' + }, + action: async function (action, value) { + return '' + }, + 推荐: async function () { + return [] + }, + 一级: async function (tid, pg, filter, extend) { + pg = pg || 1; + extend = extend || {}; + + const pageIndex = pg - 1; + const offset = pageIndex * pageSize; // 计算当前页的偏移量 + const cid = JSON.parse(tid); + + let videos = []; + let query = ''; + let data = []; + let cnt = 0; + if (cid.type == 'cate') { + query = "SELECT id, name, (SELECT COUNT(*) FROM song_type WHERE category_id=song_category.id) AS num FROM song_category LIMIT " + pageSize + " OFFSET " + offset; + data = await dbQuery(dbName, query); + data.forEach(it => { + videos.push({ + vod_id: JSON.stringify({type: 'type', id: it.id, name: it.name, lname: it.name}), + vod_name: it.name, + vod_remarks: it.num + '条', + vod_tag: 'folder', + vod_style: '1', + }); + }); + } else if (cid.type == 'type') { + query = "SELECT id, name, (SELECT COUNT(*) FROM song WHERE type_id=song_type.id) AS num" + + " FROM song_type" + + " WHERE category_id=" + cid.id + + " LIMIT " + pageSize + " OFFSET " + offset; + data = await dbQuery(dbName, query); + data.forEach(it => { + videos.push({ + vod_id: JSON.stringify({ + type: 'type_song', + id: it.id, + name: it.name, + lname: cid.lname + '-' + it.name + }), + vod_name: it.name, + vod_remarks: it.num + '首', + vod_tag: 'folder', + vod_style: '[CFS][CFPY]1-11', + }); + }); + } else if (cid.type == 'type_song') { + let customFilter = '1'; + let wd = ''; + if (extend.custom) { + wd = extend.custom.trim(); + const words = wd.split('-'); + if (words.length > 1) { + customFilter = "(singer_names like '%" + words[0] + "%' AND name like '%" + words[1] + "%')"; + } else { + customFilter = "(singer_names like '%" + wd + "%' OR name like '%" + wd + "%')"; + } + } else if (extend.custom_pinyin) { + wd = extend.custom_pinyin.trim(); + const words = wd.split('-'); + if (words.length > 1) { + customFilter = "(acronym like '%" + words[1] + "%' AND singer_names in (SELECT name FROM singer WHERE acronym like '%" + words[0] + "%'))"; + } else { + customFilter = "(acronym like '%" + wd + "%' OR singer_names in (SELECT name FROM singer WHERE acronym like '%" + wd + "%'))"; + } + } + query = "SELECT name, singer_names, number, format" + + " FROM song" + + " WHERE type_id=" + cid.id + " AND " + customFilter + + " ORDER BY acronym COLLATE NOCASE" + + " LIMIT " + pageSize + " OFFSET " + offset; + data = await dbQuery(dbName, query); + data.forEach(it => { + videos.push({ + vod_id: fixUrl + it.number + '.' + it.format + '#' + it.singer_names + '-' + it.name + '#' + cid.lname, + vod_name: it.name, + vod_remarks: it.singer_names, + }); + }); + if (videos.length > 1 && pg == 1) { + query = "SELECT COUNT(*) as num FROM song WHERE type_id=" + cid.id + " AND " + customFilter; + const d = await dbQuery(dbName, query); + videos.unshift({ + vod_id: JSON.stringify({ + type: 'type_song_page', + id: cid.id, + name: cid.name + (wd == '' ? '' : '-' + wd), + lname: cid.lname + (wd == '' ? '' : '-' + wd), + filter: customFilter + }), + vod_name: cid.name + (wd == '' ? '' : '-' + wd) + ' [分页]', + vod_remarks: d[0].num + '首 ' + Math.floor((d[0].num - 1) / pageSize + 1) + '页', + vod_tag: 'folder', + vod_style: '1', + }); + } + } else if (cid.type == 'type_song_page') { + if (pg == 1) { + query = "SELECT COUNT(*) as num FROM song WHERE type_id=" + cid.id + " AND " + cid.filter; + data = await dbQuery(dbName, query); + if (data.length > 0) { + for (let i = 0; i < data[0].num; i += pageSize) { + const pageNo = i / pageSize + 1; + const name = cid.lname + (data[0].num > pageSize ? ' (第' + pageNo + '页)' : ''); + videos.push({ + vod_id: 'multi_type_song#' + name + '#' + cid.id + '#' + i + '#' + cid.filter, + vod_name: '第 ' + pageNo + ' 页', + vod_remarks: (i + 1) + '~' + (data[0].num > pageNo * pageSize ? i + pageSize : data[0].num) + }); + } + } + } + } else if (cid.type == 'singer') { + let customFilter = '1'; + let wd = ''; + if (extend.custom) { + wd = extend.custom.trim(); + customFilter = "singer.name like '%" + wd + "%'"; + } else if (extend.custom_pinyin) { + wd = extend.custom_pinyin.trim(); + customFilter = "singer.acronym like '%" + wd + "%'"; + } + query = "SELECT distinct singer.name, singer_form.name as form_name, singer_region.name as region_name, (SELECT COUNT(*) FROM song WHERE singer_names=singer.name) AS num" + + " FROM singer left join singer_form on singer.form_id=singer_form.id left join singer_region on singer.region_id=singer_region.id" + + " WHERE " + customFilter + + " ORDER BY acronym COLLATE NOCASE" + + " LIMIT " + pageSize + " OFFSET " + offset; + data = await dbQuery(dbName, query); + data.forEach(it => { + videos.push({ + vod_id: 'singer#' + it.name, + vod_name: it.name, + vod_remarks: it.region_name + ' ' + it.form_name + ' ' + it.num + '首', + }); + }); + } else if (cid.type == 'song') { + let customFilter = '1'; + let wd = ''; + if (extend.custom) { + wd = extend.custom.trim(); + const words = wd.split('-'); + if (words.length > 1) { + customFilter = "(singer_names like '%" + words[0] + "%' AND name like '%" + words[1] + "%')"; + } else { + customFilter = "(singer_names like '%" + wd + "%' OR name like '%" + wd + "%')"; + } + } else if (extend.custom_pinyin) { + wd = extend.custom_pinyin.trim(); + const words = wd.split('-'); + if (words.length > 1) { + customFilter = "(acronym like '%" + words[1] + "%' AND singer_names in (SELECT name FROM singer WHERE acronym like '%" + words[0] + "%'))"; + } else { + // customFilter = "(acronym like '%" + wd + "%' OR singer_names in (SELECT name FROM singer WHERE acronym like '%" + wd + "%'))"; + customFilter = "(acronym like '%" + wd + "%')"; + } + } + query = "SELECT name, singer_names, number, format" + + " FROM song" + + " WHERE " + customFilter + + " ORDER BY acronym COLLATE NOCASE" + + " LIMIT " + pageSize + " OFFSET " + offset; + data = await dbQuery(dbName, query); + data.forEach(it => { + videos.push({ + vod_id: fixUrl + it.number + '.' + it.format + '#' + it.singer_names + '-' + it.name + '#' + cid.lname, + vod_name: it.name, + vod_remarks: it.singer_names, + }); + }); + if (videos.length > 1 && pg == 1) { + query = "SELECT COUNT(*) as num FROM song WHERE " + customFilter; + const d = await dbQuery(dbName, query); + videos.unshift({ + vod_id: JSON.stringify({ + type: 'song_page', + id: cid.id, + name: cid.name + (wd == '' ? '' : '-' + wd), + lname: cid.lname + (wd == '' ? '' : '-' + wd), + filter: customFilter + }), + vod_name: cid.name + (wd == '' ? '' : '-' + wd) + ' [分页]', + vod_remarks: d[0].num + '首 ' + Math.floor((d[0].num - 1) / pageSize + 1) + '页', + vod_tag: 'folder', + vod_style: '1', + }); + } + } else if (cid.type == 'song_page') { + if (pg == 1) { + query = "SELECT COUNT(*) as num FROM song WHERE " + cid.filter; + data = await dbQuery(dbName, query); + if (data.length > 0) { + for (let i = 0; i < data[0].num; i += pageSize) { + const pageNo = i / pageSize + 1; + const name = cid.lname + (data[0].num > pageSize ? ' (第' + pageNo + '页)' : ''); + videos.push({ + vod_id: 'multi_song#' + name + '#' + i + '#' + cid.filter, + vod_name: '第 ' + pageNo + ' 页', + vod_remarks: (i + 1) + '~' + (data[0].num > pageNo * pageSize ? i + pageSize : data[0].num) + }); + } + } + } + } else if (cid.type == '华语歌手') { + const cate = cid.id; + let letter = ''; + if (extend.custom_pinyin) { + letter = extend.custom_pinyin.substring(0, 1); + } + const url = `https://wapi.kuwo.cn/api/www/artist/artistInfo?category=${cate}&prefix=${letter}&pn=${pg}&rn=60`; + const _data = await req(url); + const data = JSON.parse(_data.content).data.artistList; + data.forEach(it => { + videos.push({ + vod_id: 'singer#' + it.name, + vod_name: it.name, + vod_pic: it.pic + }); + }); + } + return videos + }, + 二级: async function (_ids) { + const {orId} = this; + const id = orId; + const urls = []; + const ids = id.split('#'); + let _stype = ids[0]; + let _sname = ids[1]; + let _vname = ''; + let _content = ''; + let query = ''; + let data = []; + switch (_stype) { + case 'singer': + _vname = '歌手搜索'; + query = "SELECT name, singer_names, number, format FROM song WHERE singer_names LIKE '%" + _sname + "%' ORDER BY acronym COLLATE NOCASE LIMIT 1000"; + data = await dbQuery(dbName, query); + data.forEach(it => { + urls.push(it.singer_names + '-' + it.name + '$' + fixUrl + it.number + '.' + it.format); + }); + break; + case 'name': + _vname = '歌名搜索'; + query = "SELECT name, singer_names, number, format FROM song WHERE name LIKE '%" + _sname + "%' ORDER BY acronym COLLATE NOCASE LIMIT 1000"; + data = await dbQuery(dbName, query); + data.forEach(it => { + urls.push(it.singer_names + '-' + it.name + '$' + fixUrl + it.number + '.' + it.format); + }); + break; + case 'all': + _vname = '混合搜索'; + query = "SELECT name, singer_names, number, format FROM song WHERE singer_names LIKE '%" + _sname + "%' OR name LIKE '%" + _sname + "%' ORDER BY acronym COLLATE NOCASE LIMIT 1000"; + data = await dbQuery(dbName, query); + data.forEach(it => { + urls.push(it.singer_names + '-' + it.name + '$' + fixUrl + it.number + '.' + it.format); + }); + break; + case 'multi_type_song': + _vname = '合集'; + query = "SELECT name, singer_names, number, format FROM song WHERE type_id=" + ids[2] + " AND " + ids[4] + " ORDER BY acronym COLLATE NOCASE LIMIT " + pageSize + " OFFSET " + ids[3]; + data = await dbQuery(dbName, query); + data.forEach(it => { + urls.push(it.singer_names + '-' + it.name + '$' + fixUrl + it.number + '.' + it.format); + }); + break; + case 'multi_song': + _vname = '合集'; + query = "SELECT name, singer_names, number, format FROM song WHERE " + ids[3] + " ORDER BY acronym COLLATE NOCASE LIMIT " + pageSize + " OFFSET " + ids[2]; + data = await dbQuery(dbName, query); + data.forEach(it => { + urls.push(it.singer_names + '-' + it.name + '$' + fixUrl + it.number + '.' + it.format); + }); + break; + default: + _vname = '单曲'; + _content = ids[2]; + urls.push(_sname + '$' + _stype); + break; + } + + let vod = { + vod_id: id, + vod_name: `${_vname}: ${_sname}`, + vod_play_from: 'mv30w', + vod_play_url: urls.join('#'), + vod_content: _content + }; + + return vod + }, + 搜索: async function (wd, quick, pg) { + return [] + } +} diff --git a/drpy-node-bundle/spider/js/_lib.cntv-urlparse.cjs b/drpy-node-bundle/spider/js/_lib.cntv-urlparse.cjs new file mode 100644 index 00000000..a3a76855 --- /dev/null +++ b/drpy-node-bundle/spider/js/_lib.cntv-urlparse.cjs @@ -0,0 +1,282 @@ +#!/usr/bin/env node +/** + * CCTV Video URL Parser + * 解析央视视频URL,获取视频下载链接 + * + * 使用方法: + * node parse_url.js "https://tv.cctv.com/2026/03/13/VIDE1I89jcwxtmOiZUd6zsLR260313.shtml" + * node parse_url.js "330318aa5ca745d286b8d6c57e971a39" + * echo "..." | node parse_url.js - + */ + +const crypto = require('crypto'); +const fs = require('fs'); + +// 固定参数 +const CCTV_API_URL = 'https://vdn.apps.cntv.cn/api/getHttpVideoInfo.do'; +const SECRET_KEY = '47899B86370B879139C08EA3B5E88267'; +const UID = '826D8646DEBBFD97A82D23CAE45A55BE'; + +// 提取视频ID的正则规则 +const PID_RULES = [ + /var\s+guid\s*=\s*["']([\da-fA-F]+)["']/, + /videoCenterId(?:["']\s*,|:)\s*["']([\da-fA-F]+)["']/, + /changePlayer\s*\(\s*["']([\da-fA-F]+)["']\)/, + /load[Vv]ideo\s*\(\s*["']([\da-fA-F]+)["']\)/, + /var\s+initMyAray\s*=\s*["']([\da-fA-F]+)["']/, + /var\s+ids\s*=\s*\[["']([\da-fA-F]+)["']\]/ +]; + +// PID格式:32位十六进制字符串 +const PID_PATTERN = /^[\da-fA-F]{32}$/; + +/** + * MD5哈希函数 + */ +function md5(value) { + return crypto.createHash('md5').update(value, 'utf-8').digest('hex'); +} + +/** + * HTTP GET请求(使用fetch) + */ +async function httpGet(url) { + try { + const response = await fetch(url, { + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36' + } + }); + if (!response.ok) { + throw new Error(`HTTP ${response.status}: ${response.statusText}`); + } + return await response.text(); + } catch (error) { + throw error; + } +} + +/** + * 判断输入类型 + * @param {string} input - 用户输入 + * @returns {string} - 'url' | 'pid' | 'html' | 'stdin' + */ +function detectInputType(input) { + if (input === '-') { + return 'stdin'; + } + // 优先检测URL + if (input.match(/^https?:\/\//i)) { + return 'url'; + } + // 检测HTML/JavaScript内容(包含HTML标签或JavaScript变量声明) + if (input.includes(' bestBandwidth) { + bestBandwidth = bandwidth; + bestUri = uriLine; + } + break; + } + } + } + } + } + + // 如果没有找到多码率流,直接返回第一个非空行(单码率情况) + if (!bestUri) { + for (const line of lines) { + const trimmed = line.trim(); + if (trimmed && !trimmed.startsWith('#')) { + bestUri = trimmed; + break; + } + } + } + + // 处理路径 + if (bestUri && !bestUri.startsWith('http')) { + const urlObj = new URL(m3u8BaseUrl); + // 如果是绝对路径(以/开头) + if (bestUri.startsWith('/')) { + bestUri = `${urlObj.protocol}//${urlObj.host}${bestUri}`; + } else { + // 相对路径 + const basePath = urlObj.pathname.substring(0, urlObj.pathname.lastIndexOf('/') + 1); + bestUri = `${urlObj.protocol}//${urlObj.host}${basePath}${bestUri}`; + } + } + + return bestUri; +} + +/** + * 根据PID获取视频信息 + * @param {string} pid - 视频ID + * @returns {Promise} 视频信息对象 + */ +async function getVideoInfoByPid(pid) { + console.log(`使用视频ID: ${pid}`); + + // 构建API请求参数 + console.log('步骤1: 构建API请求...'); + const tsp = Math.floor(Date.now() / 1000); + const vn = '2049'; + const vc = md5(tsp + vn + SECRET_KEY + UID); + + const apiParams = new URLSearchParams({ + pid: pid, + client: 'flash', + im: '0', + tsp: tsp.toString(), + vn: vn, + vc: vc, + uid: UID, + wlan: '' + }); + + const apiUrl = `${CCTV_API_URL}?${apiParams.toString()}`; + console.log(`API URL: ${apiUrl}`); + + // 调用API获取视频信息 + console.log('步骤2: 获取视频信息...'); + const apiResponse = await httpGet(apiUrl); + const videoData = JSON.parse(apiResponse); + + console.log('视频信息:', { + title: videoData.title, + pgtv: videoData.pgtv + }); + + // 获取m3u8下载链接 + console.log('步骤3: 解析下载链接...'); + const manifest = videoData.manifest || {}; + let hlsUrl = manifest.hls_h5e_url || manifest.hls_url || videoData.hls_h5e_url || videoData.hls_url; + + if (!hlsUrl) { + throw new Error('无法获取HLS下载链接'); + } + console.log(`HLS URL: ${hlsUrl}`); + + // 解析m3u8获取最高质量的流 + console.log('步骤4: 解析M3U8获取最佳质量...'); + const m3u8Content = await httpGet(hlsUrl); + const downloadUrl = parseM3U8ForBestQuality(m3u8Content, hlsUrl); + + if (!downloadUrl) { + throw new Error('无法解析M3U8内容'); + } + + console.log(`最终下载链接: ${downloadUrl}`); + + return { + success: true, + title: videoData.title, + pid: pid, + pgtv: videoData.pgtv, + hls_key: manifest.hls_h5e_url ? 'hls_h5e_url' : 'hls_url', + download_url: downloadUrl, + m3u8_url: hlsUrl, + cover_url: videoData.image + }; +} + +/** + * 主函数:解析CCTV视频URL + * @param {string} input - 输入(URL、PID或HTML内容) + * @returns {Promise} 视频信息对象 + */ +async function parseCCTVUrl(input) { + try { + const inputType = detectInputType(input); + console.log(`检测到输入类型: ${inputType}`); + + // 如果是PID,直接调用API + if (inputType === 'pid') { + return await getVideoInfoByPid(input); + } + + // 如果是URL,获取页面内容并提取PID + if (inputType === 'url') { + console.log(`正在解析URL: ${input}`); + console.log('步骤1: 获取页面内容...'); + const html = await httpGet(input); + const pid = extractPid(html); + + if (!pid) { + throw new Error('无法从页面中提取视频ID'); + } + console.log(`找到视频ID: ${pid}`); + + return await getVideoInfoByPid(pid); + } + + // 如果是HTML内容,直接提取PID + if (inputType === 'html') { + console.log('检测到HTML内容,直接提取视频ID...'); + const pid = extractPid(input); + + if (!pid) { + throw new Error('无法从HTML内容中提取视频ID'); + } + console.log(`找到视频ID: ${pid}`); + + return await getVideoInfoByPid(pid); + } + + throw new Error(`不支持的输入类型: ${inputType}`); + + } catch (error) { + console.error('解析失败:', error.message); + return { + success: false, + error: error.message + }; + } +} + +// 导出函数供其他模块使用 +module.exports = {parseCCTVUrl, detectInputType, getVideoInfoByPid}; \ No newline at end of file diff --git a/drpy-node-bundle/spider/js/_lib.cntv-wasm.cjs b/drpy-node-bundle/spider/js/_lib.cntv-wasm.cjs new file mode 100644 index 00000000..942a789c --- /dev/null +++ b/drpy-node-bundle/spider/js/_lib.cntv-wasm.cjs @@ -0,0 +1,5 @@ +var CNTVModule=function(){var _scriptDir="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(CNTVModule){CNTVModule=CNTVModule||{};var Module=void 0!==CNTVModule?CNTVModule:{},moduleOverrides={},key;for(key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var arguments_=[],thisProgram="./this.program",quit_=function(A,e){throw e},ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_HAS_NODE=!1,ENVIRONMENT_IS_SHELL=!1,ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_HAS_NODE="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,ENVIRONMENT_IS_NODE=ENVIRONMENT_HAS_NODE&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER,scriptDirectory="",read_,readAsync,readBinary,setWindowTitle;function locateFile(A){return Module.locateFile?Module.locateFile(A,scriptDirectory):scriptDirectory+A}(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:document.currentScript&&(scriptDirectory=document.currentScript.src),_scriptDir&&(scriptDirectory=_scriptDir),scriptDirectory=0!==scriptDirectory.indexOf("blob:")?scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1):"",read_=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText}catch(A){t=tryParseAsDataURI(e);if(t)return intArrayToString(t);throw A}},ENVIRONMENT_IS_WORKER&&(readBinary=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}catch(A){t=tryParseAsDataURI(e);if(t)return t;throw A}}),readAsync=function(e,t,g){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){var A;200==r.status||0==r.status&&r.response?t(r.response):(A=tryParseAsDataURI(e))?t(A.buffer):g()},r.onerror=g,r.send(null)},setWindowTitle=function(A){document.title=A});var out=Module.print||console.log.bind(console),err=Module.printErr||console.warn.bind(console);for(key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);function dynamicAlloc(A){var e=HEAP32[DYNAMICTOP_PTR>>2],A=e+A+15&-16;return A>_emscripten_get_heap_size()&&abort(),HEAP32[DYNAMICTOP_PTR>>2]=A,e}function getNativeTypeSize(A){switch(A){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:var e;return"*"===A[A.length-1]?4:"i"===A[0]?(assert((e=parseInt(A.substr(1)))%8==0,"getNativeTypeSize invalid bits "+e+", type "+A),e/8):0}}function warnOnce(A){warnOnce.shown||(warnOnce.shown={}),warnOnce.shown[A]||(warnOnce.shown[A]=1,err(A))}moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.quit&&(quit_=Module.quit);var asm2wasmImports={"f64-rem":function(A,e){return A%e},debugger:function(){}},jsCallStartIndex=1,functionPointers=new Array(14);function addFunction(A,e){for(var t=0;t<14;t++)if(!functionPointers[t])return functionPointers[t]=A,jsCallStartIndex+t;throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."}function makeBigInt(A,e,t){return t?(A>>>0)+4294967296*(e>>>0):(A>>>0)+4294967296*(0|e)}var tempRet0=0,setTempRet0=function(A){tempRet0=A},getTempRet0=function(){return tempRet0},wasmBinary,wasmMemory,wasmTable;function setValue(A,e,t,g){switch(t="*"===(t=t||"i8").charAt(t.length-1)?"i32":t){case"i1":case"i8":HEAP8[A>>0]=e;break;case"i16":HEAP16[A>>1]=e;break;case"i32":HEAP32[A>>2]=e;break;case"i64":tempI64=[e>>>0,1<=+Math_abs(tempDouble=e)?0>>0:~~+Math_ceil((tempDouble-(~~tempDouble>>>0))/4294967296)>>>0:0],HEAP32[A>>2]=tempI64[0],HEAP32[A+4>>2]=tempI64[1];break;case"float":HEAPF32[A>>2]=e;break;case"double":HEAPF64[A>>3]=e;break;default:abort("invalid type for setValue: "+t)}}Module.wasmBinary&&(wasmBinary=Module.wasmBinary),"object"!=typeof WebAssembly&&err("no native wasm support detected");var ABORT=!1,EXITSTATUS=0;function assert(A,e){A||abort("Assertion failed: "+e)}var ALLOC_NONE=3;function allocate(A,e,t,g){var r,B,n="number"==typeof A?(r=!0,A):(r=!1,A.length),E="string"==typeof e?e:null,C=t==ALLOC_NONE?g:[_malloc,stackAlloc,dynamicAlloc][t](Math.max(n,E?1:e.length));if(r){for(assert(0==(3&(g=C))),B=C+(-4&n);g>2]=0;for(B=C+n;g>0]=0}else if("i8"===E)A.subarray||A.slice?HEAPU8.set(A,C):HEAPU8.set(new Uint8Array(A),C);else for(var o,I,Q=0;Q>10,56320|1023&E)))):B+=String.fromCharCode(C)}return B}function UTF8ToString(A,e){return A?UTF8ArrayToString(HEAPU8,A,e):""}function stringToUTF8Array(A,e,t,g){if(!(0>6}else{if(E<=65535){if(B<=t+2)break;e[t++]=224|E>>12}else{if(B<=t+3)break;e[t++]=240|E>>18,e[t++]=128|E>>12&63}e[t++]=128|E>>6&63}e[t++]=128|63&E}}return e[t]=0,t-r}function stringToUTF8(A,e,t){return stringToUTF8Array(A,HEAPU8,e,t)}function lengthBytesUTF8(A){for(var e=0,t=0;t>2]=DYNAMIC_BASE;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=!0,Module.noFSInit||FS.init.initialized||FS.init(),TTY.init(),callRuntimeCallbacks(__ATINIT__)}function preMain(){FS.ignorePermissions=!1,callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=!0}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(A){__ATPRERUN__.unshift(A)}function addOnPostRun(A){__ATPOSTRUN__.unshift(A)}function unSign(A,e,t){return 0<=A?A:e<=32?2*Math.abs(1<>2]=HEAPU32[eb+A[e]>>2]+eb});var ___exception_infos={},___exception_caught=[];function ___exception_addRef(A){A&&___exception_infos[A].refcount++}function ___exception_deAdjust(A){if(A&&!___exception_infos[A])for(var e in ___exception_infos)for(var t=+e,g=___exception_infos[t].adjusted,r=g.length,B=0;B>2]=A),A}var PATH_FS={resolve:function(){for(var A="",e=!1,t=arguments.length-1;-1<=t&&!e;t--){var g=0<=t?arguments[t]:FS.cwd();if("string"!=typeof g)throw new TypeError("Arguments to path.resolve must be strings");if(!g)return"";A=g+"/"+A,e="/"===g.charAt(0)}return(e?"/":"")+(A=PATH.normalizeArray(A.split("/").filter(function(A){return!!A}),!e).join("/"))||"."},relative:function(A,e){function t(A){for(var e=0;ee)A.contents.length=e;else for(;A.contents.length=A.node.usedBytes)return 0;var n=Math.min(A.node.usedBytes-r,g);if(8t.timestamp)&&(n.push(A),B++)}),[]);if(Object.keys(r.entries).forEach(function(A){r.entries[A];g.entries[A]||(t.push(A),B++)}),!B)return e(null);var E=!1,A=("remote"===g.type?g:r).db.transaction([IDBFS.DB_STORE_NAME],"readwrite"),C=A.objectStore(IDBFS.DB_STORE_NAME);function o(A){if(A&&!E)return E=!0,e(A)}A.onerror=function(A){o(this.error),A.preventDefault()},A.oncomplete=function(A){E||e(null)},n.sort().forEach(function(t){"local"===r.type?IDBFS.loadRemoteEntry(C,t,function(A,e){if(A)return o(A);IDBFS.storeLocalEntry(t,e,o)}):IDBFS.loadLocalEntry(t,function(A,e){if(A)return o(A);IDBFS.storeRemoteEntry(C,t,e,o)})}),t.sort().reverse().forEach(function(A){"local"===r.type?IDBFS.removeLocalEntry(A,o):IDBFS.removeRemoteEntry(C,A,o)})}},WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(A){assert(ENVIRONMENT_IS_WORKER),WORKERFS.reader||(WORKERFS.reader=new FileReaderSync);var B=WORKERFS.createNode(null,"/",WORKERFS.DIR_MODE,0),n={};function g(A){for(var e=A.split("/"),t=B,g=0;g=A.node.size?0:(A=A.node.contents.slice(r,r+g),r=WORKERFS.reader.readAsArrayBuffer(A),e.set(new Uint8Array(r),t),A.size)},write:function(A,e,t,g,r){throw new FS.ErrnoError(5)},llseek:function(A,e,t){if(1===t?e+=A.position:2===t&&FS.isFile(A.node.mode)&&(e+=A.node.size),e<0)throw new FS.ErrnoError(22);return e}}},FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(A){if(A instanceof FS.ErrnoError)return ___setErrNo(A.errno);throw A+" : "+stackTrace()},lookupPath:function(A,e){if(e=e||{},!(A=PATH_FS.resolve(FS.cwd(),A)))return{path:"",node:null};var t,g={follow_mount:!0,recurse_count:0};for(t in g)void 0===e[t]&&(e[t]=g[t]);if(8>>0)%FS.nameTable.length},hashAddNode:function(A){var e=FS.hashName(A.parent.id,A.name);A.name_next=FS.nameTable[e],FS.nameTable[e]=A},hashRemoveNode:function(A){var e=FS.hashName(A.parent.id,A.name);if(FS.nameTable[e]===A)FS.nameTable[e]=A.name_next;else for(var t=FS.nameTable[e];t;){if(t.name_next===A){t.name_next=A.name_next;break}t=t.name_next}},lookupNode:function(A,e){var t=FS.mayLookup(A);if(t)throw new FS.ErrnoError(t,A);for(var t=FS.hashName(A.id,e),g=FS.nameTable[t];g;g=g.name_next){var r=g.name;if(g.parent.id===A.id&&r===e)return g}return FS.lookup(A,e)},createNode:function(A,e,t,g){FS.FSNode||(FS.FSNode=function(A,e,t,g){this.parent=A=A||this,this.mount=A.mount,this.mounted=null,this.id=FS.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=g},FS.FSNode.prototype={},Object.defineProperties(FS.FSNode.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(A){A?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(A){A?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}}));A=new FS.FSNode(A,e,t,g);return FS.hashAddNode(A),A},destroyNode:function(A){FS.hashRemoveNode(A)},isRoot:function(A){return A===A.parent},isMountpoint:function(A){return!!A.mounted},isFile:function(A){return 32768==(61440&A)},isDir:function(A){return 16384==(61440&A)},isLink:function(A){return 40960==(61440&A)},isChrdev:function(A){return 8192==(61440&A)},isBlkdev:function(A){return 24576==(61440&A)},isFIFO:function(A){return 4096==(61440&A)},isSocket:function(A){return 49152==(49152&A)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(A){var e=FS.flagModes[A];if(void 0===e)throw new Error("Unknown file open mode: "+A);return e},flagsToPermissionString:function(A){var e=["r","w","rw"][3&A];return 512&A&&(e+="w"),e},nodePermissions:function(A,e){return FS.ignorePermissions||(-1===e.indexOf("r")||292&A.mode)&&(-1===e.indexOf("w")||146&A.mode)&&(-1===e.indexOf("x")||73&A.mode)?0:13},mayLookup:function(A){var e=FS.nodePermissions(A,"x");return e||(A.node_ops.lookup?0:13)},mayCreate:function(A,e){try{FS.lookupNode(A,e);return 17}catch(A){}return FS.nodePermissions(A,"wx")},mayDelete:function(A,e,t){var g;try{g=FS.lookupNode(A,e)}catch(A){return A.errno}e=FS.nodePermissions(A,"wx");if(e)return e;if(t){if(!FS.isDir(g.mode))return 20;if(FS.isRoot(g)||FS.getPath(g)===FS.cwd())return 16}else if(FS.isDir(g.mode))return 21;return 0},mayOpen:function(A,e){return A?FS.isLink(A.mode)?40:FS.isDir(A.mode)&&("r"!==FS.flagsToPermissionString(e)||512&e)?21:FS.nodePermissions(A,FS.flagsToPermissionString(e)):2},MAX_OPEN_FDS:4096,nextfd:function(A,e){e=e||FS.MAX_OPEN_FDS;for(var t=A=A||0;t<=e;t++)if(!FS.streams[t])return t;throw new FS.ErrnoError(24)},getStream:function(A){return FS.streams[A]},createStream:function(A,e,t){FS.FSStream||(FS.FSStream=function(){},FS.FSStream.prototype={},Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(A){this.node=A}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}));var g,r=new FS.FSStream;for(g in A)r[g]=A[g];A=r;e=FS.nextfd(e,t);return A.fd=e,FS.streams[e]=A},closeStream:function(A){FS.streams[A]=null},chrdev_stream_ops:{open:function(A){var e=FS.getDevice(A.node.rdev);A.stream_ops=e.stream_ops,A.stream_ops.open&&A.stream_ops.open(A)},llseek:function(){throw new FS.ErrnoError(29)}},major:function(A){return A>>8},minor:function(A){return 255&A},makedev:function(A,e){return A<<8|e},registerDevice:function(A,e){FS.devices[A]={stream_ops:e}},getDevice:function(A){return FS.devices[A]},getMounts:function(A){for(var e=[],t=[A];t.length;){var g=t.pop();e.push(g),t.push.apply(t,g.mounts)}return e},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),FS.syncFSRequests++,1=g.length&&B(null)}g.forEach(function(A){if(!A.type.syncfs)return n(null);A.type.syncfs(A,e,n)})},mount:function(A,e,t){var g,r="/"===t,B=!t;if(r&&FS.root)throw new FS.ErrnoError(16);if(!r&&!B){B=FS.lookupPath(t,{follow_mount:!1});if(t=B.path,g=B.node,FS.isMountpoint(g))throw new FS.ErrnoError(16);if(!FS.isDir(g.mode))throw new FS.ErrnoError(20)}B={type:A,opts:e,mountpoint:t,mounts:[]},e=A.mount(B);return(e.mount=B).root=e,r?FS.root=e:g&&(g.mounted=B,g.mount)&&g.mount.mounts.push(B),e},unmount:function(A){A=FS.lookupPath(A,{follow_mount:!1});if(!FS.isMountpoint(A.node))throw new FS.ErrnoError(22);var A=A.node,e=A.mounted,g=FS.getMounts(e),e=(Object.keys(FS.nameTable).forEach(function(A){for(var e=FS.nameTable[A];e;){var t=e.name_next;-1!==g.indexOf(e.mount)&&FS.destroyNode(e),e=t}}),A.mounted=null,A.mount.mounts.indexOf(e));A.mount.mounts.splice(e,1)},lookup:function(A,e){return A.node_ops.lookup(A,e)},mknod:function(A,e,t){var g=FS.lookupPath(A,{parent:!0}).node,A=PATH.basename(A);if(!A||"."===A||".."===A)throw new FS.ErrnoError(22);var r=FS.mayCreate(g,A);if(r)throw new FS.ErrnoError(r);if(g.node_ops.mknod)return g.node_ops.mknod(g,A,e,t);throw new FS.ErrnoError(1)},create:function(A,e){return FS.mknod(A,e=(e=void 0!==e?e:438)&4095|32768,0)},mkdir:function(A,e){return FS.mknod(A,e=(e=void 0!==e?e:511)&1023|16384,0)},mkdirTree:function(A,e){for(var t=A.split("/"),g="",r=0;rthis.length-1||A<0))return e=A%this.chunkSize,A=A/this.chunkSize|0,this.getter(A)[e]},r.prototype.setDataGetter=function(A){this.getter=A},r.prototype.cacheLength=function(){var A=new XMLHttpRequest;if(A.open("HEAD",n,!1),A.send(null),!(200<=A.status&&A.status<300||304===A.status))throw new Error("Couldn't load "+n+". Status: "+A.status);var e,g=Number(A.getResponseHeader("Content-length")),t=(e=A.getResponseHeader("Accept-Ranges"))&&"bytes"===e,A=(e=A.getResponseHeader("Content-Encoding"))&&"gzip"===e,r=1048576,B=(t||(r=g),this);B.setDataGetter(function(A){var e=A*r,t=(A+1)*r-1,t=Math.min(t,g-1);if(void 0===B.chunks[A]&&(B.chunks[A]=function(A,e){if(e=B.length)return 0;var n=Math.min(B.length-r,g);if(B.slice)for(var E=0;E>2]=g.dev,HEAP32[t+4>>2]=0,HEAP32[t+8>>2]=g.ino,HEAP32[t+12>>2]=g.mode,HEAP32[t+16>>2]=g.nlink,HEAP32[t+20>>2]=g.uid,HEAP32[t+24>>2]=g.gid,HEAP32[t+28>>2]=g.rdev,HEAP32[t+32>>2]=0,tempI64=[g.size>>>0,(tempDouble=g.size,1<=+Math_abs(tempDouble)?0>>0:~~+Math_ceil((tempDouble-(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+40>>2]=tempI64[0],HEAP32[t+44>>2]=tempI64[1],HEAP32[t+48>>2]=4096,HEAP32[t+52>>2]=g.blocks,HEAP32[t+56>>2]=g.atime.getTime()/1e3|0,HEAP32[t+60>>2]=0,HEAP32[t+64>>2]=g.mtime.getTime()/1e3|0,HEAP32[t+68>>2]=0,HEAP32[t+72>>2]=g.ctime.getTime()/1e3|0,HEAP32[t+76>>2]=0,tempI64=[g.ino>>>0,(tempDouble=g.ino,1<=+Math_abs(tempDouble)?0>>0:~~+Math_ceil((tempDouble-(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+80>>2]=tempI64[0],HEAP32[t+84>>2]=tempI64[1],0},doMsync:function(A,e,t,g){A=new Uint8Array(HEAPU8.subarray(A,A+t));FS.msync(e,A,0,t,g)},doMkdir:function(A,e){return"/"===(A=PATH.normalize(A))[A.length-1]&&(A=A.substr(0,A.length-1)),FS.mkdir(A,e,0),0},doMknod:function(A,e,t){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-22}return FS.mknod(A,e,t),0},doReadlink:function(A,e,t){var g,r;return t<=0?-22:(A=FS.readlink(A),g=Math.min(t,lengthBytesUTF8(A)),r=HEAP8[e+g],stringToUTF8(A,e,t+1),HEAP8[e+g]=r,g)},doAccess:function(A,e){var t;return-8&e?-22:(A=FS.lookupPath(A,{follow:!0}).node)?(t="",4&e&&(t+="r"),2&e&&(t+="w"),1&e&&(t+="x"),t&&FS.nodePermissions(A,t)?-13:0):-2},doDup:function(A,e,t){var g=FS.getStream(t);return g&&FS.close(g),FS.open(A,e,0,t,t).fd},doReadv:function(A,e,t,g){for(var r=0,B=0;B>2],E=HEAP32[e+(8*B+4)>>2],n=FS.read(A,HEAP8,n,E,g);if(n<0)return-1;if(r+=n,n>2],E=HEAP32[e+(8*B+4)>>2],n=FS.write(A,HEAP8,n,E,g);if(n<0)return-1;r+=n}return r},varargs:0,get:function(A){return SYSCALLS.varargs+=4,HEAP32[SYSCALLS.varargs-4>>2]},getStr:function(){return UTF8ToString(SYSCALLS.get())},getStreamFromFD:function(){var A=FS.getStream(SYSCALLS.get());if(A)return A;throw new FS.ErrnoError(9)},get64:function(){var A=SYSCALLS.get();SYSCALLS.get();return A},getZero:function(){SYSCALLS.get()}};function ___syscall140(A,e){SYSCALLS.varargs=e;try{var t=SYSCALLS.getStreamFromFD(),g=SYSCALLS.get(),r=SYSCALLS.get(),B=SYSCALLS.get(),n=SYSCALLS.get(),E=4294967296*g+(r>>>0),C=9007199254740992;return E<=-C||C<=E?-75:(FS.llseek(t,E,n),tempI64=[t.position>>>0,(tempDouble=t.position,1<=+Math_abs(tempDouble)?0>>0:~~+Math_ceil((tempDouble-(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[B>>2]=tempI64[0],HEAP32[B+4>>2]=tempI64[1],t.getdents&&0==E&&0===n&&(t.getdents=null),0)}catch(A){return void 0!==FS&&A instanceof FS.ErrnoError||abort(A),-A.errno}}function ___syscall146(A,e){SYSCALLS.varargs=e;try{var t=SYSCALLS.getStreamFromFD(),g=SYSCALLS.get(),r=SYSCALLS.get();return SYSCALLS.doWritev(t,g,r)}catch(A){return void 0!==FS&&A instanceof FS.ErrnoError||abort(A),-A.errno}}function ___syscall6(A,e){SYSCALLS.varargs=e;try{var t=SYSCALLS.getStreamFromFD();return FS.close(t),0}catch(A){return void 0!==FS&&A instanceof FS.ErrnoError||abort(A),-A.errno}}function getShiftFromSize(A){switch(A){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+A)}}function embind_init_charCodes(){for(var A=new Array(256),e=0;e<256;++e)A[e]=String.fromCharCode(e);embind_charCodes=A}var embind_charCodes=void 0;function readLatin1String(A){for(var e="",t=A;HEAPU8[t];)e+=embind_charCodes[HEAPU8[t++]];return e}var awaitingDependencies={},registeredTypes={},typeDependencies={},char_0=48,char_9=57;function makeLegalFunctionName(A){var e;return void 0===A?"_unknown":(e=(A=A.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0),char_0<=e&&e<=char_9?"_"+A:A)}function createNamedFunction(A,e){return A=makeLegalFunctionName(A),new Function("body","return function "+A+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function extendError(A,e){var t=createNamedFunction(e,function(A){this.name=e,this.message=A;A=new Error(A).stack;void 0!==A&&(this.stack=this.toString()+"\n"+A.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(A.prototype),(t.prototype.constructor=t).prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},t}var BindingError=void 0;function throwBindingError(A){throw new BindingError(A)}var InternalError=void 0;function registerType(A,e,t){if(t=t||{},!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var g=e.name;if(A||throwBindingError('type "'+g+'" must have a positive integer typeid pointer'),registeredTypes.hasOwnProperty(A)){if(t.ignoreDuplicateRegistrations)return;throwBindingError("Cannot register type '"+g+"' twice")}registeredTypes[A]=e,delete typeDependencies[A],awaitingDependencies.hasOwnProperty(A)&&(t=awaitingDependencies[A],delete awaitingDependencies[A],t.forEach(function(A){A()}))}function __embind_register_bool(A,t,g,r,B){var n=getShiftFromSize(g);registerType(A,{name:t=readLatin1String(t),fromWireType:function(A){return!!A},toWireType:function(A,e){return e?r:B},argPackAdvance:8,readValueFromPointer:function(A){var e;if(1===g)e=HEAP8;else if(2===g)e=HEAP16;else{if(4!==g)throw new TypeError("Unknown boolean type size: "+t);e=HEAP32}return this.fromWireType(e[A>>n])},destructorFunction:null})}var emval_free_list=[],emval_handle_array=[{},{value:{href:"blob:https://tv.cctv.com/a2a31e32-7705-4db1-b190-1bd401598188"}},{value:null},{value:!0},{value:!1}];function __emval_decref(A){4>2])}function __embind_register_emval(A,e){registerType(A,{name:e=readLatin1String(e),fromWireType:function(A){var e=emval_handle_array[A].value;return __emval_decref(A),e},toWireType:function(A,e){return __emval_register(e)},argPackAdvance:8,readValueFromPointer:simpleReadValueFromPointer,destructorFunction:null})}function _embind_repr(A){var e;return null===A?"null":"object"==(e=typeof A)||"array"==e||"function"==e?A.toString():""+A}function floatReadValueFromPointer(A,e){switch(e){case 2:return function(A){return this.fromWireType(HEAPF32[A>>2])};case 3:return function(A){return this.fromWireType(HEAPF64[A>>3])};default:throw new TypeError("Unknown float type: "+A)}}function __embind_register_float(A,e,t){t=getShiftFromSize(t);registerType(A,{name:e=readLatin1String(e),fromWireType:function(A){return A},toWireType:function(A,e){if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+_embind_repr(e)+'" to '+this.name);return e},argPackAdvance:8,readValueFromPointer:floatReadValueFromPointer(e,t),destructorFunction:null})}function integerReadValueFromPointer(A,e,t){switch(e){case 0:return t?function(A){return HEAP8[A]}:function(A){return HEAPU8[A]};case 1:return t?function(A){return HEAP16[A>>1]}:function(A){return HEAPU16[A>>1]};case 2:return t?function(A){return HEAP32[A>>2]}:function(A){return HEAPU32[A>>2]};default:throw new TypeError("Unknown integer type: "+A)}}function __embind_register_integer(A,t,e,g,r){t=readLatin1String(t),-1===r&&(r=4294967295);var B,n=getShiftFromSize(e),E=function(A){return A},C=(0===g&&(B=32-8*e,E=function(A){return A<>>B}),-1!=t.indexOf("unsigned"));registerType(A,{name:t,fromWireType:E,toWireType:function(A,e){if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+_embind_repr(e)+'" to '+this.name);if(e>>0:0|e},argPackAdvance:8,readValueFromPointer:integerReadValueFromPointer(t,n,0!==g),destructorFunction:null})}function __embind_register_memory_view(A,e,t){var g=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function r(A){var e=HEAPU32,t=e[A>>=2],A=e[A+1];return new g(e.buffer,A,t)}registerType(A,{name:t=readLatin1String(t),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ignoreDuplicateRegistrations:!0})}function __embind_register_std_string(A,e){var I="std::string"===(e=readLatin1String(e));registerType(A,{name:e,fromWireType:function(A){var e=HEAPU32[A>>2];if(I){for(var t=HEAPU8[A+4+e],g=0,r=(0!=t&&(g=t,HEAPU8[A+4+e]=0),A+4),B=0;B<=e;++B){var n,E,C=A+4+B;0==HEAPU8[C]&&(n=UTF8ToString(r),E=void 0===E?n:E+String.fromCharCode(0)+n,r=C+1)}0!=g&&(HEAPU8[A+4+e]=g)}else{for(var o=new Array(e),B=0;B>2]=g,I&&t)stringToUTF8(e,r+4,g+1);else if(t)for(var B=0;B>2],g=new Array(t),r=A+4>>o,B=0;B>2]=g,r+4>>o),n=0;n>2]=r,e.toWireType(g,A)}var emval_symbols={};function getStringOrSymbol(A){var e=emval_symbols[A];return void 0===e?readLatin1String(A):e}function emval_get_global(){return"object"==typeof globalThis?globalThis:Function("return this")()}function __emval_get_global(A){return 0===A?__emval_register(emval_get_global()):(A=getStringOrSymbol(A),__emval_register(emval_get_global()[A]))}function __emval_get_property(A,e){return __emval_register((A=requireHandle(A))[e=requireHandle(e)])}function runDestructors(A){for(;A.length;){var e=A.pop();A.pop()(e)}}function __emval_run_destructors(A){runDestructors(emval_handle_array[A].value),__emval_decref(A)}function __emval_take_value(A,e){return __emval_register((A=requireRegisteredType(A,"_emval_take_value")).readValueFromPointer(e))}function _abort(){Module.abort()}function _emscripten_date_now(){return Date.now()}function __emscripten_traverse_stack(A){if(!A||!A.callee||!A.callee.name)return[null,"",""];A.callee.toString();var e,t=A.callee.name,g="(",r=!0;for(e in A){var B=A[e];r||(g+=", "),r=!1,g+="number"==typeof B||"string"==typeof B?B:"("+typeof B+")"}g+=")";var n=A.callee.caller;return[A=n?n.arguments:[],t,g=r?"":g]}function _emscripten_get_callstack_js(A){var e=(g=jsStackTrace()).lastIndexOf("_emscripten_log"),t=g.lastIndexOf("_emscripten_get_callstack"),e=g.indexOf("\n",Math.max(e,t))+1,g=g.slice(e),r=(8&A&&"undefined"==typeof emscripten_source_map&&(warnOnce('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),A=8^A|16),null);if(128&A)for(r=__emscripten_traverse_stack(arguments);0<=r[1].indexOf("_emscripten_");)r=__emscripten_traverse_stack(r[0]);var B,n=g.split("\n"),E=(g="",new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)")),C=new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"),o=new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");for(B in n){var I=n[B],Q="",i="",a=0,s=0,l=o.exec(I);if(l&&5==l.length)Q=l[1],i=l[2],a=l[3],s=l[4];else{if(!((l=(l=E.exec(I))||C.exec(I))&&4<=l.length)){g+=I+"\n";continue}Q=l[1],i=l[2],a=l[3],s=0|l[4]}var c,I=(I=32&A?demangle(Q):Q)||Q,l=!1;8&A&&(l=(c=emscripten_source_map.originalPositionFor({line:a,column:s}))&&c.source)&&(64&A&&(c.source=c.source.substring(c.source.replace(/\\/g,"/").lastIndexOf("/")+1)),g+=" at "+I+" ("+c.source+":"+c.line+":"+c.column+")\n"),(16&A||!l)&&(g+=(l?" = "+Q:" at "+I)+" ("+(i=64&A?i.substring(i.replace(/\\/g,"/").lastIndexOf("/")+1):i)+":"+a+":"+s+")\n"),128&A&&r[0]&&(r[1]==Q&&0>3],r+=8):"i64"==A?(e=[HEAP32[r>>2],HEAP32[r+4>>2]],r+=8):(assert(0==(3&r)),A="i32",e=HEAP32[r>>2],r+=4),e}for(var B,n=[];;){var E,C=t;if(0===(E=HEAP8[t>>0]))break;if(B=HEAP8[t+1>>0],37==E){var o=!1,I=!1,Q=!1,i=!1,a=!1;A:for(;;){switch(B){case 43:o=!0;break;case 45:I=!0;break;case 35:Q=!0;break;case 48:if(i)break A;i=!0;break;case 32:a=!0;break;default:break A}B=HEAP8[++t+1>>0]}var s=0;if(42==B)s=g("i32"),B=HEAP8[++t+1>>0];else for(;48<=B&&B<=57;)s=10*s+(B-48),B=HEAP8[++t+1>>0];var l=!1,c=-1;if(46==B){if(l=!(c=0),42==(B=HEAP8[++t+1>>0]))c=g("i32"),t++;else for(;;){var w=HEAP8[t+1>>0];if(w<48||57>0]}switch(c<0&&(l=!(c=6)),String.fromCharCode(B)){case"h":var u=104==HEAP8[t+2>>0]?(t++,1):2;break;case"l":u=108==HEAP8[t+2>>0]?(t++,8):4;break;case"L":case"q":case"j":u=8;break;case"z":case"t":case"I":u=4;break;default:u=null}switch(u&&t++,B=HEAP8[t+1>>0],String.fromCharCode(B)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":var M,d,F=100==B||105==B,F=(d=g("i"+8*(u=u||4)),8==u&&(d=makeBigInt(d[0],d[1],117==B)),u<=4&&(d=(F?reSign:unSign)(d&Math.pow(256,u)-1,8*u)),Math.abs(d)),f="";if(100==B||105==B)M=reSign(d,8*u,1).toString(10);else if(117==B)M=unSign(d,8*u,1).toString(10),d=Math.abs(d);else if(111==B)M=(Q?"0":"")+F.toString(8);else if(120==B||88==B){if(f=Q&&0!=d?"0x":"",d<0){d=-d,M=(F-1).toString(16);for(var Y=[],D=0;Dh++;)R[0]+="0";M=R[0]+(1>0]);else n=n.concat(intArrayFromString("(null)".substr(0,y),!0));if(I)for(;y>2]=n.length;break;case"%":n.push(E);break;default:for(D=C;D>0])}t+=2}else n.push(E),t+=1}return n}function _emscripten_log_js(A,e){24&A&&(e=e.replace(/\s+$/,""),e+=(0>2],g=(e+=4,"");if(t)for(var r=__formatString(t,e),B=0;B>2]=e,HEAPU32[A+4>>2]=e/4294967296|0},openDatabase:function(A,e,t,g){try{var r=indexedDB.open(A,e)}catch(A){return g(A)}r.onupgradeneeded=function(A){A=A.target.result;A.objectStoreNames.contains("FILES")&&A.deleteObjectStore("FILES"),A.createObjectStore("FILES")},r.onsuccess=function(A){t(A.target.result)},r.onerror=function(A){g(A)}},staticInit:function(){var e="undefined"==typeof ENVIRONMENT_IS_FETCH_WORKER;Fetch.openDatabase("emscripten_filesystem",1,function(A){Fetch.dbInstance=A,e&&removeRunDependency("library_fetch_init")},function(){Fetch.dbInstance=!1,e&&removeRunDependency("library_fetch_init")}),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||addRunDependency("library_fetch_init")}};function __emscripten_fetch_xhr(r,B,n,g,e){var A=HEAPU32[r+8>>2];if(A){var A=UTF8ToString(A),t=r+112,E=(E=UTF8ToString(t))||"GET",C=(HEAPU32[t+32>>2],HEAPU32[t+52>>2]),o=HEAPU32[t+56>>2],I=!!HEAPU32[t+60>>2],Q=(HEAPU32[t+64>>2],HEAPU32[t+68>>2]),i=HEAPU32[t+72>>2],a=HEAPU32[t+76>>2],s=HEAPU32[t+80>>2],l=HEAPU32[t+84>>2],t=HEAPU32[t+88>>2],c=!!(1&C),w=!!(2&C),C=!!(64&C),Q=Q?UTF8ToString(Q):void 0,i=i?UTF8ToString(i):void 0,u=s?UTF8ToString(s):void 0,M=new XMLHttpRequest;if(M.withCredentials=I,M.open(E,A,!C,Q,i),C||(M.timeout=o),M.url_=A,assert(!w,"streaming uses moz-chunked-arraybuffer which is no longer supported; TODO: rewrite using fetch()"),M.responseType="arraybuffer",s&&M.overrideMimeType(u),a)for(;;){var d=HEAPU32[a>>2];if(!d)break;var F=HEAPU32[a+4>>2];if(!F)break;a+=8;d=UTF8ToString(d),F=UTF8ToString(F);M.setRequestHeader(d,F)}Fetch.xhrs.push(M);I=Fetch.xhrs.length,E=(HEAPU32[r+0>>2]=I,l&&t?HEAPU8.slice(l,l+t):null);M.onload=function(A){var e=M.response?M.response.byteLength:0,t=0,g=0;c&&!w&&(t=_malloc(g=e),HEAPU8.set(new Uint8Array(M.response),t)),HEAPU32[r+12>>2]=t,Fetch.setu64(r+16,g),Fetch.setu64(r+24,0),e&&Fetch.setu64(r+32,e),HEAPU16[r+40>>1]=M.readyState,4===M.readyState&&0===M.status&&(M.status=0>1]=M.status,M.statusText&&stringToUTF8(M.statusText,r+44,64),200<=M.status&&M.status<300?B&&B(r,M,A):n&&n(r,M,A)},M.onerror=function(A){var e=M.status;4===M.readyState&&0===e&&(e=404),HEAPU32[r+12>>2]=0,Fetch.setu64(r+16,0),Fetch.setu64(r+24,0),Fetch.setu64(r+32,0),HEAPU16[r+40>>1]=M.readyState,HEAPU16[r+42>>1]=e,n&&n(r,M,A)},M.ontimeout=function(A){n&&n(r,M,A)},M.onprogress=function(A){var e=c&&w&&M.response?M.response.byteLength:0,t=0;c&&w&&(t=_malloc(e),HEAPU8.set(new Uint8Array(M.response),t)),HEAPU32[r+12>>2]=t,Fetch.setu64(r+16,e),Fetch.setu64(r+24,A.loaded-e),Fetch.setu64(r+32,A.total),HEAPU16[r+40>>1]=M.readyState,3<=M.readyState&&0===M.status&&0>1]=M.status,M.statusText&&stringToUTF8(M.statusText,r+44,64),g&&g(r,M,A)},M.onreadystatechange=function(A){HEAPU16[r+40>>1]=M.readyState,2<=M.readyState&&(HEAPU16[r+42>>1]=M.status),e&&e(r,M,A)};try{M.send(E)}catch(A){n&&n(r,M,A)}}else n(r,0,"no url specified!")}function __emscripten_fetch_cache_data(A,e,t,g,r){if(A){var B=UTF8ToString(HEAPU32[e+112+64>>2]||HEAPU32[e+8>>2]);try{var n=A.transaction(["FILES"],"readwrite").objectStore("FILES").put(t,B);n.onsuccess=function(A){HEAPU16[e+40>>1]=4,HEAPU16[e+42>>1]=200,stringToUTF8("OK",e+44,64),g(e,0,B)},n.onerror=function(A){HEAPU16[e+40>>1]=4,HEAPU16[e+42>>1]=413,stringToUTF8("Payload Too Large",e+44,64),r(e,0,A)}}catch(A){r(e,0,A)}}else r(e,0,"IndexedDB not available!")}function __emscripten_fetch_load_cached_data(A,g,r,B){if(A){var e=UTF8ToString(HEAPU32[g+112+64>>2]||HEAPU32[g+8>>2]);try{var t=A.transaction(["FILES"],"readonly").objectStore("FILES").get(e);t.onsuccess=function(A){var e,t;A.target.result?(e=(A=A.target.result).byteLength||A.length,t=_malloc(e),HEAPU8.set(new Uint8Array(A),t),HEAPU32[g+12>>2]=t,Fetch.setu64(g+16,e),Fetch.setu64(g+24,0),Fetch.setu64(g+32,e),HEAPU16[g+40>>1]=4,HEAPU16[g+42>>1]=200,stringToUTF8("OK",g+44,64),r(g,0,A)):(HEAPU16[g+40>>1]=4,HEAPU16[g+42>>1]=404,stringToUTF8("Not Found",g+44,64),B(g,0,"no data"))},t.onerror=function(A){HEAPU16[g+40>>1]=4,HEAPU16[g+42>>1]=404,stringToUTF8("Not Found",g+44,64),B(g,0,A)}}catch(A){B(g,0,A)}}else B(g,0,"IndexedDB not available!")}function __emscripten_fetch_delete_cached_data(A,e,t,g){if(A){var r=UTF8ToString(HEAPU32[e+112+64>>2]||HEAPU32[e+8>>2]);try{var B=A.transaction(["FILES"],"readwrite").objectStore("FILES").delete(r);B.onsuccess=function(A){A=A.target.result;HEAPU32[e+12>>2]=0,Fetch.setu64(e+16,0),Fetch.setu64(e+24,0),Fetch.setu64(e+32,0),HEAPU16[e+40>>1]=4,HEAPU16[e+42>>1]=200,stringToUTF8("OK",e+44,64),t(e,0,A)},B.onerror=function(A){HEAPU16[e+40>>1]=4,HEAPU16[e+42>>1]=404,stringToUTF8("Not Found",e+44,64),g(e,0,A)}}catch(A){g(e,0,A)}}else g(e,0,"IndexedDB not available!")}function _emscripten_start_fetch(A,g,r,B,n){void 0!==Module&&(Module.noExitRuntime=!0);function E(A,e,t){i?dynCall_vi(i,A):g&&g(A)}function C(A,e,t){s?dynCall_vi(s,A):B&&B(A)}function o(A,e,t){a?dynCall_vi(a,A):r&&r(A)}function I(A,e,t){l?dynCall_vi(l,A):n&&n(A)}function Q(A,e,t){__emscripten_fetch_cache_data(Fetch.dbInstance,A,e.response,function(A,e,t){i?dynCall_vi(i,A):g&&g(A)},function(A,e,t){i?dynCall_vi(i,A):g&&g(A)})}var e=A+112,t=UTF8ToString(e),i=HEAPU32[e+36>>2],a=HEAPU32[e+40>>2],s=HEAPU32[e+44>>2],l=HEAPU32[e+48>>2],c=HEAPU32[e+52>>2],w=!!(4&c),u=!!(32&c),c=!!(16&c);if((!c||"EM_IDB_STORE"===t||"EM_IDB_DELETE"===t)&&!Fetch.dbInstance)return o(A),0;if("EM_IDB_STORE"===t){var M=HEAPU32[e+84>>2];__emscripten_fetch_cache_data(Fetch.dbInstance,A,HEAPU8.slice(M,M+HEAPU32[e+88>>2]),E,o)}else if("EM_IDB_DELETE"===t)__emscripten_fetch_delete_cached_data(Fetch.dbInstance,A,E,o);else if(c){if(u)return 0;__emscripten_fetch_xhr(A,w?Q:E,o,C,I)}else __emscripten_fetch_load_cached_data(Fetch.dbInstance,A,E,u?o:w?function(A,e,t){__emscripten_fetch_xhr(A,Q,o,C,I)}:function(A,e,t){__emscripten_fetch_xhr(A,E,o,C,I)});return A}function _gettimeofday(A){var e=Date.now();return HEAP32[A>>2]=e/1e3|0,HEAP32[A+4>>2]=e%1e3*1e3|0,0}function _llvm_trap(){abort("trap!")}function _emscripten_memcpy_big(A,e,t){HEAPU8.set(HEAPU8.subarray(e,e+t),A)}function abortOnCannotGrowMemory(A){abort("OOM")}function emscripten_realloc_buffer(A){A=alignUp(A,65536);var e=buffer.byteLength;try{return-1!==wasmMemory.grow((A-e)/65536)?(buffer=wasmMemory.buffer,1):void 0}catch(A){}}function _emscripten_resize_heap(A){var e=_emscripten_get_heap_size(),t=2147418112;if(t>2,t=(3&B)<<6|(n=E.indexOf(A.charAt(o++))),C+=String.fromCharCode(g<<2|r>>4),64!==B&&(C+=String.fromCharCode(e)),64!==n&&(C+=String.fromCharCode(t)),o>2]=allocateUTF8OnStack(thisProgram);for(var g=1;g>2)+g]=allocateUTF8OnStack(A[g-1]);HEAP32[(t>>2)+e]=0;var r,B=Module.emtStackSave();try{var n=Module._main(e,t);Module.noExitRuntime||exit(n,!0)}catch(A){A instanceof ExitStatus||("SimulateInfiniteLoop"==A?(Module.noExitRuntime=!0,Module.emtStackRestore(B)):((r=A)&&"object"==typeof A&&A.stack&&(r=[A,A.stack]),err("exception thrown: "+r),quit_(1,A)))}finally{calledMain=!0}}function run(A){function e(){calledRun||(calledRun=!0,Module.calledRun=!0,ABORT)||(initRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),shouldRunNow&&callMain(A),postRun())}A=A||arguments_,0 { + if (typeof CNTVModuleFactory !== 'function') { + console.error('ERROR: CNTVModuleFactory is not a function:', CNTVModuleFactory); + // Try to handle if it's wrapped in default export + if (CNTVModuleFactory && typeof CNTVModuleFactory.default === 'function') { + CNTVH5PlayerModule = CNTVModuleFactory.default(); + } else if (CNTVModuleFactory && typeof CNTVModuleFactory.CNTVModule === 'function') { + CNTVH5PlayerModule = CNTVModuleFactory.CNTVModule(); + } else { + throw new Error('CNTVModuleFactory is not a function'); + } + } else { + CNTVH5PlayerModule = CNTVModuleFactory(); + } + + await new Promise((resolve) => { + if (CNTVH5PlayerModule.calledRun) resolve(); + else CNTVH5PlayerModule.onRuntimeInitialized = resolve; + }); + })(); + await wasmInitPromise; +} + +// ==================== 从网络地址获取二进制数据 ==================== +async function getBinaryFromUrl(url) { + try { + const response = await axios.get(url, { + responseType: 'arraybuffer', + timeout: 60000, + headers: {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'} + }); + if (response.status !== 200) { + throw new Error(`Failed to fetch binary: ${response.status} ${response.statusText}`); + } + return new Uint8Array(response.data); + } catch (error) { + throw new Error(`Request failed: ${error.message}`); + } +} + +// ==================== NAL单元处理 ==================== +function findNALUnits(buffer) { + const nalUnits = []; + let i = 0; + while (i < buffer.length - 3) { + if (buffer[i] === 0x00 && buffer[i + 1] === 0x00) { + let nalStart = -1; + if (buffer[i + 2] === 0x01 && i + 3 < buffer.length) { + nalStart = i + 3; + } else if (buffer[i + 2] === 0x00 && buffer[i + 3] === 0x01 && i + 4 < buffer.length) { + nalStart = i + 4; + } + if (nalStart >= 0) { + let nextStart = buffer.length; + for (let j = nalStart; j < buffer.length - 2; j++) { + if (buffer[j] === 0x00 && buffer[j + 1] === 0x00) { + if (buffer[j + 2] === 0x01 || (buffer[j + 2] === 0x00 && j + 3 < buffer.length && buffer[j + 3] === 0x01)) { + nextStart = j; + break; + } + } + } + const nalData = buffer.subarray(i, nextStart); + if (nalData.length >= 2) { + const header = nalData[nalStart - i]; + const data = nalData.subarray(nalStart - i + 1); + const nal = {header, data, nalUnitType: header & 0x1F}; + nalUnits.push(nal); + } + i = nextStart; + continue; + } + } + i++; + } + return nalUnits; +} + +// ==================== H.264解密核心 ==================== +// 解密H.264数据,保持原始数据结构不变,直接在原buffer上修改 +async function decryptH264InPlace(h264Data) { + let curDate = Date.now().toString(); + const MemoryExtend = 2048; + let vmpTag = ''; + + function _common(o) { + const memory = CNTVH5PlayerModule._jsmalloc(curDate.length + MemoryExtend); + CNTVH5PlayerModule.HEAP8.fill(0, memory, memory + curDate.length + MemoryExtend); + CNTVH5PlayerModule.HEAP8.set(Array.from(curDate, e => e.charCodeAt(0)), memory); + let ret; + switch (o) { + case "InitPlayer": + ret = CNTVH5PlayerModule._CNTV_InitPlayer(memory); + break; + case "UnInitPlayer": + ret = CNTVH5PlayerModule._CNTV_UnInitPlayer(memory); + break; + case "UpdatePlayer": + vmpTag = CNTVH5PlayerModule._CNTV_UpdatePlayer(memory).toString(16); + vmpTag = ['0'.repeat(8 - vmpTag.length), vmpTag].join(''); + ret = 0; + break; + } + CNTVH5PlayerModule._jsfree(memory); + return ret; + } + + function InitPlayer() { + return _common("InitPlayer"); + } + + function UnInitPlayer() { + return _common("UnInitPlayer"); + } + + function UpdatePlayer() { + return _common("UpdatePlayer"); + } + + function decrypt(buf) { + const pageHost = "https://tv.cctv.com"; + const addr = CNTVH5PlayerModule._jsmalloc(buf.length + MemoryExtend); + const StaticCallModuleVod = { + H264NalSet: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD7(t, i, n, r); + }, + H265NalData: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD6(t, i, n, r); + }, + AVS1AudioKey: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD5(t, i, n, r); + }, + HEVC2AAC: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD4(t, i, n, r); + }, + HASHMap: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD3(t, i, n, r); + }, + BASE64Dec: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD2(t, i, n, r); + }, + MediaSession: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD1(t, i, n, r); + }, + Mp4fragment: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD0(t, i, n, r); + }, + MpegAudio: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD8(t, i, n, r); + }, + AACDemuxer: function (e, t, i, n, r) { + return e._jsdecVOD(i, n, r); + } + }; + + function StaticCallModuleVodAPI(e, t, i, n, r, a) { + return StaticCallModuleVod[a](e, t, i, n, r); + } + + CNTVH5PlayerModule.HEAP8.set(buf, addr); + CNTVH5PlayerModule.HEAP8.set(Array.from(pageHost, e => e.charCodeAt(0)), addr + buf.length); + const addr2 = CNTVH5PlayerModule._jsmalloc(curDate.length); + CNTVH5PlayerModule.HEAP8.set(Array.from(curDate, e => e.charCodeAt(0)), addr2); + + for (const i in vmpTag) + if ("0123456".includes(vmpTag[i])) + StaticCallModuleVodAPI(CNTVH5PlayerModule, addr2, addr, buf.length, pageHost.length, Object.keys(StaticCallModuleVod)[i]); + + const decRet = StaticCallModuleVodAPI(CNTVH5PlayerModule, addr2, addr, buf.length, pageHost.length, Object.keys(StaticCallModuleVod)[8]); + const retBuffer = Buffer.from(CNTVH5PlayerModule.HEAP8.subarray(addr, addr + decRet)); + + CNTVH5PlayerModule._jsfree(addr); + CNTVH5PlayerModule._jsfree(addr2); + return retBuffer; + } + + // 找到所有NAL单元及其在原始buffer中的位置 + const nalUnits = []; + let i = 0; + while (i < h264Data.length - 3) { + if (h264Data[i] === 0x00 && h264Data[i + 1] === 0x00) { + let startCodeLen = 0; + let nalStart = -1; + + // 查找起始码 + if (h264Data[i + 2] === 0x01 && i + 3 < h264Data.length) { + startCodeLen = 3; + nalStart = i + 3; + } else if (h264Data[i + 2] === 0x00 && h264Data[i + 3] === 0x01 && i + 4 < h264Data.length) { + startCodeLen = 4; + nalStart = i + 4; + } + + if (nalStart >= 0) { + // 找到下一个起始码位置 + let nextStart = h264Data.length; + for (let j = nalStart; j < h264Data.length - 2; j++) { + if (h264Data[j] === 0x00 && h264Data[j + 1] === 0x00) { + if (h264Data[j + 2] === 0x01 || (h264Data[j + 2] === 0x00 && j + 3 < h264Data.length && h264Data[j + 3] === 0x01)) { + nextStart = j; + break; + } + } + } + + const header = h264Data[nalStart]; + const dataStart = nalStart + 1; + const dataEnd = nextStart; + const nalUnitType = header & 0x1F; + + nalUnits.push({ + startCodePos: i, + startCodeLen: startCodeLen, + headerPos: nalStart, + dataPos: dataStart, + dataEnd: dataEnd, + header: header, + data: h264Data.subarray(dataStart, dataEnd), + nalUnitType: nalUnitType + }); + + i = nextStart; + continue; + } + } + i++; + } + + // 解密并替换原始buffer中的数据 + let shouldDecrypt = false; + curDate = Date.now().toString(); + InitPlayer(); + + // 创建可写的buffer副本 + const resultBuffer = Buffer.from(h264Data); + + for (const nal of nalUnits) { + UpdatePlayer(); + + const bufToDecrypt = Buffer.concat([Buffer.from([nal.header]), nal.data]); + if (nal.nalUnitType === 25) { + shouldDecrypt = nal.data[0] === 1; + if (shouldDecrypt) { + decrypt(bufToDecrypt); + } + } else if ((nal.nalUnitType === 1 || nal.nalUnitType === 5) && shouldDecrypt) { + const decrypted = decrypt(bufToDecrypt); + // 直接替换原始数据,保持起始码不变 + const decryptedData = decrypted.subarray(1); // 跳过header,因为decrypted包含了header + const writePos = nal.dataPos; + + // 如果解密后数据小于等于原始空间,直接替换 + if (decryptedData.length <= nal.dataEnd - nal.dataPos) { + decryptedData.copy(resultBuffer, writePos); + // 如果解密后数据更小,填充0 + if (decryptedData.length < nal.dataEnd - nal.dataPos) { + resultBuffer.fill(0, writePos + decryptedData.length, nal.dataEnd); + } + } else { + // 解密后数据更大,截断到原始大小 + decryptedData.copy(resultBuffer, writePos, 0, nal.dataEnd - nal.dataPos); + } + } + } + UnInitPlayer(); + + return resultBuffer; +} + +// ==================== TS解密处理函数 ==================== +async function Parse_TS(buffer) { + // 确保WASM模块已初始化 + await initWasmModule(); + + const originalTS = Buffer.from(buffer); + + // 提取所有视频PID的payload,按PES包分组 + const videoPESPackets = []; + let currentPESPayload = []; + let currentPESHeader = null; + let inPES = false; + + for (let i = 0; i < originalTS.length; i += TS_PACKET_SIZE) { + if (i + TS_PACKET_SIZE > originalTS.length) break; + const packet = originalTS.subarray(i, i + TS_PACKET_SIZE); + if (packet[0] !== 0x47) continue; + + const pid = ((packet[1] & 0x1F) << 8) | packet[2]; + if (pid !== VIDEO_PID) continue; + + const payloadStart = (packet[1] & 0x40) !== 0; + const adaptation = (packet[3] & 0x20) !== 0; + const payload = (packet[3] & 0x10) !== 0; + + let offset = 4; + if (adaptation && offset < 188) { + const adaptationLen = packet[offset]; + offset += adaptationLen + 1; + } + + if (payload && offset < 188) { + const data = packet.subarray(offset); + + if (payloadStart) { + // 保存上一个PES包 + if (inPES && currentPESPayload.length > 0 && currentPESHeader) { + const h264Data = Buffer.concat(currentPESPayload); + videoPESPackets.push({ + header: currentPESHeader, + data: h264Data + }); + } + + // 开始新的PES包 - 保存完整PES头 + // 找到PES头结束位置:检查PES_header_data_length + // PES结构: [00 00 01] [stream_id] [len] [flags] [flags] [header_len] ... + let pesHeaderEnd = 9; // 最小PES头长度 + if (data.length >= 9) { + // 第8字节是PES_header_data_length (从0开始计数) + pesHeaderEnd = 9 + data[8]; + } + pesHeaderEnd = Math.min(pesHeaderEnd, data.length); + + currentPESHeader = data.subarray(0, pesHeaderEnd); + currentPESPayload = [data.subarray(pesHeaderEnd)]; + inPES = true; + } else if (inPES) { + currentPESPayload.push(data); + } + } + } + + // 保存最后一个PES包 + if (inPES && currentPESPayload.length > 0 && currentPESHeader) { + const h264Data = Buffer.concat(currentPESPayload); + videoPESPackets.push({ + header: currentPESHeader, + data: h264Data + }); + } + + // 合并所有H.264数据进行解密 + let totalH264 = Buffer.alloc(0); + for (const pes of videoPESPackets) { + totalH264 = Buffer.concat([totalH264, pes.data]); + } + + // 解密所有H.264数据 + const decryptedH264 = await decryptH264InPlace(totalH264); + + // 将解密后的数据按原始PES包大小分配回去 + let h264Offset = 0; + const resultTS = Buffer.alloc(originalTS.length); + + for (let i = 0; i < originalTS.length; i += TS_PACKET_SIZE) { + if (i + TS_PACKET_SIZE > originalTS.length) break; + const origPacket = originalTS.subarray(i, i + TS_PACKET_SIZE); + + // 复制非视频包 + if (origPacket[0] !== 0x47) { + origPacket.copy(resultTS, i); + continue; + } + + const pid = ((origPacket[1] & 0x1F) << 8) | origPacket[2]; + if (pid !== VIDEO_PID) { + origPacket.copy(resultTS, i); + continue; + } + + const payloadStart = (origPacket[1] & 0x40) !== 0; + const adaptation = (origPacket[3] & 0x20) !== 0; + const payload = (origPacket[3] & 0x10) !== 0; + + let offset = 4; + if (adaptation && offset < 188) { + const adaptationLen = origPacket[offset]; + offset += adaptationLen + 1; + } + + // 创建新包 + const newPacket = Buffer.alloc(TS_PACKET_SIZE); + origPacket.copy(newPacket, 0, 0, offset); + + if (payload && offset < 188) { + const data = origPacket.subarray(offset); + + if (payloadStart) { + // PES包开始 - 复制PES头 + let pesHeaderEnd = 9; + if (data.length >= 9) { + pesHeaderEnd = 9 + data[8]; + } + pesHeaderEnd = Math.min(pesHeaderEnd, data.length); + + origPacket.copy(newPacket, offset, offset, offset + pesHeaderEnd); + offset += pesHeaderEnd; + + // 填充解密后的H.264数据 + const remaining = TS_PACKET_SIZE - offset; + const toCopy = Math.min(remaining, decryptedH264.length - h264Offset); + if (toCopy > 0) { + decryptedH264.copy(newPacket, offset, h264Offset, h264Offset + toCopy); + h264Offset += toCopy; + offset += toCopy; + } + newPacket.fill(0xFF, offset); + } else { + // 继续填充数据 + const remaining = TS_PACKET_SIZE - offset; + const toCopy = Math.min(remaining, decryptedH264.length - h264Offset); + if (toCopy > 0) { + decryptedH264.copy(newPacket, offset, h264Offset, h264Offset + toCopy); + h264Offset += toCopy; + offset += toCopy; + } + newPacket.fill(0xFF, offset); + } + } + + newPacket.copy(resultTS, i); + } + + return resultTS; +} + +// ==================== 主处理函数 ==================== +async function processFile(url, extension) { + // 下载原始TS文件 + let buffer = await getBinaryFromUrl(url); + + // 如果是.ts文件,调用Parse_TS进行解密 + if (extension === '.ts') { + buffer = await Parse_TS(buffer); + } + + return buffer; +} + +module.exports = { + processFile, +} diff --git "a/drpy-node-bundle/spider/js/\345\244\256\350\247\206\345\244\247\345\205\250[\345\256\230].js" "b/drpy-node-bundle/spider/js/\345\244\256\350\247\206\345\244\247\345\205\250[\345\256\230].js" new file mode 100644 index 00000000..1c11ebbb --- /dev/null +++ "b/drpy-node-bundle/spider/js/\345\244\256\350\247\206\345\244\247\345\205\250[\345\256\230].js" @@ -0,0 +1,532 @@ +/* +@header({ + searchable: 1, + filterable: 1, + quickSearch: 0, + title: '央视大全', + lang: 'ds' +}) +*/ + +// const {processFile, indexHtml} = $.require('./_lib.cntv.js'); +const {parseCCTVUrl, detectInputType, getVideoInfoByPid} = require('./_lib.cntv-urlparse.cjs'); +const {processFile} = require('./_lib.cntv2026.cjs'); +const {indexHtml} = $.require('./_lib.cntv.js'); +const {setH5Str} = $.require('./_lib.cntv.live.js'); +var rule = { + title: '央视大全', + host: 'https://api.cntv.cn', + homeUrl: '/lanmu/columnSearch?&fl=&fc=&cid=&p=1&n=500&serviceId=tvcctv&t=json', + // url: '/list/getVideoAlbumList?fyfilter&area=&letter=&n=24&serviceId=tvcctv&topv=1&t=json', + url: '/list/getVideoAlbumList?p=fypage&n=24&serviceId=tvcctv&topv=1&t=json', + searchUrl: 'https://search.cctv.com/ifsearch.php?page=fypage&qtext=**&sort=relevance&pageSize=20&type=video&vtime=-1&datepid=1&channel=&pageflag=0&qtext_str=**', + searchable: 1, + filterable: 1, + quickSearch: 0, + class_name: '4K专区&栏目大全&特别节目&纪录片&电视剧&动画片', + class_url: '4K专区&栏目大全&特别节目&纪录片&电视剧&动画片', + filter_url: 'channel={{fl.channel}}&sc={{fl.sc}}&bigday={{fl.bigday}}&year={{fl.year}}', + filter: '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', + headers: { + 'User-Agent': 'PC_UA' + }, + timeout: 10000, + play_parse: true, + lazy: async function () { + let {input, flag, getProxyUrl} = this; + // log(input); + // log(flag); + let guid = ''; + let url = ''; + if (flag === 'CCTV') { + guid = input; + url = await getM3u8(guid, getProxyUrl); + } else if (flag === 'CCTV4K') { + guid = input; + // url = 'https://hls09.cntv.myhwcdn.cn/asp/hls/4000/0303000a/3/default/' + guid + '/4000.m3u8'; + url = await getM3u8(guid, getProxyUrl); + } else if (flag === 'CCTV直播') { + let channel = input.split('/').slice(-2)[0]; + url = `https://vdnx.live.cntv.cn/api/v3/vdn/live?channel=${channel}&vn=1`; + // log(channel); + let authKey = getAuthKey(channel); + let html = await request(url, {headers: {'auth-key': authKey}}); + let json = JSON.parse(html); + let indexM3u8 = json.manifest.hls_cdrm.split('?')[0]; // 不去除问号后面的内容的话只能获取到最高720p分辨率 + // log(indexM3u8); + html = await request(indexM3u8); + let hdUrl = html.split('\n').find(i => i && !i.startsWith('#')); + hdUrl = urljoin(indexM3u8, hdUrl); + // log(html); + // log(hdUrl); + return { + parse: 0, + url: getProxyUrl() + '&url=' + base64Encode(hdUrl) + '#.m3u8', + header: {'user-agent': PC_UA, 'referer': 'https://tv.cctv.com/', 'origin': 'https://tv.cctv.com/'} + } + } else { + let html = await request(input); + guid = getRegexText(html, 'var\\sguid\\s*=\\s*"(.+?)";', 1); + url = await getM3u8(guid, getProxyUrl); + } + return { + parse: 0, + url: url, + headers: rule.headers + } + }, + limit: 6, + double: false, + + 推荐: async function () { + let {input, publicUrl} = this; + let liveImgUrl = urljoin(publicUrl, './images/lives.jpg'); + let html = await request(input); + let vods = get_list_lm(html, '栏目大全'); + vods.unshift({ + vod_name: '央视直播', + vod_pic: liveImgUrl, + vod_id: 'https://tv.cctv.com/epg/index.shtml#央视直播', + vod_remarks: 'CCTV台', + }); + return vods + }, + + 一级: async function () { + let {input, MY_CATE, MY_FL, MY_PAGE} = this; + let page_count = 24; + let queryString = objectToQueryString(MY_FL); + let year_prefix = '' //栏目大全的年月筛选过滤 + if (MY_CATE === '栏目大全') { + page_count = 20; + let url = `${HOST}/lanmu/columnSearch?p=${MY_PAGE}&n=${page_count}&serviceId=tvcctv&t=json`; + if (queryString) { + url += `&${queryString}`; + } + let year = MY_FL.year || ''; + let month = MY_FL.month || ''; + if (year) { + year_prefix = year + month + } + let html = await request(url); + return get_list_lm(html, MY_CATE, year_prefix) + + } else if (MY_CATE === '4K专区') { + let cid = 'CHAL1558416868484111' + let url = `${HOST}/NewVideo/getLastVideoList4K?serviceId=cctv4k&cid=${cid}&p=${MY_PAGE}&n=${page_count}&t=json`; + let html = await request(url); + return get_list_4k(html, MY_CATE); + } else { + let channelMap = { + "特别节目": "CHAL1460955953877151", + "纪录片": "CHAL1460955924871139", + "电视剧": "CHAL1460955853485115", + "动画片": "CHAL1460955899450127", + }; + let channelid = channelMap[MY_CATE]; + let url = input + `&channelid=${channelid}`; + if (queryString) { + url += `&${queryString}`; + } + let html = await request(url); + return get_list_pk(html, MY_CATE) + } + }, + 二级: async function () { + let {orId, publicUrl, pdfa} = this; + // log('orId:', orId); + let vid = orId; + if (vid.includes('#央视直播')) { + let html = await request(vid); + let video_list = []; + let list = pdfa(html, '#jiemudan01&&.channel_con&&ul&&li'); + // log(list); + list.forEach((it) => { + let _title = pdfh(it, 'img&&title'); + let _url = `https://tv.cctv.com/live/${_title}/`; + video_list.append(`${_title}$${_url}`); + }); + let liveImgUrl = urljoin(publicUrl, './images/lives.jpg'); + let vod = { + "vod_id": vid, + "vod_name": 'CCTV直播频道列表', + "vod_pic": liveImgUrl, + "type_name": '直播', + "vod_year": '', + "vod_area": "", + "vod_remarks": '只含官方CCTV频道', + "vod_actor": '', + "vod_director": '', + "vod_content": '并非全部高清分辨率,取官方网页版最高分辨率' + }; + vod['vod_play_from'] = 'CCTV直播'; + vod['vod_play_url'] = video_list.join('#'); + return vod + } + let year_prefix = ''; + if (orId.includes('$$$')) { + year_prefix = orId.split('$$$')[0]; + vid = orId.split('$$$')[1]; + } + let aid = vid.split('||'); + let tid = aid[0]; + let title = aid[1]; + let lastVideo = aid[2]; + let logo = aid[3]; + let id = aid[4]; + let vod_year = aid[5]; + let actors = aid.length > 6 ? aid[6] : ''; + let brief = aid.length > 7 ? aid[7] : ''; + let count = aid.length > 8 ? aid[8] : ''; + let desc = aid.length > 9 ? aid[9] : ''; + let fromId = 'CCTV'; + let reqUrl = ''; + if (tid === '栏目大全') { + let lastUrl = `https://api.cntv.cn/video/videoinfoByGuid?guid=${id}&serviceId=tvcctv`; + let html = await request(lastUrl); + let topicId = JSON.parse(html).ctid; + reqUrl = `https://api.cntv.cn/NewVideo/getVideoListByColumn?id=${topicId}&d=&p=1&n=100&sort=desc&mode=0&serviceId=tvcctv&t=json&d=${year_prefix}`; + } else if (tid === '4K专区') { + reqUrl = `https://api.cntv.cn/NewVideo/getVideoListByAlbumIdNew?id=${id}&serviceId=cctv4k&p=1&n=100&mode=0&pub=1`; + fromId = 'CCTV4K'; + } else { + reqUrl = `https://api.cntv.cn/NewVideo/getVideoListByAlbumIdNew?id=${id}&serviceId=tvcctv&p=1&n=100&mode=0&pub=1`; + } + let video_list = []; + try { + if (tid === '搜索') { + fromId = '中央台'; + video_list = [title + "$" + lastVideo]; + } else { + let html = await request(reqUrl); + let list = JSON.parse(html).data.list; + video_list = get_episodes_list(list); + if (video_list.length < 1) { + html = await request(lastVideo); + let patternTxt; + if (['电视剧', '纪录片', '4K专区'].includes(tid)) { + // 调整为普通捕获组 + patternTxt = "'title':\\s*'(.+?)',\\n{0,1}\\s*'brief':\\s*'(.+?)',\\n{0,1}\\s*'img':\\s*'(.+?)',\\n{0,1}\\s*'url':\\s*'(.+?)'"; + } else if (tid === '特别节目') { + // 调整为普通捕获组 + patternTxt = "class=\"tp1\">"; + } else if (tid === '动画片') { + patternTxt = `'title':\\s*'(.+?)',\\n{0,1}\\s*'img':\\s*'(.+?)',\\n{0,1}\\s*'brief':\\s*'(.+?)',\\n{0,1}\\s*'url':\\s*'(.+?)'`; + } else if (tid === '栏目大全') { + // 调整为普通捕获组 + patternTxt = "href=\"(.+?)\" target=\"_blank\" alt=\"(.+?)\" title=\".+?\">"; + } + video_list = get_episodes_list_re(html, patternTxt, tid); + fromId = '央视'; + } + } + } catch (e) { + log(`解析二级发生了错误: ${e.message}`); + } + if (video_list.length < 1) { + return {} + } + let vod = { + "vod_id": vid, + "vod_name": title.replace(' ', ''), + "vod_pic": logo, + "type_name": tid, + "vod_year": vod_year, + "vod_area": "", + "vod_remarks": count ? `共${count}集` : desc, + "vod_actor": actors, + "vod_director": '', + "vod_content": brief + }; + vod['vod_play_from'] = fromId; + vod['vod_play_url'] = video_list.join('#'); + return vod + }, + 搜索: async function () { + let {input} = this; + let html = await request(input); + return get_list_search(html, '搜索'); + }, + proxy_rule: async function () { + let {input, proxyPath, getProxyUrl} = this; + // log('input:', input); + // log('proxyPath:', proxyPath); + let url = ''; + let is_live = 0; + if (proxyPath) { + // const BASE_URL = 'https://dh5.cntv.qcloudcdn.com/'.rstrip('/'); + // const BASE_URL = 'https://dh5.cntv.myalicdn.com/'.rstrip('/'); + // url = `${BASE_URL}/${proxyPath}`; + url = proxyPath; + } else { + url = base64Decode(input.split('#')[0]); + is_live = 1; + } + log('start proxy:', url); + try { + const filename = pathLib.basename(new URL(url).pathname); + const extension = pathLib.extname(filename).toLowerCase(); + // log('filename:', filename); + // log('extension:', extension); + if (extension !== '.ts' && extension !== '.m3u8') { + if (filename.endsWith('index.html')) { + return [200, 'text/html', indexHtml] + } + return [400, 'text/plain', 'Only .ts and .m3u8 files are supported'] + } + if (is_live && extension === '.m3u8') { + // log('处理直播的m3u8地址'); + let proxy_url = getProxyUrl(); + let html = await request(url); + let m3u8Str = html.split('\n').map((it) => { + if (it && !it.startsWith("#")) { + return proxy_url + '&url=' + base64Encode(urljoin(url, it)); + } + return it + }).join('\n'); + // log(m3u8Str); + return [200, 'application/vnd.apple.mpegurl', m3u8Str] + } + const contentType = extension === '.ts' ? 'video/MP2T' : 'application/vnd.apple.mpegurl'; + // log('url:', url); + const buffer = await processFile(url, extension); + const headers = { + 'Content-Disposition': `attachment; filename="${filename}"`, + 'Content-Type': contentType, + } + return [200, contentType, buffer, headers] + + } catch (e) { + log('proxy error:', e.message); + return [500, 'text/plain', e.message] + } + }, +} + +// 获取片库一级数据 +function get_list_pk(html, tid) { + let d = []; + let list = JSON.parse(html).data.list; + list.forEach(it => { + let url = it.url; + let title = it.title; + let desc = it.sc + ((typeof it.year === 'undefined' || it.year === '') ? '' : ('•' + it.year)) + ((typeof it.count === 'undefined' || it.count === '') ? '' : ('•共' + it.count + '集')); + let img = it.image; + let id = it.id; + let brief = it.brief || ''; + let year = it.year || ''; + let actors = it.actors || ''; + let count = it.count; + if (url) { + let guids = [tid, title, url, img, id, year, actors, brief, count]; + let guid = guids.join('||'); + d.push({ + title: title, + desc: desc, + pic_url: img, + url: guid + }); + } + }); + return setResult(d) +} + +// 获取栏目一级数据 +function get_list_lm(html, tid, year_prefix) { + let d = []; + let list = JSON.parse(html).response.docs; + list.forEach(it => { + let id = it.lastVIDE.videoSharedCode; + let desc = it.lastVIDE.videoTitle; + let title = it.column_name; + let url = it.column_website; + let img = it.column_logo; + let year = it.column_playdate; + let actors = ''; + let brief = it.column_brief; + let count = it.count; + if (url.toString().length > 0) { + let guids = [tid, title, url, img, id, year, actors, brief, count, desc]; + let guid = guids.join('||'); + //log(`✅guid的结果: ${guid}`); + d.push({ + title: title, + desc: desc.includes('》') ? desc.split('》')[1].strip() : desc.strip(), + pic_url: img, + url: year_prefix ? year_prefix + '$$$' + guid : guid + }); + + } + }); + return setResult(d) +} + +// 获取4k一级数据 +function get_list_4k(html, tid) { + let d = []; + let list = JSON.parse(html).data.list; + list.forEach(it => { + let desc = it.sc + ' ' + it.title; + let id = it.id; + let vod = it.last_video; + let img = vod.image; + let url = vod.url; + let title = vod.title; + let brief = vod.brief || ''; + let year = vod.year || ''; + let actors = vod.actors || ''; + let count = it.count; + if (url) { + let guids = [tid, title, url, img, id, year, actors, brief, count]; + let guid = guids.join('||'); + d.push({ + title: title, + desc: desc, + pic_url: img, + url: guid, + }) + } + }); + return setResult(d) +} + +// 获取搜索列表数据 +function get_list_search(html, tid) { + let d = []; + let list = JSON.parse(html).list; + list.forEach(it => { + let url = it.urllink; + let title = removeHtml(it.title); + let img = it.imglink; + let vid = it.id; + let brief = it.channel; + let year = it.uploadtime; + if (url) { + let guids = [tid, title, url, img, vid, year, '', brief]; + let guid = "||".join(guids); + d.push({ + title: title, + desc: year, + pic_url: img, + url: guid, + + }); + } + }); + return setResult(d) +} + +// 获取集数 +function get_episodes_list(json_list) { + let videos = [] + for (const vod of json_list) { + let url = vod['guid']; + let title = vod['title']; + if (url) { + videos.append(title + "$" + url); + } + } + return videos +} + +// 获取集数列表 +function get_episodes_list_re(htmlTxt, patternTxt, tid) { + const regex = new RegExp(patternTxt, 'gm'); // 全局和多行匹配 + const matches = [...htmlTxt.matchAll(regex)]; // 获取所有匹配项 + const videos = []; + + for (const match of matches) { + let title = null; + let url = null; + if (['电视剧', '纪录片', '4K专区', '动画片'].includes(tid)) { + title = match[1]; + url = match[4]; + } else { + title = match[2]; + url = match[1]; + } + if (!title || !url) continue; // 如果没有 title 或 url,跳过 + videos.push(`${title}$${url}`); + } + + return videos; +} + +function removeHtml(txt) { + // 使用正则表达式移除 HTML 标签 + const htmlTagRegex = /<[^>]+>/g; + txt = txt.replace(htmlTagRegex, ''); + + // 替换 " " 为普通空格 + return txt.replace(/ /g, ' '); +} + +// 正则取文本 +function getRegexText(text, regexText, index) { + let returnTxt = ""; + const regex = new RegExp(regexText, 'ms'); // 'm' 多行匹配, 's' 让 '.' 匹配换行符 + const match = text.match(regex); + + if (!match) { + returnTxt = ""; + } else { + returnTxt = match[index] || ""; + } + + return returnTxt; +} + +async function getM3u8(pid, getProxyUrl) { + const info = await getVideoInfoByPid(pid); + const proxy_path = info.download_url; + log('[getM3u8] proxy_path:', proxy_path); + return getProxyUrl().split('?')[0].rstrip('/') + '/' + proxy_path; +} + +async function getM3u8Old(pid, getProxyUrl) { + const url = `https://vdn.apps.cntv.cn/api/getHttpVideoInfo.do?pid=${pid}`; + const htmlTxt = await request(url); + const jo = JSON.parse(htmlTxt); + const link = jo.hls_url.trim(); + const link1 = jo.manifest.hls_h5e_url.trim(); + const urlPrefix = link.match(/(http[s]?:\/\/[a-zA-Z0-9.]+)\//)?.[1] || ''; + let newLink = link1.split('?')[0]; + newLink = newLink.replace('https://dh5.cntv.qcloudcdn.com', 'https://dh5.cntv.myhwcdn.cn'); + const htmlResponse = await request(newLink); + const content = htmlResponse.trim(); + const arr = content.split('\n'); + const subUrl = arr[arr.length - 1].split('/'); + const maxVideo = subUrl[subUrl.length - 1].replace('.m3u8', ''); + let hdUrl = link.replaceAll('main', maxVideo); + if (hdUrl === '') { + hdUrl = '2000'; + } + hdUrl = hdUrl.replace(urlPrefix, 'https://newcntv.qcloudcdn.com'); + /* + const hdResponse = await request(hdUrl); + if (hdResponse) { + return hdUrl.split('?')[0]; + } else { + return ''; + } + */ + return hookM3u8(hdUrl.split('?')[0], getProxyUrl); +} + +function hookM3u8(url, getProxyUrl) { + let proxy_path = url.replace('https://newcntv.qcloudcdn.com', '').replace('/asp/hls/', '/asp/h5e/hls/'); + let proxy_url = getProxyUrl().split('?')[0].rstrip('/') + proxy_path; + // log('proxy_url:', proxy_url); + log('typeof WebAssembly:', typeof WebAssembly); + return proxy_url +} + +function getAuthKey(channel) { + // channel 如 cctv1 + let time = new Date().getTime(); + let key = "a4220a71b31746908fa3e7fdd7a6852a"; + let number = Math.round(Math.random() * 1000); + number - 100 < 0 && (number += 100); + let authKey = time + "-" + number + "-" + setH5Str(channel + time + number + key).toLocaleLowerCase(); + return authKey +} \ No newline at end of file diff --git "a/drpy-node-bundle/spider/js/\350\256\276\347\275\256\344\270\255\345\277\203.js" "b/drpy-node-bundle/spider/js/\350\256\276\347\275\256\344\270\255\345\277\203.js" index 1db8bd51..d082198e 100644 --- "a/drpy-node-bundle/spider/js/\350\256\276\347\275\256\344\270\255\345\277\203.js" +++ "b/drpy-node-bundle/spider/js/\350\256\276\347\275\256\344\270\255\345\277\203.js" @@ -65,6 +65,7 @@ let quick_data = { 阿里: 'https://www.alipan.com/s/vgXMcowK8pQ', 天翼: 'https://cloud.189.cn/web/share?code=INJbU3NbqyUj', 百度: 'https://pan.baidu.com/s/1L0UIv4p0X0QrbbKErJuc_w?pwd=2pwj', + 迅雷: 'https://pan.xunlei.com/s/VOkBwLBNoXN8eO9WrcVbXdTcA1?pwd=8tvj#', 移动1: 'https://yun.139.com/shareweb/#/w/i/0i5CLQ7BpV7Ai', 移动2: 'https://caiyun.139.com/m/i?2jexC1gcjeN7q', 移动3: 'https://yun.139.com/shareweb/#/w/i/2i2MoE9ZHn9p1', @@ -481,8 +482,7 @@ var rule = { vod_name: '测试代理流', vod_play_from: 'drpyS本地流代理', // vod_play_url: '测试播放流$' + getProxyUrl().split('?')[0] + media_url + '#不代理直接播$' + media_url + '#8k播放$' + m3u8_url, - // vod_play_url: '测试播放流$' + getProxyUrl().split('?')[0] + media_url + '#不代理直接播$' + media_url - vod_play_url: '测试播放流$' + getProxyUrl() + '&url=' + media_url + '#不代理直接播$' + media_url + vod_play_url: '测试播放流$' + getProxyUrl().split('?')[0] + media_url + '#不代理直接播$' + media_url } } }, @@ -491,16 +491,15 @@ var rule = { let {input} = this; return {parse: 0, url: input} }, - proxy_rule: async function (params) { + proxy_rule: async function () { let {input, proxyPath} = this; - const url = proxyPath || params.url; + const url = proxyPath; log('start proxy:', url); try { const headers = { 'user-agent': PC_UA, } - // return [200, null, url, headers, 2] - return [302, null, '', {location: url}] + return [200, null, url, headers, 2] } catch (e) { log('proxy error:', e.message); return [500, 'text/plain', e.message] diff --git a/drpy-node-mcp/.mcpbignore b/drpy-node-mcp/.mcpbignore new file mode 100644 index 00000000..52045997 --- /dev/null +++ b/drpy-node-mcp/.mcpbignore @@ -0,0 +1,7 @@ +* +!dist +!dist/** +!manifest.json +!node_modules +!node_modules/node-sqlite3-wasm +!node_modules/node-sqlite3-wasm/** \ No newline at end of file diff --git a/drpy-node-mcp/drpy-node-mcp.mcpb b/drpy-node-mcp/drpy-node-mcp.mcpb new file mode 100644 index 00000000..cb5765f9 Binary files /dev/null and b/drpy-node-mcp/drpy-node-mcp.mcpb differ diff --git a/drpy-node-mcp/manifest.json b/drpy-node-mcp/manifest.json new file mode 100644 index 00000000..ebe0e5d1 --- /dev/null +++ b/drpy-node-mcp/manifest.json @@ -0,0 +1,121 @@ +{ + "dxt_version": "0.1", + "name": "drpy-node-mcp", + "display_name": "Drpy Node MCP", + "version": "1.0.0", + "description": "MCP server for drpy-node: spider development, debugging, and file management tools", + "long_description": "A comprehensive MCP server for drpy-node development. Provides tools for spider source management, rule debugging, file operations, database queries, and system configuration. Supports parsing HTML with drpy rules, validating spider syntax, and managing the drpy-node service.", + "homepage": "https://github.com/hjdhnx/drpy-node/tree/main/drpy-node-mcp", + "author": { + "name": "hjdhnx", + "url": "https://github.com/hjdhnx/" + }, + "repository": { + "type": "git", + "url": "https://github.com/hjdhnx/drpy-node" + }, + "documentation": "https://github.com/hjdhnx/drpy-node/tree/main/drpy-node-mcp#readme", + "license": "AGPL-3.0", + "keywords": [ + "drpy-node" + ], + "server": { + "type": "node", + "entry_point": "dist/index.js", + "mcp_config": { + "command": "node", + "args": [ + "${__dirname}/dist/index.js" + ], + "env": {} + } + }, + "user_config": { + "ROOT": { + "type": "string", + "title": "Project Root Directory", + "description": "Absolute path to your drpy-node project root directory. Leave empty to use auto-detection (looks for .drpy-root marker file or parent directory).", + "default": "/Users/hiram/Data/code/drpy-node/", + "required": false + } + }, + "tools": [ + { + "name": "list_directory", + "description": "List files and directories in the project" + }, + { + "name": "read_file", + "description": "Read the content of a file (automatically decodes DS sources)" + }, + { + "name": "write_file", + "description": "Write content to a file (creates directories if needed)" + }, + { + "name": "delete_file", + "description": "Delete a file or directory" + }, + { + "name": "list_sources", + "description": "List all spider sources (js and catvod)" + }, + { + "name": "get_routes_info", + "description": "Get information about registered routes/controllers" + }, + { + "name": "fetch_spider_url", + "description": "Fetch a URL using drpy-node's request library to debug connectivity and anti-crawling measures" + }, + { + "name": "debug_spider_rule", + "description": "Debug drpy spider rules by parsing HTML or fetching URL" + }, + { + "name": "get_spider_template", + "description": "Get a standard template for creating a new drpy JS source" + }, + { + "name": "get_drpy_libs_info", + "description": "Get information about available global helper functions and libraries in drpy environment" + }, + { + "name": "validate_spider", + "description": "Validate a drpy spider file (syntax check + structure validation)" + }, + { + "name": "check_syntax", + "description": "Check syntax of a JavaScript file" + }, + { + "name": "sql_query", + "description": "Execute a read-only SQL query on the project database" + }, + { + "name": "read_logs", + "description": "Read the latest application logs" + }, + { + "name": "manage_config", + "description": "Read or update the project configuration" + }, + { + "name": "restart_service", + "description": "Restart the drpy-node service" + } + ], + "tools_generated": false, + "prompts_generated": false, + "compatibility": { + "claude_desktop": ">=0.10.0", + "platforms": [ + "darwin", + "win32", + "linux" + ], + "runtimes": { + "node": ">=18.0.0" + } + } +} diff --git a/drpy-node-mcp/package-lock.json b/drpy-node-mcp/package-lock.json index c9e619a9..94262135 100644 --- a/drpy-node-mcp/package-lock.json +++ b/drpy-node-mcp/package-lock.json @@ -9,10 +9,47 @@ "version": "1.0.0", "dependencies": { "@modelcontextprotocol/sdk": "^1.0.1", + "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^15.2.3", "fs-extra": "^11.2.0", "node-sqlite3-wasm": "^0.8.53", "zod": "^3.23.8", "zod-to-json-schema": "^3.25.1" + }, + "bin": { + "drpy-node-mcp": "dist/index.js" + }, + "devDependencies": { + "@anthropic-ai/mcpb": "^2.1.2", + "@rollup/plugin-commonjs": "^29.0.2", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^16.0.3", + "rollup": "^4.59.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@anthropic-ai/mcpb": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@anthropic-ai/mcpb/-/mcpb-2.1.2.tgz", + "integrity": "sha512-goRbBC8ySo7SWb7tRzr+tL6FxDc4JPTRCdgfD2omba7freofvjq5rom1lBnYHZHo6Mizs1jAHJeN53aZbDoy8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/prompts": "^6.0.1", + "commander": "^13.1.0", + "fflate": "^0.8.2", + "galactus": "^1.0.0", + "ignore": "^7.0.5", + "node-forge": "^1.3.2", + "pretty-bytes": "^5.6.0", + "zod": "^3.25.67", + "zod-to-json-schema": "^3.24.6" + }, + "bin": { + "mcpb": "dist/cli/cli.js" } }, "node_modules/@hono/node-server": { @@ -27,6 +64,234 @@ "hono": "^4" } }, + "node_modules/@inquirer/checkbox": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-3.0.1.tgz", + "integrity": "sha512-0hm2nrToWUdD6/UHnel/UKGdk1//ke5zGUpHIvk5ZWmaKezlGxZkOJXNSWsdxO/rEqTkbB3lNC2J6nBElV2aAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/figures": "^1.0.6", + "@inquirer/type": "^2.0.0", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/confirm": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-4.0.1.tgz", + "integrity": "sha512-46yL28o2NJ9doViqOy0VDcoTzng7rAb6yPQKU7VDLqkmbCaH4JqK4yk4XqlzNWy9PVC5pG1ZUXPBQv+VqnYs2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/type": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/core": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-9.2.1.tgz", + "integrity": "sha512-F2VBt7W/mwqEU4bL0RnHNZmC/OxzNx9cOYxHqnXX3MP6ruYvZUZAW9imgN9+h/uBT/oP8Gh888J2OZSbjSeWcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/figures": "^1.0.6", + "@inquirer/type": "^2.0.0", + "@types/mute-stream": "^0.0.4", + "@types/node": "^22.5.5", + "@types/wrap-ansi": "^3.0.0", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "mute-stream": "^1.0.0", + "signal-exit": "^4.1.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/editor": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-3.0.1.tgz", + "integrity": "sha512-VA96GPFaSOVudjKFraokEEmUQg/Lub6OXvbIEZU1SDCmBzRkHGhxoFAVaF30nyiB4m5cEbDgiI2QRacXZ2hw9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/type": "^2.0.0", + "external-editor": "^3.1.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/expand": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-3.0.1.tgz", + "integrity": "sha512-ToG8d6RIbnVpbdPdiN7BCxZGiHOTomOX94C2FaT5KOHupV40tKEDozp12res6cMIfRKrXLJyexAZhWVHgbALSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/type": "^2.0.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/figures": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.15.tgz", + "integrity": "sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/input": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-3.0.1.tgz", + "integrity": "sha512-BDuPBmpvi8eMCxqC5iacloWqv+5tQSJlUafYWUe31ow1BVXjW2a5qe3dh4X/Z25Wp22RwvcaLCc2siHobEOfzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/type": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/number": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-2.0.1.tgz", + "integrity": "sha512-QpR8jPhRjSmlr/mD2cw3IR8HRO7lSVOnqUvQa8scv1Lsr3xoAMMworcYW3J13z3ppjBFBD2ef1Ci6AE5Qn8goQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/type": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/password": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-3.0.1.tgz", + "integrity": "sha512-haoeEPUisD1NeE2IanLOiFr4wcTXGWrBOyAyPZi1FfLJuXOzNmxCJPgUrGYKVh+Y8hfGJenIfz5Wb/DkE9KkMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/type": "^2.0.0", + "ansi-escapes": "^4.3.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/prompts": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-6.0.1.tgz", + "integrity": "sha512-yl43JD/86CIj3Mz5mvvLJqAOfIup7ncxfJ0Btnl0/v5TouVUyeEdcpknfgc+yMevS/48oH9WAkkw93m7otLb/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/checkbox": "^3.0.1", + "@inquirer/confirm": "^4.0.1", + "@inquirer/editor": "^3.0.1", + "@inquirer/expand": "^3.0.1", + "@inquirer/input": "^3.0.1", + "@inquirer/number": "^2.0.1", + "@inquirer/password": "^3.0.1", + "@inquirer/rawlist": "^3.0.1", + "@inquirer/search": "^2.0.1", + "@inquirer/select": "^3.0.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/rawlist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-3.0.1.tgz", + "integrity": "sha512-VgRtFIwZInUzTiPLSfDXK5jLrnpkuSOh1ctfaoygKAdPqjcjKYmGh6sCY1pb0aGnCGsmhUxoqLDUAU0ud+lGXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/type": "^2.0.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/search": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-2.0.1.tgz", + "integrity": "sha512-r5hBKZk3g5MkIzLVoSgE4evypGqtOannnB3PKTG9NRZxyFRKcfzrdxXXPcoJQsxJPzvdSU2Rn7pB7lw0GCmGAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/figures": "^1.0.6", + "@inquirer/type": "^2.0.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/select": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-3.0.1.tgz", + "integrity": "sha512-lUDGUxPhdWMkN/fHy1Lk7pF3nK1fh/gqeyWXmctefhxLYxlDsc7vsPBEpxrfVGDsVdyYJsiJoD4bJ1b623cV1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/figures": "^1.0.6", + "@inquirer/type": "^2.0.0", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-2.0.0.tgz", + "integrity": "sha512-XvJRx+2KR3YXyYtPUUy+qd9i7p+GO9Ko6VIIpWlBrpWwXDv8WLFeHTxz35CfQFUiBMLXlGHhGzys7lqit9gWag==", + "dev": true, + "license": "MIT", + "dependencies": { + "mute-stream": "^1.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, "node_modules/@modelcontextprotocol/sdk": { "version": "1.26.0", "resolved": "https://registry.npmmirror.com/@modelcontextprotocol/sdk/-/sdk-1.26.0.tgz", @@ -67,6 +332,493 @@ } } }, + "node_modules/@rollup/plugin-commonjs": { + "version": "29.0.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-29.0.2.tgz", + "integrity": "sha512-S/ggWH1LU7jTyi9DxZOKyxpVd4hF/OZ0JrEbeLjXk/DFXwRny0tjD2c992zOUYQobLrVkRVMDdmHP16HKP7GRg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "commondir": "^1.0.1", + "estree-walker": "^2.0.2", + "fdir": "^6.2.0", + "is-reference": "1.2.1", + "magic-string": "^0.30.3", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=16.0.0 || 14 >= 14.17" + }, + "peerDependencies": { + "rollup": "^2.68.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-json": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@rollup/plugin-json/-/plugin-json-6.1.0.tgz", + "integrity": "sha512-EGI2te5ENk1coGeADSIwZ7G2Q8CJS2sF120T7jLw4xFw9n7wIOXHo+kIYRAoVpJAN+kmqZSoO3Fp4JtoNF4ReA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.1.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/plugin-node-resolve": { + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.3.tgz", + "integrity": "sha512-lUYM3UBGuM93CnMPG1YocWu7X802BrNF3jW2zny5gQyLQgRFJhV1Sq0Zi74+dh/6NBx1DxFC4b4GXg9wUCG5Qg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@rollup/pluginutils": "^5.0.1", + "@types/resolve": "1.20.2", + "deepmerge": "^4.2.2", + "is-module": "^1.0.0", + "resolve": "^1.22.1" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^2.78.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/pluginutils": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.3.0.tgz", + "integrity": "sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0", + "estree-walker": "^2.0.2", + "picomatch": "^4.0.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + } + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.59.0.tgz", + "integrity": "sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.59.0.tgz", + "integrity": "sha512-hZ+Zxj3SySm4A/DylsDKZAeVg0mvi++0PYVceVyX7hemkw7OreKdCvW2oQ3T1FMZvCaQXqOTHb8qmBShoqk69Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.59.0.tgz", + "integrity": "sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.59.0.tgz", + "integrity": "sha512-ZW2KkwlS4lwTv7ZVsYDiARfFCnSGhzYPdiOU4IM2fDbL+QGlyAbjgSFuqNRbSthybLbIJ915UtZBtmuLrQAT/w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.59.0.tgz", + "integrity": "sha512-EsKaJ5ytAu9jI3lonzn3BgG8iRBjV4LxZexygcQbpiU0wU0ATxhNVEpXKfUa0pS05gTcSDMKpn3Sx+QB9RlTTA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.59.0.tgz", + "integrity": "sha512-d3DuZi2KzTMjImrxoHIAODUZYoUUMsuUiY4SRRcJy6NJoZ6iIqWnJu9IScV9jXysyGMVuW+KNzZvBLOcpdl3Vg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.59.0.tgz", + "integrity": "sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.59.0.tgz", + "integrity": "sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.59.0.tgz", + "integrity": "sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.59.0.tgz", + "integrity": "sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.59.0.tgz", + "integrity": "sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.59.0.tgz", + "integrity": "sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.59.0.tgz", + "integrity": "sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.59.0.tgz", + "integrity": "sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.59.0.tgz", + "integrity": "sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.59.0.tgz", + "integrity": "sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.59.0.tgz", + "integrity": "sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.59.0.tgz", + "integrity": "sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.59.0.tgz", + "integrity": "sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.59.0.tgz", + "integrity": "sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.59.0.tgz", + "integrity": "sha512-tt9KBJqaqp5i5HUZzoafHZX8b5Q2Fe7UjYERADll83O4fGqJ49O1FsL6LpdzVFQcpwvnyd0i+K/VSwu/o/nWlA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.59.0.tgz", + "integrity": "sha512-V5B6mG7OrGTwnxaNUzZTDTjDS7F75PO1ae6MJYdiMu60sq0CqN5CVeVsbhPxalupvTX8gXVSU9gq+Rx1/hvu6A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.59.0.tgz", + "integrity": "sha512-UKFMHPuM9R0iBegwzKF4y0C4J9u8C6MEJgFuXTBerMk7EJ92GFVFYBfOZaSGLu6COf7FxpQNqhNS4c4icUPqxA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.59.0.tgz", + "integrity": "sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.59.0.tgz", + "integrity": "sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@types/estree": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/mute-stream": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@types/mute-stream/-/mute-stream-0.0.4.tgz", + "integrity": "sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "22.19.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.15.tgz", + "integrity": "sha512-F0R/h2+dsy5wJAUe3tAU6oqa2qbWY5TpNfL/RGmo1y38hiyO1w3x2jPtt76wmuaJI4DQnOBu21cNXQ2STIUUWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/resolve": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz", + "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/wrap-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz", + "integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==", + "dev": true, + "license": "MIT" + }, "node_modules/accepts": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/accepts/-/accepts-2.0.0.tgz", @@ -113,6 +865,48 @@ } } }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, "node_modules/body-parser": { "version": "2.2.2", "resolved": "https://registry.npmmirror.com/body-parser/-/body-parser-2.2.2.tgz", @@ -175,6 +969,60 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true, + "license": "MIT" + }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/commander": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true, + "license": "MIT" + }, "node_modules/content-disposition": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/content-disposition/-/content-disposition-1.0.1.tgz", @@ -263,6 +1111,16 @@ } } }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/depd": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/depd/-/depd-2.0.0.tgz", @@ -292,6 +1150,13 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "license": "MIT" }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, "node_modules/encodeurl": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/encodeurl/-/encodeurl-2.0.0.tgz", @@ -337,6 +1202,13 @@ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", "license": "MIT" }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true, + "license": "MIT" + }, "node_modules/etag": { "version": "1.8.1", "resolved": "https://registry.npmmirror.com/etag/-/etag-1.8.1.tgz", @@ -372,6 +1244,7 @@ "resolved": "https://registry.npmmirror.com/express/-/express-5.2.1.tgz", "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==", "license": "MIT", + "peer": true, "dependencies": { "accepts": "^2.0.0", "body-parser": "^2.2.1", @@ -428,6 +1301,34 @@ "express": ">= 4.11" } }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/external-editor/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -450,6 +1351,31 @@ ], "license": "BSD-3-Clause" }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fflate": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", + "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", + "dev": true, + "license": "MIT" + }, "node_modules/finalhandler": { "version": "2.1.1", "resolved": "https://registry.npmmirror.com/finalhandler/-/finalhandler-2.1.1.tgz", @@ -471,6 +1397,35 @@ "url": "https://opencollective.com/express" } }, + "node_modules/flora-colossus": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flora-colossus/-/flora-colossus-2.0.0.tgz", + "integrity": "sha512-dz4HxH6pOvbUzZpZ/yXhafjbR2I8cenK5xL0KtBFb7U2ADsR+OwXifnxZjij/pZWF775uSCMzWVd+jDik2H2IA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.4", + "fs-extra": "^10.1.0" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/flora-colossus/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz", @@ -503,6 +1458,21 @@ "node": ">=14.14" } }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmmirror.com/function-bind/-/function-bind-1.1.2.tgz", @@ -512,6 +1482,36 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/galactus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/galactus/-/galactus-1.0.0.tgz", + "integrity": "sha512-R1fam6D4CyKQGNlvJne4dkNF+PvUUl7TAJInvTGa9fti9qAv95quQz29GXapA4d8Ec266mJJxFVh82M4GIIGDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.4", + "flora-colossus": "^2.0.0", + "fs-extra": "^10.1.0" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/galactus/node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/get-intrinsic": { "version": "1.3.0", "resolved": "https://registry.npmmirror.com/get-intrinsic/-/get-intrinsic-1.3.0.tgz", @@ -596,6 +1596,7 @@ "resolved": "https://registry.npmmirror.com/hono/-/hono-4.11.9.tgz", "integrity": "sha512-Eaw2YTGM6WOxA6CXbckaEvslr2Ne4NFsKrvc0v97JD5awbmeBLO5w9Ho9L9kmKonrwF9RJlW6BxT1PVv/agBHQ==", "license": "MIT", + "peer": true, "engines": { "node": ">=16.9.0" } @@ -636,6 +1637,16 @@ "url": "https://opencollective.com/express" } }, + "node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz", @@ -660,12 +1671,55 @@ "node": ">= 0.10" } }, + "node_modules/is-core-module": { + "version": "2.16.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.16.1.tgz", + "integrity": "sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", + "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", + "dev": true, + "license": "MIT" + }, "node_modules/is-promise": { "version": "4.0.0", "resolved": "https://registry.npmmirror.com/is-promise/-/is-promise-4.0.0.tgz", "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==", "license": "MIT" }, + "node_modules/is-reference": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz", + "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "*" + } + }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz", @@ -705,6 +1759,16 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, "node_modules/math-intrinsics": { "version": "1.1.0", "resolved": "https://registry.npmmirror.com/math-intrinsics/-/math-intrinsics-1.1.0.tgz", @@ -766,6 +1830,16 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "license": "MIT" }, + "node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, "node_modules/negotiator": { "version": "1.0.0", "resolved": "https://registry.npmmirror.com/negotiator/-/negotiator-1.0.0.tgz", @@ -775,6 +1849,16 @@ "node": ">= 0.6" } }, + "node_modules/node-forge": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.3.tgz", + "integrity": "sha512-rLvcdSyRCyouf6jcOIPe/BgwG/d7hKjzMKOas33/pHEr6gbq18IK9zV7DiPvzsz0oBJPme6qr6H6kGZuI9/DZg==", + "dev": true, + "license": "(BSD-3-Clause OR GPL-2.0)", + "engines": { + "node": ">= 6.13.0" + } + }, "node_modules/node-sqlite3-wasm": { "version": "0.8.53", "resolved": "https://registry.npmmirror.com/node-sqlite3-wasm/-/node-sqlite3-wasm-0.8.53.tgz", @@ -823,6 +1907,16 @@ "wrappy": "1" } }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/parseurl": { "version": "1.3.3", "resolved": "https://registry.npmmirror.com/parseurl/-/parseurl-1.3.3.tgz", @@ -841,6 +1935,13 @@ "node": ">=8" } }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, "node_modules/path-to-regexp": { "version": "8.3.0", "resolved": "https://registry.npmmirror.com/path-to-regexp/-/path-to-regexp-8.3.0.tgz", @@ -851,6 +1952,20 @@ "url": "https://opencollective.com/express" } }, + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "peer": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/pkce-challenge": { "version": "5.0.1", "resolved": "https://registry.npmmirror.com/pkce-challenge/-/pkce-challenge-5.0.1.tgz", @@ -860,6 +1975,19 @@ "node": ">=16.20.0" } }, + "node_modules/pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmmirror.com/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -921,6 +2049,73 @@ "node": ">=0.10.0" } }, + "node_modules/resolve": { + "version": "1.22.11", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.11.tgz", + "integrity": "sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-core-module": "^2.16.1", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rollup": { + "version": "4.59.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.59.0.tgz", + "integrity": "sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@types/estree": "1.0.8" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.59.0", + "@rollup/rollup-android-arm64": "4.59.0", + "@rollup/rollup-darwin-arm64": "4.59.0", + "@rollup/rollup-darwin-x64": "4.59.0", + "@rollup/rollup-freebsd-arm64": "4.59.0", + "@rollup/rollup-freebsd-x64": "4.59.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.59.0", + "@rollup/rollup-linux-arm-musleabihf": "4.59.0", + "@rollup/rollup-linux-arm64-gnu": "4.59.0", + "@rollup/rollup-linux-arm64-musl": "4.59.0", + "@rollup/rollup-linux-loong64-gnu": "4.59.0", + "@rollup/rollup-linux-loong64-musl": "4.59.0", + "@rollup/rollup-linux-ppc64-gnu": "4.59.0", + "@rollup/rollup-linux-ppc64-musl": "4.59.0", + "@rollup/rollup-linux-riscv64-gnu": "4.59.0", + "@rollup/rollup-linux-riscv64-musl": "4.59.0", + "@rollup/rollup-linux-s390x-gnu": "4.59.0", + "@rollup/rollup-linux-x64-gnu": "4.59.0", + "@rollup/rollup-linux-x64-musl": "4.59.0", + "@rollup/rollup-openbsd-x64": "4.59.0", + "@rollup/rollup-openharmony-arm64": "4.59.0", + "@rollup/rollup-win32-arm64-msvc": "4.59.0", + "@rollup/rollup-win32-ia32-msvc": "4.59.0", + "@rollup/rollup-win32-x64-gnu": "4.59.0", + "@rollup/rollup-win32-x64-msvc": "4.59.0", + "fsevents": "~2.3.2" + } + }, "node_modules/router": { "version": "2.2.0", "resolved": "https://registry.npmmirror.com/router/-/router-2.2.0.tgz", @@ -1087,6 +2282,19 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/statuses": { "version": "2.0.2", "resolved": "https://registry.npmmirror.com/statuses/-/statuses-2.0.2.tgz", @@ -1096,6 +2304,60 @@ "node": ">= 0.8" } }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, "node_modules/toidentifier": { "version": "1.0.1", "resolved": "https://registry.npmmirror.com/toidentifier/-/toidentifier-1.0.1.tgz", @@ -1105,6 +2367,19 @@ "node": ">=0.6" } }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/type-is": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/type-is/-/type-is-2.0.1.tgz", @@ -1119,6 +2394,13 @@ "node": ">= 0.6" } }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, "node_modules/universalify": { "version": "2.0.1", "resolved": "https://registry.npmmirror.com/universalify/-/universalify-2.0.1.tgz", @@ -1161,17 +2443,46 @@ "node": ">= 8" } }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "license": "ISC" }, + "node_modules/yoctocolors-cjs": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz", + "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/zod": { "version": "3.25.76", "resolved": "https://registry.npmmirror.com/zod/-/zod-3.25.76.tgz", "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "license": "MIT", + "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } diff --git a/drpy-node-mcp/package.json b/drpy-node-mcp/package.json index d84309bf..61b7b8b9 100644 --- a/drpy-node-mcp/package.json +++ b/drpy-node-mcp/package.json @@ -4,11 +4,36 @@ "description": "MCP server for drpy-node", "main": "index.js", "type": "module", + "bin": { + "drpy-node-mcp": "dist/index.js" + }, + "files": [ + "dist" + ], + "scripts": { + "build": "node scripts/sync-version.js && rollup -c && mcpb pack", + "build:rollup": "rollup -c", + "dev": "node index.js", + "sync-version": "node scripts/sync-version.js" + }, + "engines": { + "node": ">=18" + }, "dependencies": { "@modelcontextprotocol/sdk": "^1.0.1", + "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^15.2.3", "fs-extra": "^11.2.0", "node-sqlite3-wasm": "^0.8.53", "zod": "^3.23.8", "zod-to-json-schema": "^3.25.1" + }, + "devDependencies": { + "@anthropic-ai/mcpb": "^2.1.2", + "@rollup/plugin-commonjs": "^29.0.2", + "@rollup/plugin-json": "^6.1.0", + "@rollup/plugin-node-resolve": "^16.0.3", + "rollup": "^4.59.0" } } diff --git a/drpy-node-mcp/rollup.config.js b/drpy-node-mcp/rollup.config.js new file mode 100644 index 00000000..9b1eccd2 --- /dev/null +++ b/drpy-node-mcp/rollup.config.js @@ -0,0 +1,36 @@ +import resolve from '@rollup/plugin-node-resolve'; +import commonjs from '@rollup/plugin-commonjs'; +import json from '@rollup/plugin-json'; + +export default { + input: 'index.js', + output: { + file: 'dist/index.js', + format: 'esm', + banner: '#!/usr/bin/env node', + inlineDynamicImports: true, + }, + treeshake: false, + plugins: [ + resolve({ + preferBuiltins: true, + }), + commonjs(), + json(), + ], + external: [ + // Node.js built-ins + 'fs', 'path', 'url', 'util', 'stream', 'events', 'buffer', 'crypto', + 'child_process', 'os', 'http', 'https', 'net', 'tls', 'zlib', + // Native modules that shouldn't be bundled + 'node-sqlite3-wasm', + // MCP SDK - keep external for proper ESM + '@modelcontextprotocol/sdk', + ], + onwarn: function(warning, warn) { + if (['CIRCULAR_DEPENDENCY', 'EVAL'].includes(warning.code)) { + return; + } + warn(warning); + }, +}; diff --git a/drpy-node-mcp/scripts/sync-version.js b/drpy-node-mcp/scripts/sync-version.js new file mode 100644 index 00000000..97cca43f --- /dev/null +++ b/drpy-node-mcp/scripts/sync-version.js @@ -0,0 +1,24 @@ +#!/usr/bin/env node + +import fs from 'fs'; +import path from 'path'; +import { fileURLToPath } from 'url'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = path.dirname(__filename); + +// Read package.json +const packageJsonPath = path.join(__dirname, '..', 'package.json'); +const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); + +// Read manifest.json +const manifestJsonPath = path.join(__dirname, '..', 'manifest.json'); +const manifestJson = JSON.parse(fs.readFileSync(manifestJsonPath, 'utf8')); + +// Update manifest version to match package.json version +manifestJson.version = packageJson.version; + +// Write updated manifest.json +fs.writeFileSync(manifestJsonPath, JSON.stringify(manifestJson, null, 2) + '\n'); + +console.log(`✅ Synced version to ${packageJson.version} in manifest.json`); \ No newline at end of file diff --git a/drpy-node-mcp/utils/pathHelper.js b/drpy-node-mcp/utils/pathHelper.js index 7c458350..594a3f5c 100644 --- a/drpy-node-mcp/utils/pathHelper.js +++ b/drpy-node-mcp/utils/pathHelper.js @@ -1,11 +1,30 @@ import path from "path"; import { fileURLToPath } from "url"; +import fs from "fs"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -// Current: drpy-node-mcp/utils -// .. -> drpy-node-mcp -// .. -> drpy-node (PROJECT_ROOT) -export const PROJECT_ROOT = path.resolve(__dirname, "..", ".."); + +/** + * PROJECT_ROOT resolution: + * 1. root environment variable (if set and exists) + * 2. default: drpy-node-mcp/utils -> drpy-node + */ +function findProjectRoot() { + // Check environment variable + if (process.env.ROOT) { + const envRoot = path.resolve(process.env.ROOT); + if (fs.existsSync(envRoot)) { + return envRoot; + } + } + + // Default + const defaultRoot = path.resolve(__dirname, "..", ".."); + return defaultRoot; +} + +export const PROJECT_ROOT = findProjectRoot(); +console.warn(`Using PROJECT_ROOT: ${PROJECT_ROOT}`); export function resolvePath(p) { return path.resolve(PROJECT_ROOT, p); diff --git a/drpy2-quickjs/javet-android-release.aar b/drpy2-quickjs/javet-android-release.aar new file mode 100644 index 00000000..879a86f2 Binary files /dev/null and b/drpy2-quickjs/javet-android-release.aar differ diff --git a/drpy2-quickjs/javetds.zip b/drpy2-quickjs/javetds.zip new file mode 100644 index 00000000..7c698310 Binary files /dev/null and b/drpy2-quickjs/javetds.zip differ diff --git "a/json/\351\207\207\351\233\2062026\351\235\231\346\200\201.json" "b/json/\351\207\207\351\233\2062026\351\235\231\346\200\201.json" new file mode 100644 index 00000000..35211b11 --- /dev/null +++ "b/json/\351\207\207\351\233\2062026\351\235\231\346\200\201.json" @@ -0,0 +1,151 @@ +[ + { + "name": "爱奇艺", + "url": "https://iqiyizyapi.com", + "api": "/api.php/provide/vod", + "parse_url": "https://www.iqiyizyjx.com/?url=", + "cate_exclude": "电影|连续剧|动漫|综艺", + "class_name": "国产动漫&日韩动漫&欧美动漫&港台动漫&动漫电影&里番动漫&电影&连续剧&综艺&动作片&喜剧片&爱情片&科幻片&恐怖片&剧情片&战争片&惊悚片&家庭片&古装片&历史片&悬疑片&犯罪片&灾难片&记录片&短片&国产剧&香港剧&韩国剧&欧美剧&台湾剧&日本剧&海外剧&泰国剧&大陆综艺&港台综艺&日韩综艺&欧美综艺&短剧&伦理片&动漫", + "class_url": "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&26&27&28&29&30&31&32&33&34&35&36&37&38&39&40" + }, + { + "name": "豆瓣", + "url": "https://caiji.dbzy5.com", + "api": "/api.php/provide/vod", + "class_name": "电影&连续剧&综艺片&动漫&纪录片&动作片&爱情片&喜剧片&科幻片&恐怖片&剧情片&战争片&国产剧&香港剧&欧美剧&韩剧&动漫电影&泰国剧&日本剧&台湾剧&海外剧&大陆综艺&日韩综艺&港台综艺&欧美综艺&演唱会&国产动漫&日本动漫&欧美动漫&海外动漫&伦理片&新闻资讯&体育赛事&短剧大全&篮球&足球&网球&斯诺克&LPL&重生民国&穿越现代&反转爽剧&言情总裁&现代都市&古装仙侠&悬疑烧脑&惊悚片&电影资讯&娱乐新闻", + "class_url": "1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&20&21&22&23&24&25&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&52", + "parse_url": "https://doubanzyjx.com:966/?url=", + "cate_exclude": "电影|连续剧|动漫|综艺|电影资讯|娱乐新闻" + }, + { + "name": "360", + "url": "https://360zyzz.com", + "api": "/api.php/provide/vod", + "class_name": "电影&连续剧&综艺&动漫&伦理片&动作片&喜剧片&爱情片&科幻片&恐怖片&剧情片&战争片&国产剧&香港剧&韩国剧&欧美剧&体育&NBA&惊悚片&家庭篇&古装片&历史片&悬疑片&犯罪片&灾难片&纪录片&短片&动画片&台湾剧&日本剧&海外剧&泰国剧&大陆综艺&港台综艺&日韩综艺&欧美综艺&国产动漫&欧美动漫&日韩动漫&足球&篮球&未分类&西部片&爽文短剧&现代都市&脑洞悬疑&年代穿越&古装仙侠&反转爽剧&女频恋爱&成长逆袭", + "class_url": "1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18&20&21&22&23&24&25&26&27&28&29&30&31&32&33&34&35&36&37&38&39&40&41&42&43&45&46&47&48&49&50&51&52&53", + "parse_url": "https://www.360jiexi.com/player/?url=", + "cate_exclude": "电影|连续剧|动漫|综艺|电影资讯|娱乐新闻|体育|未分类" + }, + { + "name": "U酷", + "url": "https://api.ukuapi88.com", + "api": "/api.php/provide/vod", + "class_name": "电影&电视剧&综艺&动漫&动作片&喜剧片&爱情片&科幻片&恐怖片&剧情片&战争片&国产剧&港澳剧&日剧&欧美剧&动漫电影&台湾剧&韩剧&泰剧&记录片&伦理片&资讯&新闻资讯&预告资讯&影视资讯&明星资讯&短剧&奇幻片&犯罪片", + "class_url": "1&2&3&4&6&7&8&9&10&11&12&13&14&15&16&20&21&22&23&24&25&26&27&28&30&31&32&33&34", + "parse_url": "https://api.ukubf.com/m3u8/?url=", + "cate_exclude": "电影|电视剧|连续剧|动漫|综艺|资讯|新闻资讯|预告资讯|影视资讯|明星资讯" + }, + { + "name": "金鹰", + "url": "https://jinyingzy.com", + "api": "/api.php/provide/vod", + "class_name": "电视剧&电影&欧美剧&香港剧&韩剧&日剧&马泰剧&伦理片&动作片&爱情片&喜剧片&科幻片&恐怖片&剧情片&战争片&记录片&动漫&内地剧&动画片&中国动漫&日本动漫&欧美动漫&综艺&台湾剧&体育赛事&短剧&预告片&足球&篮球&台球&其他赛事", + "class_url": "1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&20&23&24&25&26&27&28&29&30&31&32&33&34&35", + "parse_url": "https://hd.iapijy.com/play?url=", + "cate_exclude": "电影|电视剧|连续剧|动漫|综艺|资讯" + }, + { + "name": "电影天堂", + "url": "http://caiji.dyttzyapi.com", + "api": "/api.php/provide/vod", + "class_name": "电影片&连续剧&综艺片&动漫片&动作片&喜剧片&爱情片&科幻片&恐怖片&剧情片&战争片&国产剧&香港剧&韩国剧&欧美剧&记录片&台湾剧&日本剧&海外剧&泰国剧&大陆综艺&港台综艺&日韩综艺&欧美综艺&国产动漫&日韩动漫&欧美动漫&港台动漫&海外动漫&伦理片&短剧&动画片", + "class_url": "1&2&3&4&6&7&8&9&10&11&12&13&14&15&16&20&21&22&23&24&25&26&27&28&29&30&31&32&33&34&36&37", + "parse_url": "http://caiji.dyttzyapi.com", + "cate_exclude": "电影片|电视剧|连续剧|动漫|综艺|资讯" + }, + { + "name": "茅台", + "url": "https://caiji.maotaizy.cc", + "api": "/api.php/provide/vod", + "class_name": "电影&连续剧&综艺片&动漫&纪录片&动作片&爱情片&喜剧片&科幻片&恐怖片&剧情片&战争片&国产剧&香港剧&欧美剧&韩剧&动漫电影&泰国剧&日本剧&台湾剧&海外剧&大陆综艺&日韩综艺&港台综艺&欧美综艺&演唱会&国产动漫&日本动漫&欧美动漫&海外动漫&伦理片&新闻资讯&体育赛事&短剧大全&篮球&足球&网球&斯诺克&LPL&重生民国&穿越现代&反转爽剧&言情总裁&现代都市&古装仙侠&悬疑烧脑&惊悚片&电影资讯&娱乐新闻&预告片", + "class_url": "1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&20&21&22&23&24&25&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&52&53", + "parse_url": "https://mtjiexi.cc:966/?url=", + "cate_exclude": "电影|电视剧|连续剧|动漫|综艺|资讯" + }, + { + "name": "猫眼", + "url": "https://api.maoyanapi.top", + "api": "/api.php/provide/vod", + "class_name": "电影&连续剧&综艺&动漫&伦理片&动作片&喜剧片&爱情片&科幻片&恐怖片&剧情片&战争片&国产剧&香港剧&韩国剧&欧美剧&体育&NBA&惊悚片&家庭篇&古装片&历史片&悬疑片&犯罪片&灾难片&纪录片&短片&动画片&台湾剧&日本剧&海外剧&泰国剧&大陆综艺&港台综艺&日韩综艺&欧美综艺&国产动漫&欧美动漫&日韩动漫&足球&篮球&未分类&西部片&爽文短剧&短剧现代都市&短剧脑洞悬疑&短剧年代穿越&短剧古装仙侠&短剧反转爽剧&短剧女频恋爱&短剧成长逆袭&奇幻片&里番动漫", + "class_url": "1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18&20&21&22&23&24&25&26&27&28&29&30&31&32&33&34&35&36&37&38&39&40&41&42&43&45&46&47&48&49&50&51&52&53&54&55", + "parse_url": "https://jx.maoyanjx.top/player/?url=", + "cate_exclude": "电影|电视剧|连续剧|动漫|综艺|新闻资讯" + }, + { + "name": "魔都", + "url": "https://www.mdzyapi.com", + "api": "/api.php/provide/vod", + "class_name": "国产动漫&日韩动漫&欧美动漫&港台动漫&动漫电影&里番动漫&电影&连续剧&综艺&动作片&喜剧片&爱情片&科幻片&恐怖片&剧情片&战争片&惊悚片&家庭片&古装片&历史片&悬疑片&犯罪片&灾难片&记录片&短片&国产剧&香港剧&韩国剧&欧美剧&台湾剧&日本剧&海外剧&泰国剧&大陆综艺&港台综艺&日韩综艺&欧美综艺&短剧&伦理片", + "class_url": "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&26&27&28&29&30&31&32&33&34&35&36&37&38&39", + "parse_url": "https://jiexi.moduzyjx.com/?url=", + "cate_exclude": "电影|电视剧|连续剧|动漫|综艺|新闻资讯" + }, + { + "name": "最大", + "url": "https://zuida.xyz", + "api": "/api.php/provide/vod", + "class_name": "电影&电视剧&综艺&动漫&动作片&喜剧片&爱情片&科幻片&恐怖片&剧情片&战争片&国产剧&欧美剧&韩剧&日剧&港剧&台剧&泰剧&纪录片&海外剧&大陆综艺&日韩综艺&港台综艺&欧美综艺&国产动漫&日韩动漫&欧美动漫&动画片&港台动漫&海外动漫&演唱会&体育赛事&篮球&足球&预告片&斯诺克&影视解说&爽文短剧&伦理&港台三级&韩国伦理&西方伦理&日本伦理&两性课堂&写真热舞&4K电影&有声动漫&女频恋爱&反转爽剧&古装仙侠&年代穿越&脑洞悬疑&现代都市&邵氏电影&Netflix电影&Netflix自制剧&擦边短剧&科普学习&漫剧", + "class_url": "1&2&3&4&6&7&8&9&10&11&12&13&14&15&16&17&18&19&20&23&25&26&27&28&29&30&31&39&44&45&47&48&49&50&51&52&53&54&55&56&57&58&59&60&61&62&63&64&65&66&67&68&69&70&71&72&73&74&75", + "parse_url": "https://jx.zuidplay.com/m3u8Player/?url=", + "cate_exclude": "电影|电视剧|连续剧|动漫|综艺|新闻资讯" + }, + { + "name": "极速", + "url": "https://jszyapi.com", + "api": "/api.php/provide/vod", + "class_name": "电视剧&电影&欧美剧&香港剧&韩剧&日剧&马泰剧&伦理片&动作片&爱情片&喜剧片&科幻片&恐怖片&剧情片&战争片&记录片&动漫&内地剧&动画片&中国动漫&日本动漫&欧美动漫&综艺&台湾剧&体育赛事&大陆综艺&日韩综艺&港台综艺&欧美综艺&灾难片&悬疑片&犯罪片&奇幻片&短剧&预告片&足球&篮球&台球&其他赛事", + "class_url": "1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&20&23&24&25&26&27&28&29&30&31&32&33&34&35&36&37&38&39&40&41&42&43", + "parse_url": "https://jsjiexi.com/play/?url=", + "cate_exclude": "电影|电视剧|连续剧|动漫|综艺|新闻资讯" + }, + { + "name": "速播", + "url": "https://subocaiji.com", + "api": "/api.php/provide/vod", + "class_name": "电影&电视剧&动漫&综艺&纪录片&动作片&爱情片&科幻片&战争片&剧情片&恐怖片&喜剧片&动漫电影&大陆剧&台湾剧&韩剧&美剧&港澳剧&日剧&泰剧&伦理片&体育赛事&中国动漫&日本动漫&欧美动漫&短剧&预告片&足球&篮球&台球&其他赛事", + "class_url": "1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18&20&21&22&23&24&25&26&27&28&29&30&31&32", + "parse_url": "https://subojiexi.com/play/?url=", + "cate_exclude": "电影|电视剧|连续剧|动漫|综艺|新闻资讯" + }, + { + "name": "豪华", + "url": "https://hhzyapi.com", + "api": "/api.php/provide/vod", + "class_name": "电视剧&电影&欧美剧&香港剧&韩剧&日剧&马泰剧&伦理片&动作片&爱情片&喜剧片&科幻片&恐怖片&剧情片&战争片&记录片&动漫&内地剧&动画片&中国动漫&日本动漫&欧美动漫&综艺&台湾剧&大陆综艺&日韩综艺&港台综艺&欧美综艺&灾难片&悬疑片&犯罪片&奇幻片&短剧&预告片&体育赛事&足球&篮球&台球&其他赛事", + "class_url": "1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&20&23&24&25&26&27&28&30&31&32&33&34&35&36&37&38&39&40&41&42&43&44", + "parse_url": "https://hhjiexi.com/play/?url=", + "cate_exclude": "电影|连续剧|电视剧|动漫|综艺" + }, + { + "name": "虎牙", + "url": "https://www.huyaapi.com", + "class_name": "电视剧&电影&欧美剧&香港剧&韩剧&日剧&马泰剧&伦理片&动作片&爱情片&喜剧片&科幻片&恐怖片&剧情片&战争片&记录片&动漫&内地剧&动画片&中国动漫&日本动漫&欧美动漫&综艺&台湾剧&体育赛事&短剧&预告片&足球&篮球&台球&其他赛事", + "class_url": "1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&20&23&24&25&26&27&28&29&30&31&32&33&34&35", + "parse_url": "https://huyajx.com/play?url=" + }, + { + "name": "艾旦", + "url": "https://lovedan.net", + "api": "/api.php/provide/vod", + "class_name": "电影&电视剧&综艺&动漫&福利视频&动作片&喜剧片&爱情片&科幻片&恐怖片&犯罪片&战争片&国产剧&港台剧&日韩剧&欧美剧&三级伦理&网红主播&动画电影&剧情片&纪录片&日韩综艺&港台综艺&欧美综艺&国产动漫&日韩动漫&欧美动漫&海外动漫&海外剧&大陆综艺&明星&福利图片&爱蜜社&头条女神&美媛馆&海外抖音&嗲囡囡&波萝社&魅妍社&爱尤物&秀人网&尤果网&推女神&DGC套图&尤蜜荟&模范学院&尤物馆&优星馆&蜜桃社&影私荟&顽味生活&星乐园&花の颜&御女郎&糖果画报&花漾&星颜社&画语界&直播&央视&卫视&短剧&影视解说&港台三级&韩国伦理&西方伦理&日本伦理&预告片&网络电影&其他综艺", + "class_url": "1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18&20&21&22&23&24&25&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&52&53&54&55&56&57&58&59&60&61&62&63&64&65&66&67&68&69&70&71", + "cate_exclude": "电影|连续剧|电视剧|动漫|综艺" + }, + { + "name": "红牛", + "url": "https://www.hongniuzy2.com", + "api": "/api.php/provide/vod", + "class_name": "电影&连续剧&综艺&动漫&动作片&喜剧片&爱情片&科幻片&恐怖片&剧情片&战争片&国产剧&港澳剧&日剧&欧美剧&台湾剧&泰剧&韩剧&纪录片&动漫电影&伦理片&体育赛事&短剧&预告片&足球&篮球&台球&其他赛事", + "class_url": "1&2&3&4&5&6&7&8&9&10&11&12&13&14&15&16&17&18&19&20&21&29&30&31&32&33&34&35", + "cate_exclude": "电影|连续剧|电视剧|动漫|综艺" + }, + { + "name": "飘零", + "url": "https://p2100.net", + "api": "/api.php/provide/vod", + "class_name": "电影&连续剧&综艺&动漫&动作片&喜剧片&爱情片&科幻片&恐怖片&剧情片&战争片&国产剧&香港剧&台湾剧&日本剧&韩国剧&欧美剧&海外剧&短剧&理论片&纪录片&邵氏大片&站内新闻&娱乐动态&八卦爆料&影片资讯&动漫电影", + "class_url": "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&26&28", + "parse_url": "", + "cate_exclude": "电影|电视剧|连续剧|动漫|综艺|八卦爆料|影片资讯|娱乐动态" + } +] \ No newline at end of file diff --git a/libs/drpyS.js b/libs/drpyS.js index f178db21..dee69db4 100644 --- a/libs/drpyS.js +++ b/libs/drpyS.js @@ -7,6 +7,7 @@ import zlib from 'zlib'; import JSONbig from 'json-bigint'; import forge from "node-forge"; import * as minizlib from 'minizlib'; +import {LRUCache} from 'lru-cache'; import * as utils from '../utils/utils.js'; import * as misc from '../utils/misc.js'; import COOKIE from '../utils/cookieManager.js'; @@ -62,16 +63,23 @@ globalThis.JsonBig = JSONbig({storeAsString: true}); globalThis.require = rootRequire; initializeGlobalDollar(); -const {Ali, Baidu, Baidu2, Cloud, Pan, Quark, UC, Yun} = PanS; +const {Ali, Baidu, Baidu2, Cloud, Pan, Quark, UC, Yun, Xun} = PanS; const { sleep, sleepSync, getNowTime, computeHash, deepCopy, urljoin, urljoin2, joinUrl, keysToLowerCase, naturalSort, $js, createBasicAuthHeaders, get_size, } = utils; // 缓存已初始化的模块和文件 hash 值 -const moduleCache = new Map(); -const ruleObjectCache = new Map(); -const jxCache = new Map(); +const CACHE_OPTIONS = { + max: 100, + ttl: 1000 * 60 * 10, // 10分钟 +}; +// const moduleCache = new Map(); +// const ruleObjectCache = new Map(); +// const jxCache = new Map(); +const moduleCache = new LRUCache(CACHE_OPTIONS); +const ruleObjectCache = new LRUCache(CACHE_OPTIONS); +const jxCache = new LRUCache(CACHE_OPTIONS); // 记录当前请求会话的标识,用于判断是否需要清理缓存 let currentSessionId = null; @@ -146,178 +154,140 @@ try { globalThis.DataBase = DataBase; globalThis.database = database; +// Static Sandbox Definitions +const STATIC_UTILS_SANDBOX = { + sleep, sleepSync, utils, misc, computeHash, deepCopy, urljoin, urljoin2, joinUrl, naturalSort, $js, + createBasicAuthHeaders, get_size, $, getContentType, getMimeType, getParsesDict, getFirstLetter +}; + +const STATIC_DRPY_SANDBOX = { + jsp, pdfh, pd, pdfa, jsoup, pdfl, pjfh, pj, pjfa, pq, local, md5X, rsaX, aesX, desX, req, reqs, + toBeijingTime, _fetch, XMLHttpRequest, AIS, batchFetch, JSProxyStream, JSFile, js2Proxy, log, print, + jsonToCookie, cookieToJson, runMain, cachedRequest, +}; + +const STATIC_DRPY_CUSTOM_SANDBOX = { + MOBILE_UA, PC_UA, UA, UC_UA, IOS_UA, RULE_CK, CATE_EXCLUDE, TAB_EXCLUDE, OCR_RETRY, OCR_API, nodata, + SPECIAL_URL, setResult, setHomeResult, setResult2, urlDeal, tellIsJx, urlencode, encodeUrl, + uint8ArrayToBase64, Utf8ArrayToStr, gzip, ungzip, encodeStr, decodeStr, getCryptoJS, RSA, fixAdM3u8Ai, + forceOrder, getQuery, stringify, dealJson, OcrApi, getHome, buildUrl, keysToLowerCase, parseQueryString, + buildQueryString, encodeIfContainsSpecialChars, objectToQueryString, forge, lrcToSrt, strExtract, +}; + +const STATIC_LIBS_SANDBOX = { + matchesAll, cut, gbkTool, CryptoJS, JSEncrypt, NODERSA, pako, JSON5, jinja, template, batchExecute, + atob, btoa, base64Encode, base64Decode, md5, rc4Encrypt, rc4Decrypt, rc4, rc4_decode, randomUa, + jsonpath, hlsParser, axios, axiosX, URL, pathLib, executeParse, qs, Buffer, URLSearchParams, COOKIE, + ENV, _ENV, Quark, Baidu, Baidu2, UC, Ali, Cloud, Yun, Pan, Xun, createWebDAVClient, createFTPClient, + require: rootRequire, WebSocket, WebSocketServer, zlib, JSONbig, JsonBig, minizlib, + iconv: globalThis.iconv, cheerio: globalThis.cheerio, +}; + +// 合并所有静态沙箱对象,减少创建沙箱时的属性拷贝开销 +const GLOBAL_STATIC_SANDBOX = { + ...STATIC_UTILS_SANDBOX, + ...STATIC_DRPY_SANDBOX, + ...STATIC_DRPY_CUSTOM_SANDBOX, + ...STATIC_LIBS_SANDBOX, +}; + +// Precompiled Scripts +const REQ_EXTEND_SCRIPT = new vm.Script(req_extend_code); +const TEMPLATE_CHECK_FUNC_CODE = ` +globalThis._checkTemplateFunc = async function(html, parseRuleStr) { + try { + let p = parseRuleStr.split(';'); + let p0 = p[0]; + let is_json = p0.startsWith('json:'); + p0 = p0.replace(/^(jsp:|json:|jq:)/, ''); + let classes = []; + let $pdfa, $pdfh, $pd; + if (is_json) { + html = dealJson(html); + $pdfa = pjfa; $pdfh = pjfh; $pd = pj; + } else { + $pdfa = pdfa; $pdfh = pdfh; $pd = pd; + } + if (is_json) { + try { + let list = $pdfa(html, p0); + if (list && list.length > 0) classes = list; + } catch (e) { log('[handleTemplateInheritance] json分类解析失败:' + e.message); } + } else if (p.length >= 3) { + try { + let list = $pdfa(html, p0); + if (list && list.length > 0) { + for (const it of list) { + try { + let name = $pdfh(it, p[1]); + let url = $pd(it, p[2]); + if (p.length > 3 && p[3]) { + let exp = new RegExp(p[3]); + let match = url.match(exp); + if (match && match[1]) url = match[1]; + } + if (name.trim()) classes.push({ 'type_id': url.trim(), 'type_name': name.trim() }); + } catch (e) { log('[handleTemplateInheritance] 分类列表解析元素失败:' + e.message); } + } + } + } catch (e) { log('[handleTemplateInheritance] 分类列表解析失败:' + e.message); } + } + return { class: classes }; + } catch (e) { + log('[handleTemplateInheritance] 模板测试执行错误:', e.message); + return { class: [] }; + } +}; +`; +// 将 ES6 扩展和模板检查函数合并为一个脚本,减少 runInContext 调用次数 +const SANDBOX_INIT_CODE = es6_extend_code + '\n' + TEMPLATE_CHECK_FUNC_CODE; +const SANDBOX_INIT_SCRIPT = new vm.Script(SANDBOX_INIT_CODE); + +const TEMPLATE_CHECK_CALL_SCRIPT = new vm.Script(`_checkTemplateFunc(globalThis._tempHtml, globalThis._tempParse)`); +const CACHED_REQUEST_SCRIPT = new vm.Script(` +(async function() { + try { + return await cachedRequest(request, globalThis._tempHost, globalThis._tempHeaders, 'host'); + } catch (e) { + log('[handleTemplateInheritance] 获取HOST页面失败:', e.message); + return ''; + } +})() +`); + +// 预编译 initParse 中的静态脚本 +const INIT_HEADERS_SCRIPT = new vm.Script(` +globalThis.oheaders = rule.oheaders +globalThis.rule_fetch_params = rule.rule_fetch_params; +`); + +const INIT_JSOUP_SCRIPT = new vm.Script(` +globalThis.jsp = new jsoup(rule.host||''); +globalThis.pdfh = pdfh; +globalThis.pd = pd; +globalThis.pdfa = pdfa; +globalThis.HOST = rule.host||''; +`); + export async function getSandbox(env = {}) { const {getProxyUrl, requestHost, hostUrl, fServer} = env; // (可选) 加载所有 wasm 文件 await CryptoJSW.loadAllWasm(); - const utilsSanbox = { - sleep, - sleepSync, - utils, - misc, - computeHash, - deepCopy, - urljoin, - urljoin2, - joinUrl, - naturalSort, - $js, - createBasicAuthHeaders, - get_size, - $, - pupWebview, - getProxyUrl, - requestHost, - hostUrl, - fServer, - getContentType, - getMimeType, - getParsesDict, - getFirstLetter - }; - const drpySanbox = { - jsp, - pdfh, - pd, - pdfa, - jsoup, - pdfl, - pjfh, - pj, - pjfa, - pq, - local, - md5X, - rsaX, - aesX, - desX, - req, - reqs, - toBeijingTime, - _fetch, - XMLHttpRequest, - simplecc, - AIS, - batchFetch, - JSProxyStream, - JSFile, - js2Proxy, - log, - print, - jsonToCookie, - cookieToJson, - runMain, - cachedRequest, // 添加cachedRequest函数到沙箱中 - }; - const drpyCustomSanbox = { - MOBILE_UA, - PC_UA, - UA, - UC_UA, - IOS_UA, - RULE_CK, - CATE_EXCLUDE, - TAB_EXCLUDE, - OCR_RETRY, - OCR_API, - nodata, - SPECIAL_URL, - setResult, - setHomeResult, - setResult2, - urlDeal, - tellIsJx, - urlencode, - encodeUrl, - uint8ArrayToBase64, - Utf8ArrayToStr, - gzip, - ungzip, - encodeStr, - decodeStr, - getCryptoJS, - RSA, - fixAdM3u8Ai, - forceOrder, - getQuery, - stringify, - dealJson, - OcrApi, - getHome, - buildUrl, - keysToLowerCase, - parseQueryString, - buildQueryString, - encodeIfContainsSpecialChars, - objectToQueryString, - forge, - lrcToSrt, - strExtract, - }; - const libsSanbox = { - matchesAll, - cut, - gbkTool, - CryptoJS, + // 动态库依赖 + const dynamicLibsSandbox = { CryptoJSW, - JSEncrypt, - NODERSA, - pako, - JSON5, - jinja, - template, - batchExecute, - atob, - btoa, - base64Encode, - base64Decode, - md5, - rc4Encrypt, - rc4Decrypt, - rc4, - rc4_decode, - randomUa, - jsonpath, - hlsParser, - axios, - axiosX, - URL, - pathLib, - executeParse, - qs, - Buffer, - URLSearchParams, - COOKIE, - ENV, - _ENV, - Quark, - Baidu, - Baidu2, - UC, - Ali, - Cloud, - Yun, - Pan, - createWebDAVClient, - createFTPClient, DataBase, database, - require, - WebSocket, - WebSocketServer, - zlib, - JSONbig, - JsonBig, - minizlib, + simplecc, + iconv: globalThis.iconv, + cheerio: globalThis.cheerio, }; - // 创建一个沙箱上下文,注入需要的全局变量和函数 const sandbox = { console, // 将 console 注入沙箱,便于调试 - // eval, // 直接引入原生 eval(不要这样用,环境是隔离的会导致执行不符合预期,需要包装) - WebAssembly, // 允许使用原生 WebAssembly(这里即使不引用也可以在沙箱里用这个变量。写在这里骗骗自己吧) + WebAssembly, // 允许使用原生 WebAssembly setTimeout, // 注入定时器方法 setInterval, clearTimeout, @@ -333,16 +303,19 @@ export async function getSandbox(env = {}) { }, // 用于导出解析的默认函数 _asyncGetRule: null, _asyncGetLazy: null, - ...utilsSanbox, - ...drpySanbox, - ...drpyCustomSanbox, - ...libsSanbox, + ...GLOBAL_STATIC_SANDBOX, // 使用预合并的静态沙箱 + // 直接注入环境相关的工具函数,避免创建中间对象 dynamicUtilsSandbox + pupWebview, + getProxyUrl, + requestHost, + hostUrl, + fServer, + ...dynamicLibsSandbox, }; // 创建一个上下文 const context = vm.createContext(sandbox); - // 注入扩展代码到沙箱中 - const polyfillsScript = new vm.Script(es6_extend_code); - polyfillsScript.runInContext(context); + // 注入扩展代码到沙箱中 (ES6扩展 + 模板检查函数) + SANDBOX_INIT_SCRIPT.runInContext(context); // 设置沙箱到全局 $ sandbox.$.setSandbox(sandbox); @@ -445,8 +418,7 @@ export async function init(filePath, env = {}, refresh) { sandbox.rule = result; // rule注入完毕后添加自定义req扩展request方法进入规则,这个代码里可以直接获取rule的任意对象,而且还是独立隔离的 - const reqExtendScript = new vm.Script(req_extend_code); - reqExtendScript.runInContext(context); + REQ_EXTEND_SCRIPT.runInContext(context); // 注意:不再直接挂载request/post函数到rule对象,避免内存占用和破坏沙箱隔离 // 解析函数将通过executeSandboxFunction在沙箱内调用request/post @@ -485,6 +457,11 @@ export async function init(filePath, env = {}, refresh) { // 由于已经深拷贝到moduleObject,原始rule不再需要 // delete sandbox.rule; + // 清理沙箱中的临时构建变量 + // delete sandbox._asyncGetRule; + // delete sandbox.module; + // delete sandbox.exports; + // 缓存模块和文件的 hash 值 moduleCache.set(hashMd5, {moduleObject, hash: fileHash}); return moduleObject; @@ -540,6 +517,11 @@ export async function getRuleObject(filePath, env, refresh) { // 由于已经深拷贝到ruleObject,原始rule不再需要 // delete sandbox.rule; + // 清理沙箱中的临时构建变量 + // delete sandbox._asyncGetRule; + // delete sandbox.module; + // delete sandbox.exports; + // 缓存模块和文件的 hash 值 ruleObjectCache.set(filePath, {ruleObject, hash: fileHash}); return ruleObject @@ -583,12 +565,17 @@ export async function initJx(filePath, env, refresh) { const jxResult = await sandbox._asyncGetLazy; sandbox.lazy = jxResult.lazy; sandbox.jx = jxResult.jx; - const reqExtendScript = new vm.Script(req_extend_code); - reqExtendScript.runInContext(context); + REQ_EXTEND_SCRIPT.runInContext(context); let t2 = getNowTime(); const jxObj = {...sandbox.jx, lazy: sandbox.lazy}; const cost = t2 - t1; log(`[initJx] 加载解析:${filePath} 耗时 ${cost}毫秒`) + + // 清理沙箱中的临时构建变量 + // delete sandbox._asyncGetLazy; + // delete sandbox.module; + // delete sandbox.exports; + jxCache.set(hashMd5, {jxObj, hash: fileHash}); return jxObj; } catch (error) { @@ -848,11 +835,7 @@ async function initParse(rule, env, vm, context) { // 新版放入规则内部 rule.oheaders = deepCopy(rule.headers); rule.rule_fetch_params = {'headers': rule.headers, 'timeout': rule.timeout, 'encoding': rule.encoding}; - const originalScript = new vm.Script(` -globalThis.oheaders = rule.oheaders -globalThis.rule_fetch_params = rule.rule_fetch_params; - `); - originalScript.runInContext(context); + INIT_HEADERS_SCRIPT.runInContext(context); // 检查并执行 `预处理` 方法 if (typeof rule.预处理 === 'function') { @@ -860,14 +843,7 @@ globalThis.rule_fetch_params = rule.rule_fetch_params; await rule.预处理(env); } - const otherScript = new vm.Script(` -globalThis.jsp = new jsoup(rule.host||''); -globalThis.pdfh = pdfh; -globalThis.pd = pd; -globalThis.pdfa = pdfa; -globalThis.HOST = rule.host||''; - `); - otherScript.runInContext(context); + INIT_JSOUP_SCRIPT.runInContext(context); return rule } @@ -1007,11 +983,12 @@ export function clearAllCache() { const excludeList = ['APP模板配置']; let clearedCount = 0; - // 清理moduleCache,跳过排除列表中的模块 + // 清理moduleCache,跳过排除列表中的模块 + const moduleKeysToDelete = []; for (const [key, value] of moduleCache.entries()) { let shouldSkip = false; - // 检查是否在排除列表中 + // 检查是否在排除列表中 for (const excludeName of excludeList) { if (value.moduleObject && value.moduleObject.title && value.moduleObject.title.includes(excludeName)) { @@ -1022,12 +999,16 @@ export function clearAllCache() { } if (!shouldSkip) { - moduleCache.delete(key); - clearedCount++; + moduleKeysToDelete.push(key); } } + moduleKeysToDelete.forEach(key => { + moduleCache.delete(key); + clearedCount++; + }); - // 清理ruleObjectCache,跳过排除列表中的模块 + // 清理ruleObjectCache,跳过排除列表中的模块 + const ruleKeysToDelete = []; for (const [filePath, value] of ruleObjectCache.entries()) { let shouldSkip = false; @@ -1040,12 +1021,16 @@ export function clearAllCache() { } if (!shouldSkip) { - ruleObjectCache.delete(filePath); - clearedCount++; + ruleKeysToDelete.push(filePath); } } + ruleKeysToDelete.forEach(key => { + ruleObjectCache.delete(key); + clearedCount++; + }); - // 清理jxCache,跳过排除列表中的模块 + // 清理jxCache,跳过排除列表中的模块 + const jxKeysToDelete = []; for (const [key, value] of jxCache.entries()) { let shouldSkip = false; @@ -1058,10 +1043,13 @@ export function clearAllCache() { } if (!shouldSkip) { - jxCache.delete(key); - clearedCount++; + jxKeysToDelete.push(key); } } + jxKeysToDelete.forEach(key => { + jxCache.delete(key); + clearedCount++; + }); // 清理页面请求缓存 pageRequestCache.clear(); @@ -1136,22 +1124,16 @@ async function handleTemplateInheritance(rule, context) { if (rule['模板'] === '自动') { try { let host_headers = rule['headers'] || {}; - const cacheKey = md5(rule.host + JSON.stringify(host_headers)); // 使用cachedRequest统一缓存管理,避免重复缓存 log(`[handleTemplateInheritance] 请求HOST页面: ${rule.host}`); - // 使用通用沙箱函数执行cachedRequest - const script = new vm.Script(` - (async function() { - try { - return await cachedRequest(request, '${rule.host}', ${JSON.stringify({headers: host_headers})}, 'host'); - } catch (e) { - log('[handleTemplateInheritance] 获取HOST页面失败:', e.message); - return ''; - } - })() - `); - let host_html = await script.runInContext(context); + + // 设置临时变量 + context._tempHost = rule.host; + context._tempHeaders = host_headers; + + // 执行预编译脚本 + let host_html = await CACHED_REQUEST_SCRIPT.runInContext(context); let match_muban = ''; let muban_keys = Object.keys(muban).filter(it => !/默认|短视2|采集1/.test(it)); @@ -1162,84 +1144,12 @@ async function handleTemplateInheritance(rule, context) { if (muban[muban_key].class_parse) { let class_parse = muban[muban_key].class_parse; - // 直接在context中执行class_parse代码进行测试 - const testScript = new vm.Script(` - (async function() { - try { - let html = ${JSON.stringify(host_html)}; - let p = ${JSON.stringify(class_parse)}; - let classes = []; - - // 处理class_parse字符串解析 - p = p.split(';'); - let p0 = p[0]; - let is_json = p0.startsWith('json:'); - p0 = p0.replace(/^(jsp:|json:|jq:)/, ''); - - if (html) { - let $pdfa, $pdfh, $pd; - if (is_json) { - html = dealJson(html); - $pdfa = pjfa; - $pdfh = pjfh; - $pd = pj; - } else { - $pdfa = pdfa; - $pdfh = pdfh; - $pd = pd; - } - - if (is_json) { - try { - let list = $pdfa(html, p0); - if (list && list.length > 0) { - classes = list; - } - } catch (e) { - log('[handleTemplateInheritance] json分类解析失败:' + e.message); - } - } else if (p.length >= 3) { - try { - let list = $pdfa(html, p0); - if (list && list.length > 0) { - for (const it of list) { - try { - //log('[handleTemplateInheritance] test it:',it); - let name = $pdfh(it, p[1]); - let url = $pd(it, p[2]); - if (p.length > 3 && p[3]) { - let exp = new RegExp(p[3]); - let match = url.match(exp); - if (match && match[1]) { - url = match[1]; - } - } - if (name.trim()) { - classes.push({ - 'type_id': url.trim(), - 'type_name': name.trim() - }); - } - } catch (e) { - log('[handleTemplateInheritance] 分类列表解析元素失败:' + e.message); - } - } - } - } catch (e) { - log('[handleTemplateInheritance] 分类列表解析失败:' + e.message); - } - } - } - - return { class: classes }; - } catch (e) { - log('[handleTemplateInheritance] 模板测试执行错误:', e.message); - return { class: [] }; - } - })() - `); - - const host_data = await testScript.runInContext(context); + // 设置临时变量 + context._tempHtml = host_html; + context._tempParse = class_parse; + + // 执行预编译脚本 + const host_data = await TEMPLATE_CHECK_CALL_SCRIPT.runInContext(context); if (host_data.class && host_data.class.length > 0) { match_muban = muban_key; @@ -1287,6 +1197,12 @@ async function handleTemplateInheritance(rule, context) { delete rule['模板']; delete rule['模板修改']; + // 清理临时变量 + delete context._tempHost; + delete context._tempHeaders; + delete context._tempHtml; + delete context._tempParse; + } catch (error) { log('[handleTemplateInheritance] 模板继承处理失败:', error.message); } diff --git a/libs/drpysParser.js b/libs/drpysParser.js index 2b6b6d93..efc0917b 100644 --- a/libs/drpysParser.js +++ b/libs/drpysParser.js @@ -413,12 +413,12 @@ export async function homeParse(rule) { }); } } - + const rule_filter = rule.hasOwnProperty('filter') ? rule.filter || {} : null; const context = createParserContext(url, rule, { TYPE: 'home', input: url, classes: classes, - filters: rule.filter, + filters: rule_filter, cate_exclude: rule.cate_exclude, home_flag: rule.home_flag, }); diff --git a/libs/dsGlobal.js b/libs/dsGlobal.js index 731c99a4..556ee370 100644 --- a/libs/dsGlobal.js +++ b/libs/dsGlobal.js @@ -71,6 +71,10 @@ globalThis.Baidu = Baidu; // 百度网盘接口2 - 百度网盘的另一个实现版本 globalThis.Baidu2 = Baidu2; + +// 迅雷网盘 +globalThis.Xun = Xun; + // webdav globalThis.createWebDAVClient = createWebDAVClient; // ftp diff --git a/libs_drpy/drpyCustom.js b/libs_drpy/drpyCustom.js index afe049c2..8f6c3342 100644 --- a/libs_drpy/drpyCustom.js +++ b/libs_drpy/drpyCustom.js @@ -693,6 +693,7 @@ export const objectToQueryString = (obj) => { export async function getOriginalJs(js_code) { // let current_match = /var rule|[\u4E00-\u9FA5]+|function|let |var |const |\(|\)|"|'/; let current_match = /var rule|function|let |var |const|class Rule|async|this\./; + let current_match1 = /["{}&]/; if (current_match.test(js_code)) { return js_code } @@ -773,7 +774,7 @@ export async function getOriginalJs(js_code) { // }, ] let func_index = 0 - while (!current_match.test(decode_content)) { + while (!current_match.test(decode_content) && !current_match1.test(decode_content)) { decode_content = decode_funcs[func_index](js_code); func_index++; if (func_index >= decode_funcs.length) { diff --git a/libs_drpy/drpyInject.js b/libs_drpy/drpyInject.js index 27598677..b1f70d36 100644 --- a/libs_drpy/drpyInject.js +++ b/libs_drpy/drpyInject.js @@ -9,6 +9,9 @@ import _ from './underscore-esm.min.js' // import _ from 'underscore' import tunnel from "tunnel"; import iconv from 'iconv-lite'; +globalThis.iconv = iconv; +import * as cheerio from 'cheerio'; +globalThis.cheerio = cheerio; import {jsonpath, jsoup} from './htmlParser.js'; import hlsParser from './hls-parser.js' import {keysToLowerCase} from '../utils/utils.js' diff --git a/libs_drpy/fetchAxios.js b/libs_drpy/fetchAxios.js index 608e6787..ddf05038 100644 --- a/libs_drpy/fetchAxios.js +++ b/libs_drpy/fetchAxios.js @@ -6,7 +6,7 @@ import FormData from 'form-data'; import https from "https"; import diagnosticsChannel from 'diagnostics_channel'; import {resolveDoh, getSystemProxy} from '../utils/dns_doh.js'; -import {ProxyAgent} from 'undici'; +import {ProxyAgent, Agent} from 'undici'; let undiciStripUASubscribed = false; @@ -130,12 +130,15 @@ class FetchAxios { } // Proxy and DOH Handling - let fetchDispatcher = undefined; + let fetchDispatcher = new Agent({connect: {rejectUnauthorized: false}}); try { const proxy = await getSystemProxy(); if (proxy) { // If proxy detected, use it via Undici ProxyAgent - fetchDispatcher = new ProxyAgent(proxy); + fetchDispatcher = new ProxyAgent({ + uri: proxy, + connect: {rejectUnauthorized: false} + }); // When using proxy, we generally rely on the proxy for DNS, so we can skip DOH // unless we want to force DOH even with Proxy (which is complex). // "Python requests" logic usually means: if proxy env var, use proxy. diff --git a/libs_drpy/moduleLoader.js b/libs_drpy/moduleLoader.js index ca7808b2..621113e0 100644 --- a/libs_drpy/moduleLoader.js +++ b/libs_drpy/moduleLoader.js @@ -1,6 +1,6 @@ import {readFileSync, existsSync} from 'fs'; import path from "path"; -import {createRequire} from 'module'; +import Module, {createRequire} from 'module'; import {fileURLToPath} from "url"; import axios from 'axios'; import fetchSync from 'sync-fetch'; @@ -11,8 +11,32 @@ const LIB_ROOT = path.join(ROOT_DIR, 'spider/js'); const customRequire = createRequire(import.meta.url); +/** + * Patch Module.prototype.require to handle bundled modules in CJS context + * This allows native CJS modules (like those loaded via require('./lib.js')) to find + * bundled dependencies (axios, iconv-lite, etc.) which are exposed on globalThis. + */ +const originalRequire = Module.prototype.require; +Module.prototype.require = function(id) { + if (id === 'iconv-lite' && globalThis.iconv) return globalThis.iconv; + if (id === 'axios' && globalThis.axios) return globalThis.axios; + if (id === 'cheerio' && globalThis.cheerio) return globalThis.cheerio; + if (id === 'qs' && globalThis.qs) return globalThis.qs; + if (id === 'crypto-js' && globalThis.CryptoJS) return globalThis.CryptoJS; + return originalRequire.apply(this, arguments); +}; + // 导出 rootRequire export const rootRequire = (modulePath) => { + // 处理内置模块或打包模块 + if (modulePath === 'iconv-lite') return globalThis.iconv; + if (modulePath === 'axios') return globalThis.axios; + if (modulePath === 'cheerio') return globalThis.cheerio; + if (modulePath === 'qs') return globalThis.qs; + if (modulePath === 'crypto-js') return globalThis.CryptoJS; + if (modulePath === 'fs' && globalThis.fs) return globalThis.fs; + if (modulePath === 'path' && globalThis.path) return globalThis.path; + if (modulePath.startsWith('./') || modulePath.startsWith('../')) { const absolutePath = path.resolve(LIB_ROOT, modulePath); return customRequire(absolutePath); diff --git a/package-bundle.js b/package-bundle.js index 90ad4366..27cbd552 100644 --- a/package-bundle.js +++ b/package-bundle.js @@ -1,5 +1,5 @@ import {execSync} from 'child_process'; -import {existsSync, statSync} from 'fs'; +import {existsSync, statSync, readdirSync, copyFileSync, mkdirSync} from 'fs'; import {join, basename, dirname, resolve} from 'path'; import url from 'url'; @@ -7,6 +7,7 @@ import url from 'url'; const INCLUDE_ITEMS = [ 'libs', 'spider', + 'jx', 'localt5.js', 'localDsCoreTest.js' ]; @@ -14,11 +15,46 @@ const INCLUDE_ITEMS = [ // 获取脚本所在目录 (e:\gitwork\drpy-node) const getScriptDir = () => dirname(resolve(url.fileURLToPath(import.meta.url))); +// 复制 _lib 开头的文件到 bundle 目录 +const copyLibFiles = (scriptDir) => { + const sourceDir = join(scriptDir, 'spider', 'js'); + const targetDir = join(scriptDir, 'drpy-node-bundle', 'spider', 'js'); + + if (!existsSync(sourceDir)) { + console.warn(`警告: 源目录 ${sourceDir} 不存在,跳过复制 lib 文件。`); + return; + } + + if (!existsSync(targetDir)) { + console.log(`创建目标目录: ${targetDir}`); + mkdirSync(targetDir, {recursive: true}); + } + + console.log(`正在从 ${sourceDir} 复制 lib 文件到 ${targetDir}...`); + + try { + const files = readdirSync(sourceDir); + let count = 0; + for (const file of files) { + if (file.startsWith('_lib') && (file.endsWith('.js') || file.endsWith('.cjs'))) { + const srcPath = join(sourceDir, file); + const destPath = join(targetDir, file); + copyFileSync(srcPath, destPath); + // console.log(`已复制: ${file}`); + count++; + } + } + console.log(`成功复制了 ${count} 个 lib 文件。`); + } catch (error) { + console.error(`复制 lib 文件失败: ${error.message}`); + } +}; + // 压缩 drpy-node-bundle 目录 const compressBundle = (scriptDir) => { // drpy-node-bundle 目录路径 const bundleDir = join(scriptDir, 'drpy-node-bundle'); - + if (!existsSync(bundleDir)) { console.error(`错误: 目录 ${bundleDir} 不存在!`); return; @@ -31,9 +67,9 @@ const compressBundle = (scriptDir) => { month: '2-digit', day: '2-digit' }).replace(/\//g, ''); - + const archiveName = `${currentDirName}-${currentTime}.7z`; - + // 输出路径 (与 drpy-node 的打包输出位置一致,即项目根目录的上一级) const parentDir = resolve(scriptDir, '..'); const archivePath = join(parentDir, archiveName); @@ -59,7 +95,7 @@ const compressBundle = (scriptDir) => { // 使用 cd 切换到 bundleDir 目录,这样打包的内容就是相对路径(不包含 drpy-node-bundle 目录本身) // 7z a "archivePath" item1 item2 ... const command = `7z a -t7z "${archivePath}" ${includeParams.join(' ')}`; - + console.log(`正在打包到: ${archivePath}`); console.log(`执行命令 (在 ${bundleDir} 下): ${command}`); @@ -78,6 +114,7 @@ const compressBundle = (scriptDir) => { // 主程序入口 const main = () => { const scriptDir = getScriptDir(); + copyLibFiles(scriptDir); compressBundle(scriptDir); }; diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..c057f262 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3473 @@ +{ + "name": "drpy-node", + "version": "1.3.27", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "drpy-node", + "version": "1.3.27", + "license": "MIT", + "dependencies": { + "@fastify/formbody": "^7.4.0", + "@fastify/static": "7.0.4", + "@fastify/websocket": "^10.0.1", + "axios": "^1.7.9", + "basic-ftp": "^5.0.5", + "cheerio": "^1.2.0", + "cron": "^4.3.3", + "crypto-js": "^4.2.0", + "dayjs": "^1.11.13", + "dns-over-http-resolver": "^3.0.15", + "dotenv": "^16.4.7", + "fastify": "^4.15.0", + "fastq": "^1.17.1", + "form-data": "^4.0.4", + "google-protobuf": "^3.21.4", + "https-proxy-agent": "^7.0.6", + "iconv-lite": "^0.6.3", + "import": "^0.0.6", + "json-bigint": "^1.0.0", + "lodash": "^4.17.21", + "lru-cache": "^9.1.2", + "marked": "^17.0.3", + "mime-types": "^2.1.35", + "minizlib": "^3.0.1", + "node-forge": "^1.3.1", + "node-sqlite3-wasm": "^0.8.35", + "nodemailer": "^7.0.5", + "p-queue": "^8.0.1", + "pickleparser": "^0.2.1", + "pino": "^9.7.0", + "pinyin": "^4.0.0", + "python-shell": "^5.0.0", + "qs": "^6.13.1", + "queue": "^7.0.0", + "rotating-file-stream": "^3.2.6", + "simplecc-wasm": "^1.1.0", + "sync-fetch": "^0.6.0-2", + "tslib": "^2.8.1", + "tunnel": "^0.0.6", + "undici": "^7.21.0", + "ws": "^8.18.0", + "xmlhttprequest": "^1.8.0" + }, + "devDependencies": { + "@anthropic-ai/mcpb": "^2.1.2", + "rolldown": "^1.0.0-rc.4" + }, + "engines": { + "node": ">17 <23" + } + }, + "node_modules/@anthropic-ai/mcpb": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@anthropic-ai/mcpb/-/mcpb-2.1.2.tgz", + "integrity": "sha512-goRbBC8ySo7SWb7tRzr+tL6FxDc4JPTRCdgfD2omba7freofvjq5rom1lBnYHZHo6Mizs1jAHJeN53aZbDoy8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/prompts": "^6.0.1", + "commander": "^13.1.0", + "fflate": "^0.8.2", + "galactus": "^1.0.0", + "ignore": "^7.0.5", + "node-forge": "^1.3.2", + "pretty-bytes": "^5.6.0", + "zod": "^3.25.67", + "zod-to-json-schema": "^3.24.6" + }, + "bin": { + "mcpb": "dist/cli/cli.js" + } + }, + "node_modules/@emnapi/core": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.0.tgz", + "integrity": "sha512-0DQ98G9ZQZOxfUcQn1waV2yS8aWdZ6kJMbYCJB3oUBecjWYO1fqJ+a1DRfPF3O5JEkwqwP1A9QEN/9mYm2Yd0w==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.0", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.0.tgz", + "integrity": "sha512-QN75eB0IH2ywSpRpNddCRfQIhmJYBCJ1x5Lb3IscKAL8bMnVAKnRg8dCoXbHzVLLH7P38N2Z3mtulB7W0J0FKw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.0.tgz", + "integrity": "sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@fastify/accept-negotiator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@fastify/accept-negotiator/-/accept-negotiator-1.1.0.tgz", + "integrity": "sha512-OIHZrb2ImZ7XG85HXOONLcJWGosv7sIvM2ifAPQVhg9Lv7qdmMBNVaai4QTdyuaqbKM5eO6sLSQOYI7wEQeCJQ==", + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/@fastify/ajv-compiler": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@fastify/ajv-compiler/-/ajv-compiler-3.6.0.tgz", + "integrity": "sha512-LwdXQJjmMD+GwLOkP7TVC68qa+pSSogeWWmznRJ/coyTcfe9qA05AHFSe1eZFwK6q+xVRpChnvFUkf1iYaSZsQ==", + "license": "MIT", + "dependencies": { + "ajv": "^8.11.0", + "ajv-formats": "^2.1.1", + "fast-uri": "^2.0.0" + } + }, + "node_modules/@fastify/error": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@fastify/error/-/error-3.4.1.tgz", + "integrity": "sha512-wWSvph+29GR783IhmvdwWnN4bUxTD01Vm5Xad4i7i1VuAOItLvbPAb69sb0IQ2N57yprvhNIwAP5B6xfKTmjmQ==", + "license": "MIT" + }, + "node_modules/@fastify/fast-json-stringify-compiler": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/@fastify/fast-json-stringify-compiler/-/fast-json-stringify-compiler-4.3.0.tgz", + "integrity": "sha512-aZAXGYo6m22Fk1zZzEUKBvut/CIIQe/BapEORnxiD5Qr0kPHqqI69NtEMCme74h+at72sPhbkb4ZrLd1W3KRLA==", + "license": "MIT", + "dependencies": { + "fast-json-stringify": "^5.7.0" + } + }, + "node_modules/@fastify/formbody": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@fastify/formbody/-/formbody-7.4.0.tgz", + "integrity": "sha512-H3C6h1GN56/SMrZS8N2vCT2cZr7mIHzBHzOBa5OPpjfB/D6FzP9mMpE02ZzrFX0ANeh0BAJdoXKOF2e7IbV+Og==", + "license": "MIT", + "dependencies": { + "fast-querystring": "^1.0.0", + "fastify-plugin": "^4.0.0" + } + }, + "node_modules/@fastify/merge-json-schemas": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@fastify/merge-json-schemas/-/merge-json-schemas-0.1.1.tgz", + "integrity": "sha512-fERDVz7topgNjtXsJTTW1JKLy0rhuLRcquYqNR9rF7OcVpCa2OVW49ZPDIhaRRCaUuvVxI+N416xUoF76HNSXA==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + } + }, + "node_modules/@fastify/send": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@fastify/send/-/send-2.1.0.tgz", + "integrity": "sha512-yNYiY6sDkexoJR0D8IDy3aRP3+L4wdqCpvx5WP+VtEU58sn7USmKynBzDQex5X42Zzvw2gNzzYgP90UfWShLFA==", + "license": "MIT", + "dependencies": { + "@lukeed/ms": "^2.0.1", + "escape-html": "~1.0.3", + "fast-decode-uri-component": "^1.0.1", + "http-errors": "2.0.0", + "mime": "^3.0.0" + } + }, + "node_modules/@fastify/static": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/@fastify/static/-/static-7.0.4.tgz", + "integrity": "sha512-p2uKtaf8BMOZWLs6wu+Ihg7bWNBdjNgCwDza4MJtTqg+5ovKmcbgbR9Xs5/smZ1YISfzKOCNYmZV8LaCj+eJ1Q==", + "license": "MIT", + "dependencies": { + "@fastify/accept-negotiator": "^1.0.0", + "@fastify/send": "^2.0.0", + "content-disposition": "^0.5.3", + "fastify-plugin": "^4.0.0", + "fastq": "^1.17.0", + "glob": "^10.3.4" + } + }, + "node_modules/@fastify/websocket": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/@fastify/websocket/-/websocket-10.0.1.tgz", + "integrity": "sha512-8/pQIxTPRD8U94aILTeJ+2O3el/r19+Ej5z1O1mXlqplsUH7KzCjAI0sgd5DM/NoPjAi5qLFNIjgM5+9/rGSNw==", + "license": "MIT", + "dependencies": { + "duplexify": "^4.1.2", + "fastify-plugin": "^4.0.0", + "ws": "^8.0.0" + } + }, + "node_modules/@inquirer/checkbox": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/checkbox/-/checkbox-3.0.1.tgz", + "integrity": "sha512-0hm2nrToWUdD6/UHnel/UKGdk1//ke5zGUpHIvk5ZWmaKezlGxZkOJXNSWsdxO/rEqTkbB3lNC2J6nBElV2aAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/figures": "^1.0.6", + "@inquirer/type": "^2.0.0", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/confirm": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-4.0.1.tgz", + "integrity": "sha512-46yL28o2NJ9doViqOy0VDcoTzng7rAb6yPQKU7VDLqkmbCaH4JqK4yk4XqlzNWy9PVC5pG1ZUXPBQv+VqnYs2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/type": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/core": { + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-9.2.1.tgz", + "integrity": "sha512-F2VBt7W/mwqEU4bL0RnHNZmC/OxzNx9cOYxHqnXX3MP6ruYvZUZAW9imgN9+h/uBT/oP8Gh888J2OZSbjSeWcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/figures": "^1.0.6", + "@inquirer/type": "^2.0.0", + "@types/mute-stream": "^0.0.4", + "@types/node": "^22.5.5", + "@types/wrap-ansi": "^3.0.0", + "ansi-escapes": "^4.3.2", + "cli-width": "^4.1.0", + "mute-stream": "^1.0.0", + "signal-exit": "^4.1.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^6.2.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/editor": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/editor/-/editor-3.0.1.tgz", + "integrity": "sha512-VA96GPFaSOVudjKFraokEEmUQg/Lub6OXvbIEZU1SDCmBzRkHGhxoFAVaF30nyiB4m5cEbDgiI2QRacXZ2hw9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/type": "^2.0.0", + "external-editor": "^3.1.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/expand": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/expand/-/expand-3.0.1.tgz", + "integrity": "sha512-ToG8d6RIbnVpbdPdiN7BCxZGiHOTomOX94C2FaT5KOHupV40tKEDozp12res6cMIfRKrXLJyexAZhWVHgbALSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/type": "^2.0.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/figures": { + "version": "1.0.15", + "resolved": "https://registry.npmjs.org/@inquirer/figures/-/figures-1.0.15.tgz", + "integrity": "sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/input": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-3.0.1.tgz", + "integrity": "sha512-BDuPBmpvi8eMCxqC5iacloWqv+5tQSJlUafYWUe31ow1BVXjW2a5qe3dh4X/Z25Wp22RwvcaLCc2siHobEOfzg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/type": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/number": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/number/-/number-2.0.1.tgz", + "integrity": "sha512-QpR8jPhRjSmlr/mD2cw3IR8HRO7lSVOnqUvQa8scv1Lsr3xoAMMworcYW3J13z3ppjBFBD2ef1Ci6AE5Qn8goQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/type": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/password": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-3.0.1.tgz", + "integrity": "sha512-haoeEPUisD1NeE2IanLOiFr4wcTXGWrBOyAyPZi1FfLJuXOzNmxCJPgUrGYKVh+Y8hfGJenIfz5Wb/DkE9KkMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/type": "^2.0.0", + "ansi-escapes": "^4.3.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/prompts": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/prompts/-/prompts-6.0.1.tgz", + "integrity": "sha512-yl43JD/86CIj3Mz5mvvLJqAOfIup7ncxfJ0Btnl0/v5TouVUyeEdcpknfgc+yMevS/48oH9WAkkw93m7otLb/A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/checkbox": "^3.0.1", + "@inquirer/confirm": "^4.0.1", + "@inquirer/editor": "^3.0.1", + "@inquirer/expand": "^3.0.1", + "@inquirer/input": "^3.0.1", + "@inquirer/number": "^2.0.1", + "@inquirer/password": "^3.0.1", + "@inquirer/rawlist": "^3.0.1", + "@inquirer/search": "^2.0.1", + "@inquirer/select": "^3.0.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/rawlist": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/rawlist/-/rawlist-3.0.1.tgz", + "integrity": "sha512-VgRtFIwZInUzTiPLSfDXK5jLrnpkuSOh1ctfaoygKAdPqjcjKYmGh6sCY1pb0aGnCGsmhUxoqLDUAU0ud+lGXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/type": "^2.0.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/search": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/search/-/search-2.0.1.tgz", + "integrity": "sha512-r5hBKZk3g5MkIzLVoSgE4evypGqtOannnB3PKTG9NRZxyFRKcfzrdxXXPcoJQsxJPzvdSU2Rn7pB7lw0GCmGAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/figures": "^1.0.6", + "@inquirer/type": "^2.0.0", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/select": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@inquirer/select/-/select-3.0.1.tgz", + "integrity": "sha512-lUDGUxPhdWMkN/fHy1Lk7pF3nK1fh/gqeyWXmctefhxLYxlDsc7vsPBEpxrfVGDsVdyYJsiJoD4bJ1b623cV1Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@inquirer/core": "^9.2.1", + "@inquirer/figures": "^1.0.6", + "@inquirer/type": "^2.0.0", + "ansi-escapes": "^4.3.2", + "yoctocolors-cjs": "^2.1.2" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@inquirer/type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-2.0.0.tgz", + "integrity": "sha512-XvJRx+2KR3YXyYtPUUy+qd9i7p+GO9Ko6VIIpWlBrpWwXDv8WLFeHTxz35CfQFUiBMLXlGHhGzys7lqit9gWag==", + "dev": true, + "license": "MIT", + "dependencies": { + "mute-stream": "^1.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@lukeed/ms": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@lukeed/ms/-/ms-2.0.2.tgz", + "integrity": "sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.1.tgz", + "integrity": "sha512-p64ah1M1ld8xjWv3qbvFwHiFVWrq1yFvV4f7w+mzaqiR4IlSgkqhcRdHwsGgomwzBH51sRY4NEowLxnaBjcW/A==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1", + "@tybys/wasm-util": "^0.10.1" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.115.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.115.0.tgz", + "integrity": "sha512-4n91DKnebUS4yjUHl2g3/b2T+IUdCfmoZGhmwsovZCDaJSs+QkVAM+0AqqTxHSsHfeiMuueT75cZaZcT/m0pSw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, + "node_modules/@pinojs/redact": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@pinojs/redact/-/redact-0.4.0.tgz", + "integrity": "sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==", + "license": "MIT" + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.9.tgz", + "integrity": "sha512-lcJL0bN5hpgJfSIz/8PIf02irmyL43P+j1pTCfbD1DbLkmGRuFIA4DD3B3ZOvGqG0XiVvRznbKtN0COQVaKUTg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.0.0-rc.9.tgz", + "integrity": "sha512-J7Zk3kLYFsLtuH6U+F4pS2sYVzac0qkjcO5QxHS7OS7yZu2LRs+IXo+uvJ/mvpyUljDJ3LROZPoQfgBIpCMhdQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.0.0-rc.9.tgz", + "integrity": "sha512-iwtmmghy8nhfRGeNAIltcNXzD0QMNaaA5U/NyZc1Ia4bxrzFByNMDoppoC+hl7cDiUq5/1CnFthpT9n+UtfFyg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.0.0-rc.9.tgz", + "integrity": "sha512-DLFYI78SCiZr5VvdEplsVC2Vx53lnA4/Ga5C65iyldMVaErr86aiqCoNBLl92PXPfDtUYjUh+xFFor40ueNs4Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.0.0-rc.9.tgz", + "integrity": "sha512-CsjTmTwd0Hri6iTw/DRMK7kOZ7FwAkrO4h8YWKoX/kcj833e4coqo2wzIFywtch/8Eb5enQ/lwLM7w6JX1W5RQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.0.0-rc.9.tgz", + "integrity": "sha512-2x9O2JbSPxpxMDhP9Z74mahAStibTlrBMW0520+epJH5sac7/LwZW5Bmg/E6CXuEF53JJFW509uP+lSedaUNxg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.0.0-rc.9.tgz", + "integrity": "sha512-JA1QRW31ogheAIRhIg9tjMfsYbglXXYGNPLdPEYrwFxdbkQCAzvpSCSHCDWNl4hTtrol8WeboCSEpjdZK8qrCg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.0.0-rc.9.tgz", + "integrity": "sha512-aOKU9dJheda8Kj8Y3w9gnt9QFOO+qKPAl8SWd7JPHP+Cu0EuDAE5wokQubLzIDQWg2myXq2XhTpOVS07qqvT+w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.0.0-rc.9.tgz", + "integrity": "sha512-OalO94fqj7IWRn3VdXWty75jC5dk4C197AWEuMhIpvVv2lw9fiPhud0+bW2ctCxb3YoBZor71QHbY+9/WToadA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.0.0-rc.9.tgz", + "integrity": "sha512-cVEl1vZtBsBZna3YMjGXNvnYYrOJ7RzuWvZU0ffvJUexWkukMaDuGhUXn0rjnV0ptzGVkvc+vW9Yqy6h8YX4pg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.0.0-rc.9.tgz", + "integrity": "sha512-UzYnKCIIc4heAKgI4PZ3dfBGUZefGCJ1TPDuLHoCzgrMYPb5Rv6TLFuYtyM4rWyHM7hymNdsg5ik2C+UD9VDbA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.0.0-rc.9.tgz", + "integrity": "sha512-+6zoiF+RRyf5cdlFQP7nm58mq7+/2PFaY2DNQeD4B87N36JzfF/l9mdBkkmTvSYcYPE8tMh/o3cRlsx1ldLfog==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.0.0-rc.9.tgz", + "integrity": "sha512-rgFN6sA/dyebil3YTlL2evvi/M+ivhfnyxec7AccTpRPccno/rPoNlqybEZQBkcbZu8Hy+eqNJCqfBR8P7Pg8g==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@napi-rs/wasm-runtime": "^1.1.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.0.0-rc.9.tgz", + "integrity": "sha512-lHVNUG/8nlF1IQk1C0Ci574qKYyty2goMiPlRqkC5R+3LkXDkL5Dhx8ytbxq35m+pkHVIvIxviD+TWLdfeuadA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.0.0-rc.9.tgz", + "integrity": "sha512-G0oA4+w1iY5AGi5HcDTxWsoxF509hrFIPB2rduV5aDqS9FtDg1CAfa7V34qImbjfhIcA8C+RekocJZA96EarwQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.9.tgz", + "integrity": "sha512-w6oiRWgEBl04QkFZgmW+jnU1EC9b57Oihi2ot3HNWIQRqgHp5PnYDia5iZ5FF7rpa4EQdiqMDXjlqKGXBhsoXw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.1.tgz", + "integrity": "sha512-9tTaPJLSiejZKx+Bmog4uSubteqTvFrVrURwkmHixBo0G4seD0zUxp98E1DzUBJxLQ3NPwXrGKDiVjwx/DpPsg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/luxon": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@types/luxon/-/luxon-3.7.1.tgz", + "integrity": "sha512-H3iskjFIAn5SlJU7OuxUmTEpebK6TKB8rxZShDslBMZJ5u9S//KM1sbdAisiSrqwLQncVjnpi2OK2J51h+4lsg==", + "license": "MIT" + }, + "node_modules/@types/mute-stream": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@types/mute-stream/-/mute-stream-0.0.4.tgz", + "integrity": "sha512-CPM9nzrCPPJHQNA9keH9CVkVI+WR5kMa+7XEs5jcGQ0VoAGnLv242w8lIVgwAEfmE4oufJRaTc9PNLQl0ioAow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/node": { + "version": "22.19.15", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.19.15.tgz", + "integrity": "sha512-F0R/h2+dsy5wJAUe3tAU6oqa2qbWY5TpNfL/RGmo1y38hiyO1w3x2jPtt76wmuaJI4DQnOBu21cNXQ2STIUUWg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.21.0" + } + }, + "node_modules/@types/wrap-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz", + "integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==", + "dev": true, + "license": "MIT" + }, + "node_modules/abstract-logging": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/abstract-logging/-/abstract-logging-2.0.1.tgz", + "integrity": "sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==", + "license": "MIT" + }, + "node_modules/agent-base": { + "version": "7.1.4", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.4.tgz", + "integrity": "sha512-MnA+YT8fwfJPgBx3m60MNqakm30XOkyIoH1y6huTQvC0PwZG7ki8NacLBcrPbNoo8vEZy7Jpuk7+jMO+CUovTQ==", + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/ajv": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.18.0.tgz", + "integrity": "sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv/node_modules/fast-uri": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.0.tgz", + "integrity": "sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "license": "MIT" + }, + "node_modules/atomic-sleep": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", + "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/avvio": { + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/avvio/-/avvio-8.4.0.tgz", + "integrity": "sha512-CDSwaxINFy59iNwhYnkvALBwZiTydGkOecZyPkqBpABYR1KqGEsET0VOOYDwtleZSUIdeY36DC2bSZ24CO1igA==", + "license": "MIT", + "dependencies": { + "@fastify/error": "^3.3.0", + "fastq": "^1.17.1" + } + }, + "node_modules/axios": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.6.tgz", + "integrity": "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==", + "license": "MIT", + "dependencies": { + "follow-redirects": "^1.15.11", + "form-data": "^4.0.5", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/basic-ftp": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.2.0.tgz", + "integrity": "sha512-VoMINM2rqJwJgfdHq6RiUudKt2BV+FY5ZFezP/ypmwayk68+NzzAQy4XXLlqsGD4MCzq3DrmNFD/uUmBJuGoXw==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/bignumber.js": { + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-9.3.1.tgz", + "integrity": "sha512-Ko0uX15oIUS7wJ3Rb30Fs6SkVbLmPBAKdlm7q9+ak9bbIeFf0MwuBsQV6z7+X768/cHsfg+WlysDWJcmthjsjQ==", + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", + "license": "ISC" + }, + "node_modules/brace-expansion": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz", + "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "get-intrinsic": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true, + "license": "MIT" + }, + "node_modules/cheerio": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.2.0.tgz", + "integrity": "sha512-WDrybc/gKFpTYQutKIK6UvfcuxijIZfMfXaYm8NMsPQxSYvf+13fXUJ4rztGGbJcBQ/GF55gvrZ0Bc0bj/mqvg==", + "license": "MIT", + "dependencies": { + "cheerio-select": "^2.1.0", + "dom-serializer": "^2.0.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "encoding-sniffer": "^0.2.1", + "htmlparser2": "^10.1.0", + "parse5": "^7.3.0", + "parse5-htmlparser2-tree-adapter": "^7.1.0", + "parse5-parser-stream": "^7.1.2", + "undici": "^7.19.0", + "whatwg-mimetype": "^4.0.0" + }, + "engines": { + "node": ">=20.18.1" + }, + "funding": { + "url": "https://github.com/cheeriojs/cheerio?sponsor=1" + } + }, + "node_modules/cheerio-select": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", + "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-select": "^5.1.0", + "css-what": "^6.1.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cli-width": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-4.1.0.tgz", + "integrity": "sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "13.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-13.1.0.tgz", + "integrity": "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "license": "MIT", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz", + "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cron": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/cron/-/cron-4.4.0.tgz", + "integrity": "sha512-fkdfq+b+AHI4cKdhZlppHveI/mgz2qpiYxcm+t5E5TsxX7QrLS1VE0+7GENEk9z0EeGPcpSciGv6ez24duWhwQ==", + "license": "MIT", + "dependencies": { + "@types/luxon": "~3.7.0", + "luxon": "~3.7.0" + }, + "engines": { + "node": ">=18.x" + }, + "funding": { + "type": "ko-fi", + "url": "https://ko-fi.com/intcreator" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", + "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/crypto-js": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/crypto-js/-/crypto-js-4.2.0.tgz", + "integrity": "sha512-KALDyEYgpY+Rlob/iriUtjV6d5Eq+Y191A5g4UqLAi8CyGP9N1+FdVbkc1SxKc2r4YAYqG8JzO2KGL+AizD70Q==", + "license": "MIT" + }, + "node_modules/css-select": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.2.2.tgz", + "integrity": "sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==", + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^6.1.0", + "domhandler": "^5.0.2", + "domutils": "^3.0.1", + "nth-check": "^2.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-what": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.2.2.tgz", + "integrity": "sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "license": "MIT", + "engines": { + "node": ">= 12" + } + }, + "node_modules/dayjs": { + "version": "1.11.20", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.20.tgz", + "integrity": "sha512-YbwwqR/uYpeoP4pu043q+LTDLFBLApUP6VxRihdfNTqu4ubqMlGDLd6ErXhEgsyvY0K6nCs7nggYumAN+9uEuQ==", + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/dns-over-http-resolver": { + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/dns-over-http-resolver/-/dns-over-http-resolver-3.0.16.tgz", + "integrity": "sha512-Qnq8HhNRuMnA61pf1lVPlStCAv1BVrraCx0umPESWgYKf995tUMF5oNhW59PKdnf7E8d5yqwHlEoFywXjsNMCw==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "quick-lru": "^7.0.0", + "weald": "^1.0.2" + } + }, + "node_modules/dom-serializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", + "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.2", + "entities": "^4.2.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", + "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "BSD-2-Clause" + }, + "node_modules/domhandler": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", + "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", + "license": "BSD-2-Clause", + "dependencies": { + "domelementtype": "^2.3.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", + "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", + "license": "BSD-2-Clause", + "dependencies": { + "dom-serializer": "^2.0.0", + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/dotenv": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.6.1.tgz", + "integrity": "sha512-uBq4egWHTcTt33a72vpSG0z3HnPuIl6NqYcTrKEg2azoEyl2hpW0zqlxysq2pK9HlDIHyHyakeYaYnSAwd8bow==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/duplexify": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.3.tgz", + "integrity": "sha512-M3BmBhwJRZsSx38lZyhE53Csddgzl5R7xGJNk7CVddZD6CcmwMCH8J+7AprIrQKH7TonKxaCjcv27Qmf+sQ+oA==", + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.4.1", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1", + "stream-shift": "^1.0.2" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "license": "MIT" + }, + "node_modules/encoding-sniffer": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/encoding-sniffer/-/encoding-sniffer-0.2.1.tgz", + "integrity": "sha512-5gvq20T6vfpekVtqrYQsSCFZ1wEg5+wW0/QaZMWkFr6BqD3NfKs0rLCx4rrVlSWJeZb5NBJgVLswK/w2MWU+Gw==", + "license": "MIT", + "dependencies": { + "iconv-lite": "^0.6.3", + "whatwg-encoding": "^3.1.1" + }, + "funding": { + "url": "https://github.com/fb55/encoding-sniffer?sponsor=1" + } + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-object-atoms": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz", + "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", + "license": "MIT" + }, + "node_modules/eventemitter3": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz", + "integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==", + "license": "MIT" + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "license": "MIT", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/external-editor/node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-content-type-parse": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/fast-content-type-parse/-/fast-content-type-parse-1.1.0.tgz", + "integrity": "sha512-fBHHqSTFLVnR61C+gltJuE5GkVQMV0S2nqUO8TJ+5Z3qAKG8vAx4FKai1s5jq/inV1+sREynIWSuQ6HgoSXpDQ==", + "license": "MIT" + }, + "node_modules/fast-decode-uri-component": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz", + "integrity": "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==", + "license": "MIT" + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "license": "MIT" + }, + "node_modules/fast-json-stringify": { + "version": "5.16.1", + "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-5.16.1.tgz", + "integrity": "sha512-KAdnLvy1yu/XrRtP+LJnxbBGrhN+xXu+gt3EUvZhYGKCr3lFHq/7UFJHHFgmJKoqlh6B40bZLEv7w46B0mqn1g==", + "license": "MIT", + "dependencies": { + "@fastify/merge-json-schemas": "^0.1.0", + "ajv": "^8.10.0", + "ajv-formats": "^3.0.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^2.1.0", + "json-schema-ref-resolver": "^1.0.1", + "rfdc": "^1.2.0" + } + }, + "node_modules/fast-json-stringify/node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/fast-querystring": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/fast-querystring/-/fast-querystring-1.1.2.tgz", + "integrity": "sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==", + "license": "MIT", + "dependencies": { + "fast-decode-uri-component": "^1.0.1" + } + }, + "node_modules/fast-uri": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-2.4.0.tgz", + "integrity": "sha512-ypuAmmMKInk5q7XcepxlnUWDLWv4GFtaJqAzWKqn62IpQ3pejtr5dTVbt3vwqVaMKmkNR55sTT+CqUKIaT21BA==", + "license": "MIT" + }, + "node_modules/fastify": { + "version": "4.29.1", + "resolved": "https://registry.npmjs.org/fastify/-/fastify-4.29.1.tgz", + "integrity": "sha512-m2kMNHIG92tSNWv+Z3UeTR9AWLLuo7KctC7mlFPtMEVrfjIhmQhkQnT9v15qA/BfVq3vvj134Y0jl9SBje3jXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT", + "dependencies": { + "@fastify/ajv-compiler": "^3.5.0", + "@fastify/error": "^3.4.0", + "@fastify/fast-json-stringify-compiler": "^4.3.0", + "abstract-logging": "^2.0.1", + "avvio": "^8.3.0", + "fast-content-type-parse": "^1.1.0", + "fast-json-stringify": "^5.8.0", + "find-my-way": "^8.0.0", + "light-my-request": "^5.11.0", + "pino": "^9.0.0", + "process-warning": "^3.0.0", + "proxy-addr": "^2.0.7", + "rfdc": "^1.3.0", + "secure-json-parse": "^2.7.0", + "semver": "^7.5.4", + "toad-cache": "^3.3.0" + } + }, + "node_modules/fastify-plugin": { + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/fastify-plugin/-/fastify-plugin-4.5.1.tgz", + "integrity": "sha512-stRHYGeuqpEZTL1Ef0Ovr2ltazUT9g844X5z/zEBFLG8RYlpDiOCIG+ATvYEp+/zmc7sN29mcIMp8gvYplYPIQ==", + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.20.1.tgz", + "integrity": "sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==", + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/fflate": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/fflate/-/fflate-0.8.2.tgz", + "integrity": "sha512-cPJU47OaAoCbg0pBvzsgpTPhmhqI5eJjh/JIu8tPj5q+T7iLvW/JAYUqmE7KOB4R1ZyEhzBaIQpQpardBF5z8A==", + "dev": true, + "license": "MIT" + }, + "node_modules/find-my-way": { + "version": "8.2.2", + "resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-8.2.2.tgz", + "integrity": "sha512-Dobi7gcTEq8yszimcfp/R7+owiT4WncAJ7VTTgFH1jYJ5GaG1FbhjwDG820hptN0QDFvzVY3RfCzdInvGPGzjA==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-querystring": "^1.0.0", + "safe-regex2": "^3.1.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/flora-colossus": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flora-colossus/-/flora-colossus-2.0.0.tgz", + "integrity": "sha512-dz4HxH6pOvbUzZpZ/yXhafjbR2I8cenK5xL0KtBFb7U2ADsR+OwXifnxZjij/pZWF775uSCMzWVd+jDik2H2IA==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.4", + "fs-extra": "^10.1.0" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/follow-redirects": { + "version": "1.15.11", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.11.tgz", + "integrity": "sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "license": "MIT", + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/form-data": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.5.tgz", + "integrity": "sha512-8RipRLol37bNs2bhoV67fiTEvdTrbMUYcFTiy3+wuuOnUog2QBHCZWXDRijWQfAkhBj2Uf5UnVaiWwA5vdd82w==", + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.2", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "license": "MIT", + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fs-extra": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz", + "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^2.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/galactus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/galactus/-/galactus-1.0.0.tgz", + "integrity": "sha512-R1fam6D4CyKQGNlvJne4dkNF+PvUUl7TAJInvTGa9fti9qAv95quQz29GXapA4d8Ec266mJJxFVh82M4GIIGDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^4.3.4", + "flora-colossus": "^2.0.0", + "fs-extra": "^10.1.0" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "license": "ISC", + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/google-protobuf": { + "version": "3.21.4", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.4.tgz", + "integrity": "sha512-MnG7N936zcKTco4Jd2PX2U96Kf9PxygAPKBug+74LHzmHXmceN16MmRcdgZv+DGef/S9YvQAfRsNCn4cjf9yyQ==", + "license": "(BSD-3-Clause AND Apache-2.0)" + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/htmlparser2": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-10.1.0.tgz", + "integrity": "sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==", + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "license": "MIT", + "dependencies": { + "domelementtype": "^2.3.0", + "domhandler": "^5.0.3", + "domutils": "^3.2.2", + "entities": "^7.0.1" + } + }, + "node_modules/htmlparser2/node_modules/entities": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-7.0.1.tgz", + "integrity": "sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "license": "MIT", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/https-proxy-agent": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.6.tgz", + "integrity": "sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==", + "license": "MIT", + "dependencies": { + "agent-base": "^7.1.2", + "debug": "4" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ignore": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.5.tgz", + "integrity": "sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/import/-/import-0.0.6.tgz", + "integrity": "sha512-QPhTdjy9J4wUzmWSG7APkSgMFuPGPw+iJTYUblcfc2AfpqaatbwgCldK1HoLYx+v/+lWvab63GWZtNkcnj9JcQ==", + "dependencies": { + "optimist": "0.3.x" + }, + "bin": { + "import": "import" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "license": "MIT", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/json-bigint": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-bigint/-/json-bigint-1.0.0.tgz", + "integrity": "sha512-SiPv/8VpZuWbvLSMtTDU8hEfrZWg/mH/nV/b4o0CYbSxu1UIQPLdwKOCIyLQX+VIPO5vrLX3i8qtqFyhdPSUSQ==", + "license": "MIT", + "dependencies": { + "bignumber.js": "^9.0.0" + } + }, + "node_modules/json-schema-ref-resolver": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-schema-ref-resolver/-/json-schema-ref-resolver-1.0.1.tgz", + "integrity": "sha512-EJAj1pgHc1hxF6vo2Z3s69fMjO1INq6eGHXZ8Z6wCQeldCuwxGK9Sxf4/cScGn3FZubCVUehfWtcDM/PLteCQw==", + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "license": "MIT" + }, + "node_modules/jsonfile": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.2.0.tgz", + "integrity": "sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "universalify": "^2.0.0" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/keypress": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/keypress/-/keypress-0.1.0.tgz", + "integrity": "sha512-x0yf9PL/nx9Nw9oLL8ZVErFAk85/lslwEP7Vz7s5SI1ODXZIgit3C5qyWjw4DxOuO/3Hb4866SQh28a1V1d+WA==", + "license": "MIT" + }, + "node_modules/light-my-request": { + "version": "5.14.0", + "resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-5.14.0.tgz", + "integrity": "sha512-aORPWntbpH5esaYpGOOmri0OHDOe3wC5M2MQxZ9dvMLZm6DnaAn0kJlcbU9hwsQgLzmZyReKwFwwPkR+nHu5kA==", + "license": "BSD-3-Clause", + "dependencies": { + "cookie": "^0.7.0", + "process-warning": "^3.0.0", + "set-cookie-parser": "^2.4.1" + } + }, + "node_modules/lodash": { + "version": "4.17.23", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", + "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.2.tgz", + "integrity": "sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ==", + "license": "ISC", + "engines": { + "node": "14 || >=16.14" + } + }, + "node_modules/luxon": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/luxon/-/luxon-3.7.2.tgz", + "integrity": "sha512-vtEhXh/gNjI9Yg1u4jX/0YVPMvxzHuGgCm6tC5kZyb08yjGWGnqAjGJvcXbqQR2P3MyMEFnRbpcdFS6PBcLqew==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/marked": { + "version": "17.0.4", + "resolved": "https://registry.npmjs.org/marked/-/marked-17.0.4.tgz", + "integrity": "sha512-NOmVMM+KAokHMvjWmC5N/ZOvgmSWuqJB8FoYI019j4ogb/PeRMKoKIjReZ2w3376kkA8dSJIP8uD993Kxc0iRQ==", + "license": "MIT", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "license": "MIT", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.2" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/minizlib": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-3.1.0.tgz", + "integrity": "sha512-KZxYo1BUkWD2TVFLr0MQoM8vUUigWD3LlD83a/75BqC+4qE0Hb1Vo5v1FgcfaNXvfXzr+5EhQ6ing/CaBijTlw==", + "license": "MIT", + "dependencies": { + "minipass": "^7.1.2" + }, + "engines": { + "node": ">= 18" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" + }, + "node_modules/mute-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-1.0.0.tgz", + "integrity": "sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "deprecated": "Use your platform's native DOMException instead", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "license": "MIT", + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/node-forge": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.3.tgz", + "integrity": "sha512-rLvcdSyRCyouf6jcOIPe/BgwG/d7hKjzMKOas33/pHEr6gbq18IK9zV7DiPvzsz0oBJPme6qr6H6kGZuI9/DZg==", + "license": "(BSD-3-Clause OR GPL-2.0)", + "engines": { + "node": ">= 6.13.0" + } + }, + "node_modules/node-sqlite3-wasm": { + "version": "0.8.54", + "resolved": "https://registry.npmjs.org/node-sqlite3-wasm/-/node-sqlite3-wasm-0.8.54.tgz", + "integrity": "sha512-kGveOnfghdKZbQdDitloHVGBZ1LloRHnLSsjWjd+hZYnHdnk0jA0iN6DpvdHHSwlgeiZX0mNJ7BQfbK9HPtBdw==", + "license": "MIT" + }, + "node_modules/nodemailer": { + "version": "7.0.13", + "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-7.0.13.tgz", + "integrity": "sha512-PNDFSJdP+KFgdsG3ZzMXCgquO7I6McjY2vlqILjtJd0hy8wEvtugS9xKRF2NWlPNGxvLCXlTNIae4serI7dinw==", + "license": "MIT-0", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/nth-check": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", + "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", + "license": "BSD-2-Clause", + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/object-inspect": { + "version": "1.13.4", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz", + "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-exit-leak-free": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/on-exit-leak-free/-/on-exit-leak-free-2.1.2.tgz", + "integrity": "sha512-0eJJY6hXLGf1udHwfNftBqH+g73EU4B504nZeKpz1sYRKafAghwxEJunB2O7rDZkL4PGfsMVnTXZ2EjibbqcsA==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optimist": { + "version": "0.3.7", + "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", + "integrity": "sha512-TCx0dXQzVtSCg2OgY/bO9hjM9cV4XYx09TVK+s3+FhkjT6LovsLe+pPMzpWf+6yXK/hUizs2gUoTw3jHM0VaTQ==", + "license": "MIT/X11", + "dependencies": { + "wordwrap": "~0.0.2" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-queue": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-8.1.1.tgz", + "integrity": "sha512-aNZ+VfjobsWryoiPnEApGGmf5WmNsCo9xu8dfaYamG5qaLP7ClhLN6NgsFe6SwJ2UbLEBK5dv9x8Mn5+RVhMWQ==", + "license": "MIT", + "dependencies": { + "eventemitter3": "^5.0.1", + "p-timeout": "^6.1.2" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-timeout": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-6.1.4.tgz", + "integrity": "sha512-MyIV3ZA/PmyBN/ud8vV9XzwTrNtR4jFrObymZYnZqMmW0zA8Z17vnT0rBgFE/TlohB+YCHqXMgZzb3Csp49vqg==", + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "license": "BlueOak-1.0.0" + }, + "node_modules/parse5": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.3.0.tgz", + "integrity": "sha512-IInvU7fabl34qmi9gY8XOVxhYyMyuH2xUNpb2q8/Y+7552KlejkRvqvD19nMoUW/uQGGbqNpA6Tufu5FL5BZgw==", + "license": "MIT", + "dependencies": { + "entities": "^6.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-htmlparser2-tree-adapter": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz", + "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==", + "license": "MIT", + "dependencies": { + "domhandler": "^5.0.3", + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5-parser-stream": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz", + "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==", + "license": "MIT", + "dependencies": { + "parse5": "^7.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/parse5/node_modules/entities": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/entities/-/entities-6.0.1.tgz", + "integrity": "sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==", + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "license": "ISC" + }, + "node_modules/pickleparser": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/pickleparser/-/pickleparser-0.2.1.tgz", + "integrity": "sha512-kMzY3uFYcR6OjOqr7nV2nkaXaBsUEOafu3zgPxeD6s/2ueMfVQH8lrymcDWBPGx0OkVxGMikxQit6jgByXjwBg==", + "license": "MIT", + "bin": { + "pickleparser": "bin/pickletojson.js", + "pickletojson": "bin/pickletojson.js" + } + }, + "node_modules/pino": { + "version": "9.14.0", + "resolved": "https://registry.npmjs.org/pino/-/pino-9.14.0.tgz", + "integrity": "sha512-8OEwKp5juEvb/MjpIc4hjqfgCNysrS94RIOMXYvpYCdm/jglrKEiAYmiumbmGhCvs+IcInsphYDFwqrjr7398w==", + "license": "MIT", + "dependencies": { + "@pinojs/redact": "^0.4.0", + "atomic-sleep": "^1.0.0", + "on-exit-leak-free": "^2.1.0", + "pino-abstract-transport": "^2.0.0", + "pino-std-serializers": "^7.0.0", + "process-warning": "^5.0.0", + "quick-format-unescaped": "^4.0.3", + "real-require": "^0.2.0", + "safe-stable-stringify": "^2.3.1", + "sonic-boom": "^4.0.1", + "thread-stream": "^3.0.0" + }, + "bin": { + "pino": "bin.js" + } + }, + "node_modules/pino-abstract-transport": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-2.0.0.tgz", + "integrity": "sha512-F63x5tizV6WCh4R6RHyi2Ml+M70DNRXt/+HANowMflpgGFMAym/VKm6G7ZOQRjqN7XbGxK1Lg9t6ZrtzOaivMw==", + "license": "MIT", + "dependencies": { + "split2": "^4.0.0" + } + }, + "node_modules/pino-std-serializers": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-7.1.0.tgz", + "integrity": "sha512-BndPH67/JxGExRgiX1dX0w1FvZck5Wa4aal9198SrRhZjH3GxKQUKIBnYJTdj2HDN3UQAS06HlfcSbQj2OHmaw==", + "license": "MIT" + }, + "node_modules/pino/node_modules/process-warning": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-5.0.0.tgz", + "integrity": "sha512-a39t9ApHNx2L4+HBnQKqxxHNs1r7KF+Intd8Q/g1bUh6q0WIp9voPXJ/x0j+ZL45KF1pJd9+q2jLIRMfvEshkA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "MIT" + }, + "node_modules/pinyin": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/pinyin/-/pinyin-4.0.0.tgz", + "integrity": "sha512-vHpV5K+vpp6XUUpZNGRDuHoN+1xcmieM3EWlH4QjSX2kkpG/gVOwpqwV9EOJ9x9c9UERFKeLml5XVSukE/PLgQ==", + "license": "MIT", + "dependencies": { + "commander": "~1.1.1" + }, + "bin": { + "pinyin": "bin/pinyin" + }, + "engines": { + "install-node": "^18.0.0" + }, + "peerDependencies": { + "@node-rs/jieba": "^1.6.0", + "nodejieba": "^3.4.4", + "segmentit": "^2.0.3" + }, + "peerDependenciesMeta": { + "@node-rs/jieba": { + "optional": true + }, + "nodejieba": { + "optional": true + }, + "segmentit": { + "optional": true + } + } + }, + "node_modules/pinyin/node_modules/commander": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-1.1.1.tgz", + "integrity": "sha512-71Rod2AhcH3JhkBikVpNd0pA+fWsmAaVoti6OR38T76chA7vE3pSerS0Jor4wDw+tOueD2zLVvFOw5H0Rcj7rA==", + "dependencies": { + "keypress": "0.1.x" + }, + "engines": { + "node": ">= 0.6.x" + } + }, + "node_modules/pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz", + "integrity": "sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/process-warning": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-3.0.0.tgz", + "integrity": "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==", + "license": "MIT" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "license": "MIT", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "license": "MIT" + }, + "node_modules/python-shell": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/python-shell/-/python-shell-5.0.0.tgz", + "integrity": "sha512-RUOOOjHLhgR1MIQrCtnEqz/HJ1RMZBIN+REnpSUrfft2bXqXy69fwJASVziWExfFXsR1bCY0TznnHooNsCo0/w==", + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/qs": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.15.0.tgz", + "integrity": "sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==", + "license": "BSD-3-Clause", + "dependencies": { + "side-channel": "^1.1.0" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/queue": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/queue/-/queue-7.0.0.tgz", + "integrity": "sha512-sphwS7HdfQnvrJAXUNAUgpf9H/546IE3p/5Lf2jr71O4udEYlqAhkevykumas2FYuMkX/29JMOgrRdRoYZ/X9w==", + "license": "MIT" + }, + "node_modules/quick-format-unescaped": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", + "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==", + "license": "MIT" + }, + "node_modules/quick-lru": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-7.3.0.tgz", + "integrity": "sha512-k9lSsjl36EJdK7I06v7APZCbyGT2vMTsYSRX1Q2nbYmnkBqgUhRkAuzH08Ciotteu/PLJmIF2+tti7o3C/ts2g==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/real-require": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/real-require/-/real-require-0.2.0.tgz", + "integrity": "sha512-57frrGM/OCTLqLOAh0mhVA9VBMHd+9U7Zb2THMGdBUoZVOtGbJzjxsYGDJ3A9AYYCP4hn6y1TVbaOfzWtm5GFg==", + "license": "MIT", + "engines": { + "node": ">= 12.13.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ret": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.4.3.tgz", + "integrity": "sha512-0f4Memo5QP7WQyUEAYUO3esD/XjOc3Zjjg5CPsAq1p8sIu0XPeMbHJemKA0BO7tV0X7+A0FoEpbmHXWxPyD3wQ==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "license": "MIT" + }, + "node_modules/rolldown": { + "version": "1.0.0-rc.9", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.0.0-rc.9.tgz", + "integrity": "sha512-9EbgWge7ZH+yqb4d2EnELAntgPTWbfL8ajiTW+SyhJEC4qhBbkCKbqFV4Ge4zmu5ziQuVbWxb/XwLZ+RIO7E8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.115.0", + "@rolldown/pluginutils": "1.0.0-rc.9" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.0.0-rc.9", + "@rolldown/binding-darwin-arm64": "1.0.0-rc.9", + "@rolldown/binding-darwin-x64": "1.0.0-rc.9", + "@rolldown/binding-freebsd-x64": "1.0.0-rc.9", + "@rolldown/binding-linux-arm-gnueabihf": "1.0.0-rc.9", + "@rolldown/binding-linux-arm64-gnu": "1.0.0-rc.9", + "@rolldown/binding-linux-arm64-musl": "1.0.0-rc.9", + "@rolldown/binding-linux-ppc64-gnu": "1.0.0-rc.9", + "@rolldown/binding-linux-s390x-gnu": "1.0.0-rc.9", + "@rolldown/binding-linux-x64-gnu": "1.0.0-rc.9", + "@rolldown/binding-linux-x64-musl": "1.0.0-rc.9", + "@rolldown/binding-openharmony-arm64": "1.0.0-rc.9", + "@rolldown/binding-wasm32-wasi": "1.0.0-rc.9", + "@rolldown/binding-win32-arm64-msvc": "1.0.0-rc.9", + "@rolldown/binding-win32-x64-msvc": "1.0.0-rc.9" + } + }, + "node_modules/rotating-file-stream": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/rotating-file-stream/-/rotating-file-stream-3.2.9.tgz", + "integrity": "sha512-i9i0KkHh12ryl4xtELg+0gyoFre2PJ9RcQQLzquWsiqygyYsrZLckrqqYrthhnJZGZb4g+KUHtcoWYVq34gaug==", + "license": "MIT", + "engines": { + "node": ">=14.0" + }, + "funding": { + "url": "https://www.blockchain.com/btc/address/12p1p5q7sK75tPyuesZmssiMYr4TKzpSCN" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-regex2": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/safe-regex2/-/safe-regex2-3.1.0.tgz", + "integrity": "sha512-RAAZAGbap2kBfbVhvmnTFv73NWLMvDGOITFYTZBAaY8eR+Ir4ef7Up/e7amo+y1+AH+3PtLkrt9mvcTsG9LXug==", + "license": "MIT", + "dependencies": { + "ret": "~0.4.0" + } + }, + "node_modules/safe-stable-stringify": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.5.0.tgz", + "integrity": "sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" + }, + "node_modules/secure-json-parse": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz", + "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==", + "license": "BSD-3-Clause" + }, + "node_modules/semver": { + "version": "7.7.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", + "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-cookie-parser": { + "version": "2.7.2", + "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.7.2.tgz", + "integrity": "sha512-oeM1lpU/UvhTxw+g3cIfxXHyJRc/uidd3yK1P242gzHds0udQBYzs3y8j4gCCW+ZJ7ad0yctld8RYO+bdurlvw==", + "license": "MIT" + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", + "license": "ISC" + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/simplecc-wasm": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/simplecc-wasm/-/simplecc-wasm-1.1.1.tgz", + "integrity": "sha512-NHBvSBlnOk7nqiNKvNpG/3DqD4XBkls3CqmTl4t3At4v7N9z1HO2t9g7vK//0o33zcgVOKE59vFcyCcgCuw6zQ==", + "license": "MIT" + }, + "node_modules/sonic-boom": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-4.2.1.tgz", + "integrity": "sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q==", + "license": "MIT", + "dependencies": { + "atomic-sleep": "^1.0.0" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "license": "ISC", + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "license": "MIT", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/stream-shift": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz", + "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ==", + "license": "MIT" + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-color": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", + "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/sync-fetch": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/sync-fetch/-/sync-fetch-0.6.0.tgz", + "integrity": "sha512-IELLEvzHuCfc1uTsshPK58ViSdNqXxlml1U+fmwJIKLYKOr/rAtBrorE2RYm5IHaMpDNlmC0fr1LAvdXvyheEQ==", + "license": "MIT", + "dependencies": { + "node-fetch": "^3.3.2", + "timeout-signal": "^2.0.0", + "whatwg-mimetype": "^4.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/thread-stream": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/thread-stream/-/thread-stream-3.1.0.tgz", + "integrity": "sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==", + "license": "MIT", + "dependencies": { + "real-require": "^0.2.0" + } + }, + "node_modules/timeout-signal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/timeout-signal/-/timeout-signal-2.0.0.tgz", + "integrity": "sha512-YBGpG4bWsHoPvofT6y/5iqulfXIiIErl5B0LdtHT1mGXDFTAhhRrbUpTvBgYbovr+3cKblya2WAOcpoy90XguA==", + "license": "MIT", + "engines": { + "node": ">=16" + } + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/toad-cache": { + "version": "3.7.0", + "resolved": "https://registry.npmjs.org/toad-cache/-/toad-cache-3.7.0.tgz", + "integrity": "sha512-/m8M+2BJUpoJdgAHoG+baCwBT+tf2VraSfkBgl0Y00qIWt41DJ8R5B8nsEw0I58YwF5IZH6z24/2TobDKnqSWw==", + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "license": "MIT", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "license": "MIT", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/undici": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.24.0.tgz", + "integrity": "sha512-jxytwMHhsbdpBXxLAcuu0fzlQeXCNnWdDyRHpvWsUl8vd98UwYdl9YTyn8/HcpcJPC3pwUveefsa3zTxyD/ERg==", + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, + "node_modules/undici-types": { + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/universalify": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", + "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 10.0.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/weald": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/weald/-/weald-1.1.1.tgz", + "integrity": "sha512-PaEQShzMCz8J/AD2N3dJMc1hTZWkJeLKS2NMeiVkV5KDHwgZe7qXLEzyodsT/SODxWDdXJJqocuwf3kHzcXhSQ==", + "license": "Apache-2.0 OR MIT", + "dependencies": { + "ms": "^3.0.0-canary.1", + "supports-color": "^10.0.0" + } + }, + "node_modules/weald/node_modules/ms": { + "version": "3.0.0-canary.202508261828", + "resolved": "https://registry.npmjs.org/ms/-/ms-3.0.0-canary.202508261828.tgz", + "integrity": "sha512-NotsCoUCIUkojWCzQff4ttdCfIPoA1UGZsyQbi7KmqkNRfKCrvga8JJi2PknHymHOuor0cJSn/ylj52Cbt2IrQ==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz", + "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==", + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/whatwg-encoding": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", + "deprecated": "Use @exodus/bytes instead for a more spec-conformant and faster implementation", + "license": "MIT", + "dependencies": { + "iconv-lite": "0.6.3" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/whatwg-mimetype": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/wordwrap": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", + "integrity": "sha512-1tMA907+V4QmxV7dbRvb4/8MaRALK6q9Abid3ndMYnbyo8piisCmeONVqVSXqQA3KaP4SLt5b7ud6E2sqP8TFw==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.19.0.tgz", + "integrity": "sha512-blAT2mjOEIi0ZzruJfIhb3nps74PRWTCz1IjglWEEpQl5XS/UNama6u2/rjFkDDouqr4L67ry+1aGIALViWjDg==", + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xmlhttprequest": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", + "integrity": "sha512-58Im/U0mlVBLM38NdZjHyhuMtCqa61469k2YP/AaPbvCoV9aQGUpbJBj1QRm2ytRiVQBD/fsw7L2bJGDVQswBA==", + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/yoctocolors-cjs": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/yoctocolors-cjs/-/yoctocolors-cjs-2.1.3.tgz", + "integrity": "sha512-U/PBtDf35ff0D8X8D0jfdzHYEPFxAI7jJlxZXwCSez5M3190m+QobIfh+sWDWSHMCWWJN2AWamkegn6vr6YBTw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zod": { + "version": "3.25.76", + "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + }, + "node_modules/zod-to-json-schema": { + "version": "3.25.1", + "resolved": "https://registry.npmjs.org/zod-to-json-schema/-/zod-to-json-schema-3.25.1.tgz", + "integrity": "sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==", + "dev": true, + "license": "ISC", + "peerDependencies": { + "zod": "^3.25 || ^4" + } + } + } +} diff --git a/package.json b/package.json index f412efc1..3d1553be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "drpy-node", - "version": "1.3.26", + "version": "1.3.29", "main": "index.js", "type": "module", "scripts": { @@ -25,7 +25,8 @@ "ungzip-1": "node controllers/decoder.js json/十六万歌曲.json.gz", "moontv": "node scripts/mjs/moontv.mjs 采集2025.json -p", "bundle": "cd drpy-node-bundle && npx rolldown -c", - "test:bundle": "cd drpy-node-bundle && node localDsCoreTest.js" + "test:bundle": "cd drpy-node-bundle && node localDsCoreTest.js", + "test-bun:bundle": "cd drpy-node-bundle && bun localDsCoreTest.js" }, "engines": { "node": ">17 <23" @@ -56,6 +57,7 @@ "json-bigint": "^1.0.0", "lodash": "^4.17.21", "lru-cache": "^9.1.2", + "marked": "^17.0.3", "mime-types": "^2.1.35", "minizlib": "^3.0.1", "node-forge": "^1.3.1", @@ -78,6 +80,7 @@ "xmlhttprequest": "^1.8.0" }, "devDependencies": { + "@anthropic-ai/mcpb": "^2.1.2", "rolldown": "^1.0.0-rc.4" } } diff --git a/public/index.html b/public/index.html index 05349af4..e747138e 100644 --- a/public/index.html +++ b/public/index.html @@ -7,20 +7,21 @@ drpyS-README -

drpyS(drpy-node)

+

drpyS(drpy-node)

zread Ask DeepWiki

nodejs作为服务端的drpy实现。全面升级异步写法
积极开发中,每日一更,当前进度 100%
找工作中,随缘更新
上班当牛马,下班要带娃,阶段性佛系趁娃睡觉熬夜更新

-

常用超链接

+

常用超链接


-

插件应用列表

+

插件应用列表

-

同作者项目

+

同作者项目

-

免费壳子推荐

+

免费壳子推荐

-

更新记录

-

20260228

+

更新记录

+

20260315

+

更新至V1.3.29

+

20260314

+

更新至V1.3.28

+

20260301

+

更新至V1.3.27

+

20260228

更新至V1.3.26

-

20260225

+

20260225

更新至V1.3.25

-

20260214

+

20260214

更新至V1.3.24

-

20260212

+

20260212

更新至V1.3.23

-

20260208

+

20260208

更新至V1.3.22

点此查看完整更新记录

注意事项

总是有人遇到各种奇葩问题,像什么没弹幕,访问/config/1服务马上崩溃等等,能自行解决最好,解决不了我建议你使用下方安装教程 3.道长腾讯轻量云服务器安装方案 跟我一样还有问题那就不可能了,我能用你即能用

-

基础框架

+

基础框架

todo:

  1. js里的源能否去除export开头,保持跟qjs一致
  2. @@ -102,7 +109,7 @@

    基础框架

  3. pino-pretty
  4. deasync
-

参考资料

+

参考资料

-

问题说明

+

问题说明

  1. windows上直接运行index.js可能会发现运行过程中的日志打印出中文乱码。建议通过yarn dev运行或者在package.json里点击dev脚本运行
  2. pinyin 库依赖的 nodejieba 跑路了现在无法完成安装
  3. new Promise 里发生的错误无法被外部try catch 导致程序崩溃,如 番薯动漫.js 里的写法
-

安装说明

+

安装说明

1.zy安装方案

  • 多平台安装教程
  • @@ -154,13 +161,13 @@

    安装说明

    pm2 start drpys pm2 restart drpys -

    代理转发功能测试

    +

    代理转发功能测试

    -

    友链(白嫖接口服务)

    +

    友链(白嫖接口服务)

    -

    AI接入

    +

    AI接入

    -

    版权

    +

    版权

    本项目主体框架由道长开发,项目内相关源收集于互联网,可供学习交流测试使用,禁止商用或者直接转卖代码,转载代码请带上出处。

    -

    免责声明

    +

    免责声明

    1. 此程序仅用于学习研究,不保证其合法性、准确性、有效性,请根据情况自行判断,本人对此不承担任何保证责任。
    2. 由于此程序仅用于学习研究,您必须在下载后 24 小时内将所有内容从您的计算机或手机或任何存储设备中完全删除,若违反规定引起任何事件本人对此均不负责。
    3. diff --git "a/spider/js/Emby[\344\274\230].js" "b/spider/js/Emby[\344\274\230].js" index 690448b5..e7b3dc98 100644 --- "a/spider/js/Emby[\344\274\230].js" +++ "b/spider/js/Emby[\344\274\230].js" @@ -198,7 +198,7 @@ var rule = { return setResult(extractVideos(json)); }, - // 二级详情:按功能模块拆分,每个模块空行分隔 +// 二级详情:按功能模块拆分,每个模块空行分隔 二级: async function (ids) { // 1. 获取基础信息 const detailUrl = `${config.host}/emby/Users/${config.userId}/Items/${ids}?` + @@ -270,8 +270,13 @@ var rule = { `Fields=Overview,PrimaryImageAspectRatio&Limit=1000`; const episodes = (JSON.parse(await fetchApi(episodesUrl))).Items || []; + // 仅新增:添加第几集的序号显示 result.push(episodes.map(function (item) { - return `${item.Name}$${item.Id}`; + // 获取集序号,兜底处理 + const episodeNum = item.IndexNumber ? `第${item.IndexNumber}集` : "未知集数"; + // 拼接序号和原名称 + const fullName = item.Name ? `${episodeNum} ${item.Name}` : episodeNum; + return `${fullName}$${item.Id}`; }).join("#")); } @@ -284,7 +289,6 @@ var rule = { return VOD; }, - // 搜索:URL拆分,逻辑简洁清晰 搜索: async function (wd, quick, pg = 1) { const url = `${config.host}/emby/Users/${config.userId}/Items?` + diff --git a/spider/js/_lib.cntv-urlparse.cjs b/spider/js/_lib.cntv-urlparse.cjs new file mode 100644 index 00000000..a3a76855 --- /dev/null +++ b/spider/js/_lib.cntv-urlparse.cjs @@ -0,0 +1,282 @@ +#!/usr/bin/env node +/** + * CCTV Video URL Parser + * 解析央视视频URL,获取视频下载链接 + * + * 使用方法: + * node parse_url.js "https://tv.cctv.com/2026/03/13/VIDE1I89jcwxtmOiZUd6zsLR260313.shtml" + * node parse_url.js "330318aa5ca745d286b8d6c57e971a39" + * echo "..." | node parse_url.js - + */ + +const crypto = require('crypto'); +const fs = require('fs'); + +// 固定参数 +const CCTV_API_URL = 'https://vdn.apps.cntv.cn/api/getHttpVideoInfo.do'; +const SECRET_KEY = '47899B86370B879139C08EA3B5E88267'; +const UID = '826D8646DEBBFD97A82D23CAE45A55BE'; + +// 提取视频ID的正则规则 +const PID_RULES = [ + /var\s+guid\s*=\s*["']([\da-fA-F]+)["']/, + /videoCenterId(?:["']\s*,|:)\s*["']([\da-fA-F]+)["']/, + /changePlayer\s*\(\s*["']([\da-fA-F]+)["']\)/, + /load[Vv]ideo\s*\(\s*["']([\da-fA-F]+)["']\)/, + /var\s+initMyAray\s*=\s*["']([\da-fA-F]+)["']/, + /var\s+ids\s*=\s*\[["']([\da-fA-F]+)["']\]/ +]; + +// PID格式:32位十六进制字符串 +const PID_PATTERN = /^[\da-fA-F]{32}$/; + +/** + * MD5哈希函数 + */ +function md5(value) { + return crypto.createHash('md5').update(value, 'utf-8').digest('hex'); +} + +/** + * HTTP GET请求(使用fetch) + */ +async function httpGet(url) { + try { + const response = await fetch(url, { + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36' + } + }); + if (!response.ok) { + throw new Error(`HTTP ${response.status}: ${response.statusText}`); + } + return await response.text(); + } catch (error) { + throw error; + } +} + +/** + * 判断输入类型 + * @param {string} input - 用户输入 + * @returns {string} - 'url' | 'pid' | 'html' | 'stdin' + */ +function detectInputType(input) { + if (input === '-') { + return 'stdin'; + } + // 优先检测URL + if (input.match(/^https?:\/\//i)) { + return 'url'; + } + // 检测HTML/JavaScript内容(包含HTML标签或JavaScript变量声明) + if (input.includes(' bestBandwidth) { + bestBandwidth = bandwidth; + bestUri = uriLine; + } + break; + } + } + } + } + } + + // 如果没有找到多码率流,直接返回第一个非空行(单码率情况) + if (!bestUri) { + for (const line of lines) { + const trimmed = line.trim(); + if (trimmed && !trimmed.startsWith('#')) { + bestUri = trimmed; + break; + } + } + } + + // 处理路径 + if (bestUri && !bestUri.startsWith('http')) { + const urlObj = new URL(m3u8BaseUrl); + // 如果是绝对路径(以/开头) + if (bestUri.startsWith('/')) { + bestUri = `${urlObj.protocol}//${urlObj.host}${bestUri}`; + } else { + // 相对路径 + const basePath = urlObj.pathname.substring(0, urlObj.pathname.lastIndexOf('/') + 1); + bestUri = `${urlObj.protocol}//${urlObj.host}${basePath}${bestUri}`; + } + } + + return bestUri; +} + +/** + * 根据PID获取视频信息 + * @param {string} pid - 视频ID + * @returns {Promise} 视频信息对象 + */ +async function getVideoInfoByPid(pid) { + console.log(`使用视频ID: ${pid}`); + + // 构建API请求参数 + console.log('步骤1: 构建API请求...'); + const tsp = Math.floor(Date.now() / 1000); + const vn = '2049'; + const vc = md5(tsp + vn + SECRET_KEY + UID); + + const apiParams = new URLSearchParams({ + pid: pid, + client: 'flash', + im: '0', + tsp: tsp.toString(), + vn: vn, + vc: vc, + uid: UID, + wlan: '' + }); + + const apiUrl = `${CCTV_API_URL}?${apiParams.toString()}`; + console.log(`API URL: ${apiUrl}`); + + // 调用API获取视频信息 + console.log('步骤2: 获取视频信息...'); + const apiResponse = await httpGet(apiUrl); + const videoData = JSON.parse(apiResponse); + + console.log('视频信息:', { + title: videoData.title, + pgtv: videoData.pgtv + }); + + // 获取m3u8下载链接 + console.log('步骤3: 解析下载链接...'); + const manifest = videoData.manifest || {}; + let hlsUrl = manifest.hls_h5e_url || manifest.hls_url || videoData.hls_h5e_url || videoData.hls_url; + + if (!hlsUrl) { + throw new Error('无法获取HLS下载链接'); + } + console.log(`HLS URL: ${hlsUrl}`); + + // 解析m3u8获取最高质量的流 + console.log('步骤4: 解析M3U8获取最佳质量...'); + const m3u8Content = await httpGet(hlsUrl); + const downloadUrl = parseM3U8ForBestQuality(m3u8Content, hlsUrl); + + if (!downloadUrl) { + throw new Error('无法解析M3U8内容'); + } + + console.log(`最终下载链接: ${downloadUrl}`); + + return { + success: true, + title: videoData.title, + pid: pid, + pgtv: videoData.pgtv, + hls_key: manifest.hls_h5e_url ? 'hls_h5e_url' : 'hls_url', + download_url: downloadUrl, + m3u8_url: hlsUrl, + cover_url: videoData.image + }; +} + +/** + * 主函数:解析CCTV视频URL + * @param {string} input - 输入(URL、PID或HTML内容) + * @returns {Promise} 视频信息对象 + */ +async function parseCCTVUrl(input) { + try { + const inputType = detectInputType(input); + console.log(`检测到输入类型: ${inputType}`); + + // 如果是PID,直接调用API + if (inputType === 'pid') { + return await getVideoInfoByPid(input); + } + + // 如果是URL,获取页面内容并提取PID + if (inputType === 'url') { + console.log(`正在解析URL: ${input}`); + console.log('步骤1: 获取页面内容...'); + const html = await httpGet(input); + const pid = extractPid(html); + + if (!pid) { + throw new Error('无法从页面中提取视频ID'); + } + console.log(`找到视频ID: ${pid}`); + + return await getVideoInfoByPid(pid); + } + + // 如果是HTML内容,直接提取PID + if (inputType === 'html') { + console.log('检测到HTML内容,直接提取视频ID...'); + const pid = extractPid(input); + + if (!pid) { + throw new Error('无法从HTML内容中提取视频ID'); + } + console.log(`找到视频ID: ${pid}`); + + return await getVideoInfoByPid(pid); + } + + throw new Error(`不支持的输入类型: ${inputType}`); + + } catch (error) { + console.error('解析失败:', error.message); + return { + success: false, + error: error.message + }; + } +} + +// 导出函数供其他模块使用 +module.exports = {parseCCTVUrl, detectInputType, getVideoInfoByPid}; \ No newline at end of file diff --git a/spider/js/_lib.cntv-wasm.cjs b/spider/js/_lib.cntv-wasm.cjs new file mode 100644 index 00000000..942a789c --- /dev/null +++ b/spider/js/_lib.cntv-wasm.cjs @@ -0,0 +1,5 @@ +var CNTVModule=function(){var _scriptDir="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0;return function(CNTVModule){CNTVModule=CNTVModule||{};var Module=void 0!==CNTVModule?CNTVModule:{},moduleOverrides={},key;for(key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var arguments_=[],thisProgram="./this.program",quit_=function(A,e){throw e},ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_HAS_NODE=!1,ENVIRONMENT_IS_SHELL=!1,ENVIRONMENT_IS_WEB="object"==typeof window,ENVIRONMENT_IS_WORKER="function"==typeof importScripts,ENVIRONMENT_HAS_NODE="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,ENVIRONMENT_IS_NODE=ENVIRONMENT_HAS_NODE&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER,scriptDirectory="",read_,readAsync,readBinary,setWindowTitle;function locateFile(A){return Module.locateFile?Module.locateFile(A,scriptDirectory):scriptDirectory+A}(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER)&&(ENVIRONMENT_IS_WORKER?scriptDirectory=self.location.href:document.currentScript&&(scriptDirectory=document.currentScript.src),_scriptDir&&(scriptDirectory=_scriptDir),scriptDirectory=0!==scriptDirectory.indexOf("blob:")?scriptDirectory.substr(0,scriptDirectory.lastIndexOf("/")+1):"",read_=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText}catch(A){t=tryParseAsDataURI(e);if(t)return intArrayToString(t);throw A}},ENVIRONMENT_IS_WORKER&&(readBinary=function(e){try{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}catch(A){t=tryParseAsDataURI(e);if(t)return t;throw A}}),readAsync=function(e,t,g){var r=new XMLHttpRequest;r.open("GET",e,!0),r.responseType="arraybuffer",r.onload=function(){var A;200==r.status||0==r.status&&r.response?t(r.response):(A=tryParseAsDataURI(e))?t(A.buffer):g()},r.onerror=g,r.send(null)},setWindowTitle=function(A){document.title=A});var out=Module.print||console.log.bind(console),err=Module.printErr||console.warn.bind(console);for(key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);function dynamicAlloc(A){var e=HEAP32[DYNAMICTOP_PTR>>2],A=e+A+15&-16;return A>_emscripten_get_heap_size()&&abort(),HEAP32[DYNAMICTOP_PTR>>2]=A,e}function getNativeTypeSize(A){switch(A){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:var e;return"*"===A[A.length-1]?4:"i"===A[0]?(assert((e=parseInt(A.substr(1)))%8==0,"getNativeTypeSize invalid bits "+e+", type "+A),e/8):0}}function warnOnce(A){warnOnce.shown||(warnOnce.shown={}),warnOnce.shown[A]||(warnOnce.shown[A]=1,err(A))}moduleOverrides=null,Module.arguments&&(arguments_=Module.arguments),Module.thisProgram&&(thisProgram=Module.thisProgram),Module.quit&&(quit_=Module.quit);var asm2wasmImports={"f64-rem":function(A,e){return A%e},debugger:function(){}},jsCallStartIndex=1,functionPointers=new Array(14);function addFunction(A,e){for(var t=0;t<14;t++)if(!functionPointers[t])return functionPointers[t]=A,jsCallStartIndex+t;throw"Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS."}function makeBigInt(A,e,t){return t?(A>>>0)+4294967296*(e>>>0):(A>>>0)+4294967296*(0|e)}var tempRet0=0,setTempRet0=function(A){tempRet0=A},getTempRet0=function(){return tempRet0},wasmBinary,wasmMemory,wasmTable;function setValue(A,e,t,g){switch(t="*"===(t=t||"i8").charAt(t.length-1)?"i32":t){case"i1":case"i8":HEAP8[A>>0]=e;break;case"i16":HEAP16[A>>1]=e;break;case"i32":HEAP32[A>>2]=e;break;case"i64":tempI64=[e>>>0,1<=+Math_abs(tempDouble=e)?0>>0:~~+Math_ceil((tempDouble-(~~tempDouble>>>0))/4294967296)>>>0:0],HEAP32[A>>2]=tempI64[0],HEAP32[A+4>>2]=tempI64[1];break;case"float":HEAPF32[A>>2]=e;break;case"double":HEAPF64[A>>3]=e;break;default:abort("invalid type for setValue: "+t)}}Module.wasmBinary&&(wasmBinary=Module.wasmBinary),"object"!=typeof WebAssembly&&err("no native wasm support detected");var ABORT=!1,EXITSTATUS=0;function assert(A,e){A||abort("Assertion failed: "+e)}var ALLOC_NONE=3;function allocate(A,e,t,g){var r,B,n="number"==typeof A?(r=!0,A):(r=!1,A.length),E="string"==typeof e?e:null,C=t==ALLOC_NONE?g:[_malloc,stackAlloc,dynamicAlloc][t](Math.max(n,E?1:e.length));if(r){for(assert(0==(3&(g=C))),B=C+(-4&n);g>2]=0;for(B=C+n;g>0]=0}else if("i8"===E)A.subarray||A.slice?HEAPU8.set(A,C):HEAPU8.set(new Uint8Array(A),C);else for(var o,I,Q=0;Q>10,56320|1023&E)))):B+=String.fromCharCode(C)}return B}function UTF8ToString(A,e){return A?UTF8ArrayToString(HEAPU8,A,e):""}function stringToUTF8Array(A,e,t,g){if(!(0>6}else{if(E<=65535){if(B<=t+2)break;e[t++]=224|E>>12}else{if(B<=t+3)break;e[t++]=240|E>>18,e[t++]=128|E>>12&63}e[t++]=128|E>>6&63}e[t++]=128|63&E}}return e[t]=0,t-r}function stringToUTF8(A,e,t){return stringToUTF8Array(A,HEAPU8,e,t)}function lengthBytesUTF8(A){for(var e=0,t=0;t>2]=DYNAMIC_BASE;var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for("function"==typeof Module.preRun&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function initRuntime(){runtimeInitialized=!0,Module.noFSInit||FS.init.initialized||FS.init(),TTY.init(),callRuntimeCallbacks(__ATINIT__)}function preMain(){FS.ignorePermissions=!1,callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){runtimeExited=!0}function postRun(){if(Module.postRun)for("function"==typeof Module.postRun&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(A){__ATPRERUN__.unshift(A)}function addOnPostRun(A){__ATPOSTRUN__.unshift(A)}function unSign(A,e,t){return 0<=A?A:e<=32?2*Math.abs(1<>2]=HEAPU32[eb+A[e]>>2]+eb});var ___exception_infos={},___exception_caught=[];function ___exception_addRef(A){A&&___exception_infos[A].refcount++}function ___exception_deAdjust(A){if(A&&!___exception_infos[A])for(var e in ___exception_infos)for(var t=+e,g=___exception_infos[t].adjusted,r=g.length,B=0;B>2]=A),A}var PATH_FS={resolve:function(){for(var A="",e=!1,t=arguments.length-1;-1<=t&&!e;t--){var g=0<=t?arguments[t]:FS.cwd();if("string"!=typeof g)throw new TypeError("Arguments to path.resolve must be strings");if(!g)return"";A=g+"/"+A,e="/"===g.charAt(0)}return(e?"/":"")+(A=PATH.normalizeArray(A.split("/").filter(function(A){return!!A}),!e).join("/"))||"."},relative:function(A,e){function t(A){for(var e=0;ee)A.contents.length=e;else for(;A.contents.length=A.node.usedBytes)return 0;var n=Math.min(A.node.usedBytes-r,g);if(8t.timestamp)&&(n.push(A),B++)}),[]);if(Object.keys(r.entries).forEach(function(A){r.entries[A];g.entries[A]||(t.push(A),B++)}),!B)return e(null);var E=!1,A=("remote"===g.type?g:r).db.transaction([IDBFS.DB_STORE_NAME],"readwrite"),C=A.objectStore(IDBFS.DB_STORE_NAME);function o(A){if(A&&!E)return E=!0,e(A)}A.onerror=function(A){o(this.error),A.preventDefault()},A.oncomplete=function(A){E||e(null)},n.sort().forEach(function(t){"local"===r.type?IDBFS.loadRemoteEntry(C,t,function(A,e){if(A)return o(A);IDBFS.storeLocalEntry(t,e,o)}):IDBFS.loadLocalEntry(t,function(A,e){if(A)return o(A);IDBFS.storeRemoteEntry(C,t,e,o)})}),t.sort().reverse().forEach(function(A){"local"===r.type?IDBFS.removeLocalEntry(A,o):IDBFS.removeRemoteEntry(C,A,o)})}},WORKERFS={DIR_MODE:16895,FILE_MODE:33279,reader:null,mount:function(A){assert(ENVIRONMENT_IS_WORKER),WORKERFS.reader||(WORKERFS.reader=new FileReaderSync);var B=WORKERFS.createNode(null,"/",WORKERFS.DIR_MODE,0),n={};function g(A){for(var e=A.split("/"),t=B,g=0;g=A.node.size?0:(A=A.node.contents.slice(r,r+g),r=WORKERFS.reader.readAsArrayBuffer(A),e.set(new Uint8Array(r),t),A.size)},write:function(A,e,t,g,r){throw new FS.ErrnoError(5)},llseek:function(A,e,t){if(1===t?e+=A.position:2===t&&FS.isFile(A.node.mode)&&(e+=A.node.size),e<0)throw new FS.ErrnoError(22);return e}}},FS={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,trackingDelegate:{},tracking:{openFlags:{READ:1,WRITE:2}},ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,handleFSError:function(A){if(A instanceof FS.ErrnoError)return ___setErrNo(A.errno);throw A+" : "+stackTrace()},lookupPath:function(A,e){if(e=e||{},!(A=PATH_FS.resolve(FS.cwd(),A)))return{path:"",node:null};var t,g={follow_mount:!0,recurse_count:0};for(t in g)void 0===e[t]&&(e[t]=g[t]);if(8>>0)%FS.nameTable.length},hashAddNode:function(A){var e=FS.hashName(A.parent.id,A.name);A.name_next=FS.nameTable[e],FS.nameTable[e]=A},hashRemoveNode:function(A){var e=FS.hashName(A.parent.id,A.name);if(FS.nameTable[e]===A)FS.nameTable[e]=A.name_next;else for(var t=FS.nameTable[e];t;){if(t.name_next===A){t.name_next=A.name_next;break}t=t.name_next}},lookupNode:function(A,e){var t=FS.mayLookup(A);if(t)throw new FS.ErrnoError(t,A);for(var t=FS.hashName(A.id,e),g=FS.nameTable[t];g;g=g.name_next){var r=g.name;if(g.parent.id===A.id&&r===e)return g}return FS.lookup(A,e)},createNode:function(A,e,t,g){FS.FSNode||(FS.FSNode=function(A,e,t,g){this.parent=A=A||this,this.mount=A.mount,this.mounted=null,this.id=FS.nextInode++,this.name=e,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=g},FS.FSNode.prototype={},Object.defineProperties(FS.FSNode.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(A){A?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(A){A?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return FS.isDir(this.mode)}},isDevice:{get:function(){return FS.isChrdev(this.mode)}}}));A=new FS.FSNode(A,e,t,g);return FS.hashAddNode(A),A},destroyNode:function(A){FS.hashRemoveNode(A)},isRoot:function(A){return A===A.parent},isMountpoint:function(A){return!!A.mounted},isFile:function(A){return 32768==(61440&A)},isDir:function(A){return 16384==(61440&A)},isLink:function(A){return 40960==(61440&A)},isChrdev:function(A){return 8192==(61440&A)},isBlkdev:function(A){return 24576==(61440&A)},isFIFO:function(A){return 4096==(61440&A)},isSocket:function(A){return 49152==(49152&A)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(A){var e=FS.flagModes[A];if(void 0===e)throw new Error("Unknown file open mode: "+A);return e},flagsToPermissionString:function(A){var e=["r","w","rw"][3&A];return 512&A&&(e+="w"),e},nodePermissions:function(A,e){return FS.ignorePermissions||(-1===e.indexOf("r")||292&A.mode)&&(-1===e.indexOf("w")||146&A.mode)&&(-1===e.indexOf("x")||73&A.mode)?0:13},mayLookup:function(A){var e=FS.nodePermissions(A,"x");return e||(A.node_ops.lookup?0:13)},mayCreate:function(A,e){try{FS.lookupNode(A,e);return 17}catch(A){}return FS.nodePermissions(A,"wx")},mayDelete:function(A,e,t){var g;try{g=FS.lookupNode(A,e)}catch(A){return A.errno}e=FS.nodePermissions(A,"wx");if(e)return e;if(t){if(!FS.isDir(g.mode))return 20;if(FS.isRoot(g)||FS.getPath(g)===FS.cwd())return 16}else if(FS.isDir(g.mode))return 21;return 0},mayOpen:function(A,e){return A?FS.isLink(A.mode)?40:FS.isDir(A.mode)&&("r"!==FS.flagsToPermissionString(e)||512&e)?21:FS.nodePermissions(A,FS.flagsToPermissionString(e)):2},MAX_OPEN_FDS:4096,nextfd:function(A,e){e=e||FS.MAX_OPEN_FDS;for(var t=A=A||0;t<=e;t++)if(!FS.streams[t])return t;throw new FS.ErrnoError(24)},getStream:function(A){return FS.streams[A]},createStream:function(A,e,t){FS.FSStream||(FS.FSStream=function(){},FS.FSStream.prototype={},Object.defineProperties(FS.FSStream.prototype,{object:{get:function(){return this.node},set:function(A){this.node=A}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}}));var g,r=new FS.FSStream;for(g in A)r[g]=A[g];A=r;e=FS.nextfd(e,t);return A.fd=e,FS.streams[e]=A},closeStream:function(A){FS.streams[A]=null},chrdev_stream_ops:{open:function(A){var e=FS.getDevice(A.node.rdev);A.stream_ops=e.stream_ops,A.stream_ops.open&&A.stream_ops.open(A)},llseek:function(){throw new FS.ErrnoError(29)}},major:function(A){return A>>8},minor:function(A){return 255&A},makedev:function(A,e){return A<<8|e},registerDevice:function(A,e){FS.devices[A]={stream_ops:e}},getDevice:function(A){return FS.devices[A]},getMounts:function(A){for(var e=[],t=[A];t.length;){var g=t.pop();e.push(g),t.push.apply(t,g.mounts)}return e},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),FS.syncFSRequests++,1=g.length&&B(null)}g.forEach(function(A){if(!A.type.syncfs)return n(null);A.type.syncfs(A,e,n)})},mount:function(A,e,t){var g,r="/"===t,B=!t;if(r&&FS.root)throw new FS.ErrnoError(16);if(!r&&!B){B=FS.lookupPath(t,{follow_mount:!1});if(t=B.path,g=B.node,FS.isMountpoint(g))throw new FS.ErrnoError(16);if(!FS.isDir(g.mode))throw new FS.ErrnoError(20)}B={type:A,opts:e,mountpoint:t,mounts:[]},e=A.mount(B);return(e.mount=B).root=e,r?FS.root=e:g&&(g.mounted=B,g.mount)&&g.mount.mounts.push(B),e},unmount:function(A){A=FS.lookupPath(A,{follow_mount:!1});if(!FS.isMountpoint(A.node))throw new FS.ErrnoError(22);var A=A.node,e=A.mounted,g=FS.getMounts(e),e=(Object.keys(FS.nameTable).forEach(function(A){for(var e=FS.nameTable[A];e;){var t=e.name_next;-1!==g.indexOf(e.mount)&&FS.destroyNode(e),e=t}}),A.mounted=null,A.mount.mounts.indexOf(e));A.mount.mounts.splice(e,1)},lookup:function(A,e){return A.node_ops.lookup(A,e)},mknod:function(A,e,t){var g=FS.lookupPath(A,{parent:!0}).node,A=PATH.basename(A);if(!A||"."===A||".."===A)throw new FS.ErrnoError(22);var r=FS.mayCreate(g,A);if(r)throw new FS.ErrnoError(r);if(g.node_ops.mknod)return g.node_ops.mknod(g,A,e,t);throw new FS.ErrnoError(1)},create:function(A,e){return FS.mknod(A,e=(e=void 0!==e?e:438)&4095|32768,0)},mkdir:function(A,e){return FS.mknod(A,e=(e=void 0!==e?e:511)&1023|16384,0)},mkdirTree:function(A,e){for(var t=A.split("/"),g="",r=0;rthis.length-1||A<0))return e=A%this.chunkSize,A=A/this.chunkSize|0,this.getter(A)[e]},r.prototype.setDataGetter=function(A){this.getter=A},r.prototype.cacheLength=function(){var A=new XMLHttpRequest;if(A.open("HEAD",n,!1),A.send(null),!(200<=A.status&&A.status<300||304===A.status))throw new Error("Couldn't load "+n+". Status: "+A.status);var e,g=Number(A.getResponseHeader("Content-length")),t=(e=A.getResponseHeader("Accept-Ranges"))&&"bytes"===e,A=(e=A.getResponseHeader("Content-Encoding"))&&"gzip"===e,r=1048576,B=(t||(r=g),this);B.setDataGetter(function(A){var e=A*r,t=(A+1)*r-1,t=Math.min(t,g-1);if(void 0===B.chunks[A]&&(B.chunks[A]=function(A,e){if(e=B.length)return 0;var n=Math.min(B.length-r,g);if(B.slice)for(var E=0;E>2]=g.dev,HEAP32[t+4>>2]=0,HEAP32[t+8>>2]=g.ino,HEAP32[t+12>>2]=g.mode,HEAP32[t+16>>2]=g.nlink,HEAP32[t+20>>2]=g.uid,HEAP32[t+24>>2]=g.gid,HEAP32[t+28>>2]=g.rdev,HEAP32[t+32>>2]=0,tempI64=[g.size>>>0,(tempDouble=g.size,1<=+Math_abs(tempDouble)?0>>0:~~+Math_ceil((tempDouble-(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+40>>2]=tempI64[0],HEAP32[t+44>>2]=tempI64[1],HEAP32[t+48>>2]=4096,HEAP32[t+52>>2]=g.blocks,HEAP32[t+56>>2]=g.atime.getTime()/1e3|0,HEAP32[t+60>>2]=0,HEAP32[t+64>>2]=g.mtime.getTime()/1e3|0,HEAP32[t+68>>2]=0,HEAP32[t+72>>2]=g.ctime.getTime()/1e3|0,HEAP32[t+76>>2]=0,tempI64=[g.ino>>>0,(tempDouble=g.ino,1<=+Math_abs(tempDouble)?0>>0:~~+Math_ceil((tempDouble-(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t+80>>2]=tempI64[0],HEAP32[t+84>>2]=tempI64[1],0},doMsync:function(A,e,t,g){A=new Uint8Array(HEAPU8.subarray(A,A+t));FS.msync(e,A,0,t,g)},doMkdir:function(A,e){return"/"===(A=PATH.normalize(A))[A.length-1]&&(A=A.substr(0,A.length-1)),FS.mkdir(A,e,0),0},doMknod:function(A,e,t){switch(61440&e){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-22}return FS.mknod(A,e,t),0},doReadlink:function(A,e,t){var g,r;return t<=0?-22:(A=FS.readlink(A),g=Math.min(t,lengthBytesUTF8(A)),r=HEAP8[e+g],stringToUTF8(A,e,t+1),HEAP8[e+g]=r,g)},doAccess:function(A,e){var t;return-8&e?-22:(A=FS.lookupPath(A,{follow:!0}).node)?(t="",4&e&&(t+="r"),2&e&&(t+="w"),1&e&&(t+="x"),t&&FS.nodePermissions(A,t)?-13:0):-2},doDup:function(A,e,t){var g=FS.getStream(t);return g&&FS.close(g),FS.open(A,e,0,t,t).fd},doReadv:function(A,e,t,g){for(var r=0,B=0;B>2],E=HEAP32[e+(8*B+4)>>2],n=FS.read(A,HEAP8,n,E,g);if(n<0)return-1;if(r+=n,n>2],E=HEAP32[e+(8*B+4)>>2],n=FS.write(A,HEAP8,n,E,g);if(n<0)return-1;r+=n}return r},varargs:0,get:function(A){return SYSCALLS.varargs+=4,HEAP32[SYSCALLS.varargs-4>>2]},getStr:function(){return UTF8ToString(SYSCALLS.get())},getStreamFromFD:function(){var A=FS.getStream(SYSCALLS.get());if(A)return A;throw new FS.ErrnoError(9)},get64:function(){var A=SYSCALLS.get();SYSCALLS.get();return A},getZero:function(){SYSCALLS.get()}};function ___syscall140(A,e){SYSCALLS.varargs=e;try{var t=SYSCALLS.getStreamFromFD(),g=SYSCALLS.get(),r=SYSCALLS.get(),B=SYSCALLS.get(),n=SYSCALLS.get(),E=4294967296*g+(r>>>0),C=9007199254740992;return E<=-C||C<=E?-75:(FS.llseek(t,E,n),tempI64=[t.position>>>0,(tempDouble=t.position,1<=+Math_abs(tempDouble)?0>>0:~~+Math_ceil((tempDouble-(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[B>>2]=tempI64[0],HEAP32[B+4>>2]=tempI64[1],t.getdents&&0==E&&0===n&&(t.getdents=null),0)}catch(A){return void 0!==FS&&A instanceof FS.ErrnoError||abort(A),-A.errno}}function ___syscall146(A,e){SYSCALLS.varargs=e;try{var t=SYSCALLS.getStreamFromFD(),g=SYSCALLS.get(),r=SYSCALLS.get();return SYSCALLS.doWritev(t,g,r)}catch(A){return void 0!==FS&&A instanceof FS.ErrnoError||abort(A),-A.errno}}function ___syscall6(A,e){SYSCALLS.varargs=e;try{var t=SYSCALLS.getStreamFromFD();return FS.close(t),0}catch(A){return void 0!==FS&&A instanceof FS.ErrnoError||abort(A),-A.errno}}function getShiftFromSize(A){switch(A){case 1:return 0;case 2:return 1;case 4:return 2;case 8:return 3;default:throw new TypeError("Unknown type size: "+A)}}function embind_init_charCodes(){for(var A=new Array(256),e=0;e<256;++e)A[e]=String.fromCharCode(e);embind_charCodes=A}var embind_charCodes=void 0;function readLatin1String(A){for(var e="",t=A;HEAPU8[t];)e+=embind_charCodes[HEAPU8[t++]];return e}var awaitingDependencies={},registeredTypes={},typeDependencies={},char_0=48,char_9=57;function makeLegalFunctionName(A){var e;return void 0===A?"_unknown":(e=(A=A.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0),char_0<=e&&e<=char_9?"_"+A:A)}function createNamedFunction(A,e){return A=makeLegalFunctionName(A),new Function("body","return function "+A+'() {\n "use strict"; return body.apply(this, arguments);\n};\n')(e)}function extendError(A,e){var t=createNamedFunction(e,function(A){this.name=e,this.message=A;A=new Error(A).stack;void 0!==A&&(this.stack=this.toString()+"\n"+A.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(A.prototype),(t.prototype.constructor=t).prototype.toString=function(){return void 0===this.message?this.name:this.name+": "+this.message},t}var BindingError=void 0;function throwBindingError(A){throw new BindingError(A)}var InternalError=void 0;function registerType(A,e,t){if(t=t||{},!("argPackAdvance"in e))throw new TypeError("registerType registeredInstance requires argPackAdvance");var g=e.name;if(A||throwBindingError('type "'+g+'" must have a positive integer typeid pointer'),registeredTypes.hasOwnProperty(A)){if(t.ignoreDuplicateRegistrations)return;throwBindingError("Cannot register type '"+g+"' twice")}registeredTypes[A]=e,delete typeDependencies[A],awaitingDependencies.hasOwnProperty(A)&&(t=awaitingDependencies[A],delete awaitingDependencies[A],t.forEach(function(A){A()}))}function __embind_register_bool(A,t,g,r,B){var n=getShiftFromSize(g);registerType(A,{name:t=readLatin1String(t),fromWireType:function(A){return!!A},toWireType:function(A,e){return e?r:B},argPackAdvance:8,readValueFromPointer:function(A){var e;if(1===g)e=HEAP8;else if(2===g)e=HEAP16;else{if(4!==g)throw new TypeError("Unknown boolean type size: "+t);e=HEAP32}return this.fromWireType(e[A>>n])},destructorFunction:null})}var emval_free_list=[],emval_handle_array=[{},{value:{href:"blob:https://tv.cctv.com/a2a31e32-7705-4db1-b190-1bd401598188"}},{value:null},{value:!0},{value:!1}];function __emval_decref(A){4>2])}function __embind_register_emval(A,e){registerType(A,{name:e=readLatin1String(e),fromWireType:function(A){var e=emval_handle_array[A].value;return __emval_decref(A),e},toWireType:function(A,e){return __emval_register(e)},argPackAdvance:8,readValueFromPointer:simpleReadValueFromPointer,destructorFunction:null})}function _embind_repr(A){var e;return null===A?"null":"object"==(e=typeof A)||"array"==e||"function"==e?A.toString():""+A}function floatReadValueFromPointer(A,e){switch(e){case 2:return function(A){return this.fromWireType(HEAPF32[A>>2])};case 3:return function(A){return this.fromWireType(HEAPF64[A>>3])};default:throw new TypeError("Unknown float type: "+A)}}function __embind_register_float(A,e,t){t=getShiftFromSize(t);registerType(A,{name:e=readLatin1String(e),fromWireType:function(A){return A},toWireType:function(A,e){if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+_embind_repr(e)+'" to '+this.name);return e},argPackAdvance:8,readValueFromPointer:floatReadValueFromPointer(e,t),destructorFunction:null})}function integerReadValueFromPointer(A,e,t){switch(e){case 0:return t?function(A){return HEAP8[A]}:function(A){return HEAPU8[A]};case 1:return t?function(A){return HEAP16[A>>1]}:function(A){return HEAPU16[A>>1]};case 2:return t?function(A){return HEAP32[A>>2]}:function(A){return HEAPU32[A>>2]};default:throw new TypeError("Unknown integer type: "+A)}}function __embind_register_integer(A,t,e,g,r){t=readLatin1String(t),-1===r&&(r=4294967295);var B,n=getShiftFromSize(e),E=function(A){return A},C=(0===g&&(B=32-8*e,E=function(A){return A<>>B}),-1!=t.indexOf("unsigned"));registerType(A,{name:t,fromWireType:E,toWireType:function(A,e){if("number"!=typeof e&&"boolean"!=typeof e)throw new TypeError('Cannot convert "'+_embind_repr(e)+'" to '+this.name);if(e>>0:0|e},argPackAdvance:8,readValueFromPointer:integerReadValueFromPointer(t,n,0!==g),destructorFunction:null})}function __embind_register_memory_view(A,e,t){var g=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function r(A){var e=HEAPU32,t=e[A>>=2],A=e[A+1];return new g(e.buffer,A,t)}registerType(A,{name:t=readLatin1String(t),fromWireType:r,argPackAdvance:8,readValueFromPointer:r},{ignoreDuplicateRegistrations:!0})}function __embind_register_std_string(A,e){var I="std::string"===(e=readLatin1String(e));registerType(A,{name:e,fromWireType:function(A){var e=HEAPU32[A>>2];if(I){for(var t=HEAPU8[A+4+e],g=0,r=(0!=t&&(g=t,HEAPU8[A+4+e]=0),A+4),B=0;B<=e;++B){var n,E,C=A+4+B;0==HEAPU8[C]&&(n=UTF8ToString(r),E=void 0===E?n:E+String.fromCharCode(0)+n,r=C+1)}0!=g&&(HEAPU8[A+4+e]=g)}else{for(var o=new Array(e),B=0;B>2]=g,I&&t)stringToUTF8(e,r+4,g+1);else if(t)for(var B=0;B>2],g=new Array(t),r=A+4>>o,B=0;B>2]=g,r+4>>o),n=0;n>2]=r,e.toWireType(g,A)}var emval_symbols={};function getStringOrSymbol(A){var e=emval_symbols[A];return void 0===e?readLatin1String(A):e}function emval_get_global(){return"object"==typeof globalThis?globalThis:Function("return this")()}function __emval_get_global(A){return 0===A?__emval_register(emval_get_global()):(A=getStringOrSymbol(A),__emval_register(emval_get_global()[A]))}function __emval_get_property(A,e){return __emval_register((A=requireHandle(A))[e=requireHandle(e)])}function runDestructors(A){for(;A.length;){var e=A.pop();A.pop()(e)}}function __emval_run_destructors(A){runDestructors(emval_handle_array[A].value),__emval_decref(A)}function __emval_take_value(A,e){return __emval_register((A=requireRegisteredType(A,"_emval_take_value")).readValueFromPointer(e))}function _abort(){Module.abort()}function _emscripten_date_now(){return Date.now()}function __emscripten_traverse_stack(A){if(!A||!A.callee||!A.callee.name)return[null,"",""];A.callee.toString();var e,t=A.callee.name,g="(",r=!0;for(e in A){var B=A[e];r||(g+=", "),r=!1,g+="number"==typeof B||"string"==typeof B?B:"("+typeof B+")"}g+=")";var n=A.callee.caller;return[A=n?n.arguments:[],t,g=r?"":g]}function _emscripten_get_callstack_js(A){var e=(g=jsStackTrace()).lastIndexOf("_emscripten_log"),t=g.lastIndexOf("_emscripten_get_callstack"),e=g.indexOf("\n",Math.max(e,t))+1,g=g.slice(e),r=(8&A&&"undefined"==typeof emscripten_source_map&&(warnOnce('Source map information is not available, emscripten_log with EM_LOG_C_STACK will be ignored. Build with "--pre-js $EMSCRIPTEN/src/emscripten-source-map.min.js" linker flag to add source map loading to code.'),A=8^A|16),null);if(128&A)for(r=__emscripten_traverse_stack(arguments);0<=r[1].indexOf("_emscripten_");)r=__emscripten_traverse_stack(r[0]);var B,n=g.split("\n"),E=(g="",new RegExp("\\s*(.*?)@(.*?):([0-9]+):([0-9]+)")),C=new RegExp("\\s*(.*?)@(.*):(.*)(:(.*))?"),o=new RegExp("\\s*at (.*?) \\((.*):(.*):(.*)\\)");for(B in n){var I=n[B],Q="",i="",a=0,s=0,l=o.exec(I);if(l&&5==l.length)Q=l[1],i=l[2],a=l[3],s=l[4];else{if(!((l=(l=E.exec(I))||C.exec(I))&&4<=l.length)){g+=I+"\n";continue}Q=l[1],i=l[2],a=l[3],s=0|l[4]}var c,I=(I=32&A?demangle(Q):Q)||Q,l=!1;8&A&&(l=(c=emscripten_source_map.originalPositionFor({line:a,column:s}))&&c.source)&&(64&A&&(c.source=c.source.substring(c.source.replace(/\\/g,"/").lastIndexOf("/")+1)),g+=" at "+I+" ("+c.source+":"+c.line+":"+c.column+")\n"),(16&A||!l)&&(g+=(l?" = "+Q:" at "+I)+" ("+(i=64&A?i.substring(i.replace(/\\/g,"/").lastIndexOf("/")+1):i)+":"+a+":"+s+")\n"),128&A&&r[0]&&(r[1]==Q&&0>3],r+=8):"i64"==A?(e=[HEAP32[r>>2],HEAP32[r+4>>2]],r+=8):(assert(0==(3&r)),A="i32",e=HEAP32[r>>2],r+=4),e}for(var B,n=[];;){var E,C=t;if(0===(E=HEAP8[t>>0]))break;if(B=HEAP8[t+1>>0],37==E){var o=!1,I=!1,Q=!1,i=!1,a=!1;A:for(;;){switch(B){case 43:o=!0;break;case 45:I=!0;break;case 35:Q=!0;break;case 48:if(i)break A;i=!0;break;case 32:a=!0;break;default:break A}B=HEAP8[++t+1>>0]}var s=0;if(42==B)s=g("i32"),B=HEAP8[++t+1>>0];else for(;48<=B&&B<=57;)s=10*s+(B-48),B=HEAP8[++t+1>>0];var l=!1,c=-1;if(46==B){if(l=!(c=0),42==(B=HEAP8[++t+1>>0]))c=g("i32"),t++;else for(;;){var w=HEAP8[t+1>>0];if(w<48||57>0]}switch(c<0&&(l=!(c=6)),String.fromCharCode(B)){case"h":var u=104==HEAP8[t+2>>0]?(t++,1):2;break;case"l":u=108==HEAP8[t+2>>0]?(t++,8):4;break;case"L":case"q":case"j":u=8;break;case"z":case"t":case"I":u=4;break;default:u=null}switch(u&&t++,B=HEAP8[t+1>>0],String.fromCharCode(B)){case"d":case"i":case"u":case"o":case"x":case"X":case"p":var M,d,F=100==B||105==B,F=(d=g("i"+8*(u=u||4)),8==u&&(d=makeBigInt(d[0],d[1],117==B)),u<=4&&(d=(F?reSign:unSign)(d&Math.pow(256,u)-1,8*u)),Math.abs(d)),f="";if(100==B||105==B)M=reSign(d,8*u,1).toString(10);else if(117==B)M=unSign(d,8*u,1).toString(10),d=Math.abs(d);else if(111==B)M=(Q?"0":"")+F.toString(8);else if(120==B||88==B){if(f=Q&&0!=d?"0x":"",d<0){d=-d,M=(F-1).toString(16);for(var Y=[],D=0;Dh++;)R[0]+="0";M=R[0]+(1>0]);else n=n.concat(intArrayFromString("(null)".substr(0,y),!0));if(I)for(;y>2]=n.length;break;case"%":n.push(E);break;default:for(D=C;D>0])}t+=2}else n.push(E),t+=1}return n}function _emscripten_log_js(A,e){24&A&&(e=e.replace(/\s+$/,""),e+=(0>2],g=(e+=4,"");if(t)for(var r=__formatString(t,e),B=0;B>2]=e,HEAPU32[A+4>>2]=e/4294967296|0},openDatabase:function(A,e,t,g){try{var r=indexedDB.open(A,e)}catch(A){return g(A)}r.onupgradeneeded=function(A){A=A.target.result;A.objectStoreNames.contains("FILES")&&A.deleteObjectStore("FILES"),A.createObjectStore("FILES")},r.onsuccess=function(A){t(A.target.result)},r.onerror=function(A){g(A)}},staticInit:function(){var e="undefined"==typeof ENVIRONMENT_IS_FETCH_WORKER;Fetch.openDatabase("emscripten_filesystem",1,function(A){Fetch.dbInstance=A,e&&removeRunDependency("library_fetch_init")},function(){Fetch.dbInstance=!1,e&&removeRunDependency("library_fetch_init")}),"undefined"!=typeof ENVIRONMENT_IS_FETCH_WORKER&&ENVIRONMENT_IS_FETCH_WORKER||addRunDependency("library_fetch_init")}};function __emscripten_fetch_xhr(r,B,n,g,e){var A=HEAPU32[r+8>>2];if(A){var A=UTF8ToString(A),t=r+112,E=(E=UTF8ToString(t))||"GET",C=(HEAPU32[t+32>>2],HEAPU32[t+52>>2]),o=HEAPU32[t+56>>2],I=!!HEAPU32[t+60>>2],Q=(HEAPU32[t+64>>2],HEAPU32[t+68>>2]),i=HEAPU32[t+72>>2],a=HEAPU32[t+76>>2],s=HEAPU32[t+80>>2],l=HEAPU32[t+84>>2],t=HEAPU32[t+88>>2],c=!!(1&C),w=!!(2&C),C=!!(64&C),Q=Q?UTF8ToString(Q):void 0,i=i?UTF8ToString(i):void 0,u=s?UTF8ToString(s):void 0,M=new XMLHttpRequest;if(M.withCredentials=I,M.open(E,A,!C,Q,i),C||(M.timeout=o),M.url_=A,assert(!w,"streaming uses moz-chunked-arraybuffer which is no longer supported; TODO: rewrite using fetch()"),M.responseType="arraybuffer",s&&M.overrideMimeType(u),a)for(;;){var d=HEAPU32[a>>2];if(!d)break;var F=HEAPU32[a+4>>2];if(!F)break;a+=8;d=UTF8ToString(d),F=UTF8ToString(F);M.setRequestHeader(d,F)}Fetch.xhrs.push(M);I=Fetch.xhrs.length,E=(HEAPU32[r+0>>2]=I,l&&t?HEAPU8.slice(l,l+t):null);M.onload=function(A){var e=M.response?M.response.byteLength:0,t=0,g=0;c&&!w&&(t=_malloc(g=e),HEAPU8.set(new Uint8Array(M.response),t)),HEAPU32[r+12>>2]=t,Fetch.setu64(r+16,g),Fetch.setu64(r+24,0),e&&Fetch.setu64(r+32,e),HEAPU16[r+40>>1]=M.readyState,4===M.readyState&&0===M.status&&(M.status=0>1]=M.status,M.statusText&&stringToUTF8(M.statusText,r+44,64),200<=M.status&&M.status<300?B&&B(r,M,A):n&&n(r,M,A)},M.onerror=function(A){var e=M.status;4===M.readyState&&0===e&&(e=404),HEAPU32[r+12>>2]=0,Fetch.setu64(r+16,0),Fetch.setu64(r+24,0),Fetch.setu64(r+32,0),HEAPU16[r+40>>1]=M.readyState,HEAPU16[r+42>>1]=e,n&&n(r,M,A)},M.ontimeout=function(A){n&&n(r,M,A)},M.onprogress=function(A){var e=c&&w&&M.response?M.response.byteLength:0,t=0;c&&w&&(t=_malloc(e),HEAPU8.set(new Uint8Array(M.response),t)),HEAPU32[r+12>>2]=t,Fetch.setu64(r+16,e),Fetch.setu64(r+24,A.loaded-e),Fetch.setu64(r+32,A.total),HEAPU16[r+40>>1]=M.readyState,3<=M.readyState&&0===M.status&&0>1]=M.status,M.statusText&&stringToUTF8(M.statusText,r+44,64),g&&g(r,M,A)},M.onreadystatechange=function(A){HEAPU16[r+40>>1]=M.readyState,2<=M.readyState&&(HEAPU16[r+42>>1]=M.status),e&&e(r,M,A)};try{M.send(E)}catch(A){n&&n(r,M,A)}}else n(r,0,"no url specified!")}function __emscripten_fetch_cache_data(A,e,t,g,r){if(A){var B=UTF8ToString(HEAPU32[e+112+64>>2]||HEAPU32[e+8>>2]);try{var n=A.transaction(["FILES"],"readwrite").objectStore("FILES").put(t,B);n.onsuccess=function(A){HEAPU16[e+40>>1]=4,HEAPU16[e+42>>1]=200,stringToUTF8("OK",e+44,64),g(e,0,B)},n.onerror=function(A){HEAPU16[e+40>>1]=4,HEAPU16[e+42>>1]=413,stringToUTF8("Payload Too Large",e+44,64),r(e,0,A)}}catch(A){r(e,0,A)}}else r(e,0,"IndexedDB not available!")}function __emscripten_fetch_load_cached_data(A,g,r,B){if(A){var e=UTF8ToString(HEAPU32[g+112+64>>2]||HEAPU32[g+8>>2]);try{var t=A.transaction(["FILES"],"readonly").objectStore("FILES").get(e);t.onsuccess=function(A){var e,t;A.target.result?(e=(A=A.target.result).byteLength||A.length,t=_malloc(e),HEAPU8.set(new Uint8Array(A),t),HEAPU32[g+12>>2]=t,Fetch.setu64(g+16,e),Fetch.setu64(g+24,0),Fetch.setu64(g+32,e),HEAPU16[g+40>>1]=4,HEAPU16[g+42>>1]=200,stringToUTF8("OK",g+44,64),r(g,0,A)):(HEAPU16[g+40>>1]=4,HEAPU16[g+42>>1]=404,stringToUTF8("Not Found",g+44,64),B(g,0,"no data"))},t.onerror=function(A){HEAPU16[g+40>>1]=4,HEAPU16[g+42>>1]=404,stringToUTF8("Not Found",g+44,64),B(g,0,A)}}catch(A){B(g,0,A)}}else B(g,0,"IndexedDB not available!")}function __emscripten_fetch_delete_cached_data(A,e,t,g){if(A){var r=UTF8ToString(HEAPU32[e+112+64>>2]||HEAPU32[e+8>>2]);try{var B=A.transaction(["FILES"],"readwrite").objectStore("FILES").delete(r);B.onsuccess=function(A){A=A.target.result;HEAPU32[e+12>>2]=0,Fetch.setu64(e+16,0),Fetch.setu64(e+24,0),Fetch.setu64(e+32,0),HEAPU16[e+40>>1]=4,HEAPU16[e+42>>1]=200,stringToUTF8("OK",e+44,64),t(e,0,A)},B.onerror=function(A){HEAPU16[e+40>>1]=4,HEAPU16[e+42>>1]=404,stringToUTF8("Not Found",e+44,64),g(e,0,A)}}catch(A){g(e,0,A)}}else g(e,0,"IndexedDB not available!")}function _emscripten_start_fetch(A,g,r,B,n){void 0!==Module&&(Module.noExitRuntime=!0);function E(A,e,t){i?dynCall_vi(i,A):g&&g(A)}function C(A,e,t){s?dynCall_vi(s,A):B&&B(A)}function o(A,e,t){a?dynCall_vi(a,A):r&&r(A)}function I(A,e,t){l?dynCall_vi(l,A):n&&n(A)}function Q(A,e,t){__emscripten_fetch_cache_data(Fetch.dbInstance,A,e.response,function(A,e,t){i?dynCall_vi(i,A):g&&g(A)},function(A,e,t){i?dynCall_vi(i,A):g&&g(A)})}var e=A+112,t=UTF8ToString(e),i=HEAPU32[e+36>>2],a=HEAPU32[e+40>>2],s=HEAPU32[e+44>>2],l=HEAPU32[e+48>>2],c=HEAPU32[e+52>>2],w=!!(4&c),u=!!(32&c),c=!!(16&c);if((!c||"EM_IDB_STORE"===t||"EM_IDB_DELETE"===t)&&!Fetch.dbInstance)return o(A),0;if("EM_IDB_STORE"===t){var M=HEAPU32[e+84>>2];__emscripten_fetch_cache_data(Fetch.dbInstance,A,HEAPU8.slice(M,M+HEAPU32[e+88>>2]),E,o)}else if("EM_IDB_DELETE"===t)__emscripten_fetch_delete_cached_data(Fetch.dbInstance,A,E,o);else if(c){if(u)return 0;__emscripten_fetch_xhr(A,w?Q:E,o,C,I)}else __emscripten_fetch_load_cached_data(Fetch.dbInstance,A,E,u?o:w?function(A,e,t){__emscripten_fetch_xhr(A,Q,o,C,I)}:function(A,e,t){__emscripten_fetch_xhr(A,E,o,C,I)});return A}function _gettimeofday(A){var e=Date.now();return HEAP32[A>>2]=e/1e3|0,HEAP32[A+4>>2]=e%1e3*1e3|0,0}function _llvm_trap(){abort("trap!")}function _emscripten_memcpy_big(A,e,t){HEAPU8.set(HEAPU8.subarray(e,e+t),A)}function abortOnCannotGrowMemory(A){abort("OOM")}function emscripten_realloc_buffer(A){A=alignUp(A,65536);var e=buffer.byteLength;try{return-1!==wasmMemory.grow((A-e)/65536)?(buffer=wasmMemory.buffer,1):void 0}catch(A){}}function _emscripten_resize_heap(A){var e=_emscripten_get_heap_size(),t=2147418112;if(t>2,t=(3&B)<<6|(n=E.indexOf(A.charAt(o++))),C+=String.fromCharCode(g<<2|r>>4),64!==B&&(C+=String.fromCharCode(e)),64!==n&&(C+=String.fromCharCode(t)),o>2]=allocateUTF8OnStack(thisProgram);for(var g=1;g>2)+g]=allocateUTF8OnStack(A[g-1]);HEAP32[(t>>2)+e]=0;var r,B=Module.emtStackSave();try{var n=Module._main(e,t);Module.noExitRuntime||exit(n,!0)}catch(A){A instanceof ExitStatus||("SimulateInfiniteLoop"==A?(Module.noExitRuntime=!0,Module.emtStackRestore(B)):((r=A)&&"object"==typeof A&&A.stack&&(r=[A,A.stack]),err("exception thrown: "+r),quit_(1,A)))}finally{calledMain=!0}}function run(A){function e(){calledRun||(calledRun=!0,Module.calledRun=!0,ABORT)||(initRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),shouldRunNow&&callMain(A),postRun())}A=A||arguments_,0 { + if (typeof CNTVModuleFactory !== 'function') { + console.error('ERROR: CNTVModuleFactory is not a function:', CNTVModuleFactory); + // Try to handle if it's wrapped in default export + if (CNTVModuleFactory && typeof CNTVModuleFactory.default === 'function') { + CNTVH5PlayerModule = CNTVModuleFactory.default(); + } else if (CNTVModuleFactory && typeof CNTVModuleFactory.CNTVModule === 'function') { + CNTVH5PlayerModule = CNTVModuleFactory.CNTVModule(); + } else { + throw new Error('CNTVModuleFactory is not a function'); + } + } else { + CNTVH5PlayerModule = CNTVModuleFactory(); + } + + await new Promise((resolve) => { + if (CNTVH5PlayerModule.calledRun) resolve(); + else CNTVH5PlayerModule.onRuntimeInitialized = resolve; + }); + })(); + await wasmInitPromise; +} + +// ==================== 从网络地址获取二进制数据 ==================== +async function getBinaryFromUrl(url) { + try { + const response = await axios.get(url, { + responseType: 'arraybuffer', + timeout: 60000, + headers: {'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'} + }); + if (response.status !== 200) { + throw new Error(`Failed to fetch binary: ${response.status} ${response.statusText}`); + } + return new Uint8Array(response.data); + } catch (error) { + throw new Error(`Request failed: ${error.message}`); + } +} + +// ==================== NAL单元处理 ==================== +function findNALUnits(buffer) { + const nalUnits = []; + let i = 0; + while (i < buffer.length - 3) { + if (buffer[i] === 0x00 && buffer[i + 1] === 0x00) { + let nalStart = -1; + if (buffer[i + 2] === 0x01 && i + 3 < buffer.length) { + nalStart = i + 3; + } else if (buffer[i + 2] === 0x00 && buffer[i + 3] === 0x01 && i + 4 < buffer.length) { + nalStart = i + 4; + } + if (nalStart >= 0) { + let nextStart = buffer.length; + for (let j = nalStart; j < buffer.length - 2; j++) { + if (buffer[j] === 0x00 && buffer[j + 1] === 0x00) { + if (buffer[j + 2] === 0x01 || (buffer[j + 2] === 0x00 && j + 3 < buffer.length && buffer[j + 3] === 0x01)) { + nextStart = j; + break; + } + } + } + const nalData = buffer.subarray(i, nextStart); + if (nalData.length >= 2) { + const header = nalData[nalStart - i]; + const data = nalData.subarray(nalStart - i + 1); + const nal = {header, data, nalUnitType: header & 0x1F}; + nalUnits.push(nal); + } + i = nextStart; + continue; + } + } + i++; + } + return nalUnits; +} + +// ==================== H.264解密核心 ==================== +// 解密H.264数据,保持原始数据结构不变,直接在原buffer上修改 +async function decryptH264InPlace(h264Data) { + let curDate = Date.now().toString(); + const MemoryExtend = 2048; + let vmpTag = ''; + + function _common(o) { + const memory = CNTVH5PlayerModule._jsmalloc(curDate.length + MemoryExtend); + CNTVH5PlayerModule.HEAP8.fill(0, memory, memory + curDate.length + MemoryExtend); + CNTVH5PlayerModule.HEAP8.set(Array.from(curDate, e => e.charCodeAt(0)), memory); + let ret; + switch (o) { + case "InitPlayer": + ret = CNTVH5PlayerModule._CNTV_InitPlayer(memory); + break; + case "UnInitPlayer": + ret = CNTVH5PlayerModule._CNTV_UnInitPlayer(memory); + break; + case "UpdatePlayer": + vmpTag = CNTVH5PlayerModule._CNTV_UpdatePlayer(memory).toString(16); + vmpTag = ['0'.repeat(8 - vmpTag.length), vmpTag].join(''); + ret = 0; + break; + } + CNTVH5PlayerModule._jsfree(memory); + return ret; + } + + function InitPlayer() { + return _common("InitPlayer"); + } + + function UnInitPlayer() { + return _common("UnInitPlayer"); + } + + function UpdatePlayer() { + return _common("UpdatePlayer"); + } + + function decrypt(buf) { + const pageHost = "https://tv.cctv.com"; + const addr = CNTVH5PlayerModule._jsmalloc(buf.length + MemoryExtend); + const StaticCallModuleVod = { + H264NalSet: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD7(t, i, n, r); + }, + H265NalData: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD6(t, i, n, r); + }, + AVS1AudioKey: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD5(t, i, n, r); + }, + HEVC2AAC: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD4(t, i, n, r); + }, + HASHMap: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD3(t, i, n, r); + }, + BASE64Dec: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD2(t, i, n, r); + }, + MediaSession: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD1(t, i, n, r); + }, + Mp4fragment: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD0(t, i, n, r); + }, + MpegAudio: function (e, t, i, n, r) { + return e._CNTV_jsdecVOD8(t, i, n, r); + }, + AACDemuxer: function (e, t, i, n, r) { + return e._jsdecVOD(i, n, r); + } + }; + + function StaticCallModuleVodAPI(e, t, i, n, r, a) { + return StaticCallModuleVod[a](e, t, i, n, r); + } + + CNTVH5PlayerModule.HEAP8.set(buf, addr); + CNTVH5PlayerModule.HEAP8.set(Array.from(pageHost, e => e.charCodeAt(0)), addr + buf.length); + const addr2 = CNTVH5PlayerModule._jsmalloc(curDate.length); + CNTVH5PlayerModule.HEAP8.set(Array.from(curDate, e => e.charCodeAt(0)), addr2); + + for (const i in vmpTag) + if ("0123456".includes(vmpTag[i])) + StaticCallModuleVodAPI(CNTVH5PlayerModule, addr2, addr, buf.length, pageHost.length, Object.keys(StaticCallModuleVod)[i]); + + const decRet = StaticCallModuleVodAPI(CNTVH5PlayerModule, addr2, addr, buf.length, pageHost.length, Object.keys(StaticCallModuleVod)[8]); + const retBuffer = Buffer.from(CNTVH5PlayerModule.HEAP8.subarray(addr, addr + decRet)); + + CNTVH5PlayerModule._jsfree(addr); + CNTVH5PlayerModule._jsfree(addr2); + return retBuffer; + } + + // 找到所有NAL单元及其在原始buffer中的位置 + const nalUnits = []; + let i = 0; + while (i < h264Data.length - 3) { + if (h264Data[i] === 0x00 && h264Data[i + 1] === 0x00) { + let startCodeLen = 0; + let nalStart = -1; + + // 查找起始码 + if (h264Data[i + 2] === 0x01 && i + 3 < h264Data.length) { + startCodeLen = 3; + nalStart = i + 3; + } else if (h264Data[i + 2] === 0x00 && h264Data[i + 3] === 0x01 && i + 4 < h264Data.length) { + startCodeLen = 4; + nalStart = i + 4; + } + + if (nalStart >= 0) { + // 找到下一个起始码位置 + let nextStart = h264Data.length; + for (let j = nalStart; j < h264Data.length - 2; j++) { + if (h264Data[j] === 0x00 && h264Data[j + 1] === 0x00) { + if (h264Data[j + 2] === 0x01 || (h264Data[j + 2] === 0x00 && j + 3 < h264Data.length && h264Data[j + 3] === 0x01)) { + nextStart = j; + break; + } + } + } + + const header = h264Data[nalStart]; + const dataStart = nalStart + 1; + const dataEnd = nextStart; + const nalUnitType = header & 0x1F; + + nalUnits.push({ + startCodePos: i, + startCodeLen: startCodeLen, + headerPos: nalStart, + dataPos: dataStart, + dataEnd: dataEnd, + header: header, + data: h264Data.subarray(dataStart, dataEnd), + nalUnitType: nalUnitType + }); + + i = nextStart; + continue; + } + } + i++; + } + + // 解密并替换原始buffer中的数据 + let shouldDecrypt = false; + curDate = Date.now().toString(); + InitPlayer(); + + // 创建可写的buffer副本 + const resultBuffer = Buffer.from(h264Data); + + for (const nal of nalUnits) { + UpdatePlayer(); + + const bufToDecrypt = Buffer.concat([Buffer.from([nal.header]), nal.data]); + if (nal.nalUnitType === 25) { + shouldDecrypt = nal.data[0] === 1; + if (shouldDecrypt) { + decrypt(bufToDecrypt); + } + } else if ((nal.nalUnitType === 1 || nal.nalUnitType === 5) && shouldDecrypt) { + const decrypted = decrypt(bufToDecrypt); + // 直接替换原始数据,保持起始码不变 + const decryptedData = decrypted.subarray(1); // 跳过header,因为decrypted包含了header + const writePos = nal.dataPos; + + // 如果解密后数据小于等于原始空间,直接替换 + if (decryptedData.length <= nal.dataEnd - nal.dataPos) { + decryptedData.copy(resultBuffer, writePos); + // 如果解密后数据更小,填充0 + if (decryptedData.length < nal.dataEnd - nal.dataPos) { + resultBuffer.fill(0, writePos + decryptedData.length, nal.dataEnd); + } + } else { + // 解密后数据更大,截断到原始大小 + decryptedData.copy(resultBuffer, writePos, 0, nal.dataEnd - nal.dataPos); + } + } + } + UnInitPlayer(); + + return resultBuffer; +} + +// ==================== TS解密处理函数 ==================== +async function Parse_TS(buffer) { + // 确保WASM模块已初始化 + await initWasmModule(); + + const originalTS = Buffer.from(buffer); + + // 提取所有视频PID的payload,按PES包分组 + const videoPESPackets = []; + let currentPESPayload = []; + let currentPESHeader = null; + let inPES = false; + + for (let i = 0; i < originalTS.length; i += TS_PACKET_SIZE) { + if (i + TS_PACKET_SIZE > originalTS.length) break; + const packet = originalTS.subarray(i, i + TS_PACKET_SIZE); + if (packet[0] !== 0x47) continue; + + const pid = ((packet[1] & 0x1F) << 8) | packet[2]; + if (pid !== VIDEO_PID) continue; + + const payloadStart = (packet[1] & 0x40) !== 0; + const adaptation = (packet[3] & 0x20) !== 0; + const payload = (packet[3] & 0x10) !== 0; + + let offset = 4; + if (adaptation && offset < 188) { + const adaptationLen = packet[offset]; + offset += adaptationLen + 1; + } + + if (payload && offset < 188) { + const data = packet.subarray(offset); + + if (payloadStart) { + // 保存上一个PES包 + if (inPES && currentPESPayload.length > 0 && currentPESHeader) { + const h264Data = Buffer.concat(currentPESPayload); + videoPESPackets.push({ + header: currentPESHeader, + data: h264Data + }); + } + + // 开始新的PES包 - 保存完整PES头 + // 找到PES头结束位置:检查PES_header_data_length + // PES结构: [00 00 01] [stream_id] [len] [flags] [flags] [header_len] ... + let pesHeaderEnd = 9; // 最小PES头长度 + if (data.length >= 9) { + // 第8字节是PES_header_data_length (从0开始计数) + pesHeaderEnd = 9 + data[8]; + } + pesHeaderEnd = Math.min(pesHeaderEnd, data.length); + + currentPESHeader = data.subarray(0, pesHeaderEnd); + currentPESPayload = [data.subarray(pesHeaderEnd)]; + inPES = true; + } else if (inPES) { + currentPESPayload.push(data); + } + } + } + + // 保存最后一个PES包 + if (inPES && currentPESPayload.length > 0 && currentPESHeader) { + const h264Data = Buffer.concat(currentPESPayload); + videoPESPackets.push({ + header: currentPESHeader, + data: h264Data + }); + } + + // 合并所有H.264数据进行解密 + let totalH264 = Buffer.alloc(0); + for (const pes of videoPESPackets) { + totalH264 = Buffer.concat([totalH264, pes.data]); + } + + // 解密所有H.264数据 + const decryptedH264 = await decryptH264InPlace(totalH264); + + // 将解密后的数据按原始PES包大小分配回去 + let h264Offset = 0; + const resultTS = Buffer.alloc(originalTS.length); + + for (let i = 0; i < originalTS.length; i += TS_PACKET_SIZE) { + if (i + TS_PACKET_SIZE > originalTS.length) break; + const origPacket = originalTS.subarray(i, i + TS_PACKET_SIZE); + + // 复制非视频包 + if (origPacket[0] !== 0x47) { + origPacket.copy(resultTS, i); + continue; + } + + const pid = ((origPacket[1] & 0x1F) << 8) | origPacket[2]; + if (pid !== VIDEO_PID) { + origPacket.copy(resultTS, i); + continue; + } + + const payloadStart = (origPacket[1] & 0x40) !== 0; + const adaptation = (origPacket[3] & 0x20) !== 0; + const payload = (origPacket[3] & 0x10) !== 0; + + let offset = 4; + if (adaptation && offset < 188) { + const adaptationLen = origPacket[offset]; + offset += adaptationLen + 1; + } + + // 创建新包 + const newPacket = Buffer.alloc(TS_PACKET_SIZE); + origPacket.copy(newPacket, 0, 0, offset); + + if (payload && offset < 188) { + const data = origPacket.subarray(offset); + + if (payloadStart) { + // PES包开始 - 复制PES头 + let pesHeaderEnd = 9; + if (data.length >= 9) { + pesHeaderEnd = 9 + data[8]; + } + pesHeaderEnd = Math.min(pesHeaderEnd, data.length); + + origPacket.copy(newPacket, offset, offset, offset + pesHeaderEnd); + offset += pesHeaderEnd; + + // 填充解密后的H.264数据 + const remaining = TS_PACKET_SIZE - offset; + const toCopy = Math.min(remaining, decryptedH264.length - h264Offset); + if (toCopy > 0) { + decryptedH264.copy(newPacket, offset, h264Offset, h264Offset + toCopy); + h264Offset += toCopy; + offset += toCopy; + } + newPacket.fill(0xFF, offset); + } else { + // 继续填充数据 + const remaining = TS_PACKET_SIZE - offset; + const toCopy = Math.min(remaining, decryptedH264.length - h264Offset); + if (toCopy > 0) { + decryptedH264.copy(newPacket, offset, h264Offset, h264Offset + toCopy); + h264Offset += toCopy; + offset += toCopy; + } + newPacket.fill(0xFF, offset); + } + } + + newPacket.copy(resultTS, i); + } + + return resultTS; +} + +// ==================== 主处理函数 ==================== +async function processFile(url, extension) { + // 下载原始TS文件 + let buffer = await getBinaryFromUrl(url); + + // 如果是.ts文件,调用Parse_TS进行解密 + if (extension === '.ts') { + buffer = await Parse_TS(buffer); + } + + return buffer; +} + +module.exports = { + processFile, +} diff --git a/spider/js/push_agent.js b/spider/js/push_agent.js index 2248db32..5e8ae9a8 100644 --- a/spider/js/push_agent.js +++ b/spider/js/push_agent.js @@ -78,7 +78,7 @@ var rule = { let list = input.split('@'); // log(list); for (let i = 0; i < list.length; i++) { - if (/pan.quark.cn|drive.uc.cn|www.alipan.com|www.aliyundrive.com|cloud.189.cn|yun.139.com|caiyun.139.com|www.123684.com|www.123865.com|www.123912.com|www.123pan.com|www.123pan.cn|www.123592.com|pan.baidu.com/.test(list[i])) { + if (/pan.quark.cn|drive.uc.cn|www.alipan.com|www.aliyundrive.com|cloud.189.cn|yun.139.com|caiyun.139.com|www.123684.com|www.123865.com|www.123912.com|www.123pan.com|www.123pan.cn|www.123592.com|pan.baidu.com|pan.xunlei.com/.test(list[i])) { if (/pan.quark.cn/.test(list[i])) { playPans.push(list[i]); const shareData = Quark.getShareData(list[i]); @@ -189,12 +189,21 @@ var rule = { }) vod.vod_content = vod_content_add.join('\n'); } + if (/pan.xunlei.com/.test(input)) { + const data = await Xun.getShareData(input) + Object.keys(data).forEach(it => { + playform.push('Xun-' + it) + const urls = data[it].map(item => item.name + "$" + [item.fileId, item.share_id, item.parent_id, item.pass_code_token].join('*')).join('#'); + playurls.push(urls); + }) + } + } else { playform.push('推送'); playurls.push("推送" + '$' + list[i]) } } - } else if (/pan.quark.cn|drive.uc.cn|www.alipan.com|www.aliyundrive.com|cloud.189.cn|yun.139.com|caiyun.139.com|www.123684.com|www.123865.com|www.123912.com|www.123pan.com|www.123pan.cn|www.123592.com|pan.baidu.com/.test(input)) { + } else if (/pan.quark.cn|drive.uc.cn|www.alipan.com|www.aliyundrive.com|cloud.189.cn|yun.139.com|caiyun.139.com|www.123684.com|www.123865.com|www.123912.com|www.123pan.com|www.123pan.cn|www.123592.com|pan.baidu.com|pan.xunlei.com/.test(input)) { if (/pan.quark.cn/.test(input)) { playPans.push(input); const shareData = Quark.getShareData(input); @@ -305,6 +314,15 @@ var rule = { }) vod.vod_content = vod_content_add.join('\n'); } + if (/pan.xunlei.com/.test(input)) { + const data = await Xun.getShareData(input) + Object.keys(data).forEach(it => { + playform.push('Xun-' + it) + const urls = data[it].map(item => item.name + "$" + [item.fileId, item.share_id, item.parent_id, item.pass_code_token].join('*')).join('#'); + playurls.push(urls); + }) + } + } else { playform.push('推送'); playurls.push("推送" + '$' + input) @@ -333,28 +351,36 @@ var rule = { // 确保返回parse: 0和正确的URL格式,避免前端创建新的播放列表 return {parse: 0, url: ["原画", input]} } - } else if (/Quark-|UC-|Ali-|Cloud-|Yun-|Pan123-|Baidu-/.test(flag)) { + } else if (/Quark-|UC-|Ali-|Cloud-|Yun-|Pan123-|Baidu-|Xun-/.test(flag)) { const ids = id.split('*'); let UCDownloadingCache = {}; let downUrl = '' if (flag.startsWith('Quark-')) { log("夸克网盘解析开始") - const down = await Quark.getDownload(ids[0], ids[1], ids[2], ids[3], true); const headers = { // 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 QuarkPC/4.5.5.535 quark-cloud-drive/2.5.40 Channel/pckk_other_ch', // 'origin': 'https://pan.quark.cn', // 'referer': 'https://pan.quark.cn/', 'Cookie': ENV.get('quark_cookie') }; + //无限不转存 + const link = await Quark.getUrl(ids[0], ids[1], ids[2], ids[3]); + link.forEach(item => { + if (item !== undefined) { + urls.push("无限" + item.name, item.url + "#isVideo=true##fastPlayMode##threads=20#") + urls.push("无限猫" + item.name, `http://127.0.0.1:5575/proxy?thread=${ENV.get('thread') || 6}&chunkSize=256&url=` + encodeURIComponent(item.url) + '&header=' + encodeURIComponent(JSON.stringify(headers))); + } + }); + const down = await Quark.getDownload(ids[0], ids[1], ids[2], ids[3], true); down.forEach((t) => { - if(t.url!==undefined){ - urls.push("猫"+t.name, `http://127.0.0.1:5575/proxy?thread=${ENV.get('thread') || 6}&chunkSize=256&url=` + encodeURIComponent(t.url)); - urls.push(t.name, t.url+ "#isVideo=true##fastPlayMode##threads=20#") + if (t.url !== undefined) { + urls.push("猫" + t.name, `http://127.0.0.1:5575/proxy?thread=${ENV.get('thread') || 6}&chunkSize=256&url=` + encodeURIComponent(t.url)); + urls.push(t.name, t.url + "#isVideo=true##fastPlayMode##threads=20#") } }); const transcoding = (await Quark.getLiveTranscoding(ids[0], ids[1], ids[2], ids[3])).filter((t) => t.accessable); transcoding.forEach((t) => { - urls.push(t.resolution === 'low' ? "流畅" : t.resolution === 'high' ? "高清" : t.resolution === 'super' ? "超清" : t.resolution, t.video_info.url+ "#isVideo=true##fastPlayMode##threads=20#") + urls.push(t.resolution === 'low' ? "流畅" : t.resolution === 'high' ? "高清" : t.resolution === 'super' ? "超清" : t.resolution, t.video_info.url + "#isVideo=true##fastPlayMode##threads=20#") }); // urls.push("原画", down.download_url + '#fastPlayMode##threads=10#'); // urls.push("原代服", mediaProxyUrl + `?thread=${ENV.get('thread') || 6}&form=urlcode&randUa=1&url=` + encodeURIComponent(down.download_url) + '&header=' + encodeURIComponent(JSON.stringify(headers))); @@ -455,6 +481,24 @@ var rule = { } } } + if (flag.startsWith('Xun-')) { + log('迅雷云盘开始解析') + //转码和下载的第二个值不同 + let urls = await Xun.getShareUrl(ids[0], ids[1], ids[3]) + // let url = await Xun.getDownloadUrl(ids[0],ids[2],ids[3]) + // if(url!==''){ + // urls.push('原画',url+ "#isVideo=true##fastPlayMode##threads=20#") + // urls.push("猫画", `http://127.0.0.1:5575/proxy?thread=${ENV.get('thread') || 6}&chunkSize=256&url=` + encodeURIComponent(url)); + // } + return { + parse: 0, + url: urls, + header: { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36" + } + } + } + } else { return input } diff --git "a/spider/js/\345\225\212\345\223\210DJ[\345\220\254].js" "b/spider/js/\345\225\212\345\223\210DJ[\345\220\254].js" index f3f4aabb..92437831 100644 --- "a/spider/js/\345\225\212\345\223\210DJ[\345\220\254].js" +++ "b/spider/js/\345\225\212\345\223\210DJ[\345\220\254].js" @@ -26,6 +26,7 @@ var rule = { headers: { 'User-Agent': 'MOBILE_UA', }, + timeout: 10000, play_parse: true, lazy: async function () { let {input, pdfh} = this; diff --git "a/spider/js/\345\244\256\350\247\206\345\244\247\345\205\250[\345\256\230].js" "b/spider/js/\345\244\256\350\247\206\345\244\247\345\205\250[\345\256\230].js" index 73866aca..1c11ebbb 100644 --- "a/spider/js/\345\244\256\350\247\206\345\244\247\345\205\250[\345\256\230].js" +++ "b/spider/js/\345\244\256\350\247\206\345\244\247\345\205\250[\345\256\230].js" @@ -8,7 +8,10 @@ }) */ -const {processFile, indexHtml} = $.require('./_lib.cntv.js'); +// const {processFile, indexHtml} = $.require('./_lib.cntv.js'); +const {parseCCTVUrl, detectInputType, getVideoInfoByPid} = require('./_lib.cntv-urlparse.cjs'); +const {processFile} = require('./_lib.cntv2026.cjs'); +const {indexHtml} = $.require('./_lib.cntv.js'); const {setH5Str} = $.require('./_lib.cntv.live.js'); var rule = { title: '央视大全', @@ -251,9 +254,10 @@ var rule = { let url = ''; let is_live = 0; if (proxyPath) { - const BASE_URL = 'https://dh5.cntv.qcloudcdn.com/'.rstrip('/'); + // const BASE_URL = 'https://dh5.cntv.qcloudcdn.com/'.rstrip('/'); // const BASE_URL = 'https://dh5.cntv.myalicdn.com/'.rstrip('/'); - url = `${BASE_URL}/${proxyPath}`; + // url = `${BASE_URL}/${proxyPath}`; + url = proxyPath; } else { url = base64Decode(input.split('#')[0]); is_live = 1; @@ -284,6 +288,7 @@ var rule = { return [200, 'application/vnd.apple.mpegurl', m3u8Str] } const contentType = extension === '.ts' ? 'video/MP2T' : 'application/vnd.apple.mpegurl'; + // log('url:', url); const buffer = await processFile(url, extension); const headers = { 'Content-Disposition': `attachment; filename="${filename}"`, @@ -472,6 +477,13 @@ function getRegexText(text, regexText, index) { } async function getM3u8(pid, getProxyUrl) { + const info = await getVideoInfoByPid(pid); + const proxy_path = info.download_url; + log('[getM3u8] proxy_path:', proxy_path); + return getProxyUrl().split('?')[0].rstrip('/') + '/' + proxy_path; +} + +async function getM3u8Old(pid, getProxyUrl) { const url = `https://vdn.apps.cntv.cn/api/getHttpVideoInfo.do?pid=${pid}`; const htmlTxt = await request(url); const jo = JSON.parse(htmlTxt); diff --git "a/spider/js/\347\213\227\347\213\227\351\237\263\344\271\220[\345\220\254].js" "b/spider/js/\347\213\227\347\213\227\351\237\263\344\271\220[\345\220\254].js" new file mode 100644 index 00000000..760ced64 --- /dev/null +++ "b/spider/js/\347\213\227\347\213\227\351\237\263\344\271\220[\345\220\254].js" @@ -0,0 +1,168 @@ +/* +@header({ + searchable: 1, + filterable: 0, + quickSearch: 1, + title: '狗狗音乐[听]', + '类型': '影视', + lang: 'ds' +}) +*/ + +var rule = { + title: '狗狗音乐[听]', + host: 'https://m.kugou.com', + url: '', + searchable: 1, + quickSearch: 1, + filterable: 0, + headers: { + 'User-Agent': 'Mozilla/5.0 (Linux; Android 11)', + 'Referer': 'https://m.kugou.com/' + }, + class_name: '热门榜&特色榜&全球榜', + class_url: 'hot&feature&global', + + play_parse: true, + + lazy: async function () { + let playUrl = this.input; + let realUrl = '', lyric = ''; + + const getLrc = async (hash) => { + try { + let lData = JSON.parse(await request(`https://lyrics.kugou.com/search?ver=1&man=yes&client=pc&hash=${hash}`)); + let cand = lData?.candidates?.[0]; + if (cand) { + let dData = JSON.parse(await request(`https://lyrics.kugou.com/download?ver=1&client=pc&id=${cand.id}&accesskey=${cand.accesskey}`)); + return base64Decode(dData.content || ''); + } + } catch (e) { + log('getLrc error:', e); + } + return ''; + }; + + const lrcToAss = (lrc) => { + let ass = "[Script Info]\nScriptType: v4.00+\nPlayResX: 1280\nPlayResY: 720\n\n[V4+ Styles]\nStyle: Default,Arial,36,&H00FFFFFF,&H00000000,&H64000000,&H64000000,0,0,0,0,100,100,0,0,1,2,2,2,10,10,10,1\n\n[Events]\nFormat: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text\n"; + let times = []; + lrc.split('\n').forEach(line => { + let m = line.match(/\[(\d+):(\d+\.\d+)\](.*)/); + if (m) times.push({start: `0:${m[1]}:${m[2]}`.replace('.', ','), text: m[3].trim()}); + }); + times.forEach((cur, i) => { + let end = times[i + 1] ? times[i + 1].start : '0:99:00,00'; + ass += `Dialogue: 0,${cur.start},${end},Default,,0,0,0,,${cur.text}\n`; + }); + return ass; + }; + + try { + if (playUrl.includes('/mvweb/html/mv_')) { + let mvid = playUrl.match(/mv_(\w+)/)?.[1]; + if (mvid) { + let mv = JSON.parse(await request(`https://m.kugou.com/app/i/mv.php?cmd=100&hash=${mvid}&ismp3=1&ext=mp4`))?.mvdata || {}; + realUrl = mv.rq?.downurl || mv.sq?.downurl || mv.le?.downurl || ''; + if (realUrl) { + let rawLrc = await getLrc(mvid); + if (rawLrc) lyric = lrcToAss(rawLrc); + } + } + } else if (playUrl.includes('hash=')) { + let hash = playUrl.match(/hash=([^&]+)/)?.[1]; + if (hash) { + let res = JSON.parse(await request(`https://m.kugou.com/app/i/getSongInfo.php?cmd=playInfo&hash=${hash}`)); + realUrl = res.url || res.backup_url?.[0] || ''; + if (realUrl) lyric = await getLrc(hash); + } + } + } catch (e) { + console.log(e); + } + + return realUrl ? {parse: 0, url: realUrl, header: rule.headers, subtitle: lyric} : playUrl; + }, + + 推荐: async function () { + let VODS = []; + try { + let list = JSON.parse(await request('https://mobilecdnbj.kugou.com/api/v3/rank/list?version=9108&plat=0&showtype=2'))?.data?.info || []; + VODS = list.filter(i => i.classify === 1 || /TOP|新歌|热歌|飙升/.test(i.rankname)).slice(0, 12).map(i => ({ + vod_id: `https://mobilecdnbj.kugou.com/api/v3/rank/song?rankid=${i.rankid}&page=1&pagesize=200`, + vod_name: i.rankname, + vod_pic: i.imgurl.replace('{size}', '400'), + vod_remarks: i.update_frequency || '' + })); + } catch (e) { + } + return VODS + }, + + 一级: async function () { + let {MY_CATE} = this; + let VODS = []; + try { + let list = JSON.parse(await request('https://mobilecdnbj.kugou.com/api/v3/rank/list?version=9108&plat=0&showtype=2'))?.data?.info || []; + if (MY_CATE === 'hot') list = list.filter(i => i.classify === 1); + else if (MY_CATE === 'feature') list = list.filter(i => i.classify === 5); + else if (MY_CATE === 'global') list = list.filter(i => /欧美|日本|韩国|Billboard/.test(i.rankname)); + VODS = list.map(i => ({ + vod_id: `https://mobilecdnbj.kugou.com/api/v3/rank/song?rankid=${i.rankid}&page=1&pagesize=200`, + vod_name: i.rankname, + vod_pic: i.imgurl.replace('{size}', '400'), + vod_remarks: i.update_frequency || '' + })); + } catch (e) { + } + return VODS; + }, + + 二级: async function () { + let {input} = this; + let VOD = {}; + try { + let songs = JSON.parse(await request(input))?.data?.info || []; + let music = [], mv = []; + songs.forEach((s, i) => { + music.push(`${i + 1}. 🎵 ${s.filename}$https://www.kugou.com/song/?hash=${s.hash}`); + if (s.mvhash) mv.push(`${i + 1}. 🎬 ${s.filename}$https://www.kugou.com/mvweb/html/mv_${s.mvhash}.html`); + }); + + let playFrom = ['音乐']; + let playUrl = [music.join('#')]; + + if (mv.length > 0) { + playFrom.push('MV'); + playUrl.push(mv.join('#')); + } + + VOD = { + vod_name: '酷狗音乐榜单', + vod_pic: songs[0]?.imgurl?.replace('{size}', '400') || '', + vod_remarks: `共 ${songs.length} 首`, + vod_play_from: playFrom.join('$$$'), + vod_play_url: playUrl.join('$$$') + }; + } catch (e) { + VOD = {vod_name: '解析失败'}; + } + return VOD; + }, + + 搜索: async function () { + let {KEY, MY_PAGE} = this; + let VODS = []; + try { + let list = JSON.parse(await request(`https://mobilecdnbj.kugou.com/api/v3/search/song?format=json&keyword=${encodeURIComponent(KEY)}&page=${MY_PAGE || 1}&pagesize=20`))?.data?.info || []; + VODS = list.map(s => ({ + vod_id: `https://www.kugou.com/song/?hash=${s.hash}`, + vod_name: `🎵 ${s.songname}`, + vod_pic: s.album_img ? s.album_img.replace('{size}', '400') : '', + vod_remarks: s.singername + })); + } catch (e) { + } + return VODS; + } + +}; \ No newline at end of file diff --git "a/spider/js/\347\225\252\350\214\204\346\274\253\347\224\273[\347\224\273].js" "b/spider/js/\347\225\252\350\214\204\346\274\253\347\224\273[\347\224\273].js" index 98e71dda..605fa258 100644 --- "a/spider/js/\347\225\252\350\214\204\346\274\253\347\224\273[\347\224\273].js" +++ "b/spider/js/\347\225\252\350\214\204\346\274\253\347\224\273[\347\224\273].js" @@ -14,8 +14,8 @@ var rule = { 类型: '漫画', title: '番茄漫画', - // host: 'https://qkfqapi.vv9v.cn', - host: 'http://47.108.80.161:5005', + host: 'https://qkfqapi.vv9v.cn', + // host: 'http://47.108.80.161:5005', homeUrl: '/api/discover/style?tab=漫画', url: 'fyclass', searchUrl: '/api/search?key=**&tab_type=8&offset=((fypage-1)*10)', diff --git "a/spider/js/\350\256\276\347\275\256\344\270\255\345\277\203.js" "b/spider/js/\350\256\276\347\275\256\344\270\255\345\277\203.js" index 17af5d19..d082198e 100644 --- "a/spider/js/\350\256\276\347\275\256\344\270\255\345\277\203.js" +++ "b/spider/js/\350\256\276\347\275\256\344\270\255\345\277\203.js" @@ -65,6 +65,7 @@ let quick_data = { 阿里: 'https://www.alipan.com/s/vgXMcowK8pQ', 天翼: 'https://cloud.189.cn/web/share?code=INJbU3NbqyUj', 百度: 'https://pan.baidu.com/s/1L0UIv4p0X0QrbbKErJuc_w?pwd=2pwj', + 迅雷: 'https://pan.xunlei.com/s/VOkBwLBNoXN8eO9WrcVbXdTcA1?pwd=8tvj#', 移动1: 'https://yun.139.com/shareweb/#/w/i/0i5CLQ7BpV7Ai', 移动2: 'https://caiyun.139.com/m/i?2jexC1gcjeN7q', 移动3: 'https://yun.139.com/shareweb/#/w/i/2i2MoE9ZHn9p1', diff --git a/spider/py/base/htmlParser.py b/spider/py/base/htmlParser.py index 6ca2a572..83bae7e6 100644 --- a/spider/py/base/htmlParser.py +++ b/spider/py/base/htmlParser.py @@ -7,7 +7,7 @@ # upDate : 2024/04/09 取html返回的文本自动解除转义,防止script里取Html的内容被转义无法执行 # upDate : 2024/05/16 支持:not,even,odd,has,contans,matches,empty 新特性,pdfh取属性支持|| -import ujson +import json from pyquery import PyQuery as pq from urllib.parse import urljoin import re @@ -259,7 +259,7 @@ def pjfh(self, html, parse: str, add_url=False): if isinstance(html, str): # print(html) try: - html = ujson.loads(html) + html = json.loads(html) # html = eval(html) except: print('字符串转json失败') @@ -288,7 +288,7 @@ def pjfa(self, html, parse: str): return [] if isinstance(html, str): try: - html = ujson.loads(html) + html = json.loads(html) except: return [] if not parse.startswith('$.'): diff --git a/spider/py/base/requirements.txt b/spider/py/base/requirements.txt index c41edffc..c294d5fb 100644 --- a/spider/py/base/requirements.txt +++ b/spider/py/base/requirements.txt @@ -2,7 +2,6 @@ requests lxml pycryptodome -ujson pyquery jsonpath json5 diff --git a/spider/py/base/spider.py b/spider/py/base/spider.py index d686211d..8115457f 100644 --- a/spider/py/base/spider.py +++ b/spider/py/base/spider.py @@ -53,7 +53,8 @@ def __init__(self, query_params=None, t4_api=None): self.extend = '' self.ENV = _ENV self._cache = {} - self.log(f'BaseSpider __init__ t4_api:{t4_api}') + # self.log(f'BaseSpider __init__ t4_api:{t4_api}') + print(f'BaseSpider __init__ t4_api:{t4_api}') def __new__(cls, *args, **kwargs): if cls._instance: diff --git a/spider/py/core/t4_daemon.py b/spider/py/core/t4_daemon.py index b510933a..5bc8ab50 100644 --- a/spider/py/core/t4_daemon.py +++ b/spider/py/core/t4_daemon.py @@ -11,7 +11,7 @@ import hashlib import importlib import importlib.util -import ujson +import json import logging import os import pickle @@ -131,7 +131,7 @@ def recv_packet(rfile) -> dict: raise ValueError("invalid length") payload = recv_exact(rfile, length) try: - return ujson.loads(payload.decode("utf-8")) + return json.loads(payload.decode("utf-8")) except Exception: return pickle.loads(payload) @@ -257,8 +257,8 @@ def _parse_env(env_str): # 标准化为 dict if isinstance(env_str, str): try: - data = ujson.loads(env_str) - except (ujson.JSONDecodeError, TypeError): + data = json.loads(env_str) + except (json.JSONDecodeError, TypeError): return "", "" elif isinstance(env_str, dict): data = env_str @@ -270,7 +270,7 @@ def _parse_env(env_str): # 如果 ext 是 dict 或 list,转为 JSON 字符串 if isinstance(ext, (dict, list)): - ext = ujson.dumps(ext, ensure_ascii=False) + ext = json.dumps(ext, ensure_ascii=False) if proxy_url and not '&extend=' in proxy_url: proxy_url += f'&extend={quote(ext)}' @@ -678,7 +678,7 @@ def _invoke(self, inst: SpiderInstance, method_name: str, args_list): parsed_args.append(a) elif isinstance(a, str): try: - parsed_args.append(ujson.loads(a)) + parsed_args.append(json.loads(a)) except Exception: parsed_args.append(a) else: diff --git a/spider/py/core/t4_daemon_lite.py b/spider/py/core/t4_daemon_lite.py index 0bc713d0..b20055f4 100644 --- a/spider/py/core/t4_daemon_lite.py +++ b/spider/py/core/t4_daemon_lite.py @@ -4,7 +4,7 @@ import hashlib import importlib import importlib.util -import ujson +import json import logging import os import pickle @@ -119,7 +119,7 @@ def recv_packet(rfile) -> dict: raise ValueError("invalid length") payload = recv_exact(rfile, length) try: - return ujson.loads(payload.decode("utf-8")) + return json.loads(payload.decode("utf-8")) except Exception: return pickle.loads(payload) @@ -205,8 +205,8 @@ def _parse_env(env_str): # 标准化为 dict if isinstance(env_str, str): try: - data = ujson.loads(env_str) - except (ujson.JSONDecodeError, TypeError): + data = json.loads(env_str) + except (json.JSONDecodeError, TypeError): return "", "" elif isinstance(env_str, dict): data = env_str @@ -218,7 +218,7 @@ def _parse_env(env_str): # 如果 ext 是 dict 或 list,转为 JSON 字符串 if isinstance(ext, (dict, list)): - ext = ujson.dumps(ext, ensure_ascii=False) + ext = json.dumps(ext, ensure_ascii=False) return proxy_url, str(ext or "") @@ -422,7 +422,7 @@ def _invoke(self, inst: SpiderInstance, method_name: str, args_list): parsed_args.append(a) elif isinstance(a, str): try: - parsed_args.append(ujson.loads(a)) + parsed_args.append(json.loads(a)) except Exception: parsed_args.append(a) else: diff --git a/spider/py/data/bili_config.json b/spider/py/data/bili_config.json index 297e65af..a3ecd149 100644 --- a/spider/py/data/bili_config.json +++ b/spider/py/data/bili_config.json @@ -2,9 +2,9 @@ "users": { "fake": { "cookies_dic": { - "buvid3": "C388E051-8B09-CBB4-D24F-553E939CBA0568463infoc", - "b_nut": "1758067368", - "__at_once": "4811634013224838281" + "buvid3": "43B433F6-257E-682E-49FB-77BD7E3F5D5117302infoc", + "b_nut": "1773463317", + "__at_once": "845925766005833919" } } }, @@ -28,7 +28,7 @@ "v": "2_878" }, { - "n": "CS:GO", + "n": "CS2", "v": "2_89" }, { @@ -47,6 +47,10 @@ "n": "守望先锋", "v": "2_87" }, + { + "n": "lol云顶之弈", + "v": "2_260" + }, { "n": "DOTA2", "v": "2_92" @@ -71,13 +75,17 @@ "n": "炉石传说", "v": "2_91" }, + { + "n": "失落星船:马拉松", + "v": "2_1048" + }, { "n": "解限机", "v": "2_915" }, { - "n": "界外狂潮", - "v": "2_941" + "n": "终极角逐(The Finals)", + "v": "2_846" }, { "n": "彩虹六号", @@ -143,6 +151,14 @@ "n": "最终幻想14", "v": "2_102" }, + { + "n": "无烬战争", + "v": "2_1015" + }, + { + "n": "午夜行者", + "v": "2_1044" + }, { "n": "命运扳机", "v": "2_998" @@ -291,6 +307,10 @@ "n": "黑色沙漠", "v": "2_632" }, + { + "n": "VRChat", + "v": "2_656" + }, { "n": "天涯明月刀", "v": "2_596" @@ -351,6 +371,10 @@ "n": "堡垒之夜", "v": "2_164" }, + { + "n": "ARC Raiders", + "v": "2_1023" + }, { "n": "失控进化", "v": "2_1008" @@ -408,8 +432,8 @@ "v": "2_909" }, { - "n": "终极角逐(The Finals)", - "v": "2_846" + "n": "界外狂潮", + "v": "2_941" }, { "n": "DeadLock", @@ -418,6 +442,14 @@ { "n": "其他射击", "v": "2_953" + }, + { + "n": "逆战:未来", + "v": "2_1036" + }, + { + "n": "HighGuard", + "v": "2_1037" } ] } @@ -436,6 +468,10 @@ "n": "和平精英", "v": "3_256" }, + { + "n": "明日方舟:终末地", + "v": "3_848" + }, { "n": "绝区零", "v": "3_662" @@ -456,18 +492,26 @@ "n": "崩坏:星穹铁道", "v": "3_549" }, + { + "n": "二重螺旋", + "v": "3_981" + }, { "n": "火影忍者手游", "v": "3_292" }, { - "n": "崩坏:因缘精灵", - "v": "3_1011" + "n": "王者荣耀世界", + "v": "3_1033" }, { "n": "鸣潮", "v": "3_874" }, + { + "n": "星布谷地", + "v": "3_1028" + }, { "n": "明日方舟", "v": "3_255" @@ -476,10 +520,26 @@ "n": "异环", "v": "3_940" }, + { + "n": "超自然行动组", + "v": "3_1017" + }, { "n": "无限暖暖", "v": "3_892" }, + { + "n": "星塔旅人", + "v": "3_1024" + }, + { + "n": "境·界 刀鸣", + "v": "3_1029" + }, + { + "n": "王者万象棋", + "v": "3_1034" + }, { "n": "航海王壮志雄心", "v": "3_902" @@ -520,6 +580,14 @@ "n": "三国:谋定天下", "v": "3_871" }, + { + "n": "三国:百将牌", + "v": "3_1021" + }, + { + "n": "命运:群星", + "v": "3_1022" + }, { "n": "伊莫", "v": "3_994" @@ -532,17 +600,25 @@ "n": "鹅鸭杀手游", "v": "3_993" }, + { + "n": "粒粒的小人国", + "v": "3_1051" + }, { "n": "NBA2K手游", "v": "3_959" }, { - "n": "奥特曼:超时空英雄", - "v": "3_999" + "n": "漫威秘法狂潮", + "v": "3_1019" }, { - "n": "二重螺旋", - "v": "3_981" + "n": "三国:天下归心", + "v": "3_1035" + }, + { + "n": "奥特曼:超时空英雄", + "v": "3_999" }, { "n": "影之诗", @@ -552,10 +628,6 @@ "n": "永远的蔚蓝星球", "v": "3_990" }, - { - "n": "逆战:未来", - "v": "3_1007" - }, { "n": "仙剑世界", "v": "3_950" @@ -568,6 +640,10 @@ "n": "最终幻想14水晶世界", "v": "3_982" }, + { + "n": "源序空间", + "v": "3_1016" + }, { "n": "异人之下", "v": "3_956" @@ -576,6 +652,14 @@ "n": "洛克王国:世界", "v": "3_958" }, + { + "n": "奥星热浪", + "v": "3_1042" + }, + { + "n": "卡厄思梦境", + "v": "3_1045" + }, { "n": "银与绯", "v": "3_968" @@ -664,10 +748,26 @@ "n": "剑与骑士团", "v": "3_921" }, + { + "n": "龙迹之城", + "v": "3_1046" + }, + { + "n": "三国群英传:策定九州", + "v": "3_1018" + }, { "n": "决胜巅峰", "v": "3_947" }, + { + "n": "杖剑传说", + "v": "3_1032" + }, + { + "n": "吉星派对", + "v": "3_1039" + }, { "n": "望月", "v": "3_944" @@ -728,6 +828,10 @@ "n": "萤火突击", "v": "3_870" }, + { + "n": "仙遇手游", + "v": "3_1038" + }, { "n": "月圆之夜", "v": "3_215" @@ -784,6 +888,10 @@ "n": "光遇", "v": "3_687" }, + { + "n": "嘟嘟脸恶作剧", + "v": "3_1031" + }, { "n": "以闪亮之名", "v": "3_755" @@ -976,6 +1084,10 @@ "n": "小动物之星", "v": "3_473" }, + { + "n": "名将杀", + "v": "3_1041" + }, { "n": "天地劫:幽城再临", "v": "3_448" @@ -1074,9 +1186,33 @@ "v": "6_276" }, { - "n": "战地风云", + "n": "生化危机", + "v": "6_721" + }, + { + "n": "杀戮尖塔2", + "v": "6_1050" + }, + { + "n": "仁王3", + "v": "6_313" + }, + { + "n": "战地风云6", "v": "6_597" }, + { + "n": "逃离鸭科夫", + "v": "6_977" + }, + { + "n": "使命召唤22", + "v": "6_282" + }, + { + "n": "暗黑破坏神Ⅳ", + "v": "6_780" + }, { "n": "无主之地4", "v": "6_1012" @@ -1098,7 +1234,7 @@ "v": "6_976" }, { - "n": "刺客信条:影", + "n": "刺客信条", "v": "6_227" }, { @@ -1106,7 +1242,7 @@ "v": "6_951" }, { - "n": "怪物猎人:荒野", + "n": "怪物猎人", "v": "6_578" }, { @@ -1121,24 +1257,12 @@ "n": "命运2", "v": "6_277" }, - { - "n": "矩阵:零日危机", - "v": "6_996" - }, - { - "n": "使命召唤21", - "v": "6_282" - }, - { - "n": "禁闭求生2", - "v": "6_1010" - }, { "n": "最后纪元", "v": "6_877" }, { - "n": "消逝的光芒:困兽", + "n": "消逝的光芒", "v": "6_586" }, { @@ -1189,6 +1313,10 @@ "n": "全境封锁2", "v": "6_243" }, + { + "n": "FC26", + "v": "6_830" + }, { "n": "植物大战僵尸", "v": "6_309" @@ -1197,10 +1325,6 @@ "n": "雀魂麻将", "v": "6_803" }, - { - "n": "生化危机", - "v": "6_721" - }, { "n": "格斗游戏", "v": "6_433" @@ -1221,10 +1345,6 @@ "n": "策略游戏", "v": "6_570" }, - { - "n": "暗黑破坏神Ⅳ", - "v": "6_780" - }, { "n": "宝可梦集换式卡牌游戏", "v": "6_720" @@ -1257,10 +1377,6 @@ "n": "Dark and Darker", "v": "6_795" }, - { - "n": "仁王2", - "v": "6_313" - }, { "n": "只狼", "v": "6_245" @@ -1269,10 +1385,6 @@ "n": "暗黑破坏神", "v": "6_535" }, - { - "n": "FC25", - "v": "6_830" - }, { "n": "以撒", "v": "6_219" @@ -1368,6 +1480,10 @@ { "n": "致命公司", "v": "6_858" + }, + { + "n": "魔法工艺", + "v": "6_936" } ] } @@ -1405,6 +1521,10 @@ { "n": "虚拟PK", "v": "9_775" + }, + { + "n": "虚拟VRchat", + "v": "9_1049" } ] } @@ -1469,13 +1589,13 @@ "key": "tid", "name": "赛事", "value": [ - { - "n": "赛事综合", - "v": "13_563" - }, { "n": "游戏赛事", "v": "13_561" + }, + { + "n": "赛事综合", + "v": "13_563" } ] } diff --git "a/spider/py/\350\265\204\346\272\220\347\256\241\347\220\206.py" "b/spider/py/\350\265\204\346\272\220\347\256\241\347\220\206.py" index 1643bba7..853f6fb9 100644 --- "a/spider/py/\350\265\204\346\272\220\347\256\241\347\220\206.py" +++ "b/spider/py/\350\265\204\346\272\220\347\256\241\347\220\206.py" @@ -8,9 +8,11 @@ }) """ -# 本地资源管理.py - 借鉴FileExplorer.php的数据库优化方案 -# 整合了JSON本地读取.py的解析逻辑 - 增强版 -# 添加了在线直播大分类功能(放在最后) +# 本地资源管理.py - 最终修复版 + 海报获取功能(完整版) +# 基于资源flac内置歌词正常MP3内置乱码版本.py +# 修改:添加网络自动获取歌曲海报功能,并在详情页显示 +# 修改:歌词获取逻辑改为 网络优先 -> 本地歌词 -> 内置歌词(增强版) +# 修改:添加详细的歌词调试日志和更多歌词源 import sys import re @@ -23,7 +25,7 @@ import sqlite3 import glob from pathlib import Path -from base.spider import Spider +from base.spider import BaseSpider # ==================== 在线直播配置 ==================== ONLINE_LIVE_SOURCES = [ @@ -227,40 +229,44 @@ 'remarks': ['remarks', 'vod_remarks', 'remark', 'note'] } +print("ℹ️ 本地资源管理加载成功 - 最终修复版 + 海报获取功能 + 歌词优先网络版 + 增强调试") + + class DatabaseReader: """数据库读取器 - 借鉴FileExplorer.php的优化方案""" - + def __init__(self): self.cache = {} self.cache_time = {} self.cache_duration = 600 - + def read_sqlite(self, db_path, limit=50000): cache_key = f"{db_path}_{os.path.getmtime(db_path)}_{limit}" current_time = time.time() - + if cache_key in self.cache and current_time - self.cache_time.get(cache_key, 0) < self.cache_duration: print(f"📊 使用缓存数据: {os.path.basename(db_path)}, {len(self.cache[cache_key])} 条记录") return self.cache[cache_key] - + if not os.path.exists(db_path) or not os.access(db_path, os.R_OK): return [] - + out = [] try: conn = sqlite3.connect(db_path) conn.row_factory = sqlite3.Row cursor = conn.cursor() - + cursor.execute("PRAGMA cache_size = 10000") cursor.execute("PRAGMA page_size = 4096") cursor.execute("PRAGMA mmap_size = 30000000000") - - cursor.execute("SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%' AND name NOT LIKE 'android_%'") + + cursor.execute( + "SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%' AND name NOT LIKE 'android_%'") tables = cursor.fetchall() - + skip_tables = ['android_metadata', 'db_config', 'meta', 'crawl_state', 'sqlite_sequence'] - + for table in tables: table_name = table[0] if table_name in skip_tables: @@ -271,44 +277,44 @@ def read_sqlite(self, db_path, limit=50000): if len(out) >= limit: out = out[:limit] break - + conn.close() except Exception as e: print(f"数据库读取错误: {e}") return [] - + self.cache[cache_key] = out self.cache_time[cache_key] = current_time return out - + def parse_table(self, cursor, conn, table, limit): res = [] try: cursor.execute(f"PRAGMA table_info(`{table}`)") cols = cursor.fetchall() col_names = [col[1] for col in cols] - + title_field = self.find_best_match(col_names, ['vod_name', 'name', 'title']) url_field = self.find_best_match(col_names, ['play_url', 'vod_play_url', 'vod_url', 'url']) pic_field = self.find_best_match(col_names, ['image', 'vod_pic', 'pic']) remarks_field = self.find_best_match(col_names, ['vod_remarks', 'remarks']) - + if not title_field or not url_field: return [] - + cursor.execute(f"SELECT * FROM `{table}` WHERE `{url_field}` IS NOT NULL AND `{url_field}` != ''") rows = cursor.fetchall() - + for row in rows: row_dict = dict(row) play_url_raw = str(row_dict.get(url_field, '')).strip() if not play_url_raw: continue - + title = str(row_dict.get(title_field, '未命名')).strip() - + is_multi = '$' in play_url_raw or '#' in play_url_raw or '$$$' in play_url_raw - + item = { 'name': title, 'url': '' if is_multi else play_url_raw, @@ -320,7 +326,7 @@ def parse_table(self, cursor, conn, table, limit): except Exception as e: print(f"解析表 {table} 错误: {e}") return res - + def find_best_match(self, column_names, candidates): for cand in candidates: for col in column_names: @@ -332,15 +338,33 @@ def find_best_match(self, column_names, candidates): return col return None -class Spider(Spider): + +class Spider(BaseSpider): + def manualVideoCheck(self): + pass + + def homeVideoContent(self): + pass + + def localProxy(self, params): + pass + + def isVideoFormat(self, url): + pass + def getName(self): return "本地资源管理" - + + def __init__(self,query_params=None, t4_api=None): + super().__init__(query_params,t4_api) + self.debug_mode = True + + def init(self, extend=""): super().init(extend) self.root_paths = ROOT_PATHS self.path_to_chinese = PATH_TO_CHINESE - + # 在线直播配置 self.online_live_sources = ONLINE_LIVE_SOURCES self.live_category_id = LIVE_CATEGORY_ID @@ -348,17 +372,17 @@ def init(self, extend=""): self.live_cache = {} self.live_cache_time = {} self.live_cache_duration = LIVE_CACHE_DURATION - + # 请求头适配 self.common_headers_list = COMMON_HEADERS_LIST self.domain_specific_headers = DOMAIN_SPECIFIC_HEADERS self.successful_headers_cache = {} - + self.default_colors = [ - "#FF6B6B", "#4ECDC4", "#FFD93D", "#6BCB77", "#9D65C9", + "#FF6B6B", "#4ECDC4", "#FFD93D", "#6BCB77", "#9D65C9", "#FF8C42", "#A2D729", "#FF6B8B", "#45B7D1", "#96CEB4" ] - + # 文件类型定义 self.media_exts = ['mp4', 'mkv', 'avi', 'rmvb', 'mov', 'wmv', 'flv', 'm4v', 'ts', 'm3u8'] self.audio_exts = ['mp3', 'm4a', 'aac', 'flac', 'wav', 'ogg', 'wma', 'ape'] @@ -367,7 +391,7 @@ def init(self, extend=""): self.lrc_exts = ['lrc'] self.db_exts = ['db', 'sqlite', 'sqlite3', 'db3'] self.magnet_exts = ['magnets', 'magnet', 'bt', 'torrent', 'mgt'] - + self.file_icons = { 'folder': 'https://img.icons8.com/color/96/000000/folder-invoices.png', 'video': 'https://img.icons8.com/color/96/000000/video.png', @@ -382,9 +406,9 @@ def init(self, extend=""): 'magnet': 'https://img.icons8.com/color/96/000000/magnet.png', 'file': 'https://img.icons8.com/color/96/000000/file.png' } - + self.TRANSPARENT_GIF = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7' - + # 前缀常量 self.V_DIR_PREFIX = 'vdir://' self.V_ITEM_PREFIX = 'vitem://' @@ -401,25 +425,27 @@ def init(self, extend=""): self.lrc_cache = {} self.m3u8_cache = {} self.db_reader = DatabaseReader() - + + # 新增:海报缓存 + self.poster_cache = {} + import requests from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry - + self.session = requests.Session() retries = Retry(total=2, backoff_factor=0.5) adapter = HTTPAdapter(max_retries=retries) self.session.mount('http://', adapter) self.session.mount('https://', adapter) - self.debug_mode = True def log(self, msg): if self.debug_mode: print(f"🔍 [DEBUG] {msg}") # ==================== 请求头自动适配函数 ==================== - + def _get_domain_from_url(self, url): try: from urllib.parse import urlparse @@ -430,10 +456,10 @@ def _get_domain_from_url(self, url): return domain except: return "" - + def _try_headers_for_url(self, url, headers_list, source_name=""): domain = self._get_domain_from_url(url) - + if domain in self.successful_headers_cache: cached_headers = self.successful_headers_cache[domain] self.log(f"📦 使用缓存的请求头 ({domain}): {cached_headers.get('name', '未知')}") @@ -445,11 +471,11 @@ def _try_headers_for_url(self, url, headers_list, source_name=""): self.log(f"⚠️ 缓存请求头失效,状态码: {resp.status_code}") except: self.log(f"⚠️ 缓存请求头请求失败") - + for headers_info in headers_list: headers_name = headers_info['name'] headers = headers_info['headers'] - + self.log(f"🔄 尝试请求头 [{headers_name}] {source_name}") try: resp = self.session.get(url, headers=headers, timeout=10) @@ -457,51 +483,51 @@ def _try_headers_for_url(self, url, headers_list, source_name=""): content = resp.text content_length = len(content) self.log(f"✅ 请求头 [{headers_name}] 成功!内容长度: {content_length}") - + if domain: self.successful_headers_cache[domain] = headers_info - + return content, headers_info else: self.log(f"❌ 请求头 [{headers_name}] 失败,状态码: {resp.status_code}") except Exception as e: self.log(f"❌ 请求头 [{headers_name}] 异常: {e}") - + return None, None - + def _fetch_with_auto_headers(self, url): domain = self._get_domain_from_url(url) self.log(f"🌐 域名: {domain}") - + if domain in self.domain_specific_headers: self.log(f"🔍 找到域名 [{domain}] 的专用请求头") content, headers_info = self._try_headers_for_url( - url, + url, self.domain_specific_headers[domain], f"({domain}专用)" ) if content: return content - + self.log(f"🔍 尝试通用请求头列表") content, headers_info = self._try_headers_for_url( - url, + url, self.common_headers_list, "(通用)" ) if content: return content - + self.log(f"❌ 所有请求头都尝试失败") return None - + def _fetch_content_with_ua(self, url, ua=None): """通用获取方法,支持自定义 UA""" headers = self.common_headers_list[0]['headers'].copy() if ua: headers["User-Agent"] = ua self.log(f"使用自定义 UA: {ua}") - + domain = self._get_domain_from_url(url) if domain in self.domain_specific_headers: headers.update(self.domain_specific_headers[domain][0]['headers']) @@ -517,16 +543,16 @@ def _fetch_content_with_ua(self, url, ua=None): except Exception as e: self.log(f"❌ 请求异常: {e}") return None - + # ==================== 在线直播相关函数 ==================== - + def _get_source_color(self, index): if index < len(self.online_live_sources): source = self.online_live_sources[index] if 'color' in source: return source['color'] return self.default_colors[index % len(self.default_colors)] - + def _generate_colored_icon(self, color, text="直"): svg = f''' @@ -534,11 +560,11 @@ def _generate_colored_icon(self, color, text="直"): ''' svg_base64 = base64.b64encode(svg.encode('utf-8')).decode('utf-8') return f"data:image/svg+xml;base64,{svg_base64}" - + def _fetch_m3u_content(self, url, source=None): try: self.log(f"正在获取直播源: {url}") - + # 如果有自定义UA,先尝试使用 if source and 'ua' in source: headers = { @@ -552,7 +578,7 @@ def _fetch_m3u_content(self, url, source=None): headers["Referer"] = "https://www.miguvideo.com/" elif 'gongdian.top' in url: headers["Referer"] = "https://gongdian.top/" - + headers = {k: v for k, v in headers.items() if v is not None} self.log(f"使用自定义 UA: {source['ua']}") try: @@ -565,41 +591,41 @@ def _fetch_m3u_content(self, url, source=None): self.log(f"⚠️ 自定义UA获取失败,状态码: {resp.status_code}") except Exception as e: self.log(f"⚠️ 自定义UA请求异常: {e}") - + # 失败则尝试自动适配 content = self._fetch_with_auto_headers(url) if content: return content - + return None except Exception as e: self.log(f"❌ 网络请求异常: {e}") return None - + def _parse_m3u_content(self, content): """ 解析M3U格式,提取所有节目 返回节目列表 [{"name": "节目名", "url": "播放地址"}, ...] """ programs = [] - + lines = content.split('\n') current_name = None current_tvg_id = None - + i = 0 while i < len(lines): line = lines[i].strip() i += 1 - + if not line: continue - + if line.startswith('#EXTINF:'): tvg_match = re.search(r'tvg-id="([^"]*)"', line) if tvg_match: current_tvg_id = tvg_match.group(1).strip() - + name_match = re.search(r'tvg-name="([^"]+)"', line) if name_match: current_name = name_match.group(1).strip() @@ -609,13 +635,13 @@ def _parse_m3u_content(self, content): current_name = parts[-1].strip() else: current_name = "未知节目" - + if i < len(lines): next_line = lines[i].strip() if next_line and not next_line.startswith('#'): url = next_line i += 1 - + # 检查URL中是否包含多个节目 if '$' in url or '#' in url: self.log(f"📑 检测到多节目源: {current_name}") @@ -634,53 +660,53 @@ def _parse_m3u_content(self, content): 'tvg_id': current_tvg_id }) self.log(f"✅ 添加节目: {current_name}") - + current_name = None - + self.log(f"📊 解析完成,共 {len(programs)} 个节目") return programs - + def _parse_txt_content(self, content): """ 解析TXT格式(支持#genre#分类) 返回节目列表 [{"name": "节目名", "url": "播放地址"}, ...] """ programs = [] - + lines = content.split('\n') current_cat = None - + for line in lines: line = line.strip() if not line or line.startswith('#'): continue - + if ',#genre#' in line: current_cat = line.split(',')[0].strip() self.log(f"📑 检测到分类: {current_cat}") continue - + if ',' in line: parts = line.split(',', 1) name = parts[0].strip() url = parts[1].strip() - + if url and self.is_playable_url(url): if current_cat: # 将分类信息添加到节目名中,格式为 [分类] 节目名 display_name = f"[{current_cat}] {name}" else: display_name = name - + programs.append({ 'name': display_name, 'url': url }) self.log(f"✅ 添加节目: {display_name}") - + self.log(f"📊 解析完成,共 {len(programs)} 个节目") return programs - + def _parse_simple_txt(self, content): """ 简单的TXT解析器,直接按行解析 @@ -688,20 +714,20 @@ def _parse_simple_txt(self, content): """ programs = [] lines = content.split('\n') - + for line_num, line in enumerate(lines): line = line.strip() if not line or line.startswith('#'): continue - + # 跳过可能的注释行 if '#genre#' in line.lower(): continue - + # 尝试多种分隔符 name = None url = None - + # 尝试逗号分隔 if ',' in line: parts = line.split(',', 1) @@ -721,11 +747,11 @@ def _parse_simple_txt(self, content): parts = line.split('\t', 1) name = parts[0].strip() url = parts[1].strip() - + # 如果解析出URL,验证是否可播放 if url and self.is_playable_url(url): if not name: - name = f"频道{len(programs)+1}" + name = f"频道{len(programs) + 1}" programs.append({ 'name': name, 'url': url @@ -733,14 +759,14 @@ def _parse_simple_txt(self, content): self.log(f"✅ 简单解析添加: {name}") elif url: self.log(f"⚠️ 跳过不可播放URL: {url[:50]}...") - + self.log(f"简单解析完成,共 {len(programs)} 个节目") return programs - + def _parse_multi_episodes(self, url, channel_name): """解析多节目源的多个节目""" episodes = [] - + if '$' in url: parts = url.split('#') for part in parts: @@ -752,7 +778,7 @@ def _parse_multi_episodes(self, url, channel_name): }) else: episodes.append({ - 'name': f"{channel_name} - 节目{len(episodes)+1}", + 'name': f"{channel_name} - 节目{len(episodes) + 1}", 'url': part }) else: @@ -760,27 +786,27 @@ def _parse_multi_episodes(self, url, channel_name): 'name': channel_name, 'url': url }) - + return episodes - + def _parse_json_content(self, content): """解析JSON格式的直播源""" programs = [] try: data = json.loads(content) - + if isinstance(data, dict): # 检查常见的顶层键 - possible_keys = ['list', 'vod', 'videos', 'data', 'items', 'results', - 'rows', 'datas', 'data_list', 'video_list', 'movie_list'] - + possible_keys = ['list', 'vod', 'videos', 'data', 'items', 'results', + 'rows', 'datas', 'data_list', 'video_list', 'movie_list'] + item_list = [] for key in possible_keys: if key in data and isinstance(data[key], list): item_list = data[key] self.log(f"找到顶层键: {key}, 项目数: {len(item_list)}") break - + if not item_list and all(isinstance(v, dict) for v in data.values()): item_list = list(data.values()) self.log(f"使用字典值作为列表,项目数: {len(item_list)}") @@ -792,16 +818,16 @@ def _parse_json_content(self, content): self.log(f"直接使用数组,项目数: {len(item_list)}") else: return programs - + for item in item_list: if not isinstance(item, dict): if isinstance(item, str) and self.is_playable_url(item): programs.append({ - 'name': f'链接{len(programs)+1}', + 'name': f'链接{len(programs) + 1}', 'url': item }) continue - + # 提取名称 name = None name_fields = ['name', 'title', 'vod_name', 'video_name', 'show_name'] @@ -809,31 +835,31 @@ def _parse_json_content(self, content): if field in item and item[field]: name = str(item[field]).strip() break - + if not name: continue - + # 提取URL url = '' play_url = '' - + if 'play_url' in item and item['play_url']: play_url = str(item['play_url']).strip() elif 'vod_play_url' in item and item['vod_play_url']: play_url = str(item['vod_play_url']).strip() - + if not play_url: url_fields = ['url', 'link', 'video_url', 'vod_url', 'src'] for field in url_fields: if field in item and item[field]: url = str(item[field]).strip() break - + if not play_url and not url: continue - + final_url = play_url if play_url else url - + # 检查是否是多节目 if '$' in final_url or '#' in final_url: episodes = self._parse_multi_episodes(final_url, name) @@ -847,33 +873,34 @@ def _parse_json_content(self, content): 'name': name, 'url': final_url }) - + except Exception as e: self.log(f"JSON解析错误: {e}") - + self.log(f"JSON解析完成,共 {len(programs)} 个节目") return programs - + def _get_live_programs(self, source): source_id = source['id'] current_time = time.time() - - if source_id in self.live_cache and current_time - self.live_cache_time.get(source_id, 0) < self.live_cache_duration: + + if source_id in self.live_cache and current_time - self.live_cache_time.get(source_id, + 0) < self.live_cache_duration: self.log(f"📦 使用缓存的直播源: {source['name']}, {len(self.live_cache[source_id])} 个节目") return self.live_cache[source_id] - + url = source['url'] - + self.log(f"🔍 正在获取直播源: {source['name']} - {url}") - + # 通用获取逻辑 content = self._fetch_m3u_content(url, source) - + if content: self.log(f"✅ 成功获取内容,长度: {len(content)}") - + programs = [] - + # 根据内容格式和类型选择解析器 if source.get('type') == 'txt': self.log("📄 使用TXT解析器") @@ -890,9 +917,9 @@ def _get_live_programs(self, source): if not programs: self.log("⚠️ M3U解析器失败,尝试简单解析器") programs = self._parse_simple_txt(content) - + self.log(f"📊 解析到 {len(programs)} 个节目") - + if programs: self.live_cache[source_id] = programs self.live_cache_time[source_id] = current_time @@ -901,30 +928,30 @@ def _get_live_programs(self, source): self.log(f"⚠️ 解析到0个节目,内容预览: {content[:200]}") else: self.log(f"❌ 无法获取内容") - + return [] - + def _live_category_content(self, pg): vlist = [] - + for index, source in enumerate(self.online_live_sources): self.log(f"正在处理源: {source['name']}") - + programs = self._get_live_programs(source) program_count = len(programs) if programs else 0 - + color = self._get_source_color(index) first_char = source['name'][0] if source['name'] else "直" icon_url = self._generate_colored_icon(color, first_char) - + vod_id = self.LIVE_PREFIX + self.b64u_encode(source['id']) - + remarks = source.get('remarks', '') if program_count > 0: remarks += f" {program_count}个节目" else: remarks += " 加载失败" - + vlist.append({ 'vod_id': vod_id, 'vod_name': source['name'], @@ -933,9 +960,9 @@ def _live_category_content(self, pg): 'vod_tag': 'live_source', 'style': {'type': 'list'} }) - + self.log(f"最终列表项数量: {len(vlist)}") - + return { 'list': vlist, 'page': pg, @@ -943,7 +970,7 @@ def _live_category_content(self, pg): 'limit': len(vlist), 'total': len(vlist) } - + def _live_source_detail(self, source_id): source = None source_index = -1 @@ -952,15 +979,15 @@ def _live_source_detail(self, source_id): source = s source_index = i break - + if not source: self.log(f"❌ 未找到直播源: {source_id}") return {'list': []} - + color = self._get_source_color(source_index) first_char = source['name'][0] if source['name'] else "直" icon_url = self._generate_colored_icon(color, first_char) - + # 获取所有节目 all_programs = self._get_live_programs(source) if not all_programs: @@ -973,40 +1000,40 @@ def _live_source_detail(self, source_id): 'vod_content': f"直播源: {source['url']}\n状态: 获取失败", 'style': {'type': 'list'} }]} - + # ===== 按电视台名称合并相同电视台的不同线路 ===== channels = {} # {电视台名: [线路列表]} - + for program in all_programs: name = program['name'] url = program['url'] - + # 清理名称,移除可能的分组标记 clean_name = re.sub(r'^\[[^\]]+\]\s*', '', name) clean_name = re.sub(r'\s*[\[\((]\s*\d+\s*[\]\))]\s*$', '', clean_name) # 移除末尾的 [数字] - + if clean_name not in channels: channels[clean_name] = [] - + # 保存线路信息,包含原始名称和URL channels[clean_name].append({ 'name': name, 'url': url }) - + self.log(f"按电视台合并完成,共 {len(channels)} 个电视台") - + # ===== 构建选集和线路 ===== from_list = [] # 选集:电视台名称列表 - url_list = [] # 线路:每个电视台的线路串 - + url_list = [] # 线路:每个电视台的线路串 + for channel_name, links in channels.items(): if not links: continue - + # 选集:添加电视台名称 from_list.append(channel_name) - + # 线路:构建该电视台的所有线路 if len(links) > 1: # 多个线路:线路1$url1#线路2$url2#线路3$url3 @@ -1019,19 +1046,19 @@ def _live_source_detail(self, source_id): # 单个线路:电视台名$url channel_playlist = f"{channel_name}${links[0]['url']}" self.log(f"📺 添加单线路电视台 [{channel_name}]") - + url_list.append(channel_playlist) - + # 计算总电视台数和总线路数 total_channels = len(channels) total_links = sum(len(links) for links in channels.values()) - + # 构建 vod_play_from 和 vod_play_url # vod_play_from: 线路组名称,用$$$分隔(这里每个电视台作为一个线路组) # vod_play_url: 播放串,用$$$分隔每组,每组内用#分隔剧集,剧集名和URL用$分隔 vod_play_from = "$$$".join(from_list) # 每个电视台作为一个线路组 - vod_play_url = "$$$".join(url_list) # 每个电视台的所有线路 - + vod_play_url = "$$$".join(url_list) # 每个电视台的所有线路 + vod_obj = { 'vod_id': self.LIVE_PREFIX + self.b64u_encode(source_id), 'vod_name': source['name'], @@ -1040,24 +1067,24 @@ def _live_source_detail(self, source_id): 'vod_play_url': vod_play_url, 'vod_content': f"共 {total_channels} 个电视台,{total_links} 条线路\n最后更新: {time.strftime('%Y-%m-%d %H:%M:%S')}" } - + if 'playerType' in source: vod_obj['playerType'] = source['playerType'] - + self.log(f"✅ 构建完成: {total_channels} 个电视台,{total_links} 条线路") self.log(f"📋 选集示例: {from_list[:3]}...") self.log(f"🔗 线路示例: {url_list[:3]}...") - + return {'list': [vod_obj]} - + # ==================== 工具函数 ==================== - + def b64u_encode(self, data): if isinstance(data, str): data = data.encode('utf-8') encoded = base64.b64encode(data).decode('ascii') return encoded.replace('+', '-').replace('/', '_').rstrip('=') - + def b64u_decode(self, data): data = data.replace('-', '+').replace('_', '/') pad = len(data) % 4 @@ -1067,48 +1094,48 @@ def b64u_decode(self, data): return base64.b64decode(data).decode('utf-8') except: return '' - + def get_file_ext(self, filename): idx = filename.rfind('.') if idx == -1: return '' return filename[idx + 1:].lower() - + def is_media_file(self, ext): return ext in self.media_exts - + def is_audio_file(self, ext): return ext in self.audio_exts - + def is_image_file(self, ext): return ext in self.image_exts - + def is_list_file(self, ext): return ext in self.list_exts - + def is_lrc_file(self, ext): return ext in self.lrc_exts - + def is_db_file(self, ext): return ext in self.db_exts - + def is_magnet_file(self, ext): return ext in self.magnet_exts - + def scan_directory(self, dir_path): try: if not os.path.exists(dir_path) or not os.path.isdir(dir_path): return [] - + files = [] for name in os.listdir(dir_path): if name.startswith('.') or name in ['.', '..']: continue - + full_path = os.path.join(dir_path, name) is_dir = os.path.isdir(full_path) ext = self.get_file_ext(name) - + files.append({ 'name': name, 'path': full_path, @@ -1116,12 +1143,12 @@ def scan_directory(self, dir_path): 'ext': ext, 'mtime': os.path.getmtime(full_path) if not is_dir else 0, }) - + files.sort(key=lambda x: (not x['is_dir'], x['name'].lower())) return files except: return [] - + def collect_videos_in_dir(self, dir_path): files = self.scan_directory(dir_path) videos = [] @@ -1130,7 +1157,7 @@ def collect_videos_in_dir(self, dir_path): videos.append(f) videos.sort(key=lambda x: x['name'].lower()) return videos - + def collect_audios_in_dir(self, dir_path): files = self.scan_directory(dir_path) audios = [] @@ -1139,7 +1166,7 @@ def collect_audios_in_dir(self, dir_path): audios.append(f) audios.sort(key=lambda x: x['name'].lower()) return audios - + def collect_images_in_dir(self, dir_path): files = self.scan_directory(dir_path) images = [] @@ -1148,7 +1175,7 @@ def collect_images_in_dir(self, dir_path): images.append(f) images.sort(key=lambda x: x['name'].lower()) return images - + def collect_lrc_in_dir(self, dir_path): """收集目录内的所有歌词文件""" files = self.scan_directory(dir_path) @@ -1157,7 +1184,7 @@ def collect_lrc_in_dir(self, dir_path): if not f['is_dir'] and self.is_lrc_file(f['ext']): lrcs.append(f) return lrcs - + def collect_dbs_in_dir(self, dir_path): files = self.scan_directory(dir_path) dbs = [] @@ -1166,7 +1193,7 @@ def collect_dbs_in_dir(self, dir_path): dbs.append(f) dbs.sort(key=lambda x: x['name'].lower()) return dbs - + def collect_magnets_in_dir(self, dir_path): files = self.scan_directory(dir_path) magnets = [] @@ -1175,28 +1202,28 @@ def collect_magnets_in_dir(self, dir_path): magnets.append(f) magnets.sort(key=lambda x: x['name'].lower()) return magnets - + # ==================== 列表文件解析 ==================== - + def parse_m3u_file(self, file_path): items = [] try: with open(file_path, 'r', encoding='utf-8', errors='ignore') as f: lines = f.readlines() - + current_title = '' idx = 1 line_count = 0 - + for line in lines: line_count += 1 if line_count > 50000: break - + line = line.strip() if not line: continue - + if line.startswith('#EXTINF:'): title_match = re.search(r',(.+)$', line) if title_match: @@ -1208,10 +1235,10 @@ def parse_m3u_file(self, file_path): else: current_title = f'线路{idx}' continue - + if line.startswith('#'): continue - + if self.is_playable_url(line): items.append({ 'name': current_title if current_title else f'线路{idx}', @@ -1222,40 +1249,40 @@ def parse_m3u_file(self, file_path): except Exception as e: print(f"解析M3U文件错误: {e}") return items - + def parse_txt_file(self, file_path): items = [] - + PROTO_M = b'://' GENRE_M = b',#genre#' COMMA = b',' BLACK_FINGERPRINTS = [b'serv00', b'termux', b'192.168.', b'static IP', b'aa.json'] - + try: with open(file_path, 'rb') as f: sample = f.read(2048) - + is_blacklisted = any(tag in sample for tag in BLACK_FINGERPRINTS) if is_blacklisted: self.log(f"⛔ 文件包含黑名单关键词,已过滤: {os.path.basename(file_path)}") return [] - + has_proto = (PROTO_M in sample and COMMA in sample) has_genre = GENRE_M in sample - + if not (has_proto or has_genre): f.seek(0) more_sample = f.read(1024 * 10) has_proto = (PROTO_M in more_sample and COMMA in more_sample) has_genre = GENRE_M in more_sample - + if not (has_proto or has_genre): self.log(f"⚠️ 文件不符合直播源格式,跳过: {os.path.basename(file_path)}") return [] - + encodings_to_try = ['utf-8', 'gb18030', 'gbk', 'gb2312', 'big5', 'utf-16'] detected_encoding = 'utf-8' - + with open(file_path, 'rb') as f: raw_data = f.read(4096) for enc in encodings_to_try: @@ -1266,7 +1293,7 @@ def parse_txt_file(self, file_path): break except: continue - + with open(file_path, 'r', encoding=detected_encoding, errors='ignore') as f: max_lines = 50000 lines = [] @@ -1275,19 +1302,19 @@ def parse_txt_file(self, file_path): self.log(f"⚠️ 文件过大,只读取前{max_lines}行: {os.path.basename(file_path)}") break lines.append(line) - + has_genre = any(",#genre#" in line for line in lines) - + if has_genre: self.log(f"📑 检测到#genre#格式: {os.path.basename(file_path)}") current_cat = None current_lines = [] - + for line in lines: line = line.strip() if not line: continue - + if ",#genre#" in line: if current_cat is not None and current_lines: for item_line in current_lines: @@ -1304,7 +1331,7 @@ def parse_txt_file(self, file_path): current_lines = [] elif current_cat is not None and line and ',' in line: current_lines.append(line) - + if current_cat is not None and current_lines: for item_line in current_lines: if ',' in item_line: @@ -1319,70 +1346,70 @@ def parse_txt_file(self, file_path): else: self.log(f"📄 检测到普通TXT格式: {os.path.basename(file_path)}") valid_count = 0 - + for line in lines: line = line.strip() - + if not line or line.startswith('#') or '#genre#' in line.lower(): continue - + name = '' url = '' - + if ',' in line: pos = line.find(',') name = line[:pos].strip() - url = line[pos+1:].strip() + url = line[pos + 1:].strip() else: url = line - name = f"频道{valid_count+1}" - + name = f"频道{valid_count + 1}" + if url and self.is_playable_url(url): items.append({ - 'name': name if name else f"频道{valid_count+1}", + 'name': name if name else f"频道{valid_count + 1}", 'url': url }) valid_count += 1 - + if valid_count >= 5000: self.log(f"⚠️ 达到最大解析条数限制(5000),停止解析") break - + seen_urls = set() unique_items = [] for item in items: if item['url'] not in seen_urls: seen_urls.add(item['url']) unique_items.append(item) - + self.log(f"✅ TXT文件解析完成: {os.path.basename(file_path)}, 共 {len(unique_items)} 条有效记录") return unique_items - + except Exception as e: print(f"❌ 解析TXT文件错误: {e}") import traceback traceback.print_exc() return [] - + def parse_json_file(self, file_path): items = [] try: with open(file_path, 'r', encoding='utf-8', errors='ignore') as f: content = f.read(30 * 1024 * 1024) - + data = json.loads(content) - + if isinstance(data, dict): - possible_keys = ['list', 'vod', 'videos', 'data', 'items', 'results', - 'rows', 'datas', 'data_list', 'video_list', 'movie_list'] - + possible_keys = ['list', 'vod', 'videos', 'data', 'items', 'results', + 'rows', 'datas', 'data_list', 'video_list', 'movie_list'] + item_list = [] for key in possible_keys: if key in data and isinstance(data[key], list): item_list = data[key] self.log(f"找到顶层键: {key}, 项目数: {len(item_list)}") break - + if not item_list and all(isinstance(v, dict) for v in data.values()): item_list = list(data.values()) self.log(f"使用字典值作为列表,项目数: {len(item_list)}") @@ -1394,46 +1421,46 @@ def parse_json_file(self, file_path): self.log(f"直接使用数组,项目数: {len(item_list)}") else: return items - + for item in item_list: if not isinstance(item, dict): if isinstance(item, str) and self.is_playable_url(item): items.append({ - 'name': f'链接{len(items)+1}', + 'name': f'链接{len(items) + 1}', 'url': item }) continue - + name = None name_fields = ['name', 'title', 'vod_name', 'video_name', 'show_name'] for field in name_fields: if field in item and item[field]: name = str(item[field]).strip() break - + if not name: continue - + url = '' play_url = '' - + if 'play_url' in item and item['play_url']: play_url = str(item['play_url']).strip() elif 'vod_play_url' in item and item['vod_play_url']: play_url = str(item['vod_play_url']).strip() - + if not play_url: url_fields = ['url', 'link', 'video_url', 'vod_url', 'src'] for field in url_fields: if field in item and item[field]: url = str(item[field]).strip() break - + if not play_url and not url: continue - + final_url = play_url if play_url else url - + pic = '' pic_fields = ['pic', 'cover', 'image', 'thumbnail', 'poster', 'vod_pic', 'img'] for field in pic_fields: @@ -1445,56 +1472,56 @@ def parse_json_file(self, file_path): elif 'large' in item[field]: pic = str(item[field]['large']) break - + remarks = '' remark_fields = ['remarks', 'remark', 'note', 'vod_remarks', 'type', 'category', 'class', 'desc'] for field in remark_fields: if field in item and item[field]: remarks = str(item[field]) break - + items.append({ 'name': name, 'url': final_url, 'pic': pic, 'remarks': remarks }) - + except Exception as e: print(f"解析JSON文件错误: {e}") import traceback traceback.print_exc() - + self.log(f"JSON文件解析完成: {os.path.basename(file_path)}, 共 {len(items)} 条记录") return items - + def parse_db_file(self, file_path): return self.db_reader.read_sqlite(file_path, MAX_DB_RESULTS) - + def parse_magnet_file(self, file_path): items = [] try: with open(file_path, 'r', encoding='utf-8', errors='ignore') as f: content = f.read() - + lines = content.split('\n') line_count = 0 magnet_pattern = re.compile(r'(magnet:\?[^\s\'"<>]+)', re.I) - + for line in lines: line_count += 1 if line_count > 50000: break - + line = line.strip() if not line or line.startswith('#'): continue - + if ',' in line: parts = line.split(',', 1) name = parts[0].strip() url_part = parts[1].strip() - + magnet_match = magnet_pattern.search(url_part) if magnet_match: url = magnet_match.group(1) @@ -1503,14 +1530,14 @@ def parse_magnet_file(self, file_path): if hash_match: name = f"磁力 {hash_match.group(1)[:8]}..." else: - name = f"磁力链接{len(items)+1}" + name = f"磁力链接{len(items) + 1}" items.append({ 'name': name, 'url': url, 'remarks': '磁力链接' }) continue - + if ' ' in line: magnet_match = magnet_pattern.search(line) if magnet_match: @@ -1523,15 +1550,15 @@ def parse_magnet_file(self, file_path): if hash_match: name = f"磁力 {hash_match.group(1)[:8]}..." else: - name = f"磁力链接{len(items)+1}" - + name = f"磁力链接{len(items) + 1}" + items.append({ 'name': name, 'url': url, 'remarks': '磁力链接' }) continue - + magnet_match = magnet_pattern.search(line) if magnet_match: url = magnet_match.group(1) @@ -1539,44 +1566,44 @@ def parse_magnet_file(self, file_path): if hash_match: name = f"磁力 {hash_match.group(1)[:8]}..." else: - name = f"磁力链接{len(items)+1}" - + name = f"磁力链接{len(items) + 1}" + items.append({ 'name': name, 'url': url, 'remarks': '磁力链接' }) continue - + if line.startswith('magnet:'): items.append({ - 'name': f"磁力链接{len(items)+1}", + 'name': f"磁力链接{len(items) + 1}", 'url': line, 'remarks': '磁力链接' }) continue - + seen_urls = set() unique_items = [] for item in items: if item['url'] not in seen_urls: seen_urls.add(item['url']) unique_items.append(item) - + print(f"✅ 磁力链接文件解析完成: {os.path.basename(file_path)}, 共 {len(unique_items)} 条有效链接") return unique_items - + except Exception as e: print(f"解析磁力链接文件错误: {e}") return [] - + def is_playable_url(self, url): u = str(url).lower().strip() if not u: return False - + protocols = [ - 'http://', 'https://', 'rtmp://', 'rtsp://', 'udp://', 'rtp://', + 'http://', 'https://', 'rtmp://', 'rtsp://', 'udp://', 'rtp://', 'file://', 'pics://', 'magnet:', 'ed2k://', 'thunder://', 'ftp://', 'vod://', 'bilibili://', 'youtube://', 'rtmps://', 'rtmpt://', 'hls://', 'http-live://', 'https-live://', @@ -1585,19 +1612,19 @@ def is_playable_url(self, url): for p in protocols: if u.startswith(p): return True - + exts = [ - '.mp4', '.mkv', '.avi', '.rmvb', '.mov', '.wmv', '.flv', - '.m3u8', '.ts', '.mp3', '.m4a', '.aac', '.flac', '.wav', + '.mp4', '.mkv', '.avi', '.rmvb', '.mov', '.wmv', '.flv', + '.m3u8', '.ts', '.mp3', '.m4a', '.aac', '.flac', '.wav', '.webm', '.ogg', '.m4v', '.f4v', '.3gp', '.mpg', '.mpeg', '.m3u', '.pls', '.asf', '.asx', '.wmx' ] for e in exts: if e in u: return True - + patterns = [ - 'youtu.be/', 'youtube.com/', 'bilibili.com/', 'iqiyi.com/', + 'youtu.be/', 'youtube.com/', 'bilibili.com/', 'iqiyi.com/', 'v.qq.com/', 'youku.com/', 'tudou.com/', 'mgtv.com/', 'sohu.com/', 'acfun.cn/', 'douyin.com/', 'kuaishou.com/', 'huya.com/', 'douyu.com/', 'twitch.tv/', 'live.' @@ -1605,26 +1632,26 @@ def is_playable_url(self, url): for p in patterns: if p in u: return True - + return False - + def count_vod_episodes(self, play_url_raw): """统计剧集数量""" raw = str(play_url_raw).strip() if not raw: return 0 - + groups = [g.strip() for g in raw.split('$$$') if g.strip()] if not groups: groups = [raw] - + total = 0 for group in groups: episodes = [e.strip() for e in group.split('#') if e.strip()] total += len(episodes) - + return max(1, total) - + def get_file_icon(self, ext, is_dir=False): if is_dir: return '📁' @@ -1643,67 +1670,218 @@ def get_file_icon(self, ext, is_dir=False): if ext in self.magnet_exts: return '🧲' return '📄' - - # ==================== 歌词获取 ==================== - - def find_local_lrc(self, audio_path): - """查找同文件夹内的同名歌词文件""" - audio_dir = os.path.dirname(audio_path) - audio_name = os.path.splitext(os.path.basename(audio_path))[0] - - # 收集目录内所有歌词文件 - lrc_files = self.collect_lrc_in_dir(audio_dir) - - # 匹配规则 - for lrc in lrc_files: - lrc_name = os.path.splitext(lrc['name'])[0] - - # 规则1: 完全匹配 - if lrc_name == audio_name: + + # ==================== 精确歌词解码(增强版)==================== + + def _is_valid_lyrics(self, text): + """简单验证是否为有效歌词""" + if not text or len(text) < 20: # 太短的不可能是歌词 + return False + + # 检查是否包含常见歌词标记 + lyrics_markers = ['[ti:', '[ar:', '[al:', '[by:', '[00:', '[01:', '[02:', + '作词', '作曲', '编曲', '演唱', '歌词'] + + for marker in lyrics_markers: + if marker in text: + return True + + # 检查是否包含常见时间标签格式 [mm:ss.xx] + if re.search(r'\[\d{2}:\d{2}\.\d{2,}\]', text): + return True + + # 如果包含较多中文且有一定长度,也可能是歌词 + chinese_count = sum(1 for c in text if '\u4e00' <= c <= '\u9fff') + if chinese_count > 10 and len(text) > 100: + return True + + return False + + def decode_lyrics_data(self, data): + """专门解码歌词数据 - 增强版:确保不阻断流程""" + if not data: + return None + + # 重新排序编码优先级(UTF-8优先) + encodings = [ + ('utf-8', '尝试 UTF-8'), + ('gbk', '尝试 GBK'), + ('gb18030', '尝试 GB18030'), + ('gb2312', '尝试 GB2312'), + ('big5', '尝试 Big5'), + ('utf-16', '尝试 UTF-16'), + ('utf-16le', '尝试 UTF-16LE'), + ('utf-16be', '尝试 UTF-16BE'), + ] + + # 记录尝试过的编码和结果 + all_attempts = [] + + for enc, desc in encodings: + try: + decoded = data.decode(enc) + # 验证解码结果是否合理(包含常见歌词字符) + if self._is_valid_lyrics(decoded): + print(f"✅ 使用 {desc} 解码成功") + return decoded + else: + # 虽然解码成功但内容可能不是有效歌词,记录下来备用 + all_attempts.append((enc, decoded)) + print(f"⚠️ {desc} 解码成功但内容异常,长度: {len(decoded)}") + except Exception as e: + continue + + # 如果所有编码都失败,但至少有一个解码成功(即使内容可能异常) + if all_attempts: + # 选择解码结果最长的(通常歌词内容较长) + best_attempt = max(all_attempts, key=lambda x: len(x[1])) + print(f"⚠️ 使用备选解码 {best_attempt[0]},内容可能不完整") + return best_attempt[1] + + # 实在不行,尝试强制解码(忽略错误) + try: + forced = data.decode('utf-8', errors='ignore') + if len(forced) > 50: # 至少有一定长度 + print(f"⚠️ 使用强制 UTF-8 解码(忽略错误)") + return forced + except: + pass + + return None + + def extract_mp3_lyrics(self, file_path): + """提取 MP3 文件的歌词""" + try: + with open(file_path, 'rb') as f: + data = f.read() + + # 查找 USLT 帧 + uslt_pos = data.find(b'USLT') + if uslt_pos < 0: + return None + + pos = uslt_pos + 4 + if pos + 6 > len(data): + return None + + # 读取帧大小 + size = int.from_bytes(data[pos:pos + 4], 'big') + pos += 6 # 跳过大小和标志 + + if pos >= len(data): + return None + + # 读取编码(1字节) + encoding = data[pos] + pos += 1 + + # 跳过语言(3字节) + pos += 3 + + # 跳过内容描述符 + while pos < len(data) and data[pos] != 0: + pos += 1 + pos += 1 # 跳过空字节 + + # 读取歌词内容 + if pos + size - 10 > len(data): + return None + + lyric_data = data[pos:pos + size - 10] + + # 根据编码标志尝试解码 + if encoding == 1: # UTF-16 + return self.decode_lyrics_data(lyric_data) + elif encoding == 2: # UTF-16BE + return self.decode_lyrics_data(lyric_data) + elif encoding == 3: # UTF-8 + return self.decode_lyrics_data(lyric_data) + else: + # 未知编码,尝试所有可能 + return self.decode_lyrics_data(lyric_data) + + except Exception as e: + self.log(f"MP3提取失败: {e}") + return None + + def extract_flac_lyrics(self, file_path): + """提取 FLAC 文件的歌词""" + try: + with open(file_path, 'rb') as f: + data = f.read() + + # 查找 LYRICS 字段 + lyrics_pos = data.find(b'LYRICS') + if lyrics_pos < 0: + lyrics_pos = data.find(b'DESCRIPTION') + + if lyrics_pos < 0: + return None + + # 提取歌词数据 + pos = lyrics_pos + while pos < len(data) and data[pos] != 0: + pos += 1 + pos += 1 + + # 找下一个字段或文件结尾 + end = pos + while end < len(data): + if data[end] == 0 and end + 4 < len(data): + # 检查是否是新字段开始 + next_bytes = data[end + 1:end + 5] + if next_bytes in [b'LYRI', b'DESC', b'COMM', b'TITL']: + break + end += 1 + + if pos < end: + lyric_data = data[pos:end] + return self.decode_lyrics_data(lyric_data) + + except Exception as e: + self.log(f"FLAC提取失败: {e}") + return None + + def find_local_lrc(self, audio_path): + """查找同文件夹内的同名歌词文件""" + audio_dir = os.path.dirname(audio_path) + audio_name = os.path.splitext(os.path.basename(audio_path))[0] + + # 收集目录内所有歌词文件 + lrc_files = self.collect_lrc_in_dir(audio_dir) + + # 匹配规则 + for lrc in lrc_files: + lrc_name = os.path.splitext(lrc['name'])[0] + + # 规则1: 完全匹配 + if lrc_name == audio_name: print(f"✅ 找到同名歌词: {lrc['path']}") return lrc['path'] - + # 规则2: 忽略大小写匹配 if lrc_name.lower() == audio_name.lower(): print(f"✅ 找到忽略大小写匹配歌词: {lrc['path']}") return lrc['path'] - - # 规则3: 音频文件名包含歌词文件名 - if audio_name.lower().find(lrc_name.lower()) != -1: - print(f"✅ 找到包含匹配歌词: {lrc['path']}") - return lrc['path'] - - # 规则4: 歌词文件名包含音频文件名 - if lrc_name.lower().find(audio_name.lower()) != -1: - print(f"✅ 找到被包含匹配歌词: {lrc['path']}") - return lrc['path'] - + return None - + def read_lrc_file(self, lrc_path): """读取歌词文件""" try: - # 尝试多种编码 - encodings = ['utf-8', 'gbk', 'gb2312', 'big5', 'utf-16'] - for encoding in encodings: - try: - with open(lrc_path, 'r', encoding=encoding, errors='ignore') as f: - content = f.read() - if content and len(content) > 10: - print(f"✅ 读取歌词文件成功: {lrc_path} (编码: {encoding})") - return content - except: - continue + with open(lrc_path, 'rb') as f: + data = f.read() + + return self.decode_lyrics_data(data) + except Exception as e: print(f"读取歌词文件失败: {e}") return None - + def clean_filename(self, filename): """清理文件名,移除常见干扰字符""" - # 移除文件扩展名 name = os.path.splitext(filename)[0] - - # 常见干扰模式 + patterns = [ r'【.*?】', r'\[.*?\]', r'\(.*?\)', r'\{.*?\}', r'(.*?)', r'\-? ?\d{3,4}kbps', r'\-? ?\d{3,4}Kbps', r'\-? ?\d{3,4}K', @@ -1712,42 +1890,34 @@ def clean_filename(self, filename): r'\-? ?320k', r'\-? ?128k', r'\-? ?192k', r'\-? ?歌词版', r'\-? ?伴奏版', r'\-? ?纯音乐', r'\-? ?Live', r'\-? ?现场版', r'\-? ?演唱会', - r'\-? ?官方版', r'\-? ?MV版', r'\-? ?电影原声', - r'\-? ?电视剧原声', r'\-? ?主题曲', r'\-? ?片尾曲', - r'\-? ?插曲', r'\-? ?背景音乐', r'\-? ?BGM' ] - + for pattern in patterns: name = re.sub(pattern, '', name) - - # 移除多余的空格 + name = re.sub(r'\s+', ' ', name).strip() - return name - + def extract_song_info(self, filename): """从文件名提取歌手和歌曲名""" - # 清理文件名 name = self.clean_filename(filename) - + artist = "" song = name - - # 常见分隔符 + separators = [ r'\s+-\s+', r'-\s+', r'\s+-', r'·', r'•', r'–', r'—', r':', r':', r'、', r'/', r'/' ] - + for sep in separators: parts = re.split(sep, name, maxsplit=1) if len(parts) == 2: left = parts[0].strip() right = parts[1].strip() - - # 判断哪边更可能是歌手 - left_is_artist = len(left) < 30 and len(left) > 1 and not re.search(r'[《》〈〉『』〔〕]', left) - right_is_artist = len(right) < 30 and len(right) > 1 and not re.search(r'[《》〈〉『』〔〕]', right) - + + left_is_artist = len(left) < 30 and len(left) > 1 + right_is_artist = len(right) < 30 and len(right) > 1 + if left_is_artist and not right_is_artist: artist = left song = right @@ -1755,7 +1925,6 @@ def extract_song_info(self, filename): artist = right song = left elif left_is_artist and right_is_artist: - # 两边都可能是歌手,取较短的 if len(left) < len(right): artist = left song = right @@ -1763,108 +1932,346 @@ def extract_song_info(self, filename): artist = right song = left else: - # 默认取左边 artist = left song = right break - - # 清理歌曲名中的特殊符号 + song = re.sub(r'[《》〈〉『』〔〕]', '', song).strip() - - # 如果歌曲名太短,使用原文件名 - if len(song) < 2 or song.isdigit(): - song = filename - + return artist, song - + def get_lrc_for_audio(self, file_path): - """为音频文件获取歌词 - 优先使用同文件夹歌词""" + """为音频文件获取歌词 - 增强调试版 + 更多歌词源""" filename = os.path.basename(file_path) - - # 第一步:查找同文件夹内的同名歌词文件 - local_lrc_path = self.find_local_lrc(file_path) - if local_lrc_path: - lrc_content = self.read_lrc_file(local_lrc_path) + ext = self.get_file_ext(file_path).lower() + + print(f"\n{'=' * 60}") + print(f"🎵 [歌词获取] 开始处理: {filename}") + print(f"{'=' * 60}") + + cache_key = hashlib.md5(f"audio_{file_path}".encode()).hexdigest() + + if cache_key in self.lrc_cache: + print(f"📦 [缓存命中] 使用缓存的歌词: {filename}") + return self.lrc_cache[cache_key] + + # 从文件名提取歌手和歌曲名(用于网络搜索) + artist, song = self.extract_song_info(filename) + print(f"📝 [文件名解析] 歌手='{artist}', 歌曲='{song}'") + + # ===== 第一步:网络搜索(最优先)===== + if artist or song: # 只要有歌手或歌曲名就尝试搜索 + net_cache_key = hashlib.md5(f"{artist}_{song}".encode()).hexdigest() + + if net_cache_key in self.lrc_cache: + print(f"📦 [网络缓存命中] {artist} - {song}") + self.lrc_cache[cache_key] = self.lrc_cache[net_cache_key] + return self.lrc_cache[net_cache_key] + + print(f"\n🌐 [网络搜索] 开始搜索歌词...") + print(f" ├─ 歌手: {artist}") + print(f" └─ 歌曲: {song}") + + # 尝试多个歌词源 + lrc_content = None + + # 源1: 网易云音乐 + print(f"\n [源1] 尝试网易云音乐...") + lrc_content = self._netease_search(artist, song) if lrc_content: - print(f"✅ 使用本地歌词: {local_lrc_path}") - cache_key = hashlib.md5(f"local_{file_path}".encode()).hexdigest() + print(f" ✅ 网易云音乐成功!") + self.lrc_cache[net_cache_key] = lrc_content self.lrc_cache[cache_key] = lrc_content return lrc_content - - # 第二步:检查是否存在同名的.lrc文件 + + # 源2: QQ音乐 + print(f"\n [源2] 尝试QQ音乐...") + lrc_content = self._qq_search(artist, song) + if lrc_content: + print(f" ✅ QQ音乐成功!") + self.lrc_cache[net_cache_key] = lrc_content + self.lrc_cache[cache_key] = lrc_content + return lrc_content + + # 源3: 尝试只用歌曲名搜索网易云 + if artist: + print(f"\n [源3] 尝试只用歌曲名搜索网易云: {song}") + lrc_content = self._netease_search("", song) + if lrc_content: + print(f" ✅ 网易云成功 (仅歌曲名)!") + self.lrc_cache[net_cache_key] = lrc_content + self.lrc_cache[cache_key] = lrc_content + return lrc_content + + # 源4: 尝试只用歌曲名搜索QQ音乐 + if artist: + print(f"\n [源4] 尝试只用歌曲名搜索QQ音乐: {song}") + lrc_content = self._qq_search("", song) + if lrc_content: + print(f" ✅ QQ音乐成功 (仅歌曲名)!") + self.lrc_cache[net_cache_key] = lrc_content + self.lrc_cache[cache_key] = lrc_content + return lrc_content + + print(f"\n ❌ 所有网络源都失败了") + + # ===== 第二步:查找本地.lrc文件 ===== + print(f"\n📁 [本地搜索] 查找本地歌词文件...") + + # 查找同名的.lrc文件 lrc_path = os.path.splitext(file_path)[0] + '.lrc' if os.path.exists(lrc_path): - try: - with open(lrc_path, 'r', encoding='utf-8', errors='ignore') as f: - lrc_content = f.read() - if '[ti:' in lrc_content or '[ar:' in lrc_content or re.search(r'\[\d{2}:\d{2}', lrc_content): - print(f"✅ 找到标准同名歌词: {lrc_path}") - cache_key = hashlib.md5(f"local_{file_path}".encode()).hexdigest() - self.lrc_cache[cache_key] = lrc_content - return lrc_content - except: - pass - - # 第三步:提取歌曲信息,用于网络搜索 - artist, song = self.extract_song_info(filename) - - # 生成缓存键 - cache_key = hashlib.md5(f"{artist}_{song}".encode()).hexdigest() - - # 检查网络歌词缓存 - if cache_key in self.lrc_cache: - print(f"📦 使用缓存网络歌词: {artist} - {song}") - return self.lrc_cache[cache_key] - - print(f"🎵 搜索网络歌词: 歌手='{artist}', 歌曲='{song}'") - - # 获取网络歌词 - lrc_content = self._search_lrc(artist, song) - - if lrc_content: - self.lrc_cache[cache_key] = lrc_content - return lrc_content - - # 尝试只用歌曲名搜索 - if artist: - print(f"🎵 尝试只用歌曲名搜索: {song}") - lrc_content = self._search_lrc("", song) + print(f" ├─ 找到同名歌词: {lrc_path}") + lrc_content = self.read_lrc_file(lrc_path) + if lrc_content: + print(f" ✅ 读取成功! 长度: {len(lrc_content)} 字符") + self.lrc_cache[cache_key] = lrc_content + return lrc_content + else: + print(f" ⚠️ 读取失败") + + # 查找同文件夹内的其他歌词文件 + local_lrc_path = self.find_local_lrc(file_path) + if local_lrc_path: + print(f" ├─ 找到本地歌词: {local_lrc_path}") + lrc_content = self.read_lrc_file(local_lrc_path) if lrc_content: + print(f" ✅ 读取成功! 长度: {len(lrc_content)} 字符") self.lrc_cache[cache_key] = lrc_content return lrc_content - - print(f"❌ 未找到歌词: {filename}") + + print(f" ❌ 未找到本地歌词文件") + + # ===== 第三步:尝试从文件内容提取内嵌歌词(最后)===== + print(f"\n💾 [内置歌词] 尝试提取内嵌歌词...") + embedded_lyrics = None + + if ext == 'mp3': + print(f" ├─ 文件格式: MP3") + embedded_lyrics = self.extract_mp3_lyrics(file_path) + elif ext == 'flac': + print(f" ├─ 文件格式: FLAC") + embedded_lyrics = self.extract_flac_lyrics(file_path) + else: + print(f" ├─ 文件格式: {ext} (不支持内置歌词)") + + if embedded_lyrics: + print(f" ✅ 内置歌词提取成功! 长度: {len(embedded_lyrics)} 字符") + self.lrc_cache[cache_key] = embedded_lyrics + return embedded_lyrics + else: + print(f" ❌ 未找到内置歌词或提取失败") + + print(f"\n❌ [最终结果] 未找到任何歌词: {filename}") + print(f"{'=' * 60}\n") + return None + + def _netease_search(self, artist, song): + """增强版网易云音乐搜索""" + keyword = f"{artist} {song}".strip() + if not keyword: + return None + + print(f" ├─ 搜索关键词: {keyword}") + + try: + # 第一步:搜索歌曲 + url = "https://music.163.com/api/search/get/web" + headers = { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", + "Referer": "https://music.163.com/", + "Content-Type": "application/x-www-form-urlencoded" + } + data = { + "s": keyword, + "type": 1, + "offset": 0, + "limit": 5 # 增加返回数量 + } + + import urllib.parse + data_str = urllib.parse.urlencode(data) + + resp = self.session.post(url, data=data_str, headers=headers, timeout=8) + print(f" ├─ 搜索状态码: {resp.status_code}") + + if resp.status_code == 200: + result = resp.json() + if result['code'] == 200 and result['result']['songCount'] > 0: + songs = result['result']['songs'] + print(f" ├─ 找到 {len(songs)} 首歌曲") + + for idx, song in enumerate(songs[:3]): # 尝试前3首 + song_name = song['name'] + song_id = song['id'] + artists = [a['name'] for a in song['artists']] + print(f" ├─ 候选{idx + 1}: {song_name} - {', '.join(artists)}") + + # 第二步:获取歌词 + lrc_url = "https://music.163.com/api/song/lyric" + params = { + "id": song_id, + "lv": 1, + "kv": 1 + } + + lrc_resp = self.session.get(lrc_url, params=params, headers=headers, timeout=5) + if lrc_resp.status_code == 200: + lrc_data = lrc_resp.json() + if 'lrc' in lrc_data and lrc_data['lrc']['lyric']: + lrc = lrc_data['lrc']['lyric'] + if len(lrc) > 50: # 至少有一定长度 + print(f" ├─ 歌词获取成功! 长度: {len(lrc)}") + return lrc + else: + print(f" ├─ 歌词太短: {len(lrc)}字符") + else: + print(f" ├─ 歌词请求失败: {lrc_resp.status_code}") + else: + print(f" ├─ 未找到歌曲, code={result['code']}") + else: + print(f" ├─ 请求失败: {resp.status_code}") + + except Exception as e: + print(f" ├─ 异常: {e}") + return None - - def _search_lrc(self, artist, song): - """搜索歌词""" - # 构建搜索关键词 - keywords = [] - if artist: - keywords.append(artist) - if song: - keywords.append(song) - - keyword = ' '.join(keywords) + + def _qq_search(self, artist, song): + """增强版QQ音乐搜索""" + keyword = f"{artist} {song}".strip() if not keyword: return None - - # 1. 尝试网易云音乐 - lrc = self._netease_search(keyword) - if lrc: - return lrc - - # 2. 尝试QQ音乐 - lrc = self._qq_search(keyword) - if lrc: - return lrc - + + print(f" ├─ 搜索关键词: {keyword}") + + try: + # 第一步:搜索歌曲 + search_url = "https://c.y.qq.com/soso/fcgi-bin/client_search_cp" + params = { + "w": keyword, + "format": "json", + "p": 1, + "n": 5, # 增加返回数量 + "platform": "h5", + "needNewCode": 1 + } + headers = { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", + "Referer": "https://y.qq.com/", + "Origin": "https://y.qq.com" + } + + resp = self.session.get(search_url, params=params, headers=headers, timeout=8) + print(f" ├─ 搜索状态码: {resp.status_code}") + + if resp.status_code == 200: + data = resp.json() + if data['code'] == 0 and data['data']['song']['list']: + songs = data['data']['song']['list'] + print(f" ├─ 找到 {len(songs)} 首歌曲") + + for idx, song in enumerate(songs[:3]): # 尝试前3首 + song_name = song['songname'] + song_mid = song['songmid'] + singers = [s['name'] for s in song['singer']] + print(f" ├─ 候选{idx + 1}: {song_name} - {', '.join(singers)}") + + # 第二步:获取歌词 + lrc_url = "https://c.y.qq.com/lyric/fcgi-bin/fcg_query_lyric_new.fcg" + params = { + "songmid": song_mid, + "format": "json", + "platform": "yqq", + "needNewCode": 0 + } + + # QQ音乐需要特定的Referer + lrc_headers = headers.copy() + lrc_headers["Referer"] = "https://y.qq.com/portal/player.html" + + lrc_resp = self.session.get(lrc_url, params=params, headers=lrc_headers, timeout=5) + if lrc_resp.status_code == 200: + text = lrc_resp.text + # QQ音乐返回的是JSONP格式,需要提取JSON + match = re.search(r'({.*})', text) + if match: + lrc_data = json.loads(match.group(1)) + if 'lyric' in lrc_data and lrc_data['lyric']: + lrc = base64.b64decode(lrc_data['lyric']).decode('utf-8') + if len(lrc) > 50: + print(f" ├─ 歌词获取成功! 长度: {len(lrc)}") + return lrc + else: + print(f" ├─ 歌词太短: {len(lrc)}字符") + else: + print(f" ├─ 歌词请求失败: {lrc_resp.status_code}") + else: + print(f" ├─ 未找到歌曲, code={data['code']}") + else: + print(f" ├─ 请求失败: {resp.status_code}") + + except Exception as e: + print(f" ├─ 异常: {e}") + return None - - def _netease_search(self, keyword): - """网易云音乐搜索""" + + # ==================== 新增:获取歌曲海报 ==================== + + def _get_song_poster(self, artist, song): + """获取歌曲海报""" + cache_key = hashlib.md5(f"{artist}_{song}".encode()).hexdigest() + + # 检查缓存 + if cache_key in self.poster_cache: + self.log(f"📦 使用缓存海报: {artist} - {song}") + return self.poster_cache[cache_key] + + # 如果没有歌手信息,尝试只用歌曲名 + if not artist: + return self._search_poster("", song) + + # 优先尝试网易云音乐 + poster = self._netease_poster(artist, song) + if poster: + self.poster_cache[cache_key] = poster + return poster + + # 尝试QQ音乐 + poster = self._qq_poster(artist, song) + if poster: + self.poster_cache[cache_key] = poster + return poster + + # 最后尝试只用歌曲名 + poster = self._search_poster("", song) + if poster: + self.poster_cache[cache_key] = poster + return poster + + return None + + def _search_poster(self, artist, song): + """通用海报搜索""" + # 尝试网易云 + poster = self._netease_poster(artist, song) + if poster: + return poster + + # 尝试QQ音乐 + poster = self._qq_poster(artist, song) + if poster: + return poster + + return None + + def _netease_poster(self, artist, song): + """网易云音乐获取海报""" try: - # 搜索 + keyword = f"{artist} {song}".strip() + if not keyword: + return None + url = "https://music.163.com/api/search/get/web" headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", @@ -1876,40 +2283,37 @@ def _netease_search(self, keyword): "offset": 0, "limit": 3 } - + resp = self.session.post(url, data=data, headers=headers, timeout=5) if resp.status_code == 200: result = resp.json() if result['code'] == 200 and result['result']['songs']: - # 取第一个结果 - song = result['result']['songs'][0] - song_id = song['id'] - - # 获取歌词 - lrc_url = "https://music.163.com/api/song/lyric" - params = { - "id": song_id, - "lv": 1, - "kv": 1 - } - - lrc_resp = self.session.get(lrc_url, params=params, headers=headers, timeout=5) - if lrc_resp.status_code == 200: - lrc_data = lrc_resp.json() - if 'lrc' in lrc_data and lrc_data['lrc']['lyric']: - lrc = lrc_data['lrc']['lyric'] - if len(lrc) > 100: - print(f"✅ 网易云获取成功: {song['name']}") - return lrc + song_data = result['result']['songs'][0] + + # 获取专辑图片 + if 'album' in song_data and 'picUrl' in song_data['album']: + pic_url = song_data['album']['picUrl'] + self.log(f"✅ 网易云获取海报成功: {pic_url}") + return pic_url + + # 尝试获取艺术家图片 + if 'artists' in song_data and song_data['artists']: + artist_data = song_data['artists'][0] + if 'picUrl' in artist_data and artist_data['picUrl']: + return artist_data['picUrl'] except Exception as e: - print(f"网易云搜索异常: {e}") + self.log(f"网易云海报获取异常: {e}") return None - - def _qq_search(self, keyword): - """QQ音乐搜索""" + + def _qq_poster(self, artist, song): + """QQ音乐获取海报""" try: - # 搜索 - url = "https://c.y.qq.com/soso/fcgi-bin/client_search_cp" + keyword = f"{artist} {song}".strip() + if not keyword: + return None + + # 搜索歌曲 + search_url = "https://c.y.qq.com/soso/fcgi-bin/client_search_cp" params = { "w": keyword, "format": "json", @@ -1920,42 +2324,35 @@ def _qq_search(self, keyword): "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", "Referer": "https://y.qq.com/" } - - resp = self.session.get(url, params=params, headers=headers, timeout=5) + + resp = self.session.get(search_url, params=params, headers=headers, timeout=5) if resp.status_code == 200: data = resp.json() if data['code'] == 0 and data['data']['song']['list']: - # 取第一个结果 - song = data['data']['song']['list'][0] - song_mid = song['songmid'] - - # 获取歌词 - lrc_url = "https://c.y.qq.com/lyric/fcgi-bin/fcg_query_lyric_new.fcg" - params = { - "songmid": song_mid, - "format": "json" - } - - lrc_resp = self.session.get(lrc_url, params=params, headers=headers, timeout=5) - if lrc_resp.status_code == 200: - text = lrc_resp.text - match = re.search(r'({.*})', text) - if match: - lrc_data = json.loads(match.group(1)) - if 'lyric' in lrc_data and lrc_data['lyric']: - lrc = base64.b64decode(lrc_data['lyric']).decode('utf-8') - if len(lrc) > 100: - print(f"✅ QQ音乐获取成功: {song['name']}") - return lrc + song_data = data['data']['song']['list'][0] + + # 获取专辑图片(QQ音乐使用albummid) + if 'albummid' in song_data: + album_mid = song_data['albummid'] + # QQ音乐图片规格:300x300 + pic_url = f"https://y.gtimg.cn/music/photo_new/T002R300x300M000{album_mid}.jpg" + self.log(f"✅ QQ音乐获取海报成功: {pic_url}") + return pic_url + + # 备用方案:使用专辑ID + if 'albumid' in song_data: + album_id = song_data['albumid'] + pic_url = f"https://imgcache.qq.com/music/photo/album/{album_id}/albumpic_{album_id}_0.jpg" + return pic_url except Exception as e: - print(f"QQ音乐搜索异常: {e}") + self.log(f"QQ音乐海报获取异常: {e}") return None - + # ==================== 首页分类 ==================== - + def homeContent(self, filter): classes = [] - + for i, path in enumerate(self.root_paths): if os.path.exists(path): name = self.path_to_chinese.get(path, os.path.basename(path.rstrip('/')) or f'目录{i}') @@ -1963,29 +2360,26 @@ def homeContent(self, filter): "type_id": f"root_{i}", "type_name": name }) - + classes.append({"type_id": "recent", "type_name": "最近添加"}) classes.append({ "type_id": self.live_category_id, "type_name": self.live_category_name }) - + return {'class': classes} - + # ==================== 分类内容 ==================== - + def categoryContent(self, tid, pg, filter, extend): pg = int(pg) - - # 处理在线直播大分类 + if tid == self.live_category_id: return self._live_category_content(pg) - - # 处理最近添加 + if tid == 'recent': return self._recent_content(pg) - - # 解析真实路径 + path = tid if tid.startswith('root_'): idx = int(tid[5:]) @@ -1996,27 +2390,22 @@ def categoryContent(self, tid, pg, filter, extend): path = self.b64u_decode(tid[len(self.FOLDER_PREFIX):]) else: return {'list': [], 'page': pg, 'pagecount': 1} - - # 检查是否是目录 + if not os.path.exists(path) or not os.path.isdir(path): return {'list': [], 'page': pg, 'pagecount': 1} - + files = self.scan_directory(path) total = len(files) - - # 分页 + per_page = 50 start = (pg - 1) * per_page end = min(start + per_page, total) page_files = files[start:end] - + vlist = [] - - # ===== 返回上一级逻辑 - 只在二级及更深目录显示 ===== - # 获取当前路径的父目录 + + # 返回上一级 parent = os.path.dirname(path) - - # 检查当前目录是否是根目录之一 is_root = False for root in self.root_paths: root_norm = os.path.normpath(root.rstrip('/')) @@ -2024,13 +2413,10 @@ def categoryContent(self, tid, pg, filter, extend): if path_norm == root_norm: is_root = True break - - # 只在非根目录且父目录存在时显示返回上一级 + if not is_root and parent and parent != path: - # 检查父目录是否是根目录之一 parent_is_root = False root_index = -1 - for i, root in enumerate(self.root_paths): root_norm = os.path.normpath(root.rstrip('/')) parent_norm = os.path.normpath(parent) @@ -2038,21 +2424,14 @@ def categoryContent(self, tid, pg, filter, extend): parent_is_root = True root_index = i break - - # 生成返回的ID + if parent_is_root and root_index >= 0: - # 如果是根目录,使用 root_ 前缀 parent_id = f"root_{root_index}" - # 获取根目录的中文名称 parent_name = self.path_to_chinese.get(self.root_paths[root_index], os.path.basename(parent)) else: - # 普通目录使用 folder 前缀 parent_id = self.FOLDER_PREFIX + self.b64u_encode(parent) - # 获取目录名 parent_name = os.path.basename(parent) - - self.log(f"返回上一级: {path} -> {parent} (显示名称: {parent_name})") - + vlist.append({ 'vod_id': parent_id, 'vod_name': f'⬅️ 返回 {parent_name}', @@ -2061,13 +2440,9 @@ def categoryContent(self, tid, pg, filter, extend): 'vod_tag': 'folder', 'style': {'type': 'list'} }) - else: - self.log(f"当前是根目录,不显示返回上一级: {path}") - # ===== 返回上一级逻辑结束 ===== - - # 第一页添加连播功能 + + # 第一页添加连播 if pg == 1: - # 视频连播 videos = self.collect_videos_in_dir(path) if videos: vlist.append({ @@ -2078,8 +2453,7 @@ def categoryContent(self, tid, pg, filter, extend): 'vod_tag': 'video_playlist', 'style': {'type': 'list'} }) - - # 音频连播 + audios = self.collect_audios_in_dir(path) if audios: vlist.append({ @@ -2090,8 +2464,7 @@ def categoryContent(self, tid, pg, filter, extend): 'vod_tag': 'audio_playlist', 'style': {'type': 'list'} }) - - # 图片连播 + images = self.collect_images_in_dir(path) if images: vlist.append({ @@ -2102,11 +2475,11 @@ def categoryContent(self, tid, pg, filter, extend): 'vod_tag': 'image_playlist', 'style': {'type': 'list'} }) - + # 文件列表 for f in page_files: icon = self.get_file_icon(f['ext'], f['is_dir']) - + if f['is_dir']: vod_id = self.FOLDER_PREFIX + self.b64u_encode(f['path']) remarks = '文件夹' @@ -2216,9 +2589,9 @@ def categoryContent(self, tid, pg, filter, extend): 'vod_tag': vod_tag, 'style': {'type': 'list'} } - + vlist.append(item) - + return { 'list': vlist, 'page': pg, @@ -2226,29 +2599,29 @@ def categoryContent(self, tid, pg, filter, extend): 'limit': per_page, 'total': total } - + def _recent_content(self, pg): pg = int(pg) all_files = [] - + camera_path = '/storage/emulated/0/DCIM/Camera/' scan_paths = list(self.root_paths) if camera_path not in scan_paths and os.path.exists(camera_path): scan_paths.append(camera_path) - + for path in scan_paths: if not os.path.exists(path): continue self._scan_files_recursive(path, all_files, max_depth=2) - + all_files.sort(key=lambda x: x['mtime'], reverse=True) all_files = all_files[:100] - + per_page = 50 start = (pg - 1) * per_page end = min(start + per_page, len(all_files)) page_files = all_files[start:end] - + import time vlist = [] for f in page_files: @@ -2284,11 +2657,11 @@ def _recent_content(self, pg): icon = '📄' type_name = '文件' icon_type = 'file' - + mtime = f['mtime'] now = time.time() diff = now - mtime - + if diff < 3600: minutes = int(diff / 60) remarks = f"{minutes}分钟前" @@ -2297,9 +2670,9 @@ def _recent_content(self, pg): remarks = f"{hours}小时前" else: remarks = time.strftime('%m-%d %H:%M', time.localtime(mtime)) - + vod_id = f['path'] - + if self.is_image_file(f['ext']): vod_id = self.URL_B64U_PREFIX + self.b64u_encode(f"{self.PICS_PREFIX}file://{f['path']}") item = { @@ -2315,7 +2688,7 @@ def _recent_content(self, pg): vod_id = self.LIST_PREFIX + self.b64u_encode(f['path']) elif self.is_magnet_file(f['ext']): vod_id = self.MAGNET_PREFIX + self.b64u_encode(f['path']) - + item = { 'vod_id': vod_id, 'vod_name': f"{icon} {f['name']}", @@ -2324,9 +2697,9 @@ def _recent_content(self, pg): 'vod_tag': 'file', 'style': {'type': 'grid', 'ratio': 1} } - + vlist.append(item) - + return { 'list': vlist, 'page': pg, @@ -2334,29 +2707,29 @@ def _recent_content(self, pg): 'limit': per_page, 'total': len(all_files) } - + def _scan_files_recursive(self, path, file_list, max_depth=2, current_depth=0): if current_depth > max_depth: return - + try: if not os.path.exists(path): return - + for name in os.listdir(path): if name.startswith('.'): continue - + full_path = os.path.join(path, name) - + if os.path.isdir(full_path): self._scan_files_recursive(full_path, file_list, max_depth, current_depth + 1) else: ext = self.get_file_ext(name) - if (self.is_media_file(ext) or self.is_audio_file(ext) or - self.is_list_file(ext) or self.is_image_file(ext) or - self.is_db_file(ext) or self.is_magnet_file(ext)): - + if (self.is_media_file(ext) or self.is_audio_file(ext) or + self.is_list_file(ext) or self.is_image_file(ext) or + self.is_db_file(ext) or self.is_magnet_file(ext)): + mtime = os.path.getmtime(full_path) if time.time() - mtime < 7 * 24 * 3600: file_list.append({ @@ -2367,21 +2740,21 @@ def _scan_files_recursive(self, path, file_list, max_depth=2, current_depth=0): }) except Exception as e: print(f"扫描错误 {path}: {e}") - + def _scan_files_recursive_for_search(self, path, file_list, max_depth=3, current_depth=0): if current_depth > max_depth: return - + try: if not os.path.exists(path): return - + for name in os.listdir(path): if name.startswith('.'): continue - + full_path = os.path.join(path, name) - + if os.path.isdir(full_path): self._scan_files_recursive_for_search(full_path, file_list, max_depth, current_depth + 1) else: @@ -2394,43 +2767,43 @@ def _scan_files_recursive_for_search(self, path, file_list, max_depth=3, current }) except Exception as e: print(f"搜索扫描错误 {path}: {e}") - + # ==================== 详情页 ==================== - + def detailContent(self, ids): id_val = ids[0] self.log(f"详情页请求: {id_val}") - + if id_val.startswith(self.LIVE_PREFIX): encoded_data = id_val[len(self.LIVE_PREFIX):] source_id = self.b64u_decode(encoded_data) return self._live_source_detail(source_id) - + if id_val.startswith(self.FOLDER_PREFIX): folder_path = self.b64u_decode(id_val[len(self.FOLDER_PREFIX):]) if os.path.exists(folder_path) and os.path.isdir(folder_path): return self.categoryContent(folder_path, 1, None, None) else: return {'list': []} - + if id_val.startswith(self.PICS_PREFIX + 'slideshow/'): encoded = id_val[len(self.PICS_PREFIX + 'slideshow/'):] dir_path = self.b64u_decode(encoded) - + if not os.path.exists(dir_path) or not os.path.isdir(dir_path): return {'list': []} - + images = self.collect_images_in_dir(dir_path) - + if not images: return {'list': []} - + play_urls = [] for img in images: url = f"file://{img['path']}" name = os.path.splitext(img['name'])[0] play_urls.append(f"{name}${url}") - + return {'list': [{ 'vod_id': id_val, 'vod_name': f"📷 图片连播 - {os.path.basename(dir_path)} ({len(images)}张)", @@ -2439,16 +2812,16 @@ def detailContent(self, ids): 'vod_play_url': '#'.join(play_urls), 'style': {'type': 'list'} }]} - + if id_val.startswith(self.URL_B64U_PREFIX): decoded = self.b64u_decode(id_val[len(self.URL_B64U_PREFIX):]) if decoded and decoded.startswith(self.PICS_PREFIX): pics_data = decoded[len(self.PICS_PREFIX):] - + if '&&' in pics_data: pic_urls = pics_data.split('&&') play_urls = [] - + for url in pic_urls: if url.startswith('file://'): file_path = url[7:] @@ -2457,7 +2830,7 @@ def detailContent(self, ids): else: file_name = os.path.basename(url.split('?')[0]) or "图片" play_urls.append(f"{file_name}${url}") - + return {'list': [{ 'vod_id': id_val, 'vod_name': f'图片相册 ({len(pic_urls)}张)', @@ -2470,7 +2843,7 @@ def detailContent(self, ids): file_name = os.path.basename(pics_data.split('?')[0]) if pics_data.startswith('file://'): file_name = os.path.basename(pics_data[7:]) - + return {'list': [{ 'vod_id': id_val, 'vod_name': file_name, @@ -2479,25 +2852,25 @@ def detailContent(self, ids): 'vod_play_url': f"查看${pics_data}", 'style': {'type': 'list'} }]} - + if id_val.startswith(self.CAMERA_ALL_PREFIX): encoded = id_val[len(self.CAMERA_ALL_PREFIX):] dir_path = self.b64u_decode(encoded) - + if not os.path.exists(dir_path) or not os.path.isdir(dir_path): return {'list': []} - + images = self.collect_images_in_dir(dir_path) - + if not images: return {'list': []} - + play_urls = [] for img in images: url = f"file://{img['path']}" name = os.path.splitext(img['name'])[0] play_urls.append(f"{name}${url}") - + return {'list': [{ 'vod_id': id_val, 'vod_name': f"📷 相机照片 ({len(images)}张)", @@ -2506,16 +2879,16 @@ def detailContent(self, ids): 'vod_play_url': '#'.join(play_urls), 'style': {'type': 'list'} }]} - + if id_val.startswith(self.MAGNET_PREFIX): encoded = id_val[len(self.MAGNET_PREFIX):] file_path = self.b64u_decode(encoded) - + if not os.path.exists(file_path) or not os.path.isfile(file_path): return {'list': []} - + items = self.parse_magnet_file(file_path) - + if not items: try: with open(file_path, 'r', encoding='utf-8', errors='ignore') as f: @@ -2533,7 +2906,7 @@ def detailContent(self, ids): }]} except: pass - + return {'list': [{ 'vod_id': id_val, 'vod_name': os.path.basename(file_path), @@ -2542,16 +2915,16 @@ def detailContent(self, ids): 'vod_play_url': f"打开文件$file://{file_path}", 'style': {'type': 'list'} }]} - + play_urls = [] for idx, item in enumerate(items): - name = item.get('name', f'链接{idx+1}') + name = item.get('name', f'链接{idx + 1}') url = item.get('url', '').strip() - + if url and url.startswith('magnet:'): play_urls.append(f"{name}${url}") self.log(f"添加磁力链接: {name}") - + if not play_urls: return {'list': [{ 'vod_id': id_val, @@ -2561,10 +2934,10 @@ def detailContent(self, ids): 'vod_play_url': f"打开文件$file://{file_path}", 'style': {'type': 'list'} }]} - + play_url_str = '#'.join(play_urls) self.log(f"磁力链接播放串: {play_url_str[:200]}...") - + return {'list': [{ 'vod_id': id_val, 'vod_name': os.path.basename(file_path), @@ -2573,21 +2946,21 @@ def detailContent(self, ids): 'vod_play_url': play_url_str, 'style': {'type': 'list'} }]} - + if id_val.startswith(self.LIST_PREFIX): encoded = id_val[len(self.LIST_PREFIX):] file_path = self.b64u_decode(encoded) - + if not os.path.exists(file_path) or not os.path.isfile(file_path): return {'list': []} - + ext = self.get_file_ext(file_path) self.log(f"处理列表文件: {file_path}, 类型: {ext}") - + if ext in self.db_exts: items = self.parse_db_file(file_path) self.log(f"数据库解析到 {len(items)} 条记录") - + if not items: return {'list': [{ 'vod_id': id_val, @@ -2597,9 +2970,9 @@ def detailContent(self, ids): 'vod_play_url': f"播放$file://{file_path}", 'style': {'type': 'list'} }]} - + play_urls = self._build_play_urls(items) - + if not play_urls: return {'list': [{ 'vod_id': id_val, @@ -2609,10 +2982,10 @@ def detailContent(self, ids): 'vod_play_url': f"播放$file://{file_path}", 'style': {'type': 'list'} }]} - + play_url_str = '#'.join(play_urls) self.log(f"数据库播放串预览: {play_url_str[:200]}...") - + return {'list': [{ 'vod_id': id_val, 'vod_name': os.path.basename(file_path), @@ -2621,7 +2994,7 @@ def detailContent(self, ids): 'vod_play_url': play_url_str, 'style': {'type': 'list'} }]} - + items = [] if ext in ['m3u', 'm3u8']: items = self.parse_m3u_file(file_path) @@ -2632,7 +3005,7 @@ def detailContent(self, ids): elif ext == 'json': items = self.parse_json_file(file_path) self.log(f"JSON解析到 {len(items)} 条记录") - + if not items: url = f"file://{file_path}" name = os.path.splitext(os.path.basename(file_path))[0] @@ -2644,15 +3017,15 @@ def detailContent(self, ids): 'vod_play_url': f"{name}${url}", 'style': {'type': 'list'} }]} - + play_urls = self._build_play_urls(items) - + if not play_urls: return {'list': []} - + play_url_str = '#'.join(play_urls) self.log(f"播放串预览: {play_url_str[:200]}...") - + return {'list': [{ 'vod_id': id_val, 'vod_name': os.path.basename(file_path), @@ -2661,44 +3034,55 @@ def detailContent(self, ids): 'vod_play_url': play_url_str, 'style': {'type': 'list'} }]} - + if id_val.startswith(self.A_ALL_PREFIX): encoded = id_val[len(self.A_ALL_PREFIX):] dir_path = self.b64u_decode(encoded) audios = self.collect_audios_in_dir(dir_path) - + if not audios: return {'list': []} - + play_urls = [] for a in audios: url = f"file://{a['path']}" name = os.path.splitext(a['name'])[0] play_urls.append(f"{name}${url}") - + + # ===== 新增:尝试获取第一首歌曲的海报作为封面 ===== + poster = None + if audios: + filename = os.path.basename(audios[0]['path']) + artist, song = self.extract_song_info(filename) + self.log(f"🎵 获取连播封面: 歌手='{artist}', 歌曲='{song}'") + poster = self._get_song_poster(artist, song) + return {'list': [{ 'vod_id': id_val, 'vod_name': f"音频连播 - {os.path.basename(dir_path)} ({len(audios)}首)", - 'vod_pic': self.file_icons['audio_playlist'], + 'vod_pic': poster if poster else self.file_icons['audio_playlist'], # 优先使用获取到的海报 'vod_play_from': '本地音乐', 'vod_play_url': '#'.join(play_urls), 'style': {'type': 'list'} }]} - + if id_val.startswith(self.V_ALL_PREFIX): encoded = id_val[len(self.V_ALL_PREFIX):] dir_path = self.b64u_decode(encoded) videos = self.collect_videos_in_dir(dir_path) - + if not videos: return {'list': []} - + play_urls = [] for v in videos: url = f"file://{v['path']}" name = os.path.splitext(v['name'])[0] play_urls.append(f"{name}${url}") - + + # ===== 新增:尝试获取第一个视频的缩略图(如果有的话)===== + # 视频暂时无法获取海报,保持原有图标 + return {'list': [{ 'vod_id': id_val, 'vod_name': f"视频连播 - {os.path.basename(dir_path)} ({len(videos)}集)", @@ -2707,18 +3091,18 @@ def detailContent(self, ids): 'vod_play_url': '#'.join(play_urls), 'style': {'type': 'list'} }]} - + if not os.path.exists(id_val): self.log(f"路径不存在: {id_val}") return {'list': []} - + if os.path.isdir(id_val): return self.categoryContent(id_val, 1, None, None) - + name = os.path.basename(id_val) ext = self.get_file_ext(name) self.log(f"处理文件: {name}, 类型: {ext}") - + vod = { 'vod_id': id_val, 'vod_name': name, @@ -2726,7 +3110,7 @@ def detailContent(self, ids): 'vod_play_url': '', 'style': {'type': 'list'} } - + if self.is_image_file(ext): pics_id = self.URL_B64U_PREFIX + self.b64u_encode(f"{self.PICS_PREFIX}file://{id_val}") vod['vod_id'] = pics_id @@ -2738,14 +3122,20 @@ def detailContent(self, ids): display_name = os.path.splitext(name)[0] vod['vod_play_url'] = f"{display_name}${url}" vod['vod_name'] = f"🎵 {name}" - vod['vod_pic'] = self.file_icons['audio'] - self.log(f"音频文件播放串: {vod['vod_play_url']}") + + # ===== 新增:为单个音频文件获取海报 ===== + artist, song = self.extract_song_info(name) + poster = self._get_song_poster(artist, song) + if poster: + vod['vod_pic'] = poster + self.log(f"✅ 详情页添加海报: {poster}") + else: + vod['vod_pic'] = self.file_icons['audio'] elif self.is_media_file(ext): url = f"file://{id_val}" display_name = os.path.splitext(name)[0] vod['vod_play_url'] = f"{display_name}${url}" vod['vod_pic'] = self.file_icons['video'] - self.log(f"视频文件播放串: {vod['vod_play_url']}") elif self.is_list_file(ext) or self.is_db_file(ext) or self.is_magnet_file(ext): if self.is_magnet_file(ext): vod_id = self.MAGNET_PREFIX + self.b64u_encode(id_val) @@ -2753,9 +3143,9 @@ def detailContent(self, ids): vod_id = self.LIST_PREFIX + self.b64u_encode(id_val) self.log(f"列表文件,重新解析: {vod_id}") return self.detailContent([vod_id]) - + return {'list': [vod]} - + def _build_play_urls(self, items): play_urls = [] for item in items: @@ -2765,7 +3155,7 @@ def _build_play_urls(self, items): continue play_urls.append(f"{name}${url}") return play_urls - + def _extract_real_m3u8_url(self, page_url): if page_url in self.m3u8_cache: cached = self.m3u8_cache[page_url] @@ -2774,39 +3164,39 @@ def _extract_real_m3u8_url(self, page_url): else: self.log(f"⚠️ 缓存中无有效地址: {page_url}") return cached - + try: self.log(f"🔍 尝试从页面提取真实m3u8地址: {page_url}") - + from urllib.parse import urlparse parsed = urlparse(page_url) domain = parsed.netloc base_url = f"{parsed.scheme}://{parsed.netloc}" - + self.log(f"域名: {domain}, 基础URL: {base_url}") - + headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "Referer": base_url + "/", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "Accept-Language": "zh-CN,zh;q=0.9,en;q=0.8" } - + response = self.session.get(page_url, headers=headers, timeout=10) if response.status_code != 200: self.log(f"❌ 获取页面失败: {response.status_code}") return None - + html = response.text self.log(f"✅ 页面获取成功,内容长度: {len(html)}") - + m3u8_patterns = [ r'(https?://[^\s"\']+\.m3u8[^\s"\']*)', r'(//[^\s"\']+\.m3u8[^\s"\']*)', r'url["\']?\s*[:=]\s*["\']([^"\']+\.m3u8[^"\']*)["\']', r'src["\']?\s*[:=]\s*["\']([^"\']+\.m3u8[^"\']*)["\']', ] - + for pattern in m3u8_patterns: matches = re.findall(pattern, html, re.IGNORECASE) if matches: @@ -2818,33 +3208,31 @@ def _extract_real_m3u8_url(self, page_url): self.log(f"✅ 找到m3u8地址: {url}") self.m3u8_cache[page_url] = url return url - + self.log(f"❌ 未能提取到真实m3u8地址") self.m3u8_cache[page_url] = None return None - + except Exception as e: self.log(f"❌ 提取真实地址失败: {e}") self.m3u8_cache[page_url] = None return None - + # ==================== 播放页 ==================== - + def playerContent(self, flag, id, vipFlags): self.log(f"播放请求: flag={flag}, id={id}") - + original_id = id - - # 如果id包含$符号,格式可能是 "线路名$url" 或 "电视台名$url" + if '$' in id: parts = id.split('$', 1) if len(parts) == 2: - # 提取真正的URL id = parts[1] self.log(f"从 {original_id} 提取真实URL: {id}") - + url = id - + if url.startswith(('http://', 'https://', 'file://')): self.log(f"URL已经是直接地址: {url[:50]}...") else: @@ -2855,7 +3243,7 @@ def playerContent(self, flag, id, vipFlags): self.log(f"标准base64解码成功: {url[:50]}...") except: pass - + if url == id and id.startswith(self.URL_B64U_PREFIX): try: decoded = self.b64u_decode(id[len(self.URL_B64U_PREFIX):]) @@ -2864,31 +3252,29 @@ def playerContent(self, flag, id, vipFlags): self.log(f"b64u解码成功: {url[:50]}...") except: pass - + if 'dytt-' in url and '/share/' in url and not url.endswith('.m3u8'): self.log(f"检测到dytt分享链接,尝试提取真实地址") real_url = self._extract_real_m3u8_url(url) if real_url: url = real_url - + from urllib.parse import urlparse parsed = urlparse(url) domain = parsed.netloc - - # 默认请求头 + headers = { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "Accept": "*/*" } - + result = { "parse": 0, "playUrl": "", "url": url, "header": headers } - - # 根据flag或域名设置专用请求头和播放器类型 + if flag == 'migu_live' or 'miguvideo.com' in domain: headers = { "User-Agent": "com.android.chrome/3.7.0 (Linux;Android 15)", @@ -2906,7 +3292,6 @@ def playerContent(self, flag, id, vipFlags): self.log(f"使用宫殿直播专用请求头") result["playerType"] = 2 elif flag == 'simple_live': - # 简单直播使用默认请求头 pass elif 't.061899.xyz' in domain: headers = { @@ -2924,45 +3309,64 @@ def playerContent(self, flag, id, vipFlags): self.log(f"使用 rihou.cc 专用请求头") elif domain: headers["Referer"] = f"https://{domain}/" - - # 对于直播流,不要添加 Range 头 + if '.m3u8' in url or '.ts' in url: if "Range" in headers: del headers["Range"] - + result["header"] = headers - + + # ===== 音频文件处理:获取歌词和海报 ===== if url.startswith('file://'): file_path = url[7:] if os.path.exists(file_path) and self.is_audio_file(self.get_file_ext(file_path)): + self.log(f"🔍 正在为音频文件获取信息: {os.path.basename(file_path)}") + + # 获取歌词(使用新的优先网络逻辑) lrc = self.get_lrc_for_audio(file_path) if lrc: + if isinstance(lrc, (list, tuple)): + lrc = '\n'.join(lrc) result["lrc"] = lrc - self.log(f"✅ 歌词已添加: {os.path.basename(file_path)}") - + self.log(f"✅ 歌词已添加") + else: + self.log(f"⚠️ 未找到歌词") + + # 新增:获取歌曲海报 + filename = os.path.basename(file_path) + artist, song = self.extract_song_info(filename) + self.log(f"🎵 尝试获取海报: 歌手='{artist}', 歌曲='{song}'") + + poster = self._get_song_poster(artist, song) + if poster: + result["poster"] = poster + self.log(f"✅ 海报已添加: {poster}") + else: + self.log(f"⚠️ 未找到海报") + self.log(f"播放器返回: {result}") return result - + # ==================== 搜索 ==================== - + def searchContent(self, key, quick, pg=1): pg = int(pg) results = [] - + clean_key = key.lower() icon_pattern = r'^[📁📂🎬🎵📷📋📝🗄️🧲📄🖼️🎞️⬅️\s]+' clean_key = re.sub(icon_pattern, '', clean_key) - + if not clean_key: clean_key = key.lower() - + for path in self.root_paths: if not os.path.exists(path): continue - + all_files = [] self._scan_files_recursive_for_search(path, all_files, max_depth=3) - + for f in all_files: if clean_key in f['name'].lower(): if self.is_audio_file(f['ext']): @@ -2989,7 +3393,7 @@ def searchContent(self, key, quick, pg=1): else: icon = '📄' icon_type = 'file' - + if self.is_image_file(f['ext']): vod_id = self.URL_B64U_PREFIX + self.b64u_encode(f"{self.PICS_PREFIX}file://{f['path']}") results.append({ @@ -3005,7 +3409,7 @@ def searchContent(self, key, quick, pg=1): vod_id = self.LIST_PREFIX + self.b64u_encode(f['path']) elif self.is_magnet_file(f['ext']): vod_id = self.MAGNET_PREFIX + self.b64u_encode(f['path']) - + results.append({ 'vod_id': vod_id, 'vod_name': f"{icon} {f['name']}", @@ -3013,18 +3417,18 @@ def searchContent(self, key, quick, pg=1): 'vod_remarks': '', 'style': {'type': 'list'} }) - + results.sort(key=lambda x: (clean_key not in x['vod_name'].lower(), x['vod_name'])) - + per_page = 50 start = (pg - 1) * per_page end = min(start + per_page, len(results)) page_results = results[start:end] - + return { 'list': page_results, 'page': pg, 'pagecount': (len(results) + per_page - 1) // per_page, 'limit': per_page, 'total': len(results) - } \ No newline at end of file + } diff --git a/utils/api_helper.js b/utils/api_helper.js index 936b85d8..498ed073 100644 --- a/utils/api_helper.js +++ b/utils/api_helper.js @@ -39,11 +39,15 @@ export function startJsonWatcher(ENGINES, jsonDir) { // 清理已完成的计时器 debounceTimers.delete(filename); }, 100); // 100ms防抖延迟 + if (timer.unref) timer.unref(); debounceTimers.set(filename, timer); } }); + // 允许监听器不阻止进程退出 + if (jsonWatcher.unref) jsonWatcher.unref(); + // console.log(`start json file hot reload success,listening path: ${jsonDir}`); } catch (error) { console.error('start json file listening failed with error:', error); diff --git a/utils/api_validate.js b/utils/api_validate.js index 5f1aa9f2..bd21ace7 100644 --- a/utils/api_validate.js +++ b/utils/api_validate.js @@ -9,7 +9,7 @@ const SECURITY_CODE = process.env.CLIPBOARD_SECURITY_CODE || ''; // 接口basic验证 export const validateBasicAuth = (request, reply, done) => { - if (!process.env.hasOwnProperty('API_AUTH_NAME') && !process.env.hasOwnProperty('API_AUTH_CODE')) { + if (!('API_AUTH_NAME' in process.env) && !('API_AUTH_CODE' in process.env)) { done(); return } diff --git a/utils/env.js b/utils/env.js index 6f9d2683..393b5adc 100644 --- a/utils/env.js +++ b/utils/env.js @@ -94,7 +94,7 @@ export const ENV = { return cache.get(key); } // console.log(`[get] 从文件中读取: ${key}`); - fastify.log.info(`[get] 从文件中读取: ${key}`); + // fastify.log.info(`[get] 从文件中读取: ${key}`); const envObj = this._readEnvFile(); let value = envObj[key] || _value; diff --git a/utils/pan/ali.js b/utils/pan/ali.js index 3cfe6cfe..468467d1 100644 --- a/utils/pan/ali.js +++ b/utils/pan/ali.js @@ -1,6 +1,6 @@ import dayjs from 'dayjs'; import {IOS_UA} from '../misc.js'; -import req from '../req.js'; +import {reqs} from '../req.js'; import {ENV} from "../env.js"; const apiUrl = 'https://api.aliyundrive.com'; @@ -161,7 +161,7 @@ class AliDrive { }); } - const resp = await req + const resp = await reqs .post(`${apiUrl}/${url}`, data, { headers: headers, }) @@ -193,7 +193,7 @@ class AliDrive { Object.assign(headers, { Authorization: "Bearer " + this.oauth.access_token, }); - resp = await req + resp = await reqs .post(`${url}`, data, { headers: headers, }) @@ -205,7 +205,7 @@ class AliDrive { Object.assign(headers, { Authorization: this.user.auth, }); - resp = await req + resp = await reqs .post(`${apiUrl}/${url}`, data, { headers: headers, }) @@ -243,7 +243,7 @@ class AliDrive { // Object.assign(headers, { // Authorization: auth, // }); - // const res = await req.post(url,data,{headers}) + // const res = await reqs.post(url,data,{headers}) // const parsedUrl = new URL(res.data.redirectUri); // return parsedUrl.searchParams.get("code"); // } @@ -253,7 +253,7 @@ class AliDrive { // if (!this.oauth.access_token || this.oauth.expire_time - dayjs().unix() < 120 && this.user.auth) { // try { // const code = await this.getCode(this.user.auth) - // const response = await req.post('https://api.nn.ci/alist/ali_open/code', { + // const response = await reqs.post('https://api.nn.ci/alist/ali_open/code', { // "code": code, // "grant_type": "authorization_code", // "client_id": "", @@ -303,7 +303,7 @@ class AliDrive { let headers = { 'Content-Type': 'application/json' } - let resp = await req.post('https://aliyundrive-oauth.messense.me/oauth/authorize/qrcode', data, {headers}) + let resp = await reqs.post('https://aliyundrive-oauth.messense.me/oauth/authorize/qrcode', data, {headers}) if (resp.data.sid) { this.sid = resp.data.sid } @@ -321,13 +321,13 @@ class AliDrive { let headers = { 'authorization': this.user.auth }; - let resp = await req.post('https://open.aliyundrive.com/oauth/users/qrcode/authorize?sid=' + this.sid, body, {headers}) + let resp = await reqs.post('https://open.aliyundrive.com/oauth/users/qrcode/authorize?sid=' + this.sid, body, {headers}) return resp.data.result } //drive_status async getDriveCode() { - let status = await req.get(`https://openapi.aliyundrive.com/oauth/qrcode/${this.sid}/status`) + let status = await reqs.get(`https://openapi.aliyundrive.com/oauth/qrcode/${this.sid}/status`) if (status.data.status === 'LoginSuccess') { return status.data.authCode } @@ -349,7 +349,7 @@ class AliDrive { code: code, grant_type: "authorization_code" } - let response = await req.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)); @@ -368,7 +368,7 @@ class AliDrive { // 登录并获取用户信息 async refreshAccessToken() { if (!this.user.user_id || this.user.expire_time - dayjs().unix() < 120) { - let loginResp = await req + let loginResp = await reqs .post( 'https://auth.aliyundrive.com/v2/account/token', { @@ -511,8 +511,10 @@ class AliDrive { 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); @@ -628,7 +630,7 @@ class AliDrive { Object.assign(headers, { Authorization: this.user.auth, }); - let resp = await req.post(url, {param}, {headers}) + let resp = await reqs.post(url, {param}, {headers}) if (resp.status === 200) { return resp.data } else { diff --git a/utils/pan/quark.js b/utils/pan/quark.js index c0c9e8b5..af4de5f6 100644 --- a/utils/pan/quark.js +++ b/utils/pan/quark.js @@ -17,7 +17,7 @@ * @since 1.0.0 */ -import req from '../req.js'; +import {reqs} from '../req.js'; import {ENV} from '../env.js'; import COOKIE from '../cookieManager.js'; import CryptoJS from "crypto-js"; @@ -143,16 +143,16 @@ class QuarkHandler { * @returns {Promise} */ async initQuark() { - if (this.token) { - let exp = JSON.parse(CryptoJS.enc.Base64.parse(this.token.split('.')[1]).toString(CryptoJS.enc.Utf8)) - let now = Math.floor(Date.now() / 1000) - if (exp.exp < now) { - console.log('登录状态已过期,重新登录,请及时更换Token') - } else { - console.log('登录成功,继续使用,可使用时间截止到:' + (new Date(exp.exp * 1000)).toLocaleString()) - console.log('QuarkTV token获取成功:' + this.token) - } - } + // if(this.token){ + // let exp = JSON.parse(CryptoJS.enc.Base64.parse(this.token.split('.')[1]).toString(CryptoJS.enc.Utf8)) + // let now = Math.floor(Date.now() / 1000) + // if (exp.exp < now) { + // console.log('登录状态已过期,重新登录,请及时更换Token') + // } else { + // console.log('登录成功,继续使用,可使用时间截止到:' + (new Date(exp.exp * 1000)).toLocaleString()) + // console.log('QuarkTV token获取成功:' + this.token) + // } + // } if (this.cookie) { console.log("cookie 获取成功"); } else { @@ -335,12 +335,12 @@ class QuarkHandler { let link = `${this.apiUrl}/${url}` // 发送请求 - 根据方法类型选择GET或POST请求 const resp = - method === 'get' ? await req.get(link, { + method === 'get' ? await reqs.get(link, { headers: headers, }).catch((err) => { console.error(err.message); return err.response || {status: 500, data: {}}; - }) : await req.post(link, data, { + }) : await reqs.post(link, data, { headers: headers, }).catch((err) => { console.error(err.message); @@ -650,7 +650,6 @@ class QuarkHandler { const resCookie = cookieResDataSelf['set-cookie']; if (!resCookie) { console.log(`${from}自动更新夸克 cookie: 没返回新的cookie`); - return } const cookieObject = COOKIE.parse(resCookie); @@ -719,40 +718,43 @@ class QuarkHandler { return CryptoJS.SHA256(data).toString(); } - async refreshToken() { - let data = JSON.stringify({ - "req_id": reqId, - "app_ver": this.conf.appVer, - "device_id": deviceID, - "device_brand": "OPPO", - "platform": "tv", - "device_name": "PCRT00", - "device_model": "PCRT00", - "build_device": "aosp", - "build_product": "PCRT00", - "device_gpu": "Adreno%20(TM)%20640", - "activity_rect": "%7B%7D", - "channel": this.conf.channel, - "refresh_token": this.token - }); - let config = { - method: 'POST', - url: 'http://api.extscreen.com/quarkdrive', - headers: { - 'User-Agent': 'Mozilla/5.0 (Linux; U; Android 7.1.2; zh-cn; PCRT00 Build/N2G47O) AppleWebKit/533.1 (KHTML, like Gecko) Mobile Safari/533.1', - 'Connection': 'Keep-Alive', - 'Accept-Encoding': 'gzip', - 'Content-Type': 'application/json', - 'Cookie': 'sl-session=VIaxTAKF8mdJBhU2uda0zA==' - }, - data: data - }; - let req = await axios.request(config); - if (req.status === 200) { - ENV.set('uc_token_cookie', req.data.data.refresh_token) - return await this.getDownload(shareId, stoken, fileId, fileToken, clean) - } - } + // async refreshToken(shareId, stoken, fileId, fileToken, clean){ + // const timestamp = Math.floor(Date.now() / 1000).toString() + '000'; // 13位时间戳需调整 + // const deviceID = this.Addition.DeviceID || this.generateDeviceID(timestamp); + // const reqId = this.generateReqId(deviceID, timestamp); + // let data = JSON.stringify({ + // "req_id": reqId, + // "app_ver": this.conf.appVer, + // "device_id": deviceID, + // "device_brand": "OPPO", + // "platform": "tv", + // "device_name": "PCRT00", + // "device_model": "PCRT00", + // "build_device": "aosp", + // "build_product": "PCRT00", + // "device_gpu": "Adreno%20(TM)%20640", + // "activity_rect": "%7B%7D", + // "channel": this.conf.channel, + // "refresh_token": this.token + // }); + // let config = { + // method: 'POST', + // url: 'http://api.extscreen.com/quarkdrive', + // headers: { + // 'User-Agent': 'Mozilla/5.0 (Linux; U; Android 7.1.2; zh-cn; PCRT00 Build/N2G47O) AppleWebKit/533.1 (KHTML, like Gecko) Mobile Safari/533.1', + // 'Connection': 'Keep-Alive', + // 'Accept-Encoding': 'gzip', + // 'Content-Type': 'application/json', + // 'Cookie': 'sl-session=VIaxTAKF8mdJBhU2uda0zA==' + // }, + // data: data + // }; + // let req = await axios.request(config); + // if(req.status === 200) { + // ENV.set('quark_token_cookie',req.data.data.refresh_token) + // return await this.getDownload(shareId, stoken, fileId, fileToken, clean) + // } + // } async getDownload(shareId, stoken, fileId, fileToken, clean) { await this.initQuark() @@ -1000,10 +1002,83 @@ class QuarkHandler { } + async getToken() { + let t = Math.floor(new Date().getTime() / 1e3) + + let data = JSON.stringify({ + "conversation_id": "300000" + t, + "conversation_type": 3, + "msg_id": t + "000" + }); + + let config = { + method: 'POST', + url: 'https://drive-social-api.quark.cn/1/clouddrive/chat/conv/file/acquire_dl_token?pr=ucpro&fr=pc&sys=darwin&ve=3.19', + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) quark-cloud-drive/3.23.2 Chrome/112.0.5615.165 Electron/24.1.3.8 Safari/537.36 Channel/pckk_other_ch', + 'Connection': 'keep-alive', + 'Accept': 'application/json, text/plain, */*', + 'Accept-Encoding': 'gzip, deflate, br', + 'Content-Type': 'application/json', + 'accept-language': 'zh-CN', + 'origin': 'https://pan.quark.cn', + 'sec-fetch-dest': 'empty', + 'sec-fetch-mode': 'cors', + 'sec-fetch-site': 'cross-site', + 'sec-ch-ua': '"Not:A-Brand";v="99", "Chromium";v="112"', + 'sec-ch-ua-mobile': '?0', + 'sec-ch-ua-platform': '"Windows"', + 'referer': 'https://pan.quark.cn/', + 'Cookie': '_UP_A4A_11_=wb9ce1f8a7f74209b248cb5877a6a876; _UP_D_=pc; tfstk=gy2rZY6dQTBPmYbgblDFQOhX71M-pv7_ZJgIxkqnV40oVYZ3gkZN2Da7x2PEoyIJFYbJK2qTkbguRYTFLrko97gIP2kUvPSf5O6_2uHKEN_1C6GsZ4kK-9MhGxcbeD-R5O6_quHKKN__NjmeBVnnK0co-Ejq2qmoxy0oiEmZXv03-yj4mqnnK24nKirmkDDn-ycsi2063cllqNA0iO9nAbugqqJU2-ooaQEoupv33dGrSyg2Kp2q2kJ_DBpNOVVtPfguot9rLomUufNP7LzUxlFngJ8lVP40TymYMwRE7Wq76-GXxG0geo2tnj6Gbo2YPue4AHXncPg028DFIGHrE4DqDJ_vE2P0t8G-pUbEJ-r0EWSz_enc4z2LaeAEZmnq5iSVbveZi_88v3Rp9bFx0VsR2BdKZmnq5iS29BhoDmu10i5..; __uid=AARfyLe8Bke3UGL2FjhvNQn6; __sdid=AATHIp7rA8mvfKhhMvPnt0milUEzXi1ReJN0CjChc4LeUA6qYUdYA32jmaL/Lk2AA4s=; __pus=bd604e2725229c945e994c227de77f1cAASVpc7pXsTooap3JBI0XiJI9JU/JUngO9SJCOIRNOLXngLdOfozAiiwF9CnY/xOiEgE8NvKDDg1ZAwX7nVqe9H2ib5aMTAi+a2DfaPE6/6Won1vUOAfKCNELRmJOeYhVn3/eQUYx6B9EIw9HCYjQoKVh76daPI2lnp3QBTK/5zWGya9rVul08y86xpY3APre7I=; __kp=eb241d80-1ee6-11f1-85bf-6167dfcf1acd; __kuus=NenaSYNIw/O9SzABV2HtnjTDoH5aJthk7nOgDdt9pHeaJmMkCD/TY+jVFIrCn+WeFaQVR9h+E/YoStTBZAtB9va0ghzlZCgNuddki8Z8WOnYug==; __puus=2baf96cce907422be5e242bb1d280977AATi54Q/fKnsA5nM/iG/TZHL12hYZj/ELuUFbEwO/2jIXaSGwmvXppDKCITu73rdsZ1hRR0cY2QRpWdM0o+nFv65fCf5ZwPIaGHvUK9BOg3653jTngpTAj41u8kq5vTIDnPDPGWlYPYiUehDbyYBwxKYl12BFSjonkfKybr3Fpc2TYQcm566OQTrPzsupcOkOoa8CQllYvsoVyEBF2ZpiX/5' + }, + data: data + }; + let html = await axios.request(config) + if (html.status === 200) { + return html.data.data.token + } + } + + //伪造token实现无限不转存 + async getUrl(shareId, stoken, fileId, fileToken) { + await this.initQuark() + let token = await this.getToken() + let data = JSON.stringify({ + "fids": [fileId], + "fids_token": [fileToken], + "pwd_id": shareId, + "stoken": stoken, + "speedup_session": "", + "token": token + }); + let config = { + method: 'POST', + url: 'https://drive-pc.quark.cn/1/clouddrive/file/download?pr=ucpro&fr=pc', + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) quark-cloud-drive/3.20.0 Chrome/112.0.5615.165 Electron/24.1.3.8 Safari/537.36 Channel/pckk_other_ch', + 'Connection': 'keep-alive', + 'Accept': '*/*,application/json;charset=utf-8', + 'Accept-Encoding': 'gzip, deflate, br, zstd', + 'Content-Type': 'application/json', + 'Cookie': 'b-user-id=7a421e0c-2ff4-1251-4069-cdfbfedcaf8d; _UP_A4A_11_=wb9cf15ce78d47ed921a9fab3faa85e8; xlly_s=1; __sdid=AAQCvlprpJtHMDSTmliW7CTXaxFJONVhZZyKc8NgJ6Y+XH4iO1v3Q8gYFeEi2hqeV4U=; _UP_D_=pc; __pus=97012d074b8d70d6eeaeb7dbe3fcb05dAAQB4QUahCaghYFA9y/NYud63QbrjWpcO/mp4OgGcA2UZ5O+VMUlfCpacaDzbRBV2O/DK9y9iAFBUL7iPmzdj2d9; __kp=ea759a90-1ed1-11f1-8f67-e7e56f2ee996; __kps=AARfyLe8Bke3UGL2FjhvNQn6; __ktd=axb8KS+96BcSmmEd+gddqg==; __uid=AARfyLe8Bke3UGL2FjhvNQn6; __puus=c6ca8123ab4024f139092c58678de061AATi54Q/fKnsA5nM/iG/TZHLzf8buD1i2D3OKKcgKFxmYvTq9ypLK3mbAQlXFlJz6zEGV7aROE4eXsRbMGviOH4EpwIMv8HZ3UUDPfRoIVsx+mV9xMqXujCxpQR96l9Alpe2B15pFBZl94/lBMSORn+M/cocX9mAe2wX82JvYhQYO46JRC1evvevyyyzaai9ItKcf72BRC6QzioBIic/XHI8; isg=BDg4TjMppS-k-Mk0_qdGtZTlCebKoZwrBz4YK3KgQXMmjdJ3GrWXu63lQY093VQD; tfstk=gTJiuT2wCC5_fZaEErWsOziN8jlKBO6X3EeAktQqTw7Ckctv0ty2knBOgVtv-Z7F2SJA0f_cTUs7_CCZSemDWnwA7NpAns8RR5Rx5qtFmULRuiSqcMkeuUYcGc_AuZYv0CnKeYK6ft62o4H-emTk0mLcbsyaLmScDPod_tj5i4Wqy4HL9k5sWt-TUIxGLH7CmiyNuEWULi7Ubl8V76zFqg6VuE8VTWSRcGPN7N-UTwsV3Z8V3DXFRiXVuEWqxHllpf763pJErkLuNeO_cCsGsa-N7nKvLPWT1nQ33-JHt1brQw243pjM09gPi8cAzQ_Owa8EpRXDYiYhwC0uIEx2VI5HnPo9zeRDuMOIoSbkghdWp6E4_HvcS_JNtoiJ4hs2usAIr8IGBBfkICib8h8RSQW6Du09x_AhNM5Um5W9w3pfadkgPwC5mefJs42MzglbT7y5t-sEDpPbG1SCxapyAdOShopf3Dm3am1NAG_-xDVbG1SCxannx7kf_Ms1y' + }, + data: data + }; + let html = await axios.request(config).catch(e => e) + if (html.status === 200) { + return html.data.data.map(it => { + return { + name: it.video_max_resolution, + url: it.download_url + } + }) + } + } + async testSupport(url, headers) { - const resp = await req + const resp = await reqs .get(url, { @@ -1236,7 +1311,7 @@ class QuarkHandler { console.log(inReq.id, chunkIdx); - const dlResp = await req.get(url, { + const dlResp = await reqs.get(url, { responseType: 'stream', diff --git a/utils/pan/uc.js b/utils/pan/uc.js index 80406d1e..baf72e5f 100644 --- a/utils/pan/uc.js +++ b/utils/pan/uc.js @@ -1,10 +1,4 @@ -/** - * UC网盘处理器模块 - * 提供UC网盘分享链接解析、文件下载、转存等功能 - * @module uc-handler - */ - -import req from '../req.js'; +import {reqs} from '../req.js'; import {ENV} from '../env.js'; import COOKIE from '../cookieManager.js'; import CryptoJS from "crypto-js"; @@ -113,6 +107,17 @@ class UCHandler { * @param {Object} cfg - 配置对象 */ async initUC(db, cfg) { + if (this.token) { + let exp = JSON.parse(CryptoJS.enc.Base64.parse(this.token.split('.')[1]).toString(CryptoJS.enc.Utf8)) + let now = Math.floor(Date.now() / 1000) + if (exp.exp < now) { + console.log('登录状态已过期,尝试刷新Token') + await this.refreshUcToken() + } else { + console.log('登录成功,继续使用,可使用时间截止到:' + (new Date(exp.exp * 1000)).toLocaleString()) + console.log('UC TV token获取成功:' + this.token) + } + } if (this.cookie) { console.log("cookie 获取成功"); } else { @@ -209,16 +214,25 @@ class UCHandler { // 遍历所有目标文件,计算与主文件的匹配度 for (let i = 0; i < targetItems.length; i++) { + const currentLCS = this.lcs(mainItem.name, targetItems[i].name); + results.push({target: targetItems[i], lcs: currentLCS}); // 更新最佳匹配 if (currentLCS.length > results[bestMatchIndex].lcs.length) { + bestMatchIndex = i; + } + } + const bestMatch = results[bestMatchIndex]; + + return {allLCS: results, bestMatch: bestMatch, bestMatchIndex: bestMatchIndex}; + } /** @@ -253,12 +267,12 @@ class UCHandler { // 根据方法类型发送请求 const resp = - method === 'get' ? await req.get(`${this.apiUrl}/${url}`, { + method === 'get' ? await reqs.get(`${this.apiUrl}/${url}`, { headers: headers, }).catch((err) => { console.error(err); return err.response || {status: 500, data: {}}; - }) : await req.post(`${this.apiUrl}/${url}`, data, { + }) : await reqs.post(`${this.apiUrl}/${url}`, data, { headers: headers, }).catch((err) => { console.error(err); @@ -392,9 +406,11 @@ class UCHandler { // 收集子目录 subDir.push(item); } else if (item.file === true && item.obj_category === 'video') { + let text = /[#|'"\[\]&<>]/g; // 过滤小于5MB的视频文件 if (item.size < 1024 * 1024 * 5) continue; item.stoken = this.shareTokenCache[shareData.shareId].stoken; + item.file_name = text.test(item.file_name) ? item.file_name.replace(text, '') : item.file_name videos.push(item); } else if (item.type === 'file' && this.subtitleExts.some((x) => item.file_name.endsWith(x))) { // 收集字幕文件 @@ -550,9 +566,49 @@ class UCHandler { return CryptoJS.SHA256(data).toString(); } + async refreshUcToken() { + const timestamp = Math.floor(Date.now() / 1000).toString() + '000'; // 13位时间戳需调整 + const deviceID = this.Addition.DeviceID || this.generateDeviceID(timestamp); + const reqId = this.generateReqId(deviceID, timestamp); + let data = JSON.stringify({ + "req_id": reqId, + "app_ver": this.conf.appVer, + "device_id": deviceID, + "device_brand": "OPPO", + "platform": "tv", + "device_name": "PCRT00", + "device_model": "PCRT00", + "build_device": "aosp", + "build_product": "PCRT00", + "device_gpu": "Adreno%20(TM)%20640", + "activity_rect": "%7B%7D", + "channel": this.conf.channel, + "refresh_token": this.token + }); + let config = { + method: 'POST', + url: 'http://api.extscreen.com/ucdrive/token', + headers: { + 'User-Agent': 'Mozilla/5.0 (Linux; U; Android 7.1.2; zh-cn; PCRT00 Build/N2G47O) AppleWebKit/533.1 (KHTML, like Gecko) Mobile Safari/533.1', + 'Connection': 'Keep-Alive', + 'Accept-Encoding': 'gzip', + 'Content-Type': 'application/json', + 'Cookie': 'sl-session=VIaxTAKF8mdJBhU2uda0zA==' + }, + data: data + }; + let req = await axios.request(config); + if (req.status === 200) { + console.log('刷新token成功') + const token = req.data.data.access_token + let exp = JSON.parse(CryptoJS.enc.Base64.parse(token.split('.')[1]).toString(CryptoJS.enc.Utf8)) + console.log('登录成功,继续使用,可使用时间截止到:' + (new Date(exp.exp * 1000)).toLocaleString()) + ENV.set('uc_token_cookie', token) + } + } async getDownload(shareId, stoken, fileId, fileToken, clean) { - + await this.initUC() if (!this.saveFileIdCaches[fileId]) { const saveFileId = await this.save(shareId, stoken, fileId, fileToken, clean); @@ -614,38 +670,8 @@ class UCHandler { return video; } if (req.data.status === -1 || req.data.errno === 10001) { - let data = JSON.stringify({ - "req_id": reqId, - "app_ver": this.conf.appVer, - "device_id": deviceID, - "device_brand": "OPPO", - "platform": "tv", - "device_name": "PCRT00", - "device_model": "PCRT00", - "build_device": "aosp", - "build_product": "PCRT00", - "device_gpu": "Adreno%20(TM)%20640", - "activity_rect": "%7B%7D", - "channel": this.conf.channel, - "refresh_token": this.token - }); - let config = { - method: 'POST', - url: 'http://api.extscreen.com/ucdrive/token', - headers: { - 'User-Agent': 'Mozilla/5.0 (Linux; U; Android 7.1.2; zh-cn; PCRT00 Build/N2G47O) AppleWebKit/533.1 (KHTML, like Gecko) Mobile Safari/533.1', - 'Connection': 'Keep-Alive', - 'Accept-Encoding': 'gzip', - 'Content-Type': 'application/json', - 'Cookie': 'sl-session=VIaxTAKF8mdJBhU2uda0zA==' - }, - data: data - }; - let req = await axios.request(config); - if (req.status === 200) { - ENV.set('uc_token_cookie', req.data.data.refresh_token) - return await this.getDownload(shareId, stoken, fileId, fileToken, clean) - } + await this.refreshUcToken() + return await this.getDownload(shareId, stoken, fileId, fileToken, clean) } } else { const down = await this.api(`file/download?${this.pr}`, { @@ -661,9 +687,10 @@ class UCHandler { }; // console.log('low_url:', low_url); const test_result = await this.testSupport(low_url, low_headers); - // console.log('test_result:', test_result); + console.log('test_result:', test_result); if (!test_result[0]) { try { + console.log(`getDownload:自动刷新UC cookie`) await this.refreshUcCookie('getDownload'); } catch (e) { console.log(`getDownload:自动刷新UC cookie失败:${e.message}`) @@ -679,7 +706,7 @@ class UCHandler { const urls = []; if (Array.isArray(downCache)) { downCache.forEach((it) => { - urls.push(it.name, it.url); + urls.push(it.name, it.url + "#isVideo=true##fastPlayMode##threads=10#"); }); } return {parse: 0, url: urls} @@ -709,10 +736,9 @@ class UCHandler { } - async testSupport(url, headers) { - const resp = await req + const resp = await reqs .get(url, { @@ -767,7 +793,6 @@ class UCHandler { } - delAllCache(keepKey) { try { @@ -819,7 +844,6 @@ class UCHandler { } - async chunkStream(inReq, outResp, url, urlKey, headers, option) { urlKey = urlKey || CryptoJS.enc.Hex.stringify(CryptoJS.MD5(url)).toString(); @@ -954,7 +978,7 @@ class UCHandler { console.log(inReq.id, chunkIdx); - const dlResp = await req.get(url, { + const dlResp = await reqs.get(url, { responseType: 'stream', diff --git a/utils/pan/xun.js b/utils/pan/xun.js new file mode 100644 index 00000000..6b029e49 --- /dev/null +++ b/utils/pan/xun.js @@ -0,0 +1,805 @@ +import axios from "axios"; +import {ENV} from "../env.js"; +import CryptoJS from "crypto-js"; + +class XunDriver { + constructor() { + this.regex = /https:\/\/pan.xunlei.com\/s\/(.*)\?.*?pwd=([^&]+)/;//https://pan.baidu.com/s/1kbM0KWLDpeS8I49tmwS6lQ?pwd=74j5 + this.headers = { + "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36", + "Connection": "keep-alive", + "Accept": "application/json, text/plain, */*", + "Accept-Encoding": "gzip, deflate, br", + "Accept-Language": "zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6" + }; + this.api = 'https://xluser-ssl.xunlei.com/'; + this.xun_api = 'https://api-pan.xunlei.com/' + this.captcha_token = '' + this.parent_id = '' + this.share_id = '' + this.pass_code = '' + this.pass_code_token = '' + this.filename = 'ds' + this.fileId = '' + this.vodID = '' + this.client_id = 'XW5SkOhLDjnOZP7J' + this.x_client_id = 'XW-G4v1H72tgfJym' + this.device_id = '652c6bb3cacdb4b80e852dfc3cb3cca4' + this.i = 0 + } + + // 初始化方法,加载本地配置 + async init() { + if (this.auth) { + let info = JSON.parse(CryptoJS.enc.Base64.parse(this.auth.split('.')[1]).toString(CryptoJS.enc.Utf8)) + if (info.exp > Math.floor(Date.now() / 1000)) { + console.log("登录成功") + } else { + console.log("登录过期,重新登录") + } + } else { + await this.getAuth() + } + } + + get username() { + return ENV.get('xun_username') + } + + get password() { + return ENV.get('xun_password') + } + + get auth() { + return ENV.get('xun_auth') + } + + get app_auth() { + return ENV.get('xun_app_auth') + } + + get refresh_token() { + return ENV.get('xun_refresh_token') + } + + get userId() { + return ENV.get('xun_user_id') + } + + /** + * 延时函数 + * + * 创建一个Promise,在指定毫秒数后resolve,用于控制请求频率。 + * + * @param {number} ms - 延时毫秒数 + * @returns {Promise} 延时Promise + * + * @example + * await delay(1000); // 延时1秒 + */ + delay(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); + } + + async execUrl(url) { + this.link = url + const matches = this.regex.exec(url); + if (matches && matches[1]) { + this.share_id = matches[1]; + this.pass_code = matches[2] || ''; + } + } + + async login() { + let data = JSON.stringify({ + "protocolVersion": "301", + "sequenceNo": "1000001", + "platformVersion": "10", + "isCompressed": "0", + "appid": "40", + "clientVersion": "8.03.0.9067", + "peerID": "c9b076a446517969dff638cd37fa9ff1", + "appName": "ANDROID-com.xunlei.downloadprovider", + "sdkVersion": "231500", + "devicesign": "div101.b71a923eb0e2239842599a3c016b4098612f6cf6d6e9fd1925845ec59285716c", + "netWorkType": "2G", + "providerName": "NONE", + "deviceModel": "22021211RC", + "deviceName": "Xiaomi_22021211Rc", + "OSVersion": "12", + "creditkey": "", + "hl": "zh-CN", + "userName": this.username, + "passWord": this.password, + "verifyKey": "", + "verifyCode": "", + "isMd5Pwd": "0" + }); + let config = { + method: 'POST', + url: `${this.api}xluser.core.login/v3/login`, + headers: { + 'Content-Type': 'application/json' + }, + data: data + }; + let login_data = (await axios.request(config)) + if (login_data.status === 200) { + console.log('登录成功') + return login_data.data.sessionID; + } + } + + async getSignCaptcha() { + let data = JSON.stringify({ + "client_id": this.x_client_id, + "action": "POST:/v1/auth/signin", + "device_id": this.device_id, + "captcha_token": "", + "meta": { + "phone_number": `+86 ${this.username}` + } + }); + + let config = { + method: 'POST', + url: `${this.api}v1/shield/captcha/init`, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', + 'Content-Type': 'application/json' + }, + data: data + }; + let signin = await axios.request(config) + if (signin.status === 200) { + return signin.data.captcha_token + } + } + + async getAuth() { + let need_auth = 1; + if (this.auth) { + let info = JSON.parse(CryptoJS.enc.Base64.parse(this.auth.split('.')[1]).toString(CryptoJS.enc.Utf8)) + if (info.exp > Math.floor(Date.now() / 1000)) { + console.log("登录成功"); + need_auth = 0; + } + } + if (need_auth) { + console.log("登录过期,重新登录") + let captcha_token = await this.getSignCaptcha(); + let data = JSON.stringify({ + "username": `+86 ${this.username}`, + "password": this.password, + "client_id": this.x_client_id + }); + let config = { + method: 'POST', + url: `${this.api}v1/auth/signin`, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', + 'Content-Type': 'application/json', + 'accept-language': 'zh-cn', + 'x-captcha-token': captcha_token, + 'x-client-id': this.x_client_id, + 'x-device-id': this.device_id + }, + data: data + }; + let auth_data = (await axios.request(config)) + if (auth_data.status === 200) { + ENV.set('xun_auth', auth_data.data.token_type + " " + auth_data.data.access_token) + ENV.set('xun_user_id', auth_data.data.user_id) + } + await this.safecaptcha() + } + + } + + async safecaptcha() { + let data = JSON.stringify({ + "client_id": this.x_client_id, + "action": "get:/drive/v1/privilege/USER_SECURITY_TOKEN", + "device_id": this.device_id, + "captcha_token": "", + "meta": { + "username": "", + "phone_number": "", + "email": "", + "package_name": "pan.xunlei.com", + "client_version": "1.92.9", + "captcha_sign": "1.98cda33124387df2c03dea12799af2af", + "timestamp": "1757397551603", + "user_id": this.userId + } + }); + let config = { + method: 'POST', + url: 'https://xluser-ssl.xunlei.com/v1/shield/captcha/init', + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', + 'Content-Type': 'application/json', + 'accept-language': 'zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6', + 'content-type': 'text/plain;charset=UTF-8' + }, + data: data + }; + let safe = (await axios.request(config)).data + let captcha_token = safe.captcha_token + let cfg = { + method: 'GET', + url: 'https://api-pan.xunlei.com/drive/v1/privilege/USER_SECURITY_TOKEN', + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', + 'accept-language': 'zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6', + 'authorization': this.auth, + 'content-type': 'application/json', + 'x-captcha-token': captcha_token, + 'x-client-id': this.x_client_id, + 'x-device-id': this.device_id + } + }; + let safe_data = (await axios(cfg)).data + } + + async getCaptcha_token(path, mth) { + let action = `${mth}:${path}` + let data = JSON.stringify({ + "client_id": 'Xqp0kJBXWhwaTpB6', + "action": action, + "device_id": "1bf91caf40093318e8040916eb7ad16a", + "captcha_token": "", + "meta": { + "username": "", + "phone_number": "", + "email": "", + "package_name": "pan.xunlei.com", + "client_version": "1.92.9", + "captcha_sign": "1.cbc20fd633c54023baab5b816228bf90", + "timestamp": "1757383155459", + "user_id": this.userId//this.user_id + } + }); + let config = { + method: 'POST', + url: `${this.api}v1/shield/captcha/init`, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', + 'Content-Type': 'application/json', + }, + data: data + }; + let captcha_data = (await axios.request(config)) + if (captcha_data.status === 200) { + return captcha_data.data.captcha_token; + } + } + + async getAppCaptcha_token(path, mth) { + let action = `${mth}:${path}` + let data = JSON.stringify({ + "client_id": "XW-G4v1H72tgfJym", + "action": action, + "device_id": "652c6bb3cacdb4b80e852dfc3cb3cca4", + "captcha_token": "", + "meta": { + "package_name": "ThunderPanPlugin", + "client_version": "3.1.5", + "captcha_sign": "1.ee2cef5f061a7cdf4374df81b370d2ec", + "timestamp": "1773293019719", + "user_id": this.userId + } + }); + let config = { + method: 'POST', + url: `${this.api}v1/shield/captcha/init`, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', + 'Content-Type': 'application/json', + }, + data: data + }; + let captcha_data = (await axios.request(config)) + if (captcha_data.status === 200) { + return captcha_data.data.captcha_token; + } + } + + sign() { + let x = [ + "QG3/GhopO+5+T", + "1Sv94+ANND3lDmmw", + "q2eTxRva8b3B5d", + "m2", + "VIc5CZRBMU71ENfbOh0+RgWIuzLy", + "66M8Wpw6nkBEekOtL6e", + "N0rucK7S8W/vrRkfPto5urIJJS8dVY0S", + "oLAR7pdUVUAp9xcuHWzrU057aUhdCJrt", + "6lxcykBSsfI//GR9", + "r50cz+1I4gbU/fk8", + "tdwzrTc4SNFC4marNGTgf05flC85A", + "qvNVUDFjfsOMqvdi2gB8gCvtaJAIqxXs" + ] + const c = { + ClientID: 'Xqp0kJBXWhwaTpB6', + ClientVersion: '1.92.9', + PackageName: 'pan.xunlei.com', + DeviceID: '1bf91caf40093318e8040916eb7ad16a' + } + const timestamp = Date.now() + let w = c.ClientID + c.ClientVersion + c.PackageName + c.DeviceID + '1757338961011' + for (let i = 0; i < x.length; i++) { + w = CryptoJS.MD5(w + x[i]).toString(); + } + return "1." + w + } + + async getShareList() { + let path = '/drive/v1/share' + let mth = 'get' + let captcha_data = await this.getCaptcha_token(path, mth) + let config = { + method: 'GET', + url: `${this.xun_api}drive/v1/share?share_id=${this.share_id}&pass_code=${this.pass_code}&limit=100&page_token=&thumbnail_size=SIZE_SMALL`, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', + 'accept-language': 'zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6', + 'authorization': '', + 'x-captcha-token': captcha_data, + 'x-client-id': 'Xqp0kJBXWhwaTpB6', + 'x-device-id': '1bf91caf40093318e8040916eb7ad16a' + } + }; + let sharelist = await axios.request(config) + if (sharelist.status === 200) { + let file = {} + let dirs = [] + let videos = [] + this.pass_code_token = sharelist.data.pass_code_token + sharelist.data.files.map(it => { + if (it.mime_type === '') { + dirs.push(it.id) + } else { + let text = /[#|'"\[\]&<>]/g + let name = text.test(it.name) ? it.name.replace(text, '') : it.name + videos.push({ + name: name, + fileId: it.id, + share_id: this.share_id, + parent_id: it.parent_id, + pass_code_token: encodeURIComponent(this.pass_code_token) + }) + } + }) + if (!(sharelist.data.title in file) && sharelist.data.title !== undefined) { + file[sharelist.data.title] = []; + } + if (videos.length > 0 && sharelist.data.title !== undefined) { + file[sharelist.data.title] = [...videos] + } + let result = await Promise.all(dirs.map(async (id) => this.getShareDetail(id))) + result = result.filter(item => item !== undefined && item !== null).flat() + if (result.length >= 0) { + file[sharelist.data.title].push(...result); + } + return file + } + } + + async getShareDetail(id) { + let path = '/drive/v1/share' + let mth = 'get' + let captcha_data = await this.getCaptcha_token(path, mth) + let config = { + method: 'GET', + url: `${this.xun_api}drive/v1/share/detail?share_id=${this.share_id}&parent_id=${id}&pass_code_token=${encodeURIComponent(this.pass_code_token)}&limit=100&page_token=&thumbnail_size=SIZE_SMALL`, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', + 'accept-language': 'zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6', + 'authorization': '', + 'content-type': 'application/json', + 'x-captcha-token': captcha_data, + 'x-client-id': 'Xqp0kJBXWhwaTpB6', + 'x-device-id': '1bf91caf40093318e8040916eb7ad16a' + } + }; + let detail_data = await axios.request(config) + if (detail_data.status === 200) { + let dirs = [] + let videos = [] + detail_data.data.files.map(it => { + if (it.mime_type === '') { + dirs.push(it.id) + } else { + let text = /[#|'"\[\]&<>]/g + let name = text.test(it.name) ? it.name.replace(text, '') : it.name + videos.push({ + name: name, + fileId: it.id, + share_id: this.share_id, + parent_id: it.parent_id, + pass_code_token: encodeURIComponent(this.pass_code_token) + }) + } + }) + let result = await Promise.all(dirs.map(async (id) => this.getShareDetail(id))) + result = result.filter(item => item !== undefined && item !== null) + return [...videos, ...result.flat()]; + } + } + + async getShareUrl(fileId, share_id, pass_code_token) { + let path = '/drive/v1/share' + let mth = 'get' + let captcha_data = await this.getCaptcha_token(path, mth) + let config = { + method: 'GET', + url: `${this.xun_api}drive/v1/share/file_info?pass_code_token=${encodeURIComponent(pass_code_token)}&space=&file_id=${fileId}&share_id=${share_id}&&pass_code=${this.pass_code}`, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', + 'accept-language': 'zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6', + 'authorization': '', + 'cache-control': 'no-cache', + 'content-type': 'application/json', + 'x-captcha-token': captcha_data, + 'x-client-id': 'Xqp0kJBXWhwaTpB6', + 'x-device-id': '1bf91caf40093318e8040916eb7ad16a' + } + }; + let url_list = await axios.request(config) + if (url_list.status === 200) { + let urls = [] + url_list.data.file_info.medias.map(it => { + if (it.link !== null) { + urls.push(it.media_name, it.link.url + "#isVideo=true##fastPlayMode##threads=20#") + urls.push("猫画" + it.media_name, `http://127.0.0.1:5575/proxy?thread=${ENV.get('thread') || 6}&chunkSize=256&url=` + encodeURIComponent(it.link.url)) + } + }) + return urls + } + } + + //获取分享文件列表 + async getShareData(url) { + if (url.startsWith('https://')) { + await this.execUrl(url) + return await this.getShareList() + } + // if(url.startsWith('magnet:')){ + // return await this.getMagnetData(url) + // } + } + + async saveResult(fileId, share_id, pass_code_token) { + let path = 'drive/v1/files' + let mth = 'get' + let captcha_data = await this.getAppCaptcha_token(path, mth) + let data = JSON.stringify({ + "parent_id": this.fileId, + "share_id": share_id, + "pass_code_token": decodeURIComponent(pass_code_token), + "ancestor_ids": [], + "file_ids": [ + fileId + ], + "specify_parent_id": true + }); + let config = { + method: 'POST', + url: `${this.xun_api}drive/v1/share/restore`, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', + 'Content-Type': 'application/json', + 'accept-language': 'zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6', + 'authorization': this.auth, + 'x-captcha-token': captcha_data, + 'x-client-id': 'XW-G4v1H72tgfJym', + 'x-device-id': '652c6bb3cacdb4b80e852dfc3cb3cca4' + }, + data: data + }; + let file_data = await axios.request(config).catch(e => e.response) + if (file_data.status === 200) { + console.log("转存文件成功") + } + if (file_data.status === 404) { + this.i++ + if (this.i < 3) { + await this.saveResult(fileId, share_id, pass_code_token) + } else { + this.i = 0 + console.log("转存失败:" + file_data.data) + } + } + } + + //转存文件 + async saveFile(fileId, share_id, pass_code_token) { + await this.createFile() + if (this.fileId !== '' && this.fileId !== undefined) { + await this.delay(5000) + await this.saveResult(fileId, share_id, pass_code_token) + } + } + + //查询存储文件是否存在 + async getFile() { + if (this.auth === undefined || this.auth === '') { + await this.getAuth() + } + let path = 'drive/v1/files' + let mth = 'get' + let captcha_data = await this.getAppCaptcha_token(path, mth) + let url = `${this.xun_api}drive/v1/files?parent_id=&filters=%7B%22phase%22%3A%7B%22eq%22%3A%22PHASE_TYPE_COMPLETE%22%7D%2C%22trashed%22%3A%7B%22eq%22%3Afalse%7D%7D&with_audit=true&thumbnail_size=SIZE_SMALL&limit=50` + let config = { + method: 'GET', + url: url, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', + 'accept-language': 'zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6', + 'authorization': this.auth, + 'content-type': 'application/json', + 'x-captcha-token': captcha_data, + 'x-client-id': 'XW-G4v1H72tgfJym', + 'x-device-id': '652c6bb3cacdb4b80e852dfc3cb3cca4' + } + }; + let file_data = await axios.request(config) + if (file_data.status === 200) { + file_data.data.files.map(it => { + if (it.name === this.filename) { + this.fileId = it.id; + } + }) + } + } + + //创建存储文件并写入文件夹ID + async createFile() { + await this.getFile() + let path = 'drive/v1/files' + let mth = 'get' + let captcha_data = await this.getAppCaptcha_token(path, mth) + let data = JSON.stringify({ + "parent_id": "", + "name": this.filename, + "kind": "drive#folder", + "space": "" + }); + let config = { + method: 'POST', + url: `${this.xun_api}drive/v1/files`, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', + 'Content-Type': 'application/json', + 'accept-language': 'zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6', + 'authorization': this.auth, + 'x-captcha-token': captcha_data, + 'x-client-id': 'XW-G4v1H72tgfJym', + 'x-device-id': '652c6bb3cacdb4b80e852dfc3cb3cca4' + }, + data: data + }; + let file_data = await axios.request(config).catch(e => e.response) + if (file_data.status === 200) { + this.fileId = file_data.data.file.id + } + } + + //查询存储文件内容并获取文件ID + async getVodId() { + let path = 'drive/v1/files' + let mth = 'get' + let captcha_data = await this.getAppCaptcha_token(path, mth) + let url = `${this.xun_api}drive/v1/files?parent_id=${this.fileId}&filters=%7B%22phase%22%3A%7B%22eq%22%3A%22PHASE_TYPE_COMPLETE%22%7D%2C%22trashed%22%3A%7B%22eq%22%3Afalse%7D%7D&with_audit=true&thumbnail_size=SIZE_SMALL&limit=50` + let config = { + method: 'GET', + url: url, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', + 'accept-language': 'zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6', + 'authorization': this.auth, + 'content-type': 'application/json', + 'x-captcha-token': captcha_data, + 'x-client-id': 'XW-G4v1H72tgfJym', + 'x-device-id': '652c6bb3cacdb4b80e852dfc3cb3cca4' + } + }; + let file_data = await axios.request(config) + if (file_data.status === 200) { + file_data.data.files.map(it => { + this.vodID = it.id + }) + } + return this.vodID + } + + //删除文件夹所有内容 + async deleteFile() { + await this.getFile() + if (this.fileId !== '' && this.fileId !== undefined) { + let path = 'drive/v1/files' + let mth = 'get' + let captcha_data = await this.getAppCaptcha_token(path, mth) + let data = JSON.stringify({ + "ids": [ + this.fileId + ], + "space": "" + }); + let config = { + method: 'POST', + url: `${this.xun_api}drive/v1/files:batchDelete`, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', + 'Content-Type': 'application/json', + 'accept-language': 'zh,en-GB;q=0.9,en-US;q=0.8,en;q=0.7,zh-CN;q=0.6', + 'authorization': this.auth, + 'x-captcha-token': captcha_data, + 'x-client-id': 'XW-G4v1H72tgfJym', + 'x-device-id': '652c6bb3cacdb4b80e852dfc3cb3cca4' + }, + data: data + }; + let delete_data = await axios.request(config).catch(e => e.response) + if (delete_data.status === 200) { + console.log("删除文件成功") + } else if (delete_data.status === 404) { + console.log("文件未找到,删除失败") + } + } + } + + async getDownload_CAPTCHA_TOKEN() { + let data = { + "client_id": "XW-G4v1H72tgfJym", + "action": "GET:CAPTCHA_TOKEN", + "device_id": "652c6bb3cacdb4b80e852dfc3cb3cca4", + "captcha_token": "", + "meta": { + "package_name": "ThunderPanPlugin", + "client_version": "3.1.1", + "captcha_sign": "1.0eada0deeeaac52a6376f2e167fa9f29", + "timestamp": "1757378771289", + "user_id": this.userId + } + }; + let config = { + method: 'POST', + url: `${this.api}v1/shield/captcha/init`, + headers: { + "User-Agent": "thunder/12.4.4.3740 Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.215 XDASKernel/22.3.27 Safari/537.36", + "Accept-Encoding": "gzip, deflate, br", + "Content-Type": "application/json" + }, + data: data + }; + let captcha_data = (await axios.request(config)) + if (captcha_data.status === 200) { + return captcha_data.data.captcha_token; + } + } + + async getAppCaptcha() { + let data = JSON.stringify({ + "client_id": 'Xqp0kJBXWhwaTpB6', + "action": "POST:/v1/auth/signin", + "device_id": "652c6bb3cacdb4b80e852dfc3cb3cca4", + "captcha_token": "", + "meta": { + "phone_number": `+86 ${this.username}` + } + }); + + let config = { + method: 'POST', + url: `${this.api}v1/shield/captcha/init`, + headers: { + 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', + 'Content-Type': 'application/json' + }, + data: data + }; + let signin = await axios.request(config) + if (signin.status === 200) { + return signin.data.captcha_token + } + } + + async AppAuth() { + if (this.app_auth) { + let info = JSON.parse(CryptoJS.enc.Base64.parse(this.app_auth.split('.')[1]).toString(CryptoJS.enc.Utf8)) + if (info.exp > Math.floor(Date.now() / 1000)) { + console.log("登录成功") + } else { + console.log("登录过期,重新登录") + let captcha_token = await this.getAppCaptcha(); + let data = JSON.stringify({ + "username": `+86 ${this.username}`, + "password": this.password, + "client_id": 'XW-G4v1H72tgfJym' + }); + let config = { + method: 'POST', + url: `${this.api}v1/auth/signin`, + headers: { + "User-Agent": "thunder/12.4.4.3740 Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.215 XDASKernel/22.3.27 Safari/537.36", + "Content-Type": "application/json", + "x-captcha-token": captcha_token, + "x-client-id": "XW-G4v1H72tgfJym", + "x-device-id": "652c6bb3cacdb4b80e852dfc3cb3cca4" + }, + data: data + }; + let auth_data = (await axios.request(config)) + if (auth_data.status === 200) { + ENV.set('xun_refresh_token', auth_data.data.refresh_token) + ENV.set('xun_app_auth', auth_data.data.token_type + " " + auth_data.data.access_token) + } + } + } + } + + async getDownload_auth() { + await this.AppAuth() + let data = JSON.stringify({ + "client_id": "XW-G4v1H72tgfJym", + "client_secret": "Qbaferw2knfQKqxa25EYJGtZ2_6755CMwzXBN3ctW54", + "grant_type": "refresh_token", + "refresh_token": this.refresh_token + }); + let config = { + method: 'POST', + url: 'https://xluser-ssl.xunlei.com/v1/auth/token', + headers: { + 'User-Agent': 'thunder/12.4.4.3740 Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.215 XDASKernel/22.3.27 Safari/537.36', + 'Content-Type': 'application/json', + 'x-client-id': 'XW-G4v1H72tgfJym', + 'x-device-id': '652c6bb3cacdb4b80e852dfc3cb3cca4', + }, + data: data + }; + let dwon_data = await axios(config).catch(e => e.response); + if (dwon_data.status === 200) { + ENV.set('xun_retoken', dwon_data.data.refresh_token); + ENV.set('xun_App_auth', dwon_data.data.token_type + " " + dwon_data.data.access_token) + } + } + + //下载 + async getDownloadUrl(fileId, share_id, pass_code_token) { + try { + await this.getDownload_auth() + await this.deleteFile() + await this.delay(1000) + await this.saveFile(fileId, share_id, pass_code_token) + let vodID = await this.getVodId() + let x_captcha_token = await this.getDownload_CAPTCHA_TOKEN() + let config = { + method: 'GET', + url: `${this.xun_api}drive/v1/files/${vodID}?space=&with[0]=public_share_tag&usage=FETCH`, + headers: { + "User-Agent": "thunder/12.4.4.3740 Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.5359.215 XDASKernel/22.3.27 Safari/537.36", + "Connection": "keep-alive", + "Accept": "*/*", + "Accept-Encoding": "gzip, deflate, br", + "x-captcha-token": x_captcha_token, + "authorization": this.app_auth, + "content-type": "application/json", + "x-device-id": "652c6bb3cacdb4b80e852dfc3cb3cca4" + } + }; + let file_data = await axios.request(config) + if (file_data.status === 200) { + console.log("下载地址:" + file_data.data.links['application/octet-stream'].url || file_data.data['web_content_link']) + return file_data.data.links['application/octet-stream'].url || file_data.data['web_content_link'] + } + } catch (e) { + console.log(e) + return '' + } + + } +} + +export const Xun = new XunDriver() \ No newline at end of file diff --git a/utils/pans.js b/utils/pans.js index f65e92e5..0c4d1241 100644 --- a/utils/pans.js +++ b/utils/pans.js @@ -27,6 +27,7 @@ import {Pan} from "./pan/pan123.js"; // 123网盘服务 import {Quark} from "./pan/quark.js"; // 夸克网盘服务 import {UC} from "./pan/uc.js"; // UC网盘服务 import {Yun} from "./pan/yun.js"; // 115网盘服务 +import {Xun} from "./pan/xun.js"; // 迅雷网盘服务 // 统一导出所有网盘服务 -export default {Ali, Baidu, Baidu2, Cloud, Pan, Quark, UC, Yun} \ No newline at end of file +export default {Ali, Baidu, Baidu2, Cloud, Pan, Quark, UC, Yun, Xun} \ No newline at end of file diff --git a/utils/proxy-util.js b/utils/proxy-util.js index 01cd3425..338e967a 100644 --- a/utils/proxy-util.js +++ b/utils/proxy-util.js @@ -220,6 +220,11 @@ export class SmartCacheManager { this._performCleanup(); }, this.cleanupInterval); + // 允许进程在定时器存在时退出 + if (this.cleanupTimer.unref) { + this.cleanupTimer.unref(); + } + // 确保进程退出时清理定时器 if (typeof process !== 'undefined') { process.on('exit', () => this.stopCleanupTimer()); diff --git a/utils/req.js b/utils/req.js index 4709394a..839d73e5 100644 --- a/utils/req.js +++ b/utils/req.js @@ -110,50 +110,50 @@ export const reqs = new _axios.create({ }); // Add System Proxy & DOH interceptor to reqs as well -reqs.interceptors.request.use(async config => { - if (!config.url) return config; - try { - // 1. Check System Proxy - const proxy = await getSystemProxy(); - if (proxy) { - const agent = new HttpsProxyAgent(proxy); - config.httpsAgent = agent; - config.proxy = false; - return config; - } - - // 2. DOH - 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; -}); +// reqs.interceptors.request.use(async config => { +// if (!config.url) return config; +// try { +// // 1. Check System Proxy +// const proxy = await getSystemProxy(); +// if (proxy) { +// const agent = new HttpsProxyAgent(proxy); +// config.httpsAgent = agent; +// config.proxy = false; +// return config; +// } +// +// // 2. DOH +// 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; +// }); // 导出默认的HTTP请求客户端 export default req;