hepf 1 week ago
commit
0d06e8a5d8
100 changed files with 9291 additions and 0 deletions
  1. 23 0
      App.vue
  2. 12 0
      api/index.js
  3. 629 0
      components/comment/index.vue
  4. 301 0
      components/couponListWindow/index.vue
  5. 194 0
      components/followBtn/index.vue
  6. 143 0
      components/productConSwiper/index.vue
  7. 426 0
      components/productWindow/index.vue
  8. 346 0
      components/productWindow/index_origin.vue
  9. 29 0
      config/app.js
  10. 16 0
      config/cache.js
  11. 112 0
      hooks/useToast.js
  12. 21 0
      index.html
  13. 46 0
      libs/order.js
  14. 322 0
      libs/wechat.js
  15. 45 0
      main.js
  16. 81 0
      manifest.json
  17. 16 0
      node_modules/.bin/acorn
  18. 17 0
      node_modules/.bin/acorn.cmd
  19. 28 0
      node_modules/.bin/acorn.ps1
  20. 16 0
      node_modules/.bin/browserslist
  21. 17 0
      node_modules/.bin/browserslist.cmd
  22. 28 0
      node_modules/.bin/browserslist.ps1
  23. 16 0
      node_modules/.bin/detect-libc
  24. 17 0
      node_modules/.bin/detect-libc.cmd
  25. 28 0
      node_modules/.bin/detect-libc.ps1
  26. 16 0
      node_modules/.bin/json5
  27. 17 0
      node_modules/.bin/json5.cmd
  28. 28 0
      node_modules/.bin/json5.ps1
  29. 16 0
      node_modules/.bin/sass
  30. 17 0
      node_modules/.bin/sass.cmd
  31. 28 0
      node_modules/.bin/sass.ps1
  32. 16 0
      node_modules/.bin/semver
  33. 17 0
      node_modules/.bin/semver.cmd
  34. 28 0
      node_modules/.bin/semver.ps1
  35. 16 0
      node_modules/.bin/terser
  36. 17 0
      node_modules/.bin/terser.cmd
  37. 28 0
      node_modules/.bin/terser.ps1
  38. 16 0
      node_modules/.bin/update-browserslist-db
  39. 17 0
      node_modules/.bin/update-browserslist-db.cmd
  40. 28 0
      node_modules/.bin/update-browserslist-db.ps1
  41. 16 0
      node_modules/.bin/webpack
  42. 17 0
      node_modules/.bin/webpack.cmd
  43. 28 0
      node_modules/.bin/webpack.ps1
  44. 1620 0
      node_modules/.package-lock.json
  45. 19 0
      node_modules/@jridgewell/gen-mapping/LICENSE
  46. 227 0
      node_modules/@jridgewell/gen-mapping/README.md
  47. 292 0
      node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs
  48. 6 0
      node_modules/@jridgewell/gen-mapping/dist/gen-mapping.mjs.map
  49. 358 0
      node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js
  50. 6 0
      node_modules/@jridgewell/gen-mapping/dist/gen-mapping.umd.js.map
  51. 88 0
      node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts
  52. 32 0
      node_modules/@jridgewell/gen-mapping/dist/types/set-array.d.ts
  53. 12 0
      node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts
  54. 43 0
      node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts
  55. 67 0
      node_modules/@jridgewell/gen-mapping/package.json
  56. 614 0
      node_modules/@jridgewell/gen-mapping/src/gen-mapping.ts
  57. 82 0
      node_modules/@jridgewell/gen-mapping/src/set-array.ts
  58. 16 0
      node_modules/@jridgewell/gen-mapping/src/sourcemap-segment.ts
  59. 61 0
      node_modules/@jridgewell/gen-mapping/src/types.ts
  60. 89 0
      node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts
  61. 1 0
      node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map
  62. 89 0
      node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts
  63. 1 0
      node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map
  64. 33 0
      node_modules/@jridgewell/gen-mapping/types/set-array.d.cts
  65. 1 0
      node_modules/@jridgewell/gen-mapping/types/set-array.d.cts.map
  66. 33 0
      node_modules/@jridgewell/gen-mapping/types/set-array.d.mts
  67. 1 0
      node_modules/@jridgewell/gen-mapping/types/set-array.d.mts.map
  68. 13 0
      node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts
  69. 1 0
      node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.cts.map
  70. 13 0
      node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts
  71. 1 0
      node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts.map
  72. 44 0
      node_modules/@jridgewell/gen-mapping/types/types.d.cts
  73. 1 0
      node_modules/@jridgewell/gen-mapping/types/types.d.cts.map
  74. 44 0
      node_modules/@jridgewell/gen-mapping/types/types.d.mts
  75. 1 0
      node_modules/@jridgewell/gen-mapping/types/types.d.mts.map
  76. 19 0
      node_modules/@jridgewell/resolve-uri/LICENSE
  77. 40 0
      node_modules/@jridgewell/resolve-uri/README.md
  78. 232 0
      node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs
  79. 1 0
      node_modules/@jridgewell/resolve-uri/dist/resolve-uri.mjs.map
  80. 240 0
      node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js
  81. 1 0
      node_modules/@jridgewell/resolve-uri/dist/resolve-uri.umd.js.map
  82. 4 0
      node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts
  83. 69 0
      node_modules/@jridgewell/resolve-uri/package.json
  84. 19 0
      node_modules/@jridgewell/source-map/LICENSE
  85. 184 0
      node_modules/@jridgewell/source-map/README.md
  86. 101 0
      node_modules/@jridgewell/source-map/dist/source-map.mjs
  87. 6 0
      node_modules/@jridgewell/source-map/dist/source-map.mjs.map
  88. 152 0
      node_modules/@jridgewell/source-map/dist/source-map.umd.js
  89. 6 0
      node_modules/@jridgewell/source-map/dist/source-map.umd.js.map
  90. 68 0
      node_modules/@jridgewell/source-map/package.json
  91. 159 0
      node_modules/@jridgewell/source-map/src/source-map.ts
  92. 36 0
      node_modules/@jridgewell/source-map/types/source-map.d.cts
  93. 1 0
      node_modules/@jridgewell/source-map/types/source-map.d.cts.map
  94. 36 0
      node_modules/@jridgewell/source-map/types/source-map.d.mts
  95. 1 0
      node_modules/@jridgewell/source-map/types/source-map.d.mts.map
  96. 19 0
      node_modules/@jridgewell/sourcemap-codec/LICENSE
  97. 264 0
      node_modules/@jridgewell/sourcemap-codec/README.md
  98. 423 0
      node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs
  99. 6 0
      node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map
  100. 0 0
      node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js

+ 23 - 0
App.vue

@@ -0,0 +1,23 @@
+<script>
+	export default {
+		onLaunch: function() {
+			console.log('App Launch')
+		},
+		onShow: function() {
+			console.log('App Show')
+		},
+		onHide: function() {
+			console.log('App Hide')
+		}
+	}
+</script>
+
+<style lang="scss">
+	@import "@/uni_modules/uview-plus/index.scss";
+	@import "static/css/base.css";
+	@import "static/iconfont/iconfont.css";
+
+	@import "static/css/guildford.css";
+	@import "static/css/style.scss";
+	/*每个页面公共css */
+</style>

+ 12 - 0
api/index.js

@@ -0,0 +1,12 @@
+import request from "@/utils/request.js";
+//获取商品详情
+export function getGoodDetailId(data) {
+	return request.get(`book/detail/${data}`);
+}
+//获取文章详情
+export function getArticleDetailId(data) {
+	return request.get(`product/detail/${data}`);
+}
+export function getWechatConfig(data) {
+	return request.get(`wechat/config?url=${data}`);
+}

+ 629 - 0
components/comment/index.vue

