Browse Source

修改绝对路径问题,以及nodejs 依赖丢失问题

User 4 months ago
parent
commit
fafd628fb9
100 changed files with 13154 additions and 115 deletions
  1. 0 1
      .gitignore
  2. 165 59
      main-js/execute-py.js
  3. 157 13
      main-js/func/image-center-location.js
  4. 185 34
      main-js/func/ocr-chat.js
  5. 8 8
      node_modules/.vite/deps/_metadata.json
  6. 8 0
      node_modules/@electron/get/dist/cjs/Cache.d.ts
  7. 60 0
      node_modules/@electron/get/dist/cjs/Cache.js
  8. 1 0
      node_modules/@electron/get/dist/cjs/Cache.js.map
  9. 3 0
      node_modules/@electron/get/dist/cjs/Downloader.d.ts
  10. 3 0
      node_modules/@electron/get/dist/cjs/Downloader.js
  11. 1 0
      node_modules/@electron/get/dist/cjs/Downloader.js.map
  12. 21 0
      node_modules/@electron/get/dist/cjs/GotDownloader.d.ts
  13. 76 0
      node_modules/@electron/get/dist/cjs/GotDownloader.js
  14. 0 0
      node_modules/@electron/get/dist/cjs/GotDownloader.js.map
  15. 4 0
      node_modules/@electron/get/dist/cjs/artifact-utils.d.ts
  16. 66 0
      node_modules/@electron/get/dist/cjs/artifact-utils.js
  17. 0 0
      node_modules/@electron/get/dist/cjs/artifact-utils.js.map
  18. 3 0
      node_modules/@electron/get/dist/cjs/downloader-resolver.d.ts
  19. 12 0
      node_modules/@electron/get/dist/cjs/downloader-resolver.js
  20. 1 0
      node_modules/@electron/get/dist/cjs/downloader-resolver.js.map
  21. 18 0
      node_modules/@electron/get/dist/cjs/index.d.ts
  22. 140 0
      node_modules/@electron/get/dist/cjs/index.js
  23. 0 0
      node_modules/@electron/get/dist/cjs/index.js.map
  24. 4 0
      node_modules/@electron/get/dist/cjs/proxy.d.ts
  25. 27 0
      node_modules/@electron/get/dist/cjs/proxy.js
  26. 1 0
      node_modules/@electron/get/dist/cjs/proxy.js.map
  27. 129 0
      node_modules/@electron/get/dist/cjs/types.d.ts
  28. 3 0
      node_modules/@electron/get/dist/cjs/types.js
  29. 1 0
      node_modules/@electron/get/dist/cjs/types.js.map
  30. 25 0
      node_modules/@electron/get/dist/cjs/utils.d.ts
  31. 107 0
      node_modules/@electron/get/dist/cjs/utils.js
  32. 0 0
      node_modules/@electron/get/dist/cjs/utils.js.map
  33. 8 0
      node_modules/@electron/get/dist/esm/Cache.d.ts
  34. 57 0
      node_modules/@electron/get/dist/esm/Cache.js
  35. 1 0
      node_modules/@electron/get/dist/esm/Cache.js.map
  36. 3 0
      node_modules/@electron/get/dist/esm/Downloader.d.ts
  37. 1 0
      node_modules/@electron/get/dist/esm/Downloader.js
  38. 1 0
      node_modules/@electron/get/dist/esm/Downloader.js.map
  39. 21 0
      node_modules/@electron/get/dist/esm/GotDownloader.d.ts
  40. 73 0
      node_modules/@electron/get/dist/esm/GotDownloader.js
  41. 0 0
      node_modules/@electron/get/dist/esm/GotDownloader.js.map
  42. 4 0
      node_modules/@electron/get/dist/esm/artifact-utils.d.ts
  43. 61 0
      node_modules/@electron/get/dist/esm/artifact-utils.js
  44. 0 0
      node_modules/@electron/get/dist/esm/artifact-utils.js.map
  45. 3 0
      node_modules/@electron/get/dist/esm/downloader-resolver.d.ts
  46. 9 0
      node_modules/@electron/get/dist/esm/downloader-resolver.js
  47. 1 0
      node_modules/@electron/get/dist/esm/downloader-resolver.js.map
  48. 18 0
      node_modules/@electron/get/dist/esm/index.d.ts
  49. 134 0
      node_modules/@electron/get/dist/esm/index.js
  50. 0 0
      node_modules/@electron/get/dist/esm/index.js.map
  51. 4 0
      node_modules/@electron/get/dist/esm/proxy.d.ts
  52. 24 0
      node_modules/@electron/get/dist/esm/proxy.js
  53. 1 0
      node_modules/@electron/get/dist/esm/proxy.js.map
  54. 129 0
      node_modules/@electron/get/dist/esm/types.d.ts
  55. 1 0
      node_modules/@electron/get/dist/esm/types.js
  56. 1 0
      node_modules/@electron/get/dist/esm/types.js.map
  57. 25 0
      node_modules/@electron/get/dist/esm/utils.d.ts
  58. 95 0
      node_modules/@electron/get/dist/esm/utils.js
  59. 0 0
      node_modules/@electron/get/dist/esm/utils.js.map
  60. 292 0
      node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
  61. 3 0
      node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map
  62. 358 0
      node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js
  63. 3 0
      node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map
  64. 88 0
      node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts
  65. 32 0
      node_modules/@jridgewell/gen-mapping/dist/types/set-array.d.ts
  66. 12 0
      node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts
  67. 43 0
      node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts
  68. 144 0
      node_modules/@jridgewell/remapping/dist/remapping.mjs
  69. 3 0
      node_modules/@jridgewell/remapping/dist/remapping.mjs.map
  70. 212 0
      node_modules/@jridgewell/remapping/dist/remapping.umd.js
  71. 3 0
      node_modules/@jridgewell/remapping/dist/remapping.umd.js.map
  72. 232 0
      node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs
  73. 0 0
      node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map
  74. 240 0
      node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js
  75. 0 0
      node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map
  76. 4 0
      node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts
  77. 423 0
      node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
  78. 3 0
      node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map
  79. 464 0
      node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js
  80. 3 0
      node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map
  81. 493 0
      node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs
  82. 3 0
      node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map
  83. 559 0
      node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js
  84. 3 0
      node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map
  85. 271 0
      node_modules/@rolldown/pluginutils/dist/index.cjs
  86. 157 0
      node_modules/@rolldown/pluginutils/dist/index.d.cts
  87. 157 0
      node_modules/@rolldown/pluginutils/dist/index.d.ts
  88. 255 0
      node_modules/@rolldown/pluginutils/dist/index.js
  89. 232 0
      node_modules/@sindresorhus/is/dist/index.d.ts
  90. 434 0
      node_modules/@sindresorhus/is/dist/index.js
  91. 25 0
      node_modules/@sindresorhus/is/dist/types.d.ts
  92. 3 0
      node_modules/@sindresorhus/is/dist/types.js
  93. 32 0
      node_modules/@szmarczak/http-timer/dist/source/index.d.ts
  94. 126 0
      node_modules/@szmarczak/http-timer/dist/source/index.js
  95. 343 0
      node_modules/@vitejs/plugin-react/dist/index.cjs
  96. 67 0
      node_modules/@vitejs/plugin-react/dist/index.d.cts
  97. 67 0
      node_modules/@vitejs/plugin-react/dist/index.d.ts
  98. 320 0
      node_modules/@vitejs/plugin-react/dist/index.js
  99. 670 0
      node_modules/@vitejs/plugin-react/dist/refresh-runtime.js
  100. 4471 0
      node_modules/axios/dist/axios.js

+ 0 - 1
.gitignore

@@ -1,4 +1,3 @@
-dist/
 *.log
 .DS_Store
 Thumbs.db

+ 165 - 59
main-js/execute-py.js

@@ -5,8 +5,8 @@
  */
 
 import { ipcMain } from 'electron';
-import { writeFile, mkdir, rm, readdir, stat } from 'fs/promises';
-import fs from 'fs';
+import { writeFile, mkdir, rm, readdir, stat, readFile } from 'fs/promises';
+import fs, { existsSync } from 'fs';
 import { join, dirname, isAbsolute } from 'path';
 import { fileURLToPath } from 'url';
 import { exec } from 'child_process';
@@ -22,6 +22,81 @@ const execAsync = promisify(exec);
 const __filename = fileURLToPath(import.meta.url);
 const __dirname = dirname(__filename);
 
+/**
+ * 确保 pyvenv.cfg 文件使用当前系统的 Python 路径
+ * @param {string} projectRoot - 项目根目录
+ * @returns {Promise<void>}
+ */
+async function ensurePyvenvConfig(projectRoot) {
+  const pyvenvCfgPath = join(projectRoot, 'py', 'venv', 'pyvenv.cfg');
+  
+  if (!existsSync(pyvenvCfgPath)) {
+    return; // 如果文件不存在,跳过
+  }
+  
+  try {
+    // 读取现有配置
+    const currentContent = await readFile(pyvenvCfgPath, 'utf8');
+    
+    // 尝试从现有配置中提取系统 Python 路径
+    const homeMatch = currentContent.match(/^home\s*=\s*(.+)$/m);
+    const executableMatch = currentContent.match(/^executable\s*=\s*(.+)$/m);
+    
+    // 如果配置文件中已经有路径,检查路径是否存在
+    if (homeMatch && executableMatch) {
+      const existingHome = homeMatch[1].trim();
+      const existingExecutable = executableMatch[1].trim();
+      
+      // 检查系统 Python 是否存在
+      if (existsSync(existingExecutable)) {
+        // 路径存在,不需要更新
+        return;
+      }
+    }
+    
+    // 如果配置文件中的路径不存在,使用系统 Python 检测
+    // 使用系统 Python(不是虚拟环境中的),因为我们需要检测系统 Python 路径
+    const { stdout } = await execAsync('python -c "import sys; import os; print(os.path.dirname(sys.executable))"', {
+      encoding: 'utf8',
+      timeout: 5000,
+      cwd: projectRoot
+    });
+    const pythonHome = stdout.trim();
+    
+    if (!pythonHome) {
+      return; // 如果无法检测,跳过
+    }
+    
+    const pythonExe = join(pythonHome, 'python.exe');
+    
+    // 检查系统 Python 是否存在
+    if (!existsSync(pythonExe)) {
+      return; // 系统 Python 不存在,跳过
+    }
+    
+    // 检测 Python 版本(使用系统 Python)
+    const { stdout: versionOutput } = await execAsync('python -c "import sys; print(\"{}.{}.{}\".format(sys.version_info.major, sys.version_info.minor, sys.version_info.micro))"', {
+      encoding: 'utf8',
+      timeout: 5000,
+      cwd: projectRoot
+    });
+    const pythonVersion = versionOutput.trim();
+    
+    // 更新配置
+    const newContent = `home = ${pythonHome}
+include-system-site-packages = false
+version = ${pythonVersion}
+executable = ${pythonExe}
+command = ${pythonExe} -m venv py/venv
+`;
+    
+    await writeFile(pyvenvCfgPath, newContent, 'utf8');
+  } catch (error) {
+    // 静默失败,不影响主流程
+    console.warn('无法更新 pyvenv.cfg:', error.message);
+  }
+}
+
 /**
  * 递归计算目录大小
  * @param {string} dirPath - 目录路径
@@ -128,14 +203,21 @@ export async function matchImageAndGetCoordinate(ipPort, templateImagePath) {
  * @param {string} device - 设备 ID(可选,用于获取分辨率)
  * @returns {Promise<{success: boolean, error?: string, corners?: Object}>}
  */
+
 export async function matchImageRegionLocation(screenshotPath, regionPath, device = null) {
   try {
     if (!regionPath) {
       return { success: false, error: '缺少区域截图路径' };
     }
 
+    // 使用相对路径(相对于项目根目录)
+    const projectRoot = join(__dirname, '..');
+    
+    // 确保 pyvenv.cfg 使用当前系统的 Python 路径
+    await ensurePyvenvConfig(projectRoot);
+    
     // 如果 screenshotPath 为 '__AUTO_SCREENSHOT__' 或 null,自动从设备获取截图
-    let absoluteScreenshotPath = screenshotPath;
+    let relativeScreenshotPath = screenshotPath;
     if (!screenshotPath || screenshotPath === '__AUTO_SCREENSHOT__' || screenshotPath === null) {
       if (!device) {
         return { success: false, error: '缺少完整截图路径,且无法自动获取设备截图(缺少设备ID)' };
@@ -152,23 +234,34 @@ export async function matchImageRegionLocation(screenshotPath, regionPath, devic
         return { success: false, error: '自动获取设备截图失败' };
       }
 
-      // 保存截图到临时文件
-      const tempDir = join(__dirname, '..');
-      const tempScreenshotPath = join(tempDir, 'temp_screenshot.png');
+      // 保存截图到临时文件(使用相对路径)
+      relativeScreenshotPath = 'temp_screenshot.png';
+      const tempScreenshotAbsolutePath = join(projectRoot, relativeScreenshotPath);
       const screenshotBuffer = Buffer.from(screenshotResult.data, 'base64');
-      await writeFile(tempScreenshotPath, screenshotBuffer);
-      
-      absoluteScreenshotPath = tempScreenshotPath;
+      await writeFile(tempScreenshotAbsolutePath, screenshotBuffer);
     } else {
-      // 将相对路径转换为绝对路径
-      if (!isAbsolute(screenshotPath)) {
-        absoluteScreenshotPath = join(__dirname, '..', screenshotPath);
+      // 如果传入的是绝对路径,转换为相对路径
+      if (isAbsolute(screenshotPath)) {
+        try {
+          relativeScreenshotPath = require('path').relative(projectRoot, screenshotPath).replace(/\\/g, '/');
+        } catch (e) {
+          relativeScreenshotPath = screenshotPath.replace(/\\/g, '/');
+        }
+      } else {
+        relativeScreenshotPath = screenshotPath.replace(/\\/g, '/');
       }
     }
 
-    let absoluteRegionPath = regionPath;
-    if (!isAbsolute(regionPath)) {
-      absoluteRegionPath = join(__dirname, '..', regionPath);
+    // 如果传入的是绝对路径,转换为相对路径
+    let relativeRegionPath = regionPath;
+    if (isAbsolute(regionPath)) {
+      try {
+        relativeRegionPath = require('path').relative(projectRoot, regionPath).replace(/\\/g, '/');
+      } catch (e) {
+        relativeRegionPath = regionPath.replace(/\\/g, '/');
+      }
+    } else {
+      relativeRegionPath = regionPath.replace(/\\/g, '/');
     }
 
     // 可选:如果提供了设备ID,获取设备分辨率用于缩放
@@ -182,8 +275,8 @@ export async function matchImageRegionLocation(screenshotPath, regionPath, devic
       }
     }
 
-    // 调用图像匹配函数
-    const matchResult = await matchImage(absoluteScreenshotPath, absoluteRegionPath, width, height);
+    // 调用图像匹配函数(使用相对路径)
+    const matchResult = await matchImage(relativeScreenshotPath, relativeRegionPath, width, height);
     
     if (!matchResult.success) {
       return { success: false, error: matchResult.error || '图像匹配失败' };
@@ -212,7 +305,7 @@ export async function matchImageRegionLocation(screenshotPath, regionPath, devic
       height: h,
       corners: corners,
       similarity: matchResult.similarity,
-      screenshotPath: absoluteScreenshotPath // 返回截图路径,用于后续裁剪
+      screenshotPath: relativeScreenshotPath // 返回截图路径(相对路径),用于后续裁剪
     };
   } catch (error) {
     // 图像区域定位失败
@@ -232,47 +325,37 @@ export async function matchImageRegionLocation(screenshotPath, regionPath, devic
  */
 export async function cropAndSaveImage(imagePath, x, y, width, height, savePath) {
   try {
-    // 处理相对路径,转换为绝对路径
-    let absoluteImagePath = imagePath;
-    if (!isAbsolute(imagePath)) {
-      // 如果是相对路径,相对于项目根目录
-      if (imagePath.startsWith('static/processing/')) {
-        absoluteImagePath = join(__dirname, '..', imagePath);
-      } else {
-        absoluteImagePath = join(__dirname, '..', imagePath);
+    // 使用相对路径(相对于项目根目录)
+    const projectRoot = join(__dirname, '..');
+    
+    // 如果传入的是绝对路径,转换为相对路径
+    let relativeImagePath = imagePath;
+    if (isAbsolute(imagePath)) {
+      try {
+        relativeImagePath = require('path').relative(projectRoot, imagePath).replace(/\\/g, '/');
+      } catch (e) {
+        relativeImagePath = imagePath.replace(/\\/g, '/');
       }
+    } else {
+      relativeImagePath = imagePath.replace(/\\/g, '/');
     }
     
-    let absoluteSavePath = savePath;
-    if (!isAbsolute(savePath)) {
-      // 如果是相对路径,需要判断是相对于工作流目录还是项目根目录
-      // 优先检查 savePath 是否已经包含完整路径(以 static/processing/ 开头)
-      if (savePath.startsWith('static/processing/')) {
-        // savePath 已经是完整路径,如 "static/processing/微信聊天自动发送工作流/history/chat-area-cropped.png"
-        // 直接拼接项目根目录即可,不需要再次提取工作流目录
-        absoluteSavePath = join(__dirname, '..', savePath);
-      } else if (imagePath.includes('static/processing/')) {
-        // savePath 是相对于工作流目录的,如 "history/chat-area-cropped.png"
-        // 从 imagePath 提取工作流目录路径
-        const workflowMatch = imagePath.match(/static\/processing\/[^\/]+/);
-        if (workflowMatch) {
-          absoluteSavePath = join(__dirname, '..', workflowMatch[0], savePath);
-        } else {
-          // 如果无法匹配,尝试从 imagePath 提取工作流目录(去掉 /resources/ScreenShot.jpg)
-          const workflowDir = imagePath.split('/resources/')[0];
-          absoluteSavePath = join(__dirname, '..', workflowDir, savePath);
-        }
-      } else {
-        // 默认相对于项目根目录
-        absoluteSavePath = join(__dirname, '..', savePath);
+    let relativeSavePath = savePath;
+    if (isAbsolute(savePath)) {
+      try {
+        relativeSavePath = require('path').relative(projectRoot, savePath).replace(/\\/g, '/');
+      } catch (e) {
+        relativeSavePath = savePath.replace(/\\/g, '/');
       }
+    } else {
+      relativeSavePath = savePath.replace(/\\/g, '/');
     }
     
     // 构建Python脚本代码
     // 使用 pathlib.Path 来处理路径,确保中文路径正确
-    // 将 Windows 路径转换为 Python 可以处理的格式
-    const normalizedImagePath = absoluteImagePath.replace(/\\/g, '/');
-    const normalizedSavePath = absoluteSavePath.replace(/\\/g, '/');
+    // 使用相对路径
+    const normalizedImagePath = relativeImagePath;
+    const normalizedSavePath = relativeSavePath;
     
     // 转义路径中的特殊字符,确保 Python 字符串正确
     const escapedImagePath = normalizedImagePath.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
@@ -400,15 +483,36 @@ except Exception as e:
     sys.exit(1)
 `;
 
-    // 获取Python可执行文件路径
-    const pythonExePath = join(__dirname, '..', 'py', 'venv', 'Scripts', 'python.exe');
+    // 使用相对路径(相对于项目根目录)
+    // projectRoot 已在函数开头声明(第 250 行),这里不需要重复声明
+    const venvRelativePath = 'py/venv';
+    const venvScriptsRelativePath = 'py/venv/Scripts';
+    const pythonExeRelativePath = 'py/venv/Scripts/python.exe';
+    
+    // 转换为绝对路径(用于环境变量)
+    const venvAbsolutePath = join(projectRoot, venvRelativePath);
+    const venvScriptsAbsolutePath = join(projectRoot, venvScriptsRelativePath);
+    const pythonExeAbsolutePath = join(projectRoot, pythonExeRelativePath);
+    
+    // 使用绝对路径执行 Python 命令(确保路径正确)
+    const pythonCommand = pythonExeAbsolutePath;
     
     // 执行Python脚本
     try {
-      const { stdout, stderr } = await execAsync(`"${pythonExePath}" -c "${pythonCode.replace(/"/g, '\\"')}"`, {
+      const env = {
+        ...process.env,
+        // 设置虚拟环境相关环境变量
+        VIRTUAL_ENV: venvAbsolutePath,
+        // 将虚拟环境的 Scripts 目录添加到 PATH 前面,确保使用虚拟环境中的工具
+        PATH: `${venvScriptsAbsolutePath};${process.env.PATH}`
+      };
+      
+      // 使用绝对路径的 Python 命令(用引号包裹,确保路径中的空格被正确处理)
+      const { stdout, stderr } = await execAsync(`"${pythonCommand}" -c "${pythonCode.replace(/"/g, '\\"')}"`, {
+        cwd: projectRoot, // 设置工作目录为项目根目录,这样相对路径才能正确解析
         maxBuffer: 10 * 1024 * 1024,
         encoding: 'utf8',
-        cwd: join(__dirname, '..')
+        env: env
       });
       
       // 检查是否有错误(Python脚本通过 sys.exit(1) 退出时,execAsync 会抛出错误)
@@ -421,7 +525,9 @@ except Exception as e:
       }
       
       // 验证文件是否真的保存了
-      // 检查截图文件是否存在
+      // 检查截图文件是否存在(使用绝对路径进行文件系统检查)
+      const absoluteImagePath = join(projectRoot, relativeImagePath);
+      const absoluteSavePath = join(projectRoot, relativeSavePath);
       const screenshotExists = fs.existsSync(absoluteImagePath);
       
       if (fs.existsSync(absoluteSavePath)) {
@@ -431,10 +537,10 @@ except Exception as e:
         const parentDir = dirname(absoluteSavePath);
         const parentExists = fs.existsSync(parentDir);
         
-        // 构建详细的错误信息
-        let errorMsg = `文件保存失败,文件不存在: ${absoluteSavePath}`;
+        // 构建详细的错误信息(显示相对路径)
+        let errorMsg = `文件保存失败,文件不存在: ${relativeSavePath}`;
         if (!screenshotExists) {
-          errorMsg += `\n截图文件不存在: ${absoluteImagePath}`;
+          errorMsg += `\n截图文件不存在: ${relativeImagePath}`;
         }
         if (!parentExists) {
           errorMsg += `\n保存目录不存在: ${parentDir}`;

+ 157 - 13
main-js/func/image-center-location.js

@@ -7,15 +7,90 @@
 
 import { exec } from 'child_process';
 import { promisify } from 'util';
-import { join, isAbsolute } from 'path';
+import { join, isAbsolute, dirname } from 'path';
 import { fileURLToPath } from 'url';
-import { dirname } from 'path';
-import { writeFile } from 'fs/promises';
+import { writeFile, readFile } from 'fs/promises';
+import { existsSync } from 'fs';
 
 const execAsync = promisify(exec);
 const __filename = fileURLToPath(import.meta.url);
 const __dirname = dirname(__filename);
 
+/**
+ * 确保 pyvenv.cfg 文件使用当前系统的 Python 路径
+ * @param {string} projectRoot - 项目根目录
+ * @returns {Promise<void>}
+ */
+async function ensurePyvenvConfig(projectRoot) {
+  const pyvenvCfgPath = join(projectRoot, 'py', 'venv', 'pyvenv.cfg');
+  
+  if (!existsSync(pyvenvCfgPath)) {
+    return; // 如果文件不存在,跳过
+  }
+  
+  try {
+    // 读取现有配置
+    const currentContent = await readFile(pyvenvCfgPath, 'utf8');
+    
+    // 尝试从现有配置中提取系统 Python 路径
+    const homeMatch = currentContent.match(/^home\s*=\s*(.+)$/m);
+    const executableMatch = currentContent.match(/^executable\s*=\s*(.+)$/m);
+    
+    // 如果配置文件中已经有路径,检查路径是否存在
+    if (homeMatch && executableMatch) {
+      const existingHome = homeMatch[1].trim();
+      const existingExecutable = executableMatch[1].trim();
+      
+      // 检查系统 Python 是否存在
+      if (existsSync(existingExecutable)) {
+        // 路径存在,不需要更新
+        return;
+      }
+    }
+    
+    // 如果配置文件中的路径不存在,使用系统 Python 检测
+    // 使用系统 Python(不是虚拟环境中的),因为我们需要检测系统 Python 路径
+    const { stdout } = await execAsync('python -c "import sys; import os; print(os.path.dirname(sys.executable))"', {
+      encoding: 'utf8',
+      timeout: 5000,
+      cwd: projectRoot
+    });
+    const pythonHome = stdout.trim();
+    
+    if (!pythonHome) {
+      return; // 如果无法检测,跳过
+    }
+    
+    const pythonExe = join(pythonHome, 'python.exe');
+    
+    // 检查系统 Python 是否存在
+    if (!existsSync(pythonExe)) {
+      return; // 系统 Python 不存在,跳过
+    }
+    
+    // 检测 Python 版本(使用系统 Python)
+    const { stdout: versionOutput } = await execAsync('python -c "import sys; print(\"{}.{}.{}\".format(sys.version_info.major, sys.version_info.minor, sys.version_info.micro))"', {
+      encoding: 'utf8',
+      timeout: 5000,
+      cwd: projectRoot
+    });
+    const pythonVersion = versionOutput.trim();
+    
+    // 更新配置
+    const newContent = `home = ${pythonHome}
+include-system-site-packages = false
+version = ${pythonVersion}
+executable = ${pythonExe}
+command = ${pythonExe} -m venv py/venv
+`;
+    
+    await writeFile(pyvenvCfgPath, newContent, 'utf8');
+  } catch (error) {
+    // 静默失败,不影响主流程
+    console.warn('无法更新 pyvenv.cfg:', error.message);
+  }
+}
+
 /**
  * 匹配图像
  * @param {string} screenshotPath - 截图路径
@@ -25,7 +100,31 @@ const __dirname = dirname(__filename);
  * @returns {Promise<{success: boolean, x?: number, y?: number, width?: number, height?: number, error?: string}>}
  */
 export async function matchImage(screenshotPath, templatePath, width, height) {
-  const pythonExePath = join(__dirname, '..', '..', 'py', 'venv', 'Scripts', 'python.exe');
+  // 使用相对路径(相对于项目根目录)
+  const projectRoot = join(__dirname, '..', '..');
+  
+  // 确保 pyvenv.cfg 使用当前系统的 Python 路径
+  await ensurePyvenvConfig(projectRoot);
+  
+  const venvRelativePath = 'py/venv';
+  const venvScriptsRelativePath = 'py/venv/Scripts';
+  const pythonExeRelativePath = 'py/venv/Scripts/python.exe';
+  
+  // 转换为绝对路径(用于文件检查和命令执行)
+  const venvAbsolutePath = join(projectRoot, venvRelativePath);
+  const venvScriptsAbsolutePath = join(projectRoot, venvScriptsRelativePath);
+  const pythonExeAbsolutePath = join(projectRoot, pythonExeRelativePath);
+  
+  // 检查虚拟环境中的 python.exe 是否存在
+  if (!existsSync(pythonExeAbsolutePath)) {
+    return { 
+      success: false, 
+      error: `虚拟环境中的 Python 可执行文件不存在: ${pythonExeRelativePath}\n请确保虚拟环境已正确安装。` 
+    };
+  }
+  
+  // 使用绝对路径执行 Python 命令(确保路径正确)
+  const pythonCommand = pythonExeAbsolutePath;
     
     // 构建内联 Python 脚本
     const pythonCode = `
@@ -165,14 +264,43 @@ if __name__ == '__main__':
         sys.exit(1)
 `;
 
-    // 将 Python 代码写入临时文件
-    const tempScriptPath = join(__dirname, '..', '..', 'temp_img_reg.py');
-    await writeFile(tempScriptPath, pythonCode, 'utf8');
+    // 将 Python 代码写入临时文件(使用相对路径)
+    const tempScriptPath = 'temp_img_reg.py';
+    const tempScriptAbsolutePath = join(projectRoot, tempScriptPath);
+    await writeFile(tempScriptAbsolutePath, pythonCode, 'utf8');
+    
+    // 临时脚本路径也使用相对路径(相对于项目根目录)
+    const tempScriptRelativePath = tempScriptPath;
+
+    // 使用相对路径(相对于项目根目录)
+    // 如果传入的是绝对路径,转换为相对路径
+    let relativeScreenshotPath = screenshotPath;
+    let relativeTemplatePath = templatePath;
+    
+    // 如果路径是绝对路径,尝试转换为相对路径
+    if (isAbsolute(screenshotPath)) {
+      try {
+        relativeScreenshotPath = require('path').relative(projectRoot, screenshotPath).replace(/\\/g, '/');
+      } catch (e) {
+        relativeScreenshotPath = screenshotPath.replace(/\\/g, '/');
+      }
+    } else {
+      relativeScreenshotPath = screenshotPath.replace(/\\/g, '/');
+    }
+    
+    if (isAbsolute(templatePath)) {
+      try {
+        relativeTemplatePath = require('path').relative(projectRoot, templatePath).replace(/\\/g, '/');
+      } catch (e) {
+        relativeTemplatePath = templatePath.replace(/\\/g, '/');
+      }
+    } else {
+      relativeTemplatePath = templatePath.replace(/\\/g, '/');
+    }
 
     // 构建命令
-    const normalizedScreenshotPath = screenshotPath.replace(/\\/g, '/');
-    const normalizedTemplatePath = templatePath.replace(/\\/g, '/');
-    const command = `"${pythonExePath}" "${tempScriptPath}" "${normalizedScreenshotPath}" "${normalizedTemplatePath}" ${width || ''} ${height || ''}`;
+    // 使用绝对路径的 Python 命令(用引号包裹,确保路径中的空格被正确处理),传递给 Python 的参数使用相对路径
+    const command = `"${pythonCommand}" "${tempScriptRelativePath}" "${relativeScreenshotPath}" "${relativeTemplatePath}" ${width || ''} ${height || ''}`;
 
     const env = {
       ...process.env,
@@ -183,14 +311,22 @@ if __name__ == '__main__':
       const { stdout, stderr } = await execAsync(command, {
         timeout: 30000,
         maxBuffer: 10 * 1024 * 1024,
-        cwd: join(__dirname, '..', '..'),
+        cwd: projectRoot, // 设置工作目录为项目根目录,这样相对路径才能正确解析
         encoding: 'utf8',
-        env: { ...env, PYTHONIOENCODING: 'utf-8', PYTHONUTF8: '1' }
+        env: { 
+          ...env, 
+          PYTHONIOENCODING: 'utf-8', 
+          PYTHONUTF8: '1',
+          // 设置虚拟环境相关环境变量
+          VIRTUAL_ENV: venvAbsolutePath,
+          // 将虚拟环境的 Scripts 目录添加到 PATH 前面,确保使用虚拟环境中的工具
+          PATH: `${venvScriptsAbsolutePath};${process.env.PATH}`
+        }
       });
 
       // 清理临时文件
       try {
-        await import('fs/promises').then(fs => fs.unlink(tempScriptPath));
+        await import('fs/promises').then(fs => fs.unlink(tempScriptAbsolutePath));
       } catch (e) {
         // 忽略删除失败
       }
@@ -207,6 +343,14 @@ if __name__ == '__main__':
     } catch (error) {
       // 如果有 stderr 输出,包含在错误信息中
       let errorMsg = error.message || '图像匹配失败';
+      
+      // 检查是否是 Python 路径问题
+      if (error.message && (error.message.includes('No Python') || error.message.includes('python.exe'))) {
+        errorMsg = `Python 环境配置错误: ${error.message}\n` +
+                   `使用的 Python 命令: ${pythonCommand}\n` +
+                   `请确保 Python 已正确配置在系统环境变量 PATH 中。`;
+      }
+      
       if (error.stderr) {
         errorMsg += `\nPython stderr: ${error.stderr}`;
       }

+ 185 - 34
main-js/func/ocr-chat.js

@@ -11,15 +11,90 @@
 
 import { exec } from 'child_process';
 import { promisify } from 'util';
-import { join, isAbsolute } from 'path';
+import { join, isAbsolute, dirname } from 'path';
 import { fileURLToPath } from 'url';
-import { dirname } from 'path';
-import { readFile, writeFile } from 'fs/promises';
+import { readFile, writeFile, mkdir } from 'fs/promises';
+import { existsSync, readdirSync, statSync } from 'fs';
 
 const execAsync = promisify(exec);
 const __filename = fileURLToPath(import.meta.url);
 const __dirname = dirname(__filename);
 
+/**
+ * 确保 pyvenv.cfg 文件使用当前系统的 Python 路径
+ * @param {string} projectRoot - 项目根目录
+ * @returns {Promise<void>}
+ */
+async function ensurePyvenvConfig(projectRoot) {
+  const pyvenvCfgPath = join(projectRoot, 'py', 'venv', 'pyvenv.cfg');
+  
+  if (!existsSync(pyvenvCfgPath)) {
+    return; // 如果文件不存在,跳过
+  }
+  
+  try {
+    // 读取现有配置
+    const currentContent = await readFile(pyvenvCfgPath, 'utf8');
+    
+    // 尝试从现有配置中提取系统 Python 路径
+    const homeMatch = currentContent.match(/^home\s*=\s*(.+)$/m);
+    const executableMatch = currentContent.match(/^executable\s*=\s*(.+)$/m);
+    
+    // 如果配置文件中已经有路径,检查路径是否存在
+    if (homeMatch && executableMatch) {
+      const existingHome = homeMatch[1].trim();
+      const existingExecutable = executableMatch[1].trim();
+      
+      // 检查系统 Python 是否存在
+      if (existsSync(existingExecutable)) {
+        // 路径存在,不需要更新
+        return;
+      }
+    }
+    
+    // 如果配置文件中的路径不存在,使用系统 Python 检测
+    // 使用系统 Python(不是虚拟环境中的),因为我们需要检测系统 Python 路径
+    const { stdout } = await execAsync('python -c "import sys; import os; print(os.path.dirname(sys.executable))"', {
+      encoding: 'utf8',
+      timeout: 5000,
+      cwd: projectRoot
+    });
+    const pythonHome = stdout.trim();
+    
+    if (!pythonHome) {
+      return; // 如果无法检测,跳过
+    }
+    
+    const pythonExe = join(pythonHome, 'python.exe');
+    
+    // 检查系统 Python 是否存在
+    if (!existsSync(pythonExe)) {
+      return; // 系统 Python 不存在,跳过
+    }
+    
+    // 检测 Python 版本(使用系统 Python)
+    const { stdout: versionOutput } = await execAsync('python -c "import sys; print(\"{}.{}.{}\".format(sys.version_info.major, sys.version_info.minor, sys.version_info.micro))"', {
+      encoding: 'utf8',
+      timeout: 5000,
+      cwd: projectRoot
+    });
+    const pythonVersion = versionOutput.trim();
+    
+    // 更新配置
+    const newContent = `home = ${pythonHome}
+include-system-site-packages = false
+version = ${pythonVersion}
+executable = ${pythonExe}
+command = ${pythonExe} -m venv py/venv
+`;
+    
+    await writeFile(pyvenvCfgPath, newContent, 'utf8');
+  } catch (error) {
+    // 静默失败,不影响主流程
+    console.warn('无法更新 pyvenv.cfg:', error.message);
+  }
+}
+
 /**
  * 安全读取包含 Unicode 字符的图片
  */
@@ -64,8 +139,24 @@ def read_image_safe(image_path):
  */
 export async function extractChatHistory(screenshotPath, friendAvatarPath, myAvatarPath, deviceWidth, deviceHeight, workflowFolder, regionJson = null, friendRgb = null, myRgb = null) {
   try {
-    const pythonExePath = join(__dirname, '..', '..', 'py', 'venv', 'Scripts', 'python.exe');
-    const onnxocrPath = join(__dirname, '..', '..', 'py', 'OnnxOCR');
+    // 使用相对路径(相对于项目根目录)
+    const projectRoot = join(__dirname, '..', '..');
+    
+    // 确保 pyvenv.cfg 使用当前系统的 Python 路径
+    await ensurePyvenvConfig(projectRoot);
+    
+    const venvRelativePath = 'py/venv';
+    const venvScriptsRelativePath = 'py/venv/Scripts';
+    const pythonExeRelativePath = 'py/venv/Scripts/python.exe';
+    
+    // 转换为绝对路径(用于环境变量)
+    const venvAbsolutePath = join(projectRoot, venvRelativePath);
+    const venvScriptsAbsolutePath = join(projectRoot, venvScriptsRelativePath);
+    const pythonExeAbsolutePath = join(projectRoot, pythonExeRelativePath);
+    
+    // 使用绝对路径执行 Python 命令(确保路径正确)
+    // 使用项目根目录 + py/venv/Scripts/python.exe
+    const pythonCommand = pythonExeAbsolutePath;
     
     // 构建内联 Python 脚本
     const pythonCode = `
@@ -76,9 +167,7 @@ import numpy as np
 import json
 from pathlib import Path
 
-# 添加 OnnxOCR 路径
-sys.path.insert(0, r"${onnxocrPath.replace(/\\/g, '/')}")
-
+# OnnxOCR 已通过 pip 安装到虚拟环境中,直接导入即可
 from onnxocr.onnx_paddleocr import ONNXPaddleOcr
 
 # 设置环境变量
@@ -506,31 +595,61 @@ if __name__ == '__main__':
     print(json.dumps(result, ensure_ascii=False))
 `;
 
-    // 将 Python 代码写入临时文件
-    const tempScriptPath = join(__dirname, '..', '..', 'temp_extract_chat_history.py');
-    await writeFile(tempScriptPath, pythonCode, 'utf8');
-
-    // 构建命令
-    const normalizedScreenshotPath = screenshotPath.replace(/\\/g, '/');
+    // 将 Python 代码写入临时文件(使用相对路径)
+    const tempScriptPath = 'temp_extract_chat_history.py';
+    const tempScriptAbsolutePath = join(projectRoot, tempScriptPath);
+    await writeFile(tempScriptAbsolutePath, pythonCode, 'utf8');
+
+    // 构建命令(使用相对路径)
+    // 如果传入的是绝对路径,转换为相对路径
+    let relativeScreenshotPath = screenshotPath;
+    if (isAbsolute(screenshotPath)) {
+      try {
+        relativeScreenshotPath = require('path').relative(projectRoot, screenshotPath).replace(/\\/g, '/');
+      } catch (e) {
+        relativeScreenshotPath = screenshotPath.replace(/\\/g, '/');
+      }
+    } else {
+      relativeScreenshotPath = screenshotPath.replace(/\\/g, '/');
+    }
+    
     let friendAvatarArg = 'None';
     if (friendAvatarPath) {
-      friendAvatarArg = isAbsolute(friendAvatarPath) 
-        ? friendAvatarPath.replace(/\\/g, '/')
-        : join(__dirname, '..', '..', 'static', 'processing', friendAvatarPath).replace(/\\/g, '/');
+      if (isAbsolute(friendAvatarPath)) {
+        try {
+          friendAvatarArg = require('path').relative(projectRoot, friendAvatarPath).replace(/\\/g, '/');
+        } catch (e) {
+          friendAvatarArg = friendAvatarPath.replace(/\\/g, '/');
+        }
+      } else {
+        friendAvatarArg = friendAvatarPath.replace(/\\/g, '/');
+      }
     }
     
     let myAvatarArg = 'None';
     if (myAvatarPath) {
-      myAvatarArg = isAbsolute(myAvatarPath)
-        ? myAvatarPath.replace(/\\/g, '/')
-        : join(__dirname, '..', '..', 'static', 'processing', myAvatarPath).replace(/\\/g, '/');
+      if (isAbsolute(myAvatarPath)) {
+        try {
+          myAvatarArg = require('path').relative(projectRoot, myAvatarPath).replace(/\\/g, '/');
+        } catch (e) {
+          myAvatarArg = myAvatarPath.replace(/\\/g, '/');
+        }
+      } else {
+        myAvatarArg = myAvatarPath.replace(/\\/g, '/');
+      }
     }
     
     let workflowFolderArg = 'None';
     if (workflowFolder) {
-      workflowFolderArg = isAbsolute(workflowFolder)
-        ? workflowFolder.replace(/\\/g, '/')
-        : join(__dirname, '..', '..', 'static', 'processing', workflowFolder).replace(/\\/g, '/');
+      if (isAbsolute(workflowFolder)) {
+        try {
+          workflowFolderArg = require('path').relative(projectRoot, workflowFolder).replace(/\\/g, '/');
+        } catch (e) {
+          workflowFolderArg = workflowFolder.replace(/\\/g, '/');
+        }
+      } else {
+        workflowFolderArg = workflowFolder.replace(/\\/g, '/');
+      }
     }
 
     // 传递区域参数(如果提供)
@@ -550,7 +669,8 @@ if __name__ == '__main__':
       myRgbArg = myRgb;
     }
     
-    const command = `"${pythonExePath}" "${tempScriptPath}" "${normalizedScreenshotPath}" "${friendAvatarArg}" "${myAvatarArg}" ${deviceWidth || 1080} ${deviceHeight || 2400} "${workflowFolderArg}" "${regionArg}" "${friendRgbArg}" "${myRgbArg}"`;
+    // 使用绝对路径的 Python 命令(用引号包裹,确保路径中的空格被正确处理),传递给 Python 的参数使用相对路径
+    const command = `"${pythonCommand}" "${tempScriptPath}" "${relativeScreenshotPath}" "${friendAvatarArg}" "${myAvatarArg}" ${deviceWidth || 1080} ${deviceHeight || 2400} "${workflowFolderArg}" "${regionArg}" "${friendRgbArg}" "${myRgbArg}"`;
 
     const env = {
       ...process.env,
@@ -560,9 +680,17 @@ if __name__ == '__main__':
     const { stdout, stderr } = await execAsync(command, {
       timeout: 60000,
       maxBuffer: 10 * 1024 * 1024,
-      cwd: join(__dirname, '..', '..'),
+      cwd: projectRoot, // 设置工作目录为项目根目录,这样相对路径才能正确解析
       encoding: 'utf8',
-      env: { ...env, PYTHONIOENCODING: 'utf-8', PYTHONUTF8: '1' }
+      env: { 
+        ...env, 
+        PYTHONIOENCODING: 'utf-8', 
+        PYTHONUTF8: '1',
+        // 设置虚拟环境相关环境变量
+        VIRTUAL_ENV: venvAbsolutePath,
+        // 将虚拟环境的 Scripts 目录添加到 PATH 前面,确保使用虚拟环境中的工具
+        PATH: `${venvScriptsAbsolutePath};${process.env.PATH}`
+      }
     });
 
     // 忽略 Python 脚本的 stderr 输出
@@ -622,8 +750,24 @@ export async function getLastMessage(screenshotPath, friendAvatarPath, myAvatarP
  */
 export async function ocrFullScreen(screenshotPath, deviceWidth, deviceHeight) {
   try {
-    const pythonExePath = join(__dirname, '..', '..', 'py', 'venv', 'Scripts', 'python.exe');
-    const onnxocrPath = join(__dirname, '..', '..', 'py', 'OnnxOCR');
+    // 使用相对路径(相对于项目根目录)
+    const projectRoot = join(__dirname, '..', '..');
+    
+    // 确保 pyvenv.cfg 使用当前系统的 Python 路径
+    await ensurePyvenvConfig(projectRoot);
+    
+    const venvRelativePath = 'py/venv';
+    const venvScriptsRelativePath = 'py/venv/Scripts';
+    const pythonExeRelativePath = 'py/venv/Scripts/python.exe';
+    
+    // 转换为绝对路径(用于环境变量)
+    const venvAbsolutePath = join(projectRoot, venvRelativePath);
+    const venvScriptsAbsolutePath = join(projectRoot, venvScriptsRelativePath);
+    const pythonExeAbsolutePath = join(projectRoot, pythonExeRelativePath);
+    
+    // 使用绝对路径执行 Python 命令(确保路径正确)
+    // 使用项目根目录 + py/venv/Scripts/python.exe
+    const pythonCommand = pythonExeAbsolutePath;
     
     const pythonCode = `
 import sys
@@ -632,9 +776,7 @@ import cv2
 import numpy as np
 import json
 
-# 添加 OnnxOCR 路径
-sys.path.insert(0, r"${onnxocrPath.replace(/\\/g, '/')}")
-
+# OnnxOCR 已通过 pip 安装到虚拟环境中,直接导入即可
 from onnxocr.onnx_paddleocr import ONNXPaddleOcr
 
 # 设置环境变量
@@ -697,7 +839,8 @@ if __name__ == '__main__':
     await writeFile(tempScriptPath, pythonCode, 'utf8');
 
     const normalizedScreenshotPath = screenshotPath.replace(/\\/g, '/');
-    const command = `"${pythonExePath}" "${tempScriptPath}" "${normalizedScreenshotPath}"`;
+    // 使用绝对路径的 Python 命令(用引号包裹,确保路径中的空格被正确处理)
+    const command = `"${pythonCommand}" "${tempScriptPath}" "${normalizedScreenshotPath}"`;
 
     const env = {
       ...process.env,
@@ -707,9 +850,17 @@ if __name__ == '__main__':
     const { stdout, stderr } = await execAsync(command, {
       timeout: 60000,
       maxBuffer: 10 * 1024 * 1024,
-      cwd: join(__dirname, '..', '..'),
+      cwd: projectRoot, // 设置工作目录为项目根目录,这样相对路径才能正确解析
       encoding: 'utf8',
-      env: { ...env, PYTHONIOENCODING: 'utf-8', PYTHONUTF8: '1' }
+      env: { 
+        ...env, 
+        PYTHONIOENCODING: 'utf-8', 
+        PYTHONUTF8: '1',
+        // 设置虚拟环境相关环境变量
+        VIRTUAL_ENV: venvAbsolutePath,
+        // 将虚拟环境的 Scripts 目录添加到 PATH 前面,确保使用虚拟环境中的工具
+        PATH: `${venvScriptsAbsolutePath};${process.env.PATH}`
+      }
     });
 
     // 清理临时文件

+ 8 - 8
node_modules/.vite/deps/_metadata.json

@@ -1,37 +1,37 @@
 {
-  "hash": "29f0465f",
-  "configHash": "cf599be1",
+  "hash": "a7cef3fc",
+  "configHash": "f37baff5",
   "lockfileHash": "0bc5dcf5",
-  "browserHash": "6dc5b351",
+  "browserHash": "ec7ac26f",
   "optimized": {
     "react": {
       "src": "../../react/index.js",
       "file": "react.js",
-      "fileHash": "3a9d2efb",
+      "fileHash": "efdaebb4",
       "needsInterop": true
     },
     "react-dom": {
       "src": "../../react-dom/index.js",
       "file": "react-dom.js",
-      "fileHash": "a6195955",
+      "fileHash": "067d02c0",
       "needsInterop": true
     },
     "react/jsx-dev-runtime": {
       "src": "../../react/jsx-dev-runtime.js",
       "file": "react_jsx-dev-runtime.js",
-      "fileHash": "1a627eef",
+      "fileHash": "b6ba0953",
       "needsInterop": true
     },
     "react/jsx-runtime": {
       "src": "../../react/jsx-runtime.js",
       "file": "react_jsx-runtime.js",
-      "fileHash": "c6ef57ca",
+      "fileHash": "c218214c",
       "needsInterop": true
     },
     "react-dom/client": {
       "src": "../../react-dom/client.js",
       "file": "react-dom_client.js",
-      "fileHash": "8aa33148",
+      "fileHash": "e4840104",
       "needsInterop": true
     }
   },

+ 8 - 0
node_modules/@electron/get/dist/cjs/Cache.d.ts

@@ -0,0 +1,8 @@
+export declare class Cache {
+    private cacheRoot;
+    constructor(cacheRoot?: string);
+    static getCacheDirectory(downloadUrl: string): string;
+    getCachePath(downloadUrl: string, fileName: string): string;
+    getPathForFileInCache(url: string, fileName: string): Promise<string | null>;
+    putFileInCache(url: string, currentPath: string, fileName: string): Promise<string>;
+}

+ 60 - 0
node_modules/@electron/get/dist/cjs/Cache.js

@@ -0,0 +1,60 @@
+"use strict";
+var __rest = (this && this.__rest) || function (s, e) {
+    var t = {};
+    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+        t[p] = s[p];
+    if (s != null && typeof Object.getOwnPropertySymbols === "function")
+        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+                t[p[i]] = s[p[i]];
+        }
+    return t;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const debug_1 = require("debug");
+const env_paths_1 = require("env-paths");
+const fs = require("fs-extra");
+const path = require("path");
+const url = require("url");
+const crypto = require("crypto");
+const d = debug_1.default('@electron/get:cache');
+const defaultCacheRoot = env_paths_1.default('electron', {
+    suffix: '',
+}).cache;
+class Cache {
+    constructor(cacheRoot = defaultCacheRoot) {
+        this.cacheRoot = cacheRoot;
+    }
+    static getCacheDirectory(downloadUrl) {
+        const parsedDownloadUrl = url.parse(downloadUrl);
+        // eslint-disable-next-line @typescript-eslint/no-unused-vars
+        const { search, hash, pathname } = parsedDownloadUrl, rest = __rest(parsedDownloadUrl, ["search", "hash", "pathname"]);
+        const strippedUrl = url.format(Object.assign(Object.assign({}, rest), { pathname: path.dirname(pathname || 'electron') }));
+        return crypto
+            .createHash('sha256')
+            .update(strippedUrl)
+            .digest('hex');
+    }
+    getCachePath(downloadUrl, fileName) {
+        return path.resolve(this.cacheRoot, Cache.getCacheDirectory(downloadUrl), fileName);
+    }
+    async getPathForFileInCache(url, fileName) {
+        const cachePath = this.getCachePath(url, fileName);
+        if (await fs.pathExists(cachePath)) {
+            return cachePath;
+        }
+        return null;
+    }
+    async putFileInCache(url, currentPath, fileName) {
+        const cachePath = this.getCachePath(url, fileName);
+        d(`Moving ${currentPath} to ${cachePath}`);
+        if (await fs.pathExists(cachePath)) {
+            d('* Replacing existing file');
+            await fs.remove(cachePath);
+        }
+        await fs.move(currentPath, cachePath);
+        return cachePath;
+    }
+}
+exports.Cache = Cache;
+//# sourceMappingURL=Cache.js.map

+ 1 - 0
node_modules/@electron/get/dist/cjs/Cache.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../src/Cache.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,iCAA0B;AAC1B,yCAAiC;AACjC,+BAA+B;AAC/B,6BAA6B;AAC7B,2BAA2B;AAC3B,iCAAiC;AAEjC,MAAM,CAAC,GAAG,eAAK,CAAC,qBAAqB,CAAC,CAAC;AAEvC,MAAM,gBAAgB,GAAG,mBAAQ,CAAC,UAAU,EAAE;IAC5C,MAAM,EAAE,EAAE;CACX,CAAC,CAAC,KAAK,CAAC;AAET,MAAa,KAAK;IAChB,YAAoB,YAAY,gBAAgB;QAA5B,cAAS,GAAT,SAAS,CAAmB;IAAG,CAAC;IAE7C,MAAM,CAAC,iBAAiB,CAAC,WAAmB;QACjD,MAAM,iBAAiB,GAAG,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACjD,6DAA6D;QAC7D,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,KAAc,iBAAiB,EAA7B,gEAA6B,CAAC;QAC9D,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,iCAAM,IAAI,KAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,UAAU,CAAC,IAAG,CAAC;QAE5F,OAAO,MAAM;aACV,UAAU,CAAC,QAAQ,CAAC;aACpB,MAAM,CAAC,WAAW,CAAC;aACnB,MAAM,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAEM,YAAY,CAAC,WAAmB,EAAE,QAAgB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC;IACtF,CAAC;IAEM,KAAK,CAAC,qBAAqB,CAAC,GAAW,EAAE,QAAgB;QAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACnD,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAClC,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,GAAW,EAAE,WAAmB,EAAE,QAAgB;QAC5E,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACnD,CAAC,CAAC,UAAU,WAAW,OAAO,SAAS,EAAE,CAAC,CAAC;QAC3C,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAClC,CAAC,CAAC,2BAA2B,CAAC,CAAC;YAC/B,MAAM,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;SAC5B;QAED,MAAM,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QAEtC,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAxCD,sBAwCC"}

+ 3 - 0
node_modules/@electron/get/dist/cjs/Downloader.d.ts

@@ -0,0 +1,3 @@
+export interface Downloader<T> {
+    download(url: string, targetFilePath: string, options: T): Promise<void>;
+}

+ 3 - 0
node_modules/@electron/get/dist/cjs/Downloader.js

@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=Downloader.js.map

+ 1 - 0
node_modules/@electron/get/dist/cjs/Downloader.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"Downloader.js","sourceRoot":"","sources":["../../src/Downloader.ts"],"names":[],"mappings":""}

+ 21 - 0
node_modules/@electron/get/dist/cjs/GotDownloader.d.ts

@@ -0,0 +1,21 @@
+import { Progress as GotProgress, Options as GotOptions } from 'got';
+import { Downloader } from './Downloader';
+/**
+ * See [`got#options`](https://github.com/sindresorhus/got#options) for possible keys/values.
+ */
+export declare type GotDownloaderOptions = (GotOptions & {
+    isStream?: true;
+}) & {
+    /**
+     * if defined, triggers every time `got`'s `downloadProgress` event callback is triggered.
+     */
+    getProgressCallback?: (progress: GotProgress) => Promise<void>;
+    /**
+     * if `true`, disables the console progress bar (setting the `ELECTRON_GET_NO_PROGRESS`
+     * environment variable to a non-empty value also does this).
+     */
+    quiet?: boolean;
+};
+export declare class GotDownloader implements Downloader<GotDownloaderOptions> {
+    download(url: string, targetFilePath: string, options?: GotDownloaderOptions): Promise<void>;
+}

+ 76 - 0
node_modules/@electron/get/dist/cjs/GotDownloader.js

@@ -0,0 +1,76 @@
+"use strict";
+var __rest = (this && this.__rest) || function (s, e) {
+    var t = {};
+    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+        t[p] = s[p];
+    if (s != null && typeof Object.getOwnPropertySymbols === "function")
+        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+                t[p[i]] = s[p[i]];
+        }
+    return t;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const fs = require("fs-extra");
+const got_1 = require("got");
+const path = require("path");
+const ProgressBar = require("progress");
+const PROGRESS_BAR_DELAY_IN_SECONDS = 30;
+class GotDownloader {
+    async download(url, targetFilePath, options) {
+        if (!options) {
+            options = {};
+        }
+        const { quiet, getProgressCallback } = options, gotOptions = __rest(options, ["quiet", "getProgressCallback"]);
+        let downloadCompleted = false;
+        let bar;
+        let progressPercent;
+        let timeout = undefined;
+        await fs.mkdirp(path.dirname(targetFilePath));
+        const writeStream = fs.createWriteStream(targetFilePath);
+        if (!quiet || !process.env.ELECTRON_GET_NO_PROGRESS) {
+            const start = new Date();
+            timeout = setTimeout(() => {
+                if (!downloadCompleted) {
+                    bar = new ProgressBar(`Downloading ${path.basename(url)}: [:bar] :percent ETA: :eta seconds `, {
+                        curr: progressPercent,
+                        total: 100,
+                    });
+                    // https://github.com/visionmedia/node-progress/issues/159
+                    // eslint-disable-next-line @typescript-eslint/no-explicit-any
+                    bar.start = start;
+                }
+            }, PROGRESS_BAR_DELAY_IN_SECONDS * 1000);
+        }
+        await new Promise((resolve, reject) => {
+            const downloadStream = got_1.default.stream(url, gotOptions);
+            downloadStream.on('downloadProgress', async (progress) => {
+                progressPercent = progress.percent;
+                if (bar) {
+                    bar.update(progress.percent);
+                }
+                if (getProgressCallback) {
+                    await getProgressCallback(progress);
+                }
+            });
+            downloadStream.on('error', error => {
+                if (error instanceof got_1.HTTPError && error.response.statusCode === 404) {
+                    error.message += ` for ${error.response.url}`;
+                }
+                if (writeStream.destroy) {
+                    writeStream.destroy(error);
+                }
+                reject(error);
+            });
+            writeStream.on('error', error => reject(error));
+            writeStream.on('close', () => resolve());
+            downloadStream.pipe(writeStream);
+        });
+        downloadCompleted = true;
+        if (timeout) {
+            clearTimeout(timeout);
+        }
+    }
+}
+exports.GotDownloader = GotDownloader;
+//# sourceMappingURL=GotDownloader.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/@electron/get/dist/cjs/GotDownloader.js.map


+ 4 - 0
node_modules/@electron/get/dist/cjs/artifact-utils.d.ts

@@ -0,0 +1,4 @@
+import { ElectronArtifactDetails } from './types';
+export declare function getArtifactFileName(details: ElectronArtifactDetails): string;
+export declare function getArtifactRemoteURL(details: ElectronArtifactDetails): Promise<string>;
+export declare function getArtifactVersion(details: ElectronArtifactDetails): string;

+ 66 - 0
node_modules/@electron/get/dist/cjs/artifact-utils.js

@@ -0,0 +1,66 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const utils_1 = require("./utils");
+const BASE_URL = 'https://github.com/electron/electron/releases/download/';
+const NIGHTLY_BASE_URL = 'https://github.com/electron/nightlies/releases/download/';
+function getArtifactFileName(details) {
+    utils_1.ensureIsTruthyString(details, 'artifactName');
+    if (details.isGeneric) {
+        return details.artifactName;
+    }
+    utils_1.ensureIsTruthyString(details, 'arch');
+    utils_1.ensureIsTruthyString(details, 'platform');
+    utils_1.ensureIsTruthyString(details, 'version');
+    return `${[
+        details.artifactName,
+        details.version,
+        details.platform,
+        details.arch,
+        ...(details.artifactSuffix ? [details.artifactSuffix] : []),
+    ].join('-')}.zip`;
+}
+exports.getArtifactFileName = getArtifactFileName;
+function mirrorVar(name, options, defaultValue) {
+    // Convert camelCase to camel_case for env var reading
+    const snakeName = name.replace(/([a-z])([A-Z])/g, (_, a, b) => `${a}_${b}`).toLowerCase();
+    return (
+    // .npmrc
+    process.env[`npm_config_electron_${name.toLowerCase()}`] ||
+        process.env[`NPM_CONFIG_ELECTRON_${snakeName.toUpperCase()}`] ||
+        process.env[`npm_config_electron_${snakeName}`] ||
+        // package.json
+        process.env[`npm_package_config_electron_${name}`] ||
+        process.env[`npm_package_config_electron_${snakeName.toLowerCase()}`] ||
+        // env
+        process.env[`ELECTRON_${snakeName.toUpperCase()}`] ||
+        options[name] ||
+        defaultValue);
+}
+async function getArtifactRemoteURL(details) {
+    const opts = details.mirrorOptions || {};
+    let base = mirrorVar('mirror', opts, BASE_URL);
+    if (details.version.includes('nightly')) {
+        const nightlyDeprecated = mirrorVar('nightly_mirror', opts, '');
+        if (nightlyDeprecated) {
+            base = nightlyDeprecated;
+            console.warn(`nightly_mirror is deprecated, please use nightlyMirror`);
+        }
+        else {
+            base = mirrorVar('nightlyMirror', opts, NIGHTLY_BASE_URL);
+        }
+    }
+    const path = mirrorVar('customDir', opts, details.version).replace('{{ version }}', details.version.replace(/^v/, ''));
+    const file = mirrorVar('customFilename', opts, getArtifactFileName(details));
+    // Allow customized download URL resolution.
+    if (opts.resolveAssetURL) {
+        const url = await opts.resolveAssetURL(details);
+        return url;
+    }
+    return `${base}${path}/${file}`;
+}
+exports.getArtifactRemoteURL = getArtifactRemoteURL;
+function getArtifactVersion(details) {
+    return utils_1.normalizeVersion(mirrorVar('customVersion', details.mirrorOptions || {}, details.version));
+}
+exports.getArtifactVersion = getArtifactVersion;
+//# sourceMappingURL=artifact-utils.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/@electron/get/dist/cjs/artifact-utils.js.map


+ 3 - 0
node_modules/@electron/get/dist/cjs/downloader-resolver.d.ts

@@ -0,0 +1,3 @@
+import { DownloadOptions } from './types';
+import { Downloader } from './Downloader';
+export declare function getDownloaderForSystem(): Promise<Downloader<DownloadOptions>>;

+ 12 - 0
node_modules/@electron/get/dist/cjs/downloader-resolver.js

@@ -0,0 +1,12 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+async function getDownloaderForSystem() {
+    // TODO: Resolve the downloader or default to GotDownloader
+    // Current thoughts are a dot-file traversal for something like
+    // ".electron.downloader" which would be a text file with the name of the
+    // npm module to import() and use as the downloader
+    const { GotDownloader } = await Promise.resolve().then(() => require('./GotDownloader'));
+    return new GotDownloader();
+}
+exports.getDownloaderForSystem = getDownloaderForSystem;
+//# sourceMappingURL=downloader-resolver.js.map

+ 1 - 0
node_modules/@electron/get/dist/cjs/downloader-resolver.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"downloader-resolver.js","sourceRoot":"","sources":["../../src/downloader-resolver.ts"],"names":[],"mappings":";;AAGO,KAAK,UAAU,sBAAsB;IAC1C,2DAA2D;IAC3D,+DAA+D;IAC/D,yEAAyE;IACzE,mDAAmD;IACnD,MAAM,EAAE,aAAa,EAAE,GAAG,2CAAa,iBAAiB,EAAC,CAAC;IAC1D,OAAO,IAAI,aAAa,EAAE,CAAC;AAC7B,CAAC;AAPD,wDAOC"}

+ 18 - 0
node_modules/@electron/get/dist/cjs/index.d.ts

@@ -0,0 +1,18 @@
+import { ElectronDownloadRequestOptions, ElectronPlatformArtifactDetailsWithDefaults } from './types';
+export { getHostArch } from './utils';
+export { initializeProxy } from './proxy';
+export * from './types';
+/**
+ * Downloads an artifact from an Electron release and returns an absolute path
+ * to the downloaded file.
+ *
+ * @param artifactDetails - The information required to download the artifact
+ */
+export declare function downloadArtifact(_artifactDetails: ElectronPlatformArtifactDetailsWithDefaults): Promise<string>;
+/**
+ * Downloads a specific version of Electron and returns an absolute path to a
+ * ZIP file.
+ *
+ * @param version - The version of Electron you want to download
+ */
+export declare function download(version: string, options?: ElectronDownloadRequestOptions): Promise<string>;

+ 140 - 0
node_modules/@electron/get/dist/cjs/index.js

@@ -0,0 +1,140 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const debug_1 = require("debug");
+const fs = require("fs-extra");
+const path = require("path");
+const semver = require("semver");
+const sumchecker = require("sumchecker");
+const artifact_utils_1 = require("./artifact-utils");
+const Cache_1 = require("./Cache");
+const downloader_resolver_1 = require("./downloader-resolver");
+const proxy_1 = require("./proxy");
+const utils_1 = require("./utils");
+var utils_2 = require("./utils");
+exports.getHostArch = utils_2.getHostArch;
+var proxy_2 = require("./proxy");
+exports.initializeProxy = proxy_2.initializeProxy;
+const d = debug_1.default('@electron/get:index');
+if (process.env.ELECTRON_GET_USE_PROXY) {
+    proxy_1.initializeProxy();
+}
+async function validateArtifact(artifactDetails, downloadedAssetPath, _downloadArtifact) {
+    return await utils_1.withTempDirectoryIn(artifactDetails.tempDirectory, async (tempFolder) => {
+        // Don't try to verify the hash of the hash file itself
+        // and for older versions that don't have a SHASUMS256.txt
+        if (!artifactDetails.artifactName.startsWith('SHASUMS256') &&
+            !artifactDetails.unsafelyDisableChecksums &&
+            semver.gte(artifactDetails.version, '1.3.2')) {
+            let shasumPath;
+            const checksums = artifactDetails.checksums;
+            if (checksums) {
+                shasumPath = path.resolve(tempFolder, 'SHASUMS256.txt');
+                const fileNames = Object.keys(checksums);
+                if (fileNames.length === 0) {
+                    throw new Error('Provided "checksums" object is empty, cannot generate a valid SHASUMS256.txt');
+                }
+                const generatedChecksums = fileNames
+                    .map(fileName => `${checksums[fileName]} *${fileName}`)
+                    .join('\n');
+                await fs.writeFile(shasumPath, generatedChecksums);
+            }
+            else {
+                shasumPath = await _downloadArtifact({
+                    isGeneric: true,
+                    version: artifactDetails.version,
+                    artifactName: 'SHASUMS256.txt',
+                    force: artifactDetails.force,
+                    downloadOptions: artifactDetails.downloadOptions,
+                    cacheRoot: artifactDetails.cacheRoot,
+                    downloader: artifactDetails.downloader,
+                    mirrorOptions: artifactDetails.mirrorOptions,
+                });
+            }
+            // For versions 1.3.2 - 1.3.4, need to overwrite the `defaultTextEncoding` option:
+            // https://github.com/electron/electron/pull/6676#discussion_r75332120
+            if (semver.satisfies(artifactDetails.version, '1.3.2 - 1.3.4')) {
+                const validatorOptions = {};
+                validatorOptions.defaultTextEncoding = 'binary';
+                const checker = new sumchecker.ChecksumValidator('sha256', shasumPath, validatorOptions);
+                await checker.validate(path.dirname(downloadedAssetPath), path.basename(downloadedAssetPath));
+            }
+            else {
+                await sumchecker('sha256', shasumPath, path.dirname(downloadedAssetPath), [
+                    path.basename(downloadedAssetPath),
+                ]);
+            }
+        }
+    });
+}
+/**
+ * Downloads an artifact from an Electron release and returns an absolute path
+ * to the downloaded file.
+ *
+ * @param artifactDetails - The information required to download the artifact
+ */
+async function downloadArtifact(_artifactDetails) {
+    const artifactDetails = Object.assign({}, _artifactDetails);
+    if (!_artifactDetails.isGeneric) {
+        const platformArtifactDetails = artifactDetails;
+        if (!platformArtifactDetails.platform) {
+            d('No platform found, defaulting to the host platform');
+            platformArtifactDetails.platform = process.platform;
+        }
+        if (platformArtifactDetails.arch) {
+            platformArtifactDetails.arch = utils_1.getNodeArch(platformArtifactDetails.arch);
+        }
+        else {
+            d('No arch found, defaulting to the host arch');
+            platformArtifactDetails.arch = utils_1.getHostArch();
+        }
+    }
+    utils_1.ensureIsTruthyString(artifactDetails, 'version');
+    artifactDetails.version = artifact_utils_1.getArtifactVersion(artifactDetails);
+    const fileName = artifact_utils_1.getArtifactFileName(artifactDetails);
+    const url = await artifact_utils_1.getArtifactRemoteURL(artifactDetails);
+    const cache = new Cache_1.Cache(artifactDetails.cacheRoot);
+    // Do not check if the file exists in the cache when force === true
+    if (!artifactDetails.force) {
+        d(`Checking the cache (${artifactDetails.cacheRoot}) for ${fileName} (${url})`);
+        const cachedPath = await cache.getPathForFileInCache(url, fileName);
+        if (cachedPath === null) {
+            d('Cache miss');
+        }
+        else {
+            d('Cache hit');
+            try {
+                await validateArtifact(artifactDetails, cachedPath, downloadArtifact);
+                return cachedPath;
+            }
+            catch (err) {
+                d("Artifact in cache didn't match checksums", err);
+                d('falling back to re-download');
+            }
+        }
+    }
+    if (!artifactDetails.isGeneric &&
+        utils_1.isOfficialLinuxIA32Download(artifactDetails.platform, artifactDetails.arch, artifactDetails.version, artifactDetails.mirrorOptions)) {
+        console.warn('Official Linux/ia32 support is deprecated.');
+        console.warn('For more info: https://electronjs.org/blog/linux-32bit-support');
+    }
+    return await utils_1.withTempDirectoryIn(artifactDetails.tempDirectory, async (tempFolder) => {
+        const tempDownloadPath = path.resolve(tempFolder, artifact_utils_1.getArtifactFileName(artifactDetails));
+        const downloader = artifactDetails.downloader || (await downloader_resolver_1.getDownloaderForSystem());
+        d(`Downloading ${url} to ${tempDownloadPath} with options: ${JSON.stringify(artifactDetails.downloadOptions)}`);
+        await downloader.download(url, tempDownloadPath, artifactDetails.downloadOptions);
+        await validateArtifact(artifactDetails, tempDownloadPath, downloadArtifact);
+        return await cache.putFileInCache(url, tempDownloadPath, fileName);
+    });
+}
+exports.downloadArtifact = downloadArtifact;
+/**
+ * Downloads a specific version of Electron and returns an absolute path to a
+ * ZIP file.
+ *
+ * @param version - The version of Electron you want to download
+ */
+function download(version, options) {
+    return downloadArtifact(Object.assign(Object.assign({}, options), { version, platform: process.platform, arch: process.arch, artifactName: 'electron' }));
+}
+exports.download = download;
+//# sourceMappingURL=index.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/@electron/get/dist/cjs/index.js.map


+ 4 - 0
node_modules/@electron/get/dist/cjs/proxy.d.ts

@@ -0,0 +1,4 @@
+/**
+ * Initializes a third-party proxy module for HTTP(S) requests.
+ */
+export declare function initializeProxy(): void;

+ 27 - 0
node_modules/@electron/get/dist/cjs/proxy.js

@@ -0,0 +1,27 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const debug = require("debug");
+const utils_1 = require("./utils");
+const d = debug('@electron/get:proxy');
+/**
+ * Initializes a third-party proxy module for HTTP(S) requests.
+ */
+function initializeProxy() {
+    try {
+        // See: https://github.com/electron/get/pull/214#discussion_r798845713
+        const env = utils_1.getEnv('GLOBAL_AGENT_');
+        utils_1.setEnv('GLOBAL_AGENT_HTTP_PROXY', env('HTTP_PROXY'));
+        utils_1.setEnv('GLOBAL_AGENT_HTTPS_PROXY', env('HTTPS_PROXY'));
+        utils_1.setEnv('GLOBAL_AGENT_NO_PROXY', env('NO_PROXY'));
+        /**
+         * TODO: replace global-agent with a hpagent. @BlackHole1
+         * https://github.com/sindresorhus/got/blob/HEAD/documentation/tips.md#proxying
+         */
+        require('global-agent').bootstrap();
+    }
+    catch (e) {
+        d('Could not load either proxy modules, built-in proxy support not available:', e);
+    }
+}
+exports.initializeProxy = initializeProxy;
+//# sourceMappingURL=proxy.js.map

+ 1 - 0
node_modules/@electron/get/dist/cjs/proxy.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../src/proxy.ts"],"names":[],"mappings":";;AAAA,+BAA+B;AAC/B,mCAAyC;AAEzC,MAAM,CAAC,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC;AAEvC;;GAEG;AACH,SAAgB,eAAe;IAC7B,IAAI;QACF,sEAAsE;QACtE,MAAM,GAAG,GAAG,cAAM,CAAC,eAAe,CAAC,CAAC;QAEpC,cAAM,CAAC,yBAAyB,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;QACrD,cAAM,CAAC,0BAA0B,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;QACvD,cAAM,CAAC,uBAAuB,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;QAEjD;;;WAGG;QACH,OAAO,CAAC,cAAc,CAAC,CAAC,SAAS,EAAE,CAAC;KACrC;IAAC,OAAO,CAAC,EAAE;QACV,CAAC,CAAC,4EAA4E,EAAE,CAAC,CAAC,CAAC;KACpF;AACH,CAAC;AAjBD,0CAiBC"}

+ 129 - 0
node_modules/@electron/get/dist/cjs/types.d.ts

@@ -0,0 +1,129 @@
+import { Downloader } from './Downloader';
+export declare type DownloadOptions = any;
+export interface MirrorOptions {
+    /**
+     * DEPRECATED - see nightlyMirror.
+     */
+    nightly_mirror?: string;
+    /**
+     * The Electron nightly-specific mirror URL.
+     */
+    nightlyMirror?: string;
+    /**
+     * The base URL of the mirror to download from,
+     * e.g https://github.com/electron/electron/releases/download
+     */
+    mirror?: string;
+    /**
+     * The name of the directory to download from,
+     * often scoped by version number e.g 'v4.0.4'
+     */
+    customDir?: string;
+    /**
+     * The name of the asset to download,
+     * e.g 'electron-v4.0.4-linux-x64.zip'
+     */
+    customFilename?: string;
+    /**
+     * The version of the asset to download,
+     * e.g '4.0.4'
+     */
+    customVersion?: string;
+    /**
+     * A function allowing customization of the url returned
+     * from getArtifactRemoteURL().
+     */
+    resolveAssetURL?: (opts: DownloadOptions) => Promise<string>;
+}
+export interface ElectronDownloadRequest {
+    /**
+     * The version of Electron associated with the artifact.
+     */
+    version: string;
+    /**
+     * The type of artifact. For example:
+     * * `electron`
+     * * `ffmpeg`
+     */
+    artifactName: string;
+}
+export interface ElectronDownloadRequestOptions {
+    /**
+     * Whether to download an artifact regardless of whether it's in the cache directory.
+     *
+     * Defaults to `false`.
+     */
+    force?: boolean;
+    /**
+     * When set to `true`, disables checking that the artifact download completed successfully
+     * with the correct payload.
+     *
+     * Defaults to `false`.
+     */
+    unsafelyDisableChecksums?: boolean;
+    /**
+     * Provides checksums for the artifact as strings.
+     * Can be used if you already know the checksums of the Electron artifact
+     * you are downloading and want to skip the checksum file download
+     * without skipping the checksum validation.
+     *
+     * This should be an object whose keys are the file names of the artifacts and
+     * the values are their respective SHA256 checksums.
+     */
+    checksums?: Record<string, string>;
+    /**
+     * The directory that caches Electron artifact downloads.
+     *
+     * The default value is dependent upon the host platform:
+     *
+     * * Linux: `$XDG_CACHE_HOME` or `~/.cache/electron/`
+     * * MacOS: `~/Library/Caches/electron/`
+     * * Windows: `%LOCALAPPDATA%/electron/Cache` or `~/AppData/Local/electron/Cache/`
+     */
+    cacheRoot?: string;
+    /**
+     * Options passed to the downloader module.
+     */
+    downloadOptions?: DownloadOptions;
+    /**
+     * Options related to specifying an artifact mirror.
+     */
+    mirrorOptions?: MirrorOptions;
+    /**
+     * The custom [[Downloader]] class used to download artifacts. Defaults to the
+     * built-in [[GotDownloader]].
+     */
+    downloader?: Downloader<DownloadOptions>;
+    /**
+     * A temporary directory for downloads.
+     * It is used before artifacts are put into cache.
+     */
+    tempDirectory?: string;
+}
+export declare type ElectronPlatformArtifactDetails = {
+    /**
+     * The target artifact platform. These are Node-style platform names, for example:
+     * * `win32`
+     * * `darwin`
+     * * `linux`
+     */
+    platform: string;
+    /**
+     * The target artifact architecture. These are Node-style architecture names, for example:
+     * * `ia32`
+     * * `x64`
+     * * `armv7l`
+     */
+    arch: string;
+    artifactSuffix?: string;
+    isGeneric?: false;
+} & ElectronDownloadRequest & ElectronDownloadRequestOptions;
+export declare type ElectronGenericArtifactDetails = {
+    isGeneric: true;
+} & ElectronDownloadRequest & ElectronDownloadRequestOptions;
+export declare type ElectronArtifactDetails = ElectronPlatformArtifactDetails | ElectronGenericArtifactDetails;
+export declare type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
+export declare type ElectronPlatformArtifactDetailsWithDefaults = (Omit<ElectronPlatformArtifactDetails, 'platform' | 'arch'> & {
+    platform?: string;
+    arch?: string;
+}) | ElectronGenericArtifactDetails;

+ 3 - 0
node_modules/@electron/get/dist/cjs/types.js

@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=types.js.map

+ 1 - 0
node_modules/@electron/get/dist/cjs/types.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}

+ 25 - 0
node_modules/@electron/get/dist/cjs/utils.d.ts

@@ -0,0 +1,25 @@
+export declare function withTempDirectoryIn<T>(parentDirectory: string | undefined, fn: (directory: string) => Promise<T>): Promise<T>;
+export declare function withTempDirectory<T>(fn: (directory: string) => Promise<T>): Promise<T>;
+export declare function normalizeVersion(version: string): string;
+/**
+ * Runs the `uname` command and returns the trimmed output.
+ */
+export declare function uname(): string;
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name.
+ */
+export declare function getNodeArch(arch: string): string;
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name, from the `process` module information.
+ */
+export declare function getHostArch(): string;
+export declare function ensureIsTruthyString<T, K extends keyof T>(obj: T, key: K): void;
+export declare function isOfficialLinuxIA32Download(platform: string, arch: string, version: string, mirrorOptions?: object): boolean;
+/**
+ * Find the value of a environment variable which may or may not have the
+ * prefix, in a case-insensitive manner.
+ */
+export declare function getEnv(prefix?: string): (name: string) => string | undefined;
+export declare function setEnv(key: string, value: string | undefined): void;

+ 107 - 0
node_modules/@electron/get/dist/cjs/utils.js

@@ -0,0 +1,107 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const childProcess = require("child_process");
+const fs = require("fs-extra");
+const os = require("os");
+const path = require("path");
+async function useAndRemoveDirectory(directory, fn) {
+    let result;
+    try {
+        result = await fn(directory);
+    }
+    finally {
+        await fs.remove(directory);
+    }
+    return result;
+}
+async function withTempDirectoryIn(parentDirectory = os.tmpdir(), fn) {
+    const tempDirectoryPrefix = 'electron-download-';
+    const tempDirectory = await fs.mkdtemp(path.resolve(parentDirectory, tempDirectoryPrefix));
+    return useAndRemoveDirectory(tempDirectory, fn);
+}
+exports.withTempDirectoryIn = withTempDirectoryIn;
+async function withTempDirectory(fn) {
+    return withTempDirectoryIn(undefined, fn);
+}
+exports.withTempDirectory = withTempDirectory;
+function normalizeVersion(version) {
+    if (!version.startsWith('v')) {
+        return `v${version}`;
+    }
+    return version;
+}
+exports.normalizeVersion = normalizeVersion;
+/**
+ * Runs the `uname` command and returns the trimmed output.
+ */
+function uname() {
+    return childProcess
+        .execSync('uname -m')
+        .toString()
+        .trim();
+}
+exports.uname = uname;
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name.
+ */
+function getNodeArch(arch) {
+    if (arch === 'arm') {
+        // eslint-disable-next-line @typescript-eslint/no-explicit-any
+        switch (process.config.variables.arm_version) {
+            case '6':
+                return uname();
+            case '7':
+            default:
+                return 'armv7l';
+        }
+    }
+    return arch;
+}
+exports.getNodeArch = getNodeArch;
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name, from the `process` module information.
+ */
+function getHostArch() {
+    return getNodeArch(process.arch);
+}
+exports.getHostArch = getHostArch;
+function ensureIsTruthyString(obj, key) {
+    if (!obj[key] || typeof obj[key] !== 'string') {
+        throw new Error(`Expected property "${key}" to be provided as a string but it was not`);
+    }
+}
+exports.ensureIsTruthyString = ensureIsTruthyString;
+function isOfficialLinuxIA32Download(platform, arch, version, mirrorOptions) {
+    return (platform === 'linux' &&
+        arch === 'ia32' &&
+        Number(version.slice(1).split('.')[0]) >= 4 &&
+        typeof mirrorOptions === 'undefined');
+}
+exports.isOfficialLinuxIA32Download = isOfficialLinuxIA32Download;
+/**
+ * Find the value of a environment variable which may or may not have the
+ * prefix, in a case-insensitive manner.
+ */
+function getEnv(prefix = '') {
+    const envsLowerCase = {};
+    for (const envKey in process.env) {
+        envsLowerCase[envKey.toLowerCase()] = process.env[envKey];
+    }
+    return (name) => {
+        return (envsLowerCase[`${prefix}${name}`.toLowerCase()] ||
+            envsLowerCase[name.toLowerCase()] ||
+            undefined);
+    };
+}
+exports.getEnv = getEnv;
+function setEnv(key, value) {
+    // The `void` operator always returns `undefined`.
+    // See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void
+    if (value !== void 0) {
+        process.env[key] = value;
+    }
+}
+exports.setEnv = setEnv;
+//# sourceMappingURL=utils.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/@electron/get/dist/cjs/utils.js.map


+ 8 - 0
node_modules/@electron/get/dist/esm/Cache.d.ts

@@ -0,0 +1,8 @@
+export declare class Cache {
+    private cacheRoot;
+    constructor(cacheRoot?: string);
+    static getCacheDirectory(downloadUrl: string): string;
+    getCachePath(downloadUrl: string, fileName: string): string;
+    getPathForFileInCache(url: string, fileName: string): Promise<string | null>;
+    putFileInCache(url: string, currentPath: string, fileName: string): Promise<string>;
+}

+ 57 - 0
node_modules/@electron/get/dist/esm/Cache.js

@@ -0,0 +1,57 @@
+var __rest = (this && this.__rest) || function (s, e) {
+    var t = {};
+    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+        t[p] = s[p];
+    if (s != null && typeof Object.getOwnPropertySymbols === "function")
+        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+                t[p[i]] = s[p[i]];
+        }
+    return t;
+};
+import debug from 'debug';
+import envPaths from 'env-paths';
+import * as fs from 'fs-extra';
+import * as path from 'path';
+import * as url from 'url';
+import * as crypto from 'crypto';
+const d = debug('@electron/get:cache');
+const defaultCacheRoot = envPaths('electron', {
+    suffix: '',
+}).cache;
+export class Cache {
+    constructor(cacheRoot = defaultCacheRoot) {
+        this.cacheRoot = cacheRoot;
+    }
+    static getCacheDirectory(downloadUrl) {
+        const parsedDownloadUrl = url.parse(downloadUrl);
+        // eslint-disable-next-line @typescript-eslint/no-unused-vars
+        const { search, hash, pathname } = parsedDownloadUrl, rest = __rest(parsedDownloadUrl, ["search", "hash", "pathname"]);
+        const strippedUrl = url.format(Object.assign(Object.assign({}, rest), { pathname: path.dirname(pathname || 'electron') }));
+        return crypto
+            .createHash('sha256')
+            .update(strippedUrl)
+            .digest('hex');
+    }
+    getCachePath(downloadUrl, fileName) {
+        return path.resolve(this.cacheRoot, Cache.getCacheDirectory(downloadUrl), fileName);
+    }
+    async getPathForFileInCache(url, fileName) {
+        const cachePath = this.getCachePath(url, fileName);
+        if (await fs.pathExists(cachePath)) {
+            return cachePath;
+        }
+        return null;
+    }
+    async putFileInCache(url, currentPath, fileName) {
+        const cachePath = this.getCachePath(url, fileName);
+        d(`Moving ${currentPath} to ${cachePath}`);
+        if (await fs.pathExists(cachePath)) {
+            d('* Replacing existing file');
+            await fs.remove(cachePath);
+        }
+        await fs.move(currentPath, cachePath);
+        return cachePath;
+    }
+}
+//# sourceMappingURL=Cache.js.map

+ 1 - 0
node_modules/@electron/get/dist/esm/Cache.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../src/Cache.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,GAAG,MAAM,KAAK,CAAC;AAC3B,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,MAAM,CAAC,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC;AAEvC,MAAM,gBAAgB,GAAG,QAAQ,CAAC,UAAU,EAAE;IAC5C,MAAM,EAAE,EAAE;CACX,CAAC,CAAC,KAAK,CAAC;AAET,MAAM,OAAO,KAAK;IAChB,YAAoB,YAAY,gBAAgB;QAA5B,cAAS,GAAT,SAAS,CAAmB;IAAG,CAAC;IAE7C,MAAM,CAAC,iBAAiB,CAAC,WAAmB;QACjD,MAAM,iBAAiB,GAAG,GAAG,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;QACjD,6DAA6D;QAC7D,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,KAAc,iBAAiB,EAA7B,gEAA6B,CAAC;QAC9D,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,iCAAM,IAAI,KAAE,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,IAAI,UAAU,CAAC,IAAG,CAAC;QAE5F,OAAO,MAAM;aACV,UAAU,CAAC,QAAQ,CAAC;aACpB,MAAM,CAAC,WAAW,CAAC;aACnB,MAAM,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAEM,YAAY,CAAC,WAAmB,EAAE,QAAgB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,CAAC;IACtF,CAAC;IAEM,KAAK,CAAC,qBAAqB,CAAC,GAAW,EAAE,QAAgB;QAC9D,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACnD,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAClC,OAAO,SAAS,CAAC;SAClB;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,GAAW,EAAE,WAAmB,EAAE,QAAgB;QAC5E,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QACnD,CAAC,CAAC,UAAU,WAAW,OAAO,SAAS,EAAE,CAAC,CAAC;QAC3C,IAAI,MAAM,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;YAClC,CAAC,CAAC,2BAA2B,CAAC,CAAC;YAC/B,MAAM,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;SAC5B;QAED,MAAM,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;QAEtC,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}

+ 3 - 0
node_modules/@electron/get/dist/esm/Downloader.d.ts

@@ -0,0 +1,3 @@
+export interface Downloader<T> {
+    download(url: string, targetFilePath: string, options: T): Promise<void>;
+}

+ 1 - 0
node_modules/@electron/get/dist/esm/Downloader.js

@@ -0,0 +1 @@
+//# sourceMappingURL=Downloader.js.map

+ 1 - 0
node_modules/@electron/get/dist/esm/Downloader.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"Downloader.js","sourceRoot":"","sources":["../../src/Downloader.ts"],"names":[],"mappings":""}

+ 21 - 0
node_modules/@electron/get/dist/esm/GotDownloader.d.ts

@@ -0,0 +1,21 @@
+import { Progress as GotProgress, Options as GotOptions } from 'got';
+import { Downloader } from './Downloader';
+/**
+ * See [`got#options`](https://github.com/sindresorhus/got#options) for possible keys/values.
+ */
+export declare type GotDownloaderOptions = (GotOptions & {
+    isStream?: true;
+}) & {
+    /**
+     * if defined, triggers every time `got`'s `downloadProgress` event callback is triggered.
+     */
+    getProgressCallback?: (progress: GotProgress) => Promise<void>;
+    /**
+     * if `true`, disables the console progress bar (setting the `ELECTRON_GET_NO_PROGRESS`
+     * environment variable to a non-empty value also does this).
+     */
+    quiet?: boolean;
+};
+export declare class GotDownloader implements Downloader<GotDownloaderOptions> {
+    download(url: string, targetFilePath: string, options?: GotDownloaderOptions): Promise<void>;
+}

+ 73 - 0
node_modules/@electron/get/dist/esm/GotDownloader.js

@@ -0,0 +1,73 @@
+var __rest = (this && this.__rest) || function (s, e) {
+    var t = {};
+    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
+        t[p] = s[p];
+    if (s != null && typeof Object.getOwnPropertySymbols === "function")
+        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
+            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
+                t[p[i]] = s[p[i]];
+        }
+    return t;
+};
+import * as fs from 'fs-extra';
+import got, { HTTPError } from 'got';
+import * as path from 'path';
+import * as ProgressBar from 'progress';
+const PROGRESS_BAR_DELAY_IN_SECONDS = 30;
+export class GotDownloader {
+    async download(url, targetFilePath, options) {
+        if (!options) {
+            options = {};
+        }
+        const { quiet, getProgressCallback } = options, gotOptions = __rest(options, ["quiet", "getProgressCallback"]);
+        let downloadCompleted = false;
+        let bar;
+        let progressPercent;
+        let timeout = undefined;
+        await fs.mkdirp(path.dirname(targetFilePath));
+        const writeStream = fs.createWriteStream(targetFilePath);
+        if (!quiet || !process.env.ELECTRON_GET_NO_PROGRESS) {
+            const start = new Date();
+            timeout = setTimeout(() => {
+                if (!downloadCompleted) {
+                    bar = new ProgressBar(`Downloading ${path.basename(url)}: [:bar] :percent ETA: :eta seconds `, {
+                        curr: progressPercent,
+                        total: 100,
+                    });
+                    // https://github.com/visionmedia/node-progress/issues/159
+                    // eslint-disable-next-line @typescript-eslint/no-explicit-any
+                    bar.start = start;
+                }
+            }, PROGRESS_BAR_DELAY_IN_SECONDS * 1000);
+        }
+        await new Promise((resolve, reject) => {
+            const downloadStream = got.stream(url, gotOptions);
+            downloadStream.on('downloadProgress', async (progress) => {
+                progressPercent = progress.percent;
+                if (bar) {
+                    bar.update(progress.percent);
+                }
+                if (getProgressCallback) {
+                    await getProgressCallback(progress);
+                }
+            });
+            downloadStream.on('error', error => {
+                if (error instanceof HTTPError && error.response.statusCode === 404) {
+                    error.message += ` for ${error.response.url}`;
+                }
+                if (writeStream.destroy) {
+                    writeStream.destroy(error);
+                }
+                reject(error);
+            });
+            writeStream.on('error', error => reject(error));
+            writeStream.on('close', () => resolve());
+            downloadStream.pipe(writeStream);
+        });
+        downloadCompleted = true;
+        if (timeout) {
+            clearTimeout(timeout);
+        }
+    }
+}
+//# sourceMappingURL=GotDownloader.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/@electron/get/dist/esm/GotDownloader.js.map


+ 4 - 0
node_modules/@electron/get/dist/esm/artifact-utils.d.ts

@@ -0,0 +1,4 @@
+import { ElectronArtifactDetails } from './types';
+export declare function getArtifactFileName(details: ElectronArtifactDetails): string;
+export declare function getArtifactRemoteURL(details: ElectronArtifactDetails): Promise<string>;
+export declare function getArtifactVersion(details: ElectronArtifactDetails): string;

+ 61 - 0
node_modules/@electron/get/dist/esm/artifact-utils.js

@@ -0,0 +1,61 @@
+import { ensureIsTruthyString, normalizeVersion } from './utils';
+const BASE_URL = 'https://github.com/electron/electron/releases/download/';
+const NIGHTLY_BASE_URL = 'https://github.com/electron/nightlies/releases/download/';
+export function getArtifactFileName(details) {
+    ensureIsTruthyString(details, 'artifactName');
+    if (details.isGeneric) {
+        return details.artifactName;
+    }
+    ensureIsTruthyString(details, 'arch');
+    ensureIsTruthyString(details, 'platform');
+    ensureIsTruthyString(details, 'version');
+    return `${[
+        details.artifactName,
+        details.version,
+        details.platform,
+        details.arch,
+        ...(details.artifactSuffix ? [details.artifactSuffix] : []),
+    ].join('-')}.zip`;
+}
+function mirrorVar(name, options, defaultValue) {
+    // Convert camelCase to camel_case for env var reading
+    const snakeName = name.replace(/([a-z])([A-Z])/g, (_, a, b) => `${a}_${b}`).toLowerCase();
+    return (
+    // .npmrc
+    process.env[`npm_config_electron_${name.toLowerCase()}`] ||
+        process.env[`NPM_CONFIG_ELECTRON_${snakeName.toUpperCase()}`] ||
+        process.env[`npm_config_electron_${snakeName}`] ||
+        // package.json
+        process.env[`npm_package_config_electron_${name}`] ||
+        process.env[`npm_package_config_electron_${snakeName.toLowerCase()}`] ||
+        // env
+        process.env[`ELECTRON_${snakeName.toUpperCase()}`] ||
+        options[name] ||
+        defaultValue);
+}
+export async function getArtifactRemoteURL(details) {
+    const opts = details.mirrorOptions || {};
+    let base = mirrorVar('mirror', opts, BASE_URL);
+    if (details.version.includes('nightly')) {
+        const nightlyDeprecated = mirrorVar('nightly_mirror', opts, '');
+        if (nightlyDeprecated) {
+            base = nightlyDeprecated;
+            console.warn(`nightly_mirror is deprecated, please use nightlyMirror`);
+        }
+        else {
+            base = mirrorVar('nightlyMirror', opts, NIGHTLY_BASE_URL);
+        }
+    }
+    const path = mirrorVar('customDir', opts, details.version).replace('{{ version }}', details.version.replace(/^v/, ''));
+    const file = mirrorVar('customFilename', opts, getArtifactFileName(details));
+    // Allow customized download URL resolution.
+    if (opts.resolveAssetURL) {
+        const url = await opts.resolveAssetURL(details);
+        return url;
+    }
+    return `${base}${path}/${file}`;
+}
+export function getArtifactVersion(details) {
+    return normalizeVersion(mirrorVar('customVersion', details.mirrorOptions || {}, details.version));
+}
+//# sourceMappingURL=artifact-utils.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/@electron/get/dist/esm/artifact-utils.js.map


+ 3 - 0
node_modules/@electron/get/dist/esm/downloader-resolver.d.ts

@@ -0,0 +1,3 @@
+import { DownloadOptions } from './types';
+import { Downloader } from './Downloader';
+export declare function getDownloaderForSystem(): Promise<Downloader<DownloadOptions>>;

+ 9 - 0
node_modules/@electron/get/dist/esm/downloader-resolver.js

@@ -0,0 +1,9 @@
+export async function getDownloaderForSystem() {
+    // TODO: Resolve the downloader or default to GotDownloader
+    // Current thoughts are a dot-file traversal for something like
+    // ".electron.downloader" which would be a text file with the name of the
+    // npm module to import() and use as the downloader
+    const { GotDownloader } = await import('./GotDownloader');
+    return new GotDownloader();
+}
+//# sourceMappingURL=downloader-resolver.js.map

+ 1 - 0
node_modules/@electron/get/dist/esm/downloader-resolver.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"downloader-resolver.js","sourceRoot":"","sources":["../../src/downloader-resolver.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,KAAK,UAAU,sBAAsB;IAC1C,2DAA2D;IAC3D,+DAA+D;IAC/D,yEAAyE;IACzE,mDAAmD;IACnD,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,MAAM,CAAC,iBAAiB,CAAC,CAAC;IAC1D,OAAO,IAAI,aAAa,EAAE,CAAC;AAC7B,CAAC"}

+ 18 - 0
node_modules/@electron/get/dist/esm/index.d.ts

@@ -0,0 +1,18 @@
+import { ElectronDownloadRequestOptions, ElectronPlatformArtifactDetailsWithDefaults } from './types';
+export { getHostArch } from './utils';
+export { initializeProxy } from './proxy';
+export * from './types';
+/**
+ * Downloads an artifact from an Electron release and returns an absolute path
+ * to the downloaded file.
+ *
+ * @param artifactDetails - The information required to download the artifact
+ */
+export declare function downloadArtifact(_artifactDetails: ElectronPlatformArtifactDetailsWithDefaults): Promise<string>;
+/**
+ * Downloads a specific version of Electron and returns an absolute path to a
+ * ZIP file.
+ *
+ * @param version - The version of Electron you want to download
+ */
+export declare function download(version: string, options?: ElectronDownloadRequestOptions): Promise<string>;

+ 134 - 0
node_modules/@electron/get/dist/esm/index.js

@@ -0,0 +1,134 @@
+import debug from 'debug';
+import * as fs from 'fs-extra';
+import * as path from 'path';
+import * as semver from 'semver';
+import * as sumchecker from 'sumchecker';
+import { getArtifactFileName, getArtifactRemoteURL, getArtifactVersion } from './artifact-utils';
+import { Cache } from './Cache';
+import { getDownloaderForSystem } from './downloader-resolver';
+import { initializeProxy } from './proxy';
+import { withTempDirectoryIn, getHostArch, getNodeArch, ensureIsTruthyString, isOfficialLinuxIA32Download, } from './utils';
+export { getHostArch } from './utils';
+export { initializeProxy } from './proxy';
+const d = debug('@electron/get:index');
+if (process.env.ELECTRON_GET_USE_PROXY) {
+    initializeProxy();
+}
+async function validateArtifact(artifactDetails, downloadedAssetPath, _downloadArtifact) {
+    return await withTempDirectoryIn(artifactDetails.tempDirectory, async (tempFolder) => {
+        // Don't try to verify the hash of the hash file itself
+        // and for older versions that don't have a SHASUMS256.txt
+        if (!artifactDetails.artifactName.startsWith('SHASUMS256') &&
+            !artifactDetails.unsafelyDisableChecksums &&
+            semver.gte(artifactDetails.version, '1.3.2')) {
+            let shasumPath;
+            const checksums = artifactDetails.checksums;
+            if (checksums) {
+                shasumPath = path.resolve(tempFolder, 'SHASUMS256.txt');
+                const fileNames = Object.keys(checksums);
+                if (fileNames.length === 0) {
+                    throw new Error('Provided "checksums" object is empty, cannot generate a valid SHASUMS256.txt');
+                }
+                const generatedChecksums = fileNames
+                    .map(fileName => `${checksums[fileName]} *${fileName}`)
+                    .join('\n');
+                await fs.writeFile(shasumPath, generatedChecksums);
+            }
+            else {
+                shasumPath = await _downloadArtifact({
+                    isGeneric: true,
+                    version: artifactDetails.version,
+                    artifactName: 'SHASUMS256.txt',
+                    force: artifactDetails.force,
+                    downloadOptions: artifactDetails.downloadOptions,
+                    cacheRoot: artifactDetails.cacheRoot,
+                    downloader: artifactDetails.downloader,
+                    mirrorOptions: artifactDetails.mirrorOptions,
+                });
+            }
+            // For versions 1.3.2 - 1.3.4, need to overwrite the `defaultTextEncoding` option:
+            // https://github.com/electron/electron/pull/6676#discussion_r75332120
+            if (semver.satisfies(artifactDetails.version, '1.3.2 - 1.3.4')) {
+                const validatorOptions = {};
+                validatorOptions.defaultTextEncoding = 'binary';
+                const checker = new sumchecker.ChecksumValidator('sha256', shasumPath, validatorOptions);
+                await checker.validate(path.dirname(downloadedAssetPath), path.basename(downloadedAssetPath));
+            }
+            else {
+                await sumchecker('sha256', shasumPath, path.dirname(downloadedAssetPath), [
+                    path.basename(downloadedAssetPath),
+                ]);
+            }
+        }
+    });
+}
+/**
+ * Downloads an artifact from an Electron release and returns an absolute path
+ * to the downloaded file.
+ *
+ * @param artifactDetails - The information required to download the artifact
+ */
+export async function downloadArtifact(_artifactDetails) {
+    const artifactDetails = Object.assign({}, _artifactDetails);
+    if (!_artifactDetails.isGeneric) {
+        const platformArtifactDetails = artifactDetails;
+        if (!platformArtifactDetails.platform) {
+            d('No platform found, defaulting to the host platform');
+            platformArtifactDetails.platform = process.platform;
+        }
+        if (platformArtifactDetails.arch) {
+            platformArtifactDetails.arch = getNodeArch(platformArtifactDetails.arch);
+        }
+        else {
+            d('No arch found, defaulting to the host arch');
+            platformArtifactDetails.arch = getHostArch();
+        }
+    }
+    ensureIsTruthyString(artifactDetails, 'version');
+    artifactDetails.version = getArtifactVersion(artifactDetails);
+    const fileName = getArtifactFileName(artifactDetails);
+    const url = await getArtifactRemoteURL(artifactDetails);
+    const cache = new Cache(artifactDetails.cacheRoot);
+    // Do not check if the file exists in the cache when force === true
+    if (!artifactDetails.force) {
+        d(`Checking the cache (${artifactDetails.cacheRoot}) for ${fileName} (${url})`);
+        const cachedPath = await cache.getPathForFileInCache(url, fileName);
+        if (cachedPath === null) {
+            d('Cache miss');
+        }
+        else {
+            d('Cache hit');
+            try {
+                await validateArtifact(artifactDetails, cachedPath, downloadArtifact);
+                return cachedPath;
+            }
+            catch (err) {
+                d("Artifact in cache didn't match checksums", err);
+                d('falling back to re-download');
+            }
+        }
+    }
+    if (!artifactDetails.isGeneric &&
+        isOfficialLinuxIA32Download(artifactDetails.platform, artifactDetails.arch, artifactDetails.version, artifactDetails.mirrorOptions)) {
+        console.warn('Official Linux/ia32 support is deprecated.');
+        console.warn('For more info: https://electronjs.org/blog/linux-32bit-support');
+    }
+    return await withTempDirectoryIn(artifactDetails.tempDirectory, async (tempFolder) => {
+        const tempDownloadPath = path.resolve(tempFolder, getArtifactFileName(artifactDetails));
+        const downloader = artifactDetails.downloader || (await getDownloaderForSystem());
+        d(`Downloading ${url} to ${tempDownloadPath} with options: ${JSON.stringify(artifactDetails.downloadOptions)}`);
+        await downloader.download(url, tempDownloadPath, artifactDetails.downloadOptions);
+        await validateArtifact(artifactDetails, tempDownloadPath, downloadArtifact);
+        return await cache.putFileInCache(url, tempDownloadPath, fileName);
+    });
+}
+/**
+ * Downloads a specific version of Electron and returns an absolute path to a
+ * ZIP file.
+ *
+ * @param version - The version of Electron you want to download
+ */
+export function download(version, options) {
+    return downloadArtifact(Object.assign(Object.assign({}, options), { version, platform: process.platform, arch: process.arch, artifactName: 'electron' }));
+}
+//# sourceMappingURL=index.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/@electron/get/dist/esm/index.js.map


+ 4 - 0
node_modules/@electron/get/dist/esm/proxy.d.ts

@@ -0,0 +1,4 @@
+/**
+ * Initializes a third-party proxy module for HTTP(S) requests.
+ */
+export declare function initializeProxy(): void;

+ 24 - 0
node_modules/@electron/get/dist/esm/proxy.js

@@ -0,0 +1,24 @@
+import * as debug from 'debug';
+import { getEnv, setEnv } from './utils';
+const d = debug('@electron/get:proxy');
+/**
+ * Initializes a third-party proxy module for HTTP(S) requests.
+ */
+export function initializeProxy() {
+    try {
+        // See: https://github.com/electron/get/pull/214#discussion_r798845713
+        const env = getEnv('GLOBAL_AGENT_');
+        setEnv('GLOBAL_AGENT_HTTP_PROXY', env('HTTP_PROXY'));
+        setEnv('GLOBAL_AGENT_HTTPS_PROXY', env('HTTPS_PROXY'));
+        setEnv('GLOBAL_AGENT_NO_PROXY', env('NO_PROXY'));
+        /**
+         * TODO: replace global-agent with a hpagent. @BlackHole1
+         * https://github.com/sindresorhus/got/blob/HEAD/documentation/tips.md#proxying
+         */
+        require('global-agent').bootstrap();
+    }
+    catch (e) {
+        d('Could not load either proxy modules, built-in proxy support not available:', e);
+    }
+}
+//# sourceMappingURL=proxy.js.map

+ 1 - 0
node_modules/@electron/get/dist/esm/proxy.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"proxy.js","sourceRoot":"","sources":["../../src/proxy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,CAAC,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC;AAEvC;;GAEG;AACH,MAAM,UAAU,eAAe;IAC7B,IAAI;QACF,sEAAsE;QACtE,MAAM,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;QAEpC,MAAM,CAAC,yBAAyB,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC;QACrD,MAAM,CAAC,0BAA0B,EAAE,GAAG,CAAC,aAAa,CAAC,CAAC,CAAC;QACvD,MAAM,CAAC,uBAAuB,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;QAEjD;;;WAGG;QACH,OAAO,CAAC,cAAc,CAAC,CAAC,SAAS,EAAE,CAAC;KACrC;IAAC,OAAO,CAAC,EAAE;QACV,CAAC,CAAC,4EAA4E,EAAE,CAAC,CAAC,CAAC;KACpF;AACH,CAAC"}

+ 129 - 0
node_modules/@electron/get/dist/esm/types.d.ts

@@ -0,0 +1,129 @@
+import { Downloader } from './Downloader';
+export declare type DownloadOptions = any;
+export interface MirrorOptions {
+    /**
+     * DEPRECATED - see nightlyMirror.
+     */
+    nightly_mirror?: string;
+    /**
+     * The Electron nightly-specific mirror URL.
+     */
+    nightlyMirror?: string;
+    /**
+     * The base URL of the mirror to download from,
+     * e.g https://github.com/electron/electron/releases/download
+     */
+    mirror?: string;
+    /**
+     * The name of the directory to download from,
+     * often scoped by version number e.g 'v4.0.4'
+     */
+    customDir?: string;
+    /**
+     * The name of the asset to download,
+     * e.g 'electron-v4.0.4-linux-x64.zip'
+     */
+    customFilename?: string;
+    /**
+     * The version of the asset to download,
+     * e.g '4.0.4'
+     */
+    customVersion?: string;
+    /**
+     * A function allowing customization of the url returned
+     * from getArtifactRemoteURL().
+     */
+    resolveAssetURL?: (opts: DownloadOptions) => Promise<string>;
+}
+export interface ElectronDownloadRequest {
+    /**
+     * The version of Electron associated with the artifact.
+     */
+    version: string;
+    /**
+     * The type of artifact. For example:
+     * * `electron`
+     * * `ffmpeg`
+     */
+    artifactName: string;
+}
+export interface ElectronDownloadRequestOptions {
+    /**
+     * Whether to download an artifact regardless of whether it's in the cache directory.
+     *
+     * Defaults to `false`.
+     */
+    force?: boolean;
+    /**
+     * When set to `true`, disables checking that the artifact download completed successfully
+     * with the correct payload.
+     *
+     * Defaults to `false`.
+     */
+    unsafelyDisableChecksums?: boolean;
+    /**
+     * Provides checksums for the artifact as strings.
+     * Can be used if you already know the checksums of the Electron artifact
+     * you are downloading and want to skip the checksum file download
+     * without skipping the checksum validation.
+     *
+     * This should be an object whose keys are the file names of the artifacts and
+     * the values are their respective SHA256 checksums.
+     */
+    checksums?: Record<string, string>;
+    /**
+     * The directory that caches Electron artifact downloads.
+     *
+     * The default value is dependent upon the host platform:
+     *
+     * * Linux: `$XDG_CACHE_HOME` or `~/.cache/electron/`
+     * * MacOS: `~/Library/Caches/electron/`
+     * * Windows: `%LOCALAPPDATA%/electron/Cache` or `~/AppData/Local/electron/Cache/`
+     */
+    cacheRoot?: string;
+    /**
+     * Options passed to the downloader module.
+     */
+    downloadOptions?: DownloadOptions;
+    /**
+     * Options related to specifying an artifact mirror.
+     */
+    mirrorOptions?: MirrorOptions;
+    /**
+     * The custom [[Downloader]] class used to download artifacts. Defaults to the
+     * built-in [[GotDownloader]].
+     */
+    downloader?: Downloader<DownloadOptions>;
+    /**
+     * A temporary directory for downloads.
+     * It is used before artifacts are put into cache.
+     */
+    tempDirectory?: string;
+}
+export declare type ElectronPlatformArtifactDetails = {
+    /**
+     * The target artifact platform. These are Node-style platform names, for example:
+     * * `win32`
+     * * `darwin`
+     * * `linux`
+     */
+    platform: string;
+    /**
+     * The target artifact architecture. These are Node-style architecture names, for example:
+     * * `ia32`
+     * * `x64`
+     * * `armv7l`
+     */
+    arch: string;
+    artifactSuffix?: string;
+    isGeneric?: false;
+} & ElectronDownloadRequest & ElectronDownloadRequestOptions;
+export declare type ElectronGenericArtifactDetails = {
+    isGeneric: true;
+} & ElectronDownloadRequest & ElectronDownloadRequestOptions;
+export declare type ElectronArtifactDetails = ElectronPlatformArtifactDetails | ElectronGenericArtifactDetails;
+export declare type Omit<T, K> = Pick<T, Exclude<keyof T, K>>;
+export declare type ElectronPlatformArtifactDetailsWithDefaults = (Omit<ElectronPlatformArtifactDetails, 'platform' | 'arch'> & {
+    platform?: string;
+    arch?: string;
+}) | ElectronGenericArtifactDetails;

+ 1 - 0
node_modules/@electron/get/dist/esm/types.js

@@ -0,0 +1 @@
+//# sourceMappingURL=types.js.map

+ 1 - 0
node_modules/@electron/get/dist/esm/types.js.map

@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":""}

+ 25 - 0
node_modules/@electron/get/dist/esm/utils.d.ts

@@ -0,0 +1,25 @@
+export declare function withTempDirectoryIn<T>(parentDirectory: string | undefined, fn: (directory: string) => Promise<T>): Promise<T>;
+export declare function withTempDirectory<T>(fn: (directory: string) => Promise<T>): Promise<T>;
+export declare function normalizeVersion(version: string): string;
+/**
+ * Runs the `uname` command and returns the trimmed output.
+ */
+export declare function uname(): string;
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name.
+ */
+export declare function getNodeArch(arch: string): string;
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name, from the `process` module information.
+ */
+export declare function getHostArch(): string;
+export declare function ensureIsTruthyString<T, K extends keyof T>(obj: T, key: K): void;
+export declare function isOfficialLinuxIA32Download(platform: string, arch: string, version: string, mirrorOptions?: object): boolean;
+/**
+ * Find the value of a environment variable which may or may not have the
+ * prefix, in a case-insensitive manner.
+ */
+export declare function getEnv(prefix?: string): (name: string) => string | undefined;
+export declare function setEnv(key: string, value: string | undefined): void;

+ 95 - 0
node_modules/@electron/get/dist/esm/utils.js

@@ -0,0 +1,95 @@
+import * as childProcess from 'child_process';
+import * as fs from 'fs-extra';
+import * as os from 'os';
+import * as path from 'path';
+async function useAndRemoveDirectory(directory, fn) {
+    let result;
+    try {
+        result = await fn(directory);
+    }
+    finally {
+        await fs.remove(directory);
+    }
+    return result;
+}
+export async function withTempDirectoryIn(parentDirectory = os.tmpdir(), fn) {
+    const tempDirectoryPrefix = 'electron-download-';
+    const tempDirectory = await fs.mkdtemp(path.resolve(parentDirectory, tempDirectoryPrefix));
+    return useAndRemoveDirectory(tempDirectory, fn);
+}
+export async function withTempDirectory(fn) {
+    return withTempDirectoryIn(undefined, fn);
+}
+export function normalizeVersion(version) {
+    if (!version.startsWith('v')) {
+        return `v${version}`;
+    }
+    return version;
+}
+/**
+ * Runs the `uname` command and returns the trimmed output.
+ */
+export function uname() {
+    return childProcess
+        .execSync('uname -m')
+        .toString()
+        .trim();
+}
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name.
+ */
+export function getNodeArch(arch) {
+    if (arch === 'arm') {
+        // eslint-disable-next-line @typescript-eslint/no-explicit-any
+        switch (process.config.variables.arm_version) {
+            case '6':
+                return uname();
+            case '7':
+            default:
+                return 'armv7l';
+        }
+    }
+    return arch;
+}
+/**
+ * Generates an architecture name that would be used in an Electron or Node.js
+ * download file name, from the `process` module information.
+ */
+export function getHostArch() {
+    return getNodeArch(process.arch);
+}
+export function ensureIsTruthyString(obj, key) {
+    if (!obj[key] || typeof obj[key] !== 'string') {
+        throw new Error(`Expected property "${key}" to be provided as a string but it was not`);
+    }
+}
+export function isOfficialLinuxIA32Download(platform, arch, version, mirrorOptions) {
+    return (platform === 'linux' &&
+        arch === 'ia32' &&
+        Number(version.slice(1).split('.')[0]) >= 4 &&
+        typeof mirrorOptions === 'undefined');
+}
+/**
+ * Find the value of a environment variable which may or may not have the
+ * prefix, in a case-insensitive manner.
+ */
+export function getEnv(prefix = '') {
+    const envsLowerCase = {};
+    for (const envKey in process.env) {
+        envsLowerCase[envKey.toLowerCase()] = process.env[envKey];
+    }
+    return (name) => {
+        return (envsLowerCase[`${prefix}${name}`.toLowerCase()] ||
+            envsLowerCase[name.toLowerCase()] ||
+            undefined);
+    };
+}
+export function setEnv(key, value) {
+    // The `void` operator always returns `undefined`.
+    // See: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/void
+    if (value !== void 0) {
+        process.env[key] = value;
+    }
+}
+//# sourceMappingURL=utils.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/@electron/get/dist/esm/utils.js.map


+ 292 - 0
node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs

@@ -0,0 +1,292 @@
+// src/set-array.ts
+var SetArray = class {
+  constructor() {
+    this._indexes = { __proto__: null };
+    this.array = [];
+  }
+};
+function cast(set) {
+  return set;
+}
+function get(setarr, key) {
+  return cast(setarr)._indexes[key];
+}
+function put(setarr, key) {
+  const index = get(setarr, key);
+  if (index !== void 0) return index;
+  const { array, _indexes: indexes } = cast(setarr);
+  const length = array.push(key);
+  return indexes[key] = length - 1;
+}
+function remove(setarr, key) {
+  const index = get(setarr, key);
+  if (index === void 0) return;
+  const { array, _indexes: indexes } = cast(setarr);
+  for (let i = index + 1; i < array.length; i++) {
+    const k = array[i];
+    array[i - 1] = k;
+    indexes[k]--;
+  }
+  indexes[key] = void 0;
+  array.pop();
+}
+
+// src/gen-mapping.ts
+import {
+  encode
+} from "@jridgewell/sourcemap-codec";
+import { TraceMap, decodedMappings } from "@jridgewell/trace-mapping";
+
+// src/sourcemap-segment.ts
+var COLUMN = 0;
+var SOURCES_INDEX = 1;
+var SOURCE_LINE = 2;
+var SOURCE_COLUMN = 3;
+var NAMES_INDEX = 4;
+
+// src/gen-mapping.ts
+var NO_NAME = -1;
+var GenMapping = class {
+  constructor({ file, sourceRoot } = {}) {
+    this._names = new SetArray();
+    this._sources = new SetArray();
+    this._sourcesContent = [];
+    this._mappings = [];
+    this.file = file;
+    this.sourceRoot = sourceRoot;
+    this._ignoreList = new SetArray();
+  }
+};
+function cast2(map) {
+  return map;
+}
+function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
+  return addSegmentInternal(
+    false,
+    map,
+    genLine,
+    genColumn,
+    source,
+    sourceLine,
+    sourceColumn,
+    name,
+    content
+  );
+}
+function addMapping(map, mapping) {
+  return addMappingInternal(false, map, mapping);
+}
+var maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
+  return addSegmentInternal(
+    true,
+    map,
+    genLine,
+    genColumn,
+    source,
+    sourceLine,
+    sourceColumn,
+    name,
+    content
+  );
+};
+var maybeAddMapping = (map, mapping) => {
+  return addMappingInternal(true, map, mapping);
+};
+function setSourceContent(map, source, content) {
+  const {
+    _sources: sources,
+    _sourcesContent: sourcesContent
+    // _originalScopes: originalScopes,
+  } = cast2(map);
+  const index = put(sources, source);
+  sourcesContent[index] = content;
+}
+function setIgnore(map, source, ignore = true) {
+  const {
+    _sources: sources,
+    _sourcesContent: sourcesContent,
+    _ignoreList: ignoreList
+    // _originalScopes: originalScopes,
+  } = cast2(map);
+  const index = put(sources, source);
+  if (index === sourcesContent.length) sourcesContent[index] = null;
+  if (ignore) put(ignoreList, index);
+  else remove(ignoreList, index);
+}
+function toDecodedMap(map) {
+  const {
+    _mappings: mappings,
+    _sources: sources,
+    _sourcesContent: sourcesContent,
+    _names: names,
+    _ignoreList: ignoreList
+    // _originalScopes: originalScopes,
+    // _generatedRanges: generatedRanges,
+  } = cast2(map);
+  removeEmptyFinalLines(mappings);
+  return {
+    version: 3,
+    file: map.file || void 0,
+    names: names.array,
+    sourceRoot: map.sourceRoot || void 0,
+    sources: sources.array,
+    sourcesContent,
+    mappings,
+    // originalScopes,
+    // generatedRanges,
+    ignoreList: ignoreList.array
+  };
+}
+function toEncodedMap(map) {
+  const decoded = toDecodedMap(map);
+  return Object.assign({}, decoded, {
+    // originalScopes: decoded.originalScopes.map((os) => encodeOriginalScopes(os)),
+    // generatedRanges: encodeGeneratedRanges(decoded.generatedRanges as GeneratedRange[]),
+    mappings: encode(decoded.mappings)
+  });
+}
+function fromMap(input) {
+  const map = new TraceMap(input);
+  const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });
+  putAll(cast2(gen)._names, map.names);
+  putAll(cast2(gen)._sources, map.sources);
+  cast2(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null);
+  cast2(gen)._mappings = decodedMappings(map);
+  if (map.ignoreList) putAll(cast2(gen)._ignoreList, map.ignoreList);
+  return gen;
+}
+function allMappings(map) {
+  const out = [];
+  const { _mappings: mappings, _sources: sources, _names: names } = cast2(map);
+  for (let i = 0; i < mappings.length; i++) {
+    const line = mappings[i];
+    for (let j = 0; j < line.length; j++) {
+      const seg = line[j];
+      const generated = { line: i + 1, column: seg[COLUMN] };
+      let source = void 0;
+      let original = void 0;
+      let name = void 0;
+      if (seg.length !== 1) {
+        source = sources.array[seg[SOURCES_INDEX]];
+        original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };
+        if (seg.length === 5) name = names.array[seg[NAMES_INDEX]];
+      }
+      out.push({ generated, source, original, name });
+    }
+  }
+  return out;
+}
+function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
+  const {
+    _mappings: mappings,
+    _sources: sources,
+    _sourcesContent: sourcesContent,
+    _names: names
+    // _originalScopes: originalScopes,
+  } = cast2(map);
+  const line = getIndex(mappings, genLine);
+  const index = getColumnIndex(line, genColumn);
+  if (!source) {
+    if (skipable && skipSourceless(line, index)) return;
+    return insert(line, index, [genColumn]);
+  }
+  assert(sourceLine);
+  assert(sourceColumn);
+  const sourcesIndex = put(sources, source);
+  const namesIndex = name ? put(names, name) : NO_NAME;
+  if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null;
+  if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {
+    return;
+  }
+  return insert(
+    line,
+    index,
+    name ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] : [genColumn, sourcesIndex, sourceLine, sourceColumn]
+  );
+}
+function assert(_val) {
+}
+function getIndex(arr, index) {
+  for (let i = arr.length; i <= index; i++) {
+    arr[i] = [];
+  }
+  return arr[index];
+}
+function getColumnIndex(line, genColumn) {
+  let index = line.length;
+  for (let i = index - 1; i >= 0; index = i--) {
+    const current = line[i];
+    if (genColumn >= current[COLUMN]) break;
+  }
+  return index;
+}
+function insert(array, index, value) {
+  for (let i = array.length; i > index; i--) {
+    array[i] = array[i - 1];
+  }
+  array[index] = value;
+}
+function removeEmptyFinalLines(mappings) {
+  const { length } = mappings;
+  let len = length;
+  for (let i = len - 1; i >= 0; len = i, i--) {
+    if (mappings[i].length > 0) break;
+  }
+  if (len < length) mappings.length = len;
+}
+function putAll(setarr, array) {
+  for (let i = 0; i < array.length; i++) put(setarr, array[i]);
+}
+function skipSourceless(line, index) {
+  if (index === 0) return true;
+  const prev = line[index - 1];
+  return prev.length === 1;
+}
+function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) {
+  if (index === 0) return false;
+  const prev = line[index - 1];
+  if (prev.length === 1) return false;
+  return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME);
+}
+function addMappingInternal(skipable, map, mapping) {
+  const { generated, source, original, name, content } = mapping;
+  if (!source) {
+    return addSegmentInternal(
+      skipable,
+      map,
+      generated.line - 1,
+      generated.column,
+      null,
+      null,
+      null,
+      null,
+      null
+    );
+  }
+  assert(original);
+  return addSegmentInternal(
+    skipable,
+    map,
+    generated.line - 1,
+    generated.column,
+    source,
+    original.line - 1,
+    original.column,
+    name,
+    content
+  );
+}
+export {
+  GenMapping,
+  addMapping,
+  addSegment,
+  allMappings,
+  fromMap,
+  maybeAddMapping,
+  maybeAddSegment,
+  setIgnore,
+  setSourceContent,
+  toDecodedMap,
+  toEncodedMap
+};
+//# sourceMappingURL=gen-mapping.mjs.map

File diff suppressed because it is too large
+ 3 - 0
node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map


+ 358 - 0
node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js

@@ -0,0 +1,358 @@
+(function (global, factory) {
+  if (typeof exports === 'object' && typeof module !== 'undefined') {
+    factory(module, require('@jridgewell/sourcemap-codec'), require('@jridgewell/trace-mapping'));
+    module.exports = def(module);
+  } else if (typeof define === 'function' && define.amd) {
+    define(['module', '@jridgewell/sourcemap-codec', '@jridgewell/trace-mapping'], function(mod) {
+      factory.apply(this, arguments);
+      mod.exports = def(mod);
+    });
+  } else {
+    const mod = { exports: {} };
+    factory(mod, global.sourcemapCodec, global.traceMapping);
+    global = typeof globalThis !== 'undefined' ? globalThis : global || self;
+    global.genMapping = def(mod);
+  }
+  function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; }
+})(this, (function (module, require_sourcemapCodec, require_traceMapping) {
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __commonJS = (cb, mod) => function __require() {
+  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+};
+var __export = (target, all) => {
+  for (var name in all)
+    __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+  if (from && typeof from === "object" || typeof from === "function") {
+    for (let key of __getOwnPropNames(from))
+      if (!__hasOwnProp.call(to, key) && key !== except)
+        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+  }
+  return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+  // If the importer is in node compatibility mode or this is not an ESM
+  // file that has been converted to a CommonJS file using a Babel-
+  // compatible transform (i.e. "__esModule" has not been set), then set
+  // "default" to the CommonJS "module.exports" for node compatibility.
+  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+  mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// umd:@jridgewell/sourcemap-codec
+var require_sourcemap_codec = __commonJS({
+  "umd:@jridgewell/sourcemap-codec"(exports, module2) {
+    module2.exports = require_sourcemapCodec;
+  }
+});
+
+// umd:@jridgewell/trace-mapping
+var require_trace_mapping = __commonJS({
+  "umd:@jridgewell/trace-mapping"(exports, module2) {
+    module2.exports = require_traceMapping;
+  }
+});
+
+// src/gen-mapping.ts
+var gen_mapping_exports = {};
+__export(gen_mapping_exports, {
+  GenMapping: () => GenMapping,
+  addMapping: () => addMapping,
+  addSegment: () => addSegment,
+  allMappings: () => allMappings,
+  fromMap: () => fromMap,
+  maybeAddMapping: () => maybeAddMapping,
+  maybeAddSegment: () => maybeAddSegment,
+  setIgnore: () => setIgnore,
+  setSourceContent: () => setSourceContent,
+  toDecodedMap: () => toDecodedMap,
+  toEncodedMap: () => toEncodedMap
+});
+module.exports = __toCommonJS(gen_mapping_exports);
+
+// src/set-array.ts
+var SetArray = class {
+  constructor() {
+    this._indexes = { __proto__: null };
+    this.array = [];
+  }
+};
+function cast(set) {
+  return set;
+}
+function get(setarr, key) {
+  return cast(setarr)._indexes[key];
+}
+function put(setarr, key) {
+  const index = get(setarr, key);
+  if (index !== void 0) return index;
+  const { array, _indexes: indexes } = cast(setarr);
+  const length = array.push(key);
+  return indexes[key] = length - 1;
+}
+function remove(setarr, key) {
+  const index = get(setarr, key);
+  if (index === void 0) return;
+  const { array, _indexes: indexes } = cast(setarr);
+  for (let i = index + 1; i < array.length; i++) {
+    const k = array[i];
+    array[i - 1] = k;
+    indexes[k]--;
+  }
+  indexes[key] = void 0;
+  array.pop();
+}
+
+// src/gen-mapping.ts
+var import_sourcemap_codec = __toESM(require_sourcemap_codec());
+var import_trace_mapping = __toESM(require_trace_mapping());
+
+// src/sourcemap-segment.ts
+var COLUMN = 0;
+var SOURCES_INDEX = 1;
+var SOURCE_LINE = 2;
+var SOURCE_COLUMN = 3;
+var NAMES_INDEX = 4;
+
+// src/gen-mapping.ts
+var NO_NAME = -1;
+var GenMapping = class {
+  constructor({ file, sourceRoot } = {}) {
+    this._names = new SetArray();
+    this._sources = new SetArray();
+    this._sourcesContent = [];
+    this._mappings = [];
+    this.file = file;
+    this.sourceRoot = sourceRoot;
+    this._ignoreList = new SetArray();
+  }
+};
+function cast2(map) {
+  return map;
+}
+function addSegment(map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
+  return addSegmentInternal(
+    false,
+    map,
+    genLine,
+    genColumn,
+    source,
+    sourceLine,
+    sourceColumn,
+    name,
+    content
+  );
+}
+function addMapping(map, mapping) {
+  return addMappingInternal(false, map, mapping);
+}
+var maybeAddSegment = (map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) => {
+  return addSegmentInternal(
+    true,
+    map,
+    genLine,
+    genColumn,
+    source,
+    sourceLine,
+    sourceColumn,
+    name,
+    content
+  );
+};
+var maybeAddMapping = (map, mapping) => {
+  return addMappingInternal(true, map, mapping);
+};
+function setSourceContent(map, source, content) {
+  const {
+    _sources: sources,
+    _sourcesContent: sourcesContent
+    // _originalScopes: originalScopes,
+  } = cast2(map);
+  const index = put(sources, source);
+  sourcesContent[index] = content;
+}
+function setIgnore(map, source, ignore = true) {
+  const {
+    _sources: sources,
+    _sourcesContent: sourcesContent,
+    _ignoreList: ignoreList
+    // _originalScopes: originalScopes,
+  } = cast2(map);
+  const index = put(sources, source);
+  if (index === sourcesContent.length) sourcesContent[index] = null;
+  if (ignore) put(ignoreList, index);
+  else remove(ignoreList, index);
+}
+function toDecodedMap(map) {
+  const {
+    _mappings: mappings,
+    _sources: sources,
+    _sourcesContent: sourcesContent,
+    _names: names,
+    _ignoreList: ignoreList
+    // _originalScopes: originalScopes,
+    // _generatedRanges: generatedRanges,
+  } = cast2(map);
+  removeEmptyFinalLines(mappings);
+  return {
+    version: 3,
+    file: map.file || void 0,
+    names: names.array,
+    sourceRoot: map.sourceRoot || void 0,
+    sources: sources.array,
+    sourcesContent,
+    mappings,
+    // originalScopes,
+    // generatedRanges,
+    ignoreList: ignoreList.array
+  };
+}
+function toEncodedMap(map) {
+  const decoded = toDecodedMap(map);
+  return Object.assign({}, decoded, {
+    // originalScopes: decoded.originalScopes.map((os) => encodeOriginalScopes(os)),
+    // generatedRanges: encodeGeneratedRanges(decoded.generatedRanges as GeneratedRange[]),
+    mappings: (0, import_sourcemap_codec.encode)(decoded.mappings)
+  });
+}
+function fromMap(input) {
+  const map = new import_trace_mapping.TraceMap(input);
+  const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });
+  putAll(cast2(gen)._names, map.names);
+  putAll(cast2(gen)._sources, map.sources);
+  cast2(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null);
+  cast2(gen)._mappings = (0, import_trace_mapping.decodedMappings)(map);
+  if (map.ignoreList) putAll(cast2(gen)._ignoreList, map.ignoreList);
+  return gen;
+}
+function allMappings(map) {
+  const out = [];
+  const { _mappings: mappings, _sources: sources, _names: names } = cast2(map);
+  for (let i = 0; i < mappings.length; i++) {
+    const line = mappings[i];
+    for (let j = 0; j < line.length; j++) {
+      const seg = line[j];
+      const generated = { line: i + 1, column: seg[COLUMN] };
+      let source = void 0;
+      let original = void 0;
+      let name = void 0;
+      if (seg.length !== 1) {
+        source = sources.array[seg[SOURCES_INDEX]];
+        original = { line: seg[SOURCE_LINE] + 1, column: seg[SOURCE_COLUMN] };
+        if (seg.length === 5) name = names.array[seg[NAMES_INDEX]];
+      }
+      out.push({ generated, source, original, name });
+    }
+  }
+  return out;
+}
+function addSegmentInternal(skipable, map, genLine, genColumn, source, sourceLine, sourceColumn, name, content) {
+  const {
+    _mappings: mappings,
+    _sources: sources,
+    _sourcesContent: sourcesContent,
+    _names: names
+    // _originalScopes: originalScopes,
+  } = cast2(map);
+  const line = getIndex(mappings, genLine);
+  const index = getColumnIndex(line, genColumn);
+  if (!source) {
+    if (skipable && skipSourceless(line, index)) return;
+    return insert(line, index, [genColumn]);
+  }
+  assert(sourceLine);
+  assert(sourceColumn);
+  const sourcesIndex = put(sources, source);
+  const namesIndex = name ? put(names, name) : NO_NAME;
+  if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content != null ? content : null;
+  if (skipable && skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex)) {
+    return;
+  }
+  return insert(
+    line,
+    index,
+    name ? [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex] : [genColumn, sourcesIndex, sourceLine, sourceColumn]
+  );
+}
+function assert(_val) {
+}
+function getIndex(arr, index) {
+  for (let i = arr.length; i <= index; i++) {
+    arr[i] = [];
+  }
+  return arr[index];
+}
+function getColumnIndex(line, genColumn) {
+  let index = line.length;
+  for (let i = index - 1; i >= 0; index = i--) {
+    const current = line[i];
+    if (genColumn >= current[COLUMN]) break;
+  }
+  return index;
+}
+function insert(array, index, value) {
+  for (let i = array.length; i > index; i--) {
+    array[i] = array[i - 1];
+  }
+  array[index] = value;
+}
+function removeEmptyFinalLines(mappings) {
+  const { length } = mappings;
+  let len = length;
+  for (let i = len - 1; i >= 0; len = i, i--) {
+    if (mappings[i].length > 0) break;
+  }
+  if (len < length) mappings.length = len;
+}
+function putAll(setarr, array) {
+  for (let i = 0; i < array.length; i++) put(setarr, array[i]);
+}
+function skipSourceless(line, index) {
+  if (index === 0) return true;
+  const prev = line[index - 1];
+  return prev.length === 1;
+}
+function skipSource(line, index, sourcesIndex, sourceLine, sourceColumn, namesIndex) {
+  if (index === 0) return false;
+  const prev = line[index - 1];
+  if (prev.length === 1) return false;
+  return sourcesIndex === prev[SOURCES_INDEX] && sourceLine === prev[SOURCE_LINE] && sourceColumn === prev[SOURCE_COLUMN] && namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME);
+}
+function addMappingInternal(skipable, map, mapping) {
+  const { generated, source, original, name, content } = mapping;
+  if (!source) {
+    return addSegmentInternal(
+      skipable,
+      map,
+      generated.line - 1,
+      generated.column,
+      null,
+      null,
+      null,
+      null,
+      null
+    );
+  }
+  assert(original);
+  return addSegmentInternal(
+    skipable,
+    map,
+    generated.line - 1,
+    generated.column,
+    source,
+    original.line - 1,
+    original.column,
+    name,
+    content
+  );
+}
+}));
+//# sourceMappingURL=gen-mapping.umd.js.map

File diff suppressed because it is too large
+ 3 - 0
node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map


+ 88 - 0
node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts

@@ -0,0 +1,88 @@
+import type { SourceMapInput } from '@jridgewell/trace-mapping';
+import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types';
+export type { DecodedSourceMap, EncodedSourceMap, Mapping };
+export type Options = {
+    file?: string | null;
+    sourceRoot?: string | null;
+};
+/**
+ * Provides the state to generate a sourcemap.
+ */
+export declare class GenMapping {
+    private _names;
+    private _sources;
+    private _sourcesContent;
+    private _mappings;
+    private _ignoreList;
+    file: string | null | undefined;
+    sourceRoot: string | null | undefined;
+    constructor({ file, sourceRoot }?: Options);
+}
+/**
+ * A low-level API to associate a generated position with an original source position. Line and
+ * column here are 0-based, unlike `addMapping`.
+ */
+export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source?: null, sourceLine?: null, sourceColumn?: null, name?: null, content?: null): void;
+export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name?: null, content?: string | null): void;
+export declare function addSegment(map: GenMapping, genLine: number, genColumn: number, source: string, sourceLine: number, sourceColumn: number, name: string, content?: string | null): void;
+/**
+ * A high-level API to associate a generated position with an original source position. Line is
+ * 1-based, but column is 0-based, due to legacy behavior in `source-map` library.
+ */
+export declare function addMapping(map: GenMapping, mapping: {
+    generated: Pos;
+    source?: null;
+    original?: null;
+    name?: null;
+    content?: null;
+}): void;
+export declare function addMapping(map: GenMapping, mapping: {
+    generated: Pos;
+    source: string;
+    original: Pos;
+    name?: null;
+    content?: string | null;
+}): void;
+export declare function addMapping(map: GenMapping, mapping: {
+    generated: Pos;
+    source: string;
+    original: Pos;
+    name: string;
+    content?: string | null;
+}): void;
+/**
+ * Same as `addSegment`, but will only add the segment if it generates useful information in the
+ * resulting map. This only works correctly if segments are added **in order**, meaning you should
+ * not add a segment with a lower generated line/column than one that came before.
+ */
+export declare const maybeAddSegment: typeof addSegment;
+/**
+ * Same as `addMapping`, but will only add the mapping if it generates useful information in the
+ * resulting map. This only works correctly if mappings are added **in order**, meaning you should
+ * not add a mapping with a lower generated line/column than one that came before.
+ */
+export declare const maybeAddMapping: typeof addMapping;
+/**
+ * Adds/removes the content of the source file to the source map.
+ */
+export declare function setSourceContent(map: GenMapping, source: string, content: string | null): void;
+export declare function setIgnore(map: GenMapping, source: string, ignore?: boolean): void;
+/**
+ * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
+ * a sourcemap, or to JSON.stringify.
+ */
+export declare function toDecodedMap(map: GenMapping): DecodedSourceMap;
+/**
+ * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
+ * a sourcemap, or to JSON.stringify.
+ */
+export declare function toEncodedMap(map: GenMapping): EncodedSourceMap;
+/**
+ * Constructs a new GenMapping, using the already present mappings of the input.
+ */
+export declare function fromMap(input: SourceMapInput): GenMapping;
+/**
+ * Returns an array of high-level mapping objects for every recorded segment, which could then be
+ * passed to the `source-map` library.
+ */
+export declare function allMappings(map: GenMapping): Mapping[];

+ 32 - 0
node_modules/@jridgewell/gen-mapping/dist/types/set-array.d.ts

@@ -0,0 +1,32 @@
+type Key = string | number | symbol;
+/**
+ * SetArray acts like a `Set` (allowing only one occurrence of a string `key`), but provides the
+ * index of the `key` in the backing array.
+ *
+ * This is designed to allow synchronizing a second array with the contents of the backing array,
+ * like how in a sourcemap `sourcesContent[i]` is the source content associated with `source[i]`,
+ * and there are never duplicates.
+ */
+export declare class SetArray<T extends Key = Key> {
+    private _indexes;
+    array: readonly T[];
+    constructor();
+}
+/**
+ * Gets the index associated with `key` in the backing array, if it is already present.
+ */
+export declare function get<T extends Key>(setarr: SetArray<T>, key: T): number | undefined;
+/**
+ * Puts `key` into the backing array, if it is not already present. Returns
+ * the index of the `key` in the backing array.
+ */
+export declare function put<T extends Key>(setarr: SetArray<T>, key: T): number;
+/**
+ * Pops the last added item out of the SetArray.
+ */
+export declare function pop<T extends Key>(setarr: SetArray<T>): void;
+/**
+ * Removes the key, if it exists in the set.
+ */
+export declare function remove<T extends Key>(setarr: SetArray<T>, key: T): void;
+export {};

+ 12 - 0
node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts

@@ -0,0 +1,12 @@
+type GeneratedColumn = number;
+type SourcesIndex = number;
+type SourceLine = number;
+type SourceColumn = number;
+type NamesIndex = number;
+export type SourceMapSegment = [GeneratedColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn] | [GeneratedColumn, SourcesIndex, SourceLine, SourceColumn, NamesIndex];
+export declare const COLUMN = 0;
+export declare const SOURCES_INDEX = 1;
+export declare const SOURCE_LINE = 2;
+export declare const SOURCE_COLUMN = 3;
+export declare const NAMES_INDEX = 4;
+export {};

+ 43 - 0
node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts

@@ -0,0 +1,43 @@
+import type { SourceMapSegment } from './sourcemap-segment';
+export interface SourceMapV3 {
+    file?: string | null;
+    names: readonly string[];
+    sourceRoot?: string;
+    sources: readonly (string | null)[];
+    sourcesContent?: readonly (string | null)[];
+    version: 3;
+    ignoreList?: readonly number[];
+}
+export interface EncodedSourceMap extends SourceMapV3 {
+    mappings: string;
+}
+export interface DecodedSourceMap extends SourceMapV3 {
+    mappings: readonly SourceMapSegment[][];
+}
+export interface Pos {
+    line: number;
+    column: number;
+}
+export interface OriginalPos extends Pos {
+    source: string;
+}
+export interface BindingExpressionRange {
+    start: Pos;
+    expression: string;
+}
+export type Mapping = {
+    generated: Pos;
+    source: undefined;
+    original: undefined;
+    name: undefined;
+} | {
+    generated: Pos;
+    source: string;
+    original: Pos;
+    name: string;
+} | {
+    generated: Pos;
+    source: string;
+    original: Pos;
+    name: undefined;
+};

+ 144 - 0
node_modules/@jridgewell/remapping/dist/remapping.mjs

@@ -0,0 +1,144 @@
+// src/build-source-map-tree.ts
+import { TraceMap } from "@jridgewell/trace-mapping";
+
+// src/source-map-tree.ts
+import { GenMapping, maybeAddSegment, setIgnore, setSourceContent } from "@jridgewell/gen-mapping";
+import { traceSegment, decodedMappings } from "@jridgewell/trace-mapping";
+var SOURCELESS_MAPPING = /* @__PURE__ */ SegmentObject("", -1, -1, "", null, false);
+var EMPTY_SOURCES = [];
+function SegmentObject(source, line, column, name, content, ignore) {
+  return { source, line, column, name, content, ignore };
+}
+function Source(map, sources, source, content, ignore) {
+  return {
+    map,
+    sources,
+    source,
+    content,
+    ignore
+  };
+}
+function MapSource(map, sources) {
+  return Source(map, sources, "", null, false);
+}
+function OriginalSource(source, content, ignore) {
+  return Source(null, EMPTY_SOURCES, source, content, ignore);
+}
+function traceMappings(tree) {
+  const gen = new GenMapping({ file: tree.map.file });
+  const { sources: rootSources, map } = tree;
+  const rootNames = map.names;
+  const rootMappings = decodedMappings(map);
+  for (let i = 0; i < rootMappings.length; i++) {
+    const segments = rootMappings[i];
+    for (let j = 0; j < segments.length; j++) {
+      const segment = segments[j];
+      const genCol = segment[0];
+      let traced = SOURCELESS_MAPPING;
+      if (segment.length !== 1) {
+        const source2 = rootSources[segment[1]];
+        traced = originalPositionFor(
+          source2,
+          segment[2],
+          segment[3],
+          segment.length === 5 ? rootNames[segment[4]] : ""
+        );
+        if (traced == null) continue;
+      }
+      const { column, line, name, content, source, ignore } = traced;
+      maybeAddSegment(gen, i, genCol, source, line, column, name);
+      if (source && content != null) setSourceContent(gen, source, content);
+      if (ignore) setIgnore(gen, source, true);
+    }
+  }
+  return gen;
+}
+function originalPositionFor(source, line, column, name) {
+  if (!source.map) {
+    return SegmentObject(source.source, line, column, name, source.content, source.ignore);
+  }
+  const segment = traceSegment(source.map, line, column);
+  if (segment == null) return null;
+  if (segment.length === 1) return SOURCELESS_MAPPING;
+  return originalPositionFor(
+    source.sources[segment[1]],
+    segment[2],
+    segment[3],
+    segment.length === 5 ? source.map.names[segment[4]] : name
+  );
+}
+
+// src/build-source-map-tree.ts
+function asArray(value) {
+  if (Array.isArray(value)) return value;
+  return [value];
+}
+function buildSourceMapTree(input, loader) {
+  const maps = asArray(input).map((m) => new TraceMap(m, ""));
+  const map = maps.pop();
+  for (let i = 0; i < maps.length; i++) {
+    if (maps[i].sources.length > 1) {
+      throw new Error(
+        `Transformation map ${i} must have exactly one source file.
+Did you specify these with the most recent transformation maps first?`
+      );
+    }
+  }
+  let tree = build(map, loader, "", 0);
+  for (let i = maps.length - 1; i >= 0; i--) {
+    tree = MapSource(maps[i], [tree]);
+  }
+  return tree;
+}
+function build(map, loader, importer, importerDepth) {
+  const { resolvedSources, sourcesContent, ignoreList } = map;
+  const depth = importerDepth + 1;
+  const children = resolvedSources.map((sourceFile, i) => {
+    const ctx = {
+      importer,
+      depth,
+      source: sourceFile || "",
+      content: void 0,
+      ignore: void 0
+    };
+    const sourceMap = loader(ctx.source, ctx);
+    const { source, content, ignore } = ctx;
+    if (sourceMap) return build(new TraceMap(sourceMap, source), loader, source, depth);
+    const sourceContent = content !== void 0 ? content : sourcesContent ? sourcesContent[i] : null;
+    const ignored = ignore !== void 0 ? ignore : ignoreList ? ignoreList.includes(i) : false;
+    return OriginalSource(source, sourceContent, ignored);
+  });
+  return MapSource(map, children);
+}
+
+// src/source-map.ts
+import { toDecodedMap, toEncodedMap } from "@jridgewell/gen-mapping";
+var SourceMap = class {
+  constructor(map, options) {
+    const out = options.decodedMappings ? toDecodedMap(map) : toEncodedMap(map);
+    this.version = out.version;
+    this.file = out.file;
+    this.mappings = out.mappings;
+    this.names = out.names;
+    this.ignoreList = out.ignoreList;
+    this.sourceRoot = out.sourceRoot;
+    this.sources = out.sources;
+    if (!options.excludeContent) {
+      this.sourcesContent = out.sourcesContent;
+    }
+  }
+  toString() {
+    return JSON.stringify(this);
+  }
+};
+
+// src/remapping.ts
+function remapping(input, loader, options) {
+  const opts = typeof options === "object" ? options : { excludeContent: !!options, decodedMappings: false };
+  const tree = buildSourceMapTree(input, loader);
+  return new SourceMap(traceMappings(tree), opts);
+}
+export {
+  remapping as default
+};
+//# sourceMappingURL=remapping.mjs.map

File diff suppressed because it is too large
+ 3 - 0
node_modules/@jridgewell/remapping/dist/remapping.mjs.map


+ 212 - 0
node_modules/@jridgewell/remapping/dist/remapping.umd.js

@@ -0,0 +1,212 @@
+(function (global, factory) {
+  if (typeof exports === 'object' && typeof module !== 'undefined') {
+    factory(module, require('@jridgewell/gen-mapping'), require('@jridgewell/trace-mapping'));
+    module.exports = def(module);
+  } else if (typeof define === 'function' && define.amd) {
+    define(['module', '@jridgewell/gen-mapping', '@jridgewell/trace-mapping'], function(mod) {
+      factory.apply(this, arguments);
+      mod.exports = def(mod);
+    });
+  } else {
+    const mod = { exports: {} };
+    factory(mod, global.genMapping, global.traceMapping);
+    global = typeof globalThis !== 'undefined' ? globalThis : global || self;
+    global.remapping = def(mod);
+  }
+  function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; }
+})(this, (function (module, require_genMapping, require_traceMapping) {
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __commonJS = (cb, mod) => function __require() {
+  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+};
+var __export = (target, all) => {
+  for (var name in all)
+    __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+  if (from && typeof from === "object" || typeof from === "function") {
+    for (let key of __getOwnPropNames(from))
+      if (!__hasOwnProp.call(to, key) && key !== except)
+        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+  }
+  return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+  // If the importer is in node compatibility mode or this is not an ESM
+  // file that has been converted to a CommonJS file using a Babel-
+  // compatible transform (i.e. "__esModule" has not been set), then set
+  // "default" to the CommonJS "module.exports" for node compatibility.
+  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+  mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// umd:@jridgewell/trace-mapping
+var require_trace_mapping = __commonJS({
+  "umd:@jridgewell/trace-mapping"(exports, module2) {
+    module2.exports = require_traceMapping;
+  }
+});
+
+// umd:@jridgewell/gen-mapping
+var require_gen_mapping = __commonJS({
+  "umd:@jridgewell/gen-mapping"(exports, module2) {
+    module2.exports = require_genMapping;
+  }
+});
+
+// src/remapping.ts
+var remapping_exports = {};
+__export(remapping_exports, {
+  default: () => remapping
+});
+module.exports = __toCommonJS(remapping_exports);
+
+// src/build-source-map-tree.ts
+var import_trace_mapping2 = __toESM(require_trace_mapping());
+
+// src/source-map-tree.ts
+var import_gen_mapping = __toESM(require_gen_mapping());
+var import_trace_mapping = __toESM(require_trace_mapping());
+var SOURCELESS_MAPPING = /* @__PURE__ */ SegmentObject("", -1, -1, "", null, false);
+var EMPTY_SOURCES = [];
+function SegmentObject(source, line, column, name, content, ignore) {
+  return { source, line, column, name, content, ignore };
+}
+function Source(map, sources, source, content, ignore) {
+  return {
+    map,
+    sources,
+    source,
+    content,
+    ignore
+  };
+}
+function MapSource(map, sources) {
+  return Source(map, sources, "", null, false);
+}
+function OriginalSource(source, content, ignore) {
+  return Source(null, EMPTY_SOURCES, source, content, ignore);
+}
+function traceMappings(tree) {
+  const gen = new import_gen_mapping.GenMapping({ file: tree.map.file });
+  const { sources: rootSources, map } = tree;
+  const rootNames = map.names;
+  const rootMappings = (0, import_trace_mapping.decodedMappings)(map);
+  for (let i = 0; i < rootMappings.length; i++) {
+    const segments = rootMappings[i];
+    for (let j = 0; j < segments.length; j++) {
+      const segment = segments[j];
+      const genCol = segment[0];
+      let traced = SOURCELESS_MAPPING;
+      if (segment.length !== 1) {
+        const source2 = rootSources[segment[1]];
+        traced = originalPositionFor(
+          source2,
+          segment[2],
+          segment[3],
+          segment.length === 5 ? rootNames[segment[4]] : ""
+        );
+        if (traced == null) continue;
+      }
+      const { column, line, name, content, source, ignore } = traced;
+      (0, import_gen_mapping.maybeAddSegment)(gen, i, genCol, source, line, column, name);
+      if (source && content != null) (0, import_gen_mapping.setSourceContent)(gen, source, content);
+      if (ignore) (0, import_gen_mapping.setIgnore)(gen, source, true);
+    }
+  }
+  return gen;
+}
+function originalPositionFor(source, line, column, name) {
+  if (!source.map) {
+    return SegmentObject(source.source, line, column, name, source.content, source.ignore);
+  }
+  const segment = (0, import_trace_mapping.traceSegment)(source.map, line, column);
+  if (segment == null) return null;
+  if (segment.length === 1) return SOURCELESS_MAPPING;
+  return originalPositionFor(
+    source.sources[segment[1]],
+    segment[2],
+    segment[3],
+    segment.length === 5 ? source.map.names[segment[4]] : name
+  );
+}
+
+// src/build-source-map-tree.ts
+function asArray(value) {
+  if (Array.isArray(value)) return value;
+  return [value];
+}
+function buildSourceMapTree(input, loader) {
+  const maps = asArray(input).map((m) => new import_trace_mapping2.TraceMap(m, ""));
+  const map = maps.pop();
+  for (let i = 0; i < maps.length; i++) {
+    if (maps[i].sources.length > 1) {
+      throw new Error(
+        `Transformation map ${i} must have exactly one source file.
+Did you specify these with the most recent transformation maps first?`
+      );
+    }
+  }
+  let tree = build(map, loader, "", 0);
+  for (let i = maps.length - 1; i >= 0; i--) {
+    tree = MapSource(maps[i], [tree]);
+  }
+  return tree;
+}
+function build(map, loader, importer, importerDepth) {
+  const { resolvedSources, sourcesContent, ignoreList } = map;
+  const depth = importerDepth + 1;
+  const children = resolvedSources.map((sourceFile, i) => {
+    const ctx = {
+      importer,
+      depth,
+      source: sourceFile || "",
+      content: void 0,
+      ignore: void 0
+    };
+    const sourceMap = loader(ctx.source, ctx);
+    const { source, content, ignore } = ctx;
+    if (sourceMap) return build(new import_trace_mapping2.TraceMap(sourceMap, source), loader, source, depth);
+    const sourceContent = content !== void 0 ? content : sourcesContent ? sourcesContent[i] : null;
+    const ignored = ignore !== void 0 ? ignore : ignoreList ? ignoreList.includes(i) : false;
+    return OriginalSource(source, sourceContent, ignored);
+  });
+  return MapSource(map, children);
+}
+
+// src/source-map.ts
+var import_gen_mapping2 = __toESM(require_gen_mapping());
+var SourceMap = class {
+  constructor(map, options) {
+    const out = options.decodedMappings ? (0, import_gen_mapping2.toDecodedMap)(map) : (0, import_gen_mapping2.toEncodedMap)(map);
+    this.version = out.version;
+    this.file = out.file;
+    this.mappings = out.mappings;
+    this.names = out.names;
+    this.ignoreList = out.ignoreList;
+    this.sourceRoot = out.sourceRoot;
+    this.sources = out.sources;
+    if (!options.excludeContent) {
+      this.sourcesContent = out.sourcesContent;
+    }
+  }
+  toString() {
+    return JSON.stringify(this);
+  }
+};
+
+// src/remapping.ts
+function remapping(input, loader, options) {
+  const opts = typeof options === "object" ? options : { excludeContent: !!options, decodedMappings: false };
+  const tree = buildSourceMapTree(input, loader);
+  return new SourceMap(traceMappings(tree), opts);
+}
+}));
+//# sourceMappingURL=remapping.umd.js.map

File diff suppressed because it is too large
+ 3 - 0
node_modules/@jridgewell/remapping/dist/remapping.umd.js.map


+ 232 - 0
node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs

@@ -0,0 +1,232 @@
+// Matches the scheme of a URL, eg "http://"
+const schemeRegex = /^[\w+.-]+:\/\//;
+/**
+ * Matches the parts of a URL:
+ * 1. Scheme, including ":", guaranteed.
+ * 2. User/password, including "@", optional.
+ * 3. Host, guaranteed.
+ * 4. Port, including ":", optional.
+ * 5. Path, including "/", optional.
+ * 6. Query, including "?", optional.
+ * 7. Hash, including "#", optional.
+ */
+const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
+/**
+ * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start
+ * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).
+ *
+ * 1. Host, optional.
+ * 2. Path, which may include "/", guaranteed.
+ * 3. Query, including "?", optional.
+ * 4. Hash, including "#", optional.
+ */
+const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
+function isAbsoluteUrl(input) {
+    return schemeRegex.test(input);
+}
+function isSchemeRelativeUrl(input) {
+    return input.startsWith('//');
+}
+function isAbsolutePath(input) {
+    return input.startsWith('/');
+}
+function isFileUrl(input) {
+    return input.startsWith('file:');
+}
+function isRelative(input) {
+    return /^[.?#]/.test(input);
+}
+function parseAbsoluteUrl(input) {
+    const match = urlRegex.exec(input);
+    return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');
+}
+function parseFileUrl(input) {
+    const match = fileRegex.exec(input);
+    const path = match[2];
+    return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');
+}
+function makeUrl(scheme, user, host, port, path, query, hash) {
+    return {
+        scheme,
+        user,
+        host,
+        port,
+        path,
+        query,
+        hash,
+        type: 7 /* Absolute */,
+    };
+}
+function parseUrl(input) {
+    if (isSchemeRelativeUrl(input)) {
+        const url = parseAbsoluteUrl('http:' + input);
+        url.scheme = '';
+        url.type = 6 /* SchemeRelative */;
+        return url;
+    }
+    if (isAbsolutePath(input)) {
+        const url = parseAbsoluteUrl('http://foo.com' + input);
+        url.scheme = '';
+        url.host = '';
+        url.type = 5 /* AbsolutePath */;
+        return url;
+    }
+    if (isFileUrl(input))
+        return parseFileUrl(input);
+    if (isAbsoluteUrl(input))
+        return parseAbsoluteUrl(input);
+    const url = parseAbsoluteUrl('http://foo.com/' + input);
+    url.scheme = '';
+    url.host = '';
+    url.type = input
+        ? input.startsWith('?')
+            ? 3 /* Query */
+            : input.startsWith('#')
+                ? 2 /* Hash */
+                : 4 /* RelativePath */
+        : 1 /* Empty */;
+    return url;
+}
+function stripPathFilename(path) {
+    // If a path ends with a parent directory "..", then it's a relative path with excess parent
+    // paths. It's not a file, so we can't strip it.
+    if (path.endsWith('/..'))
+        return path;
+    const index = path.lastIndexOf('/');
+    return path.slice(0, index + 1);
+}
+function mergePaths(url, base) {
+    normalizePath(base, base.type);
+    // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative
+    // path).
+    if (url.path === '/') {
+        url.path = base.path;
+    }
+    else {
+        // Resolution happens relative to the base path's directory, not the file.
+        url.path = stripPathFilename(base.path) + url.path;
+    }
+}
+/**
+ * The path can have empty directories "//", unneeded parents "foo/..", or current directory
+ * "foo/.". We need to normalize to a standard representation.
+ */
+function normalizePath(url, type) {
+    const rel = type <= 4 /* RelativePath */;
+    const pieces = url.path.split('/');
+    // We need to preserve the first piece always, so that we output a leading slash. The item at
+    // pieces[0] is an empty string.
+    let pointer = 1;
+    // Positive is the number of real directories we've output, used for popping a parent directory.
+    // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo".
+    let positive = 0;
+    // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will
+    // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a
+    // real directory, we won't need to append, unless the other conditions happen again.
+    let addTrailingSlash = false;
+    for (let i = 1; i < pieces.length; i++) {
+        const piece = pieces[i];
+        // An empty directory, could be a trailing slash, or just a double "//" in the path.
+        if (!piece) {
+            addTrailingSlash = true;
+            continue;
+        }
+        // If we encounter a real directory, then we don't need to append anymore.
+        addTrailingSlash = false;
+        // A current directory, which we can always drop.
+        if (piece === '.')
+            continue;
+        // A parent directory, we need to see if there are any real directories we can pop. Else, we
+        // have an excess of parents, and we'll need to keep the "..".
+        if (piece === '..') {
+            if (positive) {
+                addTrailingSlash = true;
+                positive--;
+                pointer--;
+            }
+            else if (rel) {
+                // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute
+                // URL, protocol relative URL, or an absolute path, we don't need to keep excess.
+                pieces[pointer++] = piece;
+            }
+            continue;
+        }
+        // We've encountered a real directory. Move it to the next insertion pointer, which accounts for
+        // any popped or dropped directories.
+        pieces[pointer++] = piece;
+        positive++;
+    }
+    let path = '';
+    for (let i = 1; i < pointer; i++) {
+        path += '/' + pieces[i];
+    }
+    if (!path || (addTrailingSlash && !path.endsWith('/..'))) {
+        path += '/';
+    }
+    url.path = path;
+}
+/**
+ * Attempts to resolve `input` URL/path relative to `base`.
+ */
+function resolve(input, base) {
+    if (!input && !base)
+        return '';
+    const url = parseUrl(input);
+    let inputType = url.type;
+    if (base && inputType !== 7 /* Absolute */) {
+        const baseUrl = parseUrl(base);
+        const baseType = baseUrl.type;
+        switch (inputType) {
+            case 1 /* Empty */:
+                url.hash = baseUrl.hash;
+            // fall through
+            case 2 /* Hash */:
+                url.query = baseUrl.query;
+            // fall through
+            case 3 /* Query */:
+            case 4 /* RelativePath */:
+                mergePaths(url, baseUrl);
+            // fall through
+            case 5 /* AbsolutePath */:
+                // The host, user, and port are joined, you can't copy one without the others.
+                url.user = baseUrl.user;
+                url.host = baseUrl.host;
+                url.port = baseUrl.port;
+            // fall through
+            case 6 /* SchemeRelative */:
+                // The input doesn't have a schema at least, so we need to copy at least that over.
+                url.scheme = baseUrl.scheme;
+        }
+        if (baseType > inputType)
+            inputType = baseType;
+    }
+    normalizePath(url, inputType);
+    const queryHash = url.query + url.hash;
+    switch (inputType) {
+        // This is impossible, because of the empty checks at the start of the function.
+        // case UrlType.Empty:
+        case 2 /* Hash */:
+        case 3 /* Query */:
+            return queryHash;
+        case 4 /* RelativePath */: {
+            // The first char is always a "/", and we need it to be relative.
+            const path = url.path.slice(1);
+            if (!path)
+                return queryHash || '.';
+            if (isRelative(base || input) && !isRelative(path)) {
+                // If base started with a leading ".", or there is no base and input started with a ".",
+                // then we need to ensure that the relative path starts with a ".". We don't know if
+                // relative starts with a "..", though, so check before prepending.
+                return './' + path + queryHash;
+            }
+            return path + queryHash;
+        }
+        case 5 /* AbsolutePath */:
+            return url.path + queryHash;
+        default:
+            return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;
+    }
+}
+
+export { resolve as default };
+//# sourceMappingURL=resolve-uri.mjs.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map


+ 240 - 0
node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js

@@ -0,0 +1,240 @@
+(function (global, factory) {
+    typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+    typeof define === 'function' && define.amd ? define(factory) :
+    (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.resolveURI = factory());
+})(this, (function () { 'use strict';
+
+    // Matches the scheme of a URL, eg "http://"
+    const schemeRegex = /^[\w+.-]+:\/\//;
+    /**
+     * Matches the parts of a URL:
+     * 1. Scheme, including ":", guaranteed.
+     * 2. User/password, including "@", optional.
+     * 3. Host, guaranteed.
+     * 4. Port, including ":", optional.
+     * 5. Path, including "/", optional.
+     * 6. Query, including "?", optional.
+     * 7. Hash, including "#", optional.
+     */
+    const urlRegex = /^([\w+.-]+:)\/\/([^@/#?]*@)?([^:/#?]*)(:\d+)?(\/[^#?]*)?(\?[^#]*)?(#.*)?/;
+    /**
+     * File URLs are weird. They dont' need the regular `//` in the scheme, they may or may not start
+     * with a leading `/`, they can have a domain (but only if they don't start with a Windows drive).
+     *
+     * 1. Host, optional.
+     * 2. Path, which may include "/", guaranteed.
+     * 3. Query, including "?", optional.
+     * 4. Hash, including "#", optional.
+     */
+    const fileRegex = /^file:(?:\/\/((?![a-z]:)[^/#?]*)?)?(\/?[^#?]*)(\?[^#]*)?(#.*)?/i;
+    function isAbsoluteUrl(input) {
+        return schemeRegex.test(input);
+    }
+    function isSchemeRelativeUrl(input) {
+        return input.startsWith('//');
+    }
+    function isAbsolutePath(input) {
+        return input.startsWith('/');
+    }
+    function isFileUrl(input) {
+        return input.startsWith('file:');
+    }
+    function isRelative(input) {
+        return /^[.?#]/.test(input);
+    }
+    function parseAbsoluteUrl(input) {
+        const match = urlRegex.exec(input);
+        return makeUrl(match[1], match[2] || '', match[3], match[4] || '', match[5] || '/', match[6] || '', match[7] || '');
+    }
+    function parseFileUrl(input) {
+        const match = fileRegex.exec(input);
+        const path = match[2];
+        return makeUrl('file:', '', match[1] || '', '', isAbsolutePath(path) ? path : '/' + path, match[3] || '', match[4] || '');
+    }
+    function makeUrl(scheme, user, host, port, path, query, hash) {
+        return {
+            scheme,
+            user,
+            host,
+            port,
+            path,
+            query,
+            hash,
+            type: 7 /* Absolute */,
+        };
+    }
+    function parseUrl(input) {
+        if (isSchemeRelativeUrl(input)) {
+            const url = parseAbsoluteUrl('http:' + input);
+            url.scheme = '';
+            url.type = 6 /* SchemeRelative */;
+            return url;
+        }
+        if (isAbsolutePath(input)) {
+            const url = parseAbsoluteUrl('http://foo.com' + input);
+            url.scheme = '';
+            url.host = '';
+            url.type = 5 /* AbsolutePath */;
+            return url;
+        }
+        if (isFileUrl(input))
+            return parseFileUrl(input);
+        if (isAbsoluteUrl(input))
+            return parseAbsoluteUrl(input);
+        const url = parseAbsoluteUrl('http://foo.com/' + input);
+        url.scheme = '';
+        url.host = '';
+        url.type = input
+            ? input.startsWith('?')
+                ? 3 /* Query */
+                : input.startsWith('#')
+                    ? 2 /* Hash */
+                    : 4 /* RelativePath */
+            : 1 /* Empty */;
+        return url;
+    }
+    function stripPathFilename(path) {
+        // If a path ends with a parent directory "..", then it's a relative path with excess parent
+        // paths. It's not a file, so we can't strip it.
+        if (path.endsWith('/..'))
+            return path;
+        const index = path.lastIndexOf('/');
+        return path.slice(0, index + 1);
+    }
+    function mergePaths(url, base) {
+        normalizePath(base, base.type);
+        // If the path is just a "/", then it was an empty path to begin with (remember, we're a relative
+        // path).
+        if (url.path === '/') {
+            url.path = base.path;
+        }
+        else {
+            // Resolution happens relative to the base path's directory, not the file.
+            url.path = stripPathFilename(base.path) + url.path;
+        }
+    }
+    /**
+     * The path can have empty directories "//", unneeded parents "foo/..", or current directory
+     * "foo/.". We need to normalize to a standard representation.
+     */
+    function normalizePath(url, type) {
+        const rel = type <= 4 /* RelativePath */;
+        const pieces = url.path.split('/');
+        // We need to preserve the first piece always, so that we output a leading slash. The item at
+        // pieces[0] is an empty string.
+        let pointer = 1;
+        // Positive is the number of real directories we've output, used for popping a parent directory.
+        // Eg, "foo/bar/.." will have a positive 2, and we can decrement to be left with just "foo".
+        let positive = 0;
+        // We need to keep a trailing slash if we encounter an empty directory (eg, splitting "foo/" will
+        // generate `["foo", ""]` pieces). And, if we pop a parent directory. But once we encounter a
+        // real directory, we won't need to append, unless the other conditions happen again.
+        let addTrailingSlash = false;
+        for (let i = 1; i < pieces.length; i++) {
+            const piece = pieces[i];
+            // An empty directory, could be a trailing slash, or just a double "//" in the path.
+            if (!piece) {
+                addTrailingSlash = true;
+                continue;
+            }
+            // If we encounter a real directory, then we don't need to append anymore.
+            addTrailingSlash = false;
+            // A current directory, which we can always drop.
+            if (piece === '.')
+                continue;
+            // A parent directory, we need to see if there are any real directories we can pop. Else, we
+            // have an excess of parents, and we'll need to keep the "..".
+            if (piece === '..') {
+                if (positive) {
+                    addTrailingSlash = true;
+                    positive--;
+                    pointer--;
+                }
+                else if (rel) {
+                    // If we're in a relativePath, then we need to keep the excess parents. Else, in an absolute
+                    // URL, protocol relative URL, or an absolute path, we don't need to keep excess.
+                    pieces[pointer++] = piece;
+                }
+                continue;
+            }
+            // We've encountered a real directory. Move it to the next insertion pointer, which accounts for
+            // any popped or dropped directories.
+            pieces[pointer++] = piece;
+            positive++;
+        }
+        let path = '';
+        for (let i = 1; i < pointer; i++) {
+            path += '/' + pieces[i];
+        }
+        if (!path || (addTrailingSlash && !path.endsWith('/..'))) {
+            path += '/';
+        }
+        url.path = path;
+    }
+    /**
+     * Attempts to resolve `input` URL/path relative to `base`.
+     */
+    function resolve(input, base) {
+        if (!input && !base)
+            return '';
+        const url = parseUrl(input);
+        let inputType = url.type;
+        if (base && inputType !== 7 /* Absolute */) {
+            const baseUrl = parseUrl(base);
+            const baseType = baseUrl.type;
+            switch (inputType) {
+                case 1 /* Empty */:
+                    url.hash = baseUrl.hash;
+                // fall through
+                case 2 /* Hash */:
+                    url.query = baseUrl.query;
+                // fall through
+                case 3 /* Query */:
+                case 4 /* RelativePath */:
+                    mergePaths(url, baseUrl);
+                // fall through
+                case 5 /* AbsolutePath */:
+                    // The host, user, and port are joined, you can't copy one without the others.
+                    url.user = baseUrl.user;
+                    url.host = baseUrl.host;
+                    url.port = baseUrl.port;
+                // fall through
+                case 6 /* SchemeRelative */:
+                    // The input doesn't have a schema at least, so we need to copy at least that over.
+                    url.scheme = baseUrl.scheme;
+            }
+            if (baseType > inputType)
+                inputType = baseType;
+        }
+        normalizePath(url, inputType);
+        const queryHash = url.query + url.hash;
+        switch (inputType) {
+            // This is impossible, because of the empty checks at the start of the function.
+            // case UrlType.Empty:
+            case 2 /* Hash */:
+            case 3 /* Query */:
+                return queryHash;
+            case 4 /* RelativePath */: {
+                // The first char is always a "/", and we need it to be relative.
+                const path = url.path.slice(1);
+                if (!path)
+                    return queryHash || '.';
+                if (isRelative(base || input) && !isRelative(path)) {
+                    // If base started with a leading ".", or there is no base and input started with a ".",
+                    // then we need to ensure that the relative path starts with a ".". We don't know if
+                    // relative starts with a "..", though, so check before prepending.
+                    return './' + path + queryHash;
+                }
+                return path + queryHash;
+            }
+            case 5 /* AbsolutePath */:
+                return url.path + queryHash;
+            default:
+                return url.scheme + '//' + url.user + url.host + url.port + url.path + queryHash;
+        }
+    }
+
+    return resolve;
+
+}));
+//# sourceMappingURL=resolve-uri.umd.js.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map


+ 4 - 0
node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts

@@ -0,0 +1,4 @@
+/**
+ * Attempts to resolve `input` URL/path relative to `base`.
+ */
+export default function resolve(input: string, base: string | undefined): string;

+ 423 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs

@@ -0,0 +1,423 @@
+// src/vlq.ts
+var comma = ",".charCodeAt(0);
+var semicolon = ";".charCodeAt(0);
+var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+var intToChar = new Uint8Array(64);
+var charToInt = new Uint8Array(128);
+for (let i = 0; i < chars.length; i++) {
+  const c = chars.charCodeAt(i);
+  intToChar[i] = c;
+  charToInt[c] = i;
+}
+function decodeInteger(reader, relative) {
+  let value = 0;
+  let shift = 0;
+  let integer = 0;
+  do {
+    const c = reader.next();
+    integer = charToInt[c];
+    value |= (integer & 31) << shift;
+    shift += 5;
+  } while (integer & 32);
+  const shouldNegate = value & 1;
+  value >>>= 1;
+  if (shouldNegate) {
+    value = -2147483648 | -value;
+  }
+  return relative + value;
+}
+function encodeInteger(builder, num, relative) {
+  let delta = num - relative;
+  delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
+  do {
+    let clamped = delta & 31;
+    delta >>>= 5;
+    if (delta > 0) clamped |= 32;
+    builder.write(intToChar[clamped]);
+  } while (delta > 0);
+  return num;
+}
+function hasMoreVlq(reader, max) {
+  if (reader.pos >= max) return false;
+  return reader.peek() !== comma;
+}
+
+// src/strings.ts
+var bufLength = 1024 * 16;
+var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
+  decode(buf) {
+    const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
+    return out.toString();
+  }
+} : {
+  decode(buf) {
+    let out = "";
+    for (let i = 0; i < buf.length; i++) {
+      out += String.fromCharCode(buf[i]);
+    }
+    return out;
+  }
+};
+var StringWriter = class {
+  constructor() {
+    this.pos = 0;
+    this.out = "";
+    this.buffer = new Uint8Array(bufLength);
+  }
+  write(v) {
+    const { buffer } = this;
+    buffer[this.pos++] = v;
+    if (this.pos === bufLength) {
+      this.out += td.decode(buffer);
+      this.pos = 0;
+    }
+  }
+  flush() {
+    const { buffer, out, pos } = this;
+    return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
+  }
+};
+var StringReader = class {
+  constructor(buffer) {
+    this.pos = 0;
+    this.buffer = buffer;
+  }
+  next() {
+    return this.buffer.charCodeAt(this.pos++);
+  }
+  peek() {
+    return this.buffer.charCodeAt(this.pos);
+  }
+  indexOf(char) {
+    const { buffer, pos } = this;
+    const idx = buffer.indexOf(char, pos);
+    return idx === -1 ? buffer.length : idx;
+  }
+};
+
+// src/scopes.ts
+var EMPTY = [];
+function decodeOriginalScopes(input) {
+  const { length } = input;
+  const reader = new StringReader(input);
+  const scopes = [];
+  const stack = [];
+  let line = 0;
+  for (; reader.pos < length; reader.pos++) {
+    line = decodeInteger(reader, line);
+    const column = decodeInteger(reader, 0);
+    if (!hasMoreVlq(reader, length)) {
+      const last = stack.pop();
+      last[2] = line;
+      last[3] = column;
+      continue;
+    }
+    const kind = decodeInteger(reader, 0);
+    const fields = decodeInteger(reader, 0);
+    const hasName = fields & 1;
+    const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind];
+    let vars = EMPTY;
+    if (hasMoreVlq(reader, length)) {
+      vars = [];
+      do {
+        const varsIndex = decodeInteger(reader, 0);
+        vars.push(varsIndex);
+      } while (hasMoreVlq(reader, length));
+    }
+    scope.vars = vars;
+    scopes.push(scope);
+    stack.push(scope);
+  }
+  return scopes;
+}
+function encodeOriginalScopes(scopes) {
+  const writer = new StringWriter();
+  for (let i = 0; i < scopes.length; ) {
+    i = _encodeOriginalScopes(scopes, i, writer, [0]);
+  }
+  return writer.flush();
+}
+function _encodeOriginalScopes(scopes, index, writer, state) {
+  const scope = scopes[index];
+  const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;
+  if (index > 0) writer.write(comma);
+  state[0] = encodeInteger(writer, startLine, state[0]);
+  encodeInteger(writer, startColumn, 0);
+  encodeInteger(writer, kind, 0);
+  const fields = scope.length === 6 ? 1 : 0;
+  encodeInteger(writer, fields, 0);
+  if (scope.length === 6) encodeInteger(writer, scope[5], 0);
+  for (const v of vars) {
+    encodeInteger(writer, v, 0);
+  }
+  for (index++; index < scopes.length; ) {
+    const next = scopes[index];
+    const { 0: l, 1: c } = next;
+    if (l > endLine || l === endLine && c >= endColumn) {
+      break;
+    }
+    index = _encodeOriginalScopes(scopes, index, writer, state);
+  }
+  writer.write(comma);
+  state[0] = encodeInteger(writer, endLine, state[0]);
+  encodeInteger(writer, endColumn, 0);
+  return index;
+}
+function decodeGeneratedRanges(input) {
+  const { length } = input;
+  const reader = new StringReader(input);
+  const ranges = [];
+  const stack = [];
+  let genLine = 0;
+  let definitionSourcesIndex = 0;
+  let definitionScopeIndex = 0;
+  let callsiteSourcesIndex = 0;
+  let callsiteLine = 0;
+  let callsiteColumn = 0;
+  let bindingLine = 0;
+  let bindingColumn = 0;
+  do {
+    const semi = reader.indexOf(";");
+    let genColumn = 0;
+    for (; reader.pos < semi; reader.pos++) {
+      genColumn = decodeInteger(reader, genColumn);
+      if (!hasMoreVlq(reader, semi)) {
+        const last = stack.pop();
+        last[2] = genLine;
+        last[3] = genColumn;
+        continue;
+      }
+      const fields = decodeInteger(reader, 0);
+      const hasDefinition = fields & 1;
+      const hasCallsite = fields & 2;
+      const hasScope = fields & 4;
+      let callsite = null;
+      let bindings = EMPTY;
+      let range;
+      if (hasDefinition) {
+        const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);
+        definitionScopeIndex = decodeInteger(
+          reader,
+          definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0
+        );
+        definitionSourcesIndex = defSourcesIndex;
+        range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];
+      } else {
+        range = [genLine, genColumn, 0, 0];
+      }
+      range.isScope = !!hasScope;
+      if (hasCallsite) {
+        const prevCsi = callsiteSourcesIndex;
+        const prevLine = callsiteLine;
+        callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);
+        const sameSource = prevCsi === callsiteSourcesIndex;
+        callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);
+        callsiteColumn = decodeInteger(
+          reader,
+          sameSource && prevLine === callsiteLine ? callsiteColumn : 0
+        );
+        callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];
+      }
+      range.callsite = callsite;
+      if (hasMoreVlq(reader, semi)) {
+        bindings = [];
+        do {
+          bindingLine = genLine;
+          bindingColumn = genColumn;
+          const expressionsCount = decodeInteger(reader, 0);
+          let expressionRanges;
+          if (expressionsCount < -1) {
+            expressionRanges = [[decodeInteger(reader, 0)]];
+            for (let i = -1; i > expressionsCount; i--) {
+              const prevBl = bindingLine;
+              bindingLine = decodeInteger(reader, bindingLine);
+              bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);
+              const expression = decodeInteger(reader, 0);
+              expressionRanges.push([expression, bindingLine, bindingColumn]);
+            }
+          } else {
+            expressionRanges = [[expressionsCount]];
+          }
+          bindings.push(expressionRanges);
+        } while (hasMoreVlq(reader, semi));
+      }
+      range.bindings = bindings;
+      ranges.push(range);
+      stack.push(range);
+    }
+    genLine++;
+    reader.pos = semi + 1;
+  } while (reader.pos < length);
+  return ranges;
+}
+function encodeGeneratedRanges(ranges) {
+  if (ranges.length === 0) return "";
+  const writer = new StringWriter();
+  for (let i = 0; i < ranges.length; ) {
+    i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);
+  }
+  return writer.flush();
+}
+function _encodeGeneratedRanges(ranges, index, writer, state) {
+  const range = ranges[index];
+  const {
+    0: startLine,
+    1: startColumn,
+    2: endLine,
+    3: endColumn,
+    isScope,
+    callsite,
+    bindings
+  } = range;
+  if (state[0] < startLine) {
+    catchupLine(writer, state[0], startLine);
+    state[0] = startLine;
+    state[1] = 0;
+  } else if (index > 0) {
+    writer.write(comma);
+  }
+  state[1] = encodeInteger(writer, range[1], state[1]);
+  const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0);
+  encodeInteger(writer, fields, 0);
+  if (range.length === 6) {
+    const { 4: sourcesIndex, 5: scopesIndex } = range;
+    if (sourcesIndex !== state[2]) {
+      state[3] = 0;
+    }
+    state[2] = encodeInteger(writer, sourcesIndex, state[2]);
+    state[3] = encodeInteger(writer, scopesIndex, state[3]);
+  }
+  if (callsite) {
+    const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;
+    if (sourcesIndex !== state[4]) {
+      state[5] = 0;
+      state[6] = 0;
+    } else if (callLine !== state[5]) {
+      state[6] = 0;
+    }
+    state[4] = encodeInteger(writer, sourcesIndex, state[4]);
+    state[5] = encodeInteger(writer, callLine, state[5]);
+    state[6] = encodeInteger(writer, callColumn, state[6]);
+  }
+  if (bindings) {
+    for (const binding of bindings) {
+      if (binding.length > 1) encodeInteger(writer, -binding.length, 0);
+      const expression = binding[0][0];
+      encodeInteger(writer, expression, 0);
+      let bindingStartLine = startLine;
+      let bindingStartColumn = startColumn;
+      for (let i = 1; i < binding.length; i++) {
+        const expRange = binding[i];
+        bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);
+        bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);
+        encodeInteger(writer, expRange[0], 0);
+      }
+    }
+  }
+  for (index++; index < ranges.length; ) {
+    const next = ranges[index];
+    const { 0: l, 1: c } = next;
+    if (l > endLine || l === endLine && c >= endColumn) {
+      break;
+    }
+    index = _encodeGeneratedRanges(ranges, index, writer, state);
+  }
+  if (state[0] < endLine) {
+    catchupLine(writer, state[0], endLine);
+    state[0] = endLine;
+    state[1] = 0;
+  } else {
+    writer.write(comma);
+  }
+  state[1] = encodeInteger(writer, endColumn, state[1]);
+  return index;
+}
+function catchupLine(writer, lastLine, line) {
+  do {
+    writer.write(semicolon);
+  } while (++lastLine < line);
+}
+
+// src/sourcemap-codec.ts
+function decode(mappings) {
+  const { length } = mappings;
+  const reader = new StringReader(mappings);
+  const decoded = [];
+  let genColumn = 0;
+  let sourcesIndex = 0;
+  let sourceLine = 0;
+  let sourceColumn = 0;
+  let namesIndex = 0;
+  do {
+    const semi = reader.indexOf(";");
+    const line = [];
+    let sorted = true;
+    let lastCol = 0;
+    genColumn = 0;
+    while (reader.pos < semi) {
+      let seg;
+      genColumn = decodeInteger(reader, genColumn);
+      if (genColumn < lastCol) sorted = false;
+      lastCol = genColumn;
+      if (hasMoreVlq(reader, semi)) {
+        sourcesIndex = decodeInteger(reader, sourcesIndex);
+        sourceLine = decodeInteger(reader, sourceLine);
+        sourceColumn = decodeInteger(reader, sourceColumn);
+        if (hasMoreVlq(reader, semi)) {
+          namesIndex = decodeInteger(reader, namesIndex);
+          seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];
+        } else {
+          seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];
+        }
+      } else {
+        seg = [genColumn];
+      }
+      line.push(seg);
+      reader.pos++;
+    }
+    if (!sorted) sort(line);
+    decoded.push(line);
+    reader.pos = semi + 1;
+  } while (reader.pos <= length);
+  return decoded;
+}
+function sort(line) {
+  line.sort(sortComparator);
+}
+function sortComparator(a, b) {
+  return a[0] - b[0];
+}
+function encode(decoded) {
+  const writer = new StringWriter();
+  let sourcesIndex = 0;
+  let sourceLine = 0;
+  let sourceColumn = 0;
+  let namesIndex = 0;
+  for (let i = 0; i < decoded.length; i++) {
+    const line = decoded[i];
+    if (i > 0) writer.write(semicolon);
+    if (line.length === 0) continue;
+    let genColumn = 0;
+    for (let j = 0; j < line.length; j++) {
+      const segment = line[j];
+      if (j > 0) writer.write(comma);
+      genColumn = encodeInteger(writer, segment[0], genColumn);
+      if (segment.length === 1) continue;
+      sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
+      sourceLine = encodeInteger(writer, segment[2], sourceLine);
+      sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
+      if (segment.length === 4) continue;
+      namesIndex = encodeInteger(writer, segment[4], namesIndex);
+    }
+  }
+  return writer.flush();
+}
+export {
+  decode,
+  decodeGeneratedRanges,
+  decodeOriginalScopes,
+  encode,
+  encodeGeneratedRanges,
+  encodeOriginalScopes
+};
+//# sourceMappingURL=sourcemap-codec.mjs.map

File diff suppressed because it is too large
+ 3 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map


+ 464 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js

@@ -0,0 +1,464 @@
+(function (global, factory) {
+  if (typeof exports === 'object' && typeof module !== 'undefined') {
+    factory(module);
+    module.exports = def(module);
+  } else if (typeof define === 'function' && define.amd) {
+    define(['module'], function(mod) {
+      factory.apply(this, arguments);
+      mod.exports = def(mod);
+    });
+  } else {
+    const mod = { exports: {} };
+    factory(mod);
+    global = typeof globalThis !== 'undefined' ? globalThis : global || self;
+    global.sourcemapCodec = def(mod);
+  }
+  function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; }
+})(this, (function (module) {
+"use strict";
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __export = (target, all) => {
+  for (var name in all)
+    __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+  if (from && typeof from === "object" || typeof from === "function") {
+    for (let key of __getOwnPropNames(from))
+      if (!__hasOwnProp.call(to, key) && key !== except)
+        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+  }
+  return to;
+};
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// src/sourcemap-codec.ts
+var sourcemap_codec_exports = {};
+__export(sourcemap_codec_exports, {
+  decode: () => decode,
+  decodeGeneratedRanges: () => decodeGeneratedRanges,
+  decodeOriginalScopes: () => decodeOriginalScopes,
+  encode: () => encode,
+  encodeGeneratedRanges: () => encodeGeneratedRanges,
+  encodeOriginalScopes: () => encodeOriginalScopes
+});
+module.exports = __toCommonJS(sourcemap_codec_exports);
+
+// src/vlq.ts
+var comma = ",".charCodeAt(0);
+var semicolon = ";".charCodeAt(0);
+var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+var intToChar = new Uint8Array(64);
+var charToInt = new Uint8Array(128);
+for (let i = 0; i < chars.length; i++) {
+  const c = chars.charCodeAt(i);
+  intToChar[i] = c;
+  charToInt[c] = i;
+}
+function decodeInteger(reader, relative) {
+  let value = 0;
+  let shift = 0;
+  let integer = 0;
+  do {
+    const c = reader.next();
+    integer = charToInt[c];
+    value |= (integer & 31) << shift;
+    shift += 5;
+  } while (integer & 32);
+  const shouldNegate = value & 1;
+  value >>>= 1;
+  if (shouldNegate) {
+    value = -2147483648 | -value;
+  }
+  return relative + value;
+}
+function encodeInteger(builder, num, relative) {
+  let delta = num - relative;
+  delta = delta < 0 ? -delta << 1 | 1 : delta << 1;
+  do {
+    let clamped = delta & 31;
+    delta >>>= 5;
+    if (delta > 0) clamped |= 32;
+    builder.write(intToChar[clamped]);
+  } while (delta > 0);
+  return num;
+}
+function hasMoreVlq(reader, max) {
+  if (reader.pos >= max) return false;
+  return reader.peek() !== comma;
+}
+
+// src/strings.ts
+var bufLength = 1024 * 16;
+var td = typeof TextDecoder !== "undefined" ? /* @__PURE__ */ new TextDecoder() : typeof Buffer !== "undefined" ? {
+  decode(buf) {
+    const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
+    return out.toString();
+  }
+} : {
+  decode(buf) {
+    let out = "";
+    for (let i = 0; i < buf.length; i++) {
+      out += String.fromCharCode(buf[i]);
+    }
+    return out;
+  }
+};
+var StringWriter = class {
+  constructor() {
+    this.pos = 0;
+    this.out = "";
+    this.buffer = new Uint8Array(bufLength);
+  }
+  write(v) {
+    const { buffer } = this;
+    buffer[this.pos++] = v;
+    if (this.pos === bufLength) {
+      this.out += td.decode(buffer);
+      this.pos = 0;
+    }
+  }
+  flush() {
+    const { buffer, out, pos } = this;
+    return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
+  }
+};
+var StringReader = class {
+  constructor(buffer) {
+    this.pos = 0;
+    this.buffer = buffer;
+  }
+  next() {
+    return this.buffer.charCodeAt(this.pos++);
+  }
+  peek() {
+    return this.buffer.charCodeAt(this.pos);
+  }
+  indexOf(char) {
+    const { buffer, pos } = this;
+    const idx = buffer.indexOf(char, pos);
+    return idx === -1 ? buffer.length : idx;
+  }
+};
+
+// src/scopes.ts
+var EMPTY = [];
+function decodeOriginalScopes(input) {
+  const { length } = input;
+  const reader = new StringReader(input);
+  const scopes = [];
+  const stack = [];
+  let line = 0;
+  for (; reader.pos < length; reader.pos++) {
+    line = decodeInteger(reader, line);
+    const column = decodeInteger(reader, 0);
+    if (!hasMoreVlq(reader, length)) {
+      const last = stack.pop();
+      last[2] = line;
+      last[3] = column;
+      continue;
+    }
+    const kind = decodeInteger(reader, 0);
+    const fields = decodeInteger(reader, 0);
+    const hasName = fields & 1;
+    const scope = hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind];
+    let vars = EMPTY;
+    if (hasMoreVlq(reader, length)) {
+      vars = [];
+      do {
+        const varsIndex = decodeInteger(reader, 0);
+        vars.push(varsIndex);
+      } while (hasMoreVlq(reader, length));
+    }
+    scope.vars = vars;
+    scopes.push(scope);
+    stack.push(scope);
+  }
+  return scopes;
+}
+function encodeOriginalScopes(scopes) {
+  const writer = new StringWriter();
+  for (let i = 0; i < scopes.length; ) {
+    i = _encodeOriginalScopes(scopes, i, writer, [0]);
+  }
+  return writer.flush();
+}
+function _encodeOriginalScopes(scopes, index, writer, state) {
+  const scope = scopes[index];
+  const { 0: startLine, 1: startColumn, 2: endLine, 3: endColumn, 4: kind, vars } = scope;
+  if (index > 0) writer.write(comma);
+  state[0] = encodeInteger(writer, startLine, state[0]);
+  encodeInteger(writer, startColumn, 0);
+  encodeInteger(writer, kind, 0);
+  const fields = scope.length === 6 ? 1 : 0;
+  encodeInteger(writer, fields, 0);
+  if (scope.length === 6) encodeInteger(writer, scope[5], 0);
+  for (const v of vars) {
+    encodeInteger(writer, v, 0);
+  }
+  for (index++; index < scopes.length; ) {
+    const next = scopes[index];
+    const { 0: l, 1: c } = next;
+    if (l > endLine || l === endLine && c >= endColumn) {
+      break;
+    }
+    index = _encodeOriginalScopes(scopes, index, writer, state);
+  }
+  writer.write(comma);
+  state[0] = encodeInteger(writer, endLine, state[0]);
+  encodeInteger(writer, endColumn, 0);
+  return index;
+}
+function decodeGeneratedRanges(input) {
+  const { length } = input;
+  const reader = new StringReader(input);
+  const ranges = [];
+  const stack = [];
+  let genLine = 0;
+  let definitionSourcesIndex = 0;
+  let definitionScopeIndex = 0;
+  let callsiteSourcesIndex = 0;
+  let callsiteLine = 0;
+  let callsiteColumn = 0;
+  let bindingLine = 0;
+  let bindingColumn = 0;
+  do {
+    const semi = reader.indexOf(";");
+    let genColumn = 0;
+    for (; reader.pos < semi; reader.pos++) {
+      genColumn = decodeInteger(reader, genColumn);
+      if (!hasMoreVlq(reader, semi)) {
+        const last = stack.pop();
+        last[2] = genLine;
+        last[3] = genColumn;
+        continue;
+      }
+      const fields = decodeInteger(reader, 0);
+      const hasDefinition = fields & 1;
+      const hasCallsite = fields & 2;
+      const hasScope = fields & 4;
+      let callsite = null;
+      let bindings = EMPTY;
+      let range;
+      if (hasDefinition) {
+        const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);
+        definitionScopeIndex = decodeInteger(
+          reader,
+          definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0
+        );
+        definitionSourcesIndex = defSourcesIndex;
+        range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex];
+      } else {
+        range = [genLine, genColumn, 0, 0];
+      }
+      range.isScope = !!hasScope;
+      if (hasCallsite) {
+        const prevCsi = callsiteSourcesIndex;
+        const prevLine = callsiteLine;
+        callsiteSourcesIndex = decodeInteger(reader, callsiteSourcesIndex);
+        const sameSource = prevCsi === callsiteSourcesIndex;
+        callsiteLine = decodeInteger(reader, sameSource ? callsiteLine : 0);
+        callsiteColumn = decodeInteger(
+          reader,
+          sameSource && prevLine === callsiteLine ? callsiteColumn : 0
+        );
+        callsite = [callsiteSourcesIndex, callsiteLine, callsiteColumn];
+      }
+      range.callsite = callsite;
+      if (hasMoreVlq(reader, semi)) {
+        bindings = [];
+        do {
+          bindingLine = genLine;
+          bindingColumn = genColumn;
+          const expressionsCount = decodeInteger(reader, 0);
+          let expressionRanges;
+          if (expressionsCount < -1) {
+            expressionRanges = [[decodeInteger(reader, 0)]];
+            for (let i = -1; i > expressionsCount; i--) {
+              const prevBl = bindingLine;
+              bindingLine = decodeInteger(reader, bindingLine);
+              bindingColumn = decodeInteger(reader, bindingLine === prevBl ? bindingColumn : 0);
+              const expression = decodeInteger(reader, 0);
+              expressionRanges.push([expression, bindingLine, bindingColumn]);
+            }
+          } else {
+            expressionRanges = [[expressionsCount]];
+          }
+          bindings.push(expressionRanges);
+        } while (hasMoreVlq(reader, semi));
+      }
+      range.bindings = bindings;
+      ranges.push(range);
+      stack.push(range);
+    }
+    genLine++;
+    reader.pos = semi + 1;
+  } while (reader.pos < length);
+  return ranges;
+}
+function encodeGeneratedRanges(ranges) {
+  if (ranges.length === 0) return "";
+  const writer = new StringWriter();
+  for (let i = 0; i < ranges.length; ) {
+    i = _encodeGeneratedRanges(ranges, i, writer, [0, 0, 0, 0, 0, 0, 0]);
+  }
+  return writer.flush();
+}
+function _encodeGeneratedRanges(ranges, index, writer, state) {
+  const range = ranges[index];
+  const {
+    0: startLine,
+    1: startColumn,
+    2: endLine,
+    3: endColumn,
+    isScope,
+    callsite,
+    bindings
+  } = range;
+  if (state[0] < startLine) {
+    catchupLine(writer, state[0], startLine);
+    state[0] = startLine;
+    state[1] = 0;
+  } else if (index > 0) {
+    writer.write(comma);
+  }
+  state[1] = encodeInteger(writer, range[1], state[1]);
+  const fields = (range.length === 6 ? 1 : 0) | (callsite ? 2 : 0) | (isScope ? 4 : 0);
+  encodeInteger(writer, fields, 0);
+  if (range.length === 6) {
+    const { 4: sourcesIndex, 5: scopesIndex } = range;
+    if (sourcesIndex !== state[2]) {
+      state[3] = 0;
+    }
+    state[2] = encodeInteger(writer, sourcesIndex, state[2]);
+    state[3] = encodeInteger(writer, scopesIndex, state[3]);
+  }
+  if (callsite) {
+    const { 0: sourcesIndex, 1: callLine, 2: callColumn } = range.callsite;
+    if (sourcesIndex !== state[4]) {
+      state[5] = 0;
+      state[6] = 0;
+    } else if (callLine !== state[5]) {
+      state[6] = 0;
+    }
+    state[4] = encodeInteger(writer, sourcesIndex, state[4]);
+    state[5] = encodeInteger(writer, callLine, state[5]);
+    state[6] = encodeInteger(writer, callColumn, state[6]);
+  }
+  if (bindings) {
+    for (const binding of bindings) {
+      if (binding.length > 1) encodeInteger(writer, -binding.length, 0);
+      const expression = binding[0][0];
+      encodeInteger(writer, expression, 0);
+      let bindingStartLine = startLine;
+      let bindingStartColumn = startColumn;
+      for (let i = 1; i < binding.length; i++) {
+        const expRange = binding[i];
+        bindingStartLine = encodeInteger(writer, expRange[1], bindingStartLine);
+        bindingStartColumn = encodeInteger(writer, expRange[2], bindingStartColumn);
+        encodeInteger(writer, expRange[0], 0);
+      }
+    }
+  }
+  for (index++; index < ranges.length; ) {
+    const next = ranges[index];
+    const { 0: l, 1: c } = next;
+    if (l > endLine || l === endLine && c >= endColumn) {
+      break;
+    }
+    index = _encodeGeneratedRanges(ranges, index, writer, state);
+  }
+  if (state[0] < endLine) {
+    catchupLine(writer, state[0], endLine);
+    state[0] = endLine;
+    state[1] = 0;
+  } else {
+    writer.write(comma);
+  }
+  state[1] = encodeInteger(writer, endColumn, state[1]);
+  return index;
+}
+function catchupLine(writer, lastLine, line) {
+  do {
+    writer.write(semicolon);
+  } while (++lastLine < line);
+}
+
+// src/sourcemap-codec.ts
+function decode(mappings) {
+  const { length } = mappings;
+  const reader = new StringReader(mappings);
+  const decoded = [];
+  let genColumn = 0;
+  let sourcesIndex = 0;
+  let sourceLine = 0;
+  let sourceColumn = 0;
+  let namesIndex = 0;
+  do {
+    const semi = reader.indexOf(";");
+    const line = [];
+    let sorted = true;
+    let lastCol = 0;
+    genColumn = 0;
+    while (reader.pos < semi) {
+      let seg;
+      genColumn = decodeInteger(reader, genColumn);
+      if (genColumn < lastCol) sorted = false;
+      lastCol = genColumn;
+      if (hasMoreVlq(reader, semi)) {
+        sourcesIndex = decodeInteger(reader, sourcesIndex);
+        sourceLine = decodeInteger(reader, sourceLine);
+        sourceColumn = decodeInteger(reader, sourceColumn);
+        if (hasMoreVlq(reader, semi)) {
+          namesIndex = decodeInteger(reader, namesIndex);
+          seg = [genColumn, sourcesIndex, sourceLine, sourceColumn, namesIndex];
+        } else {
+          seg = [genColumn, sourcesIndex, sourceLine, sourceColumn];
+        }
+      } else {
+        seg = [genColumn];
+      }
+      line.push(seg);
+      reader.pos++;
+    }
+    if (!sorted) sort(line);
+    decoded.push(line);
+    reader.pos = semi + 1;
+  } while (reader.pos <= length);
+  return decoded;
+}
+function sort(line) {
+  line.sort(sortComparator);
+}
+function sortComparator(a, b) {
+  return a[0] - b[0];
+}
+function encode(decoded) {
+  const writer = new StringWriter();
+  let sourcesIndex = 0;
+  let sourceLine = 0;
+  let sourceColumn = 0;
+  let namesIndex = 0;
+  for (let i = 0; i < decoded.length; i++) {
+    const line = decoded[i];
+    if (i > 0) writer.write(semicolon);
+    if (line.length === 0) continue;
+    let genColumn = 0;
+    for (let j = 0; j < line.length; j++) {
+      const segment = line[j];
+      if (j > 0) writer.write(comma);
+      genColumn = encodeInteger(writer, segment[0], genColumn);
+      if (segment.length === 1) continue;
+      sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
+      sourceLine = encodeInteger(writer, segment[2], sourceLine);
+      sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
+      if (segment.length === 4) continue;
+      namesIndex = encodeInteger(writer, segment[4], namesIndex);
+    }
+  }
+  return writer.flush();
+}
+}));
+//# sourceMappingURL=sourcemap-codec.umd.js.map

File diff suppressed because it is too large
+ 3 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map


+ 493 - 0
node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs

@@ -0,0 +1,493 @@
+// src/trace-mapping.ts
+import { encode, decode } from "@jridgewell/sourcemap-codec";
+
+// src/resolve.ts
+import resolveUri from "@jridgewell/resolve-uri";
+
+// src/strip-filename.ts
+function stripFilename(path) {
+  if (!path) return "";
+  const index = path.lastIndexOf("/");
+  return path.slice(0, index + 1);
+}
+
+// src/resolve.ts
+function resolver(mapUrl, sourceRoot) {
+  const from = stripFilename(mapUrl);
+  const prefix = sourceRoot ? sourceRoot + "/" : "";
+  return (source) => resolveUri(prefix + (source || ""), from);
+}
+
+// src/sourcemap-segment.ts
+var COLUMN = 0;
+var SOURCES_INDEX = 1;
+var SOURCE_LINE = 2;
+var SOURCE_COLUMN = 3;
+var NAMES_INDEX = 4;
+var REV_GENERATED_LINE = 1;
+var REV_GENERATED_COLUMN = 2;
+
+// src/sort.ts
+function maybeSort(mappings, owned) {
+  const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
+  if (unsortedIndex === mappings.length) return mappings;
+  if (!owned) mappings = mappings.slice();
+  for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
+    mappings[i] = sortSegments(mappings[i], owned);
+  }
+  return mappings;
+}
+function nextUnsortedSegmentLine(mappings, start) {
+  for (let i = start; i < mappings.length; i++) {
+    if (!isSorted(mappings[i])) return i;
+  }
+  return mappings.length;
+}
+function isSorted(line) {
+  for (let j = 1; j < line.length; j++) {
+    if (line[j][COLUMN] < line[j - 1][COLUMN]) {
+      return false;
+    }
+  }
+  return true;
+}
+function sortSegments(line, owned) {
+  if (!owned) line = line.slice();
+  return line.sort(sortComparator);
+}
+function sortComparator(a, b) {
+  return a[COLUMN] - b[COLUMN];
+}
+
+// src/by-source.ts
+function buildBySources(decoded, memos) {
+  const sources = memos.map(() => []);
+  for (let i = 0; i < decoded.length; i++) {
+    const line = decoded[i];
+    for (let j = 0; j < line.length; j++) {
+      const seg = line[j];
+      if (seg.length === 1) continue;
+      const sourceIndex2 = seg[SOURCES_INDEX];
+      const sourceLine = seg[SOURCE_LINE];
+      const sourceColumn = seg[SOURCE_COLUMN];
+      const source = sources[sourceIndex2];
+      const segs = source[sourceLine] || (source[sourceLine] = []);
+      segs.push([sourceColumn, i, seg[COLUMN]]);
+    }
+  }
+  for (let i = 0; i < sources.length; i++) {
+    const source = sources[i];
+    for (let j = 0; j < source.length; j++) {
+      const line = source[j];
+      if (line) line.sort(sortComparator);
+    }
+  }
+  return sources;
+}
+
+// src/binary-search.ts
+var found = false;
+function binarySearch(haystack, needle, low, high) {
+  while (low <= high) {
+    const mid = low + (high - low >> 1);
+    const cmp = haystack[mid][COLUMN] - needle;
+    if (cmp === 0) {
+      found = true;
+      return mid;
+    }
+    if (cmp < 0) {
+      low = mid + 1;
+    } else {
+      high = mid - 1;
+    }
+  }
+  found = false;
+  return low - 1;
+}
+function upperBound(haystack, needle, index) {
+  for (let i = index + 1; i < haystack.length; index = i++) {
+    if (haystack[i][COLUMN] !== needle) break;
+  }
+  return index;
+}
+function lowerBound(haystack, needle, index) {
+  for (let i = index - 1; i >= 0; index = i--) {
+    if (haystack[i][COLUMN] !== needle) break;
+  }
+  return index;
+}
+function memoizedState() {
+  return {
+    lastKey: -1,
+    lastNeedle: -1,
+    lastIndex: -1
+  };
+}
+function memoizedBinarySearch(haystack, needle, state, key) {
+  const { lastKey, lastNeedle, lastIndex } = state;
+  let low = 0;
+  let high = haystack.length - 1;
+  if (key === lastKey) {
+    if (needle === lastNeedle) {
+      found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
+      return lastIndex;
+    }
+    if (needle >= lastNeedle) {
+      low = lastIndex === -1 ? 0 : lastIndex;
+    } else {
+      high = lastIndex;
+    }
+  }
+  state.lastKey = key;
+  state.lastNeedle = needle;
+  return state.lastIndex = binarySearch(haystack, needle, low, high);
+}
+
+// src/types.ts
+function parse(map) {
+  return typeof map === "string" ? JSON.parse(map) : map;
+}
+
+// src/flatten-map.ts
+var FlattenMap = function(map, mapUrl) {
+  const parsed = parse(map);
+  if (!("sections" in parsed)) {
+    return new TraceMap(parsed, mapUrl);
+  }
+  const mappings = [];
+  const sources = [];
+  const sourcesContent = [];
+  const names = [];
+  const ignoreList = [];
+  recurse(
+    parsed,
+    mapUrl,
+    mappings,
+    sources,
+    sourcesContent,
+    names,
+    ignoreList,
+    0,
+    0,
+    Infinity,
+    Infinity
+  );
+  const joined = {
+    version: 3,
+    file: parsed.file,
+    names,
+    sources,
+    sourcesContent,
+    mappings,
+    ignoreList
+  };
+  return presortedDecodedMap(joined);
+};
+function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
+  const { sections } = input;
+  for (let i = 0; i < sections.length; i++) {
+    const { map, offset } = sections[i];
+    let sl = stopLine;
+    let sc = stopColumn;
+    if (i + 1 < sections.length) {
+      const nextOffset = sections[i + 1].offset;
+      sl = Math.min(stopLine, lineOffset + nextOffset.line);
+      if (sl === stopLine) {
+        sc = Math.min(stopColumn, columnOffset + nextOffset.column);
+      } else if (sl < stopLine) {
+        sc = columnOffset + nextOffset.column;
+      }
+    }
+    addSection(
+      map,
+      mapUrl,
+      mappings,
+      sources,
+      sourcesContent,
+      names,
+      ignoreList,
+      lineOffset + offset.line,
+      columnOffset + offset.column,
+      sl,
+      sc
+    );
+  }
+}
+function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
+  const parsed = parse(input);
+  if ("sections" in parsed) return recurse(...arguments);
+  const map = new TraceMap(parsed, mapUrl);
+  const sourcesOffset = sources.length;
+  const namesOffset = names.length;
+  const decoded = decodedMappings(map);
+  const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;
+  append(sources, resolvedSources);
+  append(names, map.names);
+  if (contents) append(sourcesContent, contents);
+  else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null);
+  if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset);
+  for (let i = 0; i < decoded.length; i++) {
+    const lineI = lineOffset + i;
+    if (lineI > stopLine) return;
+    const out = getLine(mappings, lineI);
+    const cOffset = i === 0 ? columnOffset : 0;
+    const line = decoded[i];
+    for (let j = 0; j < line.length; j++) {
+      const seg = line[j];
+      const column = cOffset + seg[COLUMN];
+      if (lineI === stopLine && column >= stopColumn) return;
+      if (seg.length === 1) {
+        out.push([column]);
+        continue;
+      }
+      const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];
+      const sourceLine = seg[SOURCE_LINE];
+      const sourceColumn = seg[SOURCE_COLUMN];
+      out.push(
+        seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]
+      );
+    }
+  }
+}
+function append(arr, other) {
+  for (let i = 0; i < other.length; i++) arr.push(other[i]);
+}
+function getLine(arr, index) {
+  for (let i = arr.length; i <= index; i++) arr[i] = [];
+  return arr[index];
+}
+
+// src/trace-mapping.ts
+var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
+var COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)";
+var LEAST_UPPER_BOUND = -1;
+var GREATEST_LOWER_BOUND = 1;
+var TraceMap = class {
+  constructor(map, mapUrl) {
+    const isString = typeof map === "string";
+    if (!isString && map._decodedMemo) return map;
+    const parsed = parse(map);
+    const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
+    this.version = version;
+    this.file = file;
+    this.names = names || [];
+    this.sourceRoot = sourceRoot;
+    this.sources = sources;
+    this.sourcesContent = sourcesContent;
+    this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
+    const resolve = resolver(mapUrl, sourceRoot);
+    this.resolvedSources = sources.map(resolve);
+    const { mappings } = parsed;
+    if (typeof mappings === "string") {
+      this._encoded = mappings;
+      this._decoded = void 0;
+    } else if (Array.isArray(mappings)) {
+      this._encoded = void 0;
+      this._decoded = maybeSort(mappings, isString);
+    } else if (parsed.sections) {
+      throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`);
+    } else {
+      throw new Error(`invalid source map: ${JSON.stringify(parsed)}`);
+    }
+    this._decodedMemo = memoizedState();
+    this._bySources = void 0;
+    this._bySourceMemos = void 0;
+  }
+};
+function cast(map) {
+  return map;
+}
+function encodedMappings(map) {
+  var _a, _b;
+  return (_b = (_a = cast(map))._encoded) != null ? _b : _a._encoded = encode(cast(map)._decoded);
+}
+function decodedMappings(map) {
+  var _a;
+  return (_a = cast(map))._decoded || (_a._decoded = decode(cast(map)._encoded));
+}
+function traceSegment(map, line, column) {
+  const decoded = decodedMappings(map);
+  if (line >= decoded.length) return null;
+  const segments = decoded[line];
+  const index = traceSegmentInternal(
+    segments,
+    cast(map)._decodedMemo,
+    line,
+    column,
+    GREATEST_LOWER_BOUND
+  );
+  return index === -1 ? null : segments[index];
+}
+function originalPositionFor(map, needle) {
+  let { line, column, bias } = needle;
+  line--;
+  if (line < 0) throw new Error(LINE_GTR_ZERO);
+  if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
+  const decoded = decodedMappings(map);
+  if (line >= decoded.length) return OMapping(null, null, null, null);
+  const segments = decoded[line];
+  const index = traceSegmentInternal(
+    segments,
+    cast(map)._decodedMemo,
+    line,
+    column,
+    bias || GREATEST_LOWER_BOUND
+  );
+  if (index === -1) return OMapping(null, null, null, null);
+  const segment = segments[index];
+  if (segment.length === 1) return OMapping(null, null, null, null);
+  const { names, resolvedSources } = map;
+  return OMapping(
+    resolvedSources[segment[SOURCES_INDEX]],
+    segment[SOURCE_LINE] + 1,
+    segment[SOURCE_COLUMN],
+    segment.length === 5 ? names[segment[NAMES_INDEX]] : null
+  );
+}
+function generatedPositionFor(map, needle) {
+  const { source, line, column, bias } = needle;
+  return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);
+}
+function allGeneratedPositionsFor(map, needle) {
+  const { source, line, column, bias } = needle;
+  return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);
+}
+function eachMapping(map, cb) {
+  const decoded = decodedMappings(map);
+  const { names, resolvedSources } = map;
+  for (let i = 0; i < decoded.length; i++) {
+    const line = decoded[i];
+    for (let j = 0; j < line.length; j++) {
+      const seg = line[j];
+      const generatedLine = i + 1;
+      const generatedColumn = seg[0];
+      let source = null;
+      let originalLine = null;
+      let originalColumn = null;
+      let name = null;
+      if (seg.length !== 1) {
+        source = resolvedSources[seg[1]];
+        originalLine = seg[2] + 1;
+        originalColumn = seg[3];
+      }
+      if (seg.length === 5) name = names[seg[4]];
+      cb({
+        generatedLine,
+        generatedColumn,
+        source,
+        originalLine,
+        originalColumn,
+        name
+      });
+    }
+  }
+}
+function sourceIndex(map, source) {
+  const { sources, resolvedSources } = map;
+  let index = sources.indexOf(source);
+  if (index === -1) index = resolvedSources.indexOf(source);
+  return index;
+}
+function sourceContentFor(map, source) {
+  const { sourcesContent } = map;
+  if (sourcesContent == null) return null;
+  const index = sourceIndex(map, source);
+  return index === -1 ? null : sourcesContent[index];
+}
+function isIgnored(map, source) {
+  const { ignoreList } = map;
+  if (ignoreList == null) return false;
+  const index = sourceIndex(map, source);
+  return index === -1 ? false : ignoreList.includes(index);
+}
+function presortedDecodedMap(map, mapUrl) {
+  const tracer = new TraceMap(clone(map, []), mapUrl);
+  cast(tracer)._decoded = map.mappings;
+  return tracer;
+}
+function decodedMap(map) {
+  return clone(map, decodedMappings(map));
+}
+function encodedMap(map) {
+  return clone(map, encodedMappings(map));
+}
+function clone(map, mappings) {
+  return {
+    version: map.version,
+    file: map.file,
+    names: map.names,
+    sourceRoot: map.sourceRoot,
+    sources: map.sources,
+    sourcesContent: map.sourcesContent,
+    mappings,
+    ignoreList: map.ignoreList || map.x_google_ignoreList
+  };
+}
+function OMapping(source, line, column, name) {
+  return { source, line, column, name };
+}
+function GMapping(line, column) {
+  return { line, column };
+}
+function traceSegmentInternal(segments, memo, line, column, bias) {
+  let index = memoizedBinarySearch(segments, column, memo, line);
+  if (found) {
+    index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);
+  } else if (bias === LEAST_UPPER_BOUND) index++;
+  if (index === -1 || index === segments.length) return -1;
+  return index;
+}
+function sliceGeneratedPositions(segments, memo, line, column, bias) {
+  let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);
+  if (!found && bias === LEAST_UPPER_BOUND) min++;
+  if (min === -1 || min === segments.length) return [];
+  const matchedColumn = found ? column : segments[min][COLUMN];
+  if (!found) min = lowerBound(segments, matchedColumn, min);
+  const max = upperBound(segments, matchedColumn, min);
+  const result = [];
+  for (; min <= max; min++) {
+    const segment = segments[min];
+    result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
+  }
+  return result;
+}
+function generatedPosition(map, source, line, column, bias, all) {
+  var _a, _b;
+  line--;
+  if (line < 0) throw new Error(LINE_GTR_ZERO);
+  if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
+  const { sources, resolvedSources } = map;
+  let sourceIndex2 = sources.indexOf(source);
+  if (sourceIndex2 === -1) sourceIndex2 = resolvedSources.indexOf(source);
+  if (sourceIndex2 === -1) return all ? [] : GMapping(null, null);
+  const bySourceMemos = (_a = cast(map))._bySourceMemos || (_a._bySourceMemos = sources.map(memoizedState));
+  const generated = (_b = cast(map))._bySources || (_b._bySources = buildBySources(decodedMappings(map), bySourceMemos));
+  const segments = generated[sourceIndex2][line];
+  if (segments == null) return all ? [] : GMapping(null, null);
+  const memo = bySourceMemos[sourceIndex2];
+  if (all) return sliceGeneratedPositions(segments, memo, line, column, bias);
+  const index = traceSegmentInternal(segments, memo, line, column, bias);
+  if (index === -1) return GMapping(null, null);
+  const segment = segments[index];
+  return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
+}
+export {
+  FlattenMap as AnyMap,
+  FlattenMap,
+  GREATEST_LOWER_BOUND,
+  LEAST_UPPER_BOUND,
+  TraceMap,
+  allGeneratedPositionsFor,
+  decodedMap,
+  decodedMappings,
+  eachMapping,
+  encodedMap,
+  encodedMappings,
+  generatedPositionFor,
+  isIgnored,
+  originalPositionFor,
+  presortedDecodedMap,
+  sourceContentFor,
+  traceSegment
+};
+//# sourceMappingURL=trace-mapping.mjs.map

File diff suppressed because it is too large
+ 3 - 0
node_modules/@jridgewell/trace-mapping/dist/trace-mapping.mjs.map


+ 559 - 0
node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js

@@ -0,0 +1,559 @@
+(function (global, factory) {
+  if (typeof exports === 'object' && typeof module !== 'undefined') {
+    factory(module, require('@jridgewell/resolve-uri'), require('@jridgewell/sourcemap-codec'));
+    module.exports = def(module);
+  } else if (typeof define === 'function' && define.amd) {
+    define(['module', '@jridgewell/resolve-uri', '@jridgewell/sourcemap-codec'], function(mod) {
+      factory.apply(this, arguments);
+      mod.exports = def(mod);
+    });
+  } else {
+    const mod = { exports: {} };
+    factory(mod, global.resolveURI, global.sourcemapCodec);
+    global = typeof globalThis !== 'undefined' ? globalThis : global || self;
+    global.traceMapping = def(mod);
+  }
+  function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; }
+})(this, (function (module, require_resolveURI, require_sourcemapCodec) {
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __commonJS = (cb, mod) => function __require() {
+  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+};
+var __export = (target, all) => {
+  for (var name in all)
+    __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+  if (from && typeof from === "object" || typeof from === "function") {
+    for (let key of __getOwnPropNames(from))
+      if (!__hasOwnProp.call(to, key) && key !== except)
+        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+  }
+  return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+  // If the importer is in node compatibility mode or this is not an ESM
+  // file that has been converted to a CommonJS file using a Babel-
+  // compatible transform (i.e. "__esModule" has not been set), then set
+  // "default" to the CommonJS "module.exports" for node compatibility.
+  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+  mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// umd:@jridgewell/sourcemap-codec
+var require_sourcemap_codec = __commonJS({
+  "umd:@jridgewell/sourcemap-codec"(exports, module2) {
+    module2.exports = require_sourcemapCodec;
+  }
+});
+
+// umd:@jridgewell/resolve-uri
+var require_resolve_uri = __commonJS({
+  "umd:@jridgewell/resolve-uri"(exports, module2) {
+    module2.exports = require_resolveURI;
+  }
+});
+
+// src/trace-mapping.ts
+var trace_mapping_exports = {};
+__export(trace_mapping_exports, {
+  AnyMap: () => FlattenMap,
+  FlattenMap: () => FlattenMap,
+  GREATEST_LOWER_BOUND: () => GREATEST_LOWER_BOUND,
+  LEAST_UPPER_BOUND: () => LEAST_UPPER_BOUND,
+  TraceMap: () => TraceMap,
+  allGeneratedPositionsFor: () => allGeneratedPositionsFor,
+  decodedMap: () => decodedMap,
+  decodedMappings: () => decodedMappings,
+  eachMapping: () => eachMapping,
+  encodedMap: () => encodedMap,
+  encodedMappings: () => encodedMappings,
+  generatedPositionFor: () => generatedPositionFor,
+  isIgnored: () => isIgnored,
+  originalPositionFor: () => originalPositionFor,
+  presortedDecodedMap: () => presortedDecodedMap,
+  sourceContentFor: () => sourceContentFor,
+  traceSegment: () => traceSegment
+});
+module.exports = __toCommonJS(trace_mapping_exports);
+var import_sourcemap_codec = __toESM(require_sourcemap_codec());
+
+// src/resolve.ts
+var import_resolve_uri = __toESM(require_resolve_uri());
+
+// src/strip-filename.ts
+function stripFilename(path) {
+  if (!path) return "";
+  const index = path.lastIndexOf("/");
+  return path.slice(0, index + 1);
+}
+
+// src/resolve.ts
+function resolver(mapUrl, sourceRoot) {
+  const from = stripFilename(mapUrl);
+  const prefix = sourceRoot ? sourceRoot + "/" : "";
+  return (source) => (0, import_resolve_uri.default)(prefix + (source || ""), from);
+}
+
+// src/sourcemap-segment.ts
+var COLUMN = 0;
+var SOURCES_INDEX = 1;
+var SOURCE_LINE = 2;
+var SOURCE_COLUMN = 3;
+var NAMES_INDEX = 4;
+var REV_GENERATED_LINE = 1;
+var REV_GENERATED_COLUMN = 2;
+
+// src/sort.ts
+function maybeSort(mappings, owned) {
+  const unsortedIndex = nextUnsortedSegmentLine(mappings, 0);
+  if (unsortedIndex === mappings.length) return mappings;
+  if (!owned) mappings = mappings.slice();
+  for (let i = unsortedIndex; i < mappings.length; i = nextUnsortedSegmentLine(mappings, i + 1)) {
+    mappings[i] = sortSegments(mappings[i], owned);
+  }
+  return mappings;
+}
+function nextUnsortedSegmentLine(mappings, start) {
+  for (let i = start; i < mappings.length; i++) {
+    if (!isSorted(mappings[i])) return i;
+  }
+  return mappings.length;
+}
+function isSorted(line) {
+  for (let j = 1; j < line.length; j++) {
+    if (line[j][COLUMN] < line[j - 1][COLUMN]) {
+      return false;
+    }
+  }
+  return true;
+}
+function sortSegments(line, owned) {
+  if (!owned) line = line.slice();
+  return line.sort(sortComparator);
+}
+function sortComparator(a, b) {
+  return a[COLUMN] - b[COLUMN];
+}
+
+// src/by-source.ts
+function buildBySources(decoded, memos) {
+  const sources = memos.map(() => []);
+  for (let i = 0; i < decoded.length; i++) {
+    const line = decoded[i];
+    for (let j = 0; j < line.length; j++) {
+      const seg = line[j];
+      if (seg.length === 1) continue;
+      const sourceIndex2 = seg[SOURCES_INDEX];
+      const sourceLine = seg[SOURCE_LINE];
+      const sourceColumn = seg[SOURCE_COLUMN];
+      const source = sources[sourceIndex2];
+      const segs = source[sourceLine] || (source[sourceLine] = []);
+      segs.push([sourceColumn, i, seg[COLUMN]]);
+    }
+  }
+  for (let i = 0; i < sources.length; i++) {
+    const source = sources[i];
+    for (let j = 0; j < source.length; j++) {
+      const line = source[j];
+      if (line) line.sort(sortComparator);
+    }
+  }
+  return sources;
+}
+
+// src/binary-search.ts
+var found = false;
+function binarySearch(haystack, needle, low, high) {
+  while (low <= high) {
+    const mid = low + (high - low >> 1);
+    const cmp = haystack[mid][COLUMN] - needle;
+    if (cmp === 0) {
+      found = true;
+      return mid;
+    }
+    if (cmp < 0) {
+      low = mid + 1;
+    } else {
+      high = mid - 1;
+    }
+  }
+  found = false;
+  return low - 1;
+}
+function upperBound(haystack, needle, index) {
+  for (let i = index + 1; i < haystack.length; index = i++) {
+    if (haystack[i][COLUMN] !== needle) break;
+  }
+  return index;
+}
+function lowerBound(haystack, needle, index) {
+  for (let i = index - 1; i >= 0; index = i--) {
+    if (haystack[i][COLUMN] !== needle) break;
+  }
+  return index;
+}
+function memoizedState() {
+  return {
+    lastKey: -1,
+    lastNeedle: -1,
+    lastIndex: -1
+  };
+}
+function memoizedBinarySearch(haystack, needle, state, key) {
+  const { lastKey, lastNeedle, lastIndex } = state;
+  let low = 0;
+  let high = haystack.length - 1;
+  if (key === lastKey) {
+    if (needle === lastNeedle) {
+      found = lastIndex !== -1 && haystack[lastIndex][COLUMN] === needle;
+      return lastIndex;
+    }
+    if (needle >= lastNeedle) {
+      low = lastIndex === -1 ? 0 : lastIndex;
+    } else {
+      high = lastIndex;
+    }
+  }
+  state.lastKey = key;
+  state.lastNeedle = needle;
+  return state.lastIndex = binarySearch(haystack, needle, low, high);
+}
+
+// src/types.ts
+function parse(map) {
+  return typeof map === "string" ? JSON.parse(map) : map;
+}
+
+// src/flatten-map.ts
+var FlattenMap = function(map, mapUrl) {
+  const parsed = parse(map);
+  if (!("sections" in parsed)) {
+    return new TraceMap(parsed, mapUrl);
+  }
+  const mappings = [];
+  const sources = [];
+  const sourcesContent = [];
+  const names = [];
+  const ignoreList = [];
+  recurse(
+    parsed,
+    mapUrl,
+    mappings,
+    sources,
+    sourcesContent,
+    names,
+    ignoreList,
+    0,
+    0,
+    Infinity,
+    Infinity
+  );
+  const joined = {
+    version: 3,
+    file: parsed.file,
+    names,
+    sources,
+    sourcesContent,
+    mappings,
+    ignoreList
+  };
+  return presortedDecodedMap(joined);
+};
+function recurse(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
+  const { sections } = input;
+  for (let i = 0; i < sections.length; i++) {
+    const { map, offset } = sections[i];
+    let sl = stopLine;
+    let sc = stopColumn;
+    if (i + 1 < sections.length) {
+      const nextOffset = sections[i + 1].offset;
+      sl = Math.min(stopLine, lineOffset + nextOffset.line);
+      if (sl === stopLine) {
+        sc = Math.min(stopColumn, columnOffset + nextOffset.column);
+      } else if (sl < stopLine) {
+        sc = columnOffset + nextOffset.column;
+      }
+    }
+    addSection(
+      map,
+      mapUrl,
+      mappings,
+      sources,
+      sourcesContent,
+      names,
+      ignoreList,
+      lineOffset + offset.line,
+      columnOffset + offset.column,
+      sl,
+      sc
+    );
+  }
+}
+function addSection(input, mapUrl, mappings, sources, sourcesContent, names, ignoreList, lineOffset, columnOffset, stopLine, stopColumn) {
+  const parsed = parse(input);
+  if ("sections" in parsed) return recurse(...arguments);
+  const map = new TraceMap(parsed, mapUrl);
+  const sourcesOffset = sources.length;
+  const namesOffset = names.length;
+  const decoded = decodedMappings(map);
+  const { resolvedSources, sourcesContent: contents, ignoreList: ignores } = map;
+  append(sources, resolvedSources);
+  append(names, map.names);
+  if (contents) append(sourcesContent, contents);
+  else for (let i = 0; i < resolvedSources.length; i++) sourcesContent.push(null);
+  if (ignores) for (let i = 0; i < ignores.length; i++) ignoreList.push(ignores[i] + sourcesOffset);
+  for (let i = 0; i < decoded.length; i++) {
+    const lineI = lineOffset + i;
+    if (lineI > stopLine) return;
+    const out = getLine(mappings, lineI);
+    const cOffset = i === 0 ? columnOffset : 0;
+    const line = decoded[i];
+    for (let j = 0; j < line.length; j++) {
+      const seg = line[j];
+      const column = cOffset + seg[COLUMN];
+      if (lineI === stopLine && column >= stopColumn) return;
+      if (seg.length === 1) {
+        out.push([column]);
+        continue;
+      }
+      const sourcesIndex = sourcesOffset + seg[SOURCES_INDEX];
+      const sourceLine = seg[SOURCE_LINE];
+      const sourceColumn = seg[SOURCE_COLUMN];
+      out.push(
+        seg.length === 4 ? [column, sourcesIndex, sourceLine, sourceColumn] : [column, sourcesIndex, sourceLine, sourceColumn, namesOffset + seg[NAMES_INDEX]]
+      );
+    }
+  }
+}
+function append(arr, other) {
+  for (let i = 0; i < other.length; i++) arr.push(other[i]);
+}
+function getLine(arr, index) {
+  for (let i = arr.length; i <= index; i++) arr[i] = [];
+  return arr[index];
+}
+
+// src/trace-mapping.ts
+var LINE_GTR_ZERO = "`line` must be greater than 0 (lines start at line 1)";
+var COL_GTR_EQ_ZERO = "`column` must be greater than or equal to 0 (columns start at column 0)";
+var LEAST_UPPER_BOUND = -1;
+var GREATEST_LOWER_BOUND = 1;
+var TraceMap = class {
+  constructor(map, mapUrl) {
+    const isString = typeof map === "string";
+    if (!isString && map._decodedMemo) return map;
+    const parsed = parse(map);
+    const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
+    this.version = version;
+    this.file = file;
+    this.names = names || [];
+    this.sourceRoot = sourceRoot;
+    this.sources = sources;
+    this.sourcesContent = sourcesContent;
+    this.ignoreList = parsed.ignoreList || parsed.x_google_ignoreList || void 0;
+    const resolve = resolver(mapUrl, sourceRoot);
+    this.resolvedSources = sources.map(resolve);
+    const { mappings } = parsed;
+    if (typeof mappings === "string") {
+      this._encoded = mappings;
+      this._decoded = void 0;
+    } else if (Array.isArray(mappings)) {
+      this._encoded = void 0;
+      this._decoded = maybeSort(mappings, isString);
+    } else if (parsed.sections) {
+      throw new Error(`TraceMap passed sectioned source map, please use FlattenMap export instead`);
+    } else {
+      throw new Error(`invalid source map: ${JSON.stringify(parsed)}`);
+    }
+    this._decodedMemo = memoizedState();
+    this._bySources = void 0;
+    this._bySourceMemos = void 0;
+  }
+};
+function cast(map) {
+  return map;
+}
+function encodedMappings(map) {
+  var _a, _b;
+  return (_b = (_a = cast(map))._encoded) != null ? _b : _a._encoded = (0, import_sourcemap_codec.encode)(cast(map)._decoded);
+}
+function decodedMappings(map) {
+  var _a;
+  return (_a = cast(map))._decoded || (_a._decoded = (0, import_sourcemap_codec.decode)(cast(map)._encoded));
+}
+function traceSegment(map, line, column) {
+  const decoded = decodedMappings(map);
+  if (line >= decoded.length) return null;
+  const segments = decoded[line];
+  const index = traceSegmentInternal(
+    segments,
+    cast(map)._decodedMemo,
+    line,
+    column,
+    GREATEST_LOWER_BOUND
+  );
+  return index === -1 ? null : segments[index];
+}
+function originalPositionFor(map, needle) {
+  let { line, column, bias } = needle;
+  line--;
+  if (line < 0) throw new Error(LINE_GTR_ZERO);
+  if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
+  const decoded = decodedMappings(map);
+  if (line >= decoded.length) return OMapping(null, null, null, null);
+  const segments = decoded[line];
+  const index = traceSegmentInternal(
+    segments,
+    cast(map)._decodedMemo,
+    line,
+    column,
+    bias || GREATEST_LOWER_BOUND
+  );
+  if (index === -1) return OMapping(null, null, null, null);
+  const segment = segments[index];
+  if (segment.length === 1) return OMapping(null, null, null, null);
+  const { names, resolvedSources } = map;
+  return OMapping(
+    resolvedSources[segment[SOURCES_INDEX]],
+    segment[SOURCE_LINE] + 1,
+    segment[SOURCE_COLUMN],
+    segment.length === 5 ? names[segment[NAMES_INDEX]] : null
+  );
+}
+function generatedPositionFor(map, needle) {
+  const { source, line, column, bias } = needle;
+  return generatedPosition(map, source, line, column, bias || GREATEST_LOWER_BOUND, false);
+}
+function allGeneratedPositionsFor(map, needle) {
+  const { source, line, column, bias } = needle;
+  return generatedPosition(map, source, line, column, bias || LEAST_UPPER_BOUND, true);
+}
+function eachMapping(map, cb) {
+  const decoded = decodedMappings(map);
+  const { names, resolvedSources } = map;
+  for (let i = 0; i < decoded.length; i++) {
+    const line = decoded[i];
+    for (let j = 0; j < line.length; j++) {
+      const seg = line[j];
+      const generatedLine = i + 1;
+      const generatedColumn = seg[0];
+      let source = null;
+      let originalLine = null;
+      let originalColumn = null;
+      let name = null;
+      if (seg.length !== 1) {
+        source = resolvedSources[seg[1]];
+        originalLine = seg[2] + 1;
+        originalColumn = seg[3];
+      }
+      if (seg.length === 5) name = names[seg[4]];
+      cb({
+        generatedLine,
+        generatedColumn,
+        source,
+        originalLine,
+        originalColumn,
+        name
+      });
+    }
+  }
+}
+function sourceIndex(map, source) {
+  const { sources, resolvedSources } = map;
+  let index = sources.indexOf(source);
+  if (index === -1) index = resolvedSources.indexOf(source);
+  return index;
+}
+function sourceContentFor(map, source) {
+  const { sourcesContent } = map;
+  if (sourcesContent == null) return null;
+  const index = sourceIndex(map, source);
+  return index === -1 ? null : sourcesContent[index];
+}
+function isIgnored(map, source) {
+  const { ignoreList } = map;
+  if (ignoreList == null) return false;
+  const index = sourceIndex(map, source);
+  return index === -1 ? false : ignoreList.includes(index);
+}
+function presortedDecodedMap(map, mapUrl) {
+  const tracer = new TraceMap(clone(map, []), mapUrl);
+  cast(tracer)._decoded = map.mappings;
+  return tracer;
+}
+function decodedMap(map) {
+  return clone(map, decodedMappings(map));
+}
+function encodedMap(map) {
+  return clone(map, encodedMappings(map));
+}
+function clone(map, mappings) {
+  return {
+    version: map.version,
+    file: map.file,
+    names: map.names,
+    sourceRoot: map.sourceRoot,
+    sources: map.sources,
+    sourcesContent: map.sourcesContent,
+    mappings,
+    ignoreList: map.ignoreList || map.x_google_ignoreList
+  };
+}
+function OMapping(source, line, column, name) {
+  return { source, line, column, name };
+}
+function GMapping(line, column) {
+  return { line, column };
+}
+function traceSegmentInternal(segments, memo, line, column, bias) {
+  let index = memoizedBinarySearch(segments, column, memo, line);
+  if (found) {
+    index = (bias === LEAST_UPPER_BOUND ? upperBound : lowerBound)(segments, column, index);
+  } else if (bias === LEAST_UPPER_BOUND) index++;
+  if (index === -1 || index === segments.length) return -1;
+  return index;
+}
+function sliceGeneratedPositions(segments, memo, line, column, bias) {
+  let min = traceSegmentInternal(segments, memo, line, column, GREATEST_LOWER_BOUND);
+  if (!found && bias === LEAST_UPPER_BOUND) min++;
+  if (min === -1 || min === segments.length) return [];
+  const matchedColumn = found ? column : segments[min][COLUMN];
+  if (!found) min = lowerBound(segments, matchedColumn, min);
+  const max = upperBound(segments, matchedColumn, min);
+  const result = [];
+  for (; min <= max; min++) {
+    const segment = segments[min];
+    result.push(GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]));
+  }
+  return result;
+}
+function generatedPosition(map, source, line, column, bias, all) {
+  var _a, _b;
+  line--;
+  if (line < 0) throw new Error(LINE_GTR_ZERO);
+  if (column < 0) throw new Error(COL_GTR_EQ_ZERO);
+  const { sources, resolvedSources } = map;
+  let sourceIndex2 = sources.indexOf(source);
+  if (sourceIndex2 === -1) sourceIndex2 = resolvedSources.indexOf(source);
+  if (sourceIndex2 === -1) return all ? [] : GMapping(null, null);
+  const bySourceMemos = (_a = cast(map))._bySourceMemos || (_a._bySourceMemos = sources.map(memoizedState));
+  const generated = (_b = cast(map))._bySources || (_b._bySources = buildBySources(decodedMappings(map), bySourceMemos));
+  const segments = generated[sourceIndex2][line];
+  if (segments == null) return all ? [] : GMapping(null, null);
+  const memo = bySourceMemos[sourceIndex2];
+  if (all) return sliceGeneratedPositions(segments, memo, line, column, bias);
+  const index = traceSegmentInternal(segments, memo, line, column, bias);
+  if (index === -1) return GMapping(null, null);
+  const segment = segments[index];
+  return GMapping(segment[REV_GENERATED_LINE] + 1, segment[REV_GENERATED_COLUMN]);
+}
+}));
+//# sourceMappingURL=trace-mapping.umd.js.map

File diff suppressed because it is too large
+ 3 - 0
node_modules/@jridgewell/trace-mapping/dist/trace-mapping.umd.js.map


+ 271 - 0
node_modules/@rolldown/pluginutils/dist/index.cjs

@@ -0,0 +1,271 @@
+
+//#region src/utils.ts
+const postfixRE = /[?#].*$/;
+function cleanUrl(url) {
+	return url.replace(postfixRE, "");
+}
+function extractQueryWithoutFragment(url) {
+	const questionMarkIndex = url.indexOf("?");
+	if (questionMarkIndex === -1) return "";
+	const fragmentIndex = url.indexOf("#", questionMarkIndex);
+	if (fragmentIndex === -1) return url.substring(questionMarkIndex);
+	else return url.substring(questionMarkIndex, fragmentIndex);
+}
+
+//#endregion
+//#region src/composable-filters.ts
+var And = class {
+	kind;
+	args;
+	constructor(...args) {
+		if (args.length === 0) throw new Error("`And` expects at least one operand");
+		this.args = args;
+		this.kind = "and";
+	}
+};
+var Or = class {
+	kind;
+	args;
+	constructor(...args) {
+		if (args.length === 0) throw new Error("`Or` expects at least one operand");
+		this.args = args;
+		this.kind = "or";
+	}
+};
+var Not = class {
+	kind;
+	expr;
+	constructor(expr) {
+		this.expr = expr;
+		this.kind = "not";
+	}
+};
+var Id = class {
+	kind;
+	pattern;
+	params;
+	constructor(pattern, params) {
+		this.pattern = pattern;
+		this.kind = "id";
+		this.params = params ?? { cleanUrl: false };
+	}
+};
+var ModuleType = class {
+	kind;
+	pattern;
+	constructor(pattern) {
+		this.pattern = pattern;
+		this.kind = "moduleType";
+	}
+};
+var Code = class {
+	kind;
+	pattern;
+	constructor(expr) {
+		this.pattern = expr;
+		this.kind = "code";
+	}
+};
+var Query = class {
+	kind;
+	key;
+	pattern;
+	constructor(key, pattern) {
+		this.pattern = pattern;
+		this.key = key;
+		this.kind = "query";
+	}
+};
+var Include = class {
+	kind;
+	expr;
+	constructor(expr) {
+		this.expr = expr;
+		this.kind = "include";
+	}
+};
+var Exclude = class {
+	kind;
+	expr;
+	constructor(expr) {
+		this.expr = expr;
+		this.kind = "exclude";
+	}
+};
+function and(...args) {
+	return new And(...args);
+}
+function or(...args) {
+	return new Or(...args);
+}
+function not(expr) {
+	return new Not(expr);
+}
+function id(pattern, params) {
+	return new Id(pattern, params);
+}
+function moduleType(pattern) {
+	return new ModuleType(pattern);
+}
+function code(pattern) {
+	return new Code(pattern);
+}
+function query(key, pattern) {
+	return new Query(key, pattern);
+}
+function include(expr) {
+	return new Include(expr);
+}
+function exclude(expr) {
+	return new Exclude(expr);
+}
+/**
+* convert a queryObject to FilterExpression like
+* ```js
+*   and(query(k1, v1), query(k2, v2))
+* ```
+* @param queryFilterObject The query filter object needs to be matched.
+* @returns a `And` FilterExpression
+*/
+function queries(queryFilter) {
+	let arr = Object.entries(queryFilter).map(([key, value]) => {
+		return new Query(key, value);
+	});
+	return and(...arr);
+}
+function interpreter(exprs, code$1, id$1, moduleType$1) {
+	let arr = [];
+	if (Array.isArray(exprs)) arr = exprs;
+	else arr = [exprs];
+	return interpreterImpl(arr, code$1, id$1, moduleType$1);
+}
+function interpreterImpl(expr, code$1, id$1, moduleType$1, ctx = {}) {
+	let hasInclude = false;
+	for (const e of expr) switch (e.kind) {
+		case "include": {
+			hasInclude = true;
+			if (exprInterpreter(e.expr, code$1, id$1, moduleType$1, ctx)) return true;
+			break;
+		}
+		case "exclude": {
+			if (exprInterpreter(e.expr, code$1, id$1, moduleType$1)) return false;
+			break;
+		}
+	}
+	return !hasInclude;
+}
+function exprInterpreter(expr, code$1, id$1, moduleType$1, ctx = {}) {
+	switch (expr.kind) {
+		case "and": return expr.args.every((e) => exprInterpreter(e, code$1, id$1, moduleType$1, ctx));
+		case "or": return expr.args.some((e) => exprInterpreter(e, code$1, id$1, moduleType$1, ctx));
+		case "not": return !exprInterpreter(expr.expr, code$1, id$1, moduleType$1, ctx);
+		case "id": {
+			if (id$1 === void 0) throw new Error("`id` is required for `id` expression");
+			if (expr.params.cleanUrl) id$1 = cleanUrl(id$1);
+			return typeof expr.pattern === "string" ? id$1 === expr.pattern : expr.pattern.test(id$1);
+		}
+		case "moduleType": {
+			if (moduleType$1 === void 0) throw new Error("`moduleType` is required for `moduleType` expression");
+			return moduleType$1 === expr.pattern;
+		}
+		case "code": {
+			if (code$1 === void 0) throw new Error("`code` is required for `code` expression");
+			return typeof expr.pattern === "string" ? code$1.includes(expr.pattern) : expr.pattern.test(code$1);
+		}
+		case "query": {
+			if (id$1 === void 0) throw new Error("`id` is required for `Query` expression");
+			if (!ctx.urlSearchParamsCache) {
+				let queryString = extractQueryWithoutFragment(id$1);
+				ctx.urlSearchParamsCache = new URLSearchParams(queryString);
+			}
+			let urlParams = ctx.urlSearchParamsCache;
+			if (typeof expr.pattern === "boolean") if (expr.pattern) return urlParams.has(expr.key);
+			else return !urlParams.has(expr.key);
+			else if (typeof expr.pattern === "string") return urlParams.get(expr.key) === expr.pattern;
+			else return expr.pattern.test(urlParams.get(expr.key) ?? "");
+		}
+		default: throw new Error(`Expression ${JSON.stringify(expr)} is not expected.`);
+	}
+}
+
+//#endregion
+//#region src/simple-filters.ts
+/**
+* Constructs a RegExp that matches the exact string specified.
+*
+* This is useful for plugin hook filters.
+*
+* @param str the string to match.
+* @param flags flags for the RegExp.
+*
+* @example
+* ```ts
+* import { exactRegex } from '@rolldown/pluginutils';
+* const plugin = {
+*   name: 'plugin',
+*   resolveId: {
+*     filter: { id: exactRegex('foo') },
+*     handler(id) {} // will only be called for `foo`
+*   }
+* }
+* ```
+*/
+function exactRegex(str, flags) {
+	return new RegExp(`^${escapeRegex(str)}$`, flags);
+}
+/**
+* Constructs a RegExp that matches a value that has the specified prefix.
+*
+* This is useful for plugin hook filters.
+*
+* @param str the string to match.
+* @param flags flags for the RegExp.
+*
+* @example
+* ```ts
+* import { prefixRegex } from '@rolldown/pluginutils';
+* const plugin = {
+*   name: 'plugin',
+*   resolveId: {
+*     filter: { id: prefixRegex('foo') },
+*     handler(id) {} // will only be called for IDs starting with `foo`
+*   }
+* }
+* ```
+*/
+function prefixRegex(str, flags) {
+	return new RegExp(`^${escapeRegex(str)}`, flags);
+}
+const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g;
+function escapeRegex(str) {
+	return str.replace(escapeRegexRE, "\\$&");
+}
+function makeIdFiltersToMatchWithQuery(input) {
+	if (!Array.isArray(input)) return makeIdFilterToMatchWithQuery(input);
+	return input.map((i) => makeIdFilterToMatchWithQuery(i));
+}
+function makeIdFilterToMatchWithQuery(input) {
+	if (typeof input === "string") return `${input}{?*,}`;
+	return makeRegexIdFilterToMatchWithQuery(input);
+}
+function makeRegexIdFilterToMatchWithQuery(input) {
+	return new RegExp(input.source.replace(/(?<!\\)\$/g, "(?:\\?.*)?$"), input.flags);
+}
+
+//#endregion
+exports.and = and;
+exports.code = code;
+exports.exactRegex = exactRegex;
+exports.exclude = exclude;
+exports.exprInterpreter = exprInterpreter;
+exports.id = id;
+exports.include = include;
+exports.interpreter = interpreter;
+exports.interpreterImpl = interpreterImpl;
+exports.makeIdFiltersToMatchWithQuery = makeIdFiltersToMatchWithQuery;
+exports.moduleType = moduleType;
+exports.not = not;
+exports.or = or;
+exports.prefixRegex = prefixRegex;
+exports.queries = queries;
+exports.query = query;

+ 157 - 0
node_modules/@rolldown/pluginutils/dist/index.d.cts

@@ -0,0 +1,157 @@
+//#region src/composable-filters.d.ts
+type StringOrRegExp = string | RegExp;
+type PluginModuleType = "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | (string & {});
+type FilterExpressionKind = FilterExpression["kind"];
+type FilterExpression = And | Or | Not | Id | ModuleType | Code | Query;
+type TopLevelFilterExpression = Include | Exclude;
+declare class And {
+  kind: "and";
+  args: FilterExpression[];
+  constructor(...args: FilterExpression[]);
+}
+declare class Or {
+  kind: "or";
+  args: FilterExpression[];
+  constructor(...args: FilterExpression[]);
+}
+declare class Not {
+  kind: "not";
+  expr: FilterExpression;
+  constructor(expr: FilterExpression);
+}
+interface QueryFilterObject {
+  [key: string]: StringOrRegExp | boolean;
+}
+interface IdParams {
+  cleanUrl?: boolean;
+}
+declare class Id {
+  kind: "id";
+  pattern: StringOrRegExp;
+  params: IdParams;
+  constructor(pattern: StringOrRegExp, params?: IdParams);
+}
+declare class ModuleType {
+  kind: "moduleType";
+  pattern: PluginModuleType;
+  constructor(pattern: PluginModuleType);
+}
+declare class Code {
+  kind: "code";
+  pattern: StringOrRegExp;
+  constructor(expr: StringOrRegExp);
+}
+declare class Query {
+  kind: "query";
+  key: string;
+  pattern: StringOrRegExp | boolean;
+  constructor(key: string, pattern: StringOrRegExp | boolean);
+}
+declare class Include {
+  kind: "include";
+  expr: FilterExpression;
+  constructor(expr: FilterExpression);
+}
+declare class Exclude {
+  kind: "exclude";
+  expr: FilterExpression;
+  constructor(expr: FilterExpression);
+}
+declare function and(...args: FilterExpression[]): And;
+declare function or(...args: FilterExpression[]): Or;
+declare function not(expr: FilterExpression): Not;
+declare function id(pattern: StringOrRegExp, params?: IdParams): Id;
+declare function moduleType(pattern: PluginModuleType): ModuleType;
+declare function code(pattern: StringOrRegExp): Code;
+declare function query(key: string, pattern: StringOrRegExp | boolean): Query;
+declare function include(expr: FilterExpression): Include;
+declare function exclude(expr: FilterExpression): Exclude;
+/**
+* convert a queryObject to FilterExpression like
+* ```js
+*   and(query(k1, v1), query(k2, v2))
+* ```
+* @param queryFilterObject The query filter object needs to be matched.
+* @returns a `And` FilterExpression
+*/
+declare function queries(queryFilter: QueryFilterObject): And;
+declare function interpreter(exprs: TopLevelFilterExpression | TopLevelFilterExpression[], code?: string, id?: string, moduleType?: PluginModuleType): boolean;
+interface InterpreterCtx {
+  urlSearchParamsCache?: URLSearchParams;
+}
+declare function interpreterImpl(expr: TopLevelFilterExpression[], code?: string, id?: string, moduleType?: PluginModuleType, ctx?: InterpreterCtx): boolean;
+declare function exprInterpreter(expr: FilterExpression, code?: string, id?: string, moduleType?: PluginModuleType, ctx?: InterpreterCtx): boolean;
+//#endregion
+//#region src/simple-filters.d.ts
+/**
+* Constructs a RegExp that matches the exact string specified.
+*
+* This is useful for plugin hook filters.
+*
+* @param str the string to match.
+* @param flags flags for the RegExp.
+*
+* @example
+* ```ts
+* import { exactRegex } from '@rolldown/pluginutils';
+* const plugin = {
+*   name: 'plugin',
+*   resolveId: {
+*     filter: { id: exactRegex('foo') },
+*     handler(id) {} // will only be called for `foo`
+*   }
+* }
+* ```
+*/
+declare function exactRegex(str: string, flags?: string): RegExp;
+/**
+* Constructs a RegExp that matches a value that has the specified prefix.
+*
+* This is useful for plugin hook filters.
+*
+* @param str the string to match.
+* @param flags flags for the RegExp.
+*
+* @example
+* ```ts
+* import { prefixRegex } from '@rolldown/pluginutils';
+* const plugin = {
+*   name: 'plugin',
+*   resolveId: {
+*     filter: { id: prefixRegex('foo') },
+*     handler(id) {} // will only be called for IDs starting with `foo`
+*   }
+* }
+* ```
+*/
+declare function prefixRegex(str: string, flags?: string): RegExp;
+type WidenString<T> = T extends string ? string : T;
+/**
+* Converts a id filter to match with an id with a query.
+*
+* @param input the id filters to convert.
+*
+* @example
+* ```ts
+* import { makeIdFiltersToMatchWithQuery } from '@rolldown/pluginutils';
+* const plugin = {
+*   name: 'plugin',
+*   transform: {
+*     filter: { id: makeIdFiltersToMatchWithQuery(['**' + '/*.js', /\.ts$/]) },
+*     // The handler will be called for IDs like:
+*     // - foo.js
+*     // - foo.js?foo
+*     // - foo.txt?foo.js
+*     // - foo.ts
+*     // - foo.ts?foo
+*     // - foo.txt?foo.ts
+*     handler(code, id) {}
+*   }
+* }
+* ```
+*/
+declare function makeIdFiltersToMatchWithQuery<T extends string | RegExp>(input: T): WidenString<T>;
+declare function makeIdFiltersToMatchWithQuery<T extends string | RegExp>(input: readonly T[]): WidenString<T>[];
+declare function makeIdFiltersToMatchWithQuery(input: string | RegExp | readonly (string | RegExp)[]): string | RegExp | (string | RegExp)[];
+//#endregion
+export { FilterExpression, FilterExpressionKind, QueryFilterObject, TopLevelFilterExpression, and, code, exactRegex, exclude, exprInterpreter, id, include, interpreter, interpreterImpl, makeIdFiltersToMatchWithQuery, moduleType, not, or, prefixRegex, queries, query };

+ 157 - 0
node_modules/@rolldown/pluginutils/dist/index.d.ts

@@ -0,0 +1,157 @@
+//#region src/composable-filters.d.ts
+type StringOrRegExp = string | RegExp;
+type PluginModuleType = "js" | "jsx" | "ts" | "tsx" | "json" | "text" | "base64" | "dataurl" | "binary" | "empty" | (string & {});
+type FilterExpressionKind = FilterExpression["kind"];
+type FilterExpression = And | Or | Not | Id | ModuleType | Code | Query;
+type TopLevelFilterExpression = Include | Exclude;
+declare class And {
+  kind: "and";
+  args: FilterExpression[];
+  constructor(...args: FilterExpression[]);
+}
+declare class Or {
+  kind: "or";
+  args: FilterExpression[];
+  constructor(...args: FilterExpression[]);
+}
+declare class Not {
+  kind: "not";
+  expr: FilterExpression;
+  constructor(expr: FilterExpression);
+}
+interface QueryFilterObject {
+  [key: string]: StringOrRegExp | boolean;
+}
+interface IdParams {
+  cleanUrl?: boolean;
+}
+declare class Id {
+  kind: "id";
+  pattern: StringOrRegExp;
+  params: IdParams;
+  constructor(pattern: StringOrRegExp, params?: IdParams);
+}
+declare class ModuleType {
+  kind: "moduleType";
+  pattern: PluginModuleType;
+  constructor(pattern: PluginModuleType);
+}
+declare class Code {
+  kind: "code";
+  pattern: StringOrRegExp;
+  constructor(expr: StringOrRegExp);
+}
+declare class Query {
+  kind: "query";
+  key: string;
+  pattern: StringOrRegExp | boolean;
+  constructor(key: string, pattern: StringOrRegExp | boolean);
+}
+declare class Include {
+  kind: "include";
+  expr: FilterExpression;
+  constructor(expr: FilterExpression);
+}
+declare class Exclude {
+  kind: "exclude";
+  expr: FilterExpression;
+  constructor(expr: FilterExpression);
+}
+declare function and(...args: FilterExpression[]): And;
+declare function or(...args: FilterExpression[]): Or;
+declare function not(expr: FilterExpression): Not;
+declare function id(pattern: StringOrRegExp, params?: IdParams): Id;
+declare function moduleType(pattern: PluginModuleType): ModuleType;
+declare function code(pattern: StringOrRegExp): Code;
+declare function query(key: string, pattern: StringOrRegExp | boolean): Query;
+declare function include(expr: FilterExpression): Include;
+declare function exclude(expr: FilterExpression): Exclude;
+/**
+* convert a queryObject to FilterExpression like
+* ```js
+*   and(query(k1, v1), query(k2, v2))
+* ```
+* @param queryFilterObject The query filter object needs to be matched.
+* @returns a `And` FilterExpression
+*/
+declare function queries(queryFilter: QueryFilterObject): And;
+declare function interpreter(exprs: TopLevelFilterExpression | TopLevelFilterExpression[], code?: string, id?: string, moduleType?: PluginModuleType): boolean;
+interface InterpreterCtx {
+  urlSearchParamsCache?: URLSearchParams;
+}
+declare function interpreterImpl(expr: TopLevelFilterExpression[], code?: string, id?: string, moduleType?: PluginModuleType, ctx?: InterpreterCtx): boolean;
+declare function exprInterpreter(expr: FilterExpression, code?: string, id?: string, moduleType?: PluginModuleType, ctx?: InterpreterCtx): boolean;
+//#endregion
+//#region src/simple-filters.d.ts
+/**
+* Constructs a RegExp that matches the exact string specified.
+*
+* This is useful for plugin hook filters.
+*
+* @param str the string to match.
+* @param flags flags for the RegExp.
+*
+* @example
+* ```ts
+* import { exactRegex } from '@rolldown/pluginutils';
+* const plugin = {
+*   name: 'plugin',
+*   resolveId: {
+*     filter: { id: exactRegex('foo') },
+*     handler(id) {} // will only be called for `foo`
+*   }
+* }
+* ```
+*/
+declare function exactRegex(str: string, flags?: string): RegExp;
+/**
+* Constructs a RegExp that matches a value that has the specified prefix.
+*
+* This is useful for plugin hook filters.
+*
+* @param str the string to match.
+* @param flags flags for the RegExp.
+*
+* @example
+* ```ts
+* import { prefixRegex } from '@rolldown/pluginutils';
+* const plugin = {
+*   name: 'plugin',
+*   resolveId: {
+*     filter: { id: prefixRegex('foo') },
+*     handler(id) {} // will only be called for IDs starting with `foo`
+*   }
+* }
+* ```
+*/
+declare function prefixRegex(str: string, flags?: string): RegExp;
+type WidenString<T> = T extends string ? string : T;
+/**
+* Converts a id filter to match with an id with a query.
+*
+* @param input the id filters to convert.
+*
+* @example
+* ```ts
+* import { makeIdFiltersToMatchWithQuery } from '@rolldown/pluginutils';
+* const plugin = {
+*   name: 'plugin',
+*   transform: {
+*     filter: { id: makeIdFiltersToMatchWithQuery(['**' + '/*.js', /\.ts$/]) },
+*     // The handler will be called for IDs like:
+*     // - foo.js
+*     // - foo.js?foo
+*     // - foo.txt?foo.js
+*     // - foo.ts
+*     // - foo.ts?foo
+*     // - foo.txt?foo.ts
+*     handler(code, id) {}
+*   }
+* }
+* ```
+*/
+declare function makeIdFiltersToMatchWithQuery<T extends string | RegExp>(input: T): WidenString<T>;
+declare function makeIdFiltersToMatchWithQuery<T extends string | RegExp>(input: readonly T[]): WidenString<T>[];
+declare function makeIdFiltersToMatchWithQuery(input: string | RegExp | readonly (string | RegExp)[]): string | RegExp | (string | RegExp)[];
+//#endregion
+export { FilterExpression, FilterExpressionKind, QueryFilterObject, TopLevelFilterExpression, and, code, exactRegex, exclude, exprInterpreter, id, include, interpreter, interpreterImpl, makeIdFiltersToMatchWithQuery, moduleType, not, or, prefixRegex, queries, query };

+ 255 - 0
node_modules/@rolldown/pluginutils/dist/index.js

@@ -0,0 +1,255 @@
+//#region src/utils.ts
+const postfixRE = /[?#].*$/;
+function cleanUrl(url) {
+	return url.replace(postfixRE, "");
+}
+function extractQueryWithoutFragment(url) {
+	const questionMarkIndex = url.indexOf("?");
+	if (questionMarkIndex === -1) return "";
+	const fragmentIndex = url.indexOf("#", questionMarkIndex);
+	if (fragmentIndex === -1) return url.substring(questionMarkIndex);
+	else return url.substring(questionMarkIndex, fragmentIndex);
+}
+
+//#endregion
+//#region src/composable-filters.ts
+var And = class {
+	kind;
+	args;
+	constructor(...args) {
+		if (args.length === 0) throw new Error("`And` expects at least one operand");
+		this.args = args;
+		this.kind = "and";
+	}
+};
+var Or = class {
+	kind;
+	args;
+	constructor(...args) {
+		if (args.length === 0) throw new Error("`Or` expects at least one operand");
+		this.args = args;
+		this.kind = "or";
+	}
+};
+var Not = class {
+	kind;
+	expr;
+	constructor(expr) {
+		this.expr = expr;
+		this.kind = "not";
+	}
+};
+var Id = class {
+	kind;
+	pattern;
+	params;
+	constructor(pattern, params) {
+		this.pattern = pattern;
+		this.kind = "id";
+		this.params = params ?? { cleanUrl: false };
+	}
+};
+var ModuleType = class {
+	kind;
+	pattern;
+	constructor(pattern) {
+		this.pattern = pattern;
+		this.kind = "moduleType";
+	}
+};
+var Code = class {
+	kind;
+	pattern;
+	constructor(expr) {
+		this.pattern = expr;
+		this.kind = "code";
+	}
+};
+var Query = class {
+	kind;
+	key;
+	pattern;
+	constructor(key, pattern) {
+		this.pattern = pattern;
+		this.key = key;
+		this.kind = "query";
+	}
+};
+var Include = class {
+	kind;
+	expr;
+	constructor(expr) {
+		this.expr = expr;
+		this.kind = "include";
+	}
+};
+var Exclude = class {
+	kind;
+	expr;
+	constructor(expr) {
+		this.expr = expr;
+		this.kind = "exclude";
+	}
+};
+function and(...args) {
+	return new And(...args);
+}
+function or(...args) {
+	return new Or(...args);
+}
+function not(expr) {
+	return new Not(expr);
+}
+function id(pattern, params) {
+	return new Id(pattern, params);
+}
+function moduleType(pattern) {
+	return new ModuleType(pattern);
+}
+function code(pattern) {
+	return new Code(pattern);
+}
+function query(key, pattern) {
+	return new Query(key, pattern);
+}
+function include(expr) {
+	return new Include(expr);
+}
+function exclude(expr) {
+	return new Exclude(expr);
+}
+/**
+* convert a queryObject to FilterExpression like
+* ```js
+*   and(query(k1, v1), query(k2, v2))
+* ```
+* @param queryFilterObject The query filter object needs to be matched.
+* @returns a `And` FilterExpression
+*/
+function queries(queryFilter) {
+	let arr = Object.entries(queryFilter).map(([key, value]) => {
+		return new Query(key, value);
+	});
+	return and(...arr);
+}
+function interpreter(exprs, code$1, id$1, moduleType$1) {
+	let arr = [];
+	if (Array.isArray(exprs)) arr = exprs;
+	else arr = [exprs];
+	return interpreterImpl(arr, code$1, id$1, moduleType$1);
+}
+function interpreterImpl(expr, code$1, id$1, moduleType$1, ctx = {}) {
+	let hasInclude = false;
+	for (const e of expr) switch (e.kind) {
+		case "include": {
+			hasInclude = true;
+			if (exprInterpreter(e.expr, code$1, id$1, moduleType$1, ctx)) return true;
+			break;
+		}
+		case "exclude": {
+			if (exprInterpreter(e.expr, code$1, id$1, moduleType$1)) return false;
+			break;
+		}
+	}
+	return !hasInclude;
+}
+function exprInterpreter(expr, code$1, id$1, moduleType$1, ctx = {}) {
+	switch (expr.kind) {
+		case "and": return expr.args.every((e) => exprInterpreter(e, code$1, id$1, moduleType$1, ctx));
+		case "or": return expr.args.some((e) => exprInterpreter(e, code$1, id$1, moduleType$1, ctx));
+		case "not": return !exprInterpreter(expr.expr, code$1, id$1, moduleType$1, ctx);
+		case "id": {
+			if (id$1 === void 0) throw new Error("`id` is required for `id` expression");
+			if (expr.params.cleanUrl) id$1 = cleanUrl(id$1);
+			return typeof expr.pattern === "string" ? id$1 === expr.pattern : expr.pattern.test(id$1);
+		}
+		case "moduleType": {
+			if (moduleType$1 === void 0) throw new Error("`moduleType` is required for `moduleType` expression");
+			return moduleType$1 === expr.pattern;
+		}
+		case "code": {
+			if (code$1 === void 0) throw new Error("`code` is required for `code` expression");
+			return typeof expr.pattern === "string" ? code$1.includes(expr.pattern) : expr.pattern.test(code$1);
+		}
+		case "query": {
+			if (id$1 === void 0) throw new Error("`id` is required for `Query` expression");
+			if (!ctx.urlSearchParamsCache) {
+				let queryString = extractQueryWithoutFragment(id$1);
+				ctx.urlSearchParamsCache = new URLSearchParams(queryString);
+			}
+			let urlParams = ctx.urlSearchParamsCache;
+			if (typeof expr.pattern === "boolean") if (expr.pattern) return urlParams.has(expr.key);
+			else return !urlParams.has(expr.key);
+			else if (typeof expr.pattern === "string") return urlParams.get(expr.key) === expr.pattern;
+			else return expr.pattern.test(urlParams.get(expr.key) ?? "");
+		}
+		default: throw new Error(`Expression ${JSON.stringify(expr)} is not expected.`);
+	}
+}
+
+//#endregion
+//#region src/simple-filters.ts
+/**
+* Constructs a RegExp that matches the exact string specified.
+*
+* This is useful for plugin hook filters.
+*
+* @param str the string to match.
+* @param flags flags for the RegExp.
+*
+* @example
+* ```ts
+* import { exactRegex } from '@rolldown/pluginutils';
+* const plugin = {
+*   name: 'plugin',
+*   resolveId: {
+*     filter: { id: exactRegex('foo') },
+*     handler(id) {} // will only be called for `foo`
+*   }
+* }
+* ```
+*/
+function exactRegex(str, flags) {
+	return new RegExp(`^${escapeRegex(str)}$`, flags);
+}
+/**
+* Constructs a RegExp that matches a value that has the specified prefix.
+*
+* This is useful for plugin hook filters.
+*
+* @param str the string to match.
+* @param flags flags for the RegExp.
+*
+* @example
+* ```ts
+* import { prefixRegex } from '@rolldown/pluginutils';
+* const plugin = {
+*   name: 'plugin',
+*   resolveId: {
+*     filter: { id: prefixRegex('foo') },
+*     handler(id) {} // will only be called for IDs starting with `foo`
+*   }
+* }
+* ```
+*/
+function prefixRegex(str, flags) {
+	return new RegExp(`^${escapeRegex(str)}`, flags);
+}
+const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g;
+function escapeRegex(str) {
+	return str.replace(escapeRegexRE, "\\$&");
+}
+function makeIdFiltersToMatchWithQuery(input) {
+	if (!Array.isArray(input)) return makeIdFilterToMatchWithQuery(input);
+	return input.map((i) => makeIdFilterToMatchWithQuery(i));
+}
+function makeIdFilterToMatchWithQuery(input) {
+	if (typeof input === "string") return `${input}{?*,}`;
+	return makeRegexIdFilterToMatchWithQuery(input);
+}
+function makeRegexIdFilterToMatchWithQuery(input) {
+	return new RegExp(input.source.replace(/(?<!\\)\$/g, "(?:\\?.*)?$"), input.flags);
+}
+
+//#endregion
+export { and, code, exactRegex, exclude, exprInterpreter, id, include, interpreter, interpreterImpl, makeIdFiltersToMatchWithQuery, moduleType, not, or, prefixRegex, queries, query };

+ 232 - 0
node_modules/@sindresorhus/is/dist/index.d.ts

@@ -0,0 +1,232 @@
+/// <reference types="node" />
+/// <reference lib="es2018" />
+/// <reference lib="dom" />
+import { Class, Falsy, TypedArray, ObservableLike, Primitive } from './types';
+declare const objectTypeNames: readonly ["Function", "Generator", "AsyncGenerator", "GeneratorFunction", "AsyncGeneratorFunction", "AsyncFunction", "Observable", "Array", "Buffer", "Blob", "Object", "RegExp", "Date", "Error", "Map", "Set", "WeakMap", "WeakSet", "ArrayBuffer", "SharedArrayBuffer", "DataView", "Promise", "URL", "FormData", "URLSearchParams", "HTMLElement", ...("Int8Array" | "Uint8Array" | "Uint8ClampedArray" | "Int16Array" | "Uint16Array" | "Int32Array" | "Uint32Array" | "Float32Array" | "Float64Array" | "BigInt64Array" | "BigUint64Array")[]];
+declare type ObjectTypeName = typeof objectTypeNames[number];
+declare const primitiveTypeNames: readonly ["null", "undefined", "string", "number", "bigint", "boolean", "symbol"];
+declare type PrimitiveTypeName = typeof primitiveTypeNames[number];
+export declare type TypeName = ObjectTypeName | PrimitiveTypeName;
+declare function is(value: unknown): TypeName;
+declare namespace is {
+    var undefined: (value: unknown) => value is undefined;
+    var string: (value: unknown) => value is string;
+    var number: (value: unknown) => value is number;
+    var bigint: (value: unknown) => value is bigint;
+    var function_: (value: unknown) => value is Function;
+    var null_: (value: unknown) => value is null;
+    var class_: (value: unknown) => value is Class<unknown, any[]>;
+    var boolean: (value: unknown) => value is boolean;
+    var symbol: (value: unknown) => value is symbol;
+    var numericString: (value: unknown) => value is string;
+    var array: <T = unknown>(value: unknown, assertion?: ((value: T) => value is T) | undefined) => value is T[];
+    var buffer: (value: unknown) => value is Buffer;
+    var blob: (value: unknown) => value is Blob;
+    var nullOrUndefined: (value: unknown) => value is null | undefined;
+    var object: (value: unknown) => value is object;
+    var iterable: <T = unknown>(value: unknown) => value is Iterable<T>;
+    var asyncIterable: <T = unknown>(value: unknown) => value is AsyncIterable<T>;
+    var generator: (value: unknown) => value is Generator<unknown, any, unknown>;
+    var asyncGenerator: (value: unknown) => value is AsyncGenerator<unknown, any, unknown>;
+    var nativePromise: <T = unknown>(value: unknown) => value is Promise<T>;
+    var promise: <T = unknown>(value: unknown) => value is Promise<T>;
+    var generatorFunction: (value: unknown) => value is GeneratorFunction;
+    var asyncGeneratorFunction: (value: unknown) => value is (...args: any[]) => Promise<unknown>;
+    var asyncFunction: <T = unknown>(value: unknown) => value is (...args: any[]) => Promise<T>;
+    var boundFunction: (value: unknown) => value is Function;
+    var regExp: (value: unknown) => value is RegExp;
+    var date: (value: unknown) => value is Date;
+    var error: (value: unknown) => value is Error;
+    var map: <Key = unknown, Value = unknown>(value: unknown) => value is Map<Key, Value>;
+    var set: <T = unknown>(value: unknown) => value is Set<T>;
+    var weakMap: <Key extends object = object, Value = unknown>(value: unknown) => value is WeakMap<Key, Value>;
+    var weakSet: (value: unknown) => value is WeakSet<object>;
+    var int8Array: (value: unknown) => value is Int8Array;
+    var uint8Array: (value: unknown) => value is Uint8Array;
+    var uint8ClampedArray: (value: unknown) => value is Uint8ClampedArray;
+    var int16Array: (value: unknown) => value is Int16Array;
+    var uint16Array: (value: unknown) => value is Uint16Array;
+    var int32Array: (value: unknown) => value is Int32Array;
+    var uint32Array: (value: unknown) => value is Uint32Array;
+    var float32Array: (value: unknown) => value is Float32Array;
+    var float64Array: (value: unknown) => value is Float64Array;
+    var bigInt64Array: (value: unknown) => value is BigInt64Array;
+    var bigUint64Array: (value: unknown) => value is BigUint64Array;
+    var arrayBuffer: (value: unknown) => value is ArrayBuffer;
+    var sharedArrayBuffer: (value: unknown) => value is SharedArrayBuffer;
+    var dataView: (value: unknown) => value is DataView;
+    var enumCase: <T = unknown>(value: unknown, targetEnum: T) => boolean;
+    var directInstanceOf: <T>(instance: unknown, class_: Class<T, any[]>) => instance is T;
+    var urlInstance: (value: unknown) => value is URL;
+    var urlString: (value: unknown) => value is string;
+    var truthy: <T>(value: false | "" | 0 | 0n | T | null | undefined) => value is T;
+    var falsy: <T>(value: false | "" | 0 | 0n | T | null | undefined) => value is Falsy;
+    var nan: (value: unknown) => boolean;
+    var primitive: (value: unknown) => value is Primitive;
+    var integer: (value: unknown) => value is number;
+    var safeInteger: (value: unknown) => value is number;
+    var plainObject: <Value = unknown>(value: unknown) => value is Record<string | number | symbol, Value>;
+    var typedArray: (value: unknown) => value is TypedArray;
+    var arrayLike: <T = unknown>(value: unknown) => value is ArrayLike<T>;
+    var inRange: (value: number, range: number | number[]) => value is number;
+    var domElement: (value: unknown) => value is HTMLElement;
+    var observable: (value: unknown) => value is ObservableLike;
+    var nodeStream: (value: unknown) => value is NodeStream;
+    var infinite: (value: unknown) => value is number;
+    var evenInteger: (value: number) => value is number;
+    var oddInteger: (value: number) => value is number;
+    var emptyArray: (value: unknown) => value is never[];
+    var nonEmptyArray: (value: unknown) => value is unknown[];
+    var emptyString: (value: unknown) => value is "";
+    var emptyStringOrWhitespace: (value: unknown) => value is string;
+    var nonEmptyString: (value: unknown) => value is string;
+    var nonEmptyStringAndNotWhitespace: (value: unknown) => value is string;
+    var emptyObject: <Key extends string | number | symbol = string>(value: unknown) => value is Record<Key, never>;
+    var nonEmptyObject: <Key extends string | number | symbol = string, Value = unknown>(value: unknown) => value is Record<Key, Value>;
+    var emptySet: (value: unknown) => value is Set<never>;
+    var nonEmptySet: <T = unknown>(value: unknown) => value is Set<T>;
+    var emptyMap: (value: unknown) => value is Map<never, never>;
+    var nonEmptyMap: <Key = unknown, Value = unknown>(value: unknown) => value is Map<Key, Value>;
+    var propertyKey: (value: unknown) => value is string | number | symbol;
+    var formData: (value: unknown) => value is FormData;
+    var urlSearchParams: (value: unknown) => value is URLSearchParams;
+    var any: (predicate: Predicate | Predicate[], ...values: unknown[]) => boolean;
+    var all: (predicate: Predicate, ...values: unknown[]) => boolean;
+}
+export interface ArrayLike<T> {
+    readonly [index: number]: T;
+    readonly length: number;
+}
+export interface NodeStream extends NodeJS.EventEmitter {
+    pipe<T extends NodeJS.WritableStream>(destination: T, options?: {
+        end?: boolean;
+    }): T;
+}
+export declare type Predicate = (value: unknown) => boolean;
+export declare const enum AssertionTypeDescription {
+    class_ = "Class",
+    numericString = "string with a number",
+    nullOrUndefined = "null or undefined",
+    iterable = "Iterable",
+    asyncIterable = "AsyncIterable",
+    nativePromise = "native Promise",
+    urlString = "string with a URL",
+    truthy = "truthy",
+    falsy = "falsy",
+    nan = "NaN",
+    primitive = "primitive",
+    integer = "integer",
+    safeInteger = "integer",
+    plainObject = "plain object",
+    arrayLike = "array-like",
+    typedArray = "TypedArray",
+    domElement = "HTMLElement",
+    nodeStream = "Node.js Stream",
+    infinite = "infinite number",
+    emptyArray = "empty array",
+    nonEmptyArray = "non-empty array",
+    emptyString = "empty string",
+    emptyStringOrWhitespace = "empty string or whitespace",
+    nonEmptyString = "non-empty string",
+    nonEmptyStringAndNotWhitespace = "non-empty string and not whitespace",
+    emptyObject = "empty object",
+    nonEmptyObject = "non-empty object",
+    emptySet = "empty set",
+    nonEmptySet = "non-empty set",
+    emptyMap = "empty map",
+    nonEmptyMap = "non-empty map",
+    evenInteger = "even integer",
+    oddInteger = "odd integer",
+    directInstanceOf = "T",
+    inRange = "in range",
+    any = "predicate returns truthy for any value",
+    all = "predicate returns truthy for all values"
+}
+interface Assert {
+    undefined: (value: unknown) => asserts value is undefined;
+    string: (value: unknown) => asserts value is string;
+    number: (value: unknown) => asserts value is number;
+    bigint: (value: unknown) => asserts value is bigint;
+    function_: (value: unknown) => asserts value is Function;
+    null_: (value: unknown) => asserts value is null;
+    class_: (value: unknown) => asserts value is Class;
+    boolean: (value: unknown) => asserts value is boolean;
+    symbol: (value: unknown) => asserts value is symbol;
+    numericString: (value: unknown) => asserts value is string;
+    array: <T = unknown>(value: unknown, assertion?: (element: unknown) => asserts element is T) => asserts value is T[];
+    buffer: (value: unknown) => asserts value is Buffer;
+    blob: (value: unknown) => asserts value is Blob;
+    nullOrUndefined: (value: unknown) => asserts value is null | undefined;
+    object: <Key extends keyof any = string, Value = unknown>(value: unknown) => asserts value is Record<Key, Value>;
+    iterable: <T = unknown>(value: unknown) => asserts value is Iterable<T>;
+    asyncIterable: <T = unknown>(value: unknown) => asserts value is AsyncIterable<T>;
+    generator: (value: unknown) => asserts value is Generator;
+    asyncGenerator: (value: unknown) => asserts value is AsyncGenerator;
+    nativePromise: <T = unknown>(value: unknown) => asserts value is Promise<T>;
+    promise: <T = unknown>(value: unknown) => asserts value is Promise<T>;
+    generatorFunction: (value: unknown) => asserts value is GeneratorFunction;
+    asyncGeneratorFunction: (value: unknown) => asserts value is AsyncGeneratorFunction;
+    asyncFunction: (value: unknown) => asserts value is Function;
+    boundFunction: (value: unknown) => asserts value is Function;
+    regExp: (value: unknown) => asserts value is RegExp;
+    date: (value: unknown) => asserts value is Date;
+    error: (value: unknown) => asserts value is Error;
+    map: <Key = unknown, Value = unknown>(value: unknown) => asserts value is Map<Key, Value>;
+    set: <T = unknown>(value: unknown) => asserts value is Set<T>;
+    weakMap: <Key extends object = object, Value = unknown>(value: unknown) => asserts value is WeakMap<Key, Value>;
+    weakSet: <T extends object = object>(value: unknown) => asserts value is WeakSet<T>;
+    int8Array: (value: unknown) => asserts value is Int8Array;
+    uint8Array: (value: unknown) => asserts value is Uint8Array;
+    uint8ClampedArray: (value: unknown) => asserts value is Uint8ClampedArray;
+    int16Array: (value: unknown) => asserts value is Int16Array;
+    uint16Array: (value: unknown) => asserts value is Uint16Array;
+    int32Array: (value: unknown) => asserts value is Int32Array;
+    uint32Array: (value: unknown) => asserts value is Uint32Array;
+    float32Array: (value: unknown) => asserts value is Float32Array;
+    float64Array: (value: unknown) => asserts value is Float64Array;
+    bigInt64Array: (value: unknown) => asserts value is BigInt64Array;
+    bigUint64Array: (value: unknown) => asserts value is BigUint64Array;
+    arrayBuffer: (value: unknown) => asserts value is ArrayBuffer;
+    sharedArrayBuffer: (value: unknown) => asserts value is SharedArrayBuffer;
+    dataView: (value: unknown) => asserts value is DataView;
+    enumCase: <T = unknown>(value: unknown, targetEnum: T) => asserts value is T[keyof T];
+    urlInstance: (value: unknown) => asserts value is URL;
+    urlString: (value: unknown) => asserts value is string;
+    truthy: (value: unknown) => asserts value is unknown;
+    falsy: (value: unknown) => asserts value is unknown;
+    nan: (value: unknown) => asserts value is unknown;
+    primitive: (value: unknown) => asserts value is Primitive;
+    integer: (value: unknown) => asserts value is number;
+    safeInteger: (value: unknown) => asserts value is number;
+    plainObject: <Value = unknown>(value: unknown) => asserts value is Record<PropertyKey, Value>;
+    typedArray: (value: unknown) => asserts value is TypedArray;
+    arrayLike: <T = unknown>(value: unknown) => asserts value is ArrayLike<T>;
+    domElement: (value: unknown) => asserts value is HTMLElement;
+    observable: (value: unknown) => asserts value is ObservableLike;
+    nodeStream: (value: unknown) => asserts value is NodeStream;
+    infinite: (value: unknown) => asserts value is number;
+    emptyArray: (value: unknown) => asserts value is never[];
+    nonEmptyArray: (value: unknown) => asserts value is unknown[];
+    emptyString: (value: unknown) => asserts value is '';
+    emptyStringOrWhitespace: (value: unknown) => asserts value is string;
+    nonEmptyString: (value: unknown) => asserts value is string;
+    nonEmptyStringAndNotWhitespace: (value: unknown) => asserts value is string;
+    emptyObject: <Key extends keyof any = string>(value: unknown) => asserts value is Record<Key, never>;
+    nonEmptyObject: <Key extends keyof any = string, Value = unknown>(value: unknown) => asserts value is Record<Key, Value>;
+    emptySet: (value: unknown) => asserts value is Set<never>;
+    nonEmptySet: <T = unknown>(value: unknown) => asserts value is Set<T>;
+    emptyMap: (value: unknown) => asserts value is Map<never, never>;
+    nonEmptyMap: <Key = unknown, Value = unknown>(value: unknown) => asserts value is Map<Key, Value>;
+    propertyKey: (value: unknown) => asserts value is PropertyKey;
+    formData: (value: unknown) => asserts value is FormData;
+    urlSearchParams: (value: unknown) => asserts value is URLSearchParams;
+    evenInteger: (value: number) => asserts value is number;
+    oddInteger: (value: number) => asserts value is number;
+    directInstanceOf: <T>(instance: unknown, class_: Class<T>) => asserts instance is T;
+    inRange: (value: number, range: number | number[]) => asserts value is number;
+    any: (predicate: Predicate | Predicate[], ...values: unknown[]) => void | never;
+    all: (predicate: Predicate, ...values: unknown[]) => void | never;
+}
+export declare const assert: Assert;
+export default is;
+export { Class, TypedArray, ObservableLike, Primitive } from './types';

+ 434 - 0
node_modules/@sindresorhus/is/dist/index.js

@@ -0,0 +1,434 @@
+"use strict";
+/// <reference lib="es2018"/>
+/// <reference lib="dom"/>
+/// <reference types="node"/>
+Object.defineProperty(exports, "__esModule", { value: true });
+const typedArrayTypeNames = [
+    'Int8Array',
+    'Uint8Array',
+    'Uint8ClampedArray',
+    'Int16Array',
+    'Uint16Array',
+    'Int32Array',
+    'Uint32Array',
+    'Float32Array',
+    'Float64Array',
+    'BigInt64Array',
+    'BigUint64Array'
+];
+function isTypedArrayName(name) {
+    return typedArrayTypeNames.includes(name);
+}
+const objectTypeNames = [
+    'Function',
+    'Generator',
+    'AsyncGenerator',
+    'GeneratorFunction',
+    'AsyncGeneratorFunction',
+    'AsyncFunction',
+    'Observable',
+    'Array',
+    'Buffer',
+    'Blob',
+    'Object',
+    'RegExp',
+    'Date',
+    'Error',
+    'Map',
+    'Set',
+    'WeakMap',
+    'WeakSet',
+    'ArrayBuffer',
+    'SharedArrayBuffer',
+    'DataView',
+    'Promise',
+    'URL',
+    'FormData',
+    'URLSearchParams',
+    'HTMLElement',
+    ...typedArrayTypeNames
+];
+function isObjectTypeName(name) {
+    return objectTypeNames.includes(name);
+}
+const primitiveTypeNames = [
+    'null',
+    'undefined',
+    'string',
+    'number',
+    'bigint',
+    'boolean',
+    'symbol'
+];
+function isPrimitiveTypeName(name) {
+    return primitiveTypeNames.includes(name);
+}
+// eslint-disable-next-line @typescript-eslint/ban-types
+function isOfType(type) {
+    return (value) => typeof value === type;
+}
+const { toString } = Object.prototype;
+const getObjectType = (value) => {
+    const objectTypeName = toString.call(value).slice(8, -1);
+    if (/HTML\w+Element/.test(objectTypeName) && is.domElement(value)) {
+        return 'HTMLElement';
+    }
+    if (isObjectTypeName(objectTypeName)) {
+        return objectTypeName;
+    }
+    return undefined;
+};
+const isObjectOfType = (type) => (value) => getObjectType(value) === type;
+function is(value) {
+    if (value === null) {
+        return 'null';
+    }
+    switch (typeof value) {
+        case 'undefined':
+            return 'undefined';
+        case 'string':
+            return 'string';
+        case 'number':
+            return 'number';
+        case 'boolean':
+            return 'boolean';
+        case 'function':
+            return 'Function';
+        case 'bigint':
+            return 'bigint';
+        case 'symbol':
+            return 'symbol';
+        default:
+    }
+    if (is.observable(value)) {
+        return 'Observable';
+    }
+    if (is.array(value)) {
+        return 'Array';
+    }
+    if (is.buffer(value)) {
+        return 'Buffer';
+    }
+    const tagType = getObjectType(value);
+    if (tagType) {
+        return tagType;
+    }
+    if (value instanceof String || value instanceof Boolean || value instanceof Number) {
+        throw new TypeError('Please don\'t use object wrappers for primitive types');
+    }
+    return 'Object';
+}
+is.undefined = isOfType('undefined');
+is.string = isOfType('string');
+const isNumberType = isOfType('number');
+is.number = (value) => isNumberType(value) && !is.nan(value);
+is.bigint = isOfType('bigint');
+// eslint-disable-next-line @typescript-eslint/ban-types
+is.function_ = isOfType('function');
+is.null_ = (value) => value === null;
+is.class_ = (value) => is.function_(value) && value.toString().startsWith('class ');
+is.boolean = (value) => value === true || value === false;
+is.symbol = isOfType('symbol');
+is.numericString = (value) => is.string(value) && !is.emptyStringOrWhitespace(value) && !Number.isNaN(Number(value));
+is.array = (value, assertion) => {
+    if (!Array.isArray(value)) {
+        return false;
+    }
+    if (!is.function_(assertion)) {
+        return true;
+    }
+    return value.every(assertion);
+};
+is.buffer = (value) => { var _a, _b, _c, _d; return (_d = (_c = (_b = (_a = value) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.isBuffer) === null || _c === void 0 ? void 0 : _c.call(_b, value)) !== null && _d !== void 0 ? _d : false; };
+is.blob = (value) => isObjectOfType('Blob')(value);
+is.nullOrUndefined = (value) => is.null_(value) || is.undefined(value);
+is.object = (value) => !is.null_(value) && (typeof value === 'object' || is.function_(value));
+is.iterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.iterator]); };
+is.asyncIterable = (value) => { var _a; return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a[Symbol.asyncIterator]); };
+is.generator = (value) => { var _a, _b; return is.iterable(value) && is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.next) && is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.throw); };
+is.asyncGenerator = (value) => is.asyncIterable(value) && is.function_(value.next) && is.function_(value.throw);
+is.nativePromise = (value) => isObjectOfType('Promise')(value);
+const hasPromiseAPI = (value) => {
+    var _a, _b;
+    return is.function_((_a = value) === null || _a === void 0 ? void 0 : _a.then) &&
+        is.function_((_b = value) === null || _b === void 0 ? void 0 : _b.catch);
+};
+is.promise = (value) => is.nativePromise(value) || hasPromiseAPI(value);
+is.generatorFunction = isObjectOfType('GeneratorFunction');
+is.asyncGeneratorFunction = (value) => getObjectType(value) === 'AsyncGeneratorFunction';
+is.asyncFunction = (value) => getObjectType(value) === 'AsyncFunction';
+// eslint-disable-next-line no-prototype-builtins, @typescript-eslint/ban-types
+is.boundFunction = (value) => is.function_(value) && !value.hasOwnProperty('prototype');
+is.regExp = isObjectOfType('RegExp');
+is.date = isObjectOfType('Date');
+is.error = isObjectOfType('Error');
+is.map = (value) => isObjectOfType('Map')(value);
+is.set = (value) => isObjectOfType('Set')(value);
+is.weakMap = (value) => isObjectOfType('WeakMap')(value);
+is.weakSet = (value) => isObjectOfType('WeakSet')(value);
+is.int8Array = isObjectOfType('Int8Array');
+is.uint8Array = isObjectOfType('Uint8Array');
+is.uint8ClampedArray = isObjectOfType('Uint8ClampedArray');
+is.int16Array = isObjectOfType('Int16Array');
+is.uint16Array = isObjectOfType('Uint16Array');
+is.int32Array = isObjectOfType('Int32Array');
+is.uint32Array = isObjectOfType('Uint32Array');
+is.float32Array = isObjectOfType('Float32Array');
+is.float64Array = isObjectOfType('Float64Array');
+is.bigInt64Array = isObjectOfType('BigInt64Array');
+is.bigUint64Array = isObjectOfType('BigUint64Array');
+is.arrayBuffer = isObjectOfType('ArrayBuffer');
+is.sharedArrayBuffer = isObjectOfType('SharedArrayBuffer');
+is.dataView = isObjectOfType('DataView');
+is.enumCase = (value, targetEnum) => Object.values(targetEnum).includes(value);
+is.directInstanceOf = (instance, class_) => Object.getPrototypeOf(instance) === class_.prototype;
+is.urlInstance = (value) => isObjectOfType('URL')(value);
+is.urlString = (value) => {
+    if (!is.string(value)) {
+        return false;
+    }
+    try {
+        new URL(value); // eslint-disable-line no-new
+        return true;
+    }
+    catch (_a) {
+        return false;
+    }
+};
+// Example: `is.truthy = (value: unknown): value is (not false | not 0 | not '' | not undefined | not null) => Boolean(value);`
+is.truthy = (value) => Boolean(value);
+// Example: `is.falsy = (value: unknown): value is (not true | 0 | '' | undefined | null) => Boolean(value);`
+is.falsy = (value) => !value;
+is.nan = (value) => Number.isNaN(value);
+is.primitive = (value) => is.null_(value) || isPrimitiveTypeName(typeof value);
+is.integer = (value) => Number.isInteger(value);
+is.safeInteger = (value) => Number.isSafeInteger(value);
+is.plainObject = (value) => {
+    // From: https://github.com/sindresorhus/is-plain-obj/blob/main/index.js
+    if (toString.call(value) !== '[object Object]') {
+        return false;
+    }
+    const prototype = Object.getPrototypeOf(value);
+    return prototype === null || prototype === Object.getPrototypeOf({});
+};
+is.typedArray = (value) => isTypedArrayName(getObjectType(value));
+const isValidLength = (value) => is.safeInteger(value) && value >= 0;
+is.arrayLike = (value) => !is.nullOrUndefined(value) && !is.function_(value) && isValidLength(value.length);
+is.inRange = (value, range) => {
+    if (is.number(range)) {
+        return value >= Math.min(0, range) && value <= Math.max(range, 0);
+    }
+    if (is.array(range) && range.length === 2) {
+        return value >= Math.min(...range) && value <= Math.max(...range);
+    }
+    throw new TypeError(`Invalid range: ${JSON.stringify(range)}`);
+};
+const NODE_TYPE_ELEMENT = 1;
+const DOM_PROPERTIES_TO_CHECK = [
+    'innerHTML',
+    'ownerDocument',
+    'style',
+    'attributes',
+    'nodeValue'
+];
+is.domElement = (value) => {
+    return is.object(value) &&
+        value.nodeType === NODE_TYPE_ELEMENT &&
+        is.string(value.nodeName) &&
+        !is.plainObject(value) &&
+        DOM_PROPERTIES_TO_CHECK.every(property => property in value);
+};
+is.observable = (value) => {
+    var _a, _b, _c, _d;
+    if (!value) {
+        return false;
+    }
+    // eslint-disable-next-line no-use-extend-native/no-use-extend-native
+    if (value === ((_b = (_a = value)[Symbol.observable]) === null || _b === void 0 ? void 0 : _b.call(_a))) {
+        return true;
+    }
+    if (value === ((_d = (_c = value)['@@observable']) === null || _d === void 0 ? void 0 : _d.call(_c))) {
+        return true;
+    }
+    return false;
+};
+is.nodeStream = (value) => is.object(value) && is.function_(value.pipe) && !is.observable(value);
+is.infinite = (value) => value === Infinity || value === -Infinity;
+const isAbsoluteMod2 = (remainder) => (value) => is.integer(value) && Math.abs(value % 2) === remainder;
+is.evenInteger = isAbsoluteMod2(0);
+is.oddInteger = isAbsoluteMod2(1);
+is.emptyArray = (value) => is.array(value) && value.length === 0;
+is.nonEmptyArray = (value) => is.array(value) && value.length > 0;
+is.emptyString = (value) => is.string(value) && value.length === 0;
+const isWhiteSpaceString = (value) => is.string(value) && !/\S/.test(value);
+is.emptyStringOrWhitespace = (value) => is.emptyString(value) || isWhiteSpaceString(value);
+// TODO: Use `not ''` when the `not` operator is available.
+is.nonEmptyString = (value) => is.string(value) && value.length > 0;
+// TODO: Use `not ''` when the `not` operator is available.
+is.nonEmptyStringAndNotWhitespace = (value) => is.string(value) && !is.emptyStringOrWhitespace(value);
+is.emptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length === 0;
+// TODO: Use `not` operator here to remove `Map` and `Set` from type guard:
+// - https://github.com/Microsoft/TypeScript/pull/29317
+is.nonEmptyObject = (value) => is.object(value) && !is.map(value) && !is.set(value) && Object.keys(value).length > 0;
+is.emptySet = (value) => is.set(value) && value.size === 0;
+is.nonEmptySet = (value) => is.set(value) && value.size > 0;
+is.emptyMap = (value) => is.map(value) && value.size === 0;
+is.nonEmptyMap = (value) => is.map(value) && value.size > 0;
+// `PropertyKey` is any value that can be used as an object key (string, number, or symbol)
+is.propertyKey = (value) => is.any([is.string, is.number, is.symbol], value);
+is.formData = (value) => isObjectOfType('FormData')(value);
+is.urlSearchParams = (value) => isObjectOfType('URLSearchParams')(value);
+const predicateOnArray = (method, predicate, values) => {
+    if (!is.function_(predicate)) {
+        throw new TypeError(`Invalid predicate: ${JSON.stringify(predicate)}`);
+    }
+    if (values.length === 0) {
+        throw new TypeError('Invalid number of values');
+    }
+    return method.call(values, predicate);
+};
+is.any = (predicate, ...values) => {
+    const predicates = is.array(predicate) ? predicate : [predicate];
+    return predicates.some(singlePredicate => predicateOnArray(Array.prototype.some, singlePredicate, values));
+};
+is.all = (predicate, ...values) => predicateOnArray(Array.prototype.every, predicate, values);
+const assertType = (condition, description, value, options = {}) => {
+    if (!condition) {
+        const { multipleValues } = options;
+        const valuesMessage = multipleValues ?
+            `received values of types ${[
+                ...new Set(value.map(singleValue => `\`${is(singleValue)}\``))
+            ].join(', ')}` :
+            `received value of type \`${is(value)}\``;
+        throw new TypeError(`Expected value which is \`${description}\`, ${valuesMessage}.`);
+    }
+};
+exports.assert = {
+    // Unknowns.
+    undefined: (value) => assertType(is.undefined(value), 'undefined', value),
+    string: (value) => assertType(is.string(value), 'string', value),
+    number: (value) => assertType(is.number(value), 'number', value),
+    bigint: (value) => assertType(is.bigint(value), 'bigint', value),
+    // eslint-disable-next-line @typescript-eslint/ban-types
+    function_: (value) => assertType(is.function_(value), 'Function', value),
+    null_: (value) => assertType(is.null_(value), 'null', value),
+    class_: (value) => assertType(is.class_(value), "Class" /* class_ */, value),
+    boolean: (value) => assertType(is.boolean(value), 'boolean', value),
+    symbol: (value) => assertType(is.symbol(value), 'symbol', value),
+    numericString: (value) => assertType(is.numericString(value), "string with a number" /* numericString */, value),
+    array: (value, assertion) => {
+        const assert = assertType;
+        assert(is.array(value), 'Array', value);
+        if (assertion) {
+            value.forEach(assertion);
+        }
+    },
+    buffer: (value) => assertType(is.buffer(value), 'Buffer', value),
+    blob: (value) => assertType(is.blob(value), 'Blob', value),
+    nullOrUndefined: (value) => assertType(is.nullOrUndefined(value), "null or undefined" /* nullOrUndefined */, value),
+    object: (value) => assertType(is.object(value), 'Object', value),
+    iterable: (value) => assertType(is.iterable(value), "Iterable" /* iterable */, value),
+    asyncIterable: (value) => assertType(is.asyncIterable(value), "AsyncIterable" /* asyncIterable */, value),
+    generator: (value) => assertType(is.generator(value), 'Generator', value),
+    asyncGenerator: (value) => assertType(is.asyncGenerator(value), 'AsyncGenerator', value),
+    nativePromise: (value) => assertType(is.nativePromise(value), "native Promise" /* nativePromise */, value),
+    promise: (value) => assertType(is.promise(value), 'Promise', value),
+    generatorFunction: (value) => assertType(is.generatorFunction(value), 'GeneratorFunction', value),
+    asyncGeneratorFunction: (value) => assertType(is.asyncGeneratorFunction(value), 'AsyncGeneratorFunction', value),
+    // eslint-disable-next-line @typescript-eslint/ban-types
+    asyncFunction: (value) => assertType(is.asyncFunction(value), 'AsyncFunction', value),
+    // eslint-disable-next-line @typescript-eslint/ban-types
+    boundFunction: (value) => assertType(is.boundFunction(value), 'Function', value),
+    regExp: (value) => assertType(is.regExp(value), 'RegExp', value),
+    date: (value) => assertType(is.date(value), 'Date', value),
+    error: (value) => assertType(is.error(value), 'Error', value),
+    map: (value) => assertType(is.map(value), 'Map', value),
+    set: (value) => assertType(is.set(value), 'Set', value),
+    weakMap: (value) => assertType(is.weakMap(value), 'WeakMap', value),
+    weakSet: (value) => assertType(is.weakSet(value), 'WeakSet', value),
+    int8Array: (value) => assertType(is.int8Array(value), 'Int8Array', value),
+    uint8Array: (value) => assertType(is.uint8Array(value), 'Uint8Array', value),
+    uint8ClampedArray: (value) => assertType(is.uint8ClampedArray(value), 'Uint8ClampedArray', value),
+    int16Array: (value) => assertType(is.int16Array(value), 'Int16Array', value),
+    uint16Array: (value) => assertType(is.uint16Array(value), 'Uint16Array', value),
+    int32Array: (value) => assertType(is.int32Array(value), 'Int32Array', value),
+    uint32Array: (value) => assertType(is.uint32Array(value), 'Uint32Array', value),
+    float32Array: (value) => assertType(is.float32Array(value), 'Float32Array', value),
+    float64Array: (value) => assertType(is.float64Array(value), 'Float64Array', value),
+    bigInt64Array: (value) => assertType(is.bigInt64Array(value), 'BigInt64Array', value),
+    bigUint64Array: (value) => assertType(is.bigUint64Array(value), 'BigUint64Array', value),
+    arrayBuffer: (value) => assertType(is.arrayBuffer(value), 'ArrayBuffer', value),
+    sharedArrayBuffer: (value) => assertType(is.sharedArrayBuffer(value), 'SharedArrayBuffer', value),
+    dataView: (value) => assertType(is.dataView(value), 'DataView', value),
+    enumCase: (value, targetEnum) => assertType(is.enumCase(value, targetEnum), 'EnumCase', value),
+    urlInstance: (value) => assertType(is.urlInstance(value), 'URL', value),
+    urlString: (value) => assertType(is.urlString(value), "string with a URL" /* urlString */, value),
+    truthy: (value) => assertType(is.truthy(value), "truthy" /* truthy */, value),
+    falsy: (value) => assertType(is.falsy(value), "falsy" /* falsy */, value),
+    nan: (value) => assertType(is.nan(value), "NaN" /* nan */, value),
+    primitive: (value) => assertType(is.primitive(value), "primitive" /* primitive */, value),
+    integer: (value) => assertType(is.integer(value), "integer" /* integer */, value),
+    safeInteger: (value) => assertType(is.safeInteger(value), "integer" /* safeInteger */, value),
+    plainObject: (value) => assertType(is.plainObject(value), "plain object" /* plainObject */, value),
+    typedArray: (value) => assertType(is.typedArray(value), "TypedArray" /* typedArray */, value),
+    arrayLike: (value) => assertType(is.arrayLike(value), "array-like" /* arrayLike */, value),
+    domElement: (value) => assertType(is.domElement(value), "HTMLElement" /* domElement */, value),
+    observable: (value) => assertType(is.observable(value), 'Observable', value),
+    nodeStream: (value) => assertType(is.nodeStream(value), "Node.js Stream" /* nodeStream */, value),
+    infinite: (value) => assertType(is.infinite(value), "infinite number" /* infinite */, value),
+    emptyArray: (value) => assertType(is.emptyArray(value), "empty array" /* emptyArray */, value),
+    nonEmptyArray: (value) => assertType(is.nonEmptyArray(value), "non-empty array" /* nonEmptyArray */, value),
+    emptyString: (value) => assertType(is.emptyString(value), "empty string" /* emptyString */, value),
+    emptyStringOrWhitespace: (value) => assertType(is.emptyStringOrWhitespace(value), "empty string or whitespace" /* emptyStringOrWhitespace */, value),
+    nonEmptyString: (value) => assertType(is.nonEmptyString(value), "non-empty string" /* nonEmptyString */, value),
+    nonEmptyStringAndNotWhitespace: (value) => assertType(is.nonEmptyStringAndNotWhitespace(value), "non-empty string and not whitespace" /* nonEmptyStringAndNotWhitespace */, value),
+    emptyObject: (value) => assertType(is.emptyObject(value), "empty object" /* emptyObject */, value),
+    nonEmptyObject: (value) => assertType(is.nonEmptyObject(value), "non-empty object" /* nonEmptyObject */, value),
+    emptySet: (value) => assertType(is.emptySet(value), "empty set" /* emptySet */, value),
+    nonEmptySet: (value) => assertType(is.nonEmptySet(value), "non-empty set" /* nonEmptySet */, value),
+    emptyMap: (value) => assertType(is.emptyMap(value), "empty map" /* emptyMap */, value),
+    nonEmptyMap: (value) => assertType(is.nonEmptyMap(value), "non-empty map" /* nonEmptyMap */, value),
+    propertyKey: (value) => assertType(is.propertyKey(value), 'PropertyKey', value),
+    formData: (value) => assertType(is.formData(value), 'FormData', value),
+    urlSearchParams: (value) => assertType(is.urlSearchParams(value), 'URLSearchParams', value),
+    // Numbers.
+    evenInteger: (value) => assertType(is.evenInteger(value), "even integer" /* evenInteger */, value),
+    oddInteger: (value) => assertType(is.oddInteger(value), "odd integer" /* oddInteger */, value),
+    // Two arguments.
+    directInstanceOf: (instance, class_) => assertType(is.directInstanceOf(instance, class_), "T" /* directInstanceOf */, instance),
+    inRange: (value, range) => assertType(is.inRange(value, range), "in range" /* inRange */, value),
+    // Variadic functions.
+    any: (predicate, ...values) => {
+        return assertType(is.any(predicate, ...values), "predicate returns truthy for any value" /* any */, values, { multipleValues: true });
+    },
+    all: (predicate, ...values) => assertType(is.all(predicate, ...values), "predicate returns truthy for all values" /* all */, values, { multipleValues: true })
+};
+// Some few keywords are reserved, but we'll populate them for Node.js users
+// See https://github.com/Microsoft/TypeScript/issues/2536
+Object.defineProperties(is, {
+    class: {
+        value: is.class_
+    },
+    function: {
+        value: is.function_
+    },
+    null: {
+        value: is.null_
+    }
+});
+Object.defineProperties(exports.assert, {
+    class: {
+        value: exports.assert.class_
+    },
+    function: {
+        value: exports.assert.function_
+    },
+    null: {
+        value: exports.assert.null_
+    }
+});
+exports.default = is;
+// For CommonJS default export support
+module.exports = is;
+module.exports.default = is;
+module.exports.assert = exports.assert;

+ 25 - 0
node_modules/@sindresorhus/is/dist/types.d.ts

@@ -0,0 +1,25 @@
+/**
+Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
+*/
+export declare type Primitive = null | undefined | string | number | boolean | symbol | bigint;
+/**
+Matches a [`class` constructor](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes).
+*/
+export declare type Class<T = unknown, Arguments extends any[] = any[]> = new (...arguments_: Arguments) => T;
+/**
+Matches any [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray), like `Uint8Array` or `Float64Array`.
+*/
+export declare type TypedArray = Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
+declare global {
+    interface SymbolConstructor {
+        readonly observable: symbol;
+    }
+}
+/**
+Matches a value that is like an [Observable](https://github.com/tc39/proposal-observable).
+*/
+export interface ObservableLike {
+    subscribe(observer: (value: unknown) => void): void;
+    [Symbol.observable](): ObservableLike;
+}
+export declare type Falsy = false | 0 | 0n | '' | null | undefined;

+ 3 - 0
node_modules/@sindresorhus/is/dist/types.js

@@ -0,0 +1,3 @@
+"use strict";
+// Extracted from https://github.com/sindresorhus/type-fest/blob/78019f42ea888b0cdceb41a4a78163868de57555/index.d.ts
+Object.defineProperty(exports, "__esModule", { value: true });

+ 32 - 0
node_modules/@szmarczak/http-timer/dist/source/index.d.ts

@@ -0,0 +1,32 @@
+/// <reference types="node" />
+import { ClientRequest, IncomingMessage } from 'http';
+export interface Timings {
+    start: number;
+    socket?: number;
+    lookup?: number;
+    connect?: number;
+    secureConnect?: number;
+    upload?: number;
+    response?: number;
+    end?: number;
+    error?: number;
+    abort?: number;
+    phases: {
+        wait?: number;
+        dns?: number;
+        tcp?: number;
+        tls?: number;
+        request?: number;
+        firstByte?: number;
+        download?: number;
+        total?: number;
+    };
+}
+export interface ClientRequestWithTimings extends ClientRequest {
+    timings?: Timings;
+}
+export interface IncomingMessageWithTimings extends IncomingMessage {
+    timings?: Timings;
+}
+declare const timer: (request: ClientRequestWithTimings) => Timings;
+export default timer;

+ 126 - 0
node_modules/@szmarczak/http-timer/dist/source/index.js

@@ -0,0 +1,126 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const defer_to_connect_1 = require("defer-to-connect");
+const util_1 = require("util");
+const nodejsMajorVersion = Number(process.versions.node.split('.')[0]);
+const timer = (request) => {
+    if (request.timings) {
+        return request.timings;
+    }
+    const timings = {
+        start: Date.now(),
+        socket: undefined,
+        lookup: undefined,
+        connect: undefined,
+        secureConnect: undefined,
+        upload: undefined,
+        response: undefined,
+        end: undefined,
+        error: undefined,
+        abort: undefined,
+        phases: {
+            wait: undefined,
+            dns: undefined,
+            tcp: undefined,
+            tls: undefined,
+            request: undefined,
+            firstByte: undefined,
+            download: undefined,
+            total: undefined
+        }
+    };
+    request.timings = timings;
+    const handleError = (origin) => {
+        const emit = origin.emit.bind(origin);
+        origin.emit = (event, ...args) => {
+            // Catches the `error` event
+            if (event === 'error') {
+                timings.error = Date.now();
+                timings.phases.total = timings.error - timings.start;
+                origin.emit = emit;
+            }
+            // Saves the original behavior
+            return emit(event, ...args);
+        };
+    };
+    handleError(request);
+    const onAbort = () => {
+        timings.abort = Date.now();
+        // Let the `end` response event be responsible for setting the total phase,
+        // unless the Node.js major version is >= 13.
+        if (!timings.response || nodejsMajorVersion >= 13) {
+            timings.phases.total = Date.now() - timings.start;
+        }
+    };
+    request.prependOnceListener('abort', onAbort);
+    const onSocket = (socket) => {
+        timings.socket = Date.now();
+        timings.phases.wait = timings.socket - timings.start;
+        if (util_1.types.isProxy(socket)) {
+            return;
+        }
+        const lookupListener = () => {
+            timings.lookup = Date.now();
+            timings.phases.dns = timings.lookup - timings.socket;
+        };
+        socket.prependOnceListener('lookup', lookupListener);
+        defer_to_connect_1.default(socket, {
+            connect: () => {
+                timings.connect = Date.now();
+                if (timings.lookup === undefined) {
+                    socket.removeListener('lookup', lookupListener);
+                    timings.lookup = timings.connect;
+                    timings.phases.dns = timings.lookup - timings.socket;
+                }
+                timings.phases.tcp = timings.connect - timings.lookup;
+                // This callback is called before flushing any data,
+                // so we don't need to set `timings.phases.request` here.
+            },
+            secureConnect: () => {
+                timings.secureConnect = Date.now();
+                timings.phases.tls = timings.secureConnect - timings.connect;
+            }
+        });
+    };
+    if (request.socket) {
+        onSocket(request.socket);
+    }
+    else {
+        request.prependOnceListener('socket', onSocket);
+    }
+    const onUpload = () => {
+        var _a;
+        timings.upload = Date.now();
+        timings.phases.request = timings.upload - ((_a = timings.secureConnect) !== null && _a !== void 0 ? _a : timings.connect);
+    };
+    const writableFinished = () => {
+        if (typeof request.writableFinished === 'boolean') {
+            return request.writableFinished;
+        }
+        // Node.js doesn't have `request.writableFinished` property
+        return request.finished && request.outputSize === 0 && (!request.socket || request.socket.writableLength === 0);
+    };
+    if (writableFinished()) {
+        onUpload();
+    }
+    else {
+        request.prependOnceListener('finish', onUpload);
+    }
+    request.prependOnceListener('response', (response) => {
+        timings.response = Date.now();
+        timings.phases.firstByte = timings.response - timings.upload;
+        response.timings = timings;
+        handleError(response);
+        response.prependOnceListener('end', () => {
+            timings.end = Date.now();
+            timings.phases.download = timings.end - timings.response;
+            timings.phases.total = timings.end - timings.start;
+        });
+        response.prependOnceListener('aborted', onAbort);
+    });
+    return timings;
+};
+exports.default = timer;
+// For CommonJS default export support
+module.exports = timer;
+module.exports.default = timer;

+ 343 - 0
node_modules/@vitejs/plugin-react/dist/index.cjs

@@ -0,0 +1,343 @@
+//#region rolldown:runtime
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+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
+		});
+	}
+	return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
+	value: mod,
+	enumerable: true
+}) : target, mod));
+
+//#endregion
+const node_path = __toESM(require("node:path"));
+const node_url = __toESM(require("node:url"));
+const node_fs = __toESM(require("node:fs"));
+const vite = __toESM(require("vite"));
+const __rolldown_pluginutils = __toESM(require("@rolldown/pluginutils"));
+
+//#region ../common/refresh-utils.ts
+const runtimePublicPath = "/@react-refresh";
+const reactCompRE = /extends\s+(?:React\.)?(?:Pure)?Component/;
+const refreshContentRE = /\$RefreshReg\$\(/;
+const preambleCode = `import { injectIntoGlobalHook } from "__BASE__${runtimePublicPath.slice(1)}";
+injectIntoGlobalHook(window);
+window.$RefreshReg$ = () => {};
+window.$RefreshSig$ = () => (type) => type;`;
+const getPreambleCode = (base) => preambleCode.replace("__BASE__", base);
+const avoidSourceMapOption = Symbol();
+function addRefreshWrapper(code, map, pluginName, id, reactRefreshHost = "") {
+	const hasRefresh = refreshContentRE.test(code);
+	const onlyReactComp = !hasRefresh && reactCompRE.test(code);
+	const normalizedMap = map === avoidSourceMapOption ? null : map;
+	if (!hasRefresh && !onlyReactComp) return {
+		code,
+		map: normalizedMap
+	};
+	const avoidSourceMap = map === avoidSourceMapOption;
+	const newMap = typeof normalizedMap === "string" ? JSON.parse(normalizedMap) : normalizedMap;
+	let newCode = code;
+	if (hasRefresh) {
+		const refreshHead = removeLineBreaksIfNeeded(`let prevRefreshReg;
+let prevRefreshSig;
+
+if (import.meta.hot && !inWebWorker) {
+  if (!window.$RefreshReg$) {
+    throw new Error(
+      "${pluginName} can't detect preamble. Something is wrong."
+    );
+  }
+
+  prevRefreshReg = window.$RefreshReg$;
+  prevRefreshSig = window.$RefreshSig$;
+  window.$RefreshReg$ = RefreshRuntime.getRefreshReg(${JSON.stringify(id)});
+  window.$RefreshSig$ = RefreshRuntime.createSignatureFunctionForTransform;
+}
+
+`, avoidSourceMap);
+		newCode = `${refreshHead}${newCode}
+
+if (import.meta.hot && !inWebWorker) {
+  window.$RefreshReg$ = prevRefreshReg;
+  window.$RefreshSig$ = prevRefreshSig;
+}
+`;
+		if (newMap) newMap.mappings = ";".repeat(16) + newMap.mappings;
+	}
+	const sharedHead = removeLineBreaksIfNeeded(`import * as RefreshRuntime from "${reactRefreshHost}${runtimePublicPath}";
+const inWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;
+
+`, avoidSourceMap);
+	newCode = `${sharedHead}${newCode}
+
+if (import.meta.hot && !inWebWorker) {
+  RefreshRuntime.__hmr_import(import.meta.url).then((currentExports) => {
+    RefreshRuntime.registerExportsForReactRefresh(${JSON.stringify(id)}, currentExports);
+    import.meta.hot.accept((nextExports) => {
+      if (!nextExports) return;
+      const invalidateMessage = RefreshRuntime.validateRefreshBoundaryAndEnqueueUpdate(${JSON.stringify(id)}, currentExports, nextExports);
+      if (invalidateMessage) import.meta.hot.invalidate(invalidateMessage);
+    });
+  });
+}
+`;
+	if (newMap) newMap.mappings = ";;;" + newMap.mappings;
+	return {
+		code: newCode,
+		map: newMap
+	};
+}
+function removeLineBreaksIfNeeded(code, enabled) {
+	return enabled ? code.replace(/\n/g, "") : code;
+}
+
+//#endregion
+//#region ../common/warning.ts
+const silenceUseClientWarning = (userConfig) => ({ rollupOptions: { onwarn(warning, defaultHandler) {
+	var _userConfig$build;
+	if (warning.code === "MODULE_LEVEL_DIRECTIVE" && (warning.message.includes("use client") || warning.message.includes("use server"))) return;
+	if (warning.code === "SOURCEMAP_ERROR" && warning.message.includes("resolve original location") && warning.pos === 0) return;
+	if ((_userConfig$build = userConfig.build) === null || _userConfig$build === void 0 || (_userConfig$build = _userConfig$build.rollupOptions) === null || _userConfig$build === void 0 ? void 0 : _userConfig$build.onwarn) userConfig.build.rollupOptions.onwarn(warning, defaultHandler);
+	else defaultHandler(warning);
+} } });
+
+//#endregion
+//#region src/index.ts
+const _dirname = (0, node_path.dirname)((0, node_url.fileURLToPath)(require("url").pathToFileURL(__filename).href));
+const refreshRuntimePath = (0, node_path.join)(_dirname, "refresh-runtime.js");
+let babel;
+async function loadBabel() {
+	if (!babel) babel = await import("@babel/core");
+	return babel;
+}
+const defaultIncludeRE = /\.[tj]sx?$/;
+const tsRE = /\.tsx?$/;
+function viteReact(opts = {}) {
+	var _opts$babel;
+	const include = opts.include ?? defaultIncludeRE;
+	const exclude = opts.exclude;
+	const filter = (0, vite.createFilter)(include, exclude);
+	const jsxImportSource = opts.jsxImportSource ?? "react";
+	const jsxImportRuntime = `${jsxImportSource}/jsx-runtime`;
+	const jsxImportDevRuntime = `${jsxImportSource}/jsx-dev-runtime`;
+	let runningInVite = false;
+	let isProduction = true;
+	let projectRoot = process.cwd();
+	let skipFastRefresh = true;
+	let runPluginOverrides;
+	let staticBabelOptions;
+	const importReactRE = /\bimport\s+(?:\*\s+as\s+)?React\b/;
+	const viteBabel = {
+		name: "vite:react-babel",
+		enforce: "pre",
+		config() {
+			if (opts.jsxRuntime === "classic") if ("rolldownVersion" in vite) return { oxc: { jsx: {
+				runtime: "classic",
+				development: false
+			} } };
+			else return { esbuild: { jsx: "transform" } };
+			else return {
+				esbuild: {
+					jsx: "automatic",
+					jsxImportSource: opts.jsxImportSource
+				},
+				optimizeDeps: "rolldownVersion" in vite ? { rollupOptions: { jsx: { mode: "automatic" } } } : { esbuildOptions: { jsx: "automatic" } }
+			};
+		},
+		configResolved(config) {
+			runningInVite = true;
+			projectRoot = config.root;
+			isProduction = config.isProduction;
+			skipFastRefresh = isProduction || config.command === "build" || config.server.hmr === false;
+			if ("jsxPure" in opts) config.logger.warnOnce("[@vitejs/plugin-react] jsxPure was removed. You can configure esbuild.jsxSideEffects directly.");
+			const hooks = config.plugins.map((plugin) => {
+				var _plugin$api;
+				return (_plugin$api = plugin.api) === null || _plugin$api === void 0 ? void 0 : _plugin$api.reactBabel;
+			}).filter(defined);
+			if ("rolldownVersion" in vite && !opts.babel && !hooks.length && !opts.disableOxcRecommendation) config.logger.warn("[vite:react-babel] We recommend switching to `@vitejs/plugin-react-oxc` for improved performance. More information at https://vite.dev/rolldown");
+			if (hooks.length > 0) runPluginOverrides = (babelOptions, context) => {
+				hooks.forEach((hook) => hook(babelOptions, context, config));
+			};
+			else if (typeof opts.babel !== "function") {
+				staticBabelOptions = createBabelOptions(opts.babel);
+				if (canSkipBabel(staticBabelOptions.plugins, staticBabelOptions) && skipFastRefresh && (opts.jsxRuntime === "classic" ? isProduction : true)) delete viteBabel.transform;
+			}
+		},
+		options(options) {
+			if (!runningInVite) {
+				options.jsx = {
+					mode: opts.jsxRuntime,
+					importSource: opts.jsxImportSource
+				};
+				return options;
+			}
+		},
+		transform: {
+			filter: { id: {
+				include: (0, __rolldown_pluginutils.makeIdFiltersToMatchWithQuery)(include),
+				exclude: [...exclude ? (0, __rolldown_pluginutils.makeIdFiltersToMatchWithQuery)(ensureArray(exclude)) : [], /\/node_modules\//]
+			} },
+			async handler(code, id, options) {
+				if (id.includes("/node_modules/")) return;
+				const [filepath] = id.split("?");
+				if (!filter(filepath)) return;
+				const ssr = (options === null || options === void 0 ? void 0 : options.ssr) === true;
+				const babelOptions = (() => {
+					if (staticBabelOptions) return staticBabelOptions;
+					const newBabelOptions = createBabelOptions(typeof opts.babel === "function" ? opts.babel(id, { ssr }) : opts.babel);
+					runPluginOverrides === null || runPluginOverrides === void 0 || runPluginOverrides(newBabelOptions, {
+						id,
+						ssr
+					});
+					return newBabelOptions;
+				})();
+				const plugins = [...babelOptions.plugins];
+				const isJSX = filepath.endsWith("x");
+				const useFastRefresh = !skipFastRefresh && !ssr && (isJSX || (opts.jsxRuntime === "classic" ? importReactRE.test(code) : code.includes(jsxImportDevRuntime) || code.includes(jsxImportRuntime)));
+				if (useFastRefresh) plugins.push([await loadPlugin("react-refresh/babel"), { skipEnvCheck: true }]);
+				if (opts.jsxRuntime === "classic" && isJSX) {
+					if (!isProduction) plugins.push(await loadPlugin("@babel/plugin-transform-react-jsx-self"), await loadPlugin("@babel/plugin-transform-react-jsx-source"));
+				}
+				if (canSkipBabel(plugins, babelOptions)) return;
+				const parserPlugins = [...babelOptions.parserOpts.plugins];
+				if (!filepath.endsWith(".ts")) parserPlugins.push("jsx");
+				if (tsRE.test(filepath)) parserPlugins.push("typescript");
+				const babel$1 = await loadBabel();
+				const result = await babel$1.transformAsync(code, {
+					...babelOptions,
+					root: projectRoot,
+					filename: id,
+					sourceFileName: filepath,
+					retainLines: getReactCompilerPlugin(plugins) != null ? false : !isProduction && isJSX && opts.jsxRuntime !== "classic",
+					parserOpts: {
+						...babelOptions.parserOpts,
+						sourceType: "module",
+						allowAwaitOutsideFunction: true,
+						plugins: parserPlugins
+					},
+					generatorOpts: {
+						...babelOptions.generatorOpts,
+						importAttributesKeyword: "with",
+						decoratorsBeforeExport: true
+					},
+					plugins,
+					sourceMaps: true
+				});
+				if (result) {
+					if (!useFastRefresh) return {
+						code: result.code,
+						map: result.map
+					};
+					return addRefreshWrapper(result.code, result.map, "@vitejs/plugin-react", id, opts.reactRefreshHost);
+				}
+			}
+		}
+	};
+	const dependencies = [
+		"react",
+		"react-dom",
+		jsxImportDevRuntime,
+		jsxImportRuntime
+	];
+	const staticBabelPlugins = typeof opts.babel === "object" ? ((_opts$babel = opts.babel) === null || _opts$babel === void 0 ? void 0 : _opts$babel.plugins) ?? [] : [];
+	const reactCompilerPlugin = getReactCompilerPlugin(staticBabelPlugins);
+	if (reactCompilerPlugin != null) {
+		const reactCompilerRuntimeModule = getReactCompilerRuntimeModule(reactCompilerPlugin);
+		dependencies.push(reactCompilerRuntimeModule);
+	}
+	const viteReactRefresh = {
+		name: "vite:react-refresh",
+		enforce: "pre",
+		config: (userConfig) => ({
+			build: silenceUseClientWarning(userConfig),
+			optimizeDeps: { include: dependencies },
+			resolve: { dedupe: ["react", "react-dom"] }
+		}),
+		resolveId: {
+			filter: { id: (0, __rolldown_pluginutils.exactRegex)(runtimePublicPath) },
+			handler(id) {
+				if (id === runtimePublicPath) return id;
+			}
+		},
+		load: {
+			filter: { id: (0, __rolldown_pluginutils.exactRegex)(runtimePublicPath) },
+			handler(id) {
+				if (id === runtimePublicPath) return (0, node_fs.readFileSync)(refreshRuntimePath, "utf-8").replace(/__README_URL__/g, "https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react");
+			}
+		},
+		transformIndexHtml(_, config) {
+			if (!skipFastRefresh) return [{
+				tag: "script",
+				attrs: { type: "module" },
+				children: getPreambleCode(config.server.config.base)
+			}];
+		}
+	};
+	return [viteBabel, viteReactRefresh];
+}
+viteReact.preambleCode = preambleCode;
+function canSkipBabel(plugins, babelOptions) {
+	return !(plugins.length || babelOptions.presets.length || babelOptions.configFile || babelOptions.babelrc);
+}
+const loadedPlugin = /* @__PURE__ */ new Map();
+function loadPlugin(path) {
+	const cached = loadedPlugin.get(path);
+	if (cached) return cached;
+	const promise = import(path).then((module$1) => {
+		const value = module$1.default || module$1;
+		loadedPlugin.set(path, value);
+		return value;
+	});
+	loadedPlugin.set(path, promise);
+	return promise;
+}
+function createBabelOptions(rawOptions) {
+	var _babelOptions$parserO;
+	const babelOptions = {
+		babelrc: false,
+		configFile: false,
+		...rawOptions
+	};
+	babelOptions.plugins || (babelOptions.plugins = []);
+	babelOptions.presets || (babelOptions.presets = []);
+	babelOptions.overrides || (babelOptions.overrides = []);
+	babelOptions.parserOpts || (babelOptions.parserOpts = {});
+	(_babelOptions$parserO = babelOptions.parserOpts).plugins || (_babelOptions$parserO.plugins = []);
+	return babelOptions;
+}
+function defined(value) {
+	return value !== void 0;
+}
+function getReactCompilerPlugin(plugins) {
+	return plugins.find((p) => p === "babel-plugin-react-compiler" || Array.isArray(p) && p[0] === "babel-plugin-react-compiler");
+}
+function getReactCompilerRuntimeModule(plugin) {
+	let moduleName = "react/compiler-runtime";
+	if (Array.isArray(plugin)) {
+		var _plugin$, _plugin$2, _plugin$3;
+		if (((_plugin$ = plugin[1]) === null || _plugin$ === void 0 ? void 0 : _plugin$.target) === "17" || ((_plugin$2 = plugin[1]) === null || _plugin$2 === void 0 ? void 0 : _plugin$2.target) === "18") moduleName = "react-compiler-runtime";
+		else if (typeof ((_plugin$3 = plugin[1]) === null || _plugin$3 === void 0 ? void 0 : _plugin$3.runtimeModule) === "string") {
+			var _plugin$4;
+			moduleName = (_plugin$4 = plugin[1]) === null || _plugin$4 === void 0 ? void 0 : _plugin$4.runtimeModule;
+		}
+	}
+	return moduleName;
+}
+function ensureArray(value) {
+	return Array.isArray(value) ? value : [value];
+}
+
+//#endregion
+module.exports = viteReact;
+module.exports.default = module.exports

+ 67 - 0
node_modules/@vitejs/plugin-react/dist/index.d.cts

@@ -0,0 +1,67 @@
+import { ParserOptions, TransformOptions } from "@babel/core";
+import { Plugin, ResolvedConfig } from "vite";
+
+//#region src/index.d.ts
+interface Options {
+  include?: string | RegExp | Array<string | RegExp>;
+  exclude?: string | RegExp | Array<string | RegExp>;
+  /**
+   * Control where the JSX factory is imported from.
+   * https://esbuild.github.io/api/#jsx-import-source
+   * @default 'react'
+   */
+  jsxImportSource?: string;
+  /**
+   * Note: Skipping React import with classic runtime is not supported from v4
+   * @default "automatic"
+   */
+  jsxRuntime?: 'classic' | 'automatic';
+  /**
+   * Babel configuration applied in both dev and prod.
+   */
+  babel?: BabelOptions | ((id: string, options: {
+    ssr?: boolean;
+  }) => BabelOptions);
+  /**
+   * React Fast Refresh runtime URL prefix.
+   * Useful in a module federation context to enable HMR by specifying
+   * the host application URL in the Vite config of a remote application.
+   * @example
+   * reactRefreshHost: 'http://localhost:3000'
+   */
+  reactRefreshHost?: string;
+  /**
+   * If set, disables the recommendation to use `@vitejs/plugin-react-oxc`
+   */
+  disableOxcRecommendation?: boolean;
+}
+type BabelOptions = Omit<TransformOptions, 'ast' | 'filename' | 'root' | 'sourceFileName' | 'sourceMaps' | 'inputSourceMap'>;
+/**
+ * The object type used by the `options` passed to plugins with
+ * an `api.reactBabel` method.
+ */
+interface ReactBabelOptions extends BabelOptions {
+  plugins: Extract<BabelOptions['plugins'], any[]>;
+  presets: Extract<BabelOptions['presets'], any[]>;
+  overrides: Extract<BabelOptions['overrides'], any[]>;
+  parserOpts: ParserOptions & {
+    plugins: Extract<ParserOptions['plugins'], any[]>;
+  };
+}
+type ReactBabelHook = (babelConfig: ReactBabelOptions, context: ReactBabelHookContext, config: ResolvedConfig) => void;
+type ReactBabelHookContext = {
+  ssr: boolean;
+  id: string;
+};
+type ViteReactPluginApi = {
+  /**
+   * Manipulate the Babel options of `@vitejs/plugin-react`
+   */
+  reactBabel?: ReactBabelHook;
+};
+declare function viteReact(opts?: Options): Plugin[];
+declare namespace viteReact {
+  var preambleCode: string;
+}
+//#endregion
+export { BabelOptions, Options, ReactBabelOptions, ViteReactPluginApi, viteReact as default };

+ 67 - 0
node_modules/@vitejs/plugin-react/dist/index.d.ts

@@ -0,0 +1,67 @@
+import { Plugin, ResolvedConfig } from "vite";
+import { ParserOptions, TransformOptions } from "@babel/core";
+
+//#region src/index.d.ts
+interface Options {
+  include?: string | RegExp | Array<string | RegExp>;
+  exclude?: string | RegExp | Array<string | RegExp>;
+  /**
+   * Control where the JSX factory is imported from.
+   * https://esbuild.github.io/api/#jsx-import-source
+   * @default 'react'
+   */
+  jsxImportSource?: string;
+  /**
+   * Note: Skipping React import with classic runtime is not supported from v4
+   * @default "automatic"
+   */
+  jsxRuntime?: 'classic' | 'automatic';
+  /**
+   * Babel configuration applied in both dev and prod.
+   */
+  babel?: BabelOptions | ((id: string, options: {
+    ssr?: boolean;
+  }) => BabelOptions);
+  /**
+   * React Fast Refresh runtime URL prefix.
+   * Useful in a module federation context to enable HMR by specifying
+   * the host application URL in the Vite config of a remote application.
+   * @example
+   * reactRefreshHost: 'http://localhost:3000'
+   */
+  reactRefreshHost?: string;
+  /**
+   * If set, disables the recommendation to use `@vitejs/plugin-react-oxc`
+   */
+  disableOxcRecommendation?: boolean;
+}
+type BabelOptions = Omit<TransformOptions, 'ast' | 'filename' | 'root' | 'sourceFileName' | 'sourceMaps' | 'inputSourceMap'>;
+/**
+ * The object type used by the `options` passed to plugins with
+ * an `api.reactBabel` method.
+ */
+interface ReactBabelOptions extends BabelOptions {
+  plugins: Extract<BabelOptions['plugins'], any[]>;
+  presets: Extract<BabelOptions['presets'], any[]>;
+  overrides: Extract<BabelOptions['overrides'], any[]>;
+  parserOpts: ParserOptions & {
+    plugins: Extract<ParserOptions['plugins'], any[]>;
+  };
+}
+type ReactBabelHook = (babelConfig: ReactBabelOptions, context: ReactBabelHookContext, config: ResolvedConfig) => void;
+type ReactBabelHookContext = {
+  ssr: boolean;
+  id: string;
+};
+type ViteReactPluginApi = {
+  /**
+   * Manipulate the Babel options of `@vitejs/plugin-react`
+   */
+  reactBabel?: ReactBabelHook;
+};
+declare function viteReact(opts?: Options): Plugin[];
+declare namespace viteReact {
+  var preambleCode: string;
+}
+//#endregion
+export { BabelOptions, Options, ReactBabelOptions, ViteReactPluginApi, viteReact as default };

+ 320 - 0
node_modules/@vitejs/plugin-react/dist/index.js

@@ -0,0 +1,320 @@
+import { dirname, join } from "node:path";
+import { fileURLToPath } from "node:url";
+import { readFileSync } from "node:fs";
+import * as vite from "vite";
+import { createFilter } from "vite";
+import { exactRegex, makeIdFiltersToMatchWithQuery } from "@rolldown/pluginutils";
+
+//#region ../common/refresh-utils.ts
+const runtimePublicPath = "/@react-refresh";
+const reactCompRE = /extends\s+(?:React\.)?(?:Pure)?Component/;
+const refreshContentRE = /\$RefreshReg\$\(/;
+const preambleCode = `import { injectIntoGlobalHook } from "__BASE__${runtimePublicPath.slice(1)}";
+injectIntoGlobalHook(window);
+window.$RefreshReg$ = () => {};
+window.$RefreshSig$ = () => (type) => type;`;
+const getPreambleCode = (base) => preambleCode.replace("__BASE__", base);
+const avoidSourceMapOption = Symbol();
+function addRefreshWrapper(code, map, pluginName, id, reactRefreshHost = "") {
+	const hasRefresh = refreshContentRE.test(code);
+	const onlyReactComp = !hasRefresh && reactCompRE.test(code);
+	const normalizedMap = map === avoidSourceMapOption ? null : map;
+	if (!hasRefresh && !onlyReactComp) return {
+		code,
+		map: normalizedMap
+	};
+	const avoidSourceMap = map === avoidSourceMapOption;
+	const newMap = typeof normalizedMap === "string" ? JSON.parse(normalizedMap) : normalizedMap;
+	let newCode = code;
+	if (hasRefresh) {
+		const refreshHead = removeLineBreaksIfNeeded(`let prevRefreshReg;
+let prevRefreshSig;
+
+if (import.meta.hot && !inWebWorker) {
+  if (!window.$RefreshReg$) {
+    throw new Error(
+      "${pluginName} can't detect preamble. Something is wrong."
+    );
+  }
+
+  prevRefreshReg = window.$RefreshReg$;
+  prevRefreshSig = window.$RefreshSig$;
+  window.$RefreshReg$ = RefreshRuntime.getRefreshReg(${JSON.stringify(id)});
+  window.$RefreshSig$ = RefreshRuntime.createSignatureFunctionForTransform;
+}
+
+`, avoidSourceMap);
+		newCode = `${refreshHead}${newCode}
+
+if (import.meta.hot && !inWebWorker) {
+  window.$RefreshReg$ = prevRefreshReg;
+  window.$RefreshSig$ = prevRefreshSig;
+}
+`;
+		if (newMap) newMap.mappings = ";".repeat(16) + newMap.mappings;
+	}
+	const sharedHead = removeLineBreaksIfNeeded(`import * as RefreshRuntime from "${reactRefreshHost}${runtimePublicPath}";
+const inWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;
+
+`, avoidSourceMap);
+	newCode = `${sharedHead}${newCode}
+
+if (import.meta.hot && !inWebWorker) {
+  RefreshRuntime.__hmr_import(import.meta.url).then((currentExports) => {
+    RefreshRuntime.registerExportsForReactRefresh(${JSON.stringify(id)}, currentExports);
+    import.meta.hot.accept((nextExports) => {
+      if (!nextExports) return;
+      const invalidateMessage = RefreshRuntime.validateRefreshBoundaryAndEnqueueUpdate(${JSON.stringify(id)}, currentExports, nextExports);
+      if (invalidateMessage) import.meta.hot.invalidate(invalidateMessage);
+    });
+  });
+}
+`;
+	if (newMap) newMap.mappings = ";;;" + newMap.mappings;
+	return {
+		code: newCode,
+		map: newMap
+	};
+}
+function removeLineBreaksIfNeeded(code, enabled) {
+	return enabled ? code.replace(/\n/g, "") : code;
+}
+
+//#endregion
+//#region ../common/warning.ts
+const silenceUseClientWarning = (userConfig) => ({ rollupOptions: { onwarn(warning, defaultHandler) {
+	var _userConfig$build;
+	if (warning.code === "MODULE_LEVEL_DIRECTIVE" && (warning.message.includes("use client") || warning.message.includes("use server"))) return;
+	if (warning.code === "SOURCEMAP_ERROR" && warning.message.includes("resolve original location") && warning.pos === 0) return;
+	if ((_userConfig$build = userConfig.build) === null || _userConfig$build === void 0 || (_userConfig$build = _userConfig$build.rollupOptions) === null || _userConfig$build === void 0 ? void 0 : _userConfig$build.onwarn) userConfig.build.rollupOptions.onwarn(warning, defaultHandler);
+	else defaultHandler(warning);
+} } });
+
+//#endregion
+//#region src/index.ts
+const _dirname = dirname(fileURLToPath(import.meta.url));
+const refreshRuntimePath = join(_dirname, "refresh-runtime.js");
+let babel;
+async function loadBabel() {
+	if (!babel) babel = await import("@babel/core");
+	return babel;
+}
+const defaultIncludeRE = /\.[tj]sx?$/;
+const tsRE = /\.tsx?$/;
+function viteReact(opts = {}) {
+	var _opts$babel;
+	const include = opts.include ?? defaultIncludeRE;
+	const exclude = opts.exclude;
+	const filter = createFilter(include, exclude);
+	const jsxImportSource = opts.jsxImportSource ?? "react";
+	const jsxImportRuntime = `${jsxImportSource}/jsx-runtime`;
+	const jsxImportDevRuntime = `${jsxImportSource}/jsx-dev-runtime`;
+	let runningInVite = false;
+	let isProduction = true;
+	let projectRoot = process.cwd();
+	let skipFastRefresh = true;
+	let runPluginOverrides;
+	let staticBabelOptions;
+	const importReactRE = /\bimport\s+(?:\*\s+as\s+)?React\b/;
+	const viteBabel = {
+		name: "vite:react-babel",
+		enforce: "pre",
+		config() {
+			if (opts.jsxRuntime === "classic") if ("rolldownVersion" in vite) return { oxc: { jsx: {
+				runtime: "classic",
+				development: false
+			} } };
+			else return { esbuild: { jsx: "transform" } };
+			else return {
+				esbuild: {
+					jsx: "automatic",
+					jsxImportSource: opts.jsxImportSource
+				},
+				optimizeDeps: "rolldownVersion" in vite ? { rollupOptions: { jsx: { mode: "automatic" } } } : { esbuildOptions: { jsx: "automatic" } }
+			};
+		},
+		configResolved(config) {
+			runningInVite = true;
+			projectRoot = config.root;
+			isProduction = config.isProduction;
+			skipFastRefresh = isProduction || config.command === "build" || config.server.hmr === false;
+			if ("jsxPure" in opts) config.logger.warnOnce("[@vitejs/plugin-react] jsxPure was removed. You can configure esbuild.jsxSideEffects directly.");
+			const hooks = config.plugins.map((plugin) => {
+				var _plugin$api;
+				return (_plugin$api = plugin.api) === null || _plugin$api === void 0 ? void 0 : _plugin$api.reactBabel;
+			}).filter(defined);
+			if ("rolldownVersion" in vite && !opts.babel && !hooks.length && !opts.disableOxcRecommendation) config.logger.warn("[vite:react-babel] We recommend switching to `@vitejs/plugin-react-oxc` for improved performance. More information at https://vite.dev/rolldown");
+			if (hooks.length > 0) runPluginOverrides = (babelOptions, context) => {
+				hooks.forEach((hook) => hook(babelOptions, context, config));
+			};
+			else if (typeof opts.babel !== "function") {
+				staticBabelOptions = createBabelOptions(opts.babel);
+				if (canSkipBabel(staticBabelOptions.plugins, staticBabelOptions) && skipFastRefresh && (opts.jsxRuntime === "classic" ? isProduction : true)) delete viteBabel.transform;
+			}
+		},
+		options(options) {
+			if (!runningInVite) {
+				options.jsx = {
+					mode: opts.jsxRuntime,
+					importSource: opts.jsxImportSource
+				};
+				return options;
+			}
+		},
+		transform: {
+			filter: { id: {
+				include: makeIdFiltersToMatchWithQuery(include),
+				exclude: [...exclude ? makeIdFiltersToMatchWithQuery(ensureArray(exclude)) : [], /\/node_modules\//]
+			} },
+			async handler(code, id, options) {
+				if (id.includes("/node_modules/")) return;
+				const [filepath] = id.split("?");
+				if (!filter(filepath)) return;
+				const ssr = (options === null || options === void 0 ? void 0 : options.ssr) === true;
+				const babelOptions = (() => {
+					if (staticBabelOptions) return staticBabelOptions;
+					const newBabelOptions = createBabelOptions(typeof opts.babel === "function" ? opts.babel(id, { ssr }) : opts.babel);
+					runPluginOverrides === null || runPluginOverrides === void 0 || runPluginOverrides(newBabelOptions, {
+						id,
+						ssr
+					});
+					return newBabelOptions;
+				})();
+				const plugins = [...babelOptions.plugins];
+				const isJSX = filepath.endsWith("x");
+				const useFastRefresh = !skipFastRefresh && !ssr && (isJSX || (opts.jsxRuntime === "classic" ? importReactRE.test(code) : code.includes(jsxImportDevRuntime) || code.includes(jsxImportRuntime)));
+				if (useFastRefresh) plugins.push([await loadPlugin("react-refresh/babel"), { skipEnvCheck: true }]);
+				if (opts.jsxRuntime === "classic" && isJSX) {
+					if (!isProduction) plugins.push(await loadPlugin("@babel/plugin-transform-react-jsx-self"), await loadPlugin("@babel/plugin-transform-react-jsx-source"));
+				}
+				if (canSkipBabel(plugins, babelOptions)) return;
+				const parserPlugins = [...babelOptions.parserOpts.plugins];
+				if (!filepath.endsWith(".ts")) parserPlugins.push("jsx");
+				if (tsRE.test(filepath)) parserPlugins.push("typescript");
+				const babel$1 = await loadBabel();
+				const result = await babel$1.transformAsync(code, {
+					...babelOptions,
+					root: projectRoot,
+					filename: id,
+					sourceFileName: filepath,
+					retainLines: getReactCompilerPlugin(plugins) != null ? false : !isProduction && isJSX && opts.jsxRuntime !== "classic",
+					parserOpts: {
+						...babelOptions.parserOpts,
+						sourceType: "module",
+						allowAwaitOutsideFunction: true,
+						plugins: parserPlugins
+					},
+					generatorOpts: {
+						...babelOptions.generatorOpts,
+						importAttributesKeyword: "with",
+						decoratorsBeforeExport: true
+					},
+					plugins,
+					sourceMaps: true
+				});
+				if (result) {
+					if (!useFastRefresh) return {
+						code: result.code,
+						map: result.map
+					};
+					return addRefreshWrapper(result.code, result.map, "@vitejs/plugin-react", id, opts.reactRefreshHost);
+				}
+			}
+		}
+	};
+	const dependencies = [
+		"react",
+		"react-dom",
+		jsxImportDevRuntime,
+		jsxImportRuntime
+	];
+	const staticBabelPlugins = typeof opts.babel === "object" ? ((_opts$babel = opts.babel) === null || _opts$babel === void 0 ? void 0 : _opts$babel.plugins) ?? [] : [];
+	const reactCompilerPlugin = getReactCompilerPlugin(staticBabelPlugins);
+	if (reactCompilerPlugin != null) {
+		const reactCompilerRuntimeModule = getReactCompilerRuntimeModule(reactCompilerPlugin);
+		dependencies.push(reactCompilerRuntimeModule);
+	}
+	const viteReactRefresh = {
+		name: "vite:react-refresh",
+		enforce: "pre",
+		config: (userConfig) => ({
+			build: silenceUseClientWarning(userConfig),
+			optimizeDeps: { include: dependencies },
+			resolve: { dedupe: ["react", "react-dom"] }
+		}),
+		resolveId: {
+			filter: { id: exactRegex(runtimePublicPath) },
+			handler(id) {
+				if (id === runtimePublicPath) return id;
+			}
+		},
+		load: {
+			filter: { id: exactRegex(runtimePublicPath) },
+			handler(id) {
+				if (id === runtimePublicPath) return readFileSync(refreshRuntimePath, "utf-8").replace(/__README_URL__/g, "https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react");
+			}
+		},
+		transformIndexHtml(_, config) {
+			if (!skipFastRefresh) return [{
+				tag: "script",
+				attrs: { type: "module" },
+				children: getPreambleCode(config.server.config.base)
+			}];
+		}
+	};
+	return [viteBabel, viteReactRefresh];
+}
+viteReact.preambleCode = preambleCode;
+function canSkipBabel(plugins, babelOptions) {
+	return !(plugins.length || babelOptions.presets.length || babelOptions.configFile || babelOptions.babelrc);
+}
+const loadedPlugin = /* @__PURE__ */ new Map();
+function loadPlugin(path) {
+	const cached = loadedPlugin.get(path);
+	if (cached) return cached;
+	const promise = import(path).then((module) => {
+		const value = module.default || module;
+		loadedPlugin.set(path, value);
+		return value;
+	});
+	loadedPlugin.set(path, promise);
+	return promise;
+}
+function createBabelOptions(rawOptions) {
+	var _babelOptions$parserO;
+	const babelOptions = {
+		babelrc: false,
+		configFile: false,
+		...rawOptions
+	};
+	babelOptions.plugins || (babelOptions.plugins = []);
+	babelOptions.presets || (babelOptions.presets = []);
+	babelOptions.overrides || (babelOptions.overrides = []);
+	babelOptions.parserOpts || (babelOptions.parserOpts = {});
+	(_babelOptions$parserO = babelOptions.parserOpts).plugins || (_babelOptions$parserO.plugins = []);
+	return babelOptions;
+}
+function defined(value) {
+	return value !== void 0;
+}
+function getReactCompilerPlugin(plugins) {
+	return plugins.find((p) => p === "babel-plugin-react-compiler" || Array.isArray(p) && p[0] === "babel-plugin-react-compiler");
+}
+function getReactCompilerRuntimeModule(plugin) {
+	let moduleName = "react/compiler-runtime";
+	if (Array.isArray(plugin)) {
+		var _plugin$, _plugin$2, _plugin$3;
+		if (((_plugin$ = plugin[1]) === null || _plugin$ === void 0 ? void 0 : _plugin$.target) === "17" || ((_plugin$2 = plugin[1]) === null || _plugin$2 === void 0 ? void 0 : _plugin$2.target) === "18") moduleName = "react-compiler-runtime";
+		else if (typeof ((_plugin$3 = plugin[1]) === null || _plugin$3 === void 0 ? void 0 : _plugin$3.runtimeModule) === "string") {
+			var _plugin$4;
+			moduleName = (_plugin$4 = plugin[1]) === null || _plugin$4 === void 0 ? void 0 : _plugin$4.runtimeModule;
+		}
+	}
+	return moduleName;
+}
+function ensureArray(value) {
+	return Array.isArray(value) ? value : [value];
+}
+
+//#endregion
+export { viteReact as default };

+ 670 - 0
node_modules/@vitejs/plugin-react/dist/refresh-runtime.js

@@ -0,0 +1,670 @@
+/* global window */
+/* eslint-disable eqeqeq, prefer-const, @typescript-eslint/no-empty-function */
+
+/*! Copyright (c) Meta Platforms, Inc. and affiliates. **/
+/**
+ * This is simplified pure-js version of https://github.com/facebook/react/blob/main/packages/react-refresh/src/ReactFreshRuntime.js
+ * without IE11 compatibility and verbose isDev checks.
+ * Some utils are appended at the bottom for HMR integration.
+ */
+
+const REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref')
+const REACT_MEMO_TYPE = Symbol.for('react.memo')
+
+// We never remove these associations.
+// It's OK to reference families, but use WeakMap/Set for types.
+let allFamiliesByID = new Map()
+let allFamiliesByType = new WeakMap()
+let allSignaturesByType = new WeakMap()
+
+// This WeakMap is read by React, so we only put families
+// that have actually been edited here. This keeps checks fast.
+const updatedFamiliesByType = new WeakMap()
+
+// This is cleared on every performReactRefresh() call.
+// It is an array of [Family, NextType] tuples.
+let pendingUpdates = []
+
+// This is injected by the renderer via DevTools global hook.
+const helpersByRendererID = new Map()
+
+const helpersByRoot = new Map()
+
+// We keep track of mounted roots so we can schedule updates.
+const mountedRoots = new Set()
+// If a root captures an error, we remember it so we can retry on edit.
+const failedRoots = new Set()
+
+// We also remember the last element for every root.
+// It needs to be weak because we do this even for roots that failed to mount.
+// If there is no WeakMap, we won't attempt to do retrying.
+let rootElements = new WeakMap()
+let isPerformingRefresh = false
+
+function computeFullKey(signature) {
+  if (signature.fullKey !== null) {
+    return signature.fullKey
+  }
+
+  let fullKey = signature.ownKey
+  let hooks
+  try {
+    hooks = signature.getCustomHooks()
+  } catch (err) {
+    // This can happen in an edge case, e.g. if expression like Foo.useSomething
+    // depends on Foo which is lazily initialized during rendering.
+    // In that case just assume we'll have to remount.
+    signature.forceReset = true
+    signature.fullKey = fullKey
+    return fullKey
+  }
+
+  for (let i = 0; i < hooks.length; i++) {
+    const hook = hooks[i]
+    if (typeof hook !== 'function') {
+      // Something's wrong. Assume we need to remount.
+      signature.forceReset = true
+      signature.fullKey = fullKey
+      return fullKey
+    }
+    const nestedHookSignature = allSignaturesByType.get(hook)
+    if (nestedHookSignature === undefined) {
+      // No signature means Hook wasn't in the source code, e.g. in a library.
+      // We'll skip it because we can assume it won't change during this session.
+      continue
+    }
+    const nestedHookKey = computeFullKey(nestedHookSignature)
+    if (nestedHookSignature.forceReset) {
+      signature.forceReset = true
+    }
+    fullKey += '\n---\n' + nestedHookKey
+  }
+
+  signature.fullKey = fullKey
+  return fullKey
+}
+
+function haveEqualSignatures(prevType, nextType) {
+  const prevSignature = allSignaturesByType.get(prevType)
+  const nextSignature = allSignaturesByType.get(nextType)
+
+  if (prevSignature === undefined && nextSignature === undefined) {
+    return true
+  }
+  if (prevSignature === undefined || nextSignature === undefined) {
+    return false
+  }
+  if (computeFullKey(prevSignature) !== computeFullKey(nextSignature)) {
+    return false
+  }
+  if (nextSignature.forceReset) {
+    return false
+  }
+
+  return true
+}
+
+function isReactClass(type) {
+  return type.prototype && type.prototype.isReactComponent
+}
+
+function canPreserveStateBetween(prevType, nextType) {
+  if (isReactClass(prevType) || isReactClass(nextType)) {
+    return false
+  }
+  if (haveEqualSignatures(prevType, nextType)) {
+    return true
+  }
+  return false
+}
+
+function resolveFamily(type) {
+  // Only check updated types to keep lookups fast.
+  return updatedFamiliesByType.get(type)
+}
+
+// This is a safety mechanism to protect against rogue getters and Proxies.
+function getProperty(object, property) {
+  try {
+    return object[property]
+  } catch (err) {
+    // Intentionally ignore.
+    return undefined
+  }
+}
+
+function performReactRefresh() {
+  if (pendingUpdates.length === 0) {
+    return null
+  }
+  if (isPerformingRefresh) {
+    return null
+  }
+
+  isPerformingRefresh = true
+  try {
+    const staleFamilies = new Set()
+    const updatedFamilies = new Set()
+
+    const updates = pendingUpdates
+    pendingUpdates = []
+    updates.forEach(([family, nextType]) => {
+      // Now that we got a real edit, we can create associations
+      // that will be read by the React reconciler.
+      const prevType = family.current
+      updatedFamiliesByType.set(prevType, family)
+      updatedFamiliesByType.set(nextType, family)
+      family.current = nextType
+
+      // Determine whether this should be a re-render or a re-mount.
+      if (canPreserveStateBetween(prevType, nextType)) {
+        updatedFamilies.add(family)
+      } else {
+        staleFamilies.add(family)
+      }
+    })
+
+    // TODO: rename these fields to something more meaningful.
+    const update = {
+      updatedFamilies, // Families that will re-render preserving state
+      staleFamilies, // Families that will be remounted
+    }
+
+    helpersByRendererID.forEach((helpers) => {
+      // Even if there are no roots, set the handler on first update.
+      // This ensures that if *new* roots are mounted, they'll use the resolve handler.
+      helpers.setRefreshHandler(resolveFamily)
+    })
+
+    let didError = false
+    let firstError = null
+
+    // We snapshot maps and sets that are mutated during commits.
+    // If we don't do this, there is a risk they will be mutated while
+    // we iterate over them. For example, trying to recover a failed root
+    // may cause another root to be added to the failed list -- an infinite loop.
+    const failedRootsSnapshot = new Set(failedRoots)
+    const mountedRootsSnapshot = new Set(mountedRoots)
+    const helpersByRootSnapshot = new Map(helpersByRoot)
+
+    failedRootsSnapshot.forEach((root) => {
+      const helpers = helpersByRootSnapshot.get(root)
+      if (helpers === undefined) {
+        throw new Error(
+          'Could not find helpers for a root. This is a bug in React Refresh.',
+        )
+      }
+      if (!failedRoots.has(root)) {
+        // No longer failed.
+      }
+      if (rootElements === null) {
+        return
+      }
+      if (!rootElements.has(root)) {
+        return
+      }
+      const element = rootElements.get(root)
+      try {
+        helpers.scheduleRoot(root, element)
+      } catch (err) {
+        if (!didError) {
+          didError = true
+          firstError = err
+        }
+        // Keep trying other roots.
+      }
+    })
+    mountedRootsSnapshot.forEach((root) => {
+      const helpers = helpersByRootSnapshot.get(root)
+      if (helpers === undefined) {
+        throw new Error(
+          'Could not find helpers for a root. This is a bug in React Refresh.',
+        )
+      }
+      if (!mountedRoots.has(root)) {
+        // No longer mounted.
+      }
+      try {
+        helpers.scheduleRefresh(root, update)
+      } catch (err) {
+        if (!didError) {
+          didError = true
+          firstError = err
+        }
+        // Keep trying other roots.
+      }
+    })
+    if (didError) {
+      throw firstError
+    }
+    return update
+  } finally {
+    isPerformingRefresh = false
+  }
+}
+
+function register(type, id) {
+  if (type === null) {
+    return
+  }
+  if (typeof type !== 'function' && typeof type !== 'object') {
+    return
+  }
+
+  // This can happen in an edge case, e.g. if we register
+  // return value of a HOC but it returns a cached component.
+  // Ignore anything but the first registration for each type.
+  if (allFamiliesByType.has(type)) {
+    return
+  }
+  // Create family or remember to update it.
+  // None of this bookkeeping affects reconciliation
+  // until the first performReactRefresh() call above.
+  let family = allFamiliesByID.get(id)
+  if (family === undefined) {
+    family = { current: type }
+    allFamiliesByID.set(id, family)
+  } else {
+    pendingUpdates.push([family, type])
+  }
+  allFamiliesByType.set(type, family)
+
+  // Visit inner types because we might not have registered them.
+  if (typeof type === 'object' && type !== null) {
+    switch (getProperty(type, '$$typeof')) {
+      case REACT_FORWARD_REF_TYPE:
+        register(type.render, id + '$render')
+        break
+      case REACT_MEMO_TYPE:
+        register(type.type, id + '$type')
+        break
+    }
+  }
+}
+
+function setSignature(type, key, forceReset, getCustomHooks) {
+  if (!allSignaturesByType.has(type)) {
+    allSignaturesByType.set(type, {
+      forceReset,
+      ownKey: key,
+      fullKey: null,
+      getCustomHooks: getCustomHooks || (() => []),
+    })
+  }
+  // Visit inner types because we might not have signed them.
+  if (typeof type === 'object' && type !== null) {
+    switch (getProperty(type, '$$typeof')) {
+      case REACT_FORWARD_REF_TYPE:
+        setSignature(type.render, key, forceReset, getCustomHooks)
+        break
+      case REACT_MEMO_TYPE:
+        setSignature(type.type, key, forceReset, getCustomHooks)
+        break
+    }
+  }
+}
+
+// This is lazily called during first render for a type.
+// It captures Hook list at that time so inline requires don't break comparisons.
+function collectCustomHooksForSignature(type) {
+  const signature = allSignaturesByType.get(type)
+  if (signature !== undefined) {
+    computeFullKey(signature)
+  }
+}
+
+export function injectIntoGlobalHook(globalObject) {
+  // For React Native, the global hook will be set up by require('react-devtools-core').
+  // That code will run before us. So we need to monkeypatch functions on existing hook.
+
+  // For React Web, the global hook will be set up by the extension.
+  // This will also run before us.
+  let hook = globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__
+  if (hook === undefined) {
+    // However, if there is no DevTools extension, we'll need to set up the global hook ourselves.
+    // Note that in this case it's important that renderer code runs *after* this method call.
+    // Otherwise, the renderer will think that there is no global hook, and won't do the injection.
+    let nextID = 0
+    globalObject.__REACT_DEVTOOLS_GLOBAL_HOOK__ = hook = {
+      renderers: new Map(),
+      supportsFiber: true,
+      inject: (injected) => nextID++,
+      onScheduleFiberRoot: (id, root, children) => {},
+      onCommitFiberRoot: (id, root, maybePriorityLevel, didError) => {},
+      onCommitFiberUnmount() {},
+    }
+  }
+
+  if (hook.isDisabled) {
+    // This isn't a real property on the hook, but it can be set to opt out
+    // of DevTools integration and associated warnings and logs.
+    // Using console['warn'] to evade Babel and ESLint
+    console['warn'](
+      'Something has shimmed the React DevTools global hook (__REACT_DEVTOOLS_GLOBAL_HOOK__). ' +
+        'Fast Refresh is not compatible with this shim and will be disabled.',
+    )
+    return
+  }
+
+  // Here, we just want to get a reference to scheduleRefresh.
+  const oldInject = hook.inject
+  hook.inject = function (injected) {
+    const id = oldInject.apply(this, arguments)
+    if (
+      typeof injected.scheduleRefresh === 'function' &&
+      typeof injected.setRefreshHandler === 'function'
+    ) {
+      // This version supports React Refresh.
+      helpersByRendererID.set(id, injected)
+    }
+    return id
+  }
+
+  // Do the same for any already injected roots.
+  // This is useful if ReactDOM has already been initialized.
+  // https://github.com/facebook/react/issues/17626
+  hook.renderers.forEach((injected, id) => {
+    if (
+      typeof injected.scheduleRefresh === 'function' &&
+      typeof injected.setRefreshHandler === 'function'
+    ) {
+      // This version supports React Refresh.
+      helpersByRendererID.set(id, injected)
+    }
+  })
+
+  // We also want to track currently mounted roots.
+  const oldOnCommitFiberRoot = hook.onCommitFiberRoot
+  const oldOnScheduleFiberRoot = hook.onScheduleFiberRoot || (() => {})
+  hook.onScheduleFiberRoot = function (id, root, children) {
+    if (!isPerformingRefresh) {
+      // If it was intentionally scheduled, don't attempt to restore.
+      // This includes intentionally scheduled unmounts.
+      failedRoots.delete(root)
+      if (rootElements !== null) {
+        rootElements.set(root, children)
+      }
+    }
+    return oldOnScheduleFiberRoot.apply(this, arguments)
+  }
+  hook.onCommitFiberRoot = function (id, root, maybePriorityLevel, didError) {
+    const helpers = helpersByRendererID.get(id)
+    if (helpers !== undefined) {
+      helpersByRoot.set(root, helpers)
+
+      const current = root.current
+      const alternate = current.alternate
+
+      // We need to determine whether this root has just (un)mounted.
+      // This logic is copy-pasted from similar logic in the DevTools backend.
+      // If this breaks with some refactoring, you'll want to update DevTools too.
+
+      if (alternate !== null) {
+        const wasMounted =
+          alternate.memoizedState != null &&
+          alternate.memoizedState.element != null &&
+          mountedRoots.has(root)
+
+        const isMounted =
+          current.memoizedState != null && current.memoizedState.element != null
+
+        if (!wasMounted && isMounted) {
+          // Mount a new root.
+          mountedRoots.add(root)
+          failedRoots.delete(root)
+        } else if (wasMounted && isMounted) {
+          // Update an existing root.
+          // This doesn't affect our mounted root Set.
+        } else if (wasMounted && !isMounted) {
+          // Unmount an existing root.
+          mountedRoots.delete(root)
+          if (didError) {
+            // We'll remount it on future edits.
+            failedRoots.add(root)
+          } else {
+            helpersByRoot.delete(root)
+          }
+        } else if (!wasMounted && !isMounted) {
+          if (didError) {
+            // We'll remount it on future edits.
+            failedRoots.add(root)
+          }
+        }
+      } else {
+        // Mount a new root.
+        mountedRoots.add(root)
+      }
+    }
+
+    // Always call the decorated DevTools hook.
+    return oldOnCommitFiberRoot.apply(this, arguments)
+  }
+}
+
+// This is a wrapper over more primitive functions for setting signature.
+// Signatures let us decide whether the Hook order has changed on refresh.
+//
+// This function is intended to be used as a transform target, e.g.:
+// var _s = createSignatureFunctionForTransform()
+//
+// function Hello() {
+//   const [foo, setFoo] = useState(0);
+//   const value = useCustomHook();
+//   _s(); /* Call without arguments triggers collecting the custom Hook list.
+//          * This doesn't happen during the module evaluation because we
+//          * don't want to change the module order with inline requires.
+//          * Next calls are noops. */
+//   return <h1>Hi</h1>;
+// }
+//
+// /* Call with arguments attaches the signature to the type: */
+// _s(
+//   Hello,
+//   'useState{[foo, setFoo]}(0)',
+//   () => [useCustomHook], /* Lazy to avoid triggering inline requires */
+// );
+export function createSignatureFunctionForTransform() {
+  let savedType
+  let hasCustomHooks
+  let didCollectHooks = false
+  return function (type, key, forceReset, getCustomHooks) {
+    if (typeof key === 'string') {
+      // We're in the initial phase that associates signatures
+      // with the functions. Note this may be called multiple times
+      // in HOC chains like _s(hoc1(_s(hoc2(_s(actualFunction))))).
+      if (!savedType) {
+        // We're in the innermost call, so this is the actual type.
+        // $FlowFixMe[escaped-generic] discovered when updating Flow
+        savedType = type
+        hasCustomHooks = typeof getCustomHooks === 'function'
+      }
+      // Set the signature for all types (even wrappers!) in case
+      // they have no signatures of their own. This is to prevent
+      // problems like https://github.com/facebook/react/issues/20417.
+      if (
+        type != null &&
+        (typeof type === 'function' || typeof type === 'object')
+      ) {
+        setSignature(type, key, forceReset, getCustomHooks)
+      }
+      return type
+    } else {
+      // We're in the _s() call without arguments, which means
+      // this is the time to collect custom Hook signatures.
+      // Only do this once. This path is hot and runs *inside* every render!
+      if (!didCollectHooks && hasCustomHooks) {
+        didCollectHooks = true
+        collectCustomHooksForSignature(savedType)
+      }
+    }
+  }
+}
+
+function isLikelyComponentType(type) {
+  switch (typeof type) {
+    case 'function': {
+      // First, deal with classes.
+      if (type.prototype != null) {
+        if (type.prototype.isReactComponent) {
+          // React class.
+          return true
+        }
+        const ownNames = Object.getOwnPropertyNames(type.prototype)
+        if (ownNames.length > 1 || ownNames[0] !== 'constructor') {
+          // This looks like a class.
+          return false
+        }
+
+        if (type.prototype.__proto__ !== Object.prototype) {
+          // It has a superclass.
+          return false
+        }
+        // Pass through.
+        // This looks like a regular function with empty prototype.
+      }
+      // For plain functions and arrows, use name as a heuristic.
+      const name = type.name || type.displayName
+      return typeof name === 'string' && /^[A-Z]/.test(name)
+    }
+    case 'object': {
+      if (type != null) {
+        switch (getProperty(type, '$$typeof')) {
+          case REACT_FORWARD_REF_TYPE:
+          case REACT_MEMO_TYPE:
+            // Definitely React components.
+            return true
+          default:
+            return false
+        }
+      }
+      return false
+    }
+    default: {
+      return false
+    }
+  }
+}
+
+function isCompoundComponent(type) {
+  if (!isPlainObject(type)) return false
+  for (const key in type) {
+    if (!isLikelyComponentType(type[key])) return false
+  }
+  return true
+}
+
+function isPlainObject(obj) {
+  return (
+    Object.prototype.toString.call(obj) === '[object Object]' &&
+    (obj.constructor === Object || obj.constructor === undefined)
+  )
+}
+
+/**
+ * Plugin utils
+ */
+
+export function getRefreshReg(filename) {
+  return (type, id) => register(type, filename + ' ' + id)
+}
+
+// Taken from https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/lib/runtime/RefreshUtils.js#L141
+// This allows to resister components not detected by SWC like styled component
+export function registerExportsForReactRefresh(filename, moduleExports) {
+  for (const key in moduleExports) {
+    if (key === '__esModule') continue
+    const exportValue = moduleExports[key]
+    if (isLikelyComponentType(exportValue)) {
+      // 'export' is required to avoid key collision when renamed exports that
+      // shadow a local component name: https://github.com/vitejs/vite-plugin-react/issues/116
+      // The register function has an identity check to not register twice the same component,
+      // so this is safe to not used the same key here.
+      register(exportValue, filename + ' export ' + key)
+    } else if (isCompoundComponent(exportValue)) {
+      for (const subKey in exportValue) {
+        register(
+          exportValue[subKey],
+          filename + ' export ' + key + '-' + subKey,
+        )
+      }
+    }
+  }
+}
+
+function debounce(fn, delay) {
+  let handle
+  return () => {
+    clearTimeout(handle)
+    handle = setTimeout(fn, delay)
+  }
+}
+
+const hooks = []
+window.__registerBeforePerformReactRefresh = (cb) => {
+  hooks.push(cb)
+}
+const enqueueUpdate = debounce(async () => {
+  if (hooks.length) await Promise.all(hooks.map((cb) => cb()))
+  performReactRefresh()
+}, 16)
+
+export function validateRefreshBoundaryAndEnqueueUpdate(
+  id,
+  prevExports,
+  nextExports,
+) {
+  const ignoredExports = window.__getReactRefreshIgnoredExports?.({ id }) ?? []
+  if (
+    predicateOnExport(
+      ignoredExports,
+      prevExports,
+      (key) => key in nextExports,
+    ) !== true
+  ) {
+    return 'Could not Fast Refresh (export removed)'
+  }
+  if (
+    predicateOnExport(
+      ignoredExports,
+      nextExports,
+      (key) => key in prevExports,
+    ) !== true
+  ) {
+    return 'Could not Fast Refresh (new export)'
+  }
+
+  let hasExports = false
+  const allExportsAreComponentsOrUnchanged = predicateOnExport(
+    ignoredExports,
+    nextExports,
+    (key, value) => {
+      hasExports = true
+      if (isLikelyComponentType(value)) return true
+      if (isCompoundComponent(value)) return true
+      return prevExports[key] === nextExports[key]
+    },
+  )
+  if (hasExports && allExportsAreComponentsOrUnchanged === true) {
+    enqueueUpdate()
+  } else {
+    return `Could not Fast Refresh ("${allExportsAreComponentsOrUnchanged}" export is incompatible). Learn more at __README_URL__#consistent-components-exports`
+  }
+}
+
+function predicateOnExport(ignoredExports, moduleExports, predicate) {
+  for (const key in moduleExports) {
+    if (key === '__esModule') continue
+    if (ignoredExports.includes(key)) continue
+    const desc = Object.getOwnPropertyDescriptor(moduleExports, key)
+    if (desc && desc.get) return key
+    if (!predicate(key, moduleExports[key])) return key
+  }
+  return true
+}
+
+// Hides vite-ignored dynamic import so that Vite can skip analysis if no other
+// dynamic import is present (https://github.com/vitejs/vite/pull/12732)
+export const __hmr_import = (module) => import(/* @vite-ignore */ module)
+
+// For backwards compatibility with @vitejs/plugin-react.
+export default { injectIntoGlobalHook }

+ 4471 - 0
node_modules/axios/dist/axios.js

@@ -0,0 +1,4471 @@
+/*! Axios v1.13.2 Copyright (c) 2025 Matt Zabriskie and contributors */
+(function (global, factory) {
+  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
+  typeof define === 'function' && define.amd ? define(factory) :
+  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.axios = factory());
+})(this, (function () { 'use strict';
+
+  function _AsyncGenerator(e) {
+    var r, t;
+    function resume(r, t) {
+      try {
+        var n = e[r](t),
+          o = n.value,
+          u = o instanceof _OverloadYield;
+        Promise.resolve(u ? o.v : o).then(function (t) {
+          if (u) {
+            var i = "return" === r ? "return" : "next";
+            if (!o.k || t.done) return resume(i, t);
+            t = e[i](t).value;
+          }
+          settle(n.done ? "return" : "normal", t);
+        }, function (e) {
+          resume("throw", e);
+        });
+      } catch (e) {
+        settle("throw", e);
+      }
+    }
+    function settle(e, n) {
+      switch (e) {
+        case "return":
+          r.resolve({
+            value: n,
+            done: !0
+          });
+          break;
+        case "throw":
+          r.reject(n);
+          break;
+        default:
+          r.resolve({
+            value: n,
+            done: !1
+          });
+      }
+      (r = r.next) ? resume(r.key, r.arg) : t = null;
+    }
+    this._invoke = function (e, n) {
+      return new Promise(function (o, u) {
+        var i = {
+          key: e,
+          arg: n,
+          resolve: o,
+          reject: u,
+          next: null
+        };
+        t ? t = t.next = i : (r = t = i, resume(e, n));
+      });
+    }, "function" != typeof e.return && (this.return = void 0);
+  }
+  _AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () {
+    return this;
+  }, _AsyncGenerator.prototype.next = function (e) {
+    return this._invoke("next", e);
+  }, _AsyncGenerator.prototype.throw = function (e) {
+    return this._invoke("throw", e);
+  }, _AsyncGenerator.prototype.return = function (e) {
+    return this._invoke("return", e);
+  };
+  function _OverloadYield(t, e) {
+    this.v = t, this.k = e;
+  }
+  function _asyncGeneratorDelegate(t) {
+    var e = {},
+      n = !1;
+    function pump(e, r) {
+      return n = !0, r = new Promise(function (n) {
+        n(t[e](r));
+      }), {
+        done: !1,
+        value: new _OverloadYield(r, 1)
+      };
+    }
+    return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () {
+      return this;
+    }, e.next = function (t) {
+      return n ? (n = !1, t) : pump("next", t);
+    }, "function" == typeof t.throw && (e.throw = function (t) {
+      if (n) throw n = !1, t;
+      return pump("throw", t);
+    }), "function" == typeof t.return && (e.return = function (t) {
+      return n ? (n = !1, t) : pump("return", t);
+    }), e;
+  }
+  function _asyncIterator(r) {
+    var n,
+      t,
+      o,
+      e = 2;
+    for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) {
+      if (t && null != (n = r[t])) return n.call(r);
+      if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r));
+      t = "@@asyncIterator", o = "@@iterator";
+    }
+    throw new TypeError("Object is not async iterable");
+  }
+  function AsyncFromSyncIterator(r) {
+    function AsyncFromSyncIteratorContinuation(r) {
+      if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object."));
+      var n = r.done;
+      return Promise.resolve(r.value).then(function (r) {
+        return {
+          value: r,
+          done: n
+        };
+      });
+    }
+    return AsyncFromSyncIterator = function (r) {
+      this.s = r, this.n = r.next;
+    }, AsyncFromSyncIterator.prototype = {
+      s: null,
+      n: null,
+      next: function () {
+        return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
+      },
+      return: function (r) {
+        var n = this.s.return;
+        return void 0 === n ? Promise.resolve({
+          value: r,
+          done: !0
+        }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
+      },
+      throw: function (r) {
+        var n = this.s.return;
+        return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
+      }
+    }, new AsyncFromSyncIterator(r);
+  }
+  function _awaitAsyncGenerator(e) {
+    return new _OverloadYield(e, 0);
+  }
+  function _iterableToArrayLimit(r, l) {
+    var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
+    if (null != t) {
+      var e,
+        n,
+        i,
+        u,
+        a = [],
+        f = !0,
+        o = !1;
+      try {
+        if (i = (t = t.call(r)).next, 0 === l) {
+          if (Object(t) !== t) return;
+          f = !1;
+        } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
+      } catch (r) {
+        o = !0, n = r;
+      } finally {
+        try {
+          if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
+        } finally {
+          if (o) throw n;
+        }
+      }
+      return a;
+    }
+  }
+  function ownKeys(e, r) {
+    var t = Object.keys(e);
+    if (Object.getOwnPropertySymbols) {
+      var o = Object.getOwnPropertySymbols(e);
+      r && (o = o.filter(function (r) {
+        return Object.getOwnPropertyDescriptor(e, r).enumerable;
+      })), t.push.apply(t, o);
+    }
+    return t;
+  }
+  function _objectSpread2(e) {
+    for (var r = 1; r < arguments.length; r++) {
+      var t = null != arguments[r] ? arguments[r] : {};
+      r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
+        _defineProperty(e, r, t[r]);
+      }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
+        Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
+      });
+    }
+    return e;
+  }
+  function _regeneratorRuntime() {
+    _regeneratorRuntime = function () {
+      return e;
+    };
+    var t,
+      e = {},
+      r = Object.prototype,
+      n = r.hasOwnProperty,
+      o = Object.defineProperty || function (t, e, r) {
+        t[e] = r.value;
+      },
+      i = "function" == typeof Symbol ? Symbol : {},
+      a = i.iterator || "@@iterator",
+      c = i.asyncIterator || "@@asyncIterator",
+      u = i.toStringTag || "@@toStringTag";
+    function define(t, e, r) {
+      return Object.defineProperty(t, e, {
+        value: r,
+        enumerable: !0,
+        configurable: !0,
+        writable: !0
+      }), t[e];
+    }
+    try {
+      define({}, "");
+    } catch (t) {
+      define = function (t, e, r) {
+        return t[e] = r;
+      };
+    }
+    function wrap(t, e, r, n) {
+      var i = e && e.prototype instanceof Generator ? e : Generator,
+        a = Object.create(i.prototype),
+        c = new Context(n || []);
+      return o(a, "_invoke", {
+        value: makeInvokeMethod(t, r, c)
+      }), a;
+    }
+    function tryCatch(t, e, r) {
+      try {
+        return {
+          type: "normal",
+          arg: t.call(e, r)
+        };
+      } catch (t) {
+        return {
+          type: "throw",
+          arg: t
+        };
+      }
+    }
+    e.wrap = wrap;
+    var h = "suspendedStart",
+      l = "suspendedYield",
+      f = "executing",
+      s = "completed",
+      y = {};
+    function Generator() {}
+    function GeneratorFunction() {}
+    function GeneratorFunctionPrototype() {}
+    var p = {};
+    define(p, a, function () {
+      return this;
+    });
+    var d = Object.getPrototypeOf,
+      v = d && d(d(values([])));
+    v && v !== r && n.call(v, a) && (p = v);
+    var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
+    function defineIteratorMethods(t) {
+      ["next", "throw", "return"].forEach(function (e) {
+        define(t, e, function (t) {
+          return this._invoke(e, t);
+        });
+      });
+    }
+    function AsyncIterator(t, e) {
+      function invoke(r, o, i, a) {
+        var c = tryCatch(t[r], t, o);
+        if ("throw" !== c.type) {
+          var u = c.arg,
+            h = u.value;
+          return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
+            invoke("next", t, i, a);
+          }, function (t) {
+            invoke("throw", t, i, a);
+          }) : e.resolve(h).then(function (t) {
+            u.value = t, i(u);
+          }, function (t) {
+            return invoke("throw", t, i, a);
+          });
+        }
+        a(c.arg);
+      }
+      var r;
+      o(this, "_invoke", {
+        value: function (t, n) {
+          function callInvokeWithMethodAndArg() {
+            return new e(function (e, r) {
+              invoke(t, n, e, r);
+            });
+          }
+          return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
+        }
+      });
+    }
+    function makeInvokeMethod(e, r, n) {
+      var o = h;
+      return function (i, a) {
+        if (o === f) throw new Error("Generator is already running");
+        if (o === s) {
+          if ("throw" === i) throw a;
+          return {
+            value: t,
+            done: !0
+          };
+        }
+        for (n.method = i, n.arg = a;;) {
+          var c = n.delegate;
+          if (c) {
+            var u = maybeInvokeDelegate(c, n);
+            if (u) {
+              if (u === y) continue;
+              return u;
+            }
+          }
+          if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
+            if (o === h) throw o = s, n.arg;
+            n.dispatchException(n.arg);
+          } else "return" === n.method && n.abrupt("return", n.arg);
+          o = f;
+          var p = tryCatch(e, r, n);
+          if ("normal" === p.type) {
+            if (o = n.done ? s : l, p.arg === y) continue;
+            return {
+              value: p.arg,
+              done: n.done
+            };
+          }
+          "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
+        }
+      };
+    }
+    function maybeInvokeDelegate(e, r) {
+      var n = r.method,
+        o = e.iterator[n];
+      if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
+      var i = tryCatch(o, e.iterator, r.arg);
+      if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
+      var a = i.arg;
+      return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
+    }
+    function pushTryEntry(t) {
+      var e = {
+        tryLoc: t[0]
+      };
+      1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
+    }
+    function resetTryEntry(t) {
+      var e = t.completion || {};
+      e.type = "normal", delete e.arg, t.completion = e;
+    }
+    function Context(t) {
+      this.tryEntries = [{
+        tryLoc: "root"
+      }], t.forEach(pushTryEntry, this), this.reset(!0);
+    }
+    function values(e) {
+      if (e || "" === e) {
+        var r = e[a];
+        if (r) return r.call(e);
+        if ("function" == typeof e.next) return e;
+        if (!isNaN(e.length)) {
+          var o = -1,
+            i = function next() {
+              for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
+              return next.value = t, next.done = !0, next;
+            };
+          return i.next = i;
+        }
+      }
+      throw new TypeError(typeof e + " is not iterable");
+    }
+    return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
+      value: GeneratorFunctionPrototype,
+      configurable: !0
+    }), o(GeneratorFunctionPrototype, "constructor", {
+      value: GeneratorFunction,
+      configurable: !0
+    }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
+      var e = "function" == typeof t && t.constructor;
+      return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
+    }, e.mark = function (t) {
+      return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
+    }, e.awrap = function (t) {
+      return {
+        __await: t
+      };
+    }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
+      return this;
+    }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
+      void 0 === i && (i = Promise);
+      var a = new AsyncIterator(wrap(t, r, n, o), i);
+      return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
+        return t.done ? t.value : a.next();
+      });
+    }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
+      return this;
+    }), define(g, "toString", function () {
+      return "[object Generator]";
+    }), e.keys = function (t) {
+      var e = Object(t),
+        r = [];
+      for (var n in e) r.push(n);
+      return r.reverse(), function next() {
+        for (; r.length;) {
+          var t = r.pop();
+          if (t in e) return next.value = t, next.done = !1, next;
+        }
+        return next.done = !0, next;
+      };
+    }, e.values = values, Context.prototype = {
+      constructor: Context,
+      reset: function (e) {
+        if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
+      },
+      stop: function () {
+        this.done = !0;
+        var t = this.tryEntries[0].completion;
+        if ("throw" === t.type) throw t.arg;
+        return this.rval;
+      },
+      dispatchException: function (e) {
+        if (this.done) throw e;
+        var r = this;
+        function handle(n, o) {
+          return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
+        }
+        for (var o = this.tryEntries.length - 1; o >= 0; --o) {
+          var i = this.tryEntries[o],
+            a = i.completion;
+          if ("root" === i.tryLoc) return handle("end");
+          if (i.tryLoc <= this.prev) {
+            var c = n.call(i, "catchLoc"),
+              u = n.call(i, "finallyLoc");
+            if (c && u) {
+              if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
+              if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
+            } else if (c) {
+              if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
+            } else {
+              if (!u) throw new Error("try statement without catch or finally");
+              if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
+            }
+          }
+        }
+      },
+      abrupt: function (t, e) {
+        for (var r = this.tryEntries.length - 1; r >= 0; --r) {
+          var o = this.tryEntries[r];
+          if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
+            var i = o;
+            break;
+          }
+        }
+        i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
+        var a = i ? i.completion : {};
+        return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
+      },
+      complete: function (t, e) {
+        if ("throw" === t.type) throw t.arg;
+        return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
+      },
+      finish: function (t) {
+        for (var e = this.tryEntries.length - 1; e >= 0; --e) {
+          var r = this.tryEntries[e];
+          if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
+        }
+      },
+      catch: function (t) {
+        for (var e = this.tryEntries.length - 1; e >= 0; --e) {
+          var r = this.tryEntries[e];
+          if (r.tryLoc === t) {
+            var n = r.completion;
+            if ("throw" === n.type) {
+              var o = n.arg;
+              resetTryEntry(r);
+            }
+            return o;
+          }
+        }
+        throw new Error("illegal catch attempt");
+      },
+      delegateYield: function (e, r, n) {
+        return this.delegate = {
+          iterator: values(e),
+          resultName: r,
+          nextLoc: n
+        }, "next" === this.method && (this.arg = t), y;
+      }
+    }, e;
+  }
+  function _toPrimitive(t, r) {
+    if ("object" != typeof t || !t) return t;
+    var e = t[Symbol.toPrimitive];
+    if (void 0 !== e) {
+      var i = e.call(t, r || "default");
+      if ("object" != typeof i) return i;
+      throw new TypeError("@@toPrimitive must return a primitive value.");
+    }
+    return ("string" === r ? String : Number)(t);
+  }
+  function _toPropertyKey(t) {
+    var i = _toPrimitive(t, "string");
+    return "symbol" == typeof i ? i : String(i);
+  }
+  function _typeof(o) {
+    "@babel/helpers - typeof";
+
+    return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
+      return typeof o;
+    } : function (o) {
+      return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
+    }, _typeof(o);
+  }
+  function _wrapAsyncGenerator(fn) {
+    return function () {
+      return new _AsyncGenerator(fn.apply(this, arguments));
+    };
+  }
+  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
+    try {
+      var info = gen[key](arg);
+      var value = info.value;
+    } catch (error) {
+      reject(error);
+      return;
+    }
+    if (info.done) {
+      resolve(value);
+    } else {
+      Promise.resolve(value).then(_next, _throw);
+    }
+  }
+  function _asyncToGenerator(fn) {
+    return function () {
+      var self = this,
+        args = arguments;
+      return new Promise(function (resolve, reject) {
+        var gen = fn.apply(self, args);
+        function _next(value) {
+          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
+        }
+        function _throw(err) {
+          asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
+        }
+        _next(undefined);
+      });
+    };
+  }
+  function _classCallCheck(instance, Constructor) {
+    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++) {
+      var descriptor = props[i];
+      descriptor.enumerable = descriptor.enumerable || false;
+      descriptor.configurable = true;
+      if ("value" in descriptor) descriptor.writable = true;
+      Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
+    }
+  }
+  function _createClass(Constructor, protoProps, staticProps) {
+    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
+    if (staticProps) _defineProperties(Constructor, staticProps);
+    Object.defineProperty(Constructor, "prototype", {
+      writable: false
+    });
+    return Constructor;
+  }
+  function _defineProperty(obj, key, value) {
+    key = _toPropertyKey(key);
+    if (key in obj) {
+      Object.defineProperty(obj, key, {
+        value: value,
+        enumerable: true,
+        configurable: true,
+        writable: true
+      });
+    } else {
+      obj[key] = value;
+    }
+    return obj;
+  }
+  function _slicedToArray(arr, i) {
+    return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
+  }
+  function _toConsumableArray(arr) {
+    return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
+  }
+  function _arrayWithoutHoles(arr) {
+    if (Array.isArray(arr)) return _arrayLikeToArray(arr);
+  }
+  function _arrayWithHoles(arr) {
+    if (Array.isArray(arr)) return arr;
+  }
+  function _iterableToArray(iter) {
+    if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
+  }
+  function _unsupportedIterableToArray(o, minLen) {
+    if (!o) return;
+    if (typeof o === "string") return _arrayLikeToArray(o, minLen);
+    var n = Object.prototype.toString.call(o).slice(8, -1);
+    if (n === "Object" && o.constructor) n = o.constructor.name;
+    if (n === "Map" || n === "Set") return Array.from(o);
+    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
+  }
+  function _arrayLikeToArray(arr, len) {
+    if (len == null || len > arr.length) len = arr.length;
+    for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
+    return arr2;
+  }
+  function _nonIterableSpread() {
+    throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+  }
+  function _nonIterableRest() {
+    throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+  }
+  function _createForOfIteratorHelper(o, allowArrayLike) {
+    var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
+    if (!it) {
+      if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
+        if (it) o = it;
+        var i = 0;
+        var F = function () {};
+        return {
+          s: F,
+          n: function () {
+            if (i >= o.length) return {
+              done: true
+            };
+            return {
+              done: false,
+              value: o[i++]
+            };
+          },
+          e: function (e) {
+            throw e;
+          },
+          f: F
+        };
+      }
+      throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
+    }
+    var normalCompletion = true,
+      didErr = false,
+      err;
+    return {
+      s: function () {
+        it = it.call(o);
+      },
+      n: function () {
+        var step = it.next();
+        normalCompletion = step.done;
+        return step;
+      },
+      e: function (e) {
+        didErr = true;
+        err = e;
+      },
+      f: function () {
+        try {
+          if (!normalCompletion && it.return != null) it.return();
+        } finally {
+          if (didErr) throw err;
+        }
+      }
+    };
+  }
+
+  /**
+   * Create a bound version of a function with a specified `this` context
+   *
+   * @param {Function} fn - The function to bind
+   * @param {*} thisArg - The value to be passed as the `this` parameter
+   * @returns {Function} A new function that will call the original function with the specified `this` context
+   */
+  function bind(fn, thisArg) {
+    return function wrap() {
+      return fn.apply(thisArg, arguments);
+    };
+  }
+
+  // utils is a library of generic helper functions non-specific to axios
+
+  var toString = Object.prototype.toString;
+  var getPrototypeOf = Object.getPrototypeOf;
+  var iterator = Symbol.iterator,
+    toStringTag = Symbol.toStringTag;
+  var kindOf = function (cache) {
+    return function (thing) {
+      var str = toString.call(thing);
+      return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
+    };
+  }(Object.create(null));
+  var kindOfTest = function kindOfTest(type) {
+    type = type.toLowerCase();
+    return function (thing) {
+      return kindOf(thing) === type;
+    };
+  };
+  var typeOfTest = function typeOfTest(type) {
+    return function (thing) {
+      return _typeof(thing) === type;
+    };
+  };
+
+  /**
+   * Determine if a value is an Array
+   *
+   * @param {Object} val The value to test
+   *
+   * @returns {boolean} True if value is an Array, otherwise false
+   */
+  var isArray = Array.isArray;
+
+  /**
+   * Determine if a value is undefined
+   *
+   * @param {*} val The value to test
+   *
+   * @returns {boolean} True if the value is undefined, otherwise false
+   */
+  var isUndefined = typeOfTest('undefined');
+
+  /**
+   * Determine if a value is a Buffer
+   *
+   * @param {*} val The value to test
+   *
+   * @returns {boolean} True if value is a Buffer, otherwise false
+   */
+  function isBuffer(val) {
+    return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
+  }
+
+  /**
+   * Determine if a value is an ArrayBuffer
+   *
+   * @param {*} val The value to test
+   *
+   * @returns {boolean} True if value is an ArrayBuffer, otherwise false
+   */
+  var isArrayBuffer = kindOfTest('ArrayBuffer');
+
+  /**
+   * Determine if a value is a view on an ArrayBuffer
+   *
+   * @param {*} val The value to test
+   *
+   * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
+   */
+  function isArrayBufferView(val) {
+    var result;
+    if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
+      result = ArrayBuffer.isView(val);
+    } else {
+      result = val && val.buffer && isArrayBuffer(val.buffer);
+    }
+    return result;
+  }
+
+  /**
+   * Determine if a value is a String
+   *
+   * @param {*} val The value to test
+   *
+   * @returns {boolean} True if value is a String, otherwise false
+   */
+  var isString = typeOfTest('string');
+
+  /**
+   * Determine if a value is a Function
+   *
+   * @param {*} val The value to test
+   * @returns {boolean} True if value is a Function, otherwise false
+   */
+  var isFunction$1 = typeOfTest('function');
+
+  /**
+   * Determine if a value is a Number
+   *
+   * @param {*} val The value to test
+   *
+   * @returns {boolean} True if value is a Number, otherwise false
+   */
+  var isNumber = typeOfTest('number');
+
+  /**
+   * Determine if a value is an Object
+   *
+   * @param {*} thing The value to test
+   *
+   * @returns {boolean} True if value is an Object, otherwise false
+   */
+  var isObject = function isObject(thing) {
+    return thing !== null && _typeof(thing) === 'object';
+  };
+
+  /**
+   * Determine if a value is a Boolean
+   *
+   * @param {*} thing The value to test
+   * @returns {boolean} True if value is a Boolean, otherwise false
+   */
+  var isBoolean = function isBoolean(thing) {
+    return thing === true || thing === false;
+  };
+
+  /**
+   * Determine if a value is a plain Object
+   *
+   * @param {*} val The value to test
+   *
+   * @returns {boolean} True if value is a plain Object, otherwise false
+   */
+  var isPlainObject = function isPlainObject(val) {
+    if (kindOf(val) !== 'object') {
+      return false;
+    }
+    var prototype = getPrototypeOf(val);
+    return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
+  };
+
+  /**
+   * Determine if a value is an empty object (safely handles Buffers)
+   *
+   * @param {*} val The value to test
+   *
+   * @returns {boolean} True if value is an empty object, otherwise false
+   */
+  var isEmptyObject = function isEmptyObject(val) {
+    // Early return for non-objects or Buffers to prevent RangeError
+    if (!isObject(val) || isBuffer(val)) {
+      return false;
+    }
+    try {
+      return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
+    } catch (e) {
+      // Fallback for any other objects that might cause RangeError with Object.keys()
+      return false;
+    }
+  };
+
+  /**
+   * Determine if a value is a Date
+   *
+   * @param {*} val The value to test
+   *
+   * @returns {boolean} True if value is a Date, otherwise false
+   */
+  var isDate = kindOfTest('Date');
+
+  /**
+   * Determine if a value is a File
+   *
+   * @param {*} val The value to test
+   *
+   * @returns {boolean} True if value is a File, otherwise false
+   */
+  var isFile = kindOfTest('File');
+
+  /**
+   * Determine if a value is a Blob
+   *
+   * @param {*} val The value to test
+   *
+   * @returns {boolean} True if value is a Blob, otherwise false
+   */
+  var isBlob = kindOfTest('Blob');
+
+  /**
+   * Determine if a value is a FileList
+   *
+   * @param {*} val The value to test
+   *
+   * @returns {boolean} True if value is a File, otherwise false
+   */
+  var isFileList = kindOfTest('FileList');
+
+  /**
+   * Determine if a value is a Stream
+   *
+   * @param {*} val The value to test
+   *
+   * @returns {boolean} True if value is a Stream, otherwise false
+   */
+  var isStream = function isStream(val) {
+    return isObject(val) && isFunction$1(val.pipe);
+  };
+
+  /**
+   * Determine if a value is a FormData
+   *
+   * @param {*} thing The value to test
+   *
+   * @returns {boolean} True if value is an FormData, otherwise false
+   */
+  var isFormData = function isFormData(thing) {
+    var kind;
+    return thing && (typeof FormData === 'function' && thing instanceof FormData || isFunction$1(thing.append) && ((kind = kindOf(thing)) === 'formdata' ||
+    // detect form-data instance
+    kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]'));
+  };
+
+  /**
+   * Determine if a value is a URLSearchParams object
+   *
+   * @param {*} val The value to test
+   *
+   * @returns {boolean} True if value is a URLSearchParams object, otherwise false
+   */
+  var isURLSearchParams = kindOfTest('URLSearchParams');
+  var _map = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest),
+    _map2 = _slicedToArray(_map, 4),
+    isReadableStream = _map2[0],
+    isRequest = _map2[1],
+    isResponse = _map2[2],
+    isHeaders = _map2[3];
+
+  /**
+   * Trim excess whitespace off the beginning and end of a string
+   *
+   * @param {String} str The String to trim
+   *
+   * @returns {String} The String freed of excess whitespace
+   */
+  var trim = function trim(str) {
+    return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
+  };
+
+  /**
+   * Iterate over an Array or an Object invoking a function for each item.
+   *
+   * If `obj` is an Array callback will be called passing
+   * the value, index, and complete array for each item.
+   *
+   * If 'obj' is an Object callback will be called passing
+   * the value, key, and complete object for each property.
+   *
+   * @param {Object|Array} obj The object to iterate
+   * @param {Function} fn The callback to invoke for each item
+   *
+   * @param {Boolean} [allOwnKeys = false]
+   * @returns {any}
+   */
+  function forEach(obj, fn) {
+    var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
+      _ref$allOwnKeys = _ref.allOwnKeys,
+      allOwnKeys = _ref$allOwnKeys === void 0 ? false : _ref$allOwnKeys;
+    // Don't bother if no value provided
+    if (obj === null || typeof obj === 'undefined') {
+      return;
+    }
+    var i;
+    var l;
+
+    // Force an array if not already something iterable
+    if (_typeof(obj) !== 'object') {
+      /*eslint no-param-reassign:0*/
+      obj = [obj];
+    }
+    if (isArray(obj)) {
+      // Iterate over array values
+      for (i = 0, l = obj.length; i < l; i++) {
+        fn.call(null, obj[i], i, obj);
+      }
+    } else {
+      // Buffer check
+      if (isBuffer(obj)) {
+        return;
+      }
+
+      // Iterate over object keys
+      var keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
+      var len = keys.length;
+      var key;
+      for (i = 0; i < len; i++) {
+        key = keys[i];
+        fn.call(null, obj[key], key, obj);
+      }
+    }
+  }
+  function findKey(obj, key) {
+    if (isBuffer(obj)) {
+      return null;
+    }
+    key = key.toLowerCase();
+    var keys = Object.keys(obj);
+    var i = keys.length;
+    var _key;
+    while (i-- > 0) {
+      _key = keys[i];
+      if (key === _key.toLowerCase()) {
+        return _key;
+      }
+    }
+    return null;
+  }
+  var _global = function () {
+    /*eslint no-undef:0*/
+    if (typeof globalThis !== "undefined") return globalThis;
+    return typeof self !== "undefined" ? self : typeof window !== 'undefined' ? window : global;
+  }();
+  var isContextDefined = function isContextDefined(context) {
+    return !isUndefined(context) && context !== _global;
+  };
+
+  /**
+   * Accepts varargs expecting each argument to be an object, then
+   * immutably merges the properties of each object and returns result.
+   *
+   * When multiple objects contain the same key the later object in
+   * the arguments list will take precedence.
+   *
+   * Example:
+   *
+   * ```js
+   * var result = merge({foo: 123}, {foo: 456});
+   * console.log(result.foo); // outputs 456
+   * ```
+   *
+   * @param {Object} obj1 Object to merge
+   *
+   * @returns {Object} Result of all merge properties
+   */
+  function merge( /* obj1, obj2, obj3, ... */
+  ) {
+    var _ref2 = isContextDefined(this) && this || {},
+      caseless = _ref2.caseless,
+      skipUndefined = _ref2.skipUndefined;
+    var result = {};
+    var assignValue = function assignValue(val, key) {
+      var targetKey = caseless && findKey(result, key) || key;
+      if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
+        result[targetKey] = merge(result[targetKey], val);
+      } else if (isPlainObject(val)) {
+        result[targetKey] = merge({}, val);
+      } else if (isArray(val)) {
+        result[targetKey] = val.slice();
+      } else if (!skipUndefined || !isUndefined(val)) {
+        result[targetKey] = val;
+      }
+    };
+    for (var i = 0, l = arguments.length; i < l; i++) {
+      arguments[i] && forEach(arguments[i], assignValue);
+    }
+    return result;
+  }
+
+  /**
+   * Extends object a by mutably adding to it the properties of object b.
+   *
+   * @param {Object} a The object to be extended
+   * @param {Object} b The object to copy properties from
+   * @param {Object} thisArg The object to bind function to
+   *
+   * @param {Boolean} [allOwnKeys]
+   * @returns {Object} The resulting value of object a
+   */
+  var extend = function extend(a, b, thisArg) {
+    var _ref3 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
+      allOwnKeys = _ref3.allOwnKeys;
+    forEach(b, function (val, key) {
+      if (thisArg && isFunction$1(val)) {
+        a[key] = bind(val, thisArg);
+      } else {
+        a[key] = val;
+      }
+    }, {
+      allOwnKeys: allOwnKeys
+    });
+    return a;
+  };
+
+  /**
+   * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
+   *
+   * @param {string} content with BOM
+   *
+   * @returns {string} content value without BOM
+   */
+  var stripBOM = function stripBOM(content) {
+    if (content.charCodeAt(0) === 0xFEFF) {
+      content = content.slice(1);
+    }
+    return content;
+  };
+
+  /**
+   * Inherit the prototype methods from one constructor into another
+   * @param {function} constructor
+   * @param {function} superConstructor
+   * @param {object} [props]
+   * @param {object} [descriptors]
+   *
+   * @returns {void}
+   */
+  var inherits = function inherits(constructor, superConstructor, props, descriptors) {
+    constructor.prototype = Object.create(superConstructor.prototype, descriptors);
+    constructor.prototype.constructor = constructor;
+    Object.defineProperty(constructor, 'super', {
+      value: superConstructor.prototype
+    });
+    props && Object.assign(constructor.prototype, props);
+  };
+
+  /**
+   * Resolve object with deep prototype chain to a flat object
+   * @param {Object} sourceObj source object
+   * @param {Object} [destObj]
+   * @param {Function|Boolean} [filter]
+   * @param {Function} [propFilter]
+   *
+   * @returns {Object}
+   */
+  var toFlatObject = function toFlatObject(sourceObj, destObj, filter, propFilter) {
+    var props;
+    var i;
+    var prop;
+    var merged = {};
+    destObj = destObj || {};
+    // eslint-disable-next-line no-eq-null,eqeqeq
+    if (sourceObj == null) return destObj;
+    do {
+      props = Object.getOwnPropertyNames(sourceObj);
+      i = props.length;
+      while (i-- > 0) {
+        prop = props[i];
+        if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
+          destObj[prop] = sourceObj[prop];
+          merged[prop] = true;
+        }
+      }
+      sourceObj = filter !== false && getPrototypeOf(sourceObj);
+    } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
+    return destObj;
+  };
+
+  /**
+   * Determines whether a string ends with the characters of a specified string
+   *
+   * @param {String} str
+   * @param {String} searchString
+   * @param {Number} [position= 0]
+   *
+   * @returns {boolean}
+   */
+  var endsWith = function endsWith(str, searchString, position) {
+    str = String(str);
+    if (position === undefined || position > str.length) {
+      position = str.length;
+    }
+    position -= searchString.length;
+    var lastIndex = str.indexOf(searchString, position);
+    return lastIndex !== -1 && lastIndex === position;
+  };
+
+  /**
+   * Returns new array from array like object or null if failed
+   *
+   * @param {*} [thing]
+   *
+   * @returns {?Array}
+   */
+  var toArray = function toArray(thing) {
+    if (!thing) return null;
+    if (isArray(thing)) return thing;
+    var i = thing.length;
+    if (!isNumber(i)) return null;
+    var arr = new Array(i);
+    while (i-- > 0) {
+      arr[i] = thing[i];
+    }
+    return arr;
+  };
+
+  /**
+   * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
+   * thing passed in is an instance of Uint8Array
+   *
+   * @param {TypedArray}
+   *
+   * @returns {Array}
+   */
+  // eslint-disable-next-line func-names
+  var isTypedArray = function (TypedArray) {
+    // eslint-disable-next-line func-names
+    return function (thing) {
+      return TypedArray && thing instanceof TypedArray;
+    };
+  }(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
+
+  /**
+   * For each entry in the object, call the function with the key and value.
+   *
+   * @param {Object<any, any>} obj - The object to iterate over.
+   * @param {Function} fn - The function to call for each entry.
+   *
+   * @returns {void}
+   */
+  var forEachEntry = function forEachEntry(obj, fn) {
+    var generator = obj && obj[iterator];
+    var _iterator = generator.call(obj);
+    var result;
+    while ((result = _iterator.next()) && !result.done) {
+      var pair = result.value;
+      fn.call(obj, pair[0], pair[1]);
+    }
+  };
+
+  /**
+   * It takes a regular expression and a string, and returns an array of all the matches
+   *
+   * @param {string} regExp - The regular expression to match against.
+   * @param {string} str - The string to search.
+   *
+   * @returns {Array<boolean>}
+   */
+  var matchAll = function matchAll(regExp, str) {
+    var matches;
+    var arr = [];
+    while ((matches = regExp.exec(str)) !== null) {
+      arr.push(matches);
+    }
+    return arr;
+  };
+
+  /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
+  var isHTMLForm = kindOfTest('HTMLFormElement');
+  var toCamelCase = function toCamelCase(str) {
+    return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
+      return p1.toUpperCase() + p2;
+    });
+  };
+
+  /* Creating a function that will check if an object has a property. */
+  var hasOwnProperty = function (_ref4) {
+    var hasOwnProperty = _ref4.hasOwnProperty;
+    return function (obj, prop) {
+      return hasOwnProperty.call(obj, prop);
+    };
+  }(Object.prototype);
+
+  /**
+   * Determine if a value is a RegExp object
+   *
+   * @param {*} val The value to test
+   *
+   * @returns {boolean} True if value is a RegExp object, otherwise false
+   */
+  var isRegExp = kindOfTest('RegExp');
+  var reduceDescriptors = function reduceDescriptors(obj, reducer) {
+    var descriptors = Object.getOwnPropertyDescriptors(obj);
+    var reducedDescriptors = {};
+    forEach(descriptors, function (descriptor, name) {
+      var ret;
+      if ((ret = reducer(descriptor, name, obj)) !== false) {
+        reducedDescriptors[name] = ret || descriptor;
+      }
+    });
+    Object.defineProperties(obj, reducedDescriptors);
+  };
+
+  /**
+   * Makes all methods read-only
+   * @param {Object} obj
+   */
+
+  var freezeMethods = function freezeMethods(obj) {
+    reduceDescriptors(obj, function (descriptor, name) {
+      // skip restricted props in strict mode
+      if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
+        return false;
+      }
+      var value = obj[name];
+      if (!isFunction$1(value)) return;
+      descriptor.enumerable = false;
+      if ('writable' in descriptor) {
+        descriptor.writable = false;
+        return;
+      }
+      if (!descriptor.set) {
+        descriptor.set = function () {
+          throw Error('Can not rewrite read-only method \'' + name + '\'');
+        };
+      }
+    });
+  };
+  var toObjectSet = function toObjectSet(arrayOrString, delimiter) {
+    var obj = {};
+    var define = function define(arr) {
+      arr.forEach(function (value) {
+        obj[value] = true;
+      });
+    };
+    isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
+    return obj;
+  };
+  var noop = function noop() {};
+  var toFiniteNumber = function toFiniteNumber(value, defaultValue) {
+    return value != null && Number.isFinite(value = +value) ? value : defaultValue;
+  };
+
+  /**
+   * If the thing is a FormData object, return true, otherwise return false.
+   *
+   * @param {unknown} thing - The thing to check.
+   *
+   * @returns {boolean}
+   */
+  function isSpecCompliantForm(thing) {
+    return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
+  }
+  var toJSONObject = function toJSONObject(obj) {
+    var stack = new Array(10);
+    var visit = function visit(source, i) {
+      if (isObject(source)) {
+        if (stack.indexOf(source) >= 0) {
+          return;
+        }
+
+        //Buffer check
+        if (isBuffer(source)) {
+          return source;
+        }
+        if (!('toJSON' in source)) {
+          stack[i] = source;
+          var target = isArray(source) ? [] : {};
+          forEach(source, function (value, key) {
+            var reducedValue = visit(value, i + 1);
+            !isUndefined(reducedValue) && (target[key] = reducedValue);
+          });
+          stack[i] = undefined;
+          return target;
+        }
+      }
+      return source;
+    };
+    return visit(obj, 0);
+  };
+  var isAsyncFn = kindOfTest('AsyncFunction');
+  var isThenable = function isThenable(thing) {
+    return thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing["catch"]);
+  };
+
+  // original code
+  // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
+
+  var _setImmediate = function (setImmediateSupported, postMessageSupported) {
+    if (setImmediateSupported) {
+      return setImmediate;
+    }
+    return postMessageSupported ? function (token, callbacks) {
+      _global.addEventListener("message", function (_ref5) {
+        var source = _ref5.source,
+          data = _ref5.data;
+        if (source === _global && data === token) {
+          callbacks.length && callbacks.shift()();
+        }
+      }, false);
+      return function (cb) {
+        callbacks.push(cb);
+        _global.postMessage(token, "*");
+      };
+    }("axios@".concat(Math.random()), []) : function (cb) {
+      return setTimeout(cb);
+    };
+  }(typeof setImmediate === 'function', isFunction$1(_global.postMessage));
+  var asap = typeof queueMicrotask !== 'undefined' ? queueMicrotask.bind(_global) : typeof process !== 'undefined' && process.nextTick || _setImmediate;
+
+  // *********************
+
+  var isIterable = function isIterable(thing) {
+    return thing != null && isFunction$1(thing[iterator]);
+  };
+  var utils$1 = {
+    isArray: isArray,
+    isArrayBuffer: isArrayBuffer,
+    isBuffer: isBuffer,
+    isFormData: isFormData,
+    isArrayBufferView: isArrayBufferView,
+    isString: isString,
+    isNumber: isNumber,
+    isBoolean: isBoolean,
+    isObject: isObject,
+    isPlainObject: isPlainObject,
+    isEmptyObject: isEmptyObject,
+    isReadableStream: isReadableStream,
+    isRequest: isRequest,
+    isResponse: isResponse,
+    isHeaders: isHeaders,
+    isUndefined: isUndefined,
+    isDate: isDate,
+    isFile: isFile,
+    isBlob: isBlob,
+    isRegExp: isRegExp,
+    isFunction: isFunction$1,
+    isStream: isStream,
+    isURLSearchParams: isURLSearchParams,
+    isTypedArray: isTypedArray,
+    isFileList: isFileList,
+    forEach: forEach,
+    merge: merge,
+    extend: extend,
+    trim: trim,
+    stripBOM: stripBOM,
+    inherits: inherits,
+    toFlatObject: toFlatObject,
+    kindOf: kindOf,
+    kindOfTest: kindOfTest,
+    endsWith: endsWith,
+    toArray: toArray,
+    forEachEntry: forEachEntry,
+    matchAll: matchAll,
+    isHTMLForm: isHTMLForm,
+    hasOwnProperty: hasOwnProperty,
+    hasOwnProp: hasOwnProperty,
+    // an alias to avoid ESLint no-prototype-builtins detection
+    reduceDescriptors: reduceDescriptors,
+    freezeMethods: freezeMethods,
+    toObjectSet: toObjectSet,
+    toCamelCase: toCamelCase,
+    noop: noop,
+    toFiniteNumber: toFiniteNumber,
+    findKey: findKey,
+    global: _global,
+    isContextDefined: isContextDefined,
+    isSpecCompliantForm: isSpecCompliantForm,
+    toJSONObject: toJSONObject,
+    isAsyncFn: isAsyncFn,
+    isThenable: isThenable,
+    setImmediate: _setImmediate,
+    asap: asap,
+    isIterable: isIterable
+  };
+
+  /**
+   * Create an Error with the specified message, config, error code, request and response.
+   *
+   * @param {string} message The error message.
+   * @param {string} [code] The error code (for example, 'ECONNABORTED').
+   * @param {Object} [config] The config.
+   * @param {Object} [request] The request.
+   * @param {Object} [response] The response.
+   *
+   * @returns {Error} The created error.
+   */
+  function AxiosError(message, code, config, request, response) {
+    Error.call(this);
+    if (Error.captureStackTrace) {
+      Error.captureStackTrace(this, this.constructor);
+    } else {
+      this.stack = new Error().stack;
+    }
+    this.message = message;
+    this.name = 'AxiosError';
+    code && (this.code = code);
+    config && (this.config = config);
+    request && (this.request = request);
+    if (response) {
+      this.response = response;
+      this.status = response.status ? response.status : null;
+    }
+  }
+  utils$1.inherits(AxiosError, Error, {
+    toJSON: function toJSON() {
+      return {
+        // Standard
+        message: this.message,
+        name: this.name,
+        // Microsoft
+        description: this.description,
+        number: this.number,
+        // Mozilla
+        fileName: this.fileName,
+        lineNumber: this.lineNumber,
+        columnNumber: this.columnNumber,
+        stack: this.stack,
+        // Axios
+        config: utils$1.toJSONObject(this.config),
+        code: this.code,
+        status: this.status
+      };
+    }
+  });
+  var prototype$1 = AxiosError.prototype;
+  var descriptors = {};
+  ['ERR_BAD_OPTION_VALUE', 'ERR_BAD_OPTION', 'ECONNABORTED', 'ETIMEDOUT', 'ERR_NETWORK', 'ERR_FR_TOO_MANY_REDIRECTS', 'ERR_DEPRECATED', 'ERR_BAD_RESPONSE', 'ERR_BAD_REQUEST', 'ERR_CANCELED', 'ERR_NOT_SUPPORT', 'ERR_INVALID_URL'
+  // eslint-disable-next-line func-names
+  ].forEach(function (code) {
+    descriptors[code] = {
+      value: code
+    };
+  });
+  Object.defineProperties(AxiosError, descriptors);
+  Object.defineProperty(prototype$1, 'isAxiosError', {
+    value: true
+  });
+
+  // eslint-disable-next-line func-names
+  AxiosError.from = function (error, code, config, request, response, customProps) {
+    var axiosError = Object.create(prototype$1);
+    utils$1.toFlatObject(error, axiosError, function filter(obj) {
+      return obj !== Error.prototype;
+    }, function (prop) {
+      return prop !== 'isAxiosError';
+    });
+    var msg = error && error.message ? error.message : 'Error';
+
+    // Prefer explicit code; otherwise copy the low-level error's code (e.g. ECONNREFUSED)
+    var errCode = code == null && error ? error.code : code;
+    AxiosError.call(axiosError, msg, errCode, config, request, response);
+
+    // Chain the original error on the standard field; non-enumerable to avoid JSON noise
+    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;
+  };
+
+  // eslint-disable-next-line strict
+  var httpAdapter = null;
+
+  /**
+   * Determines if the given thing is a array or js object.
+   *
+   * @param {string} thing - The object or array to be visited.
+   *
+   * @returns {boolean}
+   */
+  function isVisitable(thing) {
+    return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
+  }
+
+  /**
+   * It removes the brackets from the end of a string
+   *
+   * @param {string} key - The key of the parameter.
+   *
+   * @returns {string} the key without the brackets.
+   */
+  function removeBrackets(key) {
+    return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
+  }
+
+  /**
+   * It takes a path, a key, and a boolean, and returns a string
+   *
+   * @param {string} path - The path to the current key.
+   * @param {string} key - The key of the current object being iterated over.
+   * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
+   *
+   * @returns {string} The path to the current key.
+   */
+  function renderKey(path, key, dots) {
+    if (!path) return key;
+    return path.concat(key).map(function each(token, i) {
+      // eslint-disable-next-line no-param-reassign
+      token = removeBrackets(token);
+      return !dots && i ? '[' + token + ']' : token;
+    }).join(dots ? '.' : '');
+  }
+
+  /**
+   * If the array is an array and none of its elements are visitable, then it's a flat array.
+   *
+   * @param {Array<any>} arr - The array to check
+   *
+   * @returns {boolean}
+   */
+  function isFlatArray(arr) {
+    return utils$1.isArray(arr) && !arr.some(isVisitable);
+  }
+  var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
+    return /^is[A-Z]/.test(prop);
+  });
+
+  /**
+   * Convert a data object to FormData
+   *
+   * @param {Object} obj
+   * @param {?Object} [formData]
+   * @param {?Object} [options]
+   * @param {Function} [options.visitor]
+   * @param {Boolean} [options.metaTokens = true]
+   * @param {Boolean} [options.dots = false]
+   * @param {?Boolean} [options.indexes = false]
+   *
+   * @returns {Object}
+   **/
+
+  /**
+   * It converts an object into a FormData object
+   *
+   * @param {Object<any, any>} obj - The object to convert to form data.
+   * @param {string} formData - The FormData object to append to.
+   * @param {Object<string, any>} options
+   *
+   * @returns
+   */
+  function toFormData(obj, formData, options) {
+    if (!utils$1.isObject(obj)) {
+      throw new TypeError('target must be an object');
+    }
+
+    // eslint-disable-next-line no-param-reassign
+    formData = formData || new (FormData)();
+
+    // eslint-disable-next-line no-param-reassign
+    options = utils$1.toFlatObject(options, {
+      metaTokens: true,
+      dots: false,
+      indexes: false
+    }, false, function defined(option, source) {
+      // eslint-disable-next-line no-eq-null,eqeqeq
+      return !utils$1.isUndefined(source[option]);
+    });
+    var metaTokens = options.metaTokens;
+    // eslint-disable-next-line no-use-before-define
+    var visitor = options.visitor || defaultVisitor;
+    var dots = options.dots;
+    var indexes = options.indexes;
+    var _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
+    var useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
+    if (!utils$1.isFunction(visitor)) {
+      throw new TypeError('visitor must be a function');
+    }
+    function convertValue(value) {
+      if (value === null) return '';
+      if (utils$1.isDate(value)) {
+        return value.toISOString();
+      }
+      if (utils$1.isBoolean(value)) {
+        return value.toString();
+      }
+      if (!useBlob && utils$1.isBlob(value)) {
+        throw new AxiosError('Blob is not supported. Use a Buffer instead.');
+      }
+      if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
+        return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
+      }
+      return value;
+    }
+
+    /**
+     * Default visitor.
+     *
+     * @param {*} value
+     * @param {String|Number} key
+     * @param {Array<String|Number>} path
+     * @this {FormData}
+     *
+     * @returns {boolean} return true to visit the each prop of the value recursively
+     */
+    function defaultVisitor(value, key, path) {
+      var arr = value;
+      if (value && !path && _typeof(value) === 'object') {
+        if (utils$1.endsWith(key, '{}')) {
+          // eslint-disable-next-line no-param-reassign
+          key = metaTokens ? key : key.slice(0, -2);
+          // eslint-disable-next-line no-param-reassign
+          value = JSON.stringify(value);
+        } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))) {
+          // eslint-disable-next-line no-param-reassign
+          key = removeBrackets(key);
+          arr.forEach(function each(el, index) {
+            !(utils$1.isUndefined(el) || el === null) && formData.append(
+            // eslint-disable-next-line no-nested-ternary
+            indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + '[]', convertValue(el));
+          });
+          return false;
+        }
+      }
+      if (isVisitable(value)) {
+        return true;
+      }
+      formData.append(renderKey(path, key, dots), convertValue(value));
+      return false;
+    }
+    var stack = [];
+    var exposedHelpers = Object.assign(predicates, {
+      defaultVisitor: defaultVisitor,
+      convertValue: convertValue,
+      isVisitable: isVisitable
+    });
+    function build(value, path) {
+      if (utils$1.isUndefined(value)) return;
+      if (stack.indexOf(value) !== -1) {
+        throw Error('Circular reference detected in ' + path.join('.'));
+      }
+      stack.push(value);
+      utils$1.forEach(value, function each(el, key) {
+        var result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
+        if (result === true) {
+          build(el, path ? path.concat(key) : [key]);
+        }
+      });
+      stack.pop();
+    }
+    if (!utils$1.isObject(obj)) {
+      throw new TypeError('data must be an object');
+    }
+    build(obj);
+    return formData;
+  }
+
+  /**
+   * It encodes a string by replacing all characters that are not in the unreserved set with
+   * their percent-encoded equivalents
+   *
+   * @param {string} str - The string to encode.
+   *
+   * @returns {string} The encoded string.
+   */
+  function encode$1(str) {
+    var charMap = {
+      '!': '%21',
+      "'": '%27',
+      '(': '%28',
+      ')': '%29',
+      '~': '%7E',
+      '%20': '+',
+      '%00': '\x00'
+    };
+    return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
+      return charMap[match];
+    });
+  }
+
+  /**
+   * It takes a params object and converts it to a FormData object
+   *
+   * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
+   * @param {Object<string, any>} options - The options object passed to the Axios constructor.
+   *
+   * @returns {void}
+   */
+  function AxiosURLSearchParams(params, options) {
+    this._pairs = [];
+    params && toFormData(params, this, options);
+  }
+  var prototype = AxiosURLSearchParams.prototype;
+  prototype.append = function append(name, value) {
+    this._pairs.push([name, value]);
+  };
+  prototype.toString = function toString(encoder) {
+    var _encode = encoder ? function (value) {
+      return encoder.call(this, value, encode$1);
+    } : encode$1;
+    return this._pairs.map(function each(pair) {
+      return _encode(pair[0]) + '=' + _encode(pair[1]);
+    }, '').join('&');
+  };
+
+  /**
+   * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
+   * URI encoded counterparts
+   *
+   * @param {string} val The value to be encoded.
+   *
+   * @returns {string} The encoded value.
+   */
+  function encode(val) {
+    return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+');
+  }
+
+  /**
+   * Build a URL by appending params to the end
+   *
+   * @param {string} url The base of the url (e.g., http://www.google.com)
+   * @param {object} [params] The params to be appended
+   * @param {?(object|Function)} options
+   *
+   * @returns {string} The formatted url
+   */
+  function buildURL(url, params, options) {
+    /*eslint no-param-reassign:0*/
+    if (!params) {
+      return url;
+    }
+    var _encode = options && options.encode || encode;
+    if (utils$1.isFunction(options)) {
+      options = {
+        serialize: options
+      };
+    }
+    var serializeFn = options && options.serialize;
+    var serializedParams;
+    if (serializeFn) {
+      serializedParams = serializeFn(params, options);
+    } else {
+      serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
+    }
+    if (serializedParams) {
+      var hashmarkIndex = url.indexOf("#");
+      if (hashmarkIndex !== -1) {
+        url = url.slice(0, hashmarkIndex);
+      }
+      url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
+    }
+    return url;
+  }
+
+  var InterceptorManager = /*#__PURE__*/function () {
+    function InterceptorManager() {
+      _classCallCheck(this, InterceptorManager);
+      this.handlers = [];
+    }
+
+    /**
+     * Add a new interceptor to the stack
+     *
+     * @param {Function} fulfilled The function to handle `then` for a `Promise`
+     * @param {Function} rejected The function to handle `reject` for a `Promise`
+     *
+     * @return {Number} An ID used to remove interceptor later
+     */
+    _createClass(InterceptorManager, [{
+      key: "use",
+      value: function use(fulfilled, rejected, options) {
+        this.handlers.push({
+          fulfilled: fulfilled,
+          rejected: rejected,
+          synchronous: options ? options.synchronous : false,
+          runWhen: options ? options.runWhen : null
+        });
+        return this.handlers.length - 1;
+      }
+
+      /**
+       * Remove an interceptor from the stack
+       *
+       * @param {Number} id The ID that was returned by `use`
+       *
+       * @returns {void}
+       */
+    }, {
+      key: "eject",
+      value: function eject(id) {
+        if (this.handlers[id]) {
+          this.handlers[id] = null;
+        }
+      }
+
+      /**
+       * Clear all interceptors from the stack
+       *
+       * @returns {void}
+       */
+    }, {
+      key: "clear",
+      value: function clear() {
+        if (this.handlers) {
+          this.handlers = [];
+        }
+      }
+
+      /**
+       * Iterate over all the registered interceptors
+       *
+       * This method is particularly useful for skipping over any
+       * interceptors that may have become `null` calling `eject`.
+       *
+       * @param {Function} fn The function to call for each interceptor
+       *
+       * @returns {void}
+       */
+    }, {
+      key: "forEach",
+      value: function forEach(fn) {
+        utils$1.forEach(this.handlers, function forEachHandler(h) {
+          if (h !== null) {
+            fn(h);
+          }
+        });
+      }
+    }]);
+    return InterceptorManager;
+  }();
+  var InterceptorManager$1 = InterceptorManager;
+
+  var transitionalDefaults = {
+    silentJSONParsing: true,
+    forcedJSONParsing: true,
+    clarifyTimeoutError: false
+  };
+
+  var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
+
+  var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
+
+  var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
+
+  var platform$1 = {
+    isBrowser: true,
+    classes: {
+      URLSearchParams: URLSearchParams$1,
+      FormData: FormData$1,
+      Blob: Blob$1
+    },
+    protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
+  };
+
+  var hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
+  var _navigator = (typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) === 'object' && navigator || undefined;
+
+  /**
+   * Determine if we're running in a standard browser environment
+   *
+   * This allows axios to run in a web worker, and react-native.
+   * Both environments support XMLHttpRequest, but not fully standard globals.
+   *
+   * web workers:
+   *  typeof window -> undefined
+   *  typeof document -> undefined
+   *
+   * react-native:
+   *  navigator.product -> 'ReactNative'
+   * nativescript
+   *  navigator.product -> 'NativeScript' or 'NS'
+   *
+   * @returns {boolean}
+   */
+  var hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
+
+  /**
+   * Determine if we're running in a standard browser webWorker environment
+   *
+   * Although the `isStandardBrowserEnv` method indicates that
+   * `allows axios to run in a web worker`, the WebWorker will still be
+   * filtered out due to its judgment standard
+   * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
+   * This leads to a problem when axios post `FormData` in webWorker
+   */
+  var hasStandardBrowserWebWorkerEnv = function () {
+    return typeof WorkerGlobalScope !== 'undefined' &&
+    // eslint-disable-next-line no-undef
+    self instanceof WorkerGlobalScope && typeof self.importScripts === 'function';
+  }();
+  var origin = hasBrowserEnv && window.location.href || 'http://localhost';
+
+  var utils = /*#__PURE__*/Object.freeze({
+    __proto__: null,
+    hasBrowserEnv: hasBrowserEnv,
+    hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
+    hasStandardBrowserEnv: hasStandardBrowserEnv,
+    navigator: _navigator,
+    origin: origin
+  });
+
+  var platform = _objectSpread2(_objectSpread2({}, utils), platform$1);
+
+  function toURLEncodedForm(data, options) {
+    return toFormData(data, new platform.classes.URLSearchParams(), _objectSpread2({
+      visitor: function visitor(value, key, path, helpers) {
+        if (platform.isNode && utils$1.isBuffer(value)) {
+          this.append(key, value.toString('base64'));
+          return false;
+        }
+        return helpers.defaultVisitor.apply(this, arguments);
+      }
+    }, options));
+  }
+
+  /**
+   * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
+   *
+   * @param {string} name - The name of the property to get.
+   *
+   * @returns An array of strings.
+   */
+  function parsePropPath(name) {
+    // foo[x][y][z]
+    // foo.x.y.z
+    // foo-x-y-z
+    // foo x y z
+    return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(function (match) {
+      return match[0] === '[]' ? '' : match[1] || match[0];
+    });
+  }
+
+  /**
+   * Convert an array to an object.
+   *
+   * @param {Array<any>} arr - The array to convert to an object.
+   *
+   * @returns An object with the same keys and values as the array.
+   */
+  function arrayToObject(arr) {
+    var obj = {};
+    var keys = Object.keys(arr);
+    var i;
+    var len = keys.length;
+    var key;
+    for (i = 0; i < len; i++) {
+      key = keys[i];
+      obj[key] = arr[key];
+    }
+    return obj;
+  }
+
+  /**
+   * It takes a FormData object and returns a JavaScript object
+   *
+   * @param {string} formData The FormData object to convert to JSON.
+   *
+   * @returns {Object<string, any> | null} The converted object.
+   */
+  function formDataToJSON(formData) {
+    function buildPath(path, value, target, index) {
+      var name = path[index++];
+      if (name === '__proto__') return true;
+      var isNumericKey = Number.isFinite(+name);
+      var isLast = index >= path.length;
+      name = !name && utils$1.isArray(target) ? target.length : name;
+      if (isLast) {
+        if (utils$1.hasOwnProp(target, name)) {
+          target[name] = [target[name], value];
+        } else {
+          target[name] = value;
+        }
+        return !isNumericKey;
+      }
+      if (!target[name] || !utils$1.isObject(target[name])) {
+        target[name] = [];
+      }
+      var result = buildPath(path, value, target[name], index);
+      if (result && utils$1.isArray(target[name])) {
+        target[name] = arrayToObject(target[name]);
+      }
+      return !isNumericKey;
+    }
+    if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
+      var obj = {};
+      utils$1.forEachEntry(formData, function (name, value) {
+        buildPath(parsePropPath(name), value, obj, 0);
+      });
+      return obj;
+    }
+    return null;
+  }
+
+  /**
+   * It takes a string, tries to parse it, and if it fails, it returns the stringified version
+   * of the input
+   *
+   * @param {any} rawValue - The value to be stringified.
+   * @param {Function} parser - A function that parses a string into a JavaScript object.
+   * @param {Function} encoder - A function that takes a value and returns a string.
+   *
+   * @returns {string} A stringified version of the rawValue.
+   */
+  function stringifySafely(rawValue, parser, encoder) {
+    if (utils$1.isString(rawValue)) {
+      try {
+        (parser || JSON.parse)(rawValue);
+        return utils$1.trim(rawValue);
+      } catch (e) {
+        if (e.name !== 'SyntaxError') {
+          throw e;
+        }
+      }
+    }
+    return (encoder || JSON.stringify)(rawValue);
+  }
+  var defaults = {
+    transitional: transitionalDefaults,
+    adapter: ['xhr', 'http', 'fetch'],
+    transformRequest: [function transformRequest(data, headers) {
+      var contentType = headers.getContentType() || '';
+      var hasJSONContentType = contentType.indexOf('application/json') > -1;
+      var isObjectPayload = utils$1.isObject(data);
+      if (isObjectPayload && utils$1.isHTMLForm(data)) {
+        data = new FormData(data);
+      }
+      var isFormData = utils$1.isFormData(data);
+      if (isFormData) {
+        return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
+      }
+      if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
+        return data;
+      }
+      if (utils$1.isArrayBufferView(data)) {
+        return data.buffer;
+      }
+      if (utils$1.isURLSearchParams(data)) {
+        headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
+        return data.toString();
+      }
+      var isFileList;
+      if (isObjectPayload) {
+        if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
+          return toURLEncodedForm(data, this.formSerializer).toString();
+        }
+        if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
+          var _FormData = this.env && this.env.FormData;
+          return toFormData(isFileList ? {
+            'files[]': data
+          } : data, _FormData && new _FormData(), this.formSerializer);
+        }
+      }
+      if (isObjectPayload || hasJSONContentType) {
+        headers.setContentType('application/json', false);
+        return stringifySafely(data);
+      }
+      return data;
+    }],
+    transformResponse: [function transformResponse(data) {
+      var transitional = this.transitional || defaults.transitional;
+      var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
+      var JSONRequested = this.responseType === 'json';
+      if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
+        return data;
+      }
+      if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
+        var silentJSONParsing = transitional && transitional.silentJSONParsing;
+        var strictJSONParsing = !silentJSONParsing && JSONRequested;
+        try {
+          return JSON.parse(data, this.parseReviver);
+        } catch (e) {
+          if (strictJSONParsing) {
+            if (e.name === 'SyntaxError') {
+              throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
+            }
+            throw e;
+          }
+        }
+      }
+      return data;
+    }],
+    /**
+     * A timeout in milliseconds to abort a request. If set to 0 (default) a
+     * timeout is not created.
+     */
+    timeout: 0,
+    xsrfCookieName: 'XSRF-TOKEN',
+    xsrfHeaderName: 'X-XSRF-TOKEN',
+    maxContentLength: -1,
+    maxBodyLength: -1,
+    env: {
+      FormData: platform.classes.FormData,
+      Blob: platform.classes.Blob
+    },
+    validateStatus: function validateStatus(status) {
+      return status >= 200 && status < 300;
+    },
+    headers: {
+      common: {
+        'Accept': 'application/json, text/plain, */*',
+        'Content-Type': undefined
+      }
+    }
+  };
+  utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], function (method) {
+    defaults.headers[method] = {};
+  });
+  var defaults$1 = defaults;
+
+  // RawAxiosHeaders whose duplicates are ignored by node
+  // c.f. https://nodejs.org/api/http.html#http_message_headers
+  var ignoreDuplicateOf = utils$1.toObjectSet(['age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent']);
+
+  /**
+   * Parse headers into an object
+   *
+   * ```
+   * Date: Wed, 27 Aug 2014 08:58:49 GMT
+   * Content-Type: application/json
+   * Connection: keep-alive
+   * Transfer-Encoding: chunked
+   * ```
+   *
+   * @param {String} rawHeaders Headers needing to be parsed
+   *
+   * @returns {Object} Headers parsed into an object
+   */
+  var parseHeaders = (function (rawHeaders) {
+    var parsed = {};
+    var key;
+    var val;
+    var i;
+    rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
+      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;
+      }
+    });
+    return parsed;
+  });
+
+  var $internals = Symbol('internals');
+  function normalizeHeader(header) {
+    return header && String(header).trim().toLowerCase();
+  }
+  function normalizeValue(value) {
+    if (value === false || value == null) {
+      return value;
+    }
+    return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
+  }
+  function parseTokens(str) {
+    var tokens = Object.create(null);
+    var tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
+    var match;
+    while (match = tokensRE.exec(str)) {
+      tokens[match[1]] = match[2];
+    }
+    return tokens;
+  }
+  var isValidHeaderName = function isValidHeaderName(str) {
+    return /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
+  };
+  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
+    if (utils$1.isFunction(filter)) {
+      return filter.call(this, value, header);
+    }
+    if (isHeaderNameFilter) {
+      value = header;
+    }
+    if (!utils$1.isString(value)) return;
+    if (utils$1.isString(filter)) {
+      return value.indexOf(filter) !== -1;
+    }
+    if (utils$1.isRegExp(filter)) {
+      return filter.test(value);
+    }
+  }
+  function formatHeader(header) {
+    return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, function (w, _char, str) {
+      return _char.toUpperCase() + str;
+    });
+  }
+  function buildAccessors(obj, header) {
+    var accessorName = utils$1.toCamelCase(' ' + header);
+    ['get', 'set', 'has'].forEach(function (methodName) {
+      Object.defineProperty(obj, methodName + accessorName, {
+        value: function value(arg1, arg2, arg3) {
+          return this[methodName].call(this, header, arg1, arg2, arg3);
+        },
+        configurable: true
+      });
+    });
+  }
+  var AxiosHeaders = /*#__PURE__*/function (_Symbol$iterator, _Symbol$toStringTag) {
+    function AxiosHeaders(headers) {
+      _classCallCheck(this, AxiosHeaders);
+      headers && this.set(headers);
+    }
+    _createClass(AxiosHeaders, [{
+      key: "set",
+      value: function set(header, valueOrRewrite, rewrite) {
+        var self = this;
+        function setHeader(_value, _header, _rewrite) {
+          var lHeader = normalizeHeader(_header);
+          if (!lHeader) {
+            throw new Error('header name must be a non-empty string');
+          }
+          var key = utils$1.findKey(self, lHeader);
+          if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) {
+            self[key || _header] = normalizeValue(_value);
+          }
+        }
+        var setHeaders = function setHeaders(headers, _rewrite) {
+          return utils$1.forEach(headers, function (_value, _header) {
+            return setHeader(_value, _header, _rewrite);
+          });
+        };
+        if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
+          setHeaders(header, valueOrRewrite);
+        } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
+          setHeaders(parseHeaders(header), valueOrRewrite);
+        } else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
+          var obj = {},
+            dest,
+            key;
+          var _iterator = _createForOfIteratorHelper(header),
+            _step;
+          try {
+            for (_iterator.s(); !(_step = _iterator.n()).done;) {
+              var entry = _step.value;
+              if (!utils$1.isArray(entry)) {
+                throw TypeError('Object iterator must return a key-value pair');
+              }
+              obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [].concat(_toConsumableArray(dest), [entry[1]]) : [dest, entry[1]] : entry[1];
+            }
+          } catch (err) {
+            _iterator.e(err);
+          } finally {
+            _iterator.f();
+          }
+          setHeaders(obj, valueOrRewrite);
+        } else {
+          header != null && setHeader(valueOrRewrite, header, rewrite);
+        }
+        return this;
+      }
+    }, {
+      key: "get",
+      value: function get(header, parser) {
+        header = normalizeHeader(header);
+        if (header) {
+          var key = utils$1.findKey(this, header);
+          if (key) {
+            var value = this[key];
+            if (!parser) {
+              return value;
+            }
+            if (parser === true) {
+              return parseTokens(value);
+            }
+            if (utils$1.isFunction(parser)) {
+              return parser.call(this, value, key);
+            }
+            if (utils$1.isRegExp(parser)) {
+              return parser.exec(value);
+            }
+            throw new TypeError('parser must be boolean|regexp|function');
+          }
+        }
+      }
+    }, {
+      key: "has",
+      value: function has(header, matcher) {
+        header = normalizeHeader(header);
+        if (header) {
+          var key = utils$1.findKey(this, header);
+          return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
+        }
+        return false;
+      }
+    }, {
+      key: "delete",
+      value: function _delete(header, matcher) {
+        var self = this;
+        var deleted = false;
+        function deleteHeader(_header) {
+          _header = normalizeHeader(_header);
+          if (_header) {
+            var key = utils$1.findKey(self, _header);
+            if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
+              delete self[key];
+              deleted = true;
+            }
+          }
+        }
+        if (utils$1.isArray(header)) {
+          header.forEach(deleteHeader);
+        } else {
+          deleteHeader(header);
+        }
+        return deleted;
+      }
+    }, {
+      key: "clear",
+      value: function clear(matcher) {
+        var keys = Object.keys(this);
+        var i = keys.length;
+        var deleted = false;
+        while (i--) {
+          var key = keys[i];
+          if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
+            delete this[key];
+            deleted = true;
+          }
+        }
+        return deleted;
+      }
+    }, {
+      key: "normalize",
+      value: function normalize(format) {
+        var self = this;
+        var headers = {};
+        utils$1.forEach(this, function (value, header) {
+          var key = utils$1.findKey(headers, header);
+          if (key) {
+            self[key] = normalizeValue(value);
+            delete self[header];
+            return;
+          }
+          var normalized = format ? formatHeader(header) : String(header).trim();
+          if (normalized !== header) {
+            delete self[header];
+          }
+          self[normalized] = normalizeValue(value);
+          headers[normalized] = true;
+        });
+        return this;
+      }
+    }, {
+      key: "concat",
+      value: function concat() {
+        var _this$constructor;
+        for (var _len = arguments.length, targets = new Array(_len), _key = 0; _key < _len; _key++) {
+          targets[_key] = arguments[_key];
+        }
+        return (_this$constructor = this.constructor).concat.apply(_this$constructor, [this].concat(targets));
+      }
+    }, {
+      key: "toJSON",
+      value: function toJSON(asStrings) {
+        var obj = Object.create(null);
+        utils$1.forEach(this, function (value, header) {
+          value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
+        });
+        return obj;
+      }
+    }, {
+      key: _Symbol$iterator,
+      value: function value() {
+        return Object.entries(this.toJSON())[Symbol.iterator]();
+      }
+    }, {
+      key: "toString",
+      value: function toString() {
+        return Object.entries(this.toJSON()).map(function (_ref) {
+          var _ref2 = _slicedToArray(_ref, 2),
+            header = _ref2[0],
+            value = _ref2[1];
+          return header + ': ' + value;
+        }).join('\n');
+      }
+    }, {
+      key: "getSetCookie",
+      value: function getSetCookie() {
+        return this.get("set-cookie") || [];
+      }
+    }, {
+      key: _Symbol$toStringTag,
+      get: function get() {
+        return 'AxiosHeaders';
+      }
+    }], [{
+      key: "from",
+      value: function from(thing) {
+        return thing instanceof this ? thing : new this(thing);
+      }
+    }, {
+      key: "concat",
+      value: function concat(first) {
+        var computed = new this(first);
+        for (var _len2 = arguments.length, targets = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
+          targets[_key2 - 1] = arguments[_key2];
+        }
+        targets.forEach(function (target) {
+          return computed.set(target);
+        });
+        return computed;
+      }
+    }, {
+      key: "accessor",
+      value: function accessor(header) {
+        var internals = this[$internals] = this[$internals] = {
+          accessors: {}
+        };
+        var accessors = internals.accessors;
+        var prototype = this.prototype;
+        function defineAccessor(_header) {
+          var lHeader = normalizeHeader(_header);
+          if (!accessors[lHeader]) {
+            buildAccessors(prototype, _header);
+            accessors[lHeader] = true;
+          }
+        }
+        utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
+        return this;
+      }
+    }]);
+    return AxiosHeaders;
+  }(Symbol.iterator, Symbol.toStringTag);
+  AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
+
+  // reserved names hotfix
+  utils$1.reduceDescriptors(AxiosHeaders.prototype, function (_ref3, key) {
+    var value = _ref3.value;
+    var mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
+    return {
+      get: function get() {
+        return value;
+      },
+      set: function set(headerValue) {
+        this[mapped] = headerValue;
+      }
+    };
+  });
+  utils$1.freezeMethods(AxiosHeaders);
+  var AxiosHeaders$1 = AxiosHeaders;
+
+  /**
+   * Transform the data for a request or a response
+   *
+   * @param {Array|Function} fns A single function or Array of functions
+   * @param {?Object} response The response object
+   *
+   * @returns {*} The resulting transformed data
+   */
+  function transformData(fns, response) {
+    var config = this || defaults$1;
+    var context = response || config;
+    var headers = AxiosHeaders$1.from(context.headers);
+    var data = context.data;
+    utils$1.forEach(fns, function transform(fn) {
+      data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
+    });
+    headers.normalize();
+    return data;
+  }
+
+  function isCancel(value) {
+    return !!(value && value.__CANCEL__);
+  }
+
+  /**
+   * A `CanceledError` is an object that is thrown when an operation is canceled.
+   *
+   * @param {string=} message The message.
+   * @param {Object=} config The config.
+   * @param {Object=} request The request.
+   *
+   * @returns {CanceledError} The created error.
+   */
+  function CanceledError(message, config, request) {
+    // eslint-disable-next-line no-eq-null,eqeqeq
+    AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
+    this.name = 'CanceledError';
+  }
+  utils$1.inherits(CanceledError, AxiosError, {
+    __CANCEL__: true
+  });
+
+  /**
+   * Resolve or reject a Promise based on response status.
+   *
+   * @param {Function} resolve A function that resolves the promise.
+   * @param {Function} reject A function that rejects the promise.
+   * @param {object} response The response.
+   *
+   * @returns {object} The response.
+   */
+  function settle(resolve, reject, response) {
+    var validateStatus = response.config.validateStatus;
+    if (!response.status || !validateStatus || validateStatus(response.status)) {
+      resolve(response);
+    } else {
+      reject(new AxiosError('Request failed with status code ' + response.status, [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
+    }
+  }
+
+  function parseProtocol(url) {
+    var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
+    return match && match[1] || '';
+  }
+
+  /**
+   * Calculate data maxRate
+   * @param {Number} [samplesCount= 10]
+   * @param {Number} [min= 1000]
+   * @returns {Function}
+   */
+  function speedometer(samplesCount, min) {
+    samplesCount = samplesCount || 10;
+    var bytes = new Array(samplesCount);
+    var timestamps = new Array(samplesCount);
+    var head = 0;
+    var tail = 0;
+    var firstSampleTS;
+    min = min !== undefined ? min : 1000;
+    return function push(chunkLength) {
+      var now = Date.now();
+      var startedAt = timestamps[tail];
+      if (!firstSampleTS) {
+        firstSampleTS = now;
+      }
+      bytes[head] = chunkLength;
+      timestamps[head] = now;
+      var i = tail;
+      var 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;
+      }
+      var passed = startedAt && now - startedAt;
+      return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
+    };
+  }
+
+  /**
+   * Throttle decorator
+   * @param {Function} fn
+   * @param {Number} freq
+   * @return {Function}
+   */
+  function throttle(fn, freq) {
+    var timestamp = 0;
+    var threshold = 1000 / freq;
+    var lastArgs;
+    var timer;
+    var invoke = function invoke(args) {
+      var now = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Date.now();
+      timestamp = now;
+      lastArgs = null;
+      if (timer) {
+        clearTimeout(timer);
+        timer = null;
+      }
+      fn.apply(void 0, _toConsumableArray(args));
+    };
+    var throttled = function throttled() {
+      var now = Date.now();
+      var passed = now - timestamp;
+      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+        args[_key] = arguments[_key];
+      }
+      if (passed >= threshold) {
+        invoke(args, now);
+      } else {
+        lastArgs = args;
+        if (!timer) {
+          timer = setTimeout(function () {
+            timer = null;
+            invoke(lastArgs);
+          }, threshold - passed);
+        }
+      }
+    };
+    var flush = function flush() {
+      return lastArgs && invoke(lastArgs);
+    };
+    return [throttled, flush];
+  }
+
+  var progressEventReducer = function progressEventReducer(listener, isDownloadStream) {
+    var freq = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
+    var bytesNotified = 0;
+    var _speedometer = speedometer(50, 250);
+    return throttle(function (e) {
+      var loaded = e.loaded;
+      var total = e.lengthComputable ? e.total : undefined;
+      var progressBytes = loaded - bytesNotified;
+      var rate = _speedometer(progressBytes);
+      var inRange = loaded <= total;
+      bytesNotified = loaded;
+      var data = _defineProperty({
+        loaded: loaded,
+        total: 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);
+  };
+  var progressEventDecorator = function progressEventDecorator(total, throttled) {
+    var lengthComputable = total != null;
+    return [function (loaded) {
+      return throttled[0]({
+        lengthComputable: lengthComputable,
+        total: total,
+        loaded: loaded
+      });
+    }, throttled[1]];
+  };
+  var asyncDecorator = function asyncDecorator(fn) {
+    return function () {
+      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
+        args[_key] = arguments[_key];
+      }
+      return utils$1.asap(function () {
+        return fn.apply(void 0, args);
+      });
+    };
+  };
+
+  var isURLSameOrigin = platform.hasStandardBrowserEnv ? function (origin, isMSIE) {
+    return function (url) {
+      url = new URL(url, platform.origin);
+      return origin.protocol === url.protocol && origin.host === url.host && (isMSIE || origin.port === url.port);
+    };
+  }(new URL(platform.origin), platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)) : function () {
+    return true;
+  };
+
+  var cookies = platform.hasStandardBrowserEnv ?
+  // Standard browser envs support document.cookie
+  {
+    write: function write(name, value, expires, path, domain, secure, sameSite) {
+      if (typeof document === 'undefined') return;
+      var cookie = ["".concat(name, "=").concat(encodeURIComponent(value))];
+      if (utils$1.isNumber(expires)) {
+        cookie.push("expires=".concat(new Date(expires).toUTCString()));
+      }
+      if (utils$1.isString(path)) {
+        cookie.push("path=".concat(path));
+      }
+      if (utils$1.isString(domain)) {
+        cookie.push("domain=".concat(domain));
+      }
+      if (secure === true) {
+        cookie.push('secure');
+      }
+      if (utils$1.isString(sameSite)) {
+        cookie.push("SameSite=".concat(sameSite));
+      }
+      document.cookie = cookie.join('; ');
+    },
+    read: function read(name) {
+      if (typeof document === 'undefined') return null;
+      var match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
+      return match ? decodeURIComponent(match[1]) : null;
+    },
+    remove: function remove(name) {
+      this.write(name, '', Date.now() - 86400000, '/');
+    }
+  } :
+  // Non-standard browser env (web workers, react-native) lack needed support.
+  {
+    write: function write() {},
+    read: function read() {
+      return null;
+    },
+    remove: function remove() {}
+  };
+
+  /**
+   * Determines whether the specified URL is absolute
+   *
+   * @param {string} url The URL to test
+   *
+   * @returns {boolean} True if the specified URL is absolute, otherwise false
+   */
+  function isAbsoluteURL(url) {
+    // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
+    // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
+    // by any combination of letters, digits, plus, period, or hyphen.
+    return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
+  }
+
+  /**
+   * Creates a new URL by combining the specified URLs
+   *
+   * @param {string} baseURL The base URL
+   * @param {string} relativeURL The relative URL
+   *
+   * @returns {string} The combined URL
+   */
+  function combineURLs(baseURL, relativeURL) {
+    return relativeURL ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL;
+  }
+
+  /**
+   * Creates a new URL by combining the baseURL with the requestedURL,
+   * only when the requestedURL is not already an absolute URL.
+   * If the requestURL is absolute, this function returns the requestedURL untouched.
+   *
+   * @param {string} baseURL The base URL
+   * @param {string} requestedURL Absolute or relative URL to combine
+   *
+   * @returns {string} The combined full path
+   */
+  function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
+    var isRelativeUrl = !isAbsoluteURL(requestedURL);
+    if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
+      return combineURLs(baseURL, requestedURL);
+    }
+    return requestedURL;
+  }
+
+  var headersToObject = function headersToObject(thing) {
+    return thing instanceof AxiosHeaders$1 ? _objectSpread2({}, 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(config1, config2) {
+    // eslint-disable-next-line no-param-reassign
+    config2 = config2 || {};
+    var config = {};
+    function getMergedValue(target, source, prop, caseless) {
+      if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
+        return utils$1.merge.call({
+          caseless: caseless
+        }, target, source);
+      } else if (utils$1.isPlainObject(source)) {
+        return utils$1.merge({}, source);
+      } else if (utils$1.isArray(source)) {
+        return source.slice();
+      }
+      return source;
+    }
+
+    // eslint-disable-next-line consistent-return
+    function mergeDeepProperties(a, b, prop, caseless) {
+      if (!utils$1.isUndefined(b)) {
+        return getMergedValue(a, b, prop, caseless);
+      } else if (!utils$1.isUndefined(a)) {
+        return getMergedValue(undefined, a, prop, caseless);
+      }
+    }
+
+    // eslint-disable-next-line consistent-return
+    function valueFromConfig2(a, b) {
+      if (!utils$1.isUndefined(b)) {
+        return getMergedValue(undefined, b);
+      }
+    }
+
+    // eslint-disable-next-line consistent-return
+    function defaultToConfig2(a, b) {
+      if (!utils$1.isUndefined(b)) {
+        return getMergedValue(undefined, b);
+      } else if (!utils$1.isUndefined(a)) {
+        return getMergedValue(undefined, a);
+      }
+    }
+
+    // eslint-disable-next-line consistent-return
+    function mergeDirectKeys(a, b, prop) {
+      if (prop in config2) {
+        return getMergedValue(a, b);
+      } else if (prop in config1) {
+        return getMergedValue(undefined, a);
+      }
+    }
+    var 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: function headers(a, b, prop) {
+        return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true);
+      }
+    };
+    utils$1.forEach(Object.keys(_objectSpread2(_objectSpread2({}, config1), config2)), function computeConfigValue(prop) {
+      var merge = mergeMap[prop] || mergeDeepProperties;
+      var configValue = merge(config1[prop], config2[prop], prop);
+      utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
+    });
+    return config;
+  }
+
+  var resolveConfig = (function (config) {
+    var newConfig = mergeConfig({}, config);
+    var data = newConfig.data,
+      withXSRFToken = newConfig.withXSRFToken,
+      xsrfHeaderName = newConfig.xsrfHeaderName,
+      xsrfCookieName = newConfig.xsrfCookieName,
+      headers = newConfig.headers,
+      auth = newConfig.auth;
+    newConfig.headers = headers = AxiosHeaders$1.from(headers);
+    newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
+
+    // HTTP basic authentication
+    if (auth) {
+      headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')));
+    }
+    if (utils$1.isFormData(data)) {
+      if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
+        headers.setContentType(undefined); // browser handles it
+      } else if (utils$1.isFunction(data.getHeaders)) {
+        // Node.js FormData (like form-data package)
+        var formHeaders = data.getHeaders();
+        // Only set safe headers to avoid overwriting security headers
+        var allowedHeaders = ['content-type', 'content-length'];
+        Object.entries(formHeaders).forEach(function (_ref) {
+          var _ref2 = _slicedToArray(_ref, 2),
+            key = _ref2[0],
+            val = _ref2[1];
+          if (allowedHeaders.includes(key.toLowerCase())) {
+            headers.set(key, val);
+          }
+        });
+      }
+    }
+
+    // Add xsrf header
+    // This is only done if running in a standard browser environment.
+    // Specifically not if we're in a web worker, or react-native.
+
+    if (platform.hasStandardBrowserEnv) {
+      withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
+      if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
+        // Add xsrf header
+        var xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
+        if (xsrfValue) {
+          headers.set(xsrfHeaderName, xsrfValue);
+        }
+      }
+    }
+    return newConfig;
+  });
+
+  var isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
+  var xhrAdapter = isXHRAdapterSupported && function (config) {
+    return new Promise(function dispatchXhrRequest(resolve, reject) {
+      var _config = resolveConfig(config);
+      var requestData = _config.data;
+      var requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
+      var responseType = _config.responseType,
+        onUploadProgress = _config.onUploadProgress,
+        onDownloadProgress = _config.onDownloadProgress;
+      var onCanceled;
+      var uploadThrottled, downloadThrottled;
+      var flushUpload, flushDownload;
+      function done() {
+        flushUpload && flushUpload(); // flush events
+        flushDownload && flushDownload(); // flush events
+
+        _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
+        _config.signal && _config.signal.removeEventListener('abort', onCanceled);
+      }
+      var request = new XMLHttpRequest();
+      request.open(_config.method.toUpperCase(), _config.url, true);
+
+      // Set the request timeout in MS
+      request.timeout = _config.timeout;
+      function onloadend() {
+        if (!request) {
+          return;
+        }
+        // Prepare the response
+        var responseHeaders = AxiosHeaders$1.from('getAllResponseHeaders' in request && request.getAllResponseHeaders());
+        var responseData = !responseType || responseType === 'text' || responseType === 'json' ? request.responseText : request.response;
+        var response = {
+          data: responseData,
+          status: request.status,
+          statusText: request.statusText,
+          headers: responseHeaders,
+          config: config,
+          request: request
+        };
+        settle(function _resolve(value) {
+          resolve(value);
+          done();
+        }, function _reject(err) {
+          reject(err);
+          done();
+        }, response);
+
+        // Clean up request
+        request = null;
+      }
+      if ('onloadend' in request) {
+        // Use onloadend if available
+        request.onloadend = onloadend;
+      } else {
+        // Listen for ready state to emulate onloadend
+        request.onreadystatechange = function handleLoad() {
+          if (!request || request.readyState !== 4) {
+            return;
+          }
+
+          // The request errored out and we didn't get a response, this will be
+          // handled by onerror instead
+          // With one exception: request that using file: protocol, most browsers
+          // will return status as 0 even though it's a successful request
+          if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
+            return;
+          }
+          // readystate handler is calling before onerror or ontimeout handlers,
+          // so we should call onloadend on the next 'tick'
+          setTimeout(onloadend);
+        };
+      }
+
+      // Handle browser request cancellation (as opposed to a manual cancellation)
+      request.onabort = function handleAbort() {
+        if (!request) {
+          return;
+        }
+        reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
+
+        // Clean up request
+        request = null;
+      };
+
+      // Handle low level network errors
+      request.onerror = function handleError(event) {
+        // Browsers deliver a ProgressEvent in XHR onerror
+        // (message may be empty; when present, surface it)
+        // See https://developer.mozilla.org/docs/Web/API/XMLHttpRequest/error_event
+        var msg = event && event.message ? event.message : 'Network Error';
+        var err = new AxiosError(msg, AxiosError.ERR_NETWORK, config, request);
+        // attach the underlying event for consumers who want details
+        err.event = event || null;
+        reject(err);
+        request = null;
+      };
+
+      // Handle timeout
+      request.ontimeout = function handleTimeout() {
+        var timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
+        var transitional = _config.transitional || transitionalDefaults;
+        if (_config.timeoutErrorMessage) {
+          timeoutErrorMessage = _config.timeoutErrorMessage;
+        }
+        reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
+
+        // Clean up request
+        request = null;
+      };
+
+      // Remove Content-Type if data is undefined
+      requestData === undefined && requestHeaders.setContentType(null);
+
+      // Add headers to the request
+      if ('setRequestHeader' in request) {
+        utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
+          request.setRequestHeader(key, val);
+        });
+      }
+
+      // Add withCredentials to request if needed
+      if (!utils$1.isUndefined(_config.withCredentials)) {
+        request.withCredentials = !!_config.withCredentials;
+      }
+
+      // Add responseType to request if needed
+      if (responseType && responseType !== 'json') {
+        request.responseType = _config.responseType;
+      }
+
+      // Handle progress if needed
+      if (onDownloadProgress) {
+        var _progressEventReducer = progressEventReducer(onDownloadProgress, true);
+        var _progressEventReducer2 = _slicedToArray(_progressEventReducer, 2);
+        downloadThrottled = _progressEventReducer2[0];
+        flushDownload = _progressEventReducer2[1];
+        request.addEventListener('progress', downloadThrottled);
+      }
+
+      // Not all browsers support upload events
+      if (onUploadProgress && request.upload) {
+        var _progressEventReducer3 = progressEventReducer(onUploadProgress);
+        var _progressEventReducer4 = _slicedToArray(_progressEventReducer3, 2);
+        uploadThrottled = _progressEventReducer4[0];
+        flushUpload = _progressEventReducer4[1];
+        request.upload.addEventListener('progress', uploadThrottled);
+        request.upload.addEventListener('loadend', flushUpload);
+      }
+      if (_config.cancelToken || _config.signal) {
+        // Handle cancellation
+        // eslint-disable-next-line func-names
+        onCanceled = function onCanceled(cancel) {
+          if (!request) {
+            return;
+          }
+          reject(!cancel || cancel.type ? new CanceledError(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);
+        }
+      }
+      var protocol = parseProtocol(_config.url);
+      if (protocol && platform.protocols.indexOf(protocol) === -1) {
+        reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
+        return;
+      }
+
+      // Send the request
+      request.send(requestData || null);
+    });
+  };
+
+  var composeSignals = function composeSignals(signals, timeout) {
+    var _signals = signals = signals ? signals.filter(Boolean) : [],
+      length = _signals.length;
+    if (timeout || length) {
+      var controller = new AbortController();
+      var aborted;
+      var onabort = function onabort(reason) {
+        if (!aborted) {
+          aborted = true;
+          unsubscribe();
+          var err = reason instanceof Error ? reason : this.reason;
+          controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
+        }
+      };
+      var timer = timeout && setTimeout(function () {
+        timer = null;
+        onabort(new AxiosError("timeout ".concat(timeout, " of ms exceeded"), AxiosError.ETIMEDOUT));
+      }, timeout);
+      var unsubscribe = function unsubscribe() {
+        if (signals) {
+          timer && clearTimeout(timer);
+          timer = null;
+          signals.forEach(function (signal) {
+            signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);
+          });
+          signals = null;
+        }
+      };
+      signals.forEach(function (signal) {
+        return signal.addEventListener('abort', onabort);
+      });
+      var signal = controller.signal;
+      signal.unsubscribe = function () {
+        return utils$1.asap(unsubscribe);
+      };
+      return signal;
+    }
+  };
+  var composeSignals$1 = composeSignals;
+
+  var streamChunk = /*#__PURE__*/_regeneratorRuntime().mark(function streamChunk(chunk, chunkSize) {
+    var len, pos, end;
+    return _regeneratorRuntime().wrap(function streamChunk$(_context) {
+      while (1) switch (_context.prev = _context.next) {
+        case 0:
+          len = chunk.byteLength;
+          if (!(!chunkSize || len < chunkSize)) {
+            _context.next = 5;
+            break;
+          }
+          _context.next = 4;
+          return chunk;
+        case 4:
+          return _context.abrupt("return");
+        case 5:
+          pos = 0;
+        case 6:
+          if (!(pos < len)) {
+            _context.next = 13;
+            break;
+          }
+          end = pos + chunkSize;
+          _context.next = 10;
+          return chunk.slice(pos, end);
+        case 10:
+          pos = end;
+          _context.next = 6;
+          break;
+        case 13:
+        case "end":
+          return _context.stop();
+      }
+    }, streamChunk);
+  });
+  var readBytes = /*#__PURE__*/function () {
+    var _ref = _wrapAsyncGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(iterable, chunkSize) {
+      var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, chunk;
+      return _regeneratorRuntime().wrap(function _callee$(_context2) {
+        while (1) switch (_context2.prev = _context2.next) {
+          case 0:
+            _iteratorAbruptCompletion = false;
+            _didIteratorError = false;
+            _context2.prev = 2;
+            _iterator = _asyncIterator(readStream(iterable));
+          case 4:
+            _context2.next = 6;
+            return _awaitAsyncGenerator(_iterator.next());
+          case 6:
+            if (!(_iteratorAbruptCompletion = !(_step = _context2.sent).done)) {
+              _context2.next = 12;
+              break;
+            }
+            chunk = _step.value;
+            return _context2.delegateYield(_asyncGeneratorDelegate(_asyncIterator(streamChunk(chunk, chunkSize))), "t0", 9);
+          case 9:
+            _iteratorAbruptCompletion = false;
+            _context2.next = 4;
+            break;
+          case 12:
+            _context2.next = 18;
+            break;
+          case 14:
+            _context2.prev = 14;
+            _context2.t1 = _context2["catch"](2);
+            _didIteratorError = true;
+            _iteratorError = _context2.t1;
+          case 18:
+            _context2.prev = 18;
+            _context2.prev = 19;
+            if (!(_iteratorAbruptCompletion && _iterator["return"] != null)) {
+              _context2.next = 23;
+              break;
+            }
+            _context2.next = 23;
+            return _awaitAsyncGenerator(_iterator["return"]());
+          case 23:
+            _context2.prev = 23;
+            if (!_didIteratorError) {
+              _context2.next = 26;
+              break;
+            }
+            throw _iteratorError;
+          case 26:
+            return _context2.finish(23);
+          case 27:
+            return _context2.finish(18);
+          case 28:
+          case "end":
+            return _context2.stop();
+        }
+      }, _callee, null, [[2, 14, 18, 28], [19,, 23, 27]]);
+    }));
+    return function readBytes(_x, _x2) {
+      return _ref.apply(this, arguments);
+    };
+  }();
+  var readStream = /*#__PURE__*/function () {
+    var _ref2 = _wrapAsyncGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(stream) {
+      var reader, _yield$_awaitAsyncGen, done, value;
+      return _regeneratorRuntime().wrap(function _callee2$(_context3) {
+        while (1) switch (_context3.prev = _context3.next) {
+          case 0:
+            if (!stream[Symbol.asyncIterator]) {
+              _context3.next = 3;
+              break;
+            }
+            return _context3.delegateYield(_asyncGeneratorDelegate(_asyncIterator(stream)), "t0", 2);
+          case 2:
+            return _context3.abrupt("return");
+          case 3:
+            reader = stream.getReader();
+            _context3.prev = 4;
+          case 5:
+            _context3.next = 7;
+            return _awaitAsyncGenerator(reader.read());
+          case 7:
+            _yield$_awaitAsyncGen = _context3.sent;
+            done = _yield$_awaitAsyncGen.done;
+            value = _yield$_awaitAsyncGen.value;
+            if (!done) {
+              _context3.next = 12;
+              break;
+            }
+            return _context3.abrupt("break", 16);
+          case 12:
+            _context3.next = 14;
+            return value;
+          case 14:
+            _context3.next = 5;
+            break;
+          case 16:
+            _context3.prev = 16;
+            _context3.next = 19;
+            return _awaitAsyncGenerator(reader.cancel());
+          case 19:
+            return _context3.finish(16);
+          case 20:
+          case "end":
+            return _context3.stop();
+        }
+      }, _callee2, null, [[4,, 16, 20]]);
+    }));
+    return function readStream(_x3) {
+      return _ref2.apply(this, arguments);
+    };
+  }();
+  var trackStream = function trackStream(stream, chunkSize, onProgress, onFinish) {
+    var iterator = readBytes(stream, chunkSize);
+    var bytes = 0;
+    var done;
+    var _onFinish = function _onFinish(e) {
+      if (!done) {
+        done = true;
+        onFinish && onFinish(e);
+      }
+    };
+    return new ReadableStream({
+      pull: function pull(controller) {
+        return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
+          var _yield$iterator$next, _done, value, len, loadedBytes;
+          return _regeneratorRuntime().wrap(function _callee3$(_context4) {
+            while (1) switch (_context4.prev = _context4.next) {
+              case 0:
+                _context4.prev = 0;
+                _context4.next = 3;
+                return iterator.next();
+              case 3:
+                _yield$iterator$next = _context4.sent;
+                _done = _yield$iterator$next.done;
+                value = _yield$iterator$next.value;
+                if (!_done) {
+                  _context4.next = 10;
+                  break;
+                }
+                _onFinish();
+                controller.close();
+                return _context4.abrupt("return");
+              case 10:
+                len = value.byteLength;
+                if (onProgress) {
+                  loadedBytes = bytes += len;
+                  onProgress(loadedBytes);
+                }
+                controller.enqueue(new Uint8Array(value));
+                _context4.next = 19;
+                break;
+              case 15:
+                _context4.prev = 15;
+                _context4.t0 = _context4["catch"](0);
+                _onFinish(_context4.t0);
+                throw _context4.t0;
+              case 19:
+              case "end":
+                return _context4.stop();
+            }
+          }, _callee3, null, [[0, 15]]);
+        }))();
+      },
+      cancel: function cancel(reason) {
+        _onFinish(reason);
+        return iterator["return"]();
+      }
+    }, {
+      highWaterMark: 2
+    });
+  };
+
+  var DEFAULT_CHUNK_SIZE = 64 * 1024;
+  var isFunction = utils$1.isFunction;
+  var globalFetchAPI = function (_ref) {
+    var Request = _ref.Request,
+      Response = _ref.Response;
+    return {
+      Request: Request,
+      Response: Response
+    };
+  }(utils$1.global);
+  var _utils$global = utils$1.global,
+    ReadableStream$1 = _utils$global.ReadableStream,
+    TextEncoder = _utils$global.TextEncoder;
+  var test = function test(fn) {
+    try {
+      for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
+        args[_key - 1] = arguments[_key];
+      }
+      return !!fn.apply(void 0, args);
+    } catch (e) {
+      return false;
+    }
+  };
+  var factory = function factory(env) {
+    env = utils$1.merge.call({
+      skipUndefined: true
+    }, globalFetchAPI, env);
+    var _env = env,
+      envFetch = _env.fetch,
+      Request = _env.Request,
+      Response = _env.Response;
+    var isFetchSupported = envFetch ? isFunction(envFetch) : typeof fetch === 'function';
+    var isRequestSupported = isFunction(Request);
+    var isResponseSupported = isFunction(Response);
+    if (!isFetchSupported) {
+      return false;
+    }
+    var isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
+    var encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? function (encoder) {
+      return function (str) {
+        return encoder.encode(str);
+      };
+    }(new TextEncoder()) : ( /*#__PURE__*/function () {
+      var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(str) {
+        return _regeneratorRuntime().wrap(function _callee$(_context) {
+          while (1) switch (_context.prev = _context.next) {
+            case 0:
+              _context.t0 = Uint8Array;
+              _context.next = 3;
+              return new Request(str).arrayBuffer();
+            case 3:
+              _context.t1 = _context.sent;
+              return _context.abrupt("return", new _context.t0(_context.t1));
+            case 5:
+            case "end":
+              return _context.stop();
+          }
+        }, _callee);
+      }));
+      return function (_x) {
+        return _ref2.apply(this, arguments);
+      };
+    }()));
+    var supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(function () {
+      var duplexAccessed = false;
+      var hasContentType = new Request(platform.origin, {
+        body: new ReadableStream$1(),
+        method: 'POST',
+        get duplex() {
+          duplexAccessed = true;
+          return 'half';
+        }
+      }).headers.has('Content-Type');
+      return duplexAccessed && !hasContentType;
+    });
+    var supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(function () {
+      return utils$1.isReadableStream(new Response('').body);
+    });
+    var resolvers = {
+      stream: supportsResponseStream && function (res) {
+        return res.body;
+      }
+    };
+    isFetchSupported && function () {
+      ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(function (type) {
+        !resolvers[type] && (resolvers[type] = function (res, config) {
+          var method = res && res[type];
+          if (method) {
+            return method.call(res);
+          }
+          throw new AxiosError("Response type '".concat(type, "' is not supported"), AxiosError.ERR_NOT_SUPPORT, config);
+        });
+      });
+    }();
+    var getBodyLength = /*#__PURE__*/function () {
+      var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body) {
+        var _request;
+        return _regeneratorRuntime().wrap(function _callee2$(_context2) {
+          while (1) switch (_context2.prev = _context2.next) {
+            case 0:
+              if (!(body == null)) {
+                _context2.next = 2;
+                break;
+              }
+              return _context2.abrupt("return", 0);
+            case 2:
+              if (!utils$1.isBlob(body)) {
+                _context2.next = 4;
+                break;
+              }
+              return _context2.abrupt("return", body.size);
+            case 4:
+              if (!utils$1.isSpecCompliantForm(body)) {
+                _context2.next = 9;
+                break;
+              }
+              _request = new Request(platform.origin, {
+                method: 'POST',
+                body: body
+              });
+              _context2.next = 8;
+              return _request.arrayBuffer();
+            case 8:
+              return _context2.abrupt("return", _context2.sent.byteLength);
+            case 9:
+              if (!(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body))) {
+                _context2.next = 11;
+                break;
+              }
+              return _context2.abrupt("return", body.byteLength);
+            case 11:
+              if (utils$1.isURLSearchParams(body)) {
+                body = body + '';
+              }
+              if (!utils$1.isString(body)) {
+                _context2.next = 16;
+                break;
+              }
+              _context2.next = 15;
+              return encodeText(body);
+            case 15:
+              return _context2.abrupt("return", _context2.sent.byteLength);
+            case 16:
+            case "end":
+              return _context2.stop();
+          }
+        }, _callee2);
+      }));
+      return function getBodyLength(_x2) {
+        return _ref3.apply(this, arguments);
+      };
+    }();
+    var resolveBodyLength = /*#__PURE__*/function () {
+      var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(headers, body) {
+        var length;
+        return _regeneratorRuntime().wrap(function _callee3$(_context3) {
+          while (1) switch (_context3.prev = _context3.next) {
+            case 0:
+              length = utils$1.toFiniteNumber(headers.getContentLength());
+              return _context3.abrupt("return", length == null ? getBodyLength(body) : length);
+            case 2:
+            case "end":
+              return _context3.stop();
+          }
+        }, _callee3);
+      }));
+      return function resolveBodyLength(_x3, _x4) {
+        return _ref4.apply(this, arguments);
+      };
+    }();
+    return /*#__PURE__*/function () {
+      var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(config) {
+        var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, _fetch, composedSignal, request, unsubscribe, requestContentLength, _request, contentTypeHeader, _progressEventDecorat, _progressEventDecorat2, onProgress, flush, isCredentialsSupported, resolvedOptions, response, isStreamResponse, options, responseContentLength, _ref6, _ref7, _onProgress, _flush, responseData;
+        return _regeneratorRuntime().wrap(function _callee4$(_context4) {
+          while (1) switch (_context4.prev = _context4.next) {
+            case 0:
+              _resolveConfig = resolveConfig(config), url = _resolveConfig.url, method = _resolveConfig.method, data = _resolveConfig.data, signal = _resolveConfig.signal, cancelToken = _resolveConfig.cancelToken, timeout = _resolveConfig.timeout, onDownloadProgress = _resolveConfig.onDownloadProgress, onUploadProgress = _resolveConfig.onUploadProgress, responseType = _resolveConfig.responseType, headers = _resolveConfig.headers, _resolveConfig$withCr = _resolveConfig.withCredentials, withCredentials = _resolveConfig$withCr === void 0 ? 'same-origin' : _resolveConfig$withCr, fetchOptions = _resolveConfig.fetchOptions;
+              _fetch = envFetch || fetch;
+              responseType = responseType ? (responseType + '').toLowerCase() : 'text';
+              composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
+              request = null;
+              unsubscribe = composedSignal && composedSignal.unsubscribe && function () {
+                composedSignal.unsubscribe();
+              };
+              _context4.prev = 6;
+              _context4.t0 = onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head';
+              if (!_context4.t0) {
+                _context4.next = 13;
+                break;
+              }
+              _context4.next = 11;
+              return resolveBodyLength(headers, data);
+            case 11:
+              _context4.t1 = requestContentLength = _context4.sent;
+              _context4.t0 = _context4.t1 !== 0;
+            case 13:
+              if (!_context4.t0) {
+                _context4.next = 17;
+                break;
+              }
+              _request = new Request(url, {
+                method: 'POST',
+                body: data,
+                duplex: "half"
+              });
+              if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
+                headers.setContentType(contentTypeHeader);
+              }
+              if (_request.body) {
+                _progressEventDecorat = progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))), _progressEventDecorat2 = _slicedToArray(_progressEventDecorat, 2), onProgress = _progressEventDecorat2[0], flush = _progressEventDecorat2[1];
+                data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
+              }
+            case 17:
+              if (!utils$1.isString(withCredentials)) {
+                withCredentials = withCredentials ? 'include' : 'omit';
+              }
+
+              // Cloudflare Workers throws when credentials are defined
+              // see https://github.com/cloudflare/workerd/issues/902
+              isCredentialsSupported = isRequestSupported && "credentials" in Request.prototype;
+              resolvedOptions = _objectSpread2(_objectSpread2({}, fetchOptions), {}, {
+                signal: composedSignal,
+                method: method.toUpperCase(),
+                headers: headers.normalize().toJSON(),
+                body: data,
+                duplex: "half",
+                credentials: isCredentialsSupported ? withCredentials : undefined
+              });
+              request = isRequestSupported && new Request(url, resolvedOptions);
+              _context4.next = 23;
+              return isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions);
+            case 23:
+              response = _context4.sent;
+              isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
+              if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
+                options = {};
+                ['status', 'statusText', 'headers'].forEach(function (prop) {
+                  options[prop] = response[prop];
+                });
+                responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
+                _ref6 = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [], _ref7 = _slicedToArray(_ref6, 2), _onProgress = _ref7[0], _flush = _ref7[1];
+                response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, _onProgress, function () {
+                  _flush && _flush();
+                  unsubscribe && unsubscribe();
+                }), options);
+              }
+              responseType = responseType || 'text';
+              _context4.next = 29;
+              return resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
+            case 29:
+              responseData = _context4.sent;
+              !isStreamResponse && unsubscribe && unsubscribe();
+              _context4.next = 33;
+              return new Promise(function (resolve, reject) {
+                settle(resolve, reject, {
+                  data: responseData,
+                  headers: AxiosHeaders$1.from(response.headers),
+                  status: response.status,
+                  statusText: response.statusText,
+                  config: config,
+                  request: request
+                });
+              });
+            case 33:
+              return _context4.abrupt("return", _context4.sent);
+            case 36:
+              _context4.prev = 36;
+              _context4.t2 = _context4["catch"](6);
+              unsubscribe && unsubscribe();
+              if (!(_context4.t2 && _context4.t2.name === 'TypeError' && /Load failed|fetch/i.test(_context4.t2.message))) {
+                _context4.next = 41;
+                break;
+              }
+              throw Object.assign(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request), {
+                cause: _context4.t2.cause || _context4.t2
+              });
+            case 41:
+              throw AxiosError.from(_context4.t2, _context4.t2 && _context4.t2.code, config, request);
+            case 42:
+            case "end":
+              return _context4.stop();
+          }
+        }, _callee4, null, [[6, 36]]);
+      }));
+      return function (_x5) {
+        return _ref5.apply(this, arguments);
+      };
+    }();
+  };
+  var seedCache = new Map();
+  var getFetch = function getFetch(config) {
+    var env = config && config.env || {};
+    var fetch = env.fetch,
+      Request = env.Request,
+      Response = env.Response;
+    var seeds = [Request, Response, fetch];
+    var 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;
+  };
+  getFetch();
+
+  /**
+   * Known adapters mapping.
+   * Provides environment-specific adapters for Axios:
+   * - `http` for Node.js
+   * - `xhr` for browsers
+   * - `fetch` for fetch API-based requests
+   * 
+   * @type {Object<string, Function|Object>}
+   */
+  var knownAdapters = {
+    http: httpAdapter,
+    xhr: xhrAdapter,
+    fetch: {
+      get: getFetch
+    }
+  };
+
+  // Assign adapter names for easier debugging and identification
+  utils$1.forEach(knownAdapters, function (fn, value) {
+    if (fn) {
+      try {
+        Object.defineProperty(fn, 'name', {
+          value: value
+        });
+      } catch (e) {
+        // eslint-disable-next-line no-empty
+      }
+      Object.defineProperty(fn, 'adapterName', {
+        value: value
+      });
+    }
+  });
+
+  /**
+   * Render a rejection reason string for unknown or unsupported adapters
+   * 
+   * @param {string} reason
+   * @returns {string}
+   */
+  var renderReason = function renderReason(reason) {
+    return "- ".concat(reason);
+  };
+
+  /**
+   * Check if the adapter is resolved (function, null, or false)
+   * 
+   * @param {Function|null|false} adapter
+   * @returns {boolean}
+   */
+  var isResolvedHandle = function isResolvedHandle(adapter) {
+    return utils$1.isFunction(adapter) || adapter === null || adapter === false;
+  };
+
+  /**
+   * Get the first suitable adapter from the provided list.
+   * Tries each adapter in order until a supported one is found.
+   * Throws an AxiosError if no adapter is suitable.
+   * 
+   * @param {Array<string|Function>|string|Function} adapters - Adapter(s) by name or function.
+   * @param {Object} config - Axios request configuration
+   * @throws {AxiosError} If no suitable adapter is available
+   * @returns {Function} The resolved adapter function
+   */
+  function getAdapter(adapters, config) {
+    adapters = utils$1.isArray(adapters) ? adapters : [adapters];
+    var _adapters = adapters,
+      length = _adapters.length;
+    var nameOrAdapter;
+    var adapter;
+    var rejectedReasons = {};
+    for (var i = 0; i < length; i++) {
+      nameOrAdapter = adapters[i];
+      var id = void 0;
+      adapter = nameOrAdapter;
+      if (!isResolvedHandle(nameOrAdapter)) {
+        adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
+        if (adapter === undefined) {
+          throw new AxiosError("Unknown adapter '".concat(id, "'"));
+        }
+      }
+      if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
+        break;
+      }
+      rejectedReasons[id || '#' + i] = adapter;
+    }
+    if (!adapter) {
+      var reasons = Object.entries(rejectedReasons).map(function (_ref) {
+        var _ref2 = _slicedToArray(_ref, 2),
+          id = _ref2[0],
+          state = _ref2[1];
+        return "adapter ".concat(id, " ") + (state === false ? 'is not supported by the environment' : 'is not available in the build');
+      });
+      var s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
+      throw new AxiosError("There is no suitable adapter to dispatch the request " + s, 'ERR_NOT_SUPPORT');
+    }
+    return adapter;
+  }
+
+  /**
+   * Exports Axios adapters and utility to resolve an adapter
+   */
+  var adapters = {
+    /**
+     * Resolve an adapter from a list of adapter names or functions.
+     * @type {Function}
+     */
+    getAdapter: getAdapter,
+    /**
+     * Exposes all known adapters
+     * @type {Object<string, Function|Object>}
+     */
+    adapters: knownAdapters
+  };
+
+  /**
+   * 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(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);
+
+    // Transform request data
+    config.data = transformData.call(config, config.transformRequest);
+    if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
+      config.headers.setContentType('application/x-www-form-urlencoded', false);
+    }
+    var adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config);
+    return adapter(config).then(function onAdapterResolution(response) {
+      throwIfCancellationRequested(config);
+
+      // Transform response data
+      response.data = transformData.call(config, config.transformResponse, response);
+      response.headers = AxiosHeaders$1.from(response.headers);
+      return response;
+    }, function onAdapterRejection(reason) {
+      if (!isCancel(reason)) {
+        throwIfCancellationRequested(config);
+
+        // Transform response data
+        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);
+    });
+  }
+
+  var VERSION = "1.13.2";
+
+  var validators$1 = {};
+
+  // eslint-disable-next-line func-names
+  ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function (type, i) {
+    validators$1[type] = function validator(thing) {
+      return _typeof(thing) === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
+    };
+  });
+  var 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 + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
+    }
+
+    // eslint-disable-next-line func-names
+    return function (value, opt, opts) {
+      if (validator === false) {
+        throw new AxiosError(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError.ERR_DEPRECATED);
+      }
+      if (version && !deprecatedWarnings[opt]) {
+        deprecatedWarnings[opt] = true;
+        // eslint-disable-next-line no-console
+        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 function (value, opt) {
+      // eslint-disable-next-line no-console
+      console.warn("".concat(opt, " is likely a misspelling of ").concat(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('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
+    }
+    var keys = Object.keys(options);
+    var i = keys.length;
+    while (i-- > 0) {
+      var opt = keys[i];
+      var validator = schema[opt];
+      if (validator) {
+        var value = options[opt];
+        var result = value === undefined || validator(value, opt, options);
+        if (result !== true) {
+          throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
+        }
+        continue;
+      }
+      if (allowUnknown !== true) {
+        throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
+      }
+    }
+  }
+  var validator = {
+    assertOptions: assertOptions,
+    validators: validators$1
+  };
+
+  var validators = validator.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 = /*#__PURE__*/function () {
+    function Axios(instanceConfig) {
+      _classCallCheck(this, Axios);
+      this.defaults = instanceConfig || {};
+      this.interceptors = {
+        request: new InterceptorManager$1(),
+        response: new InterceptorManager$1()
+      };
+    }
+
+    /**
+     * 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
+     */
+    _createClass(Axios, [{
+      key: "request",
+      value: (function () {
+        var _request2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(configOrUrl, config) {
+          var dummy, stack;
+          return _regeneratorRuntime().wrap(function _callee$(_context) {
+            while (1) switch (_context.prev = _context.next) {
+              case 0:
+                _context.prev = 0;
+                _context.next = 3;
+                return this._request(configOrUrl, config);
+              case 3:
+                return _context.abrupt("return", _context.sent);
+              case 6:
+                _context.prev = 6;
+                _context.t0 = _context["catch"](0);
+                if (_context.t0 instanceof Error) {
+                  dummy = {};
+                  Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
+
+                  // slice off the Error: ... line
+                  stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
+                  try {
+                    if (!_context.t0.stack) {
+                      _context.t0.stack = stack;
+                      // match without the 2 top stack lines
+                    } else if (stack && !String(_context.t0.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
+                      _context.t0.stack += '\n' + stack;
+                    }
+                  } catch (e) {
+                    // ignore the case where "stack" is an un-writable property
+                  }
+                }
+                throw _context.t0;
+              case 10:
+              case "end":
+                return _context.stop();
+            }
+          }, _callee, this, [[0, 6]]);
+        }));
+        function request(_x, _x2) {
+          return _request2.apply(this, arguments);
+        }
+        return request;
+      }())
+    }, {
+      key: "_request",
+      value: function _request(configOrUrl, config) {
+        /*eslint no-param-reassign:0*/
+        // Allow for axios('example/url'[, config]) a la fetch API
+        if (typeof configOrUrl === 'string') {
+          config = config || {};
+          config.url = configOrUrl;
+        } else {
+          config = configOrUrl || {};
+        }
+        config = mergeConfig(this.defaults, config);
+        var _config = config,
+          transitional = _config.transitional,
+          paramsSerializer = _config.paramsSerializer,
+          headers = _config.headers;
+        if (transitional !== undefined) {
+          validator.assertOptions(transitional, {
+            silentJSONParsing: validators.transitional(validators["boolean"]),
+            forcedJSONParsing: validators.transitional(validators["boolean"]),
+            clarifyTimeoutError: validators.transitional(validators["boolean"])
+          }, false);
+        }
+        if (paramsSerializer != null) {
+          if (utils$1.isFunction(paramsSerializer)) {
+            config.paramsSerializer = {
+              serialize: paramsSerializer
+            };
+          } else {
+            validator.assertOptions(paramsSerializer, {
+              encode: validators["function"],
+              serialize: validators["function"]
+            }, true);
+          }
+        }
+
+        // Set config.allowAbsoluteUrls
+        if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
+          config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
+        } else {
+          config.allowAbsoluteUrls = true;
+        }
+        validator.assertOptions(config, {
+          baseUrl: validators.spelling('baseURL'),
+          withXsrfToken: validators.spelling('withXSRFToken')
+        }, true);
+
+        // Set config.method
+        config.method = (config.method || this.defaults.method || 'get').toLowerCase();
+
+        // Flatten headers
+        var contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
+        headers && utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function (method) {
+          delete headers[method];
+        });
+        config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
+
+        // filter out skipped interceptors
+        var requestInterceptorChain = [];
+        var 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);
+        });
+        var responseInterceptorChain = [];
+        this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
+          responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
+        });
+        var promise;
+        var i = 0;
+        var len;
+        if (!synchronousRequestInterceptors) {
+          var chain = [dispatchRequest.bind(this), undefined];
+          chain.unshift.apply(chain, requestInterceptorChain);
+          chain.push.apply(chain, responseInterceptorChain);
+          len = chain.length;
+          promise = Promise.resolve(config);
+          while (i < len) {
+            promise = promise.then(chain[i++], chain[i++]);
+          }
+          return promise;
+        }
+        len = requestInterceptorChain.length;
+        var newConfig = config;
+        while (i < len) {
+          var onFulfilled = requestInterceptorChain[i++];
+          var 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;
+      }
+    }, {
+      key: "getUri",
+      value: function getUri(config) {
+        config = mergeConfig(this.defaults, config);
+        var fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
+        return buildURL(fullPath, config.params, config.paramsSerializer);
+      }
+    }]);
+    return Axios;
+  }(); // Provide aliases for supported request methods
+  utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
+    /*eslint func-names:0*/
+    Axios.prototype[method] = function (url, config) {
+      return this.request(mergeConfig(config || {}, {
+        method: method,
+        url: url,
+        data: (config || {}).data
+      }));
+    };
+  });
+  utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
+    /*eslint func-names:0*/
+
+    function generateHTTPMethod(isForm) {
+      return function httpMethod(url, data, config) {
+        return this.request(mergeConfig(config || {}, {
+          method: method,
+          headers: isForm ? {
+            'Content-Type': 'multipart/form-data'
+          } : {},
+          url: url,
+          data: data
+        }));
+      };
+    }
+    Axios.prototype[method] = generateHTTPMethod();
+    Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
+  });
+  var Axios$1 = Axios;
+
+  /**
+   * 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 = /*#__PURE__*/function () {
+    function CancelToken(executor) {
+      _classCallCheck(this, CancelToken);
+      if (typeof executor !== 'function') {
+        throw new TypeError('executor must be a function.');
+      }
+      var resolvePromise;
+      this.promise = new Promise(function promiseExecutor(resolve) {
+        resolvePromise = resolve;
+      });
+      var token = this;
+
+      // eslint-disable-next-line func-names
+      this.promise.then(function (cancel) {
+        if (!token._listeners) return;
+        var i = token._listeners.length;
+        while (i-- > 0) {
+          token._listeners[i](cancel);
+        }
+        token._listeners = null;
+      });
+
+      // eslint-disable-next-line func-names
+      this.promise.then = function (onfulfilled) {
+        var _resolve;
+        // eslint-disable-next-line func-names
+        var promise = new Promise(function (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) {
+          // Cancellation has already been requested
+          return;
+        }
+        token.reason = new CanceledError(message, config, request);
+        resolvePromise(token.reason);
+      });
+    }
+
+    /**
+     * Throws a `CanceledError` if cancellation has been requested.
+     */
+    _createClass(CancelToken, [{
+      key: "throwIfRequested",
+      value: function throwIfRequested() {
+        if (this.reason) {
+          throw this.reason;
+        }
+      }
+
+      /**
+       * Subscribe to the cancel signal
+       */
+    }, {
+      key: "subscribe",
+      value: function 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
+       */
+    }, {
+      key: "unsubscribe",
+      value: function unsubscribe(listener) {
+        if (!this._listeners) {
+          return;
+        }
+        var index = this._listeners.indexOf(listener);
+        if (index !== -1) {
+          this._listeners.splice(index, 1);
+        }
+      }
+    }, {
+      key: "toAbortSignal",
+      value: function toAbortSignal() {
+        var _this = this;
+        var controller = new AbortController();
+        var abort = function abort(err) {
+          controller.abort(err);
+        };
+        this.subscribe(abort);
+        controller.signal.unsubscribe = function () {
+          return _this.unsubscribe(abort);
+        };
+        return controller.signal;
+      }
+
+      /**
+       * Returns an object that contains a new `CancelToken` and a function that, when called,
+       * cancels the `CancelToken`.
+       */
+    }], [{
+      key: "source",
+      value: function source() {
+        var cancel;
+        var token = new CancelToken(function executor(c) {
+          cancel = c;
+        });
+        return {
+          token: token,
+          cancel: cancel
+        };
+      }
+    }]);
+    return CancelToken;
+  }();
+  var CancelToken$1 = CancelToken;
+
+  /**
+   * 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(callback) {
+    return function wrap(arr) {
+      return callback.apply(null, arr);
+    };
+  }
+
+  /**
+   * 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(payload) {
+    return utils$1.isObject(payload) && payload.isAxiosError === true;
+  }
+
+  var HttpStatusCode = {
+    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,
+    WebServerIsDown: 521,
+    ConnectionTimedOut: 522,
+    OriginIsUnreachable: 523,
+    TimeoutOccurred: 524,
+    SslHandshakeFailed: 525,
+    InvalidSslCertificate: 526
+  };
+  Object.entries(HttpStatusCode).forEach(function (_ref) {
+    var _ref2 = _slicedToArray(_ref, 2),
+      key = _ref2[0],
+      value = _ref2[1];
+    HttpStatusCode[value] = key;
+  });
+  var HttpStatusCode$1 = HttpStatusCode;
+
+  /**
+   * Create an instance of Axios
+   *
+   * @param {Object} defaultConfig The default config for the instance
+   *
+   * @returns {Axios} A new instance of Axios
+   */
+  function createInstance(defaultConfig) {
+    var context = new Axios$1(defaultConfig);
+    var instance = bind(Axios$1.prototype.request, context);
+
+    // Copy axios.prototype to instance
+    utils$1.extend(instance, Axios$1.prototype, context, {
+      allOwnKeys: true
+    });
+
+    // Copy context to instance
+    utils$1.extend(instance, context, null, {
+      allOwnKeys: true
+    });
+
+    // Factory for creating new instances
+    instance.create = function create(instanceConfig) {
+      return createInstance(mergeConfig(defaultConfig, instanceConfig));
+    };
+    return instance;
+  }
+
+  // Create the default instance to be exported
+  var axios = createInstance(defaults$1);
+
+  // Expose Axios class to allow class inheritance
+  axios.Axios = Axios$1;
+
+  // Expose Cancel & CancelToken
+  axios.CanceledError = CanceledError;
+  axios.CancelToken = CancelToken$1;
+  axios.isCancel = isCancel;
+  axios.VERSION = VERSION;
+  axios.toFormData = toFormData;
+
+  // Expose AxiosError class
+  axios.AxiosError = AxiosError;
+
+  // alias for CanceledError for backward compatibility
+  axios.Cancel = axios.CanceledError;
+
+  // Expose all/spread
+  axios.all = function all(promises) {
+    return Promise.all(promises);
+  };
+  axios.spread = spread;
+
+  // Expose isAxiosError
+  axios.isAxiosError = isAxiosError;
+
+  // Expose mergeConfig
+  axios.mergeConfig = mergeConfig;
+  axios.AxiosHeaders = AxiosHeaders$1;
+  axios.formToJSON = function (thing) {
+    return formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
+  };
+  axios.getAdapter = adapters.getAdapter;
+  axios.HttpStatusCode = HttpStatusCode$1;
+  axios["default"] = axios;
+
+  return axios;
+
+}));
+//# sourceMappingURL=axios.js.map

Some files were not shown because too many files changed in this diff