瀏覽代碼

first commit

ith5cn 1 月之前
當前提交
ed6eddc391
共有 100 個文件被更改,包括 7476 次插入0 次删除
  1. 12 0
      .env
  2. 30 0
      .gitignore
  3. 15 0
      .vscode/launch.json
  4. 11 0
      api/auth.api.ts
  5. 7 0
      api/init.api.ts
  6. 27 0
      api/order.api.ts
  7. 5 0
      api/report.api.ts
  8. 5 0
      api/safe.api.ts
  9. 6 0
      api/share.api.ts
  10. 二進制
      core/.DS_Store
  11. 二進制
      core/auth/.DS_Store
  12. 31 0
      core/auth/index.ts
  13. 74 0
      core/auth/server/server-auth.ts
  14. 22 0
      core/auth/wechat/wechat-auth.ts
  15. 二進制
      core/init/.DS_Store
  16. 25 0
      core/init/dnsdk/dnsdk-init.ts
  17. 21 0
      core/init/index.ts
  18. 25 0
      core/init/query/url-query.ts
  19. 272 0
      core/payment/index.ts
  20. 47 0
      core/role/index.ts
  21. 9 0
      core/role/role.interface.ts
  22. 5 0
      core/safe/index.ts
  23. 14 0
      core/safe/text.ts
  24. 169 0
      core/share/index.ts
  25. 0 0
      dist/wxxyx-sdk.1.0.0.js
  26. 147 0
      game.js
  27. 4 0
      game.json
  28. 6 0
      index.ts
  29. 44 0
      lib/DnSdk.js
  30. 97 0
      lib/checkOrderAndReport.js
  31. 542 0
      lib/dn-sdk-minigame/index.d.ts
  32. 5 0
      lib/dn-sdk-minigame/index.js
  33. 683 0
      lib/md5.js
  34. 21 0
      node_modules/.bin/terser
  35. 12 0
      node_modules/.bin/terser.CMD
  36. 41 0
      node_modules/.bin/terser.ps1
  37. 21 0
      node_modules/.bin/vite
  38. 12 0
      node_modules/.bin/vite.CMD
  39. 41 0
      node_modules/.bin/vite.ps1
  40. 124 0
      node_modules/.modules.yaml
  41. 25 0
      node_modules/.pnpm-workspace-state-v1.json
  42. 7 0
      node_modules/.pnpm/@dn-sdk+minigame@1.5.6/node_modules/@dn-sdk/minigame/README.md
  43. 5 0
      node_modules/.pnpm/@dn-sdk+minigame@1.5.6/node_modules/@dn-sdk/minigame/build/index.cjs.js
  44. 542 0
      node_modules/.pnpm/@dn-sdk+minigame@1.5.6/node_modules/@dn-sdk/minigame/build/index.d.ts
  45. 5 0
      node_modules/.pnpm/@dn-sdk+minigame@1.5.6/node_modules/@dn-sdk/minigame/build/index.js
  46. 5 0
      node_modules/.pnpm/@dn-sdk+minigame@1.5.6/node_modules/@dn-sdk/minigame/build/index.umd.js
  47. 14 0
      node_modules/.pnpm/@dn-sdk+minigame@1.5.6/node_modules/@dn-sdk/minigame/package.json
  48. 3 0
      node_modules/.pnpm/@esbuild+win32-x64@0.27.2/node_modules/@esbuild/win32-x64/README.md
  49. 二進制
      node_modules/.pnpm/@esbuild+win32-x64@0.27.2/node_modules/@esbuild/win32-x64/esbuild.exe
  50. 20 0
      node_modules/.pnpm/@esbuild+win32-x64@0.27.2/node_modules/@esbuild/win32-x64/package.json
  51. 19 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/LICENSE
  52. 227 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/README.md
  53. 292 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
  54. 3 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map
  55. 358 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js
  56. 3 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map
  57. 88 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts
  58. 32 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/types/set-array.d.ts
  59. 12 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts
  60. 43 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts
  61. 67 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/package.json
  62. 614 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts
  63. 82 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/src/set-array.ts
  64. 16 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts
  65. 61 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/src/types.ts
  66. 89 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts
  67. 0 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map
  68. 89 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts
  69. 0 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map
  70. 33 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts
  71. 1 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map
  72. 33 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts
  73. 1 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map
  74. 13 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts
  75. 1 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map
  76. 13 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts
  77. 1 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map
  78. 44 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/types.d.cts
  79. 1 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/types.d.cts.map
  80. 44 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/types.d.mts
  81. 1 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/types.d.mts.map
  82. 19 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/LICENSE
  83. 264 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/README.md
  84. 423 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
  85. 3 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map
  86. 464 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js
  87. 3 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map
  88. 63 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/package.json
  89. 345 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts
  90. 111 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts
  91. 65 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/src/strings.ts
  92. 55 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts
  93. 50 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts
  94. 1 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map
  95. 50 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts
  96. 1 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map
  97. 9 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts
  98. 1 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map
  99. 9 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts
  100. 1 0
      node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map

+ 12 - 0
.env

@@ -0,0 +1,12 @@
+# 版本号
+SDK_VERSION='1.0.0'
+SDK_AGENT_ID_IOS='1000'
+SDK_AGENT_ID_ANDROID='1000'
+SDK_SITE_ID_IOS='1000'
+SDK_SITE_ID_ANDROID='1000'
+
+# 秘钥
+SDK_VITE_KEY='03fb565b8c319ceb3192f89cf11c0cc7'
+
+# 接口地址
+SDK_API_BASE='https://sdk-api.gzshisan.com'

+ 30 - 0
.gitignore

@@ -0,0 +1,30 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+.DS_Store
+dist
+dist-ssr
+coverage
+*.local
+
+/cypress/videos/
+/cypress/screenshots/
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
+
+*.tsbuildinfo

+ 15 - 0
.vscode/launch.json

@@ -0,0 +1,15 @@
+{
+    // 使用 IntelliSense 了解相关属性。 
+    // 悬停以查看现有属性的描述。
+    // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
+    "version": "0.2.0",
+    "configurations": [
+        {
+            "type": "pwa-chrome",
+            "request": "launch",
+            "name": "Launch Chrome against localhost",
+            "url": "http://localhost:8080",
+            "webRoot": "${workspaceFolder}"
+        }
+    ]
+}

+ 11 - 0
api/auth.api.ts

@@ -0,0 +1,11 @@
+import httpClient from "../utils/httpClient";
+import { UserInfoInterface } from "../store/models/user.model";
+
+/**
+ * 服务端登录
+ * @param data 
+ * @returns 
+ */
+export const serverLoginApi = (data: any): Promise<UserInfoInterface> => {
+  return httpClient.post<UserInfoInterface>("/sdk/auth/third_login",data);
+};

+ 7 - 0
api/init.api.ts

@@ -0,0 +1,7 @@
+
+import { DNSDKConfig } from "../store/models/dnsdkConfig.model"
+import httpClient from "../utils/httpClient"
+
+export const getDnsdkConfigApi =async () => {
+    return await httpClient.post<DNSDKConfig>("/sdk/wx/dn_sdk_config")
+}

+ 27 - 0
api/order.api.ts

@@ -0,0 +1,27 @@
+import httpClient from "../utils/httpClient";
+
+/**
+ * 创建订单
+ * @param data 
+ * @returns 
+ */
+export const createOrderApi = (data: any): Promise<any> => {
+    return httpClient.post("/payment/order/create", data);
+};
+
+/**
+ * 订单支付
+ * @param data 
+ * @returns 
+ */
+export const paymentApi = (data: any): Promise<any> => {
+    return httpClient.post("/payment/order/pay", data);
+};
+
+
+/**
+ * 订单回调
+ */
+export const orderNotifyApi = (payChannelId: any, data: any): Promise<any> => {
+    return httpClient.post(`/payment/notify/${payChannelId}`, data);
+};

+ 5 - 0
api/report.api.ts

@@ -0,0 +1,5 @@
+import httpClient from "../utils/httpClient";
+
+export const reportApi = async (data: any): Promise<any> => {
+  return await httpClient.post("/sdk/role/report", data);
+};

+ 5 - 0
api/safe.api.ts

@@ -0,0 +1,5 @@
+import httpClient from "../utils/httpClient";
+
+export const secCheckTextApi = (data: any): Promise<any> => {
+  return httpClient.post("/sdk/wx/msg_sec_check", data);
+};

+ 6 - 0
api/share.api.ts

@@ -0,0 +1,6 @@
+import { ShareConfig } from "../store/models/shareConfig.model";
+import httpClient from "../utils/httpClient";
+
+export const getShareConfigApi = () => {
+    return httpClient.get<ShareConfig[]>("/sdk/wx/share_config");
+}

二進制
core/.DS_Store


二進制
core/auth/.DS_Store


+ 31 - 0
core/auth/index.ts

@@ -0,0 +1,31 @@
+import { serverLogin } from "./server/server-auth"
+import { silentLogin } from "./wechat/wechat-auth"
+import checkOrderAndReport from "../../lib/checkOrderAndReport"
+import UserInfoModel from "../../store/models/user.model"
+
+export const authLogin = async () => {
+    // 微信登录
+    const wechatUserInfo = await silentLogin()
+    // 服务端登录
+    const loginInfo = await serverLogin(wechatUserInfo)
+    // 检查是否有订单需要上报到腾讯广告小游戏SDK
+    checkOrderAndReport.getInstance().run()
+
+    return Promise.resolve(loginInfo)
+}
+
+/**
+ * 获取当前登录用户信息
+ */
+export const getCurrentUserInfo = () => {
+    try {
+        let userInfo = UserInfoModel.getInstance().get();
+        let launchOptions = wx.getLaunchOptionsSync();
+        let query = launchOptions.query;
+        const share_ext = query.share_ext;
+        userInfo.share_ext = share_ext ? share_ext : "";
+        return Promise.resolve(userInfo);
+    } catch (error) {
+        return Promise.reject(error);
+    }
+}

+ 74 - 0
core/auth/server/server-auth.ts

@@ -0,0 +1,74 @@
+import { serverLoginApi } from "../../../api/auth.api";
+import DnSdk from "../../../lib/DnSdk.js";
+import UserInfoModel, { UserInfoInterface } from "../../../store/models/user.model";
+import { silentLogin } from "../wechat/wechat-auth";
+import { to } from "../../../utils/helper";
+import URLQueryModel from "../../../store/models/urlQuery.model";
+
+/**
+ * 服务端登录
+ * @param wxloginInfo 微信登录信息
+ * @returns Promise
+ */
+export const serverLogin = (wxloginInfo) => {
+  return new Promise(async (resolve, reject) => {
+    // 获取链接上的参数
+    const urlQuery = URLQueryModel.getInstance().get()
+    let params = {
+      channel: "wxxyx",
+      code: wxloginInfo.code,
+      gdt_vid: urlQuery.gdt_vid,
+      weixinadinfo: urlQuery.weixinadinfo,
+    };
+
+    const serverLoginRes: UserInfoInterface = await serverLoginApi(params)
+
+    //用户态存缓存下次进游戏可以直接拿
+    UserInfoModel.getInstance().save(serverLoginRes);
+
+    // 弹框公告
+    if (serverLoginRes.pop_content) {
+      wx.showModal({
+        title: serverLoginRes.pop_title ? serverLoginRes.pop_title : "登录提示",
+        content: serverLoginRes.pop_content,
+        complete(res) {
+          console.log(res);
+        },
+      });
+    }
+
+    // 腾讯广告小游戏SDK设置openid
+    const dSdk = DnSdk.getInstance();
+
+    dSdk.setOpenId(serverLoginRes.openid);
+
+    if (serverLoginRes.is_first_login) {
+      // 是否新用户
+      dSdk.onRegister();
+    } else if (serverLoginRes.is_reactive_user) {
+      // 是否回归用户
+      dSdk.track("RE_ACTIVE");
+    }
+
+    resolve(serverLoginRes);
+  });
+};
+
+
+/**
+ * @description: 重新登录
+ * @return {*}
+ */
+export const relogin = async () => {
+  let err, res;
+  //静默授权
+  [err, res] = await to(silentLogin());
+  if (err) {
+    return Promise.reject(err);
+  }
+  [err, res] = await to(serverLogin(res));
+  if (err) {
+    return Promise.reject(err);
+  }
+  return Promise.resolve();
+};

+ 22 - 0
core/auth/wechat/wechat-auth.ts

@@ -0,0 +1,22 @@
+/**
+ * 静默获取用户信息
+ * @returns Promise
+ */
+export const silentLogin = () => {
+  return new Promise((resolve, reject) => {
+    // 执行微信登录
+    wx.login({
+      success(loginRes) {
+        let wxLoginReUserInfo = {
+          code: loginRes.code
+        };
+        resolve(wxLoginReUserInfo);
+      },
+      fail(error) {
+        // 微信登录失败异常
+        reject(error.errMsg);
+      },
+    });
+  });
+};
+

二進制
core/init/.DS_Store


+ 25 - 0
core/init/dnsdk/dnsdk-init.ts

@@ -0,0 +1,25 @@
+import { getDnsdkConfigApi } from "../../../api/init.api";
+import DNSDKConfigModel from "../../../store/models/dnsdkConfig.model";
+import DnSdk from "../../../lib/DnSdk";
+import GameConfigModel from "../../../store/models/gameConfig.model";
+
+/**
+ * 初始化腾讯广告小游戏SDK
+ */
+export const dnsdkInit = async () => {
+    const dnSdkRes = await getDnsdkConfigApi();
+    return new Promise((resolve,reject)=>{
+        if (dnSdkRes) {
+                DNSDKConfigModel.getInstance().save(dnSdkRes);
+                // 腾讯广告小游戏SDK要求尽早初始化(使用单例模式)
+                DnSdk.init({
+                    user_action_set_id: dnSdkRes.dn_source_id,
+                    secret_key: dnSdkRes.dn_source_secret,
+                    appid: GameConfigModel.getInstance().get().mini_program_id,
+                });
+                resolve({code:0,message:"成功"})
+        }else{
+            reject({code:-1,message:"失败"})
+        }
+    })
+}

+ 21 - 0
core/init/index.ts

@@ -0,0 +1,21 @@
+import GameConfigModel, { GameConfig } from "../../store/models/gameConfig.model";
+import { checkMissingParams } from "../../utils/helper";
+import { openSystemShare } from "../share/index";
+import { dnsdkInit } from "./dnsdk/dnsdk-init";
+import { getUrlQuery } from "./query/url-query";
+
+export const init = async (gameConfig: GameConfig) => {
+    const missingKeys = checkMissingParams(gameConfig, ['mini_program_id', 'version', 'game_id', 'game_name']);
+
+    if (missingKeys.length > 0) {
+        throw new Error(`SDK init error: missing params: ${missingKeys.join(', ')}`);
+    }
+
+   
+    GameConfigModel.getInstance().save(gameConfig);
+    await getUrlQuery() // 获取url参数
+    await dnsdkInit() //腾讯广告小游戏SDK初始化
+    await openSystemShare() //开启系统分享
+
+    return Promise.resolve()
+}

+ 25 - 0
core/init/query/url-query.ts

@@ -0,0 +1,25 @@
+import URLQueryModel, { URLQuery } from "../../../store/models/urlQuery.model";
+
+/**
+ * 获取url中的query参数
+ * @returns Promise<URLQuery>
+ */
+export const getUrlQuery = () => {
+   return new Promise((resolve, reject) => {
+      // 获取url中的query参数
+      let launchOptions = wx.getEnterOptionsSync();
+      let query = launchOptions.query;
+
+
+      let urlQuery: URLQuery = {
+         agent_id:query.agent_id|| 0,
+         site_id:query.site_id || 0,
+         queryStr: JSON.stringify(query),
+         gdt_vid: query.gdt_vid||'',
+         weixinadinfo: query.weixinadinfo||''
+      }
+
+      URLQueryModel.getInstance().save(urlQuery);
+      resolve(urlQuery)
+   })
+}

+ 272 - 0
core/payment/index.ts

@@ -0,0 +1,272 @@
+import { createOrderApi, orderNotifyApi, paymentApi } from "../../api/order.api";
+import { getDeviceInfo } from "../../utils/wechat";
+import DnSdk from "../../lib/DnSdk";
+import { setStorage } from "../../store";
+import { throttle, unixTimestamp } from "../../utils/helper";
+import UserInfoModel from "../../store/models/user.model";
+import { silentLogin } from "../auth/wechat/wechat-auth";
+import { serverLogin } from "../auth/server/server-auth";
+
+/**
+ * 创建订单
+ * @param orderData 订单信息
+ */
+export const createOrder = async (orderData) => {
+    try {
+        let { cp_order_id, money, product_id, product_name, server_id, server_name, role_id, role_name, role_level, ext } = orderData;
+
+        // 创建订单
+
+        const createOrderResult = await createOrderApi({
+            cp_order_id,
+            money,
+            product_id,
+            product_name,
+            server_id,
+            server_name,
+            role_id,
+            role_name,
+            role_level,
+            ext,
+        })
+        const { inapp, wechat_jsapi } = createOrderResult.pay_channel;
+
+
+        console.log("createOrderResult", createOrderResult)
+
+
+        let midasPayParams = {}
+        let gzhPayParams = {}
+
+        const payUrlRes = await getPayUrl(createOrderResult)
+
+        const curOrderInfo = {
+            ...payUrlRes,
+            pay_type: inapp ? "midas" : wechat_jsapi ? "kf" : "",
+            ext,
+            money,
+            order_id: createOrderResult.order_id,
+            inapp,
+            product_name
+        }
+
+
+        if (inapp) {
+            midasPayParams = typeof payUrlRes !== 'undefined' ? { ...payUrlRes, pay_type: "midas" } : {}
+        }
+
+
+        if (wechat_jsapi) {
+            let from = { "order_id": createOrderResult.order_id, pay_channel_id: wechat_jsapi }
+            gzhPayParams = {
+                sessionFrom: JSON.stringify(from),
+                showMessageCard: true,
+                sendMessagePath: "",
+                sendMessageTitle: "",
+                sendMessageImage: `${import.meta.env.SDK_API_BASE}/img/pay.png`,
+                pay_type: "w_gzh"
+            }
+        }
+
+        return Promise.resolve({
+            midasPayParams,
+            gzhPayParams,
+            curOrderInfo
+        })
+    } catch (error) {
+        return Promise.reject(error)
+    }
+
+}
+
+
+/**
+ * 获取支付链接
+ */
+const getPayUrl = async (createOrderResult) => {
+    const platform = getDeviceInfo('platform')
+    if (platform === 'ios') {
+        return Promise.resolve({})
+    }
+    try {
+        let params = {
+            order_id: createOrderResult.order_id,
+            pay_channel_id: createOrderResult.pay_channel.inapp ? createOrderResult.pay_channel.inapp : createOrderResult.pay_channel.wechat_jsapi
+        }
+
+        const payUrlRes = await paymentApi(params)
+        return Promise.resolve(payUrlRes)
+    } catch (error) {
+        return Promise.reject(error)
+    }
+}
+
+/**
+ * 拉起支付
+ * @param curOrderInfo 订单信息
+ * @param gzhPayParams 公众号支付参数
+ */
+const makePay = async ({ curOrderInfo, gzhPayParams }) => {
+    const platform = getDeviceInfo('platform')
+    if (curOrderInfo.pay_type === "midas") {
+        if ("ios" === platform) {
+            return Promise.resolve("MIDAS_IOS");
+        } else {
+            // return Promise.resolve();
+            wx.checkSession({
+                success() {
+                    return Promise.resolve();
+                },
+                fail() {
+                    UserInfoModel.getInstance().clear();
+                    // 获取用户信息
+                    silentLogin()
+                        .then(function (silentLoginRes) {
+                            serverLogin(silentLoginRes)
+                                .then(function () {
+                                    return Promise.resolve();
+                                })
+                                .catch((error) => {
+                                    return Promise.reject(error);
+                                });
+                        })
+                        .catch((error) => {
+                            return Promise.reject(error);
+                        });
+                },
+            });
+        }
+    } else if (curOrderInfo.pay_type === "kf") {
+       
+        // 拉起客服消息
+        wx.openCustomerServiceConversation({
+            sessionFrom: gzhPayParams.sessionFrom,
+            showMessageCard: gzhPayParams.showMessageCard,
+            sendMessagePath: gzhPayParams.sendMessagePath,
+            sendMessageTitle: gzhPayParams.sendMessageTitle,
+            sendMessageImg: gzhPayParams.sendMessageImage,
+        });
+        console.log("kfkkk===>",{
+            sessionFrom: gzhPayParams.sessionFrom,
+            showMessageCard: gzhPayParams.showMessageCard,
+            sendMessagePath: gzhPayParams.sendMessagePath,
+            sendMessageTitle: gzhPayParams.sendMessageTitle,
+            sendMessageImg: gzhPayParams.sendMessageImage,
+        })
+        return Promise.resolve("CUSTOMER");
+    }
+}
+const midasPay = async ({ curOrderInfo, midasPayParams }) => {
+
+    let platform = getDeviceInfo('platform')
+    try {
+        wx.requestMidasPayment({
+            mode: "game",
+            env: midasPayParams.env,
+            offerId: midasPayParams.offerId,
+            currencyType: "CNY",
+            platform: platform,
+            buyQuantity: midasPayParams.buyQuantity,
+            amt: curOrderInfo.money,
+            zoneId: midasPayParams.zoneId,
+            outTradeNo: curOrderInfo.order_id,
+            success: (res) => {
+                // 腾讯广告小游戏SDK上报支付
+                DnSdk.getInstance().onPurchase(curOrderInfo.money * 100);
+                // 支付成功后回调
+                const payChannelId = curOrderInfo.inapp;
+                orderNotifyApi(payChannelId, {
+                    money: curOrderInfo.money,
+                    order_id: curOrderInfo.order_id,
+                    callback_type: "client",
+                });
+                return Promise.resolve();
+            },
+            fail: (error) => {
+                return Promise.reject(error);
+            },
+        });
+
+
+    } catch (error) {
+        return Promise.reject(error);
+    }
+};
+
+/**
+ * @description: 内部支付函数
+ * @param {*} payParams
+ * @return {*}
+ */
+const _payment = async (payParams) => {
+
+    try {
+        const orderInfo = {
+            cp_order_id: payParams.cp_order_id,
+            money: payParams.money,
+            role_id: payParams.role_id,
+            role_name: payParams.role_name,
+            server_id: payParams.server_id,
+            server_name: payParams.server_name,
+            ext: payParams.ext ? payParams.ext : "",
+            role_level: payParams.role_level,
+            product_id: payParams.product_id,
+            product_name: payParams.product_name,
+        };
+        // 下单
+        const { curOrderInfo, midasPayParams, gzhPayParams } = await createOrder(
+            orderInfo
+        );
+
+        // 非米大师支付使用本地定时器检查上报
+
+        if (curOrderInfo.pay_type != "midas") {
+            setStorage("extOrderAndReport_" + curOrderInfo.order_id, {
+                ext: curOrderInfo.ext,
+                money: curOrderInfo.money,
+                order_id: curOrderInfo.order_id,
+                product_name: curOrderInfo.product_name || "Purchase Item",
+                timestamp: unixTimestamp(),
+                reportCount: 0,
+            });
+        }
+
+        const res = await makePay({ curOrderInfo, gzhPayParams });
+        wx.hideLoading();
+
+        // 二维码+url 二合一
+        if (typeof res === "object") {
+            return Promise.resolve({
+                code: 0,
+                data: res,
+                msg: "订单创建成功",
+            });
+        }
+        if (res === "CUSTOMER") {
+            //客服已经拉起成功
+            return Promise.resolve({
+                code: 0,
+                data: null,
+                msg: "订单创建成功",
+            });
+        }
+
+        // 小游戏米大师
+        await midasPay({ curOrderInfo, midasPayParams });
+
+        return Promise.resolve({
+            code: 0,
+            data: null,
+            msg: "订单创建成功",
+        });
+    } catch (error) {
+        return Promise.reject(error);
+    }
+};
+
+/**
+ * @description:拉起支付(节流版本,避免短时间内重复点击)
+ * @param {*} payParams
+ * @return {*}
+ */
+export const payment = throttle(_payment, 2000);