@@ -0,0 +1,629 @@
+<template>
+  <z-paging
+    ref="paging"
+    use-page-scroll
+    @closeF2="closeF2"
+    v-model="oneCommentList"
+    @query="queryList"
+    class="comment-paging"
+  >
+    <view
+      class="comment-box"
+      v-for="oneItem in oneCommentList"
+      :key="oneItem.id"
+    >
+      <!-- 一级评论 -->
+      <view
+        :class="[
+          'item-comment',
+          oneItem.replyList && oneItem.replyList.length > 0 ? 'child' : '',
+        ]"
+      >
+        <view class="avatar">
+          <up-avatar
+            @click="toUserPage(oneItem.userId)"
+            shape="circle"
+            :src="oneItem.usePicture"
+          ></up-avatar>
+        </view>
+        <view class="content">
+          <view class="user-box" @click="toUserPage(oneItem.userId)">
+            <text class="username">{{ oneItem.userName }}</text>
+            <text class="author-tag" v-if="oneItem.authorMark">作者</text>
+          </view>
+          <view
+            @longpress="longpress"
+            :data-one-level-id="oneItem.id"
+            class="reply-box"
+            @click="handleClickComment(oneItem)"
+          >
+            <text class="text">{{ oneItem.content }}</text>
+            <text class="time">{{
+              timeFormat(oneItem.createTime, "yyyy-mm-dd")
+            }}</text>
+            <text class="reply-tip">回复</text>
+          </view>
+        </view>
+        <view class="right-box">
+          <uni-icons
+            v-show="!oneItem.likeMark"
+            customPrefix="iconfont"
+            size="18"
+            color="#2E2E2E"
+            class="icon-state icon-dianzan"
+           
+            :class="{
+              animated: likeAnimationIds.includes(oneItem.id),
+              heartBeat: likeAnimationIds.includes(oneItem.id),
+            }"
+          />
+          <uni-icons
+            v-show="oneItem.likeMark"
+            customPrefix="iconfont"
+            size="18"
+            color="#FF2442"
+            class="icon-state icon-dianzanxuanzhong"
+          
+            :class="{
+              animated: likeAnimationIds.includes(oneItem.id),
+              heartBeat: likeAnimationIds.includes(oneItem.id),
+            }"
+          />
+          <text class="count">{{ oneItem.likeCount }}</text>
+        </view>
+      </view>
+
+      <!-- 二级评论 -->
+      <div
+        class="child-comment-box"
+        v-if="oneItem.replyList && oneItem.replyList.length > 0"
+      >
+        <view
+          class="item-comment sub-comment"
+          v-for="(twoItem, idx) in oneItem.replyList"
+          :key="idx"
+        >
+          <view class="avatar" >
+            <up-avatar
+              class="sub-avatar"
+              shape="circle"
+              size="25"
+              :src="twoItem.usePicture"
+            ></up-avatar>
+          </view>
+          <view class="content">
+            <view class="user-box" >
+              <text class="username">{{ twoItem.userName }}</text>
+              <text class="author-tag" v-if="twoItem.authorMark">作者</text>
+            </view>
+            <view
+              @longpress="longpress"
+              :data-one-level-id="oneItem.id"
+              :data-two-level-id="twoItem.id"
+              class="reply-box"
+              
+            >
+              <text class="text" v-if="twoItem.replyMark"
+                >回复<text>{{ twoItem.replyName }}:&nbsp;</text
+                >{{ twoItem.content }}</text
+              >
+              <text class="text" v-else>{{ twoItem.content }}</text>
+              <text class="time">{{
+                timeFormat(twoItem.createTime, "yyyy-mm-dd")
+              }}</text>
+              <text class="reply-tip">回复</text>
+            </view>
+          </view>
+          <view class="right-box">
+            <uni-icons
+              v-show="!twoItem.likeMark"
+              customPrefix="iconfont"
+              size="18"
+              color="#2E2E2E"
+              class="icon-state icon-dianzan"
+             
+              :class="{
+                animated: likeAnimationIds.includes(twoItem.id),
+                heartBeat: likeAnimationIds.includes(twoItem.id),
+              }"
+            />
+            <uni-icons
+              v-show="twoItem.likeMark"
+              customPrefix="iconfont"
+              size="18"
+              color="#FF2442"
+              class="icon-state icon-dianzanxuanzhong"
+             
+              :class="{
+                animated: likeAnimationIds.includes(twoItem.id),
+                heartBeat: likeAnimationIds.includes(twoItem.id),
+              }"
+            />
+            <text class="count">{{ twoItem.likeCount }}</text>
+          </view>
+        </view>
+        <view
+          v-if="
+            oneItem.replyList &&
+            oneItem.replyList.length > 0 &&
+            oneItem.replyPage.hasMore &&
+            oneItem.replyCount > 1
+          "
+          class="load-more"
+          
+        >
+          <!-- <text>展示{{ twoItem.allReply }}条回复</text> -->
+          <text>展开更多回复</text>
+        </view>
+      </div>
+    </view>
+  </z-paging>
+  <up-action-sheet
+    :actions="actionList"
+    :closeOnClickOverlay="true"
+    cancelText="取消"
+    :show="showActionSheet"
+    @close="closeActionSheet"
+    @select="clickActionSheet"
+  ></up-action-sheet>
+</template>
+
+<script setup>
+import { ref, computed } from "vue";
+import useZPaging from "@/uni_modules/z-paging/components/z-paging/js/hooks/useZPaging.js";
+import { onLoad } from "@dcloudio/uni-app";
+// import {
+//   getCommentOne,
+//   getCommentTwo,
+//   setUserState,
+//   addComment,
+//   deleteComment,
+// } from "@/api/book";
+import { timeFormat } from "@/uni_modules/uview-plus";
+import { useToast } from "@/hooks/useToast";
+
+const { Toast } = useToast();
+
+const emit = defineEmits(["clickComment", "moveMessageTop", "inputDone"]);
+
+// defineExpose({ handleAddComment });
+
+const props = defineProps({
+  /**
+   * @param add 新增评论
+   * @param reply 回复评论
+   */
+  commentType: {
+    type: String,
+    default: "add",
+  },
+});
+
+const showActionSheet = ref(false);
+function closeActionSheet() {
+  showActionSheet.value = false;
+}
+function clickActionSheet(item) {
+  if (item.value === 0) {
+    // 删除评论
+    handleDeleteComment();
+  } else if (item.value === 1) {
+    // 回复评论
+    let comment = null;
+    if (pressTwoLevelId.value !== 0) {
+      // 二级评论
+      const result = findCommentById(pressTwoLevelId.value, "two");
+      if (result && result.twoItem) {
+        comment = result.twoItem;
+      }
+    } else if (pressOneLevelId.value !== 0) {
+      // 一级评论
+      comment = findCommentById(pressOneLevelId.value, "one");
+    }
+    if (comment) {
+      handleClickComment(comment);
+    }
+  }
+  showActionSheet.value = false;
+}
+// 删除评论
+async function handleDeleteComment() {
+  try {
+    await deleteComment(deleteId.value);
+    Toast({ title: "删除成功" });
+    removeItemComment();
+  } catch (error) {
+    console.error("deleteComment", error);
+  } finally {
+    pressOneLevelId.value = pressTwoLevelId.value = deleteId.value = 0;
+  }
+}
+
+// 接口删除成功后 需要将数据列表中的评论删除
+function removeItemComment() {
+  // 删除一级评论
+  if (pressOneLevelId.value !== 0 && pressTwoLevelId.value === 0) {
+    const oneItem = findCommentById(pressOneLevelId.value, "one");
+    if (oneItem) {
+      const itemIndex = oneCommentList.value.findIndex(
+        (v) => v.id === oneItem.id
+      );
+      if (itemIndex !== -1) {
+        oneCommentList.value.splice(itemIndex, 1);
+      }
+    }
+  } else if (pressTwoLevelId.value !== 0) {
+    // 删除二级评论
+    const result = findCommentById(pressTwoLevelId.value, "two");
+    if (result && result.oneItem && result.twoItem) {
+      const twoIndex = result.oneItem.replyList.findIndex(
+        (two) => two.id === result.twoItem.id
+      );
+      if (twoIndex !== -1) {
+        result.oneItem.replyList.splice(twoIndex, 1);
+      }
+    }
+  }
+}
+
+// 根据id查找评论(一级或二级)
+function findCommentById(id, type = "one") {
+  if (type === "one") {
+    // 查找一级评论
+    return oneCommentList.value.find((item) => item.id === id) || null;
+  } else if (type === "two") {
+    // 查找二级评论,返回 {oneItem, twoItem}
+    for (const oneItem of oneCommentList.value) {
+      if (Array.isArray(oneItem.replyList)) {
+        const twoItem = oneItem.replyList.find((two) => two.id === id);
+        if (twoItem) {
+          return { oneItem, twoItem };
+        }
+      }
+    }
+    return null;
+  }
+  return null;
+}
+
+// 长按某条评论时触发
+const deleteId = ref(0);
+const pressOneLevelId = ref(0);
+const pressTwoLevelId = ref(0);
+function longpress(event) {
+  // 如果是二级评论 直接删除二级
+  if (event.currentTarget.dataset?.twoLevelId) {
+    deleteId.value = pressTwoLevelId.value =
+      event.currentTarget.dataset.twoLevelId;
+    // 没有二级评论 删除一级
+  } else if (event.currentTarget.dataset?.oneLevelId) {
+    deleteId.value = pressOneLevelId.value =
+      event.currentTarget.dataset?.oneLevelId;
+  }
+  showActionSheet.value = true;
+}
+const actionList = computed(() => {
+  return [
+    { name: "删除", value: 0 },
+    { name: "回复", value: 1 },
+  ];
+});
+
+const articleId = ref("");
+onLoad((options) => {
+  if (!options.id) return;
+  articleId.value = options.id;
+});
+
+// // 获取一级评论
+const oneCommentList = ref([]);
+// async function fetchCommentOne(page, pageSize) {
+//   try {
+//     const params = {
+//       page,
+//       limit: pageSize,
+//       bookId: articleId.value,
+//     };
+//     const { data } = await getCommentOne(params);
+
+//     const list = data.list.map((item) => {
+//       return {
+//         ...item,
+//         replyList: item.replyList || [],
+//         replyPage: {
+//           page: 1,
+//           limit: 5,
+//           hasMore: true,
+//           loading: false,
+//         },
+//       };
+//     });
+//     paging.value.completeByTotal(list, data.total);
+//   } catch (error) {
+//     paging.value.complete(false)
+//     console.error("oneCommentList error", error);
+//   }
+// }
+
+// // 获取二级评论
+// const twoCommentTotalPage = ref(1);
+// async function loadMoreComment(oneItem) {
+//   try {
+//     const params = {
+//       page: oneItem.replyPage.page,
+//       limit: oneItem.replyPage.limit,
+//       bookId: articleId.value,
+//       oneLevelId: oneItem.id,
+//     };
+//     const { data } = await getCommentTwo(params);
+//     twoCommentTotalPage.value = data.totalPage;
+//     if (oneItem.replyPage.page >= data.totalPage) {
+//       oneItem.replyPage.hasMore = false;
+//     }
+
+//     // 当第一页时直接赋值
+//     if (oneItem.replyPage.page === 1) {
+//       oneItem.replyList = data.list;
+//     } else {
+//       // 更多页时才合并数据
+//       oneItem.replyList = [...oneItem.replyList, ...data.list];
+//     }
+//     oneItem.replyPage.page += 1;
+//   } catch (error) {
+//     console.error("loadMoreComment error", error);
+//   }
+// }
+
+// 点击评论触发弹窗事件
+const parentId = ref(0);
+const currentReplyId = ref(0);
+const replyId = ref(0);
+const oneLevelId = ref(0);
+function handleClickComment(comment) {
+  // 点击了一级评论
+  if (comment.parentId === 0) {
+    currentReplyId.value = comment.id;
+    parentId.value = comment.id;
+    oneLevelId.value = comment.id;
+  } else {
+    // 点击了二级评论
+    currentReplyId.value = comment.id;
+    parentId.value = comment.parentId;
+    oneLevelId.value = comment.oneLevelId;
+  }
+
+  replyId.value = comment.userId;
+  emit("clickComment", comment);
+}
+
+// // 评论事件
+// async function handleAddComment(value) {
+//   try {
+//     // 回复评论参数
+//     const replyParams = {
+//       bookId: articleId.value, // 文章ID
+//       content: value, // 评论内容
+//       parentId: currentReplyId.value, // 父评论ID
+//       replyId: replyId.value, // 回复的用户ID
+//       oneLevelId: oneLevelId.value,
+//     };
+
+//     // 新增评论参数
+//     const addParams = {
+//       bookId: articleId.value,
+//       content: value,
+//     };
+//     let params = props.commentType === "add" ? addParams : replyParams;
+//     let { data } = await addComment(params);
+
+//     Toast({ title: "您的评论已发布" });
+//     // 新增一级评论
+//     if (props.commentType === "add") {
+//       data.replyPage = {
+//         page: 1,
+//         limit: 5,
+//         hasMore: true,
+//         loading: false,
+//       };
+//       // oneCommentList.value.unshift(data);
+//       paging.value.addDataFromTop(data);
+//       // 新增评论后定位评论区到最顶部
+//       emit("moveMessageTop");
+//     } else {
+//       // 回复别人的评论
+//       console.log("oneLevelId", oneLevelId.value);
+
+//       // 根据oneLevelId找到这一条一级评论
+//       const oneCommentItem = oneCommentList.value.find(
+//         (v) => v.id === oneLevelId.value
+//       );
+//       console.log("oneCommentItem", oneCommentItem);
+
+//       // 一级评论可能没有子评论接口返回为null,这里需要初始化一下
+//       if (
+//         !oneCommentItem?.replyList ||
+//         !Array.isArray(oneCommentItem?.replyList)
+//       ) {
+//         oneCommentItem.replyList = [];
+//       }
+
+//       // 向子评论列表的第一项插入最新评论
+//       // paging.value.addDataFromTop(data);
+//       oneCommentItem.replyList.unshift(data);
+
+//       // 如果二级评论列表的page大于 二级评论的总页数,隐藏加载更多
+//       if (oneCommentItem.replyPage.page >= twoCommentTotalPage.value) {
+//         oneCommentItem.replyPage.hasMore = false;
+//       }
+//       console.log("oneCommentItem", oneCommentItem);
+//     }
+
+//     emit("inputDone");
+//   } catch (error) {
+//     console.error("addComment error", error);
+//     emit("inputDone");
+//     Toast({ title: "发送失败" });
+//   }
+// }
+
+function closeF2() {}
+
+// paging相关
+const paging = ref(null);
+useZPaging(paging);
+// z-paging绑定的数据刷新时调用
+function queryList(page, pageSize) {
+  // fetchCommentOne(page, pageSize);
+}
+
+// 点赞相关
+const likeLoading = ref(false);
+const likeAnimationIds = ref([]);
+// async function handleLike(item) {
+//   try {
+//     if (likeLoading.value) return;
+
+//     likeLoading.value = true;
+//     await setUserState({ type: 3, commentId: item.id });
+
+//     item.likeMark = !item.likeMark;
+
+//     if (item.likeMark) {
+//       item.likeCount += 1;
+//       const idx = likeAnimationIds.value.indexOf(item.id);
+//       if (idx > -1) likeAnimationIds.value.splice(idx, 1);
+//       likeAnimationIds.value.push(item.id);
+//     } else {
+//       item.likeCount -= 1;
+//       const idx2 = likeAnimationIds.value.indexOf(item.id);
+//       if (idx2 > -1) likeAnimationIds.value.splice(idx2, 1);
+//     }
+
+//     likeLoading.value = false;
+//   } catch (error) {
+//     likeLoading.value = false;
+//     Toast({ title: "点赞失败" });
+//     console.error("handleLike", error);
+//   }
+// }
+
+// 跳转用户详情页
+function toUserPage(id) {
+  uni.navigateTo({ url: `/pages/user/personal?id=${id}` });
+}
+</script>
+
+<style lang="scss" scoped>
+.comment-paging {
+  // min-height: 80vh;
+  // height: 500px;
+}
+.comment-box {
+  // display: flex;
+}
+.item-comment {
+  width: 100%;
+  display: flex;
+  margin-bottom: 50rpx;
+  &.child {
+    margin-bottom: 0;
+  }
+
+  .avatar {
+    margin-right: 20rpx;
+  }
+  .content {
+    flex: 1;
+    font-size: 26rpx;
+    .user-box {
+      color: #9d9d9d;
+      .author-tag {
+        color: rgb(246, 40, 77);
+        background-color: rgba(246, 40, 77, 0.2);
+        padding: 2rpx 10rpx;
+        border-radius: 50rpx;
+        font-size: 20rpx;
+        margin-left: 10rpx;
+        font-weight: 700;
+      }
+    }
+    .reply-box {
+      display: flex;
+      flex-wrap: wrap;
+      align-items: center;
+      line-height: 38rpx;
+      margin: 8rpx 0;
+      .text {
+        overflow-wrap: break-word;
+        margin-right: 16rpx;
+      }
+      .time {
+        // margin-left: 16rpx;
+        white-space: nowrap;
+        color: #999;
+        font-size: 22rpx;
+        margin-right: 10rpx;
+      }
+      .reply-tip {
+        font-size: 22rpx;
+        color: #999;
+      }
+    }
+  }
+  .right-box {
+    display: flex;
+    align-items: center;
+
+    .icon-state {
+      margin-right: 5rpx;
+      // vertical-align: mid;
+    }
+    .count {
+      // vertical-align: middle;
+    }
+  }
+}
+
+.child-comment-box {
+  padding-left: 80rpx;
+  margin-bottom: 50rpx;
+  .load-more {
+    padding-left: 65rpx;
+    color: #223b72;
+    font-size: 26rpx;
+    margin-top: 10rpx;
+  }
+
+  .sub-comment {
+    margin-top: 20rpx;
+    margin-bottom: 0;
+    .avatar {
+      margin-right: 15rpx;
+    }
+    .reply-box {
+      display: block; // 关键:不要用flex
+      .text,
+      .time,
+      .reply-tip {
+        display: inline;
+        vertical-align: middle;
+      }
+      .text {
+        margin-right: 10rpx;
+        overflow-wrap: break-word;
+        line-height: 35rpx;
+      }
+      .time {
+        color: #999;
+        font-size: 22rpx;
+        margin-right: 10rpx;
+        white-space: nowrap;
+      }
+      .reply-tip {
+        font-size: 22rpx;
+        color: #999;
+      }
+    }
+  }
+}
+</style>

+ 301 - 0
components/couponListWindow/index.vue

@@ -0,0 +1,301 @@
+<template>
+  <up-popup :show="showPopup" :closeOnClickOverlay="true" @close="close">
+    <view class="coupon-list-window">
+      <view v-if="!orderShow" class="nav acea-row row-around">
+        <view
+          :class="['acea-row', 'row-middle', type === 1 ? 'on' : '']"
+          @click="setType(1)"
+          >通用券</view
+        >
+        <!-- <view
+          :class="['acea-row', 'row-middle', type === 2 ? 'on' : '']"
+          @click="setType(2)"
+          >商品券</view
+        >
+        <view
+          :class="['acea-row', 'row-middle', type === 3 ? 'on' : '']"
+          @click="setType(3)"
+          >品类券</view
+        > -->
+      </view>
+      <view class="coupon-box">
+        <view
+          class="coupon-list"
+          :style="{ 'margin-top': !orderShow ? '0' : '50rpx' }"
+        >
+          <scroll-view
+            class="scroll-box"
+            v-if="coupon.list.length"
+            scroll-y="true"
+          >
+            <block v-if="coupon.list.length">
+              <!-- <view class='item acea-row row-center-wrapper' v-for="(item,index) in coupon.list" :key='index'> -->
+              <view
+                class="item acea-row row-center-wrapper"
+                v-for="(item, index) in coupon.list"
+               
+                :key="index"
+              >
+                <view
+                  class="money acea-row row-column row-center-wrapper"
+                  :class="item.isUse ? 'moneyGray' : ''"
+                >
+                  <view
+                    >¥<text class="num">{{
+                      item.money ? Number(item.money) : ""
+                    }}</text></view
+                  >
+                  <view class="pic-num">满{{ item.minPrice }}元可用</view>
+                </view>
+                <view class="text">
+                  <view class="condition line2">
+                    <span
+                      class="line-title"
+                      :class="item.isUse ? 'gray' : ''"
+                      v-if="item.useType === 1"
+                      >通用</span
+                    >
+                    <span
+                      class="line-title"
+                      :class="item.isUse ? 'gray' : ''"
+                      v-else-if="item.useType === 3"
+                      >品类</span
+                    >
+                    <span
+                      class="line-title"
+                      :class="item.isUse ? 'gray' : ''"
+                      v-else
+                      >商品</span
+                    >
+                    <span>{{ item.name }}</span>
+                  </view>
+                  <view class="tip-row">注: 工费一次性抵扣</view>
+                  <view class="data acea-row row-between-wrapper">
+                    <view v-if="item.day > 0"
+                      >领取后{{ item.day }}天内可用</view
+                    >
+                    <view v-else>
+                      {{
+                        item.useStartTimeStr && item.useEndTimeStr
+                          ? item.useStartTimeStr + " - " + item.useEndTimeStr
+                          : ""
+                      }}
+                    </view>
+                    <view class="bnt gray" v-if="item.isUse">{{
+                      item.use_title || "已领取"
+                    }}</view>
+                    <view class="bnt bg-color" v-else>{{
+                      coupon.statusTile || "立即领取"
+                    }}</view>
+                  </view>
+                </view>
+              </view>
+            </block>
+          </scroll-view>
+          <!-- 无优惠券 -->
+          <view class="pictrue" v-else>
+            <image src="/static/images/noCoupon.png"></image>
+          </view>
+        </view>
+      </view>
+    </view>
+  </up-popup>
+</template>
+
+<script setup>
+import { ref } from "vue";
+// import { setCouponReceive } from "@/api/api.js";
+import { useToast } from "@/hooks/useToast";
+
+const props = defineProps({
+  showPopup: {
+    type: Boolean,
+    default: false,
+  },
+  openType: {
+    type: Number,
+    default: 0,
+  },
+  coupon: {
+    type: Object,
+    default: () => ({}),
+  },
+  orderShow: {
+    type: String,
+    default: "",
+  },
+});
+
+const { Toast } = useToast();
+const emit = defineEmits([
+  "close",
+  "ChangCouponsUseState",
+  "ChangCoupons",
+  "tabCouponType",
+]);
+
+const type = ref(1);
+
+function close() {
+  type.value = 1;
+  emit("close");
+}
+
+// function getCouponUser(index, id) {
+//   console.log({index, id}, props.openType)
+//   const list = props.coupon.list;
+//   if (list && list[index] && list[index].isUse === true && props.openType === 0)
+//     return true;
+//   switch (props.openType) {
+//     case 0:
+//       setCouponReceive(id).then(() => {
+//         emit("ChangCouponsUseState", index);
+//         Toast({ title: "领取成功" });
+//         emit("ChangCoupons", list[index]);
+//       });
+//       break;
+//     case 1:
+//       emit("ChangCoupons", index);
+//       break;
+//   }
+// }
+
+function setType(val) {
+  type.value = val;
+  emit("tabCouponType", val);
+}
+</script>
+
+<style scoped lang="scss">
+.coupon-list-window {
+  width: 100%;
+  background-color: #f5f5f5;
+  border-radius: 16rpx 16rpx 0 0;
+}
+
+.coupon-list-window .title {
+  height: 124rpx;
+  width: 100%;
+  text-align: center;
+  line-height: 124rpx;
+  font-size: 32rpx;
+  font-weight: bold;
+  position: relative;
+}
+
+.coupon-list-window .iconfont {
+  position: absolute;
+  right: 30rpx;
+  top: 50%;
+  transform: translateY(-50%);
+  font-size: 35rpx;
+  color: #8a8a8a;
+  font-weight: normal;
+}
+
+.coupon-list {
+  height: 823rpx;
+  overflow: auto;
+  padding: 30rpx 0;
+}
+
+.pictrue {
+  width: 414rpx;
+  height: 336rpx;
+  margin: 208rpx auto;
+  image {
+    width: 100%;
+    height: 100%;
+  }
+}
+
+.pic-num {
+  color: #fff;
+  font-size: 24rpx;
+}
+
+.line-title {
+  width: 90rpx;
+  padding: 0 10rpx;
+  box-sizing: border-box;
+  background: rgba(255, 247, 247, 1);
+  border: 1px solid rgba(232, 51, 35, 1);
+  opacity: 1;
+  border-radius: 20rpx;
+  font-size: 20rpx;
+  color: #e83323;
+  margin-right: 12rpx;
+  &.gray {
+    border-color: #bbb;
+    color: #bbb;
+    background-color: #f5f5f5;
+  }
+}
+
+.tip-row {
+  font-size: 26rpx;
+  // color: #ccc;
+}
+
+.nav {
+  width: 100%;
+  height: 96rpx;
+  border-bottom: 2rpx solid #f5f5f5;
+  border-top-left-radius: 16rpx;
+  border-top-right-radius: 16rpx;
+  background-color: #ffffff;
+  font-size: 30rpx;
+  color: #999999;
+  .acea-row {
+    border-top: 5rpx solid transparent;
+    border-bottom: 5rpx solid transparent;
+    &.on {
+      border-bottom-color: #e93323;
+      color: #282828;
+    }
+    &:only-child {
+      border-bottom-color: transparent;
+    }
+  }
+}
+
+.occupy {
+  height: 106rpx;
+}
+
+.coupon-box {
+}
+.coupon-list {
+  .scroll-box {
+    height: 100%;
+    .scroll-Y {
+      height: 300rpx;
+    }
+    .scroll-view_H {
+      white-space: nowrap;
+      width: 100%;
+    }
+    .scroll-view-item {
+      height: 300rpx;
+      line-height: 300rpx;
+      text-align: center;
+      font-size: 36rpx;
+    }
+    .scroll-view-item_H {
+      display: inline-block;
+      width: 100%;
+      height: 300rpx;
+      line-height: 300rpx;
+      text-align: center;
+      font-size: 36rpx;
+    }
+  }
+  .item {
+    margin-bottom: 20rpx;
+    box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.06);
+    .money {
+      font-weight: normal;
+    }
+  }
+}
+</style>

+ 194 - 0
components/followBtn/index.vue

@@ -0,0 +1,194 @@
+<template>
+  <view class="follow-container" v-show="!isOwner">
+    <!-- 关注按钮 -->
+    <view
+      @click="handleFollow"
+      :class="['follow-box', isFollowed ? 'follow' : '', currentStyle]"
+      :style="currentStyle"
+    >
+      <text>
+        <template v-if="textType === 'default'">{{
+          isFollowed ? "已关注" : "关注"
+        }}</template>
+        <!-- 粉丝列表展示文案不一样 -->
+        <template v-else>
+          <template v-if="isFollowed">互相关注</template>
+          <template v-else>回关</template>
+        </template>
+      </text>
+    </view>
+
+    <!-- 取关确认弹窗 -->
+    <up-modal
+      :showCancelButton="true"
+      confirmText="不再关注"
+      cancelText="取消"
+      @confirm="confirmFollowModal"
+      @cancel="cancelFollowModal"
+      :show="showFollowModal"
+      title="不再关注该作者?"
+    >
+    </up-modal>
+  </view>
+</template>
+
+<script setup>
+import { ref, watch, computed, onMounted } from "vue";
+// import { setUserState } from "@/api/book";
+import { useToast } from "@/hooks/useToast";
+// import { useAppStore } from "@/stores/app";
+
+const defaultActiveStyle = {
+  border: "1px solid #999",
+  color: "#333",
+};
+
+const defaultInactiveStyle = {
+  border: "1px solid #ff2442",
+  color: "#ff2442",
+};
+
+const { Toast } = useToast();
+
+// const appStore = useAppStore();
+
+// 定义props
+const props = defineProps({
+  // 是否已关注
+  followed: {
+    type: Boolean,
+    default: false,
+  },
+  // 被关注用户ID
+  followedId: {
+    type: [String, Number],
+    required: true,
+  },
+  textType: {
+    type: String,
+    default: "default", // 可选值 fans
+  },
+  showBtn: {
+    type: Boolean,
+    default: true,
+  },
+  activeStyle: {
+    type: Object,
+    default: () => ({}),
+  },
+  inactiveStyle: {
+    type: Object,
+    default: () => ({}),
+  },
+});
+const isOwner = computed(() => {
+  // return Number(props.followedId) === Number(appStore.uid);
+});
+
+const currentStyle = computed(() => {
+  if (isFollowed.value) {
+    return { ...defaultActiveStyle, ...(props.activeStyle || {}) };
+  } else {
+    return { ...defaultInactiveStyle, ...(props.inactiveStyle || {}) };
+  }
+});
+
+// 定义事件
+const emit = defineEmits(["update:followed", "follow-change"]);
+
+// 响应式数据
+const isFollowed = ref(props.followed);
+const showFollowModal = ref(false);
+const followLoading = ref(false);
+
+// 监听props变化
+watch(
+  () => props.followed,
+  (newVal) => {
+    isFollowed.value = newVal;
+  }
+);
+
+// 点击关注按钮事件
+async function handleFollow() {
+  console.log("点击关注按钮");
+  if (isFollowed.value) {
+    showFollowModal.value = true;
+  } else {
+    // setFollowState();
+  }
+}
+
+// 确认取关事件
+function confirmFollowModal() {
+  showFollowModal.value = false;
+  // setFollowState();
+}
+
+// 取消事件
+function cancelFollowModal() {
+  showFollowModal.value = false;
+}
+
+// 关注/取关请求
+// async function setFollowState() {
+//   try {
+//     if (followLoading.value) return;
+//     followLoading.value = true;
+//     if (!props.followed && isOwner.value) {
+//       return Toast({ title: "无法关注自己!" });
+//     }
+
+//     const res = await setUserState({
+//       type: 2,
+//       followedId: props.followedId,
+//     });
+
+//     isFollowed.value = !isFollowed.value;
+//     // 触发父组件更新
+//     emit("update:followed", isFollowed.value);
+//     emit("follow-change", isFollowed.value);
+
+//     // 触发全局事件,通知其他页面更新关注状态
+//     uni.$emit('followStateChanged', {
+//       userId: props.followedId,
+//       followMark: isFollowed.value
+//     });
+
+//     followLoading.value = false;
+//   } catch (error) {
+//     console.error("follow error", error);
+//     followLoading.value = false;
+//     Toast({ title: "操作失败", icon: "none" });
+//   }
+// }
+</script>
+
+<style lang="scss" scoped>
+.follow-container {
+  .follow-box {
+    padding: 4rpx 25rpx;
+    border: 1px solid #ff2442;
+    border-radius: 50rpx;
+    color: #ff2442;
+    margin-right: 10rpx;
+    cursor: pointer;
+    transition: all 0.3s ease;
+
+    &.follow {
+      border-color: #999;
+      color: #333;
+    }
+
+    text {
+      font-size: 14px;
+    }
+  }
+}
+
+::v-deep
+  .u-modal__button-group__wrapper--confirm
+  .u-modal__button-group__wrapper__text {
+  color: #ff2442 !important;
+}
+</style>

+ 143 - 0
components/productConSwiper/index.vue

@@ -0,0 +1,143 @@
+<template>
+	<view class='product-bg'>
+		<swiper :indicator-dots="indicatorDots" indicator-active-color="#e93323" :autoplay="autoplay"
+			:circular="circular" :interval="interval" :duration="duration" @change="change">
+			
+			<swiper-item v-if="videoline">
+				<view class="item">
+					<view v-show="!controls" style="width:100%;height:100% ">
+						<video id="myVideo" :src='videoline' objectFit="cover" controls style="width:100%;height:100% "
+							show-center-play-btn show-mute-btn="true" auto-pause-if-navigate :custom-cache="false"
+							:enable-progress-gesture="false" :poster="imgUrls[0]" @pause="videoPause"></video>
+					</view>
+					<view class="poster" v-show="controls">
+						<image class="image" :src="imgUrls[0]"></image>
+					</view>
+					<view class="stop" v-show="controls" @tap="bindPause">
+						<image class="image" src="@/static/images/stop.png"></image>
+					</view>
+				</view>
+			</swiper-item>
+			
+			<block v-for="(item,index) in imgUrls" :key='index'>
+				<swiper-item>
+					<image :src="item" class="slide-image" />
+				</swiper-item>
+			</block>
+		</swiper>
+	</view>
+</template>
+
+<script setup>
+import { ref, onMounted } from 'vue';
+
+const props = defineProps({
+	imgUrls: {
+		type: Array,
+		default: () => []
+	},
+	videoline: {
+		type: String,
+		default: ""
+	}
+});
+
+const indicatorDots = ref(true);
+const circular = ref(true);
+const autoplay = ref(true);
+const interval = ref(3000);
+const duration = ref(500);
+const currents = ref("1");
+const controls = ref(true);
+const isPlay = ref(true);
+const videoContext = ref('');
+onMounted(() => {
+	if (props.videoline) {
+		props.imgUrls.shift();
+	}
+});
+const bindPause = () => {
+	videoContext.value.play();
+	controls.value = false;
+	autoplay.value = false;
+};
+const change = (e) => {
+	currents.value = e.detail.current + 1;
+};
+const videoPause = (e) => {
+	// Handle video pause event if needed
+};
+</script>
+
+<style scoped lang="scss">
+	.product-bg {
+		width: 100%;
+		height: 750rpx;
+		position: relative;
+	}
+
+	.product-bg swiper {
+		width: 100%;
+		height: 100%;
+		position: relative;
+	}
+
+	.product-bg .slide-image {
+		width: 100%;
+		height: 100%;
+	}
+
+	.product-bg .pages {
+		position: absolute;
+		background-color: #fff;
+		height: 34rpx;
+		padding: 0 10rpx;
+		border-radius: 3rpx;
+		right: 30rpx;
+		bottom: 30rpx;
+		line-height: 34rpx;
+		font-size: 24rpx;
+		color: #050505;
+	}
+
+	#myVideo {
+		width: 100%;
+		height: 100%
+	}
+
+	.product-bg .item {
+		position: relative;
+		width: 100%;
+		height: 100%;
+	}
+
+	.product-bg .item .poster {
+		position: absolute;
+		top: 0;
+		left: 0;
+		height: 750rpx;
+		width: 100%;
+		z-index: 9;
+	}
+
+	.product-bg .item .poster .image {
+		width: 100%;
+		height: 100%;
+	}
+
+	.product-bg .item .stop {
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		width: 136rpx;
+		height: 136rpx;
+		margin-top: -68rpx;
+		margin-left: -68rpx;
+		z-index: 9;
+	}
+
+	.product-bg .item .stop .image {
+		width: 100%;
+		height: 100%;
+	}
+</style>

+ 426 - 0
components/productWindow/index.vue