+ 47 - 0
core/role/index.ts

@@ -0,0 +1,47 @@
+import { checkMissingParams } from "../../utils/helper";
+import { RoleData } from "./role.interface";
+import DnSdk from "../../lib/DnSdk.js";
+import { reportApi } from "../../api/report.api";
+
+export const reportRole = async (roleData: RoleData) => {
+  const missingKeys = checkMissingParams(roleData, ["data_type",
+    "server_id",
+    "server_name",
+    "role_id",
+    "role_name",
+    "role_level"]);
+
+  if (missingKeys.length > 0) {
+    throw new Error(`SDK init error: missing params: ${missingKeys.join(', ')}`);
+  }
+
+  if (roleData.data_type == 2) {
+    // 腾讯广告小游戏SDK上报
+    DnSdk.getInstance().onCreateRole();
+  }
+
+  // if (roleData.data_type == 6 && roleData.event_type == 'tutorial_finish') {
+  //   // 腾讯广告小游戏SDK上报
+  //   DnSdk.getInstance().onTutorialFinish();
+  // }
+
+  if (roleData.data_type == 5) {
+    // 腾讯广告小游戏SDK上报
+    DnSdk.getInstance().onTutorialFinish();
+  }
+
+  const reportData = {
+    data_type: roleData.data_type,
+    server_id: roleData.server_id,
+    server_name: roleData.server_name,
+    role_id: roleData.role_id,
+    role_name: roleData.role_name,
+    role_level: roleData.role_level,
+  };
+
+  // 上报数据
+  await reportApi(reportData);
+
+
+  return Promise.resolve();
+}

+ 9 - 0
core/role/role.interface.ts

@@ -0,0 +1,9 @@
+export interface RoleData {
+    data_type: number;
+    server_id: number;
+    server_name: string;
+    role_id: string;
+    role_name: string;
+    role_level: number;
+    event_type?: string
+}

+ 5 - 0
core/safe/index.ts

@@ -0,0 +1,5 @@
+import { safeTextCheck } from './text'
+
+export {
+    safeTextCheck
+}

+ 14 - 0
core/safe/text.ts

@@ -0,0 +1,14 @@
+import { secCheckTextApi } from "../../api/safe.api.js";
+
+// 文本内容安全检测
+export const safeTextCheck = ({ content, scene }) => {
+    return new Promise(async (resolve, reject) => {
+        const res = await secCheckTextApi({
+            do: "secCheckText",
+            version: 2,
+            content,
+            scene,
+        });
+        resolve(res);
+    });
+};

+ 169 - 0
core/share/index.ts

@@ -0,0 +1,169 @@
+import { getShareConfigApi } from "../../api/share.api";
+import ShareConfigModel from "../../store/models/shareConfig.model";
+import DnSdk from "../../lib/dnSdk";
+
+const shareConfigModel = ShareConfigModel.getInstance();
+
+/**
+ * 初始化分享配置
+ */
+export const initShareConfig = async () => {
+   try {
+     shareConfigModel.clear();
+    const shareConfigData = await getShareConfigApi()
+
+    console.log("shareConfigData", shareConfigData)
+    if(shareConfigData.length){
+    // 从数组中随机选择一个分享配置
+        const randomShareConfig = shareConfigData[Math.floor(Math.random() * shareConfigData.length)];
+
+        shareConfigModel.save(randomShareConfig)
+    }
+
+ 
+    return Promise.resolve()
+   } catch (error) {
+    return Promise.reject(error)
+   }
+}
+
+/**
+ * 开启系统分享
+ */
+export const openSystemShare = async () => {
+    const shareConfig = shareConfigModel.get()
+    if (!shareConfig) {
+        return
+    }
+    try {
+        // 开启分享按钮
+        wx.showShareMenu({
+            withShareTicket: true,
+        });
+        await initShareConfig();
+        let shareData = buildShareData({});
+        wx.onShareAppMessage(() => {
+            // 腾讯广告小游戏SDK上报
+            DnSdk.getInstance().track('SHARE', {
+                target: 'APP_MESSAGE'
+            });
+            return shareData;
+        });
+        wx.onShareTimeline(() => {
+            // 腾讯广告小游戏SDK上报
+            DnSdk.getInstance().track('SHARE', {
+                target: 'TIME_LINE'
+            });
+            return shareData;
+        });
+        wx.onCopyUrl(() => {
+            return {
+                query: shareData,
+            };
+        });
+        // 收藏
+        wx.onAddToFavorites(() => {
+            // 腾讯广告小游戏SDK上报
+            DnSdk.getInstance().track('ADD_TO_WISHLIST', {
+                //  普通收藏(default)
+                type: 'default',
+            })
+        })
+        return Promise.resolve();
+    } catch (error) {
+        return Promise.reject(error);
+    }
+}
+
+
+
+/**
+ * 主动发起分享
+ */
+export const share = async(data) => {
+    const shareConfig = shareConfigModel.get()
+    if (!shareConfig) {
+        return
+    }
+    try {
+        await initShareConfig();
+        // 发起分享
+        let shareData = buildShareData(data);
+        wx.shareAppMessage(shareData);
+        return Promise.resolve();
+    } catch (error) {
+        return Promise.reject(error);
+    }
+}
+
+/**
+ *  主动监听研发透传参数
+ */
+export const onShareAppMessage = (data,menus=['shareAppMessage', 'shareTimeline']) => {
+    //先off,再on
+    wx.offShareAppMessage();
+    wx.offShareTimeline();
+    wx.offCopyUrl();
+    wx.offAddToFavorites();
+    let shareData = buildShareData(data);
+    wx.showShareMenu({
+      withShareTicket: true,
+      menus:menus
+    })
+    wx.onShareAppMessage(() => {
+        // 腾讯广告小游戏SDK上报
+        DnSdk.getInstance().track('SHARE', {
+            target: 'APP_MESSAGE'
+        });
+        return shareData;
+    });
+    wx.onShareTimeline(() => {
+        // 腾讯广告小游戏SDK上报
+        DnSdk.getInstance().track('SHARE', {
+            target: 'TIME_LINE'
+        });
+        return shareData;
+    });
+    wx.onCopyUrl(() => {
+        return {
+            query: shareData.query,
+        };
+    });
+    // 收藏
+    wx.onAddToFavorites(() => {
+        // 腾讯广告小游戏SDK上报
+        DnSdk.getInstance().track('ADD_TO_WISHLIST', {
+            //  普通收藏(default)
+            type: 'default',
+        })
+    })
+};
+
+
+/**
+ * 构建分享数据
+ * @param data 
+ * @returns 
+ */
+
+const buildShareData = (data) => {
+    let shareConfigInfo = shareConfigModel.get();
+    let shareData = {
+        title: shareConfigInfo.title,
+        imageUrl: shareConfigInfo.imageUrl,
+        query: shareConfigInfo.query,
+    };
+    let share_ext = "";
+    // 记录分享透传参数
+    if (data.hasOwnProperty("title") && data.title) shareData.title = data.title;
+    if (data.hasOwnProperty("imageUrl") && data.imageUrl) shareData.imageUrl = data.imageUrl;
+    if (data.hasOwnProperty("ext") && data.ext) share_ext = data.ext;
+
+    //前面这个share_ext是研发透传进来的,后面这个是服务端传进来的
+    shareData.query += shareConfigInfo.share_ext;
+    if (share_ext) {
+        shareData.query += `&share_ext=` + share_ext;
+    }
+
+    return shareData;
+};

File diff suppressed because it is too large
+ 0 - 0
dist/wxxyx-sdk.1.0.0.js


+ 147 - 0
game.js

@@ -0,0 +1,147 @@
+import {
+  init,
+  authLogin,
+  share,
+  onShareAppMessage,
+  reportRole,
+  payment,
+  getCurrentUserInfo,
+  safeTextCheck
+} from "./dist/wxxyx-sdk.1.0.0.js"
+
+// 初始化skd
+(async () => {
+  try {
+    let data = {
+      version: "1.0.1", // 游戏版本
+      mini_program_id: "wx0cc61b77db2c5e2d", //小游戏APPID
+      game_id: "101", // 游戏id
+      game_name: "测试游戏", // 游戏名称
+    };
+    // 静默授权
+    const res = await init(data); 
+    console.log("init", res);
+    wx.showToast({
+      title: "进入游戏成功",
+    });
+  } catch (error) {
+
+  }
+})();
+
+const handleLogin = async () => {
+  const res = await authLogin()
+  console.log("登录返回", res)
+}
+
+// 角色上报
+const handleRoleDataReport = async () => {
+  const res = await reportRole({
+    data_type: 4,
+    server_id: 1,
+    server_name: "仙侠幻世1服",
+    role_id: "90980001",
+    role_name: "仙剑奇侠",
+    role_level: 2,
+  })
+
+  console.log("reportRole", res);
+}
+
+//主动分享
+const handleShareAppMessage = async () => {
+  try {
+    let info = {
+      title: "分享测试",
+      imageUrl: "https://apxxx.com/1.jpg",
+      ext: "&a=1",
+    };
+    await share(info);
+    wx.showToast({
+      title: "分享成功",
+    });
+  } catch (error) {
+    console.log(error);
+  }
+};
+
+//主动监听
+const handleOnShareAppMessage = () => {
+  onShareAppMessage({
+    title: "测试分享监听",
+    imageUrl: "https://apxxx.com/2.jpg",
+    ext: "&a=2",
+  });
+};
+
+// 支付
+const handleMakePayment = async () => {
+  let params = {
+    money: 1,
+    cp_order_id: new Date().getTime()/1000,
+    server_id: 1,
+    server_name: "仙侠幻世1服",
+    role_id: "90980001",
+    role_name: "仙剑奇侠",
+    role_level: 1,
+    ext: "ceshi",
+    product_id: "-1",
+    product_name: "1元的大礼包",
+  };
+  await payment(params)
+}
+
+// 获取当前用户信息
+const handleLoginUserInfo = async () => {
+  const res = await getCurrentUserInfo()
+  console.log("getCurrentUserInfo", res)
+}
+
+// 文本内容安全检测
+const handleSecCheckText = async () => {
+  const res = await safeTextCheck({ content: "文本内容", scene: 1 })
+  console.log(res)
+}
+
+function newButtonMap(name, callback, x, y, w = 200, h = 30) {
+  return {
+    name: name,
+    callback: callback,
+    x: x,
+    y: y,
+    w: w,
+    h: h,
+  };
+}
+let buttonList = [
+  newButtonMap("登录", handleLogin, 10, 60),
+  newButtonMap("上报用户角色", handleRoleDataReport, 10, 110),
+  newButtonMap("生成1元订单", handleMakePayment, 10, 160),
+  newButtonMap("主动分享", handleShareAppMessage, 10, 260),
+  newButtonMap("获取平台登陆用户信息", handleLoginUserInfo, 10, 210),
+  newButtonMap("监听分享传参", handleOnShareAppMessage, 10, 310),
+  newButtonMap("文本内容安全检测", handleSecCheckText, 10, 360),
+];
+
+const canvas = wx.createCanvas();
+const ctx = canvas.getContext("2d");
+
+ctx.fillStyle = "#ff0000";
+ctx.font = "14px Arial";
+ctx.strokeStyle = "#ff0000";
+for (let k in buttonList) {
+  ctx.fillText(buttonList[k].name, 20, buttonList[k].y + 20);
+}
+wx.onTouchStart(function (a) {
+  let cur = a.touches[0];
+  for (let k in buttonList) {
+    if (
+      cur.clientX >= buttonList[k].x &&
+      cur.clientX <= buttonList[k].x + buttonList[k].w &&
+      cur.clientY >= buttonList[k].y &&
+      cur.clientY <= buttonList[k].y + buttonList[k].h
+    ) {
+      buttonList[k].callback();
+    }
+  }
+});

+ 4 - 0
game.json

@@ -0,0 +1,4 @@
+{
+    "deviceOrientation": "portrait",
+    "showStatusBar": false
+}

+ 6 - 0
index.ts

@@ -0,0 +1,6 @@
+export { init } from "./core/init/index";
+export { authLogin, getCurrentUserInfo } from "./core/auth/index";
+export { share, onShareAppMessage } from "./core/share/index";
+export { reportRole } from "./core/role/index";
+export { payment } from "./core/payment/index"
+export { safeTextCheck } from "./core/safe/index"

+ 44 - 0
lib/DnSdk.js

@@ -0,0 +1,44 @@
+import { SDK } from "../lib/dn-sdk-minigame/index"
+
+class DnSdk {
+    static instance = null
+    static overrideShareFunc = false
+    constructor() {
+
+    }
+
+    static init(dnSdkOptions) {
+        if (!dnSdkOptions) {
+            console.warn("DnSdk.init错误,请传入腾讯广告小游戏SDK参数")
+            return false
+        }
+        if (!this.instance) {
+            this.instance = new SDK(dnSdkOptions)
+        }
+
+        if (!this.overrideShareFunc) {
+            wx.shareAppMessage = (function () {
+                const nativeShareAppMessage = wx.shareAppMessage
+                return function (shareData) {
+                    console.log('override shareAppMessage exec')
+                    // 腾讯广告小游戏SDK上报
+                    DnSdk.getInstance().track('SHARE', {
+                        target: 'APP_MESSAGE'
+                    });
+                    return nativeShareAppMessage(shareData)
+                }
+            })()
+            this.overrideShareFunc = true
+        }
+    }
+
+    static getInstance() {
+        if (!this.instance) {
+            console.warn("请先执行wxxyssdk的init方法")
+            return false
+        }
+        return this.instance;
+    }
+}
+
+export default DnSdk

+ 97 - 0
lib/checkOrderAndReport.js

@@ -0,0 +1,97 @@
+import { compile, uncompile, unixTimestamp } from "../utils/helper";
+import httpClient from "../utils/httpClient";
+import DnSdk from "./DnSdk";
+
+class checkOrderAndReport {
+  static instance = null;
+  static timer = null;
+  static reportDelayMap = [
+    //index是report次数 值是delayTime(秒)
+    20, // 立即
+    60, // 1分钟
+    120, // 2分钟
+    180, // 3分钟
+    300, // 5分钟
+    600, // 10分钟
+    1200, // 20分钟
+    1800, // 30分钟
+    3600, // 1小时
+    7200, // 2小时
+  ];
+
+  constructor() { }
+
+  async checkOrder() {
+    const res = wx.getStorageInfoSync();
+    for (let storageKey of res.keys) {
+      if (storageKey.indexOf("_dnsdkOrderAndReport_") > -1) {
+        const order = uncompile(wx.getStorageSync(storageKey));
+        console.log("order", order);
+        const delayTimeMap = checkOrderAndReport.reportDelayMap;
+        const delayTime = delayTimeMap[order.reportCount];
+        const timeDiff = unixTimestamp() - order.timestamp;
+        let currentMapIndex = -1;
+        for (let i = delayTimeMap.length - 1; i >= 0; i--) {
+          if (timeDiff >= delayTimeMap[i]) {
+            currentMapIndex = i;
+            break;
+          }
+        }
+        if (delayTime == undefined) {
+          // 删除超过重试次数的订单
+          wx.removeStorageSync(storageKey);
+          console.log(storageKey + " removed!");
+          continue;
+        }
+        if (timeDiff >= delayTime) {
+          let sync_status = 0;
+          // 请求判断是否支付成功
+          const res = await httpClient.post("/payment/order/query", {
+            order_id: order.order_id ?? null,
+            ext: order.ext,
+          });
+          // 是否支付成功
+          sync_status = res.sync_status ?? 0;
+
+          if (sync_status) {
+            DnSdk.getInstance().onPurchase(order.money * 100); // 腾讯广告小游戏SDK上报
+
+            wx.removeStorageSync(storageKey);
+            console.log(storageKey + " report success and removed!");
+          } else {
+            if (currentMapIndex == delayTimeMap.length - 1) {
+              // 删除超过最长重试延时的订单
+              wx.removeStorageSync(storageKey);
+              console.log(storageKey + " removed!");
+              continue;
+            }
+            if (currentMapIndex > order.reportCount) {
+              order.reportCount = currentMapIndex;
+            }
+            order.reportCount += 1;
+            wx.setStorageSync(storageKey, compile(order));
+          }
+        }
+      }
+    }
+    checkOrderAndReport.getInstance().timer = setTimeout(
+      checkOrderAndReport.getInstance().checkOrder,
+      60000
+    );
+  }
+
+  run() {
+    if (!checkOrderAndReport.getInstance().timer) {
+      checkOrderAndReport.getInstance().checkOrder();
+    }
+  }
+
+  static getInstance() {
+    if (!this.instance) {
+      this.instance = new checkOrderAndReport();
+    }
+    return this.instance;
+  }
+}
+
+export default checkOrderAndReport;

+ 542 - 0
lib/dn-sdk-minigame/index.d.ts