@@ -0,0 +1,426 @@
+<template>
+  <up-popup :show="showPopup" :closeOnClickOverlay="true" @close="close">
+    <view
+      class="product-window"
+      :class="(iSbnt ? 'join' : '') + ' ' + (iScart ? 'joinCart' : '')"
+    >
+      <view class="textpic acea-row row-between-wrapper">
+        <view class="pictrue">
+          <image :src="attr.productSelect.image"></image>
+        </view>
+        <view class="text">
+          <view class="line1">
+            {{ attr.productSelect.storeName }}
+          </view>
+          <view class="money font-color">
+            ¥<text class="num">{{ calcNumPrice }}</text>
+            <text class="stock" v-if="isShow"
+              >库存: {{ attr.productSelect.stock }}</text
+            >
+            <text class="stock" v-if="limitNum"
+              >限量: {{ attr.productSelect.quota }}</text
+            >
+          </view>
+        </view>
+        <view class="iconfont icon-guanbi" @click="close"></view>
+      </view>
+      <view class="rollTop">
+        <view class="productWinList">
+          <view
+            class="item"
+            v-for="(item, indexw) in attr.productAttr"
+            :key="indexw"
+          >
+            <view class="title">{{ item.attrName }}</view>
+            <view class="listn acea-row row-middle">
+              <view
+                class="itemn"
+                :class="item.index === itemn ? 'on' : ''"
+                v-for="(itemn, indexn) in item.attrValues"
+                @click="tapAttr(indexw, indexn)"
+                :key="indexn"
+              >
+                {{ itemn }}
+              </view>
+            </view>
+          </view>
+        </view>
+        <view class="cart acea-row row-between-wrapper">
+          <view class="title">数量</view>
+          <view class="carnum acea-row row-left">
+            <view
+              class="item reduce"
+              :class="attr.productSelect.cart_num <= 1 ? 'on' : ''"
+              @click="CartNumDes"
+            >
+              -
+            </view>
+            <view class="item num">
+              <input
+                type="number"
+                v-model="attr.productSelect.cart_num"
+                data-name="productSelect.cart_num"
+                @input="bindCode(attr.productSelect.cart_num)"
+              />
+            </view>
+            <view
+              v-if="iSplus"
+              class="item plus"
+              :class="
+                attr.productSelect.cart_num >= attr.productSelect.stock
+                  ? 'on'
+                  : ''
+              "
+              @click="CartNumAdd"
+            >
+              +
+            </view>
+            <view
+              v-else
+              class="item plus"
+              :class="
+                attr.productSelect.cart_num >= attr.productSelect.quota ||
+                attr.productSelect.cart_num >= attr.productSelect.stock ||
+                attr.productSelect.cart_num >= attr.productSelect.num
+                  ? 'on'
+                  : ''
+              "
+              @click="CartNumAdd"
+              >+</view
+            >
+          </view>
+        </view>
+      </view>
+      <view class="footer-box">
+        <up-button
+          v-if="attr.productSelect.stock > 0"
+          class="confirm-btn"
+          @click="submit"
+          type="primary"
+          text="确定"
+        ></up-button>
+        <up-button
+          v-else
+          class="confirm-btn"
+          @click="submit"
+          type="primary"
+          text="已售罄"
+        ></up-button>
+      </view>
+    </view>
+  </up-popup>
+</template>
+
+<script setup>
+import { computed } from "vue";
+
+const props = defineProps({
+  attr: {
+    type: Object,
+    default: () => ({}),
+  },
+  showPopup: {
+    type: Boolean,
+    default: false,
+  },
+  limitNum: {
+    type: Number,
+    default: 0,
+  },
+  isShow: {
+    type: Number,
+    default: 0,
+  },
+  iSbnt: {
+    type: Number,
+    default: 0,
+  },
+  iSplus: {
+    type: Number,
+    default: 0,
+  },
+  iScart: {
+    type: Number,
+    default: 0,
+  },
+});
+
+const emit = defineEmits([
+  "goCat",
+  "iptCartNum",
+  "myevent",
+  "ChangeCartNum",
+  "attrVal",
+  "ChangeAttr",
+  "submit",
+  "closePopup",
+]);
+
+const calcNumPrice = computed(() => {
+  // 检查数据是否存在
+  if (!props.attr?.productSelect) {
+    return '0.00'
+  }
+  
+  const { storePrice, cart_num } = props.attr.productSelect
+  
+  // 检查价格和数量是否存在且有效
+  if (!storePrice || !cart_num) {
+    return '0.00'
+  }
+  
+  // 转换为数字并验证
+  const price = Number(storePrice)
+  const quantity = Number(cart_num)
+  
+  // 检查是否为有效数字
+  if (isNaN(price) || isNaN(quantity)) {
+    return '0.00'
+  }
+  
+  // 检查是否为负数
+  if (price < 0 || quantity < 0) {
+    return '0.00'
+  }
+  
+  // 计算总价并保留两位小数
+  const total = price * quantity
+  return total.toFixed(2)
+})
+
+function goCat() {
+  emit("goCat");
+}
+
+function bindCode() {
+  emit("iptCartNum", props.attr.productSelect.cart_num);
+}
+
+function close() {
+  emit("closePopup");
+}
+
+function submit() {
+  emit("submit");
+}
+
+function CartNumDes() {
+  emit("ChangeCartNum", false);
+}
+
+function CartNumAdd() {
+  emit("ChangeCartNum", true);
+}
+
+function tapAttr(indexw, indexn) {
+  emit("attrVal", { indexw, indexn });
+  // 直接修改 props 不推荐,建议父组件传递响应式对象
+  if (props.attr.productAttr && props.attr.productAttr[indexw]) {
+    props.attr.productAttr[indexw].index =
+      props.attr.productAttr[indexw].attrValues[indexn];
+  }
+  const value = getCheckedValue().join(",");
+  emit("ChangeAttr", value);
+}
+
+function getCheckedValue() {
+  const productAttr = props.attr.productAttr || [];
+  const value = [];
+  for (let i = 0; i < productAttr.length; i++) {
+    for (let j = 0; j < productAttr[i].attrValues.length; j++) {
+      if (productAttr[i].index === productAttr[i].attrValues[j]) {
+        value.push(productAttr[i].attrValues[j]);
+      }
+    }
+  }
+  return value;
+}
+</script>
+
+<style scoped lang="scss">
+.product-window {
+  width: 100%;
+  background-color: #fff;
+  border-radius: 16rpx 16rpx 0 0;
+  padding-bottom: 40rpx;
+
+  &.join,
+  &.joinCart {
+    padding-bottom: 30rpx;
+  }
+  &.joinCart {
+    z-index: 999;
+  }
+
+  .textpic {
+    padding: 0 130rpx 0 30rpx;
+    margin-top: 29rpx;
+    position: relative;
+
+    .pictrue {
+      width: 150rpx;
+      height: 150rpx;
+
+      image {
+        width: 100%;
+        height: 100%;
+        border-radius: 10rpx;
+      }
+    }
+
+    .text {
+      width: 410rpx;
+      font-size: 32rpx;
+      color: #333333;
+
+      .money {
+        font-size: 24rpx;
+        margin-top: 40rpx;
+
+        .num {
+          font-size: 36rpx;
+        }
+        .stock {
+          color: #999;
+          margin-left: 18rpx;
+        }
+      }
+    }
+
+    .iconfont {
+      position: absolute;
+      right: 30rpx;
+      top: -5rpx;
+      font-size: 35rpx;
+      color: #8a8a8a;
+    }
+  }
+
+  .rollTop {
+    max-height: 500rpx;
+    overflow: auto;
+    margin-top: 36rpx;
+  }
+
+  .footer-box {
+    padding: 0 30rpx;
+    margin: 30rpx 0 0 0;
+    .confirm-btn {
+      border-radius: 100rpx;
+      background-color: $header-color;
+      border-color: $header-color;
+    }
+  }
+
+  .productWinList {
+    .item {
+      & + .item {
+        margin-top: 36rpx;
+      }
+      .title {
+        font-size: 30rpx;
+        color: #999;
+        padding: 0 30rpx;
+      }
+      .listn {
+        padding: 0 30rpx 0 16rpx;
+
+        .itemn {
+          border: 1px solid #f2f2f2;
+          font-size: 26rpx;
+          color: #282828;
+          padding: 7rpx 33rpx;
+          border-radius: 40rpx;
+          margin: 20rpx 0 0 14rpx;
+          background-color: #f2f2f2;
+
+          &.on {
+            color: $theme-color;
+            background: rgba(255, 244, 243, 1);
+            border-color: $theme-color;
+          }
+          &.limit {
+            color: #999;
+            text-decoration: line-through;
+          }
+        }
+      }
+    }
+  }
+
+  .cart {
+    margin-top: 36rpx;
+    padding: 0 30rpx;
+
+    .title {
+      font-size: 30rpx;
+      color: #999;
+    }
+
+    .carnum {
+      height: 54rpx;
+      margin-top: 24rpx;
+
+      view {
+        width: 84rpx;
+        text-align: center;
+        height: 100%;
+        line-height: 54rpx;
+        color: #282828;
+        font-size: 45rpx;
+      }
+
+      .reduce {
+        border-right: 0;
+        border-radius: 6rpx 0 0 6rpx;
+        line-height: 48rpx;
+
+        &.on {
+          color: #dedede;
+          font-size: 44rpx;
+        }
+      }
+
+      .plus {
+        border-left: 0;
+        border-radius: 0 6rpx 6rpx 0;
+        line-height: 46rpx;
+
+        &.on {
+          border-color: #e3e3e3;
+          color: #dedede;
+        }
+      }
+
+      .num {
+        background: rgba(242, 242, 242, 1);
+        color: #282828;
+        font-size: 28rpx;
+        border-radius: 12rpx;
+        line-height: 29px;
+        height: 54rpx;
+
+        input {
+          display: -webkit-inline-box;
+        }
+      }
+    }
+  }
+
+  .joinBnt {
+    font-size: 30rpx;
+    width: 620rpx;
+    height: 86rpx;
+    border-radius: 50rpx;
+    text-align: center;
+    line-height: 86rpx;
+    color: #fff;
+    margin: 21rpx auto 0 auto;
+
+    &.on {
+      background-color: #bbb;
+      color: #fff;
+    }
+  }
+}
+</style>

+ 346 - 0
components/productWindow/index_origin.vue

@@ -0,0 +1,346 @@
+<template>
+	<view>
+		<view class="product-window"
+			:class="(attr.cartAttr === true ? 'on' : '') + ' ' + (iSbnt?'join':'') + ' ' + (iScart?'joinCart':'')">
+			<view class="textpic acea-row row-between-wrapper">
+				<view class="pictrue">
+					<image :src="attr.productSelect.image"></image>
+				</view>
+				<view class="text">
+					<view class="line1">
+						{{ attr.productSelect.storeName }}
+					</view>
+					<view class="money font-color">
+						¥<text class="num">{{ attr.productSelect.storePrice }}</text>
+						<text class="stock" v-if='isShow'>库存: {{ attr.productSelect.stock }}</text>
+						<text class='stock' v-if="limitNum">限量: {{attr.productSelect.quota}}</text>
+					</view>
+				</view>
+				<view class="iconfont icon-guanbi" @click="closeAttr"></view>
+			</view>
+			<view class="rollTop">
+				<view class="productWinList">
+					<view class="item" v-for="(item, indexw) in attr.productAttr" :key="indexw">
+						<view class="title">{{ item.attrName }}</view>
+						<view class="listn acea-row row-middle">
+							<view class="itemn" :class="item.index === itemn ? 'on' : ''"
+								v-for="(itemn, indexn) in item.attrValues" @click="tapAttr(indexw, indexn)"
+								:key="indexn">
+								{{ itemn }}
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="cart acea-row row-between-wrapper">
+					<view class="title">数量</view>
+					<view class="carnum acea-row row-left">
+						<view class="item reduce" :class="attr.productSelect.cart_num <= 1 ? 'on' : ''"
+							@click="CartNumDes">
+							-
+						</view>
+						<view class='item num'>
+							<input type="number" v-model="attr.productSelect.cart_num"
+								data-name="productSelect.cart_num"
+								@input="bindCode(attr.productSelect.cart_num)"></input>
+						</view>
+						<view
+							v-if="iSplus" 
+							class="item plus"
+							:class="attr.productSelect.cart_num >= attr.productSelect.stock ? 'on' : ''" 
+							@click="CartNumAdd">
+							+
+						</view>
+						<view v-else class='item plus'
+							:class='(attr.productSelect.cart_num >= attr.productSelect.quota) || (attr.productSelect.cart_num >= attr.productSelect.stock) || (attr.productSelect.cart_num >= attr.productSelect.num)? "on":""'
+							@click='CartNumAdd'>+</view>
+					</view>
+				</view>
+			</view>
+			<view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock>0 &&attr.productSelect.quota>0"
+				@click="goCat">我要参团</view>
+			<view class="joinBnt on"
+				v-else-if="(iSbnt && attr.productSelect.quota<=0)||(iSbnt &&attr.productSelect.stock<=0)">已售罄</view>
+			<view class="joinBnt bg-color" v-if="iScart && attr.productSelect.stock" @click="goCat">确定</view>
+			<!-- <view class="joinBnt bg-color" v-if="iSbnt && attr.productSelect.stock && attr.productSelect.quota" @click="goCat">确定</view> -->
+			<view class="joinBnt on" v-else-if="(iScart && !attr.productSelect.stock)">已售罄</view>
+		</view>
+		<view class="mask" @touchmove.prevent :hidden="attr.cartAttr === false" @click="closeAttr"></view>
+	</view>
+</template>
+
+<script setup>
+import { toRefs } from 'vue'
+
+const props = defineProps({
+  attr: {
+    type: Object,
+    default: () => ({})
+  },
+  limitNum: {
+    type: Number,
+    default: 0
+  },
+  isShow: {
+    type: Number,
+    default: 0
+  },
+  iSbnt: {
+    type: Number,
+    default: 0
+  },
+  iSplus: {
+    type: Number,
+    default: 0
+  },
+  iScart: {
+    type: Number,
+    default: 0
+  }
+})
+
+const emit = defineEmits([
+  'goCat',
+  'iptCartNum',
+  'myevent',
+  'ChangeCartNum',
+  'attrVal',
+  'ChangeAttr'
+])
+
+function goCat() {
+  emit('goCat')
+}
+
+function bindCode() {
+  emit('iptCartNum', props.attr.productSelect.cart_num)
+}
+
+function closeAttr() {
+  emit('myevent')
+}
+
+function CartNumDes() {
+  emit('ChangeCartNum', false)
+}
+
+function CartNumAdd() {
+  emit('ChangeCartNum', true)
+}
+
+function tapAttr(indexw, indexn) {
+  emit('attrVal', { indexw, indexn })
+  // 直接修改 props 不推荐,建议父组件传递响应式对象
+  if (props.attr.productAttr && props.attr.productAttr[indexw]) {
+    props.attr.productAttr[indexw].index = props.attr.productAttr[indexw].attrValues[indexn]
+  }
+  const value = getCheckedValue().join(',')
+  emit('ChangeAttr', value)
+}
+
+function getCheckedValue() {
+  const productAttr = props.attr.productAttr || []
+  const value = []
+  for (let i = 0; i < productAttr.length; i++) {
+    for (let j = 0; j < productAttr[i].attrValues.length; j++) {
+      if (productAttr[i].index === productAttr[i].attrValues[j]) {
+        value.push(productAttr[i].attrValues[j])
+      }
+    }
+  }
+  return value
+}
+</script>
+
+<style scoped lang="scss">
+	.product-window {
+		position: fixed;
+		bottom: 0;
+		width: 100%;
+		left: 0;
+		background-color: #fff;
+		z-index: 276;
+		border-radius: 16rpx 16rpx 0 0;
+		padding-bottom: 140rpx;
+		transform: translate3d(0, 100%, 0);
+		transition: all .3s cubic-bezier(.25, .5, .5, .9);
+	}
+  .mask {
+    z-index: 275;
+  }
+
+	.product-window.on {
+		transform: translate3d(0, 0, 0);
+	}
+
+	.product-window.join {
+		padding-bottom: 30rpx;
+	}
+
+	.product-window.joinCart {
+		padding-bottom: 30rpx;
+		z-index: 999;
+	}
+
+	.product-window .textpic {
+		padding: 0 130rpx 0 30rpx;
+		margin-top: 29rpx;
+		position: relative;
+	}
+
+	.product-window .textpic .pictrue {
+		width: 150rpx;
+		height: 150rpx;
+	}
+
+	.product-window .textpic .pictrue image {
+		width: 100%;
+		height: 100%;
+		border-radius: 10rpx;
+	}
+
+	.product-window .textpic .text {
+		width: 410rpx;
+		font-size: 32rpx;
+		color: #333333;
+	}
+
+	.product-window .textpic .text .money {
+		font-size: 24rpx;
+		margin-top: 40rpx;
+	}
+
+	.product-window .textpic .text .money .num {
+		font-size: 36rpx;
+	}
+
+	.product-window .textpic .text .money .stock {
+		color: #999;
+		margin-left: 18rpx;
+	}
+
+	.product-window .textpic .iconfont {
+		position: absolute;
+		right: 30rpx;
+		top: -5rpx;
+		font-size: 35rpx;
+		color: #8a8a8a;
+	}
+
+	.product-window .rollTop {
+		max-height: 500rpx;
+		overflow: auto;
+		margin-top: 36rpx;
+	}
+
+	.product-window .productWinList .item~.item {
+		margin-top: 36rpx;
+	}
+
+	.product-window .productWinList .item .title {
+		font-size: 30rpx;
+		color: #999;
+		padding: 0 30rpx;
+	}
+
+	.product-window .productWinList .item .listn {
+		padding: 0 30rpx 0 16rpx;
+	}
+
+	.product-window .productWinList .item .listn .itemn {
+		border: 1px solid #F2F2F2;
+		font-size: 26rpx;
+		color: #282828;
+		padding: 7rpx 33rpx;
+		border-radius: 40rpx;
+		margin: 20rpx 0 0 14rpx;
+		background-color: #F2F2F2;
+	}
+
+	.product-window .productWinList .item .listn .itemn.on {
+		color: $theme-color;
+		background: rgba(255, 244, 243, 1);
+		border-color: $theme-color;
+	}
+
+	.product-window .productWinList .item .listn .itemn.limit {
+		color: #999;
+		text-decoration: line-through;
+	}
+
+	.product-window .cart {
+		margin-top: 36rpx;
+		padding: 0 30rpx;
+	}
+
+	.product-window .cart .title {
+		font-size: 30rpx;
+		color: #999;
+	}
+
+	.product-window .cart .carnum {
+		height: 54rpx;
+		margin-top: 24rpx;
+	}
+
+	.product-window .cart .carnum view {
+		// border: 1px solid #a4a4a4;
+		width: 84rpx;
+		text-align: center;
+		height: 100%;
+		line-height: 54rpx;
+		color: #282828;
+		font-size: 45rpx;
+	}
+
+	.product-window .cart .carnum .reduce {
+		border-right: 0;
+		border-radius: 6rpx 0 0 6rpx;
+		line-height: 48rpx;
+	}
+
+	.product-window .cart .carnum .reduce.on {
+		// border-color: #e3e3e3;
+		color: #DEDEDE;
+		font-size: 44rpx;
+	}
+
+	.product-window .cart .carnum .plus {
+		border-left: 0;
+		border-radius: 0 6rpx 6rpx 0;
+		line-height: 46rpx;
+	}
+
+	.product-window .cart .carnum .plus.on {
+		border-color: #e3e3e3;
+		color: #dedede;
+	}
+
+	.product-window .cart .carnum .num {
+		background: rgba(242, 242, 242, 1);
+		color: #282828;
+		font-size: 28rpx;
+		border-radius: 12rpx;
+		line-height: 29px;
+		height: 54rpx;
+
+		input {
+			display: -webkit-inline-box;
+		}
+	}
+
+	.product-window .joinBnt {
+		font-size: 30rpx;
+		width: 620rpx;
+		height: 86rpx;
+		border-radius: 50rpx;
+		text-align: center;
+		line-height: 86rpx;
+		color: #fff;
+		margin: 21rpx auto 0 auto;
+	}
+
+	.product-window .joinBnt.on {
+		background-color: #bbb;
+		color: #fff;
+	}
+</style>