@@ -0,0 +1,542 @@
+/**
+ * SDK 初始化参数
+ */
+interface SdkConfig {
+    /**
+     * 数据源ID,必填
+     */
+    user_action_set_id: number;
+    /**
+     * 加密key,必填
+     */
+    secret_key: string;
+    /**
+     * 微信小程序/小游戏APPID,wx开头,必填
+     */
+    appid: string;
+    /**
+     * 微信 openid,openid 和 unionid 至少填一个, 可以调用 setOpenId 设置
+     */
+    openid?: string;
+    /**
+     * 微信 unionid,openid 和 unionid 至少填一个, 可以调用 setUnionId 设置
+     */
+    unionid?: string;
+    /**
+     * 自定义用户ID,选填
+     */
+    user_unique_id?: string;
+    /**
+     * 是否自动采集事件
+     */
+    auto_track?: boolean;
+    /**
+     * 是否自动采集属性
+     */
+    auto_attr?: boolean;
+    /**
+     * 上报回调(包括成功、失败、重试的各种场景)
+     */
+    on_report_complete?: Function | undefined;
+    /**
+     * 明确上报失败的回调(sdk内部会直接丢弃的行为,无法再重试上报成功的部分)
+     */
+    on_report_fail?: Function | undefined;
+}
+/**
+ * 小程序/小游戏信息
+ */
+interface GameInfo {
+    /**
+     * 广告点击id、曝光id
+     */
+    ad_trace_id?: string;
+    /**
+     * 页面路径,小游戏没有
+     */
+    page_url?: string;
+    /**
+     * 页面名称,小游戏没有
+     */
+    page_title?: string;
+    /**
+     * 组件名称
+     */
+    component_name?: string;
+    /**
+     * 场景来源
+     */
+    source_scene?: number;
+    /**
+     * 渠道号
+     */
+    pkg_channel_id?: string;
+    /**
+     * 框架信息,小游戏没有
+     */
+    framework?: string;
+    /**
+     * 渠道来源
+     */
+    channel: string;
+    /**
+     * 启动参数
+     */
+    launch_options: string;
+}
+/**
+ * 设备信息
+ */
+interface DeviceInfo {
+    /**
+     * 设备品牌
+     */
+    device_brand: string;
+    /**
+     * 设备型号
+     */
+    device_model: string;
+    /**
+     * 微信App版本
+     */
+    wx_version: string;
+    /**
+     * 微信基础库版本
+     */
+    wx_lib_version: string;
+    /**
+     * 微信客户端平台
+     */
+    wx_platform: string;
+    /**
+     * 操作系统
+     */
+    os: string;
+    /**
+     * 操作系统版本
+     */
+    os_version: string;
+    /**
+     * 设备性能等级
+     */
+    benchmark_level: number;
+    /**
+     * 屏幕高度
+     */
+    screen_height: number;
+    /**
+     * 屏幕宽度
+     */
+    screen_width: number;
+}
+interface TrackBaseInfo extends SdkConfig, DeviceInfo {
+    local_id: string;
+    sdk_name: string;
+    sdk_version: string;
+    inner_param: {
+        app_version: string;
+        app_env_version: string;
+    };
+}
+/**
+ * 行为信息
+ */
+interface ActionInfo {
+    action_type: string;
+    action_param?: Record<string | number | symbol, unknown>;
+    is_sdk_auto_track: boolean;
+    session_id: string;
+    log_id: number;
+    action_id: string;
+    action_time: number;
+    revised_action_time: number;
+    is_retry: boolean;
+    retry_count: number;
+    ad_trace_id?: string;
+    page_url?: string;
+    page_title?: string;
+    component_name?: string;
+    source_scene?: number;
+    pkg_channel_id?: string;
+    /**
+     * 网络类型
+     */
+    network_type?: string;
+    inner_param?: Record<string | number | symbol, unknown>;
+    channel?: string;
+}
+interface LogParams {
+    log_type: string;
+    code?: number;
+    message?: string;
+    err_stack?: string;
+    user_action_set_id?: number;
+    appid?: string;
+    local_id?: string;
+    session_id?: string;
+    sdk_name?: string;
+    sdk_version?: string;
+    page_url?: string;
+    framework?: string;
+    device_brand?: string;
+    device_model?: string;
+    wx_version?: string;
+    wx_lib_version?: string;
+    wx_platform?: string;
+    os?: string;
+    os_version?: string;
+}
+interface TrackResponse {
+    code: number;
+    message: string;
+    actionId?: string;
+}
+
+interface QueueProps {
+    /**
+     * 数据源ID,用于本地存储队列key
+     */
+    userActionSetId: number;
+    /**
+     * 队列长度
+     */
+    maxLength: number;
+}
+interface QueueManagerProps extends QueueProps {
+    /**
+     * OG事件列表
+     */
+    ogEvents: string[];
+}
+interface IEvent extends ActionInfo {
+    inner_status?: string;
+}
+
+/**
+ * 队列原子操作
+ */
+
+declare class Queue {
+    protected maxLength: any;
+    protected userActionSetId: any;
+    protected lostActionMaps: Record<string, number>;
+    private stack;
+    private localStorageKey;
+    private timeStamp;
+    constructor({ userActionSetId, maxLength }: QueueProps);
+    getItems(): IEvent[];
+    getStorage(): IEvent[];
+    /**
+     * 上报丢失条数到日志系统
+     */
+    reportLostNum(): void;
+    /**
+     * 获取丢失条数map
+     * @returns 丢失条数map
+     */
+    getLostMaps(): Record<string, number>;
+    protected init(): void;
+    protected addItem(eventData: IEvent): void;
+    protected removeItems(actionIds: string[]): void;
+    protected updateForReportFail(actionIds: string[]): void;
+    protected updateForReporting(actionIds: string[]): void;
+    protected updateAllStack(stack: IEvent[]): void;
+    protected updateToStorage(): void;
+    /**
+     * 更新丢失条数
+     * @param sessionId 当前被丢弃行为的会话id
+     */
+    protected updateLostAction(sessionId: string): void;
+    /**
+     * 设置时间戳
+     */
+    protected setTimeStamp(): void;
+}
+
+declare class QueueManage extends Queue {
+    protected ogEvents: string[];
+    constructor({ userActionSetId, maxLength, ogEvents }: QueueManagerProps);
+    /**
+     * 获取可上报的队列
+     * @param reportMaxLength 需要上报的队列最大长度
+     */
+    getReportableActions(reportMaxLength?: number): IEvent[];
+    /**
+     * 添加行为到队列
+     * @param eventData 单条行为数据
+     */
+    addAction(eventData: IEvent): TrackResponse;
+    /**
+     * 根据acition_id删除行为
+     * @param actionIds 行为id列表
+     */
+    removeActions(actionIds: string[]): void;
+    /**
+     * 上报失败时更新队列状态
+     * @param actionIds
+     */
+    updateActionsForReportFail(actionIds: string[]): void;
+    /**
+     * 上报时更新队列状态为reporting
+     * @param actionIds 需要更新的行为id数组
+     */
+    updateActionsForReporting(actionIds: string[]): void;
+    /**
+     * 获取可上报队列长度
+     * @returns 可上报队列长度
+     */
+    getReportableActionsLength(): number;
+    /**
+     * 按照优先级从大到小给队列排序
+     * @param currEvent 当前事件
+     * @param stack 当前队列
+     */
+    sortQueue(currEvent: IEvent, stack: IEvent[]): IEvent[];
+    /**
+     * 计算优先级
+     * @param currTime 当前时间
+     * @param event 行为事件
+     * @returns 权重值
+     */
+    private caculateWeight;
+    /**
+     *
+     * @param currTime 当前时间
+     * @param actionTime 队列行为时间
+     * @returns 权重值
+     */
+    private formatWeight;
+}
+
+interface ConfigManager {
+    getRealTimeActionList: () => Array<string>;
+    getRequestTimeout: () => number;
+}
+interface ActionReporterProps {
+    getBaseInfo: () => TrackBaseInfo;
+    reportLog: (param: LogParams) => void;
+    queueManager: QueueManage;
+    configManager?: ConfigManager;
+    onReportComplete?: Function | undefined;
+    onReportFail?: Function | undefined;
+}
+/**
+ * 行为上报类
+ */
+declare class ActionReporter {
+    private static currentRequestCount;
+    private static requestConcurrency;
+    static setRequestConcurrency(n: number): void;
+    private getBaseInfo;
+    private reportLog;
+    private queueManager;
+    private configManager;
+    private onReportComplete;
+    private onReportFail;
+    private cgiBatchSize;
+    private reportThreshold;
+    private reportDelay;
+    private triggerExecuteSend;
+    private inspectDelay;
+    private inspectTimer;
+    private isNeedContinueSend;
+    constructor(props: ActionReporterProps);
+    /**
+     * 批量上报行为,track的时候触发
+     */
+    batchSend(): void;
+    /**
+     * 全量上报, flush的时候触发
+     */
+    flushSend(): void;
+    /**
+     * 执行指定数量的行为上报逻辑,超过接口batch上限则并行发送请求
+     */
+    private executeSend;
+    /**
+     * 组装上报用的行为数据
+     */
+    private generateActionReportParams;
+    /**
+     * 上报接口请求成功逻辑处理
+     * @param resData
+     * @param actionIdList
+     */
+    private dealSuccessData;
+    /**
+     * 上报接口请求失败逻辑处理
+     * @param errData
+     * @param actionIdList
+     */
+    private dealFailData;
+    /**
+     * wx.request文档:https://developers.weixin.qq.com/minigame/dev/api/network/request/wx.request.html
+     * @param param.data:接口请求参数、param.actionIdList:行为id列表
+     * @returns
+     */
+    private report;
+    /**
+     * 启动上报定时器
+     */
+    private startInspectTimer;
+    /**
+     * 上报回调数据
+     */
+    private doTrackCallbackFn;
+}
+
+declare abstract class SdkExtCommon {
+    protected special_method_symbol: symbol;
+    /**
+     * 付费
+     */
+    onPurchase(value: number): TrackResponse;
+    /**
+     * 进入前台
+     */
+    onEnterForeground(): TrackResponse;
+    /**
+     * 进入后台
+     */
+    onEnterBackground(): TrackResponse;
+    /**
+     * 启动
+     */
+    onAppStart(): TrackResponse;
+    /**
+     * 退出
+     */
+    onAppQuit(): TrackResponse;
+    /**
+     * 收藏
+     */
+    onAddToWishlist(): TrackResponse;
+    protected wrapTrack(action_type: ActionInfo["action_type"], action_param?: ActionInfo["action_param"]): TrackResponse;
+    abstract track(action_type: ActionInfo["action_type"], action_param?: ActionInfo["action_param"]): TrackResponse;
+}
+
+declare abstract class sdkExt extends SdkExtCommon {
+    /**
+     * 注册
+     */
+    onRegister(): TrackResponse;
+    /**
+     * 创角
+     */
+    onCreateRole(name?: string): TrackResponse;
+    /**
+     * 完成新手教程
+     */
+    onTutorialFinish(): TrackResponse;
+}
+
+declare const initializedInstanceSymbol: unique symbol;
+declare class SDK extends sdkExt {
+    private static [initializedInstanceSymbol];
+    static setRequestConcurrency(n: number): void;
+    static setDebug(debug: boolean): void;
+    protected env: string;
+    protected sdk_version: string;
+    protected sdk_name: string;
+    protected config?: SdkConfig;
+    protected deviceInfo: Partial<DeviceInfo>;
+    protected gameInfo: Partial<GameInfo>;
+    protected session_id: string;
+    protected log_id: number;
+    protected queueManage?: QueueManage;
+    protected actionReporter?: ActionReporter;
+    protected openid?: string;
+    protected unionid?: string;
+    protected user_unique_id?: string;
+    protected inited: boolean;
+    protected initErrMsg: string;
+    protected onReportComplete?: Function | undefined;
+    protected onReportFail?: Function | undefined;
+    constructor(sdkConfig: SdkConfig);
+    /**
+     * 返回初始化状态
+     * @returns
+     */
+    getInitResult(): {
+        inited: boolean;
+        initErrMsg: string;
+    };
+    /**
+     * 数据上报方法
+     * 0: 成功
+     * 100: 未完成初始化或重复初始化导致初始化失败,请先完成初始化
+     * 101: action_type 或 action_param 参数错误
+     * 102: action_param 参数过大,不能超过 xxxx 字符
+     * 103: 缓存队列已满,主动丢弃行为
+     *
+     */
+    track(action_type: ActionInfo['action_type'], action_param?: ActionInfo['action_param']): TrackResponse;
+    /**
+     * 立即上报数据
+     */
+    flush(): void;
+    /**
+     * 设置 openId
+     * 0: 成功
+     * 101: openid 格式错误
+     */
+    setOpenId(openid: string): {
+        code: number;
+        message: string;
+    };
+    /**
+       * 设置 unionid
+       * 0: 成功
+       * 101: unionid 格式错误
+       */
+    setUnionId(unionid: string): {
+        code: number;
+        message: string;
+    };
+    /**
+       * 设置 user_unique_id
+       * @param user_unique_id
+       */
+    setUserUniqueId(user_unique_id: string): {
+        code: number;
+        message: string;
+    };
+    protected doReportOnEnterBackground(): void;
+    /**
+       * 获取数据上报时所需要的 info 参数
+       */
+    private getTrackBaseInfo;
+    /**
+     * 生成上报队列需要的行为数据
+     * @param actionParams 行为参数
+     * @param is_sdk_auto_track 是否自动采集
+     * @returns
+     */
+    private createAction;
+    /**
+     * 给指定行为的inner_param字段追加字段
+     * @param action 待追加字段的行为
+     * @param key 待添加到inner_param字段的key
+     * @param value key对应的value
+     */
+    private addActionInnerParam;
+    /**
+     * 不同行为携带的渠道来源判断逻辑
+     * @param actionType
+     * @returns
+     */
+    private getChannelByActionType;
+    /**
+     * 上报日志
+     * @param params 日志参数
+     */
+    private reportLog;
+    private useAutoTrack;
+    private getAutoProxyRemoteConfig;
+    /**
+     * 设置openid时,如果值合法缓存到Storage
+     */
+    private saveValidOpenidToStorage;
+}
+
+export { SDK };

File diff suppressed because it is too large
+ 5 - 0
lib/dn-sdk-minigame/index.js


+ 683 - 0
lib/md5.js

@@ -0,0 +1,683 @@
+/**
+ * [js-md5]{@link https://github.com/emn178/js-md5}
+ *
+ * @namespace md5
+ * @version 0.7.3
+ * @author Chen, Yi-Cyuan [emn178@gmail.com]
+ * @copyright Chen, Yi-Cyuan 2014-2017
+ * @license MIT
+ */
+(function () {
+    'use strict';
+
+    var ERROR = 'input is invalid type';
+    var WINDOW = typeof window === 'object';
+    var root = WINDOW ? window : {};
+    if (root.JS_MD5_NO_WINDOW) {
+        WINDOW = false;
+    }
+    var WEB_WORKER = !WINDOW && typeof self === 'object';
+    var NODE_JS = !root.JS_MD5_NO_NODE_JS && typeof process === 'object' && process.versions && process.versions.node;
+    if (NODE_JS) {
+        root = global;
+    } else if (WEB_WORKER) {
+        root = self;
+    }
+    var COMMON_JS = !root.JS_MD5_NO_COMMON_JS && typeof module === 'object' && module.exports;
+    var AMD = typeof define === 'function' && define.amd;
+    var ARRAY_BUFFER = !root.JS_MD5_NO_ARRAY_BUFFER && typeof ArrayBuffer !== 'undefined';
+    var HEX_CHARS = '0123456789abcdef'.split('');
+    var EXTRA = [128, 32768, 8388608, -2147483648];
+    var SHIFT = [0, 8, 16, 24];
+    var OUTPUT_TYPES = ['hex', 'array', 'digest', 'buffer', 'arrayBuffer', 'base64'];
+    var BASE64_ENCODE_CHAR = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split('');
+
+    var blocks = [], buffer8;
+    if (ARRAY_BUFFER) {
+        var buffer = new ArrayBuffer(68);
+        buffer8 = new Uint8Array(buffer);
+        blocks = new Uint32Array(buffer);
+    }
+
+    if (root.JS_MD5_NO_NODE_JS || !Array.isArray) {
+        Array.isArray = function (obj) {
+            return Object.prototype.toString.call(obj) === '[object Array]';
+        };
+    }
+
+    if (ARRAY_BUFFER && (root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW || !ArrayBuffer.isView)) {
+        ArrayBuffer.isView = function (obj) {
+            return typeof obj === 'object' && obj.buffer && obj.buffer.constructor === ArrayBuffer;
+        };
+    }
+
+    /**
+     * @method hex
+     * @memberof md5
+     * @description Output hash as hex string
+     * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+     * @returns {String} Hex string
+     * @example
+     * md5.hex('The quick brown fox jumps over the lazy dog');
+     * // equal to
+     * md5('The quick brown fox jumps over the lazy dog');
+     */
+    /**
+     * @method digest
+     * @memberof md5
+     * @description Output hash as bytes array
+     * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+     * @returns {Array} Bytes array
+     * @example
+     * md5.digest('The quick brown fox jumps over the lazy dog');
+     */
+    /**
+     * @method array
+     * @memberof md5
+     * @description Output hash as bytes array
+     * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+     * @returns {Array} Bytes array
+     * @example
+     * md5.array('The quick brown fox jumps over the lazy dog');
+     */
+    /**
+     * @method arrayBuffer
+     * @memberof md5
+     * @description Output hash as ArrayBuffer
+     * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+     * @returns {ArrayBuffer} ArrayBuffer
+     * @example
+     * md5.arrayBuffer('The quick brown fox jumps over the lazy dog');
+     */
+    /**
+     * @method buffer
+     * @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
+     * @memberof md5
+     * @description Output hash as ArrayBuffer
+     * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+     * @returns {ArrayBuffer} ArrayBuffer
+     * @example
+     * md5.buffer('The quick brown fox jumps over the lazy dog');
+     */
+    /**
+     * @method base64
+     * @memberof md5
+     * @description Output hash as base64 string
+     * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+     * @returns {String} base64 string
+     * @example
+     * md5.base64('The quick brown fox jumps over the lazy dog');
+     */
+    var createOutputMethod = function (outputType) {
+        return function (message) {
+            return new Md5(true).update(message)[outputType]();
+        };
+    };
+
+    /**
+     * @method create
+     * @memberof md5
+     * @description Create Md5 object
+     * @returns {Md5} Md5 object.
+     * @example
+     * var hash = md5.create();
+     */
+    /**
+     * @method update
+     * @memberof md5
+     * @description Create and update Md5 object
+     * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+     * @returns {Md5} Md5 object.
+     * @example
+     * var hash = md5.update('The quick brown fox jumps over the lazy dog');
+     * // equal to
+     * var hash = md5.create();
+     * hash.update('The quick brown fox jumps over the lazy dog');
+     */
+    var createMethod = function () {
+        var method = createOutputMethod('hex');
+        if (NODE_JS) {
+            method = nodeWrap(method);
+        }
+        method.create = function () {
+            return new Md5();
+        };
+        method.update = function (message) {
+            return method.create().update(message);
+        };
+        for (var i = 0; i < OUTPUT_TYPES.length; ++i) {
+            var type = OUTPUT_TYPES[i];
+            method[type] = createOutputMethod(type);
+        }
+        return method;
+    };
+
+    var nodeWrap = function (method) {
+        var crypto = eval("require('crypto')");
+        var Buffer = eval("require('buffer').Buffer");
+        var nodeMethod = function (message) {
+            if (typeof message === 'string') {
+                return crypto.createHash('md5').update(message, 'utf8').digest('hex');
+            } else {
+                if (message === null || message === undefined) {
+                    throw ERROR;
+                } else if (message.constructor === ArrayBuffer) {
+                    message = new Uint8Array(message);
+                }
+            }
+            if (Array.isArray(message) || ArrayBuffer.isView(message) ||
+                message.constructor === Buffer) {
+                return crypto.createHash('md5').update(new Buffer(message)).digest('hex');
+            } else {
+                return method(message);
+            }
+        };
+        return nodeMethod;
+    };
+
+    /**
+     * Md5 class
+     * @class Md5
+     * @description This is internal class.
+     * @see {@link md5.create}
+     */
+    function Md5(sharedMemory) {
+        if (sharedMemory) {
+            blocks[0] = blocks[16] = blocks[1] = blocks[2] = blocks[3] =
+                blocks[4] = blocks[5] = blocks[6] = blocks[7] =
+                    blocks[8] = blocks[9] = blocks[10] = blocks[11] =
+                        blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
+            this.blocks = blocks;
+            this.buffer8 = buffer8;
+        } else {
+            if (ARRAY_BUFFER) {
+                var buffer = new ArrayBuffer(68);
+                this.buffer8 = new Uint8Array(buffer);
+                this.blocks = new Uint32Array(buffer);
+            } else {
+                this.blocks = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+            }
+        }
+        this.h0 = this.h1 = this.h2 = this.h3 = this.start = this.bytes = this.hBytes = 0;
+        this.finalized = this.hashed = false;
+        this.first = true;
+    }
+
+    /**
+     * @method update
+     * @memberof Md5
+     * @instance
+     * @description Update hash
+     * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+     * @returns {Md5} Md5 object.
+     * @see {@link md5.update}
+     */
+    Md5.prototype.update = function (message) {
+        if (this.finalized) {
+            return;
+        }
+
+        var notString, type = typeof message;
+        if (type !== 'string') {
+            if (type === 'object') {
+                if (message === null) {
+                    throw ERROR;
+                } else if (ARRAY_BUFFER && message.constructor === ArrayBuffer) {
+                    message = new Uint8Array(message);
+                } else if (!Array.isArray(message)) {
+                    if (!ARRAY_BUFFER || !ArrayBuffer.isView(message)) {
+                        throw ERROR;
+                    }
+                }
+            } else {
+                throw ERROR;
+            }
+            notString = true;
+        }
+        var code, index = 0, i, length = message.length, blocks = this.blocks;
+        var buffer8 = this.buffer8;
+
+        while (index < length) {
+            if (this.hashed) {
+                this.hashed = false;
+                blocks[0] = blocks[16];
+                blocks[16] = blocks[1] = blocks[2] = blocks[3] =
+                    blocks[4] = blocks[5] = blocks[6] = blocks[7] =
+                        blocks[8] = blocks[9] = blocks[10] = blocks[11] =
+                            blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
+            }
+
+            if (notString) {
+                if (ARRAY_BUFFER) {
+                    for (i = this.start; index < length && i < 64; ++index) {
+                        buffer8[i++] = message[index];
+                    }
+                } else {
+                    for (i = this.start; index < length && i < 64; ++index) {
+                        blocks[i >> 2] |= message[index] << SHIFT[i++ & 3];
+                    }
+                }
+            } else {
+                if (ARRAY_BUFFER) {
+                    for (i = this.start; index < length && i < 64; ++index) {
+                        code = message.charCodeAt(index);
+                        if (code < 0x80) {
+                            buffer8[i++] = code;
+                        } else if (code < 0x800) {
+                            buffer8[i++] = 0xc0 | (code >> 6);
+                            buffer8[i++] = 0x80 | (code & 0x3f);
+                        } else if (code < 0xd800 || code >= 0xe000) {
+                            buffer8[i++] = 0xe0 | (code >> 12);
+                            buffer8[i++] = 0x80 | ((code >> 6) & 0x3f);
+                            buffer8[i++] = 0x80 | (code & 0x3f);
+                        } else {
+                            code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
+                            buffer8[i++] = 0xf0 | (code >> 18);
+                            buffer8[i++] = 0x80 | ((code >> 12) & 0x3f);
+                            buffer8[i++] = 0x80 | ((code >> 6) & 0x3f);
+                            buffer8[i++] = 0x80 | (code & 0x3f);
+                        }
+                    }
+                } else {
+                    for (i = this.start; index < length && i < 64; ++index) {
+                        code = message.charCodeAt(index);
+                        if (code < 0x80) {
+                            blocks[i >> 2] |= code << SHIFT[i++ & 3];
+                        } else if (code < 0x800) {
+                            blocks[i >> 2] |= (0xc0 | (code >> 6)) << SHIFT[i++ & 3];
+                            blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
+                        } else if (code < 0xd800 || code >= 0xe000) {
+                            blocks[i >> 2] |= (0xe0 | (code >> 12)) << SHIFT[i++ & 3];
+                            blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];
+                            blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
+                        } else {
+                            code = 0x10000 + (((code & 0x3ff) << 10) | (message.charCodeAt(++index) & 0x3ff));
+                            blocks[i >> 2] |= (0xf0 | (code >> 18)) << SHIFT[i++ & 3];
+                            blocks[i >> 2] |= (0x80 | ((code >> 12) & 0x3f)) << SHIFT[i++ & 3];
+                            blocks[i >> 2] |= (0x80 | ((code >> 6) & 0x3f)) << SHIFT[i++ & 3];
+                            blocks[i >> 2] |= (0x80 | (code & 0x3f)) << SHIFT[i++ & 3];
+                        }
+                    }
+                }
+            }
+            this.lastByteIndex = i;
+            this.bytes += i - this.start;
+            if (i >= 64) {
+                this.start = i - 64;
+                this.hash();
+                this.hashed = true;
+            } else {
+                this.start = i;
+            }
+        }
+        if (this.bytes > 4294967295) {
+            this.hBytes += this.bytes / 4294967296 << 0;
+            this.bytes = this.bytes % 4294967296;
+        }
+        return this;
+    };
+
+    Md5.prototype.finalize = function () {
+        if (this.finalized) {
+            return;
+        }
+        this.finalized = true;
+        var blocks = this.blocks, i = this.lastByteIndex;
+        blocks[i >> 2] |= EXTRA[i & 3];
+        if (i >= 56) {
+            if (!this.hashed) {
+                this.hash();
+            }
+            blocks[0] = blocks[16];
+            blocks[16] = blocks[1] = blocks[2] = blocks[3] =
+                blocks[4] = blocks[5] = blocks[6] = blocks[7] =
+                    blocks[8] = blocks[9] = blocks[10] = blocks[11] =
+                        blocks[12] = blocks[13] = blocks[14] = blocks[15] = 0;
+        }
+        blocks[14] = this.bytes << 3;
+        blocks[15] = this.hBytes << 3 | this.bytes >>> 29;
+        this.hash();
+    };
+
+    Md5.prototype.hash = function () {
+        var a, b, c, d, bc, da, blocks = this.blocks;
+
+        if (this.first) {
+            a = blocks[0] - 680876937;
+            a = (a << 7 | a >>> 25) - 271733879 << 0;
+            d = (-1732584194 ^ a & 2004318071) + blocks[1] - 117830708;
+            d = (d << 12 | d >>> 20) + a << 0;
+            c = (-271733879 ^ (d & (a ^ -271733879))) + blocks[2] - 1126478375;
+            c = (c << 17 | c >>> 15) + d << 0;
+            b = (a ^ (c & (d ^ a))) + blocks[3] - 1316259209;
+            b = (b << 22 | b >>> 10) + c << 0;
+        } else {
+            a = this.h0;
+            b = this.h1;
+            c = this.h2;
+            d = this.h3;
+            a += (d ^ (b & (c ^ d))) + blocks[0] - 680876936;
+            a = (a << 7 | a >>> 25) + b << 0;
+            d += (c ^ (a & (b ^ c))) + blocks[1] - 389564586;
+            d = (d << 12 | d >>> 20) + a << 0;
+            c += (b ^ (d & (a ^ b))) + blocks[2] + 606105819;
+            c = (c << 17 | c >>> 15) + d << 0;
+            b += (a ^ (c & (d ^ a))) + blocks[3] - 1044525330;
+            b = (b << 22 | b >>> 10) + c << 0;
+        }
+
+        a += (d ^ (b & (c ^ d))) + blocks[4] - 176418897;
+        a = (a << 7 | a >>> 25) + b << 0;
+        d += (c ^ (a & (b ^ c))) + blocks[5] + 1200080426;
+        d = (d << 12 | d >>> 20) + a << 0;
+        c += (b ^ (d & (a ^ b))) + blocks[6] - 1473231341;
+        c = (c << 17 | c >>> 15) + d << 0;
+        b += (a ^ (c & (d ^ a))) + blocks[7] - 45705983;
+        b = (b << 22 | b >>> 10) + c << 0;
+        a += (d ^ (b & (c ^ d))) + blocks[8] + 1770035416;
+        a = (a << 7 | a >>> 25) + b << 0;
+        d += (c ^ (a & (b ^ c))) + blocks[9] - 1958414417;
+        d = (d << 12 | d >>> 20) + a << 0;
+        c += (b ^ (d & (a ^ b))) + blocks[10] - 42063;
+        c = (c << 17 | c >>> 15) + d << 0;
+        b += (a ^ (c & (d ^ a))) + blocks[11] - 1990404162;
+        b = (b << 22 | b >>> 10) + c << 0;
+        a += (d ^ (b & (c ^ d))) + blocks[12] + 1804603682;
+        a = (a << 7 | a >>> 25) + b << 0;
+        d += (c ^ (a & (b ^ c))) + blocks[13] - 40341101;
+        d = (d << 12 | d >>> 20) + a << 0;
+        c += (b ^ (d & (a ^ b))) + blocks[14] - 1502002290;
+        c = (c << 17 | c >>> 15) + d << 0;
+        b += (a ^ (c & (d ^ a))) + blocks[15] + 1236535329;
+        b = (b << 22 | b >>> 10) + c << 0;
+        a += (c ^ (d & (b ^ c))) + blocks[1] - 165796510;
+        a = (a << 5 | a >>> 27) + b << 0;
+        d += (b ^ (c & (a ^ b))) + blocks[6] - 1069501632;
+        d = (d << 9 | d >>> 23) + a << 0;
+        c += (a ^ (b & (d ^ a))) + blocks[11] + 643717713;
+        c = (c << 14 | c >>> 18) + d << 0;
+        b += (d ^ (a & (c ^ d))) + blocks[0] - 373897302;
+        b = (b << 20 | b >>> 12) + c << 0;
+        a += (c ^ (d & (b ^ c))) + blocks[5] - 701558691;
+        a = (a << 5 | a >>> 27) + b << 0;
+        d += (b ^ (c & (a ^ b))) + blocks[10] + 38016083;
+        d = (d << 9 | d >>> 23) + a << 0;
+        c += (a ^ (b & (d ^ a))) + blocks[15] - 660478335;
+        c = (c << 14 | c >>> 18) + d << 0;
+        b += (d ^ (a & (c ^ d))) + blocks[4] - 405537848;
+        b = (b << 20 | b >>> 12) + c << 0;
+        a += (c ^ (d & (b ^ c))) + blocks[9] + 568446438;
+        a = (a << 5 | a >>> 27) + b << 0;
+        d += (b ^ (c & (a ^ b))) + blocks[14] - 1019803690;
+        d = (d << 9 | d >>> 23) + a << 0;
+        c += (a ^ (b & (d ^ a))) + blocks[3] - 187363961;
+        c = (c << 14 | c >>> 18) + d << 0;
+        b += (d ^ (a & (c ^ d))) + blocks[8] + 1163531501;
+        b = (b << 20 | b >>> 12) + c << 0;
+        a += (c ^ (d & (b ^ c))) + blocks[13] - 1444681467;
+        a = (a << 5 | a >>> 27) + b << 0;
+        d += (b ^ (c & (a ^ b))) + blocks[2] - 51403784;
+        d = (d << 9 | d >>> 23) + a << 0;
+        c += (a ^ (b & (d ^ a))) + blocks[7] + 1735328473;
+        c = (c << 14 | c >>> 18) + d << 0;
+        b += (d ^ (a & (c ^ d))) + blocks[12] - 1926607734;
+        b = (b << 20 | b >>> 12) + c << 0;
+        bc = b ^ c;
+        a += (bc ^ d) + blocks[5] - 378558;
+        a = (a << 4 | a >>> 28) + b << 0;
+        d += (bc ^ a) + blocks[8] - 2022574463;
+        d = (d << 11 | d >>> 21) + a << 0;
+        da = d ^ a;
+        c += (da ^ b) + blocks[11] + 1839030562;
+        c = (c << 16 | c >>> 16) + d << 0;
+        b += (da ^ c) + blocks[14] - 35309556;
+        b = (b << 23 | b >>> 9) + c << 0;
+        bc = b ^ c;
+        a += (bc ^ d) + blocks[1] - 1530992060;
+        a = (a << 4 | a >>> 28) + b << 0;
+        d += (bc ^ a) + blocks[4] + 1272893353;
+        d = (d << 11 | d >>> 21) + a << 0;
+        da = d ^ a;
+        c += (da ^ b) + blocks[7] - 155497632;
+        c = (c << 16 | c >>> 16) + d << 0;
+        b += (da ^ c) + blocks[10] - 1094730640;
+        b = (b << 23 | b >>> 9) + c << 0;
+        bc = b ^ c;
+        a += (bc ^ d) + blocks[13] + 681279174;
+        a = (a << 4 | a >>> 28) + b << 0;
+        d += (bc ^ a) + blocks[0] - 358537222;
+        d = (d << 11 | d >>> 21) + a << 0;
+        da = d ^ a;
+        c += (da ^ b) + blocks[3] - 722521979;
+        c = (c << 16 | c >>> 16) + d << 0;
+        b += (da ^ c) + blocks[6] + 76029189;
+        b = (b << 23 | b >>> 9) + c << 0;
+        bc = b ^ c;
+        a += (bc ^ d) + blocks[9] - 640364487;
+        a = (a << 4 | a >>> 28) + b << 0;
+        d += (bc ^ a) + blocks[12] - 421815835;
+        d = (d << 11 | d >>> 21) + a << 0;
+        da = d ^ a;
+        c += (da ^ b) + blocks[15] + 530742520;
+        c = (c << 16 | c >>> 16) + d << 0;
+        b += (da ^ c) + blocks[2] - 995338651;
+        b = (b << 23 | b >>> 9) + c << 0;
+        a += (c ^ (b | ~d)) + blocks[0] - 198630844;
+        a = (a << 6 | a >>> 26) + b << 0;
+        d += (b ^ (a | ~c)) + blocks[7] + 1126891415;
+        d = (d << 10 | d >>> 22) + a << 0;
+        c += (a ^ (d | ~b)) + blocks[14] - 1416354905;
+        c = (c << 15 | c >>> 17) + d << 0;
+        b += (d ^ (c | ~a)) + blocks[5] - 57434055;
+        b = (b << 21 | b >>> 11) + c << 0;
+        a += (c ^ (b | ~d)) + blocks[12] + 1700485571;
+        a = (a << 6 | a >>> 26) + b << 0;
+        d += (b ^ (a | ~c)) + blocks[3] - 1894986606;
+        d = (d << 10 | d >>> 22) + a << 0;
+        c += (a ^ (d | ~b)) + blocks[10] - 1051523;
+        c = (c << 15 | c >>> 17) + d << 0;
+        b += (d ^ (c | ~a)) + blocks[1] - 2054922799;
+        b = (b << 21 | b >>> 11) + c << 0;
+        a += (c ^ (b | ~d)) + blocks[8] + 1873313359;
+        a = (a << 6 | a >>> 26) + b << 0;
+        d += (b ^ (a | ~c)) + blocks[15] - 30611744;
+        d = (d << 10 | d >>> 22) + a << 0;
+        c += (a ^ (d | ~b)) + blocks[6] - 1560198380;
+        c = (c << 15 | c >>> 17) + d << 0;
+        b += (d ^ (c | ~a)) + blocks[13] + 1309151649;
+        b = (b << 21 | b >>> 11) + c << 0;
+        a += (c ^ (b | ~d)) + blocks[4] - 145523070;
+        a = (a << 6 | a >>> 26) + b << 0;
+        d += (b ^ (a | ~c)) + blocks[11] - 1120210379;
+        d = (d << 10 | d >>> 22) + a << 0;
+        c += (a ^ (d | ~b)) + blocks[2] + 718787259;
+        c = (c << 15 | c >>> 17) + d << 0;
+        b += (d ^ (c | ~a)) + blocks[9] - 343485551;
+        b = (b << 21 | b >>> 11) + c << 0;
+
+        if (this.first) {
+            this.h0 = a + 1732584193 << 0;
+            this.h1 = b - 271733879 << 0;
+            this.h2 = c - 1732584194 << 0;
+            this.h3 = d + 271733878 << 0;
+            this.first = false;
+        } else {
+            this.h0 = this.h0 + a << 0;
+            this.h1 = this.h1 + b << 0;
+            this.h2 = this.h2 + c << 0;
+            this.h3 = this.h3 + d << 0;
+        }
+    };
+
+    /**
+     * @method hex
+     * @memberof Md5
+     * @instance
+     * @description Output hash as hex string
+     * @returns {String} Hex string
+     * @see {@link md5.hex}
+     * @example
+     * hash.hex();
+     */
+    Md5.prototype.hex = function () {
+        this.finalize();
+
+        var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
+
+        return HEX_CHARS[(h0 >> 4) & 0x0F] + HEX_CHARS[h0 & 0x0F] +
+            HEX_CHARS[(h0 >> 12) & 0x0F] + HEX_CHARS[(h0 >> 8) & 0x0F] +
+            HEX_CHARS[(h0 >> 20) & 0x0F] + HEX_CHARS[(h0 >> 16) & 0x0F] +
+            HEX_CHARS[(h0 >> 28) & 0x0F] + HEX_CHARS[(h0 >> 24) & 0x0F] +
+            HEX_CHARS[(h1 >> 4) & 0x0F] + HEX_CHARS[h1 & 0x0F] +
+            HEX_CHARS[(h1 >> 12) & 0x0F] + HEX_CHARS[(h1 >> 8) & 0x0F] +
+            HEX_CHARS[(h1 >> 20) & 0x0F] + HEX_CHARS[(h1 >> 16) & 0x0F] +
+            HEX_CHARS[(h1 >> 28) & 0x0F] + HEX_CHARS[(h1 >> 24) & 0x0F] +
+            HEX_CHARS[(h2 >> 4) & 0x0F] + HEX_CHARS[h2 & 0x0F] +
+            HEX_CHARS[(h2 >> 12) & 0x0F] + HEX_CHARS[(h2 >> 8) & 0x0F] +
+            HEX_CHARS[(h2 >> 20) & 0x0F] + HEX_CHARS[(h2 >> 16) & 0x0F] +
+            HEX_CHARS[(h2 >> 28) & 0x0F] + HEX_CHARS[(h2 >> 24) & 0x0F] +
+            HEX_CHARS[(h3 >> 4) & 0x0F] + HEX_CHARS[h3 & 0x0F] +
+            HEX_CHARS[(h3 >> 12) & 0x0F] + HEX_CHARS[(h3 >> 8) & 0x0F] +
+            HEX_CHARS[(h3 >> 20) & 0x0F] + HEX_CHARS[(h3 >> 16) & 0x0F] +
+            HEX_CHARS[(h3 >> 28) & 0x0F] + HEX_CHARS[(h3 >> 24) & 0x0F];
+    };
+
+    /**
+     * @method toString
+     * @memberof Md5
+     * @instance
+     * @description Output hash as hex string
+     * @returns {String} Hex string
+     * @see {@link md5.hex}
+     * @example
+     * hash.toString();
+     */
+    Md5.prototype.toString = Md5.prototype.hex;
+
+    /**
+     * @method digest
+     * @memberof Md5
+     * @instance
+     * @description Output hash as bytes array
+     * @returns {Array} Bytes array
+     * @see {@link md5.digest}
+     * @example
+     * hash.digest();
+     */
+    Md5.prototype.digest = function () {
+        this.finalize();
+
+        var h0 = this.h0, h1 = this.h1, h2 = this.h2, h3 = this.h3;
+        return [
+            h0 & 0xFF, (h0 >> 8) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 24) & 0xFF,
+            h1 & 0xFF, (h1 >> 8) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 24) & 0xFF,
+            h2 & 0xFF, (h2 >> 8) & 0xFF, (h2 >> 16) & 0xFF, (h2 >> 24) & 0xFF,
+            h3 & 0xFF, (h3 >> 8) & 0xFF, (h3 >> 16) & 0xFF, (h3 >> 24) & 0xFF
+        ];
+    };
+
+    /**
+     * @method array
+     * @memberof Md5
+     * @instance
+     * @description Output hash as bytes array
+     * @returns {Array} Bytes array
+     * @see {@link md5.array}
+     * @example
+     * hash.array();
+     */
+    Md5.prototype.array = Md5.prototype.digest;
+
+    /**
+     * @method arrayBuffer
+     * @memberof Md5
+     * @instance
+     * @description Output hash as ArrayBuffer
+     * @returns {ArrayBuffer} ArrayBuffer
+     * @see {@link md5.arrayBuffer}
+     * @example
+     * hash.arrayBuffer();
+     */
+    Md5.prototype.arrayBuffer = function () {
+        this.finalize();
+
+        var buffer = new ArrayBuffer(16);
+        var blocks = new Uint32Array(buffer);
+        blocks[0] = this.h0;
+        blocks[1] = this.h1;
+        blocks[2] = this.h2;
+        blocks[3] = this.h3;
+        return buffer;
+    };
+
+    /**
+     * @method buffer
+     * @deprecated This maybe confuse with Buffer in node.js. Please use arrayBuffer instead.
+     * @memberof Md5
+     * @instance
+     * @description Output hash as ArrayBuffer
+     * @returns {ArrayBuffer} ArrayBuffer
+     * @see {@link md5.buffer}
+     * @example
+     * hash.buffer();
+     */
+    Md5.prototype.buffer = Md5.prototype.arrayBuffer;
+
+    /**
+     * @method base64
+     * @memberof Md5
+     * @instance
+     * @description Output hash as base64 string
+     * @returns {String} base64 string
+     * @see {@link md5.base64}
+     * @example
+     * hash.base64();
+     */
+    Md5.prototype.base64 = function () {
+        var v1, v2, v3, base64Str = '', bytes = this.array();
+        for (var i = 0; i < 15;) {
+            v1 = bytes[i++];
+            v2 = bytes[i++];
+            v3 = bytes[i++];
+            base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
+                BASE64_ENCODE_CHAR[(v1 << 4 | v2 >>> 4) & 63] +
+                BASE64_ENCODE_CHAR[(v2 << 2 | v3 >>> 6) & 63] +
+                BASE64_ENCODE_CHAR[v3 & 63];
+        }
+        v1 = bytes[i];
+        base64Str += BASE64_ENCODE_CHAR[v1 >>> 2] +
+            BASE64_ENCODE_CHAR[(v1 << 4) & 63] +
+            '==';
+        return base64Str;
+    };
+
+    var exports = createMethod();
+
+    if (COMMON_JS) {
+        module.exports = exports;
+    } else {
+        /**
+         * @method md5
+         * @description Md5 hash function, export to global in browsers.
+         * @param {String|Array|Uint8Array|ArrayBuffer} message message to hash
+         * @returns {String} md5 hashes
+         * @example
+         * md5(''); // d41d8cd98f00b204e9800998ecf8427e
+         * md5('The quick brown fox jumps over the lazy dog'); // 9e107d9d372bb6826bd81d3542a419d6
+         * md5('The quick brown fox jumps over the lazy dog.'); // e4d909c290d0fb1ca068ffaddf22cbd0
+         *
+         * // It also supports UTF-8 encoding
+         * md5('中文'); // a7bac2239fcdcb3a067903d8077c4a07
+         *
+         * // It also supports byte `Array`, `Uint8Array`, `ArrayBuffer`
+         * md5([]); // d41d8cd98f00b204e9800998ecf8427e
+         * md5(new Uint8Array([])); // d41d8cd98f00b204e9800998ecf8427e
+         */
+        root.md5 = exports;
+        if (AMD) {
+            define(function () {
+                return exports;
+            });
+        }
+    }
+})();

+ 21 - 0
node_modules/.bin/terser

@@ -0,0 +1,21 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*)
+        if command -v cygpath > /dev/null 2>&1; then
+            basedir=`cygpath -w "$basedir"`
+        fi
+    ;;
+esac
+
+if [ -z "$NODE_PATH" ]; then
+  export NODE_PATH="/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/terser@5.46.0/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/node_modules"
+else
+  export NODE_PATH="/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/terser@5.46.0/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
+fi
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../terser/bin/terser" "$@"
+else
+  exec node  "$basedir/../terser/bin/terser" "$@"
+fi

+ 12 - 0
node_modules/.bin/terser.CMD

@@ -0,0 +1,12 @@
+@SETLOCAL
+@IF NOT DEFINED NODE_PATH (
+  @SET "NODE_PATH=D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\terser@5.46.0\node_modules\terser\bin\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\terser@5.46.0\node_modules\terser\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\terser@5.46.0\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\node_modules"
+) ELSE (
+  @SET "NODE_PATH=D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\terser@5.46.0\node_modules\terser\bin\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\terser@5.46.0\node_modules\terser\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\terser@5.46.0\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\node_modules;%NODE_PATH%"
+)
+@IF EXIST "%~dp0\node.exe" (
+  "%~dp0\node.exe"  "%~dp0\..\terser\bin\terser" %*
+) ELSE (
+  @SET PATHEXT=%PATHEXT:;.JS;=;%
+  node  "%~dp0\..\terser\bin\terser" %*
+)

+ 41 - 0
node_modules/.bin/terser.ps1

@@ -0,0 +1,41 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+$pathsep=":"
+$env_node_path=$env:NODE_PATH
+$new_node_path="D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\terser@5.46.0\node_modules\terser\bin\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\terser@5.46.0\node_modules\terser\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\terser@5.46.0\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\node_modules"
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+  $pathsep=";"
+} else {
+  $new_node_path="/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/terser@5.46.0/node_modules/terser/bin/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/terser@5.46.0/node_modules/terser/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/terser@5.46.0/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/node_modules"
+}
+if ([string]::IsNullOrEmpty($env_node_path)) {
+  $env:NODE_PATH=$new_node_path
+} else {
+  $env:NODE_PATH="$new_node_path$pathsep$env_node_path"
+}
+
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../terser/bin/terser" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../terser/bin/terser" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../terser/bin/terser" $args
+  } else {
+    & "node$exe"  "$basedir/../terser/bin/terser" $args
+  }
+  $ret=$LASTEXITCODE
+}
+$env:NODE_PATH=$env_node_path
+exit $ret

+ 21 - 0
node_modules/.bin/vite