+ 29 - 0
config/app.js

@@ -0,0 +1,29 @@
+// let domain = 'http://192.168.100.254:8024/front-api' // 内网IP
+// let domain = 'http://192.168.100.199:8081' // 晋守桦IP
+// let domain = 'http://192.168.100.14:8081' // 赵乔功IP
+// let domain = 'https://test.shuibeibyg.com/front-api' // 测试环境IP
+let domain = 'https://www.shuibeibyg.com/front-api' // 正式环境IP
+
+export const HTTP_REQUEST_URL = domain
+
+// PC 后台 API 地址(用于上传图片)
+export const HTTP_ADMIN_URL = domain
+
+// 请求头
+export const HEADER = {
+  'content-type': 'application/json'
+}
+
+// 表单提交头
+export const HEADERPARAMS = {
+  'content-type': 'application/x-www-form-urlencoded'
+}
+
+// token 名称
+export const TOKENNAME = 'Authori-zation'
+
+// 缓存时间,0 为永久
+export const EXPIRE = 0
+
+// 分页默认限制条数
+export const LIMIT = 10

+ 16 - 0
config/cache.js

@@ -0,0 +1,16 @@
+export const LOGIN_STATUS = "LOGIN_STATUS_TOKEN"
+export const UID = "UID"
+export const USER_INFO = "USER_INFO"
+export const EXPIRES_TIME = "EXPIRES_TIME"
+export const WX_AUTH = "WX_AUTH"
+export const STATE_KEY = "wx_authorize_state"
+export const LOGINTYPE = "loginType"
+export const BACK_URL = "login_back_url"
+export const STATE_R_KEY = "roution_authorize_state"
+export const LOGO_URL = "LOGO_URL"
+export const TIPS_KEY = "TIPS_KEY"
+export const SPREAD = "spread"
+export const CACHE_LONGITUDE = "LONGITUDE"
+export const CACHE_LATITUDE = "LATITUDE"
+export const PLATFORM = "systemPlatform"
+// export const SUBSCRIBE_MESSAGE = 'SUBSCRIBE_MESSAGE' // 如需启用可取消注释

+ 112 - 0
hooks/useToast.js

@@ -0,0 +1,112 @@
+import { ref } from "vue";
+
+	/**
+	 * opt  object | string
+	 * to_url object | string
+	 * 例:
+	 * this.Tips('/pages/test/test'); 跳转不提示
+	 * this.Tips({title:'提示'},'/pages/test/test'); 提示并跳转
+	 * this.Tips({title:'提示'},{tab:1,url:'/pages/index/index'}); 提示并跳转值table上
+	 * tab=1 一定时间后跳转至 table上
+	 * tab=2 一定时间后跳转至非 table上
+	 * tab=3 一定时间后返回上页面
+	 * tab=4 关闭所有页面跳转至非table上
+	 * tab=5 关闭当前页面跳转至table上
+	 */
+
+export function useToast() {
+  // 提示标题
+  const tipTitle = ref("");
+  // 提示图标
+  const tipIcon = ref("none");
+  // 提示持续时间
+  const tipEndtime = ref(2000);
+
+  /**
+   * Tips - 显示提示并可按需跳转页面
+   * @param {Object|string} opt 提示配置或直接为跳转路径
+   * @param {Object|string|Function} to_url 跳转配置、路径或回调
+   */
+  function Toast(opt, to_url) {
+    console.log("Toast", opt, to_url);
+    // 如果第一个参数是字符串,视为跳转路径
+    if (typeof opt == "string") {
+      to_url = opt;
+      opt = {};
+    }
+    // 提示内容
+    tipTitle.value = opt.title || "";
+    // 图标
+    tipIcon.value = opt.icon || "none";
+    // 持续时间
+    tipEndtime.value = opt.endtime || 1000;
+    // 接口调用成功的回调函数
+    let success = opt.success;
+    // 显示提示
+    if (tipTitle.value)
+      uni.showToast({
+        title: tipTitle.value,
+        icon: tipIcon.value,
+        duration: tipEndtime.value,
+        success,
+      });
+    // 跳转逻辑
+    if (to_url != undefined) {
+      if (typeof to_url == "object") {
+        // 对象方式配置跳转
+        let tab = to_url.tab || 1,
+          url = to_url.url || "";
+        console.log('tab', tab)
+        switch (tab) {
+          case 1:
+            // 一定时间后跳转至 table
+            setTimeout(() => uni.switchTab({ url }), tipEndtime.value);
+            break;
+          case 2:
+            // 跳转至非table页面
+            setTimeout(() => uni.navigateTo({ url }), tipEndtime.value);
+            break;
+          case 3:
+            // 返回上一个页面
+            setTimeout(() => {
+
+              // #ifndef H5
+              uni.navigateBack({ delta: 1 });
+              // #endif
+
+              // #ifdef H5
+              history.back();
+              // #endif
+
+            }, tipEndtime.value);
+            break;
+          case 4:
+            // 关闭所有页面跳转到非 tab 页面
+            setTimeout(() => uni.reLaunch({ url }), tipEndtime.value);
+            break;
+          case 5:
+            // 关闭当前页面跳转到非 tab 页面
+            setTimeout(() => uni.redirectTo({ url }), tipEndtime.value);
+            break;
+        }
+      } else if (typeof to_url == "function") {
+        // 回调函数
+        setTimeout(() => to_url && to_url(), tipEndtime.value);
+      } else {
+        // 普通路径跳转
+        setTimeout(
+          () => uni.navigateTo({ url: to_url }),
+          tipTitle.value ? tipEndtime.value : 0
+        );
+      }
+    }
+  }
+
+  // 导出响应式数据和方法
+  return {
+    tipTitle,
+    tipIcon,
+    tipEndtime,
+    Toast
+  };
+}

+ 21 - 0
index.html

@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+  <head>
+    <meta charset="UTF-8" />
+    <script>
+      var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') ||
+        CSS.supports('top: constant(a)'))
+      document.write(
+        '<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' +
+        (coverSupport ? ', viewport-fit=cover' : '') + '" />')
+    </script>
+	
+    <title></title>
+    <!--preload-links-->
+    <!--app-context-->
+  </head>
+  <body>
+    <div id="app"><!--app-html--></div>
+    <script type="module" src="/main.js"></script>
+  </body>
+</html>

+ 46 - 0
libs/order.js

@@ -0,0 +1,46 @@
+import {
+	preOrderApi
+} from '@/api/order.js';
+import util from '@/utils/util'
+import { useToast } from '@/hooks/useToast'
+
+/**
+ * 去商品详情
+ */
+export function goShopDetail(item, uid) {
+	return new Promise(resolve => {
+		if (item.activityH5 && item.activityH5.type === "1") {
+			uni.navigateTo({
+				url: `/pages/activity/goods_seckill_details/index?id=${item.activityH5.id}`
+			})
+		} else if (item.activityH5 && item.activityH5.type === "2") {
+			uni.navigateTo({
+				url: `/pages/activity/goods_bargain_details/index?id=${item.activityH5.id}&startBargainUid=${uid}`
+			})
+		} else if (item.activityH5 && item.activityH5.type === "3") {
+			uni.navigateTo({
+				url: `/pages/activity/goods_combination_details/index?id=${item.activityH5.id}`
+			})
+		} else {
+			resolve(item);
+		}
+	});
+}
+
+/**
+ * 活动商品、普通商品、购物车、再次购买预下单
+ */
+export function getPreOrder(data) {
+  const { Toast } = useToast()
+	return new Promise((resolve, reject) => {
+		preOrderApi(data).then(res => {
+			uni.navigateTo({
+				url: '/pages/users/order_confirm/index?preOrderNo=' + res.data.preOrderNo
+			});
+		}).catch(err => {
+			return Toast({
+				title: err.message
+			});
+		})
+	});
+}

+ 322 - 0
libs/wechat.js

@@ -0,0 +1,322 @@
+// #ifdef H5
+import WechatJSSDK from 'weixin-js-sdk'
+
+// import {
+// 	getWechatConfig,
+// 	wechatAuth
+// } from "@/api/public";
+import {
+	WX_AUTH,
+	STATE_KEY,
+	LOGINTYPE,
+	BACK_URL
+} from '@/config/cache';
+// import {
+// 	parseQuery
+// } from '@/utils';
+// import { useAppStore } from '@/stores/app.js';
+import Cache from '@/utils/cache';
+
+class AuthWechat {
+
+	constructor() {
+		//微信实例化对象
+		this.instance = WechatJSSDK;
+		//是否实例化
+		this.status = false;
+
+		this.initConfig = {};
+
+	}
+	
+	isAndroid(){
+		let u = navigator.userAgent;
+		return u.indexOf('Android') > -1 || u.indexOf('Adr') > -1;
+	}
+	
+	signLink() {
+		if (typeof window.entryUrl === 'undefined' || window.entryUrl === '') {
+			window.entryUrl = location.href.split('#')[0]
+		}
+		return  /(Android)/i.test(navigator.userAgent) ? location.href.split('#')[0] : window.entryUrl;
+	}
+
+
+	/**
+	 * 初始化wechat(分享配置)
+	 */
+	wechat() {
+		return new Promise((resolve, reject) => {
+			// if (this.status && !this.isAndroid()) return resolve(this.instance);
+			// getWechatConfig()
+			// 	.then(res => {
+			// 		this.instance.config(res.data);
+			// 		this.initConfig = res.data;
+			// 		this.status = true;
+			// 		this.instance.ready(() => {
+			// 			resolve(this.instance);
+			// 		})
+			// 	}).catch(err => {
+			// 		console.log('微信分享配置失败',err);
+			// 		this.status = false;
+			// 		reject(err);
+			// 	});
+		});
+	}
+
+	/**
+	 * 验证是否初始化
+	 */
+	verifyInstance() {
+		let that = this;
+		return new Promise((resolve, reject) => {
+			if (that.instance === null && !that.status) {
+				that.wechat().then(res => {
+					resolve(that.instance);
+				}).catch(() => {
+					return reject();
+				})
+			} else {
+				return resolve(that.instance);
+			}
+		})
+	}
+	// 微信公众号的共享地址
+	openAddress() {
+		return new Promise((resolve, reject) => {
+			this.wechat().then(wx => {
+				this.toPromise(wx.openAddress).then(res => {
+					resolve(res);
+				}).catch(err => {
+					reject(err);
+				});
+			}).catch(err => {
+				reject(err);
+			})
+		});
+	}
+
+    // 获取经纬度;
+	location(){
+		return new Promise((resolve, reject) => {
+			this.wechat().then(wx => {
+				this.toPromise(wx.getLocation,{type: 'wgs84'}).then(res => {
+					resolve(res);
+				}).catch(err => {
+					reject(err);
+				});
+			}).catch(err => {
+				reject(err);
+			})
+		});
+	} 
+	
+	// 使用微信内置地图查看位置接口;
+	seeLocation(config){
+		return new Promise((resolve, reject) => {
+			this.wechat().then(wx => {
+				this.toPromise(wx.openLocation, config).then(res => {
+					resolve(res);
+				}).catch(err => {
+					reject(err);
+				});
+			}).catch(err => {
+				reject(err);
+			})
+		});
+	}
+	
+	/**
+	 * 微信支付
+	 * @param {Object} config
+	 */
+	pay(config) {
+		return new Promise((resolve, reject) => {
+			this.wechat().then((wx) => {
+				this.toPromise(wx.chooseWXPay, config).then(res => {
+					resolve(res);
+				}).catch(res => {
+					resolve(res);
+				});
+			}).catch(res => {
+				reject(res);
+			});
+		});
+	}
+	
+	toPromise(fn, config = {}) {
+		return new Promise((resolve, reject) => {
+			fn({
+				...config,
+				success(res) {
+					resolve(res);
+				},
+				fail(err) {
+					reject(err);
+				},
+				complete(err) {
+					reject(err);
+				},
+				cancel(err) {
+					reject(err);
+				}
+			});
+		});
+	}
+
+	/**
+	 * 自动去授权
+	 */
+	oAuth(snsapiBase,url) {
+		// const TOKEN = useAppStore.tokenComputed
+		if (uni.getStorageSync(WX_AUTH) && TOKEN && snsapiBase == 'snsapi_base') return;
+		// const {
+		// 	code
+		// } = parseQuery();
+		// if (!code || code == uni.getStorageSync('snsapiCode')){
+		// 	return this.toAuth(snsapiBase,url);
+		// }else{
+		// 	if(Cache.has('snsapiKey'))
+		// 		return this.auth(code).catch(error=>{
+		// 			uni.showToast({
+		// 				title:error,
+		// 				icon:'none'
+		// 			})
+		// 		})
+		// }
+		// if (uni.getStorageSync(WX_AUTH) && store.state.app.token) return;
+		// const {
+		// 	code
+		// } = parseQuery();
+		// if (!code){
+		// 	return this.toAuth(snsapiBase,url);
+		// }else{
+		// 	if(Cache.has('snsapiKey'))
+		// 		return this.auth(code).catch(error=>{
+		// 			uni.showToast({
+		// 				title:error,
+		// 				icon:'none'
+		// 			})
+		// 		})
+		// }
+	}
+
+	clearAuthStatus() {
+
+	}
+
+	/**
+	 * 授权登录获取token
+	 * @param {Object} code
+	 */
+	auth(code) {
+		return new Promise((resolve, reject) => {
+			// wechatAuth(code, Cache.get("spread"))
+			// 	.then(({
+			// 		data
+			// 	}) => {
+			// 		resolve(data);
+			// 		Cache.set(WX_AUTH, code);
+			// 		Cache.clear(STATE_KEY);
+			// 		// Cache.clear('spread');
+			// 		loginType && Cache.clear(LOGINTYPE);
+					
+			// 	})
+			// 	.catch(reject);
+		});
+	}
+
+	/**
+	 * 获取跳转授权后的地址
+	 * @param {Object} appId
+	 */
+	getAuthUrl(appId,snsapiBase,backUrl) {
+		let url = `${location.origin}${backUrl}`
+				if(url.indexOf('?') == -1){
+							url = url+'?'
+						}else{
+							url = url+'&'
+						}
+				const redirect_uri = encodeURIComponent(
+					`${url}scope=${snsapiBase}&back_url=` +
+					encodeURIComponent(
+						encodeURIComponent(
+							uni.getStorageSync(BACK_URL) ?
+							uni.getStorageSync(BACK_URL) :
+							location.pathname + location.search
+						)
+					)
+				);
+				uni.removeStorageSync(BACK_URL);
+				const state = encodeURIComponent(
+					("" + Math.random()).split(".")[1] + "authorizestate"
+				);
+				uni.setStorageSync(STATE_KEY, state);
+				return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=${state}#wechat_redirect`;
+				// if(snsapiBase==='snsapi_base'){
+				// 	return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_base&state=${state}#wechat_redirect`;
+				// }else{
+				// 	return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=${state}#wechat_redirect`;
+				// }
+    }
+	
+	/**
+	 * 跳转自动登录
+	 */
+	toAuth(snsapiBase,backUrl) {
+		let that = this;
+		this.wechat().then(wx => {
+			location.href = this.getAuthUrl(that.initConfig.appId,snsapiBase,backUrl);
+		})
+	}
+
+	/**
+	 * 绑定事件
+	 * @param {Object} name 事件名
+	 * @param {Object} config 参数
+	 */
+	wechatEvevt(name, config) {
+		let that = this;
+		return new Promise((resolve, reject) => {
+			let configDefault = {
+				fail(res) {
+					if (that.instance) return reject({
+						is_ready: true,
+						wx: that.instance
+					});
+					that.verifyInstance().then(wx => {
+						return reject({
+							is_ready: true,
+							wx: wx
+						});
+					})
+				},
+				success(res) {
+					return resolve(res,2222);
+				}
+			};
+			Object.assign(configDefault, config);
+			that.wechat().then(wx => {
+				if (typeof name === 'object') {
+					name.forEach(item => {
+						wx[item] && wx[item](configDefault)
+					})
+				} else {
+					wx[name] && wx[name](configDefault)
+				}
+			})
+		});
+	}
+
+	isWeixin() {
+		return navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1;
+	}
+
+}
+
+export default new AuthWechat();
+// #endif
+
+// #ifndef H5
+export default {};
+// #endif

+ 45 - 0
main.js

@@ -0,0 +1,45 @@
+import App from './App'
+import uviewPlus, {
+	setConfig
+} from "@/uni_modules/uview-plus";
+// #ifndef VUE3
+import Vue from 'vue'
+import './uni.promisify.adaptor'
+
+Vue.config.productionTip = false
+App.mpType = 'app'
+const app = new Vue({
+	...App
+})
+app.config.compilerOptions.isCustomElement = tag =>
+	tag.startsWith('wx-open-launch-app')
+app.$mount()
+// #endif
+
+// #ifdef VUE3
+import {
+	createSSRApp
+} from 'vue'
+export function createApp() {
+	const app = createSSRApp(App)
+
+	app.use(uviewPlus, () => {
+		return {
+			options: {
+				// 修改$u.config对象的属性
+				config: {
+					// 修改默认单位为rpx,相当于执行 uni.$u.config.unit = 'rpx'
+					unit: "rpx",
+					// customIcon: {
+					// family: 'iconfont',
+					// url: '//at.alicdn.com/t/c/font_4946742_e8oa3t01rkk.css'
+					// }
+				},
+			},
+		};
+	});
+	return {
+		app
+	}
+}
+// #endif

+ 81 - 0
manifest.json

@@ -0,0 +1,81 @@
+{
+    "name" : "shuibei",
+    "appid" : "__UNI__5E9BE91",
+    "description" : "",
+    "versionName" : "1.0.0",
+    "versionCode" : "100",
+    "transformPx" : false,
+    /* 5+App特有相关 */
+    "app-plus" : {
+        "usingComponents" : true,
+        "nvueStyleCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : true,
+            "waiting" : true,
+            "autoclose" : true,
+            "delay" : 0
+        },
+        /* 模块配置 */
+        "modules" : {},
+        /* 应用发布信息 */
+        "distribute" : {
+            /* android打包配置 */
+            "android" : {
+                "permissions" : [
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ]
+            },
+            /* ios打包配置 */
+            "ios" : {
+                "dSYMs" : false
+            },
+            /* SDK配置 */
+            "sdkConfigs" : {}
+        }
+    },
+    /* 快应用特有相关 */
+    "quickapp" : {},
+    /* 小程序特有相关 */
+    "mp-weixin" : {
+        "appid" : "",
+        "setting" : {
+            "urlCheck" : false
+        },
+        "usingComponents" : true
+    },
+    "mp-alipay" : {
+        "usingComponents" : true
+    },
+    "mp-baidu" : {
+        "usingComponents" : true
+    },
+    "mp-toutiao" : {
+        "usingComponents" : true
+    },
+    "uniStatistics" : {
+        "enable" : false
+    },
+    "vueVersion" : "3",
+    "h5" : {
+        "router" : {
+            "base" : "./",
+            "mode" : "hash"
+        },
+        "title" : ""
+    }
+}

+ 16 - 0
node_modules/.bin/acorn

@@ -0,0 +1,16 @@
+#!/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 [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../acorn/bin/acorn" "$@"
+else 
+  exec node  "$basedir/../acorn/bin/acorn" "$@"
+fi

+ 17 - 0
node_modules/.bin/acorn.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\acorn\bin\acorn" %*

+ 28 - 0
node_modules/.bin/acorn.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+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"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../acorn/bin/acorn" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../acorn/bin/acorn" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../acorn/bin/acorn" $args
+  } else {
+    & "node$exe"  "$basedir/../acorn/bin/acorn" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 16 - 0
node_modules/.bin/browserslist

@@ -0,0 +1,16 @@
+#!/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 [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../browserslist/cli.js" "$@"
+else 
+  exec node  "$basedir/../browserslist/cli.js" "$@"
+fi

+ 17 - 0
node_modules/.bin/browserslist.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\browserslist\cli.js" %*

+ 28 - 0
node_modules/.bin/browserslist.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+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"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../browserslist/cli.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../browserslist/cli.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../browserslist/cli.js" $args
+  } else {
+    & "node$exe"  "$basedir/../browserslist/cli.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 16 - 0
node_modules/.bin/detect-libc

@@ -0,0 +1,16 @@
+#!/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 [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../detect-libc/bin/detect-libc.js" "$@"
+else 
+  exec node  "$basedir/../detect-libc/bin/detect-libc.js" "$@"
+fi

+ 17 - 0
node_modules/.bin/detect-libc.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\detect-libc\bin\detect-libc.js" %*

+ 28 - 0
node_modules/.bin/detect-libc.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+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"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../detect-libc/bin/detect-libc.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../detect-libc/bin/detect-libc.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../detect-libc/bin/detect-libc.js" $args
+  } else {
+    & "node$exe"  "$basedir/../detect-libc/bin/detect-libc.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 16 - 0
node_modules/.bin/json5

@@ -0,0 +1,16 @@
+#!/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 [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../json5/lib/cli.js" "$@"
+else 
+  exec node  "$basedir/../json5/lib/cli.js" "$@"
+fi

+ 17 - 0
node_modules/.bin/json5.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\json5\lib\cli.js" %*

+ 28 - 0
node_modules/.bin/json5.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+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"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../json5/lib/cli.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../json5/lib/cli.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../json5/lib/cli.js" $args
+  } else {
+    & "node$exe"  "$basedir/../json5/lib/cli.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 16 - 0
node_modules/.bin/sass

@@ -0,0 +1,16 @@
+#!/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 [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../sass/sass.js" "$@"
+else 
+  exec node  "$basedir/../sass/sass.js" "$@"
+fi

+ 17 - 0
node_modules/.bin/sass.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\sass\sass.js" %*

+ 28 - 0
node_modules/.bin/sass.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+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"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../sass/sass.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../sass/sass.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../sass/sass.js" $args
+  } else {
+    & "node$exe"  "$basedir/../sass/sass.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 16 - 0
node_modules/.bin/semver

@@ -0,0 +1,16 @@
+#!/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 [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../semver/bin/semver.js" "$@"
+else 
+  exec node  "$basedir/../semver/bin/semver.js" "$@"
+fi

+ 17 - 0
node_modules/.bin/semver.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\semver\bin\semver.js" %*

+ 28 - 0
node_modules/.bin/semver.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+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"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../semver/bin/semver.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../semver/bin/semver.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../semver/bin/semver.js" $args
+  } else {
+    & "node$exe"  "$basedir/../semver/bin/semver.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 16 - 0
node_modules/.bin/terser

@@ -0,0 +1,16 @@
+#!/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 [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../terser/bin/terser" "$@"
+else 
+  exec node  "$basedir/../terser/bin/terser" "$@"
+fi

+ 17 - 0
node_modules/.bin/terser.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\terser\bin\terser" %*

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

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+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"
+}
+$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
+}
+exit $ret

+ 16 - 0
node_modules/.bin/update-browserslist-db

@@ -0,0 +1,16 @@
+#!/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 [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../update-browserslist-db/cli.js" "$@"
+else 
+  exec node  "$basedir/../update-browserslist-db/cli.js" "$@"
+fi

+ 17 - 0
node_modules/.bin/update-browserslist-db.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\update-browserslist-db\cli.js" %*

+ 28 - 0
node_modules/.bin/update-browserslist-db.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+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"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../update-browserslist-db/cli.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../update-browserslist-db/cli.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../update-browserslist-db/cli.js" $args
+  } else {
+    & "node$exe"  "$basedir/../update-browserslist-db/cli.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

+ 16 - 0
node_modules/.bin/webpack

@@ -0,0 +1,16 @@
+#!/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 [ -x "$basedir/node" ]; then
+  exec "$basedir/node"  "$basedir/../webpack/bin/webpack.js" "$@"
+else 
+  exec node  "$basedir/../webpack/bin/webpack.js" "$@"
+fi

+ 17 - 0
node_modules/.bin/webpack.cmd

@@ -0,0 +1,17 @@
+@ECHO off
+GOTO start
+:find_dp0
+SET dp0=%~dp0
+EXIT /b
+:start
+SETLOCAL
+CALL :find_dp0
+
+IF EXIST "%dp0%\node.exe" (
+  SET "_prog=%dp0%\node.exe"
+) ELSE (
+  SET "_prog=node"
+  SET PATHEXT=%PATHEXT:;.JS;=;%
+)
+
+endLocal & goto #_undefined_# 2>NUL || title %COMSPEC% & "%_prog%"  "%dp0%\..\webpack\bin\webpack.js" %*

+ 28 - 0
node_modules/.bin/webpack.ps1

@@ -0,0 +1,28 @@
+#!/usr/bin/env pwsh
+$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
+
+$exe=""
+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"
+}
+$ret=0
+if (Test-Path "$basedir/node$exe") {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "$basedir/node$exe"  "$basedir/../webpack/bin/webpack.js" $args
+  } else {
+    & "$basedir/node$exe"  "$basedir/../webpack/bin/webpack.js" $args
+  }
+  $ret=$LASTEXITCODE
+} else {
+  # Support pipeline input
+  if ($MyInvocation.ExpectingInput) {
+    $input | & "node$exe"  "$basedir/../webpack/bin/webpack.js" $args
+  } else {
+    & "node$exe"  "$basedir/../webpack/bin/webpack.js" $args
+  }
+  $ret=$LASTEXITCODE
+}
+exit $ret

File diff suppressed because it is too large
+ 1620 - 0
node_modules/.package-lock.json


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


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

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

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


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

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

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

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

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

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

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

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

+ 67 - 0
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/@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/@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/@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/@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/@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
+ 1 - 0
node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.cts.map


+ 89 - 0
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
+ 1 - 0
node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts.map


+ 33 - 0
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

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


+ 33 - 0
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

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


+ 13 - 0
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

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


+ 13 - 0
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

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


+ 44 - 0
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

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


+ 44 - 0
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

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


+ 19 - 0
node_modules/@jridgewell/resolve-uri/LICENSE

@@ -0,0 +1,19 @@
+Copyright 2019 Justin Ridgewell <jridgewell@google.com>
+
+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.

+ 40 - 0
node_modules/@jridgewell/resolve-uri/README.md

@@ -0,0 +1,40 @@
+# @jridgewell/resolve-uri
+
+> Resolve a URI relative to an optional base URI
+
+Resolve any combination of absolute URIs, protocol-realtive URIs, absolute paths, or relative paths.
+
+## Installation
+
+```sh
+npm install @jridgewell/resolve-uri
+```
+
+## Usage
+
+```typescript
+function resolve(input: string, base?: string): string;
+```
+
+```js
+import resolve from '@jridgewell/resolve-uri';
+
+resolve('foo', 'https://example.com'); // => 'https://example.com/foo'
+```
+
+| Input                 | Base                    | Resolution                     | Explanation                                                  |
+|-----------------------|-------------------------|--------------------------------|--------------------------------------------------------------|
+| `https://example.com` | _any_                   | `https://example.com/`         | Input is normalized only                                     |
+| `//example.com`       | `https://base.com/`     | `https://example.com/`         | Input inherits the base's protocol                           |
+| `//example.com`       | _rest_                  | `//example.com/`               | Input is normalized only                                     |
+| `/example`            | `https://base.com/`     | `https://base.com/example`     | Input inherits the base's origin                             |
+| `/example`            | `//base.com/`           | `//base.com/example`           | Input inherits the base's host and remains protocol relative |
+| `/example`            | _rest_                  | `/example`                     | Input is normalized only                                     |
+| `example`             | `https://base.com/dir/` | `https://base.com/dir/example` | Input is joined with the base                                |
+| `example`             | `https://base.com/file` | `https://base.com/example`     | Input is joined with the base without its file               |
+| `example`             | `//base.com/dir/`       | `//base.com/dir/example`       | Input is joined with the base's last directory               |
+| `example`             | `//base.com/file`       | `//base.com/example`           | Input is joined with the base without its file               |
+| `example`             | `/base/dir/`            | `/base/dir/example`            | Input is joined with the base's last directory               |
+| `example`             | `/base/file`            | `/base/example`                | Input is joined with the base without its file               |
+| `example`             | `base/dir/`             | `base/dir/example`             | Input is joined with the base's last directory               |
+| `example`             | `base/file`             | `base/example`                 | Input is joined with the base without its file               |

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

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

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


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

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

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


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

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