@@ -0,0 +1,21 @@
+#!/bin/sh
+basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
+
+case `uname` in
+    *CYGWIN*|*MINGW*|*MSYS*)
+        if command -v cygpath > /dev/null 2>&1; then
+            basedir=`cygpath -w "$basedir"`
+        fi
+    ;;
+esac
+
+if [ -z "$NODE_PATH" ]; then
+  export NODE_PATH="/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/vite@7.3.1_terser@5.46.0/node_modules/vite/bin/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/vite@7.3.1_terser@5.46.0/node_modules/vite/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/vite@7.3.1_terser@5.46.0/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/node_modules"
+else
+  export NODE_PATH="/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/vite@7.3.1_terser@5.46.0/node_modules/vite/bin/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/vite@7.3.1_terser@5.46.0/node_modules/vite/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/vite@7.3.1_terser@5.46.0/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/node_modules:$NODE_PATH"
+fi
+if [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../vite/bin/vite.js" "$@"
+else
+  exec node  "$basedir/../vite/bin/vite.js" "$@"
+fi

+ 12 - 0
node_modules/.bin/vite.CMD

@@ -0,0 +1,12 @@
+@SETLOCAL
+@IF NOT DEFINED NODE_PATH (
+  @SET "NODE_PATH=D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\vite@7.3.1_terser@5.46.0\node_modules\vite\bin\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\vite@7.3.1_terser@5.46.0\node_modules\vite\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\vite@7.3.1_terser@5.46.0\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\node_modules"
+) ELSE (
+  @SET "NODE_PATH=D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\vite@7.3.1_terser@5.46.0\node_modules\vite\bin\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\vite@7.3.1_terser@5.46.0\node_modules\vite\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\vite@7.3.1_terser@5.46.0\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\node_modules;%NODE_PATH%"
+)
+@IF EXIST "%~dp0\node.exe" (
+  "%~dp0\node.exe"  "%~dp0\..\vite\bin\vite.js" %*
+) ELSE (
+  @SET PATHEXT=%PATHEXT:;.JS;=;%
+  node  "%~dp0\..\vite\bin\vite.js" %*
+)

+ 41 - 0
node_modules/.bin/vite.ps1

@@ -0,0 +1,41 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+$pathsep=":"
+$env_node_path=$env:NODE_PATH
+$new_node_path="D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\vite@7.3.1_terser@5.46.0\node_modules\vite\bin\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\vite@7.3.1_terser@5.46.0\node_modules\vite\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\vite@7.3.1_terser@5.46.0\node_modules;D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm\node_modules"
+if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
+  # Fix case when both the Windows and Linux builds of Node
+  # are installed in the same directory
+  $exe=".exe"
+  $pathsep=";"
+} else {
+  $new_node_path="/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/vite@7.3.1_terser@5.46.0/node_modules/vite/bin/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/vite@7.3.1_terser@5.46.0/node_modules/vite/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/vite@7.3.1_terser@5.46.0/node_modules:/mnt/d/yunfan-new-code/wxxyx-sdk/node_modules/.pnpm/node_modules"
+}
+if ([string]::IsNullOrEmpty($env_node_path)) {
+  $env:NODE_PATH=$new_node_path
+} else {
+  $env:NODE_PATH="$new_node_path$pathsep$env_node_path"
+}
+
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../vite/bin/vite.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../vite/bin/vite.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../vite/bin/vite.js" $args
+  } else {
+    & "node$exe"  "$basedir/../vite/bin/vite.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+$env:NODE_PATH=$env_node_path
+exit $ret

+ 124 - 0
node_modules/.modules.yaml

@@ -0,0 +1,124 @@
+hoistPattern:
+  - '*'
+hoistedDependencies:
+  '@esbuild/win32-x64@0.27.2':
+    '@esbuild/win32-x64': private
+  '@jridgewell/gen-mapping@0.3.13':
+    '@jridgewell/gen-mapping': private
+  '@jridgewell/resolve-uri@3.1.2':
+    '@jridgewell/resolve-uri': private
+  '@jridgewell/source-map@0.3.11':
+    '@jridgewell/source-map': private
+  '@jridgewell/sourcemap-codec@1.5.5':
+    '@jridgewell/sourcemap-codec': private
+  '@jridgewell/trace-mapping@0.3.31':
+    '@jridgewell/trace-mapping': private
+  '@rollup/rollup-win32-x64-gnu@4.57.1':
+    '@rollup/rollup-win32-x64-gnu': private
+  '@rollup/rollup-win32-x64-msvc@4.57.1':
+    '@rollup/rollup-win32-x64-msvc': private
+  '@types/estree@1.0.8':
+    '@types/estree': private
+  acorn@8.15.0:
+    acorn: private
+  buffer-from@1.1.2:
+    buffer-from: private
+  charenc@0.0.2:
+    charenc: private
+  commander@2.20.3:
+    commander: private
+  crypt@0.0.2:
+    crypt: private
+  esbuild@0.27.2:
+    esbuild: private
+  fdir@6.5.0(picomatch@4.0.3):
+    fdir: private
+  is-buffer@1.1.6:
+    is-buffer: private
+  nanoid@3.3.11:
+    nanoid: private
+  picocolors@1.1.1:
+    picocolors: private
+  picomatch@4.0.3:
+    picomatch: private
+  postcss@8.5.6:
+    postcss: private
+  rollup@4.57.1:
+    rollup: private
+  source-map-js@1.2.1:
+    source-map-js: private
+  source-map-support@0.5.21:
+    source-map-support: private
+  source-map@0.6.1:
+    source-map: private
+  tinyglobby@0.2.15:
+    tinyglobby: private
+ignoredBuilds:
+  - esbuild@0.27.2
+included:
+  dependencies: true
+  devDependencies: true
+  optionalDependencies: true
+injectedDeps: {}
+layoutVersion: 5
+nodeLinker: isolated
+packageManager: pnpm@10.28.2
+pendingBuilds: []
+prunedAt: Thu, 12 Mar 2026 02:51:41 GMT
+publicHoistPattern: []
+registries:
+  '@jsr': https://npm.jsr.io/
+  default: https://registry.npmjs.org/
+skipped:
+  - '@esbuild/aix-ppc64@0.27.2'
+  - '@esbuild/android-arm64@0.27.2'
+  - '@esbuild/android-arm@0.27.2'
+  - '@esbuild/android-x64@0.27.2'
+  - '@esbuild/darwin-arm64@0.27.2'
+  - '@esbuild/darwin-x64@0.27.2'
+  - '@esbuild/freebsd-arm64@0.27.2'
+  - '@esbuild/freebsd-x64@0.27.2'
+  - '@esbuild/linux-arm64@0.27.2'
+  - '@esbuild/linux-arm@0.27.2'
+  - '@esbuild/linux-ia32@0.27.2'
+  - '@esbuild/linux-loong64@0.27.2'
+  - '@esbuild/linux-mips64el@0.27.2'
+  - '@esbuild/linux-ppc64@0.27.2'
+  - '@esbuild/linux-riscv64@0.27.2'
+  - '@esbuild/linux-s390x@0.27.2'
+  - '@esbuild/linux-x64@0.27.2'
+  - '@esbuild/netbsd-arm64@0.27.2'
+  - '@esbuild/netbsd-x64@0.27.2'
+  - '@esbuild/openbsd-arm64@0.27.2'
+  - '@esbuild/openbsd-x64@0.27.2'
+  - '@esbuild/openharmony-arm64@0.27.2'
+  - '@esbuild/sunos-x64@0.27.2'
+  - '@esbuild/win32-arm64@0.27.2'
+  - '@esbuild/win32-ia32@0.27.2'
+  - '@rollup/rollup-android-arm-eabi@4.57.1'
+  - '@rollup/rollup-android-arm64@4.57.1'
+  - '@rollup/rollup-darwin-arm64@4.57.1'
+  - '@rollup/rollup-darwin-x64@4.57.1'
+  - '@rollup/rollup-freebsd-arm64@4.57.1'
+  - '@rollup/rollup-freebsd-x64@4.57.1'
+  - '@rollup/rollup-linux-arm-gnueabihf@4.57.1'
+  - '@rollup/rollup-linux-arm-musleabihf@4.57.1'
+  - '@rollup/rollup-linux-arm64-gnu@4.57.1'
+  - '@rollup/rollup-linux-arm64-musl@4.57.1'
+  - '@rollup/rollup-linux-loong64-gnu@4.57.1'
+  - '@rollup/rollup-linux-loong64-musl@4.57.1'
+  - '@rollup/rollup-linux-ppc64-gnu@4.57.1'
+  - '@rollup/rollup-linux-ppc64-musl@4.57.1'
+  - '@rollup/rollup-linux-riscv64-gnu@4.57.1'
+  - '@rollup/rollup-linux-riscv64-musl@4.57.1'
+  - '@rollup/rollup-linux-s390x-gnu@4.57.1'
+  - '@rollup/rollup-linux-x64-gnu@4.57.1'
+  - '@rollup/rollup-linux-x64-musl@4.57.1'
+  - '@rollup/rollup-openbsd-x64@4.57.1'
+  - '@rollup/rollup-openharmony-arm64@4.57.1'
+  - '@rollup/rollup-win32-arm64-msvc@4.57.1'
+  - '@rollup/rollup-win32-ia32-msvc@4.57.1'
+  - fsevents@2.3.3
+storeDir: D:\.pnpm-store\v10
+virtualStoreDir: D:\yunfan-new-code\wxxyx-sdk\node_modules\.pnpm
+virtualStoreDirMaxLength: 60

+ 25 - 0
node_modules/.pnpm-workspace-state-v1.json

@@ -0,0 +1,25 @@
+{
+  "lastValidatedTimestamp": 1773283902367,
+  "projects": {},
+  "pnpmfiles": [],
+  "settings": {
+    "autoInstallPeers": true,
+    "dedupeDirectDeps": false,
+    "dedupeInjectedDeps": true,
+    "dedupePeerDependents": true,
+    "dev": true,
+    "excludeLinksFromLockfile": false,
+    "hoistPattern": [
+      "*"
+    ],
+    "hoistWorkspacePackages": true,
+    "injectWorkspacePackages": false,
+    "linkWorkspacePackages": false,
+    "nodeLinker": "isolated",
+    "optional": true,
+    "preferWorkspacePackages": false,
+    "production": true,
+    "publicHoistPattern": []
+  },
+  "filteredInstall": false
+}

+ 7 - 0
node_modules/.pnpm/@dn-sdk+minigame@1.5.6/node_modules/@dn-sdk/minigame/README.md

@@ -0,0 +1,7 @@
+# 腾讯广告小游戏SDK-微信小游戏
+
+![DataNexus](https://cdn.datanexus.qq.com/data-nexus-static/data-nexus-docs/production/assets/images/DataNexus-logo-sdk.png)
+
+## 使用方法
+
+使用方法请查看【[开发指引](https://datanexus.qq.com/doc/develop/guider/sdk/minigame/init)】

File diff suppressed because it is too large
+ 5 - 0
node_modules/.pnpm/@dn-sdk+minigame@1.5.6/node_modules/@dn-sdk/minigame/build/index.cjs.js


+ 542 - 0
node_modules/.pnpm/@dn-sdk+minigame@1.5.6/node_modules/@dn-sdk/minigame/build/index.d.ts

@@ -0,0 +1,542 @@
+/**
+ * SDK 初始化参数
+ */
+interface SdkConfig {
+    /**
+     * 数据源ID,必填
+     */
+    user_action_set_id: number;
+    /**
+     * 加密key,必填
+     */
+    secret_key: string;
+    /**
+     * 微信小程序/小游戏APPID,wx开头,必填
+     */
+    appid: string;
+    /**
+     * 微信 openid,openid 和 unionid 至少填一个, 可以调用 setOpenId 设置
+     */
+    openid?: string;
+    /**
+     * 微信 unionid,openid 和 unionid 至少填一个, 可以调用 setUnionId 设置
+     */
+    unionid?: string;
+    /**
+     * 自定义用户ID,选填
+     */
+    user_unique_id?: string;
+    /**
+     * 是否自动采集事件
+     */
+    auto_track?: boolean;
+    /**
+     * 是否自动采集属性
+     */
+    auto_attr?: boolean;
+    /**
+     * 上报回调(包括成功、失败、重试的各种场景)
+     */
+    on_report_complete?: Function | undefined;
+    /**
+     * 明确上报失败的回调(sdk内部会直接丢弃的行为,无法再重试上报成功的部分)
+     */
+    on_report_fail?: Function | undefined;
+}
+/**
+ * 小程序/小游戏信息
+ */
+interface GameInfo {
+    /**
+     * 广告点击id、曝光id
+     */
+    ad_trace_id?: string;
+    /**
+     * 页面路径,小游戏没有
+     */
+    page_url?: string;
+    /**
+     * 页面名称,小游戏没有
+     */
+    page_title?: string;
+    /**
+     * 组件名称
+     */
+    component_name?: string;
+    /**
+     * 场景来源
+     */
+    source_scene?: number;
+    /**
+     * 渠道号
+     */
+    pkg_channel_id?: string;
+    /**
+     * 框架信息,小游戏没有
+     */
+    framework?: string;
+    /**
+     * 渠道来源
+     */
+    channel: string;
+    /**
+     * 启动参数
+     */
+    launch_options: string;
+}
+/**
+ * 设备信息
+ */
+interface DeviceInfo {
+    /**
+     * 设备品牌
+     */
+    device_brand: string;
+    /**
+     * 设备型号
+     */
+    device_model: string;
+    /**
+     * 微信App版本
+     */
+    wx_version: string;
+    /**
+     * 微信基础库版本
+     */
+    wx_lib_version: string;
+    /**
+     * 微信客户端平台
+     */
+    wx_platform: string;
+    /**
+     * 操作系统
+     */
+    os: string;
+    /**
+     * 操作系统版本
+     */
+    os_version: string;
+    /**
+     * 设备性能等级
+     */
+    benchmark_level: number;
+    /**
+     * 屏幕高度
+     */
+    screen_height: number;
+    /**
+     * 屏幕宽度
+     */
+    screen_width: number;
+}
+interface TrackBaseInfo extends SdkConfig, DeviceInfo {
+    local_id: string;
+    sdk_name: string;
+    sdk_version: string;
+    inner_param: {
+        app_version: string;
+        app_env_version: string;
+    };
+}
+/**
+ * 行为信息
+ */
+interface ActionInfo {
+    action_type: string;
+    action_param?: Record<string | number | symbol, unknown>;
+    is_sdk_auto_track: boolean;
+    session_id: string;
+    log_id: number;
+    action_id: string;
+    action_time: number;
+    revised_action_time: number;
+    is_retry: boolean;
+    retry_count: number;
+    ad_trace_id?: string;
+    page_url?: string;
+    page_title?: string;
+    component_name?: string;
+    source_scene?: number;
+    pkg_channel_id?: string;
+    /**
+     * 网络类型
+     */
+    network_type?: string;
+    inner_param?: Record<string | number | symbol, unknown>;
+    channel?: string;
+}
+interface LogParams {
+    log_type: string;
+    code?: number;
+    message?: string;
+    err_stack?: string;
+    user_action_set_id?: number;
+    appid?: string;
+    local_id?: string;
+    session_id?: string;
+    sdk_name?: string;
+    sdk_version?: string;
+    page_url?: string;
+    framework?: string;
+    device_brand?: string;
+    device_model?: string;
+    wx_version?: string;
+    wx_lib_version?: string;
+    wx_platform?: string;
+    os?: string;
+    os_version?: string;
+}
+interface TrackResponse {
+    code: number;
+    message: string;
+    actionId?: string;
+}
+
+interface QueueProps {
+    /**
+     * 数据源ID,用于本地存储队列key
+     */
+    userActionSetId: number;
+    /**
+     * 队列长度
+     */
+    maxLength: number;
+}
+interface QueueManagerProps extends QueueProps {
+    /**
+     * OG事件列表
+     */
+    ogEvents: string[];
+}
+interface IEvent extends ActionInfo {
+    inner_status?: string;
+}
+
+/**
+ * 队列原子操作
+ */
+
+declare class Queue {
+    protected maxLength: any;
+    protected userActionSetId: any;
+    protected lostActionMaps: Record<string, number>;
+    private stack;
+    private localStorageKey;
+    private timeStamp;
+    constructor({ userActionSetId, maxLength }: QueueProps);
+    getItems(): IEvent[];
+    getStorage(): IEvent[];
+    /**
+     * 上报丢失条数到日志系统
+     */
+    reportLostNum(): void;
+    /**
+     * 获取丢失条数map
+     * @returns 丢失条数map
+     */
+    getLostMaps(): Record<string, number>;
+    protected init(): void;
+    protected addItem(eventData: IEvent): void;
+    protected removeItems(actionIds: string[]): void;
+    protected updateForReportFail(actionIds: string[]): void;
+    protected updateForReporting(actionIds: string[]): void;
+    protected updateAllStack(stack: IEvent[]): void;
+    protected updateToStorage(): void;
+    /**
+     * 更新丢失条数
+     * @param sessionId 当前被丢弃行为的会话id
+     */
+    protected updateLostAction(sessionId: string): void;
+    /**
+     * 设置时间戳
+     */
+    protected setTimeStamp(): void;
+}
+
+declare class QueueManage extends Queue {
+    protected ogEvents: string[];
+    constructor({ userActionSetId, maxLength, ogEvents }: QueueManagerProps);
+    /**
+     * 获取可上报的队列
+     * @param reportMaxLength 需要上报的队列最大长度
+     */
+    getReportableActions(reportMaxLength?: number): IEvent[];
+    /**
+     * 添加行为到队列
+     * @param eventData 单条行为数据
+     */
+    addAction(eventData: IEvent): TrackResponse;
+    /**
+     * 根据acition_id删除行为
+     * @param actionIds 行为id列表
+     */
+    removeActions(actionIds: string[]): void;
+    /**
+     * 上报失败时更新队列状态
+     * @param actionIds
+     */
+    updateActionsForReportFail(actionIds: string[]): void;
+    /**
+     * 上报时更新队列状态为reporting
+     * @param actionIds 需要更新的行为id数组
+     */
+    updateActionsForReporting(actionIds: string[]): void;
+    /**
+     * 获取可上报队列长度
+     * @returns 可上报队列长度
+     */
+    getReportableActionsLength(): number;
+    /**
+     * 按照优先级从大到小给队列排序
+     * @param currEvent 当前事件
+     * @param stack 当前队列
+     */
+    sortQueue(currEvent: IEvent, stack: IEvent[]): IEvent[];
+    /**
+     * 计算优先级
+     * @param currTime 当前时间
+     * @param event 行为事件
+     * @returns 权重值
+     */
+    private caculateWeight;
+    /**
+     *
+     * @param currTime 当前时间
+     * @param actionTime 队列行为时间
+     * @returns 权重值
+     */
+    private formatWeight;
+}
+
+interface ConfigManager {
+    getRealTimeActionList: () => Array<string>;
+    getRequestTimeout: () => number;
+}
+interface ActionReporterProps {
+    getBaseInfo: () => TrackBaseInfo;
+    reportLog: (param: LogParams) => void;
+    queueManager: QueueManage;
+    configManager?: ConfigManager;
+    onReportComplete?: Function | undefined;
+    onReportFail?: Function | undefined;
+}
+/**
+ * 行为上报类
+ */
+declare class ActionReporter {
+    private static currentRequestCount;
+    private static requestConcurrency;
+    static setRequestConcurrency(n: number): void;
+    private getBaseInfo;
+    private reportLog;
+    private queueManager;
+    private configManager;
+    private onReportComplete;
+    private onReportFail;
+    private cgiBatchSize;
+    private reportThreshold;
+    private reportDelay;
+    private triggerExecuteSend;
+    private inspectDelay;
+    private inspectTimer;
+    private isNeedContinueSend;
+    constructor(props: ActionReporterProps);
+    /**
+     * 批量上报行为,track的时候触发
+     */
+    batchSend(): void;
+    /**
+     * 全量上报, flush的时候触发
+     */
+    flushSend(): void;
+    /**
+     * 执行指定数量的行为上报逻辑,超过接口batch上限则并行发送请求
+     */
+    private executeSend;
+    /**
+     * 组装上报用的行为数据
+     */
+    private generateActionReportParams;
+    /**
+     * 上报接口请求成功逻辑处理
+     * @param resData
+     * @param actionIdList
+     */
+    private dealSuccessData;
+    /**
+     * 上报接口请求失败逻辑处理
+     * @param errData
+     * @param actionIdList
+     */
+    private dealFailData;
+    /**
+     * wx.request文档:https://developers.weixin.qq.com/minigame/dev/api/network/request/wx.request.html
+     * @param param.data:接口请求参数、param.actionIdList:行为id列表
+     * @returns
+     */
+    private report;
+    /**
+     * 启动上报定时器
+     */
+    private startInspectTimer;
+    /**
+     * 上报回调数据
+     */
+    private doTrackCallbackFn;
+}
+
+declare abstract class SdkExtCommon {
+    protected special_method_symbol: symbol;
+    /**
+     * 付费
+     */
+    onPurchase(value: number): TrackResponse;
+    /**
+     * 进入前台
+     */
+    onEnterForeground(): TrackResponse;
+    /**
+     * 进入后台
+     */
+    onEnterBackground(): TrackResponse;
+    /**
+     * 启动
+     */
+    onAppStart(): TrackResponse;
+    /**
+     * 退出
+     */
+    onAppQuit(): TrackResponse;
+    /**
+     * 收藏
+     */
+    onAddToWishlist(): TrackResponse;
+    protected wrapTrack(action_type: ActionInfo["action_type"], action_param?: ActionInfo["action_param"]): TrackResponse;
+    abstract track(action_type: ActionInfo["action_type"], action_param?: ActionInfo["action_param"]): TrackResponse;
+}
+
+declare abstract class sdkExt extends SdkExtCommon {
+    /**
+     * 注册
+     */
+    onRegister(): TrackResponse;
+    /**
+     * 创角
+     */
+    onCreateRole(name?: string): TrackResponse;
+    /**
+     * 完成新手教程
+     */
+    onTutorialFinish(): TrackResponse;
+}
+
+declare const initializedInstanceSymbol: unique symbol;
+declare class SDK extends sdkExt {
+    private static [initializedInstanceSymbol];
+    static setRequestConcurrency(n: number): void;
+    static setDebug(debug: boolean): void;
+    protected env: string;
+    protected sdk_version: string;
+    protected sdk_name: string;
+    protected config?: SdkConfig;
+    protected deviceInfo: Partial<DeviceInfo>;
+    protected gameInfo: Partial<GameInfo>;
+    protected session_id: string;
+    protected log_id: number;
+    protected queueManage?: QueueManage;
+    protected actionReporter?: ActionReporter;
+    protected openid?: string;
+    protected unionid?: string;
+    protected user_unique_id?: string;
+    protected inited: boolean;
+    protected initErrMsg: string;
+    protected onReportComplete?: Function | undefined;
+    protected onReportFail?: Function | undefined;
+    constructor(sdkConfig: SdkConfig);
+    /**
+     * 返回初始化状态
+     * @returns
+     */
+    getInitResult(): {
+        inited: boolean;
+        initErrMsg: string;
+    };
+    /**
+     * 数据上报方法
+     * 0: 成功
+     * 100: 未完成初始化或重复初始化导致初始化失败,请先完成初始化
+     * 101: action_type 或 action_param 参数错误
+     * 102: action_param 参数过大,不能超过 xxxx 字符
+     * 103: 缓存队列已满,主动丢弃行为
+     *
+     */
+    track(action_type: ActionInfo['action_type'], action_param?: ActionInfo['action_param']): TrackResponse;
+    /**
+     * 立即上报数据
+     */
+    flush(): void;
+    /**
+     * 设置 openId
+     * 0: 成功
+     * 101: openid 格式错误
+     */
+    setOpenId(openid: string): {
+        code: number;
+        message: string;
+    };
+    /**
+       * 设置 unionid
+       * 0: 成功
+       * 101: unionid 格式错误
+       */
+    setUnionId(unionid: string): {
+        code: number;
+        message: string;
+    };
+    /**
+       * 设置 user_unique_id
+       * @param user_unique_id
+       */
+    setUserUniqueId(user_unique_id: string): {
+        code: number;
+        message: string;
+    };
+    protected doReportOnEnterBackground(): void;
+    /**
+       * 获取数据上报时所需要的 info 参数
+       */
+    private getTrackBaseInfo;
+    /**
+     * 生成上报队列需要的行为数据
+     * @param actionParams 行为参数
+     * @param is_sdk_auto_track 是否自动采集
+     * @returns
+     */
+    private createAction;
+    /**
+     * 给指定行为的inner_param字段追加字段
+     * @param action 待追加字段的行为
+     * @param key 待添加到inner_param字段的key
+     * @param value key对应的value
+     */
+    private addActionInnerParam;
+    /**
+     * 不同行为携带的渠道来源判断逻辑
+     * @param actionType
+     * @returns
+     */
+    private getChannelByActionType;
+    /**
+     * 上报日志
+     * @param params 日志参数
+     */
+    private reportLog;
+    private useAutoTrack;
+    private getAutoProxyRemoteConfig;
+    /**
+     * 设置openid时,如果值合法缓存到Storage
+     */
+    private saveValidOpenidToStorage;
+}
+
+export { SDK };

File diff suppressed because it is too large
+ 5 - 0
node_modules/.pnpm/@dn-sdk+minigame@1.5.6/node_modules/@dn-sdk/minigame/build/index.js


File diff suppressed because it is too large
+ 5 - 0
node_modules/.pnpm/@dn-sdk+minigame@1.5.6/node_modules/@dn-sdk/minigame/build/index.umd.js


+ 14 - 0
node_modules/.pnpm/@dn-sdk+minigame@1.5.6/node_modules/@dn-sdk/minigame/package.json

@@ -0,0 +1,14 @@
+{
+  "name": "@dn-sdk/minigame",
+  "version": "1.5.6",
+  "description": "",
+  "main": "build/index.js",
+  "module": "build/index.js",
+  "types": "build/index.d.ts",
+  "type": "module",
+  "files": [
+    "build"
+  ],
+  "keywords": [],
+  "license": "ISC"
+}

+ 3 - 0
node_modules/.pnpm/@esbuild+win32-x64@0.27.2/node_modules/@esbuild/win32-x64/README.md

@@ -0,0 +1,3 @@
+# esbuild
+
+This is the Windows 64-bit binary for esbuild, a JavaScript bundler and minifier. See https://github.com/evanw/esbuild for details.

二進制
node_modules/.pnpm/@esbuild+win32-x64@0.27.2/node_modules/@esbuild/win32-x64/esbuild.exe


+ 20 - 0
node_modules/.pnpm/@esbuild+win32-x64@0.27.2/node_modules/@esbuild/win32-x64/package.json

@@ -0,0 +1,20 @@
+{
+  "name": "@esbuild/win32-x64",
+  "version": "0.27.2",
+  "description": "The Windows 64-bit binary for esbuild, a JavaScript bundler.",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/evanw/esbuild.git"
+  },
+  "license": "MIT",
+  "preferUnplugged": true,
+  "engines": {
+    "node": ">=18"
+  },
+  "os": [
+    "win32"
+  ],
+  "cpu": [
+    "x64"
+  ]
+}

+ 19 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/LICENSE

@@ -0,0 +1,19 @@
+Copyright 2024 Justin Ridgewell <justin@ridgewell.name>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 227 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/README.md

@@ -0,0 +1,227 @@
+# @jridgewell/gen-mapping
+
+> Generate source maps
+
+`gen-mapping` allows you to generate a source map during transpilation or minification.
+With a source map, you're able to trace the original location in the source file, either in Chrome's
+DevTools or using a library like [`@jridgewell/trace-mapping`][trace-mapping].
+
+You may already be familiar with the [`source-map`][source-map] package's `SourceMapGenerator`. This
+provides the same `addMapping` and `setSourceContent` API.
+
+## Installation
+
+```sh
+npm install @jridgewell/gen-mapping
+```
+
+## Usage
+
+```typescript
+import { GenMapping, addMapping, setSourceContent, toEncodedMap, toDecodedMap } from '@jridgewell/gen-mapping';
+
+const map = new GenMapping({
+  file: 'output.js',
+  sourceRoot: 'https://example.com/',
+});
+
+setSourceContent(map, 'input.js', `function foo() {}`);
+
+addMapping(map, {
+  // Lines start at line 1, columns at column 0.
+  generated: { line: 1, column: 0 },
+  source: 'input.js',
+  original: { line: 1, column: 0 },
+});
+
+addMapping(map, {
+  generated: { line: 1, column: 9 },
+  source: 'input.js',
+  original: { line: 1, column: 9 },
+  name: 'foo',
+});
+
+assert.deepEqual(toDecodedMap(map), {
+  version: 3,
+  file: 'output.js',
+  names: ['foo'],
+  sourceRoot: 'https://example.com/',
+  sources: ['input.js'],
+  sourcesContent: ['function foo() {}'],
+  mappings: [
+    [ [0, 0, 0, 0], [9, 0, 0, 9, 0] ]
+  ],
+});
+
+assert.deepEqual(toEncodedMap(map), {
+  version: 3,
+  file: 'output.js',
+  names: ['foo'],
+  sourceRoot: 'https://example.com/',
+  sources: ['input.js'],
+  sourcesContent: ['function foo() {}'],
+  mappings: 'AAAA,SAASA',
+});
+```
+
+### Smaller Sourcemaps
+
+Not everything needs to be added to a sourcemap, and needless markings can cause signficantly
+larger file sizes. `gen-mapping` exposes `maybeAddSegment`/`maybeAddMapping` APIs that will
+intelligently determine if this marking adds useful information. If not, the marking will be
+skipped.
+
+```typescript
+import { maybeAddMapping } from '@jridgewell/gen-mapping';
+
+const map = new GenMapping();
+
+// Adding a sourceless marking at the beginning of a line isn't useful.
+maybeAddMapping(map, {
+  generated: { line: 1, column: 0 },
+});
+
+// Adding a new source marking is useful.
+maybeAddMapping(map, {
+  generated: { line: 1, column: 0 },
+  source: 'input.js',
+  original: { line: 1, column: 0 },
+});
+
+// But adding another marking pointing to the exact same original location isn't, even if the
+// generated column changed.
+maybeAddMapping(map, {
+  generated: { line: 1, column: 9 },
+  source: 'input.js',
+  original: { line: 1, column: 0 },
+});
+
+assert.deepEqual(toEncodedMap(map), {
+  version: 3,
+  names: [],
+  sources: ['input.js'],
+  sourcesContent: [null],
+  mappings: 'AAAA',
+});
+```
+
+## Benchmarks
+
+```
+node v18.0.0
+
+amp.js.map
+Memory Usage:
+gen-mapping: addSegment      5852872 bytes
+gen-mapping: addMapping      7716042 bytes
+source-map-js                6143250 bytes
+source-map-0.6.1             6124102 bytes
+source-map-0.8.0             6121173 bytes
+Smallest memory usage is gen-mapping: addSegment
+
+Adding speed:
+gen-mapping:      addSegment x 441 ops/sec ±2.07% (90 runs sampled)
+gen-mapping:      addMapping x 350 ops/sec ±2.40% (86 runs sampled)
+source-map-js:    addMapping x 169 ops/sec ±2.42% (80 runs sampled)
+source-map-0.6.1: addMapping x 167 ops/sec ±2.56% (80 runs sampled)
+source-map-0.8.0: addMapping x 168 ops/sec ±2.52% (80 runs sampled)
+Fastest is gen-mapping:      addSegment
+
+Generate speed:
+gen-mapping:      decoded output x 150,824,370 ops/sec ±0.07% (102 runs sampled)
+gen-mapping:      encoded output x 663 ops/sec ±0.22% (98 runs sampled)
+source-map-js:    encoded output x 197 ops/sec ±0.45% (84 runs sampled)
+source-map-0.6.1: encoded output x 198 ops/sec ±0.33% (85 runs sampled)
+source-map-0.8.0: encoded output x 197 ops/sec ±0.06% (93 runs sampled)
+Fastest is gen-mapping:      decoded output
+
+
+***
+
+
+babel.min.js.map
+Memory Usage:
+gen-mapping: addSegment     37578063 bytes
+gen-mapping: addMapping     37212897 bytes
+source-map-js               47638527 bytes
+source-map-0.6.1            47690503 bytes
+source-map-0.8.0            47470188 bytes
+Smallest memory usage is gen-mapping: addMapping
+
+Adding speed:
+gen-mapping:      addSegment x 31.05 ops/sec ±8.31% (43 runs sampled)
+gen-mapping:      addMapping x 29.83 ops/sec ±7.36% (51 runs sampled)
+source-map-js:    addMapping x 20.73 ops/sec ±6.22% (38 runs sampled)
+source-map-0.6.1: addMapping x 20.03 ops/sec ±10.51% (38 runs sampled)
+source-map-0.8.0: addMapping x 19.30 ops/sec ±8.27% (37 runs sampled)
+Fastest is gen-mapping:      addSegment
+
+Generate speed:
+gen-mapping:      decoded output x 381,379,234 ops/sec ±0.29% (96 runs sampled)
+gen-mapping:      encoded output x 95.15 ops/sec ±2.98% (72 runs sampled)
+source-map-js:    encoded output x 15.20 ops/sec ±7.41% (33 runs sampled)
+source-map-0.6.1: encoded output x 16.36 ops/sec ±10.46% (31 runs sampled)
+source-map-0.8.0: encoded output x 16.06 ops/sec ±6.45% (31 runs sampled)
+Fastest is gen-mapping:      decoded output
+
+
+***
+
+
+preact.js.map
+Memory Usage:
+gen-mapping: addSegment       416247 bytes
+gen-mapping: addMapping       419824 bytes
+source-map-js                1024619 bytes
+source-map-0.6.1             1146004 bytes
+source-map-0.8.0             1113250 bytes
+Smallest memory usage is gen-mapping: addSegment
+
+Adding speed:
+gen-mapping:      addSegment x 13,755 ops/sec ±0.15% (98 runs sampled)
+gen-mapping:      addMapping x 13,013 ops/sec ±0.11% (101 runs sampled)
+source-map-js:    addMapping x 4,564 ops/sec ±0.21% (98 runs sampled)
+source-map-0.6.1: addMapping x 4,562 ops/sec ±0.11% (99 runs sampled)
+source-map-0.8.0: addMapping x 4,593 ops/sec ±0.11% (100 runs sampled)
+Fastest is gen-mapping:      addSegment
+
+Generate speed:
+gen-mapping:      decoded output x 379,864,020 ops/sec ±0.23% (93 runs sampled)
+gen-mapping:      encoded output x 14,368 ops/sec ±4.07% (82 runs sampled)
+source-map-js:    encoded output x 5,261 ops/sec ±0.21% (99 runs sampled)
+source-map-0.6.1: encoded output x 5,124 ops/sec ±0.58% (99 runs sampled)
+source-map-0.8.0: encoded output x 5,434 ops/sec ±0.33% (96 runs sampled)
+Fastest is gen-mapping:      decoded output
+
+
+***
+
+
+react.js.map
+Memory Usage:
+gen-mapping: addSegment       975096 bytes
+gen-mapping: addMapping      1102981 bytes
+source-map-js                2918836 bytes
+source-map-0.6.1             2885435 bytes
+source-map-0.8.0             2874336 bytes
+Smallest memory usage is gen-mapping: addSegment
+
+Adding speed:
+gen-mapping:      addSegment x 4,772 ops/sec ±0.15% (100 runs sampled)
+gen-mapping:      addMapping x 4,456 ops/sec ±0.13% (97 runs sampled)
+source-map-js:    addMapping x 1,618 ops/sec ±0.24% (97 runs sampled)
+source-map-0.6.1: addMapping x 1,622 ops/sec ±0.12% (99 runs sampled)
+source-map-0.8.0: addMapping x 1,631 ops/sec ±0.12% (100 runs sampled)
+Fastest is gen-mapping:      addSegment
+
+Generate speed:
+gen-mapping:      decoded output x 379,107,695 ops/sec ±0.07% (99 runs sampled)
+gen-mapping:      encoded output x 5,421 ops/sec ±1.60% (89 runs sampled)
+source-map-js:    encoded output x 2,113 ops/sec ±1.81% (98 runs sampled)
+source-map-0.6.1: encoded output x 2,126 ops/sec ±0.10% (100 runs sampled)
+source-map-0.8.0: encoded output x 2,176 ops/sec ±0.39% (98 runs sampled)
+Fastest is gen-mapping:      decoded output
+```
+
+[source-map]: https://www.npmjs.com/package/source-map
+[trace-mapping]: https://github.com/jridgewell/sourcemaps/tree/main/packages/trace-mapping

+ 292 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/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/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map


+ 358 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/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/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map


+ 88 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/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/.pnpm/@jridgewell+gen-mapping@0.3.13/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/.pnpm/@jridgewell+gen-mapping@0.3.13/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/.pnpm/@jridgewell+gen-mapping@0.3.13/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;
+};

+ 67 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/package.json

@@ -0,0 +1,67 @@
+{
+  "name": "@jridgewell/gen-mapping",
+  "version": "0.3.13",
+  "description": "Generate source maps",
+  "keywords": [
+    "source",
+    "map"
+  ],
+  "main": "dist/gen-mapping.umd.js",
+  "module": "dist/gen-mapping.mjs",
+  "types": "types/gen-mapping.d.cts",
+  "files": [
+    "dist",
+    "src",
+    "types"
+  ],
+  "exports": {
+    ".": [
+      {
+        "import": {
+          "types": "./types/gen-mapping.d.mts",
+          "default": "./dist/gen-mapping.mjs"
+        },
+        "default": {
+          "types": "./types/gen-mapping.d.cts",
+          "default": "./dist/gen-mapping.umd.js"
+        }
+      },
+      "./dist/gen-mapping.umd.js"
+    ],
+    "./package.json": "./package.json"
+  },
+  "scripts": {
+    "benchmark": "run-s build:code benchmark:*",
+    "benchmark:install": "cd benchmark && npm install",
+    "benchmark:only": "node --expose-gc benchmark/index.js",
+    "build": "run-s -n build:code build:types",
+    "build:code": "node ../../esbuild.mjs gen-mapping.ts",
+    "build:types": "run-s build:types:force build:types:emit build:types:mts",
+    "build:types:force": "rimraf tsconfig.build.tsbuildinfo",
+    "build:types:emit": "tsc --project tsconfig.build.json",
+    "build:types:mts": "node ../../mts-types.mjs",
+    "clean": "run-s -n clean:code clean:types",
+    "clean:code": "tsc --build --clean tsconfig.build.json",
+    "clean:types": "rimraf dist types",
+    "test": "run-s -n test:types test:only test:format",
+    "test:format": "prettier --check '{src,test}/**/*.ts'",
+    "test:only": "mocha",
+    "test:types": "eslint '{src,test}/**/*.ts'",
+    "lint": "run-s -n lint:types lint:format",
+    "lint:format": "npm run test:format -- --write",
+    "lint:types": "npm run test:types -- --fix",
+    "prepublishOnly": "npm run-s -n build test"
+  },
+  "homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/gen-mapping",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/jridgewell/sourcemaps.git",
+    "directory": "packages/gen-mapping"
+  },
+  "author": "Justin Ridgewell <justin@ridgewell.name>",
+  "license": "MIT",
+  "dependencies": {
+    "@jridgewell/sourcemap-codec": "^1.5.0",
+    "@jridgewell/trace-mapping": "^0.3.24"
+  }
+}