+ 69 - 0
node_modules/@jridgewell/resolve-uri/package.json

@@ -0,0 +1,69 @@
+{
+  "name": "@jridgewell/resolve-uri",
+  "version": "3.1.2",
+  "description": "Resolve a URI relative to an optional base URI",
+  "keywords": [
+    "resolve",
+    "uri",
+    "url",
+    "path"
+  ],
+  "author": "Justin Ridgewell <justin@ridgewell.name>",
+  "license": "MIT",
+  "repository": "https://github.com/jridgewell/resolve-uri",
+  "main": "dist/resolve-uri.umd.js",
+  "module": "dist/resolve-uri.mjs",
+  "types": "dist/types/resolve-uri.d.ts",
+  "exports": {
+    ".": [
+      {
+        "types": "./dist/types/resolve-uri.d.ts",
+        "browser": "./dist/resolve-uri.umd.js",
+        "require": "./dist/resolve-uri.umd.js",
+        "import": "./dist/resolve-uri.mjs"
+      },
+      "./dist/resolve-uri.umd.js"
+    ],
+    "./package.json": "./package.json"
+  },
+  "files": [
+    "dist"
+  ],
+  "engines": {
+    "node": ">=6.0.0"
+  },
+  "scripts": {
+    "prebuild": "rm -rf dist",
+    "build": "run-s -n build:*",
+    "build:rollup": "rollup -c rollup.config.js",
+    "build:ts": "tsc --project tsconfig.build.json",
+    "lint": "run-s -n lint:*",
+    "lint:prettier": "npm run test:lint:prettier -- --write",
+    "lint:ts": "npm run test:lint:ts -- --fix",
+    "pretest": "run-s build:rollup",
+    "test": "run-s -n test:lint test:only",
+    "test:debug": "mocha --inspect-brk",
+    "test:lint": "run-s -n test:lint:*",
+    "test:lint:prettier": "prettier --check '{src,test}/**/*.ts'",
+    "test:lint:ts": "eslint '{src,test}/**/*.ts'",
+    "test:only": "mocha",
+    "test:coverage": "c8 mocha",
+    "test:watch": "mocha --watch",
+    "prepublishOnly": "npm run preversion",
+    "preversion": "run-s test build"
+  },
+  "devDependencies": {
+    "@jridgewell/resolve-uri-latest": "npm:@jridgewell/resolve-uri@*",
+    "@rollup/plugin-typescript": "8.3.0",
+    "@typescript-eslint/eslint-plugin": "5.10.0",
+    "@typescript-eslint/parser": "5.10.0",
+    "c8": "7.11.0",
+    "eslint": "8.7.0",
+    "eslint-config-prettier": "8.3.0",
+    "mocha": "9.2.0",
+    "npm-run-all": "4.1.5",
+    "prettier": "2.5.1",
+    "rollup": "2.66.0",
+    "typescript": "4.5.5"
+  }
+}

+ 19 - 0
node_modules/@jridgewell/source-map/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.

+ 184 - 0
node_modules/@jridgewell/source-map/README.md

@@ -0,0 +1,184 @@
+# @jridgewell/source-map
+
+> Packages `@jridgewell/trace-mapping` and `@jridgewell/gen-mapping` into the familiar source-map API
+
+This isn't the full API, but it's the core functionality. This wraps
+[@jridgewell/trace-mapping][trace-mapping] and [@jridgewell/gen-mapping][gen-mapping]
+implementations.
+
+## Installation
+
+```sh
+npm install @jridgewell/source-map
+```
+
+## Usage
+
+TODO
+
+### SourceMapConsumer
+
+```typescript
+import { SourceMapConsumer } from '@jridgewell/source-map';
+const smc = new SourceMapConsumer({
+  version: 3,
+  names: ['foo'],
+  sources: ['input.js'],
+  mappings: 'AAAAA',
+});
+```
+
+#### SourceMapConsumer.fromSourceMap(mapGenerator[, mapUrl])
+
+Transforms a `SourceMapGenerator` into a `SourceMapConsumer`.
+
+```typescript
+const smg = new SourceMapGenerator();
+
+const smc = SourceMapConsumer.fromSourceMap(map);
+smc.originalPositionFor({ line: 1, column: 0 });
+```
+
+#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition)
+
+```typescript
+const smc = new SourceMapConsumer(map);
+smc.originalPositionFor({ line: 1, column: 0 });
+```
+
+#### SourceMapConsumer.prototype.mappings
+
+```typescript
+const smc = new SourceMapConsumer(map);
+smc.mappings; // AAAA
+```
+
+#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition)
+
+```typescript
+const smc = new SourceMapConsumer(map);
+smc.allGeneratedpositionsfor({ line: 1, column: 5, source: "baz.ts" });
+// [
+//   { line: 2, column: 8 }
+// ]
+```
+
+#### SourceMapConsumer.prototype.eachMapping(callback[, context[, order]])
+
+> This implementation currently does not support the "order" parameter.
+> This function can only iterate in Generated order.
+
+```typescript
+const smc = new SourceMapConsumer(map);
+smc.eachMapping((mapping) => {
+// { source: 'baz.ts',
+//   generatedLine: 4,
+//   generatedColumn: 5,
+//   originalLine: 4,
+//   originalColumn: 5,
+//   name: null }
+});
+```
+
+#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition)
+
+```typescript
+const smc = new SourceMapConsumer(map);
+smc.generatedPositionFor({ line: 1, column: 5, source: "baz.ts" });
+// { line: 2, column: 8 }
+```
+
+#### SourceMapConsumer.prototype.hasContentsOfAllSources()
+
+```typescript
+const smc = new SourceMapConsumer(map);
+smc.hasContentsOfAllSources();
+// true
+```
+
+#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing])
+
+```typescript
+const smc = new SourceMapConsumer(map);
+smc.generatedPositionFor("baz.ts");
+// "export default ..."
+```
+
+#### SourceMapConsumer.prototype.version
+
+Returns the source map's version
+
+### SourceMapGenerator
+
+```typescript
+import { SourceMapGenerator } from '@jridgewell/source-map';
+const smg = new SourceMapGenerator({
+  file: 'output.js',
+  sourceRoot: 'https://example.com/',
+});
+```
+
+#### SourceMapGenerator.fromSourceMap(map)
+
+Transform a `SourceMapConsumer` into a `SourceMapGenerator`.
+
+```typescript
+const smc = new SourceMapConsumer();
+const smg = SourceMapGenerator.fromSourceMap(smc);
+```
+
+#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]])
+
+> This method is not implemented yet
+
+#### SourceMapGenerator.prototype.addMapping(mapping)
+
+```typescript
+const smg = new SourceMapGenerator();
+smg.addMapping({
+  generated: { line: 1, column: 0 },
+  source: 'input.js',
+  original: { line: 1, column: 0 },
+  name: 'foo',
+});
+```
+
+#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent)
+
+```typescript
+const smg = new SourceMapGenerator();
+smg.setSourceContent('input.js', 'foobar');
+```
+
+#### SourceMapGenerator.prototype.toJSON()
+
+```typescript
+const smg = new SourceMapGenerator();
+smg.toJSON(); // { version: 3, names: [], sources: [], mappings: '' }
+```
+
+#### SourceMapGenerator.prototype.toString()
+
+```typescript
+const smg = new SourceMapGenerator();
+smg.toJSON(); // "{version:3,names:[],sources:[],mappings:''}"
+```
+
+#### SourceMapGenerator.prototype.toDecodedMap()
+
+```typescript
+const smg = new SourceMapGenerator();
+smg.toDecodedMap(); // { version: 3, names: [], sources: [], mappings: [] }
+```
+
+## Known differences with other implementations
+
+This implementation has some differences with `source-map` and `source-map-js`.
+
+- `SourceMapConsumer.prototype.eachMapping()`
+  - Does not support the `order` argument
+- `SourceMapGenerator.prototype.applySourceMap()`
+  - Not implemented
+
+[trace-mapping]: https://github.com/jridgewell/sourcemaps/tree/main/packages/trace-mapping/
+[gen-mapping]: https://github.com/jridgewell/sourcemaps/tree/main/packages/gen-mapping/

+ 101 - 0
node_modules/@jridgewell/source-map/dist/source-map.mjs

@@ -0,0 +1,101 @@
+// src/source-map.ts
+import {
+  AnyMap,
+  originalPositionFor,
+  generatedPositionFor,
+  allGeneratedPositionsFor,
+  eachMapping,
+  encodedMappings,
+  sourceContentFor
+} from "@jridgewell/trace-mapping";
+import {
+  GenMapping,
+  maybeAddMapping,
+  toDecodedMap,
+  toEncodedMap,
+  setSourceContent,
+  fromMap
+} from "@jridgewell/gen-mapping";
+var SourceMapConsumer = class _SourceMapConsumer {
+  constructor(map, mapUrl) {
+    const trace = this._map = new AnyMap(map, mapUrl);
+    this.file = trace.file;
+    this.names = trace.names;
+    this.sourceRoot = trace.sourceRoot;
+    this.sources = trace.resolvedSources;
+    this.sourcesContent = trace.sourcesContent;
+    this.version = trace.version;
+  }
+  static fromSourceMap(map, mapUrl) {
+    if (map.toDecodedMap) {
+      return new _SourceMapConsumer(map.toDecodedMap(), mapUrl);
+    }
+    return new _SourceMapConsumer(map.toJSON(), mapUrl);
+  }
+  get mappings() {
+    return encodedMappings(this._map);
+  }
+  originalPositionFor(needle) {
+    return originalPositionFor(this._map, needle);
+  }
+  generatedPositionFor(originalPosition) {
+    return generatedPositionFor(this._map, originalPosition);
+  }
+  allGeneratedPositionsFor(originalPosition) {
+    return allGeneratedPositionsFor(this._map, originalPosition);
+  }
+  hasContentsOfAllSources() {
+    if (!this.sourcesContent || this.sourcesContent.length !== this.sources.length) {
+      return false;
+    }
+    for (const content of this.sourcesContent) {
+      if (content == null) {
+        return false;
+      }
+    }
+    return true;
+  }
+  sourceContentFor(source, nullOnMissing) {
+    const sourceContent = sourceContentFor(this._map, source);
+    if (sourceContent != null) {
+      return sourceContent;
+    }
+    if (nullOnMissing) {
+      return null;
+    }
+    throw new Error(`"${source}" is not in the SourceMap.`);
+  }
+  eachMapping(callback, context) {
+    eachMapping(this._map, context ? callback.bind(context) : callback);
+  }
+  destroy() {
+  }
+};
+var SourceMapGenerator = class _SourceMapGenerator {
+  constructor(opts) {
+    this._map = opts instanceof GenMapping ? opts : new GenMapping(opts);
+  }
+  static fromSourceMap(consumer) {
+    return new _SourceMapGenerator(fromMap(consumer));
+  }
+  addMapping(mapping) {
+    maybeAddMapping(this._map, mapping);
+  }
+  setSourceContent(source, content) {
+    setSourceContent(this._map, source, content);
+  }
+  toJSON() {
+    return toEncodedMap(this._map);
+  }
+  toString() {
+    return JSON.stringify(this.toJSON());
+  }
+  toDecodedMap() {
+    return toDecodedMap(this._map);
+  }
+};
+export {
+  SourceMapConsumer,
+  SourceMapGenerator
+};
+//# sourceMappingURL=source-map.mjs.map

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


+ 152 - 0
node_modules/@jridgewell/source-map/dist/source-map.umd.js

@@ -0,0 +1,152 @@
+(function (global, factory) {
+  if (typeof exports === 'object' && typeof module !== 'undefined') {
+    factory(module, require('@jridgewell/gen-mapping'), require('@jridgewell/trace-mapping'));
+    module.exports = def(module);
+  } else if (typeof define === 'function' && define.amd) {
+    define(['module', '@jridgewell/gen-mapping', '@jridgewell/trace-mapping'], function(mod) {
+      factory.apply(this, arguments);
+      mod.exports = def(mod);
+    });
+  } else {
+    const mod = { exports: {} };
+    factory(mod, global.genMapping, global.traceMapping);
+    global = typeof globalThis !== 'undefined' ? globalThis : global || self;
+    global.sourceMap = def(mod);
+  }
+  function def(m) { return 'default' in m.exports ? m.exports.default : m.exports; }
+})(this, (function (module, require_genMapping, require_traceMapping) {
+"use strict";
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __commonJS = (cb, mod) => function __require() {
+  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
+};
+var __export = (target, all) => {
+  for (var name in all)
+    __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+  if (from && typeof from === "object" || typeof from === "function") {
+    for (let key of __getOwnPropNames(from))
+      if (!__hasOwnProp.call(to, key) && key !== except)
+        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+  }
+  return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
+  // If the importer is in node compatibility mode or this is not an ESM
+  // file that has been converted to a CommonJS file using a Babel-
+  // compatible transform (i.e. "__esModule" has not been set), then set
+  // "default" to the CommonJS "module.exports" for node compatibility.
+  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
+  mod
+));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// umd:@jridgewell/trace-mapping
+var require_trace_mapping = __commonJS({
+  "umd:@jridgewell/trace-mapping"(exports, module2) {
+    module2.exports = require_traceMapping;
+  }
+});
+
+// umd:@jridgewell/gen-mapping
+var require_gen_mapping = __commonJS({
+  "umd:@jridgewell/gen-mapping"(exports, module2) {
+    module2.exports = require_genMapping;
+  }
+});
+
+// src/source-map.ts
+var source_map_exports = {};
+__export(source_map_exports, {
+  SourceMapConsumer: () => SourceMapConsumer,
+  SourceMapGenerator: () => SourceMapGenerator
+});
+module.exports = __toCommonJS(source_map_exports);
+var import_trace_mapping = __toESM(require_trace_mapping());
+var import_gen_mapping = __toESM(require_gen_mapping());
+var SourceMapConsumer = class _SourceMapConsumer {
+  constructor(map, mapUrl) {
+    const trace = this._map = new import_trace_mapping.AnyMap(map, mapUrl);
+    this.file = trace.file;
+    this.names = trace.names;
+    this.sourceRoot = trace.sourceRoot;
+    this.sources = trace.resolvedSources;
+    this.sourcesContent = trace.sourcesContent;
+    this.version = trace.version;
+  }
+  static fromSourceMap(map, mapUrl) {
+    if (map.toDecodedMap) {
+      return new _SourceMapConsumer(map.toDecodedMap(), mapUrl);
+    }
+    return new _SourceMapConsumer(map.toJSON(), mapUrl);
+  }
+  get mappings() {
+    return (0, import_trace_mapping.encodedMappings)(this._map);
+  }
+  originalPositionFor(needle) {
+    return (0, import_trace_mapping.originalPositionFor)(this._map, needle);
+  }
+  generatedPositionFor(originalPosition) {
+    return (0, import_trace_mapping.generatedPositionFor)(this._map, originalPosition);
+  }
+  allGeneratedPositionsFor(originalPosition) {
+    return (0, import_trace_mapping.allGeneratedPositionsFor)(this._map, originalPosition);
+  }
+  hasContentsOfAllSources() {
+    if (!this.sourcesContent || this.sourcesContent.length !== this.sources.length) {
+      return false;
+    }
+    for (const content of this.sourcesContent) {
+      if (content == null) {
+        return false;
+      }
+    }
+    return true;
+  }
+  sourceContentFor(source, nullOnMissing) {
+    const sourceContent = (0, import_trace_mapping.sourceContentFor)(this._map, source);
+    if (sourceContent != null) {
+      return sourceContent;
+    }
+    if (nullOnMissing) {
+      return null;
+    }
+    throw new Error(`"${source}" is not in the SourceMap.`);
+  }
+  eachMapping(callback, context) {
+    (0, import_trace_mapping.eachMapping)(this._map, context ? callback.bind(context) : callback);
+  }
+  destroy() {
+  }
+};
+var SourceMapGenerator = class _SourceMapGenerator {
+  constructor(opts) {
+    this._map = opts instanceof import_gen_mapping.GenMapping ? opts : new import_gen_mapping.GenMapping(opts);
+  }
+  static fromSourceMap(consumer) {
+    return new _SourceMapGenerator((0, import_gen_mapping.fromMap)(consumer));
+  }
+  addMapping(mapping) {
+    (0, import_gen_mapping.maybeAddMapping)(this._map, mapping);
+  }
+  setSourceContent(source, content) {
+    (0, import_gen_mapping.setSourceContent)(this._map, source, content);
+  }
+  toJSON() {
+    return (0, import_gen_mapping.toEncodedMap)(this._map);
+  }
+  toString() {
+    return JSON.stringify(this.toJSON());
+  }
+  toDecodedMap() {
+    return (0, import_gen_mapping.toDecodedMap)(this._map);
+  }
+};
+}));
+//# sourceMappingURL=source-map.umd.js.map

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