+ 614 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts

@@ -0,0 +1,614 @@
+import { SetArray, put, remove } from './set-array';
+import {
+  encode,
+  // encodeGeneratedRanges,
+  // encodeOriginalScopes
+} from '@jridgewell/sourcemap-codec';
+import { TraceMap, decodedMappings } from '@jridgewell/trace-mapping';
+
+import {
+  COLUMN,
+  SOURCES_INDEX,
+  SOURCE_LINE,
+  SOURCE_COLUMN,
+  NAMES_INDEX,
+} from './sourcemap-segment';
+
+import type { SourceMapInput } from '@jridgewell/trace-mapping';
+// import type { OriginalScope, GeneratedRange } from '@jridgewell/sourcemap-codec';
+import type { SourceMapSegment } from './sourcemap-segment';
+import type {
+  DecodedSourceMap,
+  EncodedSourceMap,
+  Pos,
+  Mapping,
+  // BindingExpressionRange,
+  // OriginalPos,
+  // OriginalScopeInfo,
+  // GeneratedRangeInfo,
+} from './types';
+
+export type { DecodedSourceMap, EncodedSourceMap, Mapping };
+
+export type Options = {
+  file?: string | null;
+  sourceRoot?: string | null;
+};
+
+const NO_NAME = -1;
+
+/**
+ * Provides the state to generate a sourcemap.
+ */
+export class GenMapping {
+  declare private _names: SetArray<string>;
+  declare private _sources: SetArray<string>;
+  declare private _sourcesContent: (string | null)[];
+  declare private _mappings: SourceMapSegment[][];
+  // private declare _originalScopes: OriginalScope[][];
+  // private declare _generatedRanges: GeneratedRange[];
+  declare private _ignoreList: SetArray<number>;
+  declare file: string | null | undefined;
+  declare sourceRoot: string | null | undefined;
+
+  constructor({ file, sourceRoot }: Options = {}) {
+    this._names = new SetArray();
+    this._sources = new SetArray();
+    this._sourcesContent = [];
+    this._mappings = [];
+    // this._originalScopes = [];
+    // this._generatedRanges = [];
+    this.file = file;
+    this.sourceRoot = sourceRoot;
+    this._ignoreList = new SetArray();
+  }
+}
+
+interface PublicMap {
+  _names: GenMapping['_names'];
+  _sources: GenMapping['_sources'];
+  _sourcesContent: GenMapping['_sourcesContent'];
+  _mappings: GenMapping['_mappings'];
+  // _originalScopes: GenMapping['_originalScopes'];
+  // _generatedRanges: GenMapping['_generatedRanges'];
+  _ignoreList: GenMapping['_ignoreList'];
+}
+
+/**
+ * Typescript doesn't allow friend access to private fields, so this just casts the map into a type
+ * with public access modifiers.
+ */
+function cast(map: unknown): PublicMap {
+  return map as any;
+}
+
+/**
+ * A low-level API to associate a generated position with an original source position. Line and
+ * column here are 0-based, unlike `addMapping`.
+ */
+export function addSegment(
+  map: GenMapping,
+  genLine: number,
+  genColumn: number,
+  source?: null,
+  sourceLine?: null,
+  sourceColumn?: null,
+  name?: null,
+  content?: null,
+): void;
+export function addSegment(
+  map: GenMapping,
+  genLine: number,
+  genColumn: number,
+  source: string,
+  sourceLine: number,
+  sourceColumn: number,
+  name?: null,
+  content?: string | null,
+): void;
+export function addSegment(
+  map: GenMapping,
+  genLine: number,
+  genColumn: number,
+  source: string,
+  sourceLine: number,
+  sourceColumn: number,
+  name: string,
+  content?: string | null,
+): void;
+export function addSegment(
+  map: GenMapping,
+  genLine: number,
+  genColumn: number,
+  source?: string | null,
+  sourceLine?: number | null,
+  sourceColumn?: number | null,
+  name?: string | null,
+  content?: string | null,
+): void {
+  return addSegmentInternal(
+    false,
+    map,
+    genLine,
+    genColumn,
+    source,
+    sourceLine,
+    sourceColumn,
+    name,
+    content,
+  );
+}
+
+/**
+ * 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 function addMapping(
+  map: GenMapping,
+  mapping: {
+    generated: Pos;
+    source?: null;
+    original?: null;
+    name?: null;
+    content?: null;
+  },
+): void;
+export function addMapping(
+  map: GenMapping,
+  mapping: {
+    generated: Pos;
+    source: string;
+    original: Pos;
+    name?: null;
+    content?: string | null;
+  },
+): void;
+export function addMapping(
+  map: GenMapping,
+  mapping: {
+    generated: Pos;
+    source: string;
+    original: Pos;
+    name: string;
+    content?: string | null;
+  },
+): void;
+export function addMapping(
+  map: GenMapping,
+  mapping: {
+    generated: Pos;
+    source?: string | null;
+    original?: Pos | null;
+    name?: string | null;
+    content?: string | null;
+  },
+): void {
+  return addMappingInternal(false, map, mapping as Parameters<typeof addMappingInternal>[2]);
+}
+
+/**
+ * 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 const maybeAddSegment: typeof addSegment = (
+  map,
+  genLine,
+  genColumn,
+  source,
+  sourceLine,
+  sourceColumn,
+  name,
+  content,
+) => {
+  return addSegmentInternal(
+    true,
+    map,
+    genLine,
+    genColumn,
+    source,
+    sourceLine,
+    sourceColumn,
+    name,
+    content,
+  );
+};
+
+/**
+ * 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 const maybeAddMapping: typeof addMapping = (map, mapping) => {
+  return addMappingInternal(true, map, mapping as Parameters<typeof addMappingInternal>[2]);
+};
+
+/**
+ * Adds/removes the content of the source file to the source map.
+ */
+export function setSourceContent(map: GenMapping, source: string, content: string | null): void {
+  const {
+    _sources: sources,
+    _sourcesContent: sourcesContent,
+    // _originalScopes: originalScopes,
+  } = cast(map);
+  const index = put(sources, source);
+  sourcesContent[index] = content;
+  // if (index === originalScopes.length) originalScopes[index] = [];
+}
+
+export function setIgnore(map: GenMapping, source: string, ignore = true) {
+  const {
+    _sources: sources,
+    _sourcesContent: sourcesContent,
+    _ignoreList: ignoreList,
+    // _originalScopes: originalScopes,
+  } = cast(map);
+  const index = put(sources, source);
+  if (index === sourcesContent.length) sourcesContent[index] = null;
+  // if (index === originalScopes.length) originalScopes[index] = [];
+  if (ignore) put(ignoreList, index);
+  else remove(ignoreList, index);
+}
+
+/**
+ * Returns a sourcemap object (with decoded mappings) suitable for passing to a library that expects
+ * a sourcemap, or to JSON.stringify.
+ */
+export function toDecodedMap(map: GenMapping): DecodedSourceMap {
+  const {
+    _mappings: mappings,
+    _sources: sources,
+    _sourcesContent: sourcesContent,
+    _names: names,
+    _ignoreList: ignoreList,
+    // _originalScopes: originalScopes,
+    // _generatedRanges: generatedRanges,
+  } = cast(map);
+  removeEmptyFinalLines(mappings);
+
+  return {
+    version: 3,
+    file: map.file || undefined,
+    names: names.array,
+    sourceRoot: map.sourceRoot || undefined,
+    sources: sources.array,
+    sourcesContent,
+    mappings,
+    // originalScopes,
+    // generatedRanges,
+    ignoreList: ignoreList.array,
+  };
+}
+
+/**
+ * Returns a sourcemap object (with encoded mappings) suitable for passing to a library that expects
+ * a sourcemap, or to JSON.stringify.
+ */
+export function toEncodedMap(map: GenMapping): EncodedSourceMap {
+  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 as SourceMapSegment[][]),
+  });
+}
+
+/**
+ * Constructs a new GenMapping, using the already present mappings of the input.
+ */
+export function fromMap(input: SourceMapInput): GenMapping {
+  const map = new TraceMap(input);
+  const gen = new GenMapping({ file: map.file, sourceRoot: map.sourceRoot });
+
+  putAll(cast(gen)._names, map.names);
+  putAll(cast(gen)._sources, map.sources as string[]);
+  cast(gen)._sourcesContent = map.sourcesContent || map.sources.map(() => null);
+  cast(gen)._mappings = decodedMappings(map) as GenMapping['_mappings'];
+  // TODO: implement originalScopes/generatedRanges
+  if (map.ignoreList) putAll(cast(gen)._ignoreList, map.ignoreList);
+
+  return gen;
+}
+
+/**
+ * Returns an array of high-level mapping objects for every recorded segment, which could then be
+ * passed to the `source-map` library.
+ */
+export function allMappings(map: GenMapping): Mapping[] {
+  const out: Mapping[] = [];
+  const { _mappings: mappings, _sources: sources, _names: names } = cast(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: string | undefined = undefined;
+      let original: Pos | undefined = undefined;
+      let name: string | undefined = undefined;
+
+      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 } as Mapping);
+    }
+  }
+
+  return out;
+}
+
+// This split declaration is only so that terser can elminiate the static initialization block.
+function addSegmentInternal<S extends string | null | undefined>(
+  skipable: boolean,
+  map: GenMapping,
+  genLine: number,
+  genColumn: number,
+  source: S,
+  sourceLine: S extends string ? number : null | undefined,
+  sourceColumn: S extends string ? number : null | undefined,
+  name: S extends string ? string | null | undefined : null | undefined,
+  content: S extends string ? string | null | undefined : null | undefined,
+): void {
+  const {
+    _mappings: mappings,
+    _sources: sources,
+    _sourcesContent: sourcesContent,
+    _names: names,
+    // _originalScopes: originalScopes,
+  } = cast(map);
+  const line = getIndex(mappings, genLine);
+  const index = getColumnIndex(line, genColumn);
+
+  if (!source) {
+    if (skipable && skipSourceless(line, index)) return;
+    return insert(line, index, [genColumn]);
+  }
+
+  // Sigh, TypeScript can't figure out sourceLine and sourceColumn aren't nullish if source
+  // isn't nullish.
+  assert<number>(sourceLine);
+  assert<number>(sourceColumn);
+
+  const sourcesIndex = put(sources, source);
+  const namesIndex = name ? put(names, name) : NO_NAME;
+  if (sourcesIndex === sourcesContent.length) sourcesContent[sourcesIndex] = content ?? null;
+  // if (sourcesIndex === originalScopes.length) originalScopes[sourcesIndex] = [];
+
+  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<T>(_val: unknown): asserts _val is T {
+  // noop.
+}
+
+function getIndex<T>(arr: T[][], index: number): T[] {
+  for (let i = arr.length; i <= index; i++) {
+    arr[i] = [];
+  }
+  return arr[index];
+}
+
+function getColumnIndex(line: SourceMapSegment[], genColumn: number): number {
+  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<T>(array: T[], index: number, value: T) {
+  for (let i = array.length; i > index; i--) {
+    array[i] = array[i - 1];
+  }
+  array[index] = value;
+}
+
+function removeEmptyFinalLines(mappings: SourceMapSegment[][]) {
+  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<T extends string | number>(setarr: SetArray<T>, array: T[]) {
+  for (let i = 0; i < array.length; i++) put(setarr, array[i]);
+}
+
+function skipSourceless(line: SourceMapSegment[], index: number): boolean {
+  // The start of a line is already sourceless, so adding a sourceless segment to the beginning
+  // doesn't generate any useful information.
+  if (index === 0) return true;
+
+  const prev = line[index - 1];
+  // If the previous segment is also sourceless, then adding another sourceless segment doesn't
+  // genrate any new information. Else, this segment will end the source/named segment and point to
+  // a sourceless position, which is useful.
+  return prev.length === 1;
+}
+
+function skipSource(
+  line: SourceMapSegment[],
+  index: number,
+  sourcesIndex: number,
+  sourceLine: number,
+  sourceColumn: number,
+  namesIndex: number,
+): boolean {
+  // A source/named segment at the start of a line gives position at that genColumn
+  if (index === 0) return false;
+
+  const prev = line[index - 1];
+
+  // If the previous segment is sourceless, then we're transitioning to a source.
+  if (prev.length === 1) return false;
+
+  // If the previous segment maps to the exact same source position, then this segment doesn't
+  // provide any new position information.
+  return (
+    sourcesIndex === prev[SOURCES_INDEX] &&
+    sourceLine === prev[SOURCE_LINE] &&
+    sourceColumn === prev[SOURCE_COLUMN] &&
+    namesIndex === (prev.length === 5 ? prev[NAMES_INDEX] : NO_NAME)
+  );
+}
+
+function addMappingInternal<S extends string | null | undefined>(
+  skipable: boolean,
+  map: GenMapping,
+  mapping: {
+    generated: Pos;
+    source: S;
+    original: S extends string ? Pos : null | undefined;
+    name: S extends string ? string | null | undefined : null | undefined;
+    content: S extends string ? string | null | undefined : null | undefined;
+  },
+) {
+  const { generated, source, original, name, content } = mapping;
+  if (!source) {
+    return addSegmentInternal(
+      skipable,
+      map,
+      generated.line - 1,
+      generated.column,
+      null,
+      null,
+      null,
+      null,
+      null,
+    );
+  }
+  assert<Pos>(original);
+  return addSegmentInternal(
+    skipable,
+    map,
+    generated.line - 1,
+    generated.column,
+    source as string,
+    original.line - 1,
+    original.column,
+    name,
+    content,
+  );
+}
+
+/*
+export function addOriginalScope(
+  map: GenMapping,
+  data: {
+    start: Pos;
+    end: Pos;
+    source: string;
+    kind: string;
+    name?: string;
+    variables?: string[];
+  },
+): OriginalScopeInfo {
+  const { start, end, source, kind, name, variables } = data;
+  const {
+    _sources: sources,
+    _sourcesContent: sourcesContent,
+    _originalScopes: originalScopes,
+    _names: names,
+  } = cast(map);
+  const index = put(sources, source);
+  if (index === sourcesContent.length) sourcesContent[index] = null;
+  if (index === originalScopes.length) originalScopes[index] = [];
+
+  const kindIndex = put(names, kind);
+  const scope: OriginalScope = name
+    ? [start.line - 1, start.column, end.line - 1, end.column, kindIndex, put(names, name)]
+    : [start.line - 1, start.column, end.line - 1, end.column, kindIndex];
+  if (variables) {
+    scope.vars = variables.map((v) => put(names, v));
+  }
+  const len = originalScopes[index].push(scope);
+  return [index, len - 1, variables];
+}
+*/
+
+// Generated Ranges
+/*
+export function addGeneratedRange(
+  map: GenMapping,
+  data: {
+    start: Pos;
+    isScope: boolean;
+    originalScope?: OriginalScopeInfo;
+    callsite?: OriginalPos;
+  },
+): GeneratedRangeInfo {
+  const { start, isScope, originalScope, callsite } = data;
+  const {
+    _originalScopes: originalScopes,
+    _sources: sources,
+    _sourcesContent: sourcesContent,
+    _generatedRanges: generatedRanges,
+  } = cast(map);
+
+  const range: GeneratedRange = [
+    start.line - 1,
+    start.column,
+    0,
+    0,
+    originalScope ? originalScope[0] : -1,
+    originalScope ? originalScope[1] : -1,
+  ];
+  if (originalScope?.[2]) {
+    range.bindings = originalScope[2].map(() => [[-1]]);
+  }
+  if (callsite) {
+    const index = put(sources, callsite.source);
+    if (index === sourcesContent.length) sourcesContent[index] = null;
+    if (index === originalScopes.length) originalScopes[index] = [];
+    range.callsite = [index, callsite.line - 1, callsite.column];
+  }
+  if (isScope) range.isScope = true;
+  generatedRanges.push(range);
+
+  return [range, originalScope?.[2]];
+}
+
+export function setEndPosition(range: GeneratedRangeInfo, pos: Pos) {
+  range[0][2] = pos.line - 1;
+  range[0][3] = pos.column;
+}
+
+export function addBinding(
+  map: GenMapping,
+  range: GeneratedRangeInfo,
+  variable: string,
+  expression: string | BindingExpressionRange,
+) {
+  const { _names: names } = cast(map);
+  const bindings = (range[0].bindings ||= []);
+  const vars = range[1];
+
+  const index = vars!.indexOf(variable);
+  const binding = getIndex(bindings, index);
+
+  if (typeof expression === 'string') binding[0] = [put(names, expression)];
+  else {
+    const { start } = expression;
+    binding.push([put(names, expression.expression), start.line - 1, start.column]);
+  }
+}
+*/

+ 82 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/src/set-array.ts

@@ -0,0 +1,82 @@
+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 class SetArray<T extends Key = Key> {
+  declare private _indexes: Record<T, number | undefined>;
+  declare array: readonly T[];
+
+  constructor() {
+    this._indexes = { __proto__: null } as any;
+    this.array = [];
+  }
+}
+
+interface PublicSet<T extends Key> {
+  array: T[];
+  _indexes: SetArray<T>['_indexes'];
+}
+
+/**
+ * Typescript doesn't allow friend access to private fields, so this just casts the set into a type
+ * with public access modifiers.
+ */
+function cast<T extends Key>(set: SetArray<T>): PublicSet<T> {
+  return set as any;
+}
+
+/**
+ * Gets the index associated with `key` in the backing array, if it is already present.
+ */
+export function get<T extends Key>(setarr: SetArray<T>, key: T): number | undefined {
+  return cast(setarr)._indexes[key];
+}
+
+/**
+ * Puts `key` into the backing array, if it is not already present. Returns
+ * the index of the `key` in the backing array.
+ */
+export function put<T extends Key>(setarr: SetArray<T>, key: T): number {
+  // The key may or may not be present. If it is present, it's a number.
+  const index = get(setarr, key);
+  if (index !== undefined) return index;
+
+  const { array, _indexes: indexes } = cast(setarr);
+
+  const length = array.push(key);
+  return (indexes[key] = length - 1);
+}
+
+/**
+ * Pops the last added item out of the SetArray.
+ */
+export function pop<T extends Key>(setarr: SetArray<T>): void {
+  const { array, _indexes: indexes } = cast(setarr);
+  if (array.length === 0) return;
+
+  const last = array.pop()!;
+  indexes[last] = undefined;
+}
+
+/**
+ * Removes the key, if it exists in the set.
+ */
+export function remove<T extends Key>(setarr: SetArray<T>, key: T): void {
+  const index = get(setarr, key);
+  if (index === undefined) 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] = undefined;
+  array.pop();
+}

+ 16 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts

@@ -0,0 +1,16 @@
+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 const COLUMN = 0;
+export const SOURCES_INDEX = 1;
+export const SOURCE_LINE = 2;
+export const SOURCE_COLUMN = 3;
+export const NAMES_INDEX = 4;

+ 61 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/src/types.ts

@@ -0,0 +1,61 @@
+// import type { GeneratedRange, OriginalScope } from '@jridgewell/sourcemap-codec';
+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;
+  // originalScopes: string[];
+  // generatedRanges: string;
+}
+
+export interface DecodedSourceMap extends SourceMapV3 {
+  mappings: readonly SourceMapSegment[][];
+  // originalScopes: readonly OriginalScope[][];
+  // generatedRanges: readonly GeneratedRange[];
+}
+
+export interface Pos {
+  line: number; // 1-based
+  column: number; // 0-based
+}
+
+export interface OriginalPos extends Pos {
+  source: string;
+}
+
+export interface BindingExpressionRange {
+  start: Pos;
+  expression: string;
+}
+
+// export type OriginalScopeInfo = [number, number, string[] | undefined];
+// export type GeneratedRangeInfo = [GeneratedRange, string[] | undefined];
+
+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;
+    };