+ 68 - 0
node_modules/@jridgewell/source-map/package.json

@@ -0,0 +1,68 @@
+{
+  "name": "@jridgewell/source-map",
+  "version": "0.3.11",
+  "description": "Packages @jridgewell/trace-mapping and @jridgewell/gen-mapping into the familiar source-map API",
+  "keywords": [
+    "sourcemap",
+    "source",
+    "map"
+  ],
+  "main": "dist/source-map.umd.js",
+  "module": "dist/source-map.mjs",
+  "types": "types/source-map.d.cts",
+  "files": [
+    "dist",
+    "src",
+    "types"
+  ],
+  "exports": {
+    ".": [
+      {
+        "import": {
+          "types": "./types/source-map.d.mts",
+          "default": "./dist/source-map.mjs"
+        },
+        "default": {
+          "types": "./types/source-map.d.cts",
+          "default": "./dist/source-map.umd.js"
+        }
+      },
+      "./dist/source-map.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 source-map.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/source-map",
+  "repository": {
+    "type": "git",
+    "url": "git+https://github.com/jridgewell/sourcemaps.git",
+    "directory": "packages/source-map"
+  },
+  "author": "Justin Ridgewell <justin@ridgewell.name>",
+  "license": "MIT",
+  "dependencies": {
+    "@jridgewell/gen-mapping": "^0.3.5",
+    "@jridgewell/trace-mapping": "^0.3.25"
+  }
+}

+ 159 - 0
node_modules/@jridgewell/source-map/src/source-map.ts

@@ -0,0 +1,159 @@
+import {
+  AnyMap,
+  originalPositionFor,
+  generatedPositionFor,
+  allGeneratedPositionsFor,
+  eachMapping,
+  encodedMappings,
+  sourceContentFor,
+} from '@jridgewell/trace-mapping';
+import {
+  GenMapping,
+  maybeAddMapping,
+  toDecodedMap,
+  toEncodedMap,
+  setSourceContent,
+  fromMap,
+} from '@jridgewell/gen-mapping';
+
+import type {
+  TraceMap,
+  SourceMapInput,
+  SectionedSourceMapInput,
+  DecodedSourceMap,
+} from '@jridgewell/trace-mapping';
+export type { TraceMap, SourceMapInput, SectionedSourceMapInput, DecodedSourceMap };
+
+import type { Mapping, EncodedSourceMap } from '@jridgewell/gen-mapping';
+export type { Mapping, EncodedSourceMap };
+
+export class SourceMapConsumer {
+  declare private _map: TraceMap;
+  declare file: TraceMap['file'];
+  declare names: TraceMap['names'];
+  declare sourceRoot: TraceMap['sourceRoot'];
+  declare sources: TraceMap['sources'];
+  declare sourcesContent: TraceMap['sourcesContent'];
+  declare version: TraceMap['version'];
+
+  constructor(
+    map: ConstructorParameters<typeof AnyMap>[0],
+    mapUrl?: ConstructorParameters<typeof AnyMap>[1],
+  ) {
+    const trace = (this._map = new AnyMap(map, mapUrl));
+
+    this.file = trace.file;
+    this.names = trace.names;
+    this.sourceRoot = trace.sourceRoot;
+    this.sources = trace.resolvedSources;
+    this.sourcesContent = trace.sourcesContent;
+    this.version = trace.version;
+  }
+
+  static fromSourceMap(map: SourceMapGenerator, mapUrl?: Parameters<typeof AnyMap>[1]) {
+    // This is more performant if we receive
+    // a @jridgewell/source-map SourceMapGenerator
+    if (map.toDecodedMap) {
+      return new SourceMapConsumer(map.toDecodedMap() as SectionedSourceMapInput, mapUrl);
+    }
+
+    // This is a fallback for `source-map` and `source-map-js`
+    return new SourceMapConsumer(map.toJSON() as SectionedSourceMapInput, mapUrl);
+  }
+
+  get mappings(): string {
+    return encodedMappings(this._map);
+  }
+
+  originalPositionFor(
+    needle: Parameters<typeof originalPositionFor>[1],
+  ): ReturnType<typeof originalPositionFor> {
+    return originalPositionFor(this._map, needle);
+  }
+
+  generatedPositionFor(
+    originalPosition: Parameters<typeof generatedPositionFor>[1],
+  ): ReturnType<typeof generatedPositionFor> {
+    return generatedPositionFor(this._map, originalPosition);
+  }
+
+  allGeneratedPositionsFor(
+    originalPosition: Parameters<typeof generatedPositionFor>[1],
+  ): ReturnType<typeof generatedPositionFor>[] {
+    return allGeneratedPositionsFor(this._map, originalPosition);
+  }
+
+  hasContentsOfAllSources(): boolean {
+    if (!this.sourcesContent || this.sourcesContent.length !== this.sources.length) {
+      return false;
+    }
+
+    for (const content of this.sourcesContent) {
+      if (content == null) {
+        return false;
+      }
+    }
+
+    return true;
+  }
+
+  sourceContentFor(source: string, nullOnMissing?: boolean): string | null {
+    const sourceContent = sourceContentFor(this._map, source);
+    if (sourceContent != null) {
+      return sourceContent;
+    }
+
+    if (nullOnMissing) {
+      return null;
+    }
+    throw new Error(`"${source}" is not in the SourceMap.`);
+  }
+
+  eachMapping(
+    callback: Parameters<typeof eachMapping>[1],
+    context?: any /*, order?: number*/,
+  ): void {
+    // order is ignored as @jridgewell/trace-map doesn't implement it
+    eachMapping(this._map, context ? callback.bind(context) : callback);
+  }
+
+  destroy() {
+    // noop.
+  }
+}
+
+export class SourceMapGenerator {
+  declare private _map: GenMapping;
+
+  constructor(opts: ConstructorParameters<typeof GenMapping>[0] | GenMapping) {
+    // TODO :: should this be duck-typed ?
+    this._map = opts instanceof GenMapping ? opts : new GenMapping(opts);
+  }
+
+  static fromSourceMap(consumer: SourceMapConsumer) {
+    return new SourceMapGenerator(fromMap(consumer));
+  }
+
+  addMapping(mapping: Parameters<typeof maybeAddMapping>[1]): ReturnType<typeof maybeAddMapping> {
+    maybeAddMapping(this._map, mapping);
+  }
+
+  setSourceContent(
+    source: Parameters<typeof setSourceContent>[1],
+    content: Parameters<typeof setSourceContent>[2],
+  ): ReturnType<typeof setSourceContent> {
+    setSourceContent(this._map, source, content);
+  }
+
+  toJSON(): ReturnType<typeof toEncodedMap> {
+    return toEncodedMap(this._map);
+  }
+
+  toString(): string {
+    return JSON.stringify(this.toJSON());
+  }
+
+  toDecodedMap(): ReturnType<typeof toDecodedMap> {
+    return toDecodedMap(this._map);
+  }
+}

+ 36 - 0
node_modules/@jridgewell/source-map/types/source-map.d.cts

@@ -0,0 +1,36 @@
+import { AnyMap, originalPositionFor, generatedPositionFor, eachMapping } from '@jridgewell/trace-mapping';
+import { GenMapping, maybeAddMapping, toDecodedMap, toEncodedMap, setSourceContent } from '@jridgewell/gen-mapping';
+import type { TraceMap, SourceMapInput, SectionedSourceMapInput, DecodedSourceMap } from '@jridgewell/trace-mapping';
+export type { TraceMap, SourceMapInput, SectionedSourceMapInput, DecodedSourceMap };
+import type { Mapping, EncodedSourceMap } from '@jridgewell/gen-mapping';
+export type { Mapping, EncodedSourceMap };
+export declare class SourceMapConsumer {
+    private _map;
+    file: TraceMap['file'];
+    names: TraceMap['names'];
+    sourceRoot: TraceMap['sourceRoot'];
+    sources: TraceMap['sources'];
+    sourcesContent: TraceMap['sourcesContent'];
+    version: TraceMap['version'];
+    constructor(map: ConstructorParameters<typeof AnyMap>[0], mapUrl?: ConstructorParameters<typeof AnyMap>[1]);
+    static fromSourceMap(map: SourceMapGenerator, mapUrl?: Parameters<typeof AnyMap>[1]): SourceMapConsumer;
+    get mappings(): string;
+    originalPositionFor(needle: Parameters<typeof originalPositionFor>[1]): ReturnType<typeof originalPositionFor>;
+    generatedPositionFor(originalPosition: Parameters<typeof generatedPositionFor>[1]): ReturnType<typeof generatedPositionFor>;
+    allGeneratedPositionsFor(originalPosition: Parameters<typeof generatedPositionFor>[1]): ReturnType<typeof generatedPositionFor>[];
+    hasContentsOfAllSources(): boolean;
+    sourceContentFor(source: string, nullOnMissing?: boolean): string | null;
+    eachMapping(callback: Parameters<typeof eachMapping>[1], context?: any): void;
+    destroy(): void;
+}
+export declare class SourceMapGenerator {
+    private _map;
+    constructor(opts: ConstructorParameters<typeof GenMapping>[0] | GenMapping);
+    static fromSourceMap(consumer: SourceMapConsumer): SourceMapGenerator;
+    addMapping(mapping: Parameters<typeof maybeAddMapping>[1]): ReturnType<typeof maybeAddMapping>;
+    setSourceContent(source: Parameters<typeof setSourceContent>[1], content: Parameters<typeof setSourceContent>[2]): ReturnType<typeof setSourceContent>;
+    toJSON(): ReturnType<typeof toEncodedMap>;
+    toString(): string;
+    toDecodedMap(): ReturnType<typeof toDecodedMap>;
+}
+//# sourceMappingURL=source-map.d.ts.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/@jridgewell/source-map/types/source-map.d.cts.map


+ 36 - 0
node_modules/@jridgewell/source-map/types/source-map.d.mts

@@ -0,0 +1,36 @@
+import { AnyMap, originalPositionFor, generatedPositionFor, eachMapping } from '@jridgewell/trace-mapping';
+import { GenMapping, maybeAddMapping, toDecodedMap, toEncodedMap, setSourceContent } from '@jridgewell/gen-mapping';
+import type { TraceMap, SourceMapInput, SectionedSourceMapInput, DecodedSourceMap } from '@jridgewell/trace-mapping';
+export type { TraceMap, SourceMapInput, SectionedSourceMapInput, DecodedSourceMap };
+import type { Mapping, EncodedSourceMap } from '@jridgewell/gen-mapping';
+export type { Mapping, EncodedSourceMap };
+export declare class SourceMapConsumer {
+    private _map;
+    file: TraceMap['file'];
+    names: TraceMap['names'];
+    sourceRoot: TraceMap['sourceRoot'];
+    sources: TraceMap['sources'];
+    sourcesContent: TraceMap['sourcesContent'];
+    version: TraceMap['version'];
+    constructor(map: ConstructorParameters<typeof AnyMap>[0], mapUrl?: ConstructorParameters<typeof AnyMap>[1]);
+    static fromSourceMap(map: SourceMapGenerator, mapUrl?: Parameters<typeof AnyMap>[1]): SourceMapConsumer;
+    get mappings(): string;
+    originalPositionFor(needle: Parameters<typeof originalPositionFor>[1]): ReturnType<typeof originalPositionFor>;
+    generatedPositionFor(originalPosition: Parameters<typeof generatedPositionFor>[1]): ReturnType<typeof generatedPositionFor>;
+    allGeneratedPositionsFor(originalPosition: Parameters<typeof generatedPositionFor>[1]): ReturnType<typeof generatedPositionFor>[];
+    hasContentsOfAllSources(): boolean;
+    sourceContentFor(source: string, nullOnMissing?: boolean): string | null;
+    eachMapping(callback: Parameters<typeof eachMapping>[1], context?: any): void;
+    destroy(): void;
+}
+export declare class SourceMapGenerator {
+    private _map;
+    constructor(opts: ConstructorParameters<typeof GenMapping>[0] | GenMapping);
+    static fromSourceMap(consumer: SourceMapConsumer): SourceMapGenerator;
+    addMapping(mapping: Parameters<typeof maybeAddMapping>[1]): ReturnType<typeof maybeAddMapping>;
+    setSourceContent(source: Parameters<typeof setSourceContent>[1], content: Parameters<typeof setSourceContent>[2]): ReturnType<typeof setSourceContent>;
+    toJSON(): ReturnType<typeof toEncodedMap>;
+    toString(): string;
+    toDecodedMap(): ReturnType<typeof toDecodedMap>;
+}
+//# sourceMappingURL=source-map.d.ts.map

File diff suppressed because it is too large
+ 1 - 0
node_modules/@jridgewell/source-map/types/source-map.d.mts.map


+ 19 - 0
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/@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/@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
+ 6 - 0
node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map


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


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