+ 89 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts

@@ -0,0 +1,89 @@
+import type { SourceMapInput } from '@jridgewell/trace-mapping';
+import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types.cts';
+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[];
+//# sourceMappingURL=gen-mapping.d.ts.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map


+ 89 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts

@@ -0,0 +1,89 @@
+import type { SourceMapInput } from '@jridgewell/trace-mapping';
+import type { DecodedSourceMap, EncodedSourceMap, Pos, Mapping } from './types.mts';
+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[];
+//# sourceMappingURL=gen-mapping.d.ts.map

File diff suppressed because it is too large
+ 0 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map


+ 33 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts

@@ -0,0 +1,33 @@
+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 {};
+//# sourceMappingURL=set-array.d.ts.map

+ 1 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map

@@ -0,0 +1 @@
+{"version":3,"file":"set-array.d.ts","sourceRoot":"","sources":["../src/set-array.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpC;;;;;;;GAOG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,GAAG,GAAG,GAAG;IACvC,QAAgB,QAAQ,CAAgC;IAChD,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;;CAM7B;AAeD;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,GAAG,SAAS,CAElF;AAED;;;GAGG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,CAStE;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAM5D;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAYvE"}

+ 33 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts

@@ -0,0 +1,33 @@
+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 {};
+//# sourceMappingURL=set-array.d.ts.map

+ 1 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map

@@ -0,0 +1 @@
+{"version":3,"file":"set-array.d.ts","sourceRoot":"","sources":["../src/set-array.ts"],"names":[],"mappings":"AAAA,KAAK,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpC;;;;;;;GAOG;AACH,qBAAa,QAAQ,CAAC,CAAC,SAAS,GAAG,GAAG,GAAG;IACvC,QAAgB,QAAQ,CAAgC;IAChD,KAAK,EAAE,SAAS,CAAC,EAAE,CAAC;;CAM7B;AAeD;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,GAAG,SAAS,CAElF;AAED;;;GAGG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,MAAM,CAStE;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAM5D;AAED;;GAEG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,CAYvE"}

+ 13 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts

@@ -0,0 +1,13 @@
+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 {};
+//# sourceMappingURL=sourcemap-segment.d.ts.map

+ 1 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map

@@ -0,0 +1 @@
+{"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC"}

+ 13 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts

@@ -0,0 +1,13 @@
+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 {};
+//# sourceMappingURL=sourcemap-segment.d.ts.map

+ 1 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map

@@ -0,0 +1 @@
+{"version":3,"file":"sourcemap-segment.d.ts","sourceRoot":"","sources":["../src/sourcemap-segment.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG,MAAM,CAAC;AAC9B,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AACzB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,UAAU,GAAG,MAAM,CAAC;AAEzB,MAAM,MAAM,gBAAgB,GACxB,CAAC,eAAe,CAAC,GACjB,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,CAAC,GACzD,CAAC,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;AAE1E,eAAO,MAAM,MAAM,IAAI,CAAC;AACxB,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,WAAW,IAAI,CAAC"}

+ 44 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/types.d.cts

@@ -0,0 +1,44 @@
+import type { SourceMapSegment } from './sourcemap-segment.cts';
+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;
+};
+//# sourceMappingURL=types.d.ts.map

+ 1 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/types.d.cts.map

@@ -0,0 +1 @@
+{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACpC,cAAc,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC;IACX,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,MAAM,CAAC;CAGlB;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EAAE,CAAC;CAGzC;AAED,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAY,SAAQ,GAAG;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;CACpB;AAKD,MAAM,MAAM,OAAO,GACf;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC"}

+ 44 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/types.d.mts

@@ -0,0 +1,44 @@
+import type { SourceMapSegment } from './sourcemap-segment.mts';
+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;
+};
+//# sourceMappingURL=types.d.ts.map

+ 1 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/gen-mapping/types/types.d.mts.map

@@ -0,0 +1 @@
+{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IACpC,cAAc,CAAC,EAAE,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IAC5C,OAAO,EAAE,CAAC,CAAC;IACX,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,MAAM,CAAC;CAGlB;AAED,MAAM,WAAW,gBAAiB,SAAQ,WAAW;IACnD,QAAQ,EAAE,SAAS,gBAAgB,EAAE,EAAE,CAAC;CAGzC;AAED,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAY,SAAQ,GAAG;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;CACpB;AAKD,MAAM,MAAM,OAAO,GACf;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,SAAS,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;CACjB,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;CACjB,CAAC"}

+ 19 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/LICENSE

@@ -0,0 +1,19 @@
+Copyright 2024 Justin Ridgewell <justin@ridgewell.name>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 264 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/README.md

@@ -0,0 +1,264 @@
+# @jridgewell/sourcemap-codec
+
+Encode/decode the `mappings` property of a [sourcemap](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit).
+
+
+## Why?
+
+Sourcemaps are difficult to generate and manipulate, because the `mappings` property – the part that actually links the generated code back to the original source – is encoded using an obscure method called [Variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity). On top of that, each segment in the mapping contains offsets rather than absolute indices, which means that you can't look at a segment in isolation – you have to understand the whole sourcemap.
+
+This package makes the process slightly easier.
+
+
+## Installation
+
+```bash
+npm install @jridgewell/sourcemap-codec
+```
+
+
+## Usage
+
+```js
+import { encode, decode } from '@jridgewell/sourcemap-codec';
+
+var decoded = decode( ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
+
+assert.deepEqual( decoded, [
+	// the first line (of the generated code) has no mappings,
+	// as shown by the starting semi-colon (which separates lines)
+	[],
+
+	// the second line contains four (comma-separated) segments
+	[
+		// segments are encoded as you'd expect:
+		// [ generatedCodeColumn, sourceIndex, sourceCodeLine, sourceCodeColumn, nameIndex ]
+
+		// i.e. the first segment begins at column 2, and maps back to the second column
+		// of the second line (both zero-based) of the 0th source, and uses the 0th
+		// name in the `map.names` array
+		[ 2, 0, 2, 2, 0 ],
+
+		// the remaining segments are 4-length rather than 5-length,
+		// because they don't map a name
+		[ 4, 0, 2, 4 ],
+		[ 6, 0, 2, 5 ],
+		[ 7, 0, 2, 7 ]
+	],
+
+	// the final line contains two segments
+	[
+		[ 2, 1, 10, 19 ],
+		[ 12, 1, 11, 20 ]
+	]
+]);
+
+var encoded = encode( decoded );
+assert.equal( encoded, ';EAEEA,EAAE,EAAC,CAAE;ECQY,UACC' );
+```
+
+## Benchmarks
+
+```
+node v20.10.0
+
+amp.js.map - 45120 segments
+
+Decode Memory Usage:
+local code                             5815135 bytes
+@jridgewell/sourcemap-codec 1.4.15     5868160 bytes
+sourcemap-codec                        5492584 bytes
+source-map-0.6.1                      13569984 bytes
+source-map-0.8.0                       6390584 bytes
+chrome dev tools                       8011136 bytes
+Smallest memory usage is sourcemap-codec
+
+Decode speed:
+decode: local code x 492 ops/sec ±1.22% (90 runs sampled)
+decode: @jridgewell/sourcemap-codec 1.4.15 x 499 ops/sec ±1.16% (89 runs sampled)
+decode: sourcemap-codec x 376 ops/sec ±1.66% (89 runs sampled)
+decode: source-map-0.6.1 x 34.99 ops/sec ±0.94% (48 runs sampled)
+decode: source-map-0.8.0 x 351 ops/sec ±0.07% (95 runs sampled)
+chrome dev tools x 165 ops/sec ±0.91% (86 runs sampled)
+Fastest is decode: @jridgewell/sourcemap-codec 1.4.15
+
+Encode Memory Usage:
+local code                              444248 bytes
+@jridgewell/sourcemap-codec 1.4.15      623024 bytes
+sourcemap-codec                        8696280 bytes
+source-map-0.6.1                       8745176 bytes
+source-map-0.8.0                       8736624 bytes
+Smallest memory usage is local code
+
+Encode speed:
+encode: local code x 796 ops/sec ±0.11% (97 runs sampled)
+encode: @jridgewell/sourcemap-codec 1.4.15 x 795 ops/sec ±0.25% (98 runs sampled)
+encode: sourcemap-codec x 231 ops/sec ±0.83% (86 runs sampled)
+encode: source-map-0.6.1 x 166 ops/sec ±0.57% (86 runs sampled)
+encode: source-map-0.8.0 x 203 ops/sec ±0.45% (88 runs sampled)
+Fastest is encode: local code,encode: @jridgewell/sourcemap-codec 1.4.15
+
+
+***
+
+
+babel.min.js.map - 347793 segments
+
+Decode Memory Usage:
+local code                            35424960 bytes
+@jridgewell/sourcemap-codec 1.4.15    35424696 bytes
+sourcemap-codec                       36033464 bytes
+source-map-0.6.1                      62253704 bytes
+source-map-0.8.0                      43843920 bytes
+chrome dev tools                      45111400 bytes
+Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15
+
+Decode speed:
+decode: local code x 38.18 ops/sec ±5.44% (52 runs sampled)
+decode: @jridgewell/sourcemap-codec 1.4.15 x 38.36 ops/sec ±5.02% (52 runs sampled)
+decode: sourcemap-codec x 34.05 ops/sec ±4.45% (47 runs sampled)
+decode: source-map-0.6.1 x 4.31 ops/sec ±2.76% (15 runs sampled)
+decode: source-map-0.8.0 x 55.60 ops/sec ±0.13% (73 runs sampled)
+chrome dev tools x 16.94 ops/sec ±3.78% (46 runs sampled)
+Fastest is decode: source-map-0.8.0
+
+Encode Memory Usage:
+local code                             2606016 bytes
+@jridgewell/sourcemap-codec 1.4.15     2626440 bytes
+sourcemap-codec                       21152576 bytes
+source-map-0.6.1                      25023928 bytes
+source-map-0.8.0                      25256448 bytes
+Smallest memory usage is local code
+
+Encode speed:
+encode: local code x 127 ops/sec ±0.18% (83 runs sampled)
+encode: @jridgewell/sourcemap-codec 1.4.15 x 128 ops/sec ±0.26% (83 runs sampled)
+encode: sourcemap-codec x 29.31 ops/sec ±2.55% (53 runs sampled)
+encode: source-map-0.6.1 x 18.85 ops/sec ±3.19% (36 runs sampled)
+encode: source-map-0.8.0 x 19.34 ops/sec ±1.97% (36 runs sampled)
+Fastest is encode: @jridgewell/sourcemap-codec 1.4.15
+
+
+***
+
+
+preact.js.map - 1992 segments
+
+Decode Memory Usage:
+local code                              261696 bytes
+@jridgewell/sourcemap-codec 1.4.15      244296 bytes
+sourcemap-codec                         302816 bytes
+source-map-0.6.1                        939176 bytes
+source-map-0.8.0                           336 bytes
+chrome dev tools                        587368 bytes
+Smallest memory usage is source-map-0.8.0
+
+Decode speed:
+decode: local code x 17,782 ops/sec ±0.32% (97 runs sampled)
+decode: @jridgewell/sourcemap-codec 1.4.15 x 17,863 ops/sec ±0.40% (100 runs sampled)
+decode: sourcemap-codec x 12,453 ops/sec ±0.27% (101 runs sampled)
+decode: source-map-0.6.1 x 1,288 ops/sec ±1.05% (96 runs sampled)
+decode: source-map-0.8.0 x 9,289 ops/sec ±0.27% (101 runs sampled)
+chrome dev tools x 4,769 ops/sec ±0.18% (100 runs sampled)
+Fastest is decode: @jridgewell/sourcemap-codec 1.4.15
+
+Encode Memory Usage:
+local code                              262944 bytes
+@jridgewell/sourcemap-codec 1.4.15       25544 bytes
+sourcemap-codec                         323048 bytes
+source-map-0.6.1                        507808 bytes
+source-map-0.8.0                        507480 bytes
+Smallest memory usage is @jridgewell/sourcemap-codec 1.4.15
+
+Encode speed:
+encode: local code x 24,207 ops/sec ±0.79% (95 runs sampled)
+encode: @jridgewell/sourcemap-codec 1.4.15 x 24,288 ops/sec ±0.48% (96 runs sampled)
+encode: sourcemap-codec x 6,761 ops/sec ±0.21% (100 runs sampled)
+encode: source-map-0.6.1 x 5,374 ops/sec ±0.17% (99 runs sampled)
+encode: source-map-0.8.0 x 5,633 ops/sec ±0.32% (99 runs sampled)
+Fastest is encode: @jridgewell/sourcemap-codec 1.4.15,encode: local code
+
+
+***
+
+
+react.js.map - 5726 segments
+
+Decode Memory Usage:
+local code                              678816 bytes
+@jridgewell/sourcemap-codec 1.4.15      678816 bytes
+sourcemap-codec                         816400 bytes
+source-map-0.6.1                       2288864 bytes
+source-map-0.8.0                        721360 bytes
+chrome dev tools                       1012512 bytes
+Smallest memory usage is local code
+
+Decode speed:
+decode: local code x 6,178 ops/sec ±0.19% (98 runs sampled)
+decode: @jridgewell/sourcemap-codec 1.4.15 x 6,261 ops/sec ±0.22% (100 runs sampled)
+decode: sourcemap-codec x 4,472 ops/sec ±0.90% (99 runs sampled)
+decode: source-map-0.6.1 x 449 ops/sec ±0.31% (95 runs sampled)
+decode: source-map-0.8.0 x 3,219 ops/sec ±0.13% (100 runs sampled)
+chrome dev tools x 1,743 ops/sec ±0.20% (99 runs sampled)
+Fastest is decode: @jridgewell/sourcemap-codec 1.4.15
+
+Encode Memory Usage:
+local code                              140960 bytes
+@jridgewell/sourcemap-codec 1.4.15      159808 bytes
+sourcemap-codec                         969304 bytes
+source-map-0.6.1                        930520 bytes
+source-map-0.8.0                        930248 bytes
+Smallest memory usage is local code
+
+Encode speed:
+encode: local code x 8,013 ops/sec ±0.19% (100 runs sampled)
+encode: @jridgewell/sourcemap-codec 1.4.15 x 7,989 ops/sec ±0.20% (101 runs sampled)
+encode: sourcemap-codec x 2,472 ops/sec ±0.21% (99 runs sampled)
+encode: source-map-0.6.1 x 2,200 ops/sec ±0.17% (99 runs sampled)
+encode: source-map-0.8.0 x 2,220 ops/sec ±0.37% (99 runs sampled)
+Fastest is encode: local code
+
+
+***
+
+
+vscode.map - 2141001 segments
+
+Decode Memory Usage:
+local code                           198955264 bytes
+@jridgewell/sourcemap-codec 1.4.15   199175352 bytes
+sourcemap-codec                      199102688 bytes
+source-map-0.6.1                     386323432 bytes
+source-map-0.8.0                     244116432 bytes
+chrome dev tools                     293734280 bytes
+Smallest memory usage is local code
+
+Decode speed:
+decode: local code x 3.90 ops/sec ±22.21% (15 runs sampled)
+decode: @jridgewell/sourcemap-codec 1.4.15 x 3.95 ops/sec ±23.53% (15 runs sampled)
+decode: sourcemap-codec x 3.82 ops/sec ±17.94% (14 runs sampled)
+decode: source-map-0.6.1 x 0.61 ops/sec ±7.81% (6 runs sampled)
+decode: source-map-0.8.0 x 9.54 ops/sec ±0.28% (28 runs sampled)
+chrome dev tools x 2.18 ops/sec ±10.58% (10 runs sampled)
+Fastest is decode: source-map-0.8.0
+
+Encode Memory Usage:
+local code                            13509880 bytes
+@jridgewell/sourcemap-codec 1.4.15    13537648 bytes
+sourcemap-codec                       32540104 bytes
+source-map-0.6.1                     127531040 bytes
+source-map-0.8.0                     127535312 bytes
+Smallest memory usage is local code
+
+Encode speed:
+encode: local code x 20.10 ops/sec ±0.19% (38 runs sampled)
+encode: @jridgewell/sourcemap-codec 1.4.15 x 20.26 ops/sec ±0.32% (38 runs sampled)
+encode: sourcemap-codec x 5.44 ops/sec ±1.64% (18 runs sampled)
+encode: source-map-0.6.1 x 2.30 ops/sec ±4.79% (10 runs sampled)
+encode: source-map-0.8.0 x 2.46 ops/sec ±6.53% (10 runs sampled)
+Fastest is encode: @jridgewell/sourcemap-codec 1.4.15
+```
+
+# License
+
+MIT

+ 423 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/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/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map


+ 464 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/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/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map


+ 63 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/package.json

@@ -0,0 +1,63 @@
+{
+  "name": "@jridgewell/sourcemap-codec",
+  "version": "1.5.5",
+  "description": "Encode/decode sourcemap mappings",
+  "keywords": [
+    "sourcemap",
+    "vlq"
+  ],
+  "main": "dist/sourcemap-codec.umd.js",
+  "module": "dist/sourcemap-codec.mjs",
+  "types": "types/sourcemap-codec.d.cts",
+  "files": [
+    "dist",
+    "src",
+    "types"
+  ],
+  "exports": {
+    ".": [
+      {
+        "import": {
+          "types": "./types/sourcemap-codec.d.mts",
+          "default": "./dist/sourcemap-codec.mjs"
+        },
+        "default": {
+          "types": "./types/sourcemap-codec.d.cts",
+          "default": "./dist/sourcemap-codec.umd.js"
+        }
+      },
+      "./dist/sourcemap-codec.umd.js"
+    ],
+    "./package.json": "./package.json"
+  },
+  "scripts": {
+    "benchmark": "run-s build:code benchmark:*",
+    "benchmark:install": "cd benchmark && npm install",
+    "benchmark:only": "node --expose-gc benchmark/index.js",
+    "build": "run-s -n build:code build:types",
+    "build:code": "node ../../esbuild.mjs sourcemap-codec.ts",
+    "build:types": "run-s build:types:force build:types:emit build:types:mts",
+    "build:types:force": "rimraf tsconfig.build.tsbuildinfo",
+    "build:types:emit": "tsc --project tsconfig.build.json",
+    "build:types:mts": "node ../../mts-types.mjs",
+    "clean": "run-s -n clean:code clean:types",
+    "clean:code": "tsc --build --clean tsconfig.build.json",
+    "clean:types": "rimraf dist types",
+    "test": "run-s -n test:types test:only test:format",
+    "test:format": "prettier --check '{src,test}/**/*.ts'",
+    "test:only": "mocha",
+    "test:types": "eslint '{src,test}/**/*.ts'",
+    "lint": "run-s -n lint:types lint:format",
+    "lint:format": "npm run test:format -- --write",
+    "lint:types": "npm run test:types -- --fix",
+    "prepublishOnly": "npm run-s -n build test"
+  },
+  "homepage": "https://github.com/jridgewell/sourcemaps/tree/main/packages/sourcemap-codec",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/jridgewell/sourcemaps.git",
+    "directory": "packages/sourcemap-codec"
+  },
+  "author": "Justin Ridgewell <justin@ridgewell.name>",
+  "license": "MIT"
+}

+ 345 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts

@@ -0,0 +1,345 @@
+import { StringReader, StringWriter } from './strings';
+import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';
+
+const EMPTY: any[] = [];
+
+type Line = number;
+type Column = number;
+type Kind = number;
+type Name = number;
+type Var = number;
+type SourcesIndex = number;
+type ScopesIndex = number;
+
+type Mix<A, B, O> = (A & O) | (B & O);
+
+export type OriginalScope = Mix<
+  [Line, Column, Line, Column, Kind],
+  [Line, Column, Line, Column, Kind, Name],
+  { vars: Var[] }
+>;
+
+export type GeneratedRange = Mix<
+  [Line, Column, Line, Column],
+  [Line, Column, Line, Column, SourcesIndex, ScopesIndex],
+  {
+    callsite: CallSite | null;
+    bindings: Binding[];
+    isScope: boolean;
+  }
+>;
+export type CallSite = [SourcesIndex, Line, Column];
+type Binding = BindingExpressionRange[];
+export type BindingExpressionRange = [Name] | [Name, Line, Column];
+
+export function decodeOriginalScopes(input: string): OriginalScope[] {
+  const { length } = input;
+  const reader = new StringReader(input);
+  const scopes: OriginalScope[] = [];
+  const stack: OriginalScope[] = [];
+  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 & 0b0001;
+
+    const scope: OriginalScope = (
+      hasName ? [line, column, 0, 0, kind, decodeInteger(reader, 0)] : [line, column, 0, 0, kind]
+    ) as OriginalScope;
+
+    let vars: Var[] = 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;
+}
+
+export function encodeOriginalScopes(scopes: OriginalScope[]): string {
+  const writer = new StringWriter();
+
+  for (let i = 0; i < scopes.length; ) {
+    i = _encodeOriginalScopes(scopes, i, writer, [0]);
+  }
+
+  return writer.flush();
+}
+
+function _encodeOriginalScopes(
+  scopes: OriginalScope[],
+  index: number,
+  writer: StringWriter,
+  state: [
+    number, // GenColumn
+  ],
+): number {
+  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 ? 0b0001 : 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;
+}
+
+export function decodeGeneratedRanges(input: string): GeneratedRange[] {
+  const { length } = input;
+  const reader = new StringReader(input);
+  const ranges: GeneratedRange[] = [];
+  const stack: GeneratedRange[] = [];
+
+  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 & 0b0001;
+      const hasCallsite = fields & 0b0010;
+      const hasScope = fields & 0b0100;
+
+      let callsite: CallSite | null = null;
+      let bindings: Binding[] = EMPTY;
+      let range: GeneratedRange;
+      if (hasDefinition) {
+        const defSourcesIndex = decodeInteger(reader, definitionSourcesIndex);
+        definitionScopeIndex = decodeInteger(
+          reader,
+          definitionSourcesIndex === defSourcesIndex ? definitionScopeIndex : 0,
+        );
+
+        definitionSourcesIndex = defSourcesIndex;
+        range = [genLine, genColumn, 0, 0, defSourcesIndex, definitionScopeIndex] as GeneratedRange;
+      } else {
+        range = [genLine, genColumn, 0, 0] as GeneratedRange;
+      }
+
+      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: BindingExpressionRange[];
+          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;
+}
+
+export function encodeGeneratedRanges(ranges: GeneratedRange[]): string {
+  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: GeneratedRange[],
+  index: number,
+  writer: StringWriter,
+  state: [
+    number, // GenLine
+    number, // GenColumn
+    number, // DefSourcesIndex
+    number, // DefScopesIndex
+    number, // CallSourcesIndex
+    number, // CallLine
+    number, // CallColumn
+  ],
+): number {
+  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 ? 0b0001 : 0) | (callsite ? 0b0010 : 0) | (isScope ? 0b0100 : 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: StringWriter, lastLine: number, line: number) {
+  do {
+    writer.write(semicolon);
+  } while (++lastLine < line);
+}

+ 111 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts

@@ -0,0 +1,111 @@
+import { comma, decodeInteger, encodeInteger, hasMoreVlq, semicolon } from './vlq';
+import { StringWriter, StringReader } from './strings';
+
+export {
+  decodeOriginalScopes,
+  encodeOriginalScopes,
+  decodeGeneratedRanges,
+  encodeGeneratedRanges,
+} from './scopes';
+export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes';
+
+export type SourceMapSegment =
+  | [number]
+  | [number, number, number, number]
+  | [number, number, number, number, number];
+export type SourceMapLine = SourceMapSegment[];
+export type SourceMapMappings = SourceMapLine[];
+
+export function decode(mappings: string): SourceMapMappings {
+  const { length } = mappings;
+  const reader = new StringReader(mappings);
+  const decoded: SourceMapMappings = [];
+  let genColumn = 0;
+  let sourcesIndex = 0;
+  let sourceLine = 0;
+  let sourceColumn = 0;
+  let namesIndex = 0;
+
+  do {
+    const semi = reader.indexOf(';');
+    const line: SourceMapLine = [];
+    let sorted = true;
+    let lastCol = 0;
+    genColumn = 0;
+
+    while (reader.pos < semi) {
+      let seg: SourceMapSegment;
+
+      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: SourceMapSegment[]) {
+  line.sort(sortComparator);
+}
+
+function sortComparator(a: SourceMapSegment, b: SourceMapSegment): number {
+  return a[0] - b[0];
+}
+
+export function encode(decoded: SourceMapMappings): string;
+export function encode(decoded: Readonly<SourceMapMappings>): string;
+export function encode(decoded: Readonly<SourceMapMappings>): string {
+  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();
+}

+ 65 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/src/strings.ts

@@ -0,0 +1,65 @@
+const bufLength = 1024 * 16;
+
+// Provide a fallback for older environments.
+const td =
+  typeof TextDecoder !== 'undefined'
+    ? /* #__PURE__ */ new TextDecoder()
+    : typeof Buffer !== 'undefined'
+      ? {
+          decode(buf: Uint8Array): string {
+            const out = Buffer.from(buf.buffer, buf.byteOffset, buf.byteLength);
+            return out.toString();
+          },
+        }
+      : {
+          decode(buf: Uint8Array): string {
+            let out = '';
+            for (let i = 0; i < buf.length; i++) {
+              out += String.fromCharCode(buf[i]);
+            }
+            return out;
+          },
+        };
+
+export class StringWriter {
+  pos = 0;
+  private out = '';
+  private buffer = new Uint8Array(bufLength);
+
+  write(v: number): void {
+    const { buffer } = this;
+    buffer[this.pos++] = v;
+    if (this.pos === bufLength) {
+      this.out += td.decode(buffer);
+      this.pos = 0;
+    }
+  }
+
+  flush(): string {
+    const { buffer, out, pos } = this;
+    return pos > 0 ? out + td.decode(buffer.subarray(0, pos)) : out;
+  }
+}
+
+export class StringReader {
+  pos = 0;
+  declare private buffer: string;
+
+  constructor(buffer: string) {
+    this.buffer = buffer;
+  }
+
+  next(): number {
+    return this.buffer.charCodeAt(this.pos++);
+  }
+
+  peek(): number {
+    return this.buffer.charCodeAt(this.pos);
+  }
+
+  indexOf(char: string): number {
+    const { buffer, pos } = this;
+    const idx = buffer.indexOf(char, pos);
+    return idx === -1 ? buffer.length : idx;
+  }
+}

+ 55 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts

@@ -0,0 +1,55 @@
+import type { StringReader, StringWriter } from './strings';
+
+export const comma = ','.charCodeAt(0);
+export const semicolon = ';'.charCodeAt(0);
+
+const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
+const intToChar = new Uint8Array(64); // 64 possible chars.
+const charToInt = new Uint8Array(128); // z is 122 in ASCII
+
+for (let i = 0; i < chars.length; i++) {
+  const c = chars.charCodeAt(i);
+  intToChar[i] = c;
+  charToInt[c] = i;
+}
+
+export function decodeInteger(reader: StringReader, relative: number): number {
+  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 = -0x80000000 | -value;
+  }
+
+  return relative + value;
+}
+
+export function encodeInteger(builder: StringWriter, num: number, relative: number): number {
+  let delta = num - relative;
+
+  delta = delta < 0 ? (-delta << 1) | 1 : delta << 1;
+  do {
+    let clamped = delta & 0b011111;
+    delta >>>= 5;
+    if (delta > 0) clamped |= 0b100000;
+    builder.write(intToChar[clamped]);
+  } while (delta > 0);
+
+  return num;
+}
+
+export function hasMoreVlq(reader: StringReader, max: number) {
+  if (reader.pos >= max) return false;
+  return reader.peek() !== comma;
+}

+ 50 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts

@@ -0,0 +1,50 @@
+type Line = number;
+type Column = number;
+type Kind = number;
+type Name = number;
+type Var = number;
+type SourcesIndex = number;
+type ScopesIndex = number;
+type Mix<A, B, O> = (A & O) | (B & O);
+export type OriginalScope = Mix<[
+    Line,
+    Column,
+    Line,
+    Column,
+    Kind
+], [
+    Line,
+    Column,
+    Line,
+    Column,
+    Kind,
+    Name
+], {
+    vars: Var[];
+}>;
+export type GeneratedRange = Mix<[
+    Line,
+    Column,
+    Line,
+    Column
+], [
+    Line,
+    Column,
+    Line,
+    Column,
+    SourcesIndex,
+    ScopesIndex
+], {
+    callsite: CallSite | null;
+    bindings: Binding[];
+    isScope: boolean;
+}>;
+export type CallSite = [SourcesIndex, Line, Column];
+type Binding = BindingExpressionRange[];
+export type BindingExpressionRange = [Name] | [Name, Line, Column];
+export declare function decodeOriginalScopes(input: string): OriginalScope[];
+export declare function encodeOriginalScopes(scopes: OriginalScope[]): string;
+export declare function decodeGeneratedRanges(input: string): GeneratedRange[];
+export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string;
+export {};
+//# sourceMappingURL=scopes.d.ts.map

+ 1 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map

@@ -0,0 +1 @@
+{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAKA,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,MAAM,GAAG,MAAM,CAAC;AACrB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,GAAG,GAAG,MAAM,CAAC;AAClB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,WAAW,GAAG,MAAM,CAAC;AAE1B,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAEtC,MAAM,MAAM,aAAa,GAAG,GAAG,CAC7B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;CAAC,EAClC;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,IAAI;CAAC,EACxC;IAAE,IAAI,EAAE,GAAG,EAAE,CAAA;CAAE,CAChB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,GAAG,CAC9B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;CAAC,EAC5B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,YAAY;IAAE,WAAW;CAAC,EACvD;IACE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,CACF,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACpD,KAAK,OAAO,GAAG,sBAAsB,EAAE,CAAC;AACxC,MAAM,MAAM,sBAAsB,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAEnE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CAyCnE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAQpE;AA2CD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE,CAoGrE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAUtE"}

+ 50 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts

@@ -0,0 +1,50 @@
+type Line = number;
+type Column = number;
+type Kind = number;
+type Name = number;
+type Var = number;
+type SourcesIndex = number;
+type ScopesIndex = number;
+type Mix<A, B, O> = (A & O) | (B & O);
+export type OriginalScope = Mix<[
+    Line,
+    Column,
+    Line,
+    Column,
+    Kind
+], [
+    Line,
+    Column,
+    Line,
+    Column,
+    Kind,
+    Name
+], {
+    vars: Var[];
+}>;
+export type GeneratedRange = Mix<[
+    Line,
+    Column,
+    Line,
+    Column
+], [
+    Line,
+    Column,
+    Line,
+    Column,
+    SourcesIndex,
+    ScopesIndex
+], {
+    callsite: CallSite | null;
+    bindings: Binding[];
+    isScope: boolean;
+}>;
+export type CallSite = [SourcesIndex, Line, Column];
+type Binding = BindingExpressionRange[];
+export type BindingExpressionRange = [Name] | [Name, Line, Column];
+export declare function decodeOriginalScopes(input: string): OriginalScope[];
+export declare function encodeOriginalScopes(scopes: OriginalScope[]): string;
+export declare function decodeGeneratedRanges(input: string): GeneratedRange[];
+export declare function encodeGeneratedRanges(ranges: GeneratedRange[]): string;
+export {};
+//# sourceMappingURL=scopes.d.ts.map

+ 1 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map

@@ -0,0 +1 @@
+{"version":3,"file":"scopes.d.ts","sourceRoot":"","sources":["../src/scopes.ts"],"names":[],"mappings":"AAKA,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,MAAM,GAAG,MAAM,CAAC;AACrB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,IAAI,GAAG,MAAM,CAAC;AACnB,KAAK,GAAG,GAAG,MAAM,CAAC;AAClB,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,WAAW,GAAG,MAAM,CAAC;AAE1B,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;AAEtC,MAAM,MAAM,aAAa,GAAG,GAAG,CAC7B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;CAAC,EAClC;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,IAAI;CAAC,EACxC;IAAE,IAAI,EAAE,GAAG,EAAE,CAAA;CAAE,CAChB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,GAAG,CAC9B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;CAAC,EAC5B;IAAC,IAAI;IAAE,MAAM;IAAE,IAAI;IAAE,MAAM;IAAE,YAAY;IAAE,WAAW;CAAC,EACvD;IACE,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,CACF,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AACpD,KAAK,OAAO,GAAG,sBAAsB,EAAE,CAAC;AACxC,MAAM,MAAM,sBAAsB,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAEnE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CAyCnE;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAQpE;AA2CD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,EAAE,CAoGrE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,GAAG,MAAM,CAUtE"}

+ 9 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts

@@ -0,0 +1,9 @@
+export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes.cts';
+export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes.cts';
+export type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number];
+export type SourceMapLine = SourceMapSegment[];
+export type SourceMapMappings = SourceMapLine[];
+export declare function decode(mappings: string): SourceMapMappings;
+export declare function encode(decoded: SourceMapMappings): string;
+export declare function encode(decoded: Readonly<SourceMapMappings>): string;
+//# sourceMappingURL=sourcemap-codec.d.ts.map

+ 1 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map

@@ -0,0 +1 @@
+{"version":3,"file":"sourcemap-codec.d.ts","sourceRoot":"","sources":["../src/sourcemap-codec.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,MAAM,gBAAgB,GACxB,CAAC,MAAM,CAAC,GACR,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAChC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,MAAM,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAC/C,MAAM,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AAEhD,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAiD1D;AAUD,wBAAgB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC;AAC3D,wBAAgB,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC"}

+ 9 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts

@@ -0,0 +1,9 @@
+export { decodeOriginalScopes, encodeOriginalScopes, decodeGeneratedRanges, encodeGeneratedRanges, } from './scopes.mts';
+export type { OriginalScope, GeneratedRange, CallSite, BindingExpressionRange } from './scopes.mts';
+export type SourceMapSegment = [number] | [number, number, number, number] | [number, number, number, number, number];
+export type SourceMapLine = SourceMapSegment[];
+export type SourceMapMappings = SourceMapLine[];
+export declare function decode(mappings: string): SourceMapMappings;
+export declare function encode(decoded: SourceMapMappings): string;
+export declare function encode(decoded: Readonly<SourceMapMappings>): string;
+//# sourceMappingURL=sourcemap-codec.d.ts.map

+ 1 - 0
node_modules/.pnpm/@jridgewell+gen-mapping@0.3.13/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map

@@ -0,0 +1 @@
+{"version":3,"file":"sourcemap-codec.d.ts","sourceRoot":"","sources":["../src/sourcemap-codec.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEhG,MAAM,MAAM,gBAAgB,GACxB,CAAC,MAAM,CAAC,GACR,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAChC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAC7C,MAAM,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;AAC/C,MAAM,MAAM,iBAAiB,GAAG,aAAa,EAAE,CAAC;AAEhD,wBAAgB,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,iBAAiB,CAiD1D;AAUD,wBAAgB,MAAM,CAAC,OAAO,EAAE,iBAAiB,GAAG,MAAM,CAAC;AAC3D,wBAAgB,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,iBAAiB,CAAC,GAAG,MAAM,CAAC"}

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