liutian 1 год назад
Родитель
Сommit
fd60560b05

+ 14 - 0
packages/core/constants/index.js

@@ -184,6 +184,19 @@ const TextFiledSpecialString = {
   1: 'date'
 }
 
+const AnnotationFlags = {
+  AnnotationFlagInvisible: 1, // 1
+  AnnotationFlagHidden: 1 << 1, // 10 2
+  AnnotationFlagPrint: 1 << 2, // 100 4
+  AnnotationFlagNoZoom: 1 << 3, // 1000 8
+  AnnotationFlagNoRotate: 1 << 4, // 10000 16
+  AnnotationFlagNoView: 1 << 5, // 100000 32
+  AnnotationFlagReadOnly: 1 << 6, // 1000000 64
+  AnnotationFlagLocked: 1 << 7, // 10000000 128
+  AnnotationFlagToggleNoView: 1 << 8, // 100000000 256
+  AnnotationFlagLockedContents: 1 << 9, // 1000000000 512
+};
+
 const LineType = {
   UNKNOWN: -1,
   NONE: 0,
@@ -644,6 +657,7 @@ export {
   AnnotationTypeString,
   WidgetType,
   WidgetTypeString,
+  AnnotationFlags,
   TextFiledSpecial,
   TextFiledSpecialString,
   LineType,

+ 4 - 1
packages/core/package.json

@@ -38,9 +38,12 @@
     "@rollup/plugin-commonjs": "^23.0.2",
     "@rollup/plugin-json": "^6.0.0",
     "@rollup/plugin-node-resolve": "^15.0.1",
+    "@typescript-eslint/parser": "^6.7.2",
     "cross-env": "^7.0.3",
     "rollup": "^3.2.3",
     "rollup-plugin-node-builtins": "^2.1.2",
-    "rollup-plugin-uglify": "^6.0.4"
+    "rollup-plugin-typescript2": "^0.35.0",
+    "rollup-plugin-uglify": "^6.0.4",
+    "typescript": "^5.2.2"
   }
 }

+ 3 - 1
packages/core/rollup.config.js

@@ -2,11 +2,13 @@ import nodeResolve from '@rollup/plugin-node-resolve'
 import commonjs from "@rollup/plugin-commonjs"
 import babel from '@rollup/plugin-babel'
 import { uglify } from 'rollup-plugin-uglify'
-import json from '@rollup/plugin-json';
+import json from '@rollup/plugin-json'
+import ts from "rollup-plugin-typescript2"
 
 const extensions = [".js", ".ts"]
 const plugins = [
   json(),
+  ts(),
   nodeResolve({
     preferBuiltins: true,
     mainFields: ['browser']

+ 0 - 1
packages/core/src/annotation/freetext.js

@@ -554,7 +554,6 @@ export default class Shape extends Base {
   updateTool () {
     if (!this.initial) return
     
-    // debugger
     if (this.hidden) {
       this.outerLineContainer.remove()
       if (this.layer.selectedElementName === this.annotation.name) {

+ 0 - 2
packages/core/src/annotation/link.js

@@ -48,7 +48,6 @@ export default class Link extends Base {
   }
 
   render () {
-    debugger
     this.eventBus._on('linkPropertyPanelChanged', this.handlePropertyPanel.bind(this))
     this.eventBus._on('setProperty', this.setProperty.bind(this))
 
@@ -754,7 +753,6 @@ export default class Link extends Base {
         }
       }
     }
-    debugger
 
     if (updatePropsNum > 0) {
       const annotationData = {

+ 1 - 1
packages/core/src/annotation/stamp.js

@@ -125,7 +125,7 @@ export default class Stamp extends Base {
         width: parseInt(rect.width + 1),
         height: parseInt(rect.height + 1)
       }
-      console.log(imgRect)
+
       const imageArray = await this.messageHandler.sendWithPromise('GetRenderAnnot', {
         annotPtr: this.annotation.annotPtr,
         annotation: this.annotation,

+ 2 - 1
packages/core/src/color.js

@@ -12,7 +12,8 @@ export default class Color {
     const r = this.R
     const g = this.G
     const b = this.B
-    return `#${((1 << 24) | (r << 16) | (g << 8) | b).toString(16).slice(1)}`;
+    const hexString = ((1 << 24) | (r << 16) | (g << 8) | b).toString(16).slice(1).toUpperCase()
+    return `#${hexString}`;
   }
 
   hexToRgb(hexColor) {

+ 4 - 20
packages/core/src/form/check_box.js

@@ -55,22 +55,6 @@ export default class CheckBox extends Base {
 
     const annotation = this.annotation
 
-    if (annotation.backgroundColor) {
-      if (typeof annotation.backgroundColor === 'string' && annotation.backgroundColor.startsWith("#")) {
-        annotation.backgroundColor = hexToRgb(annotation.backgroundColor)
-      }
-      const backgroundColor = annotation.backgroundColor
-      annotation.backgroundColor = new Color(backgroundColor.R,backgroundColor. G, backgroundColor.B).rgbToHex()
-      debugger
-    }
-    debugger
-    for (let key in annotation) {
-      if (key === 'flags') {
-        let newKey = 'isHidden'
-        annotation[newKey] = annotation[key].indexOf('noview') > -1 || annotation[key].indexOf('hidden') > -1 ? '1' : '0'
-        delete annotation[key]
-      }
-    }
     if (!annotation.fieldName) {
       annotation.fieldName = 'Check Box_' + annotation.createDate.toLocaleString()
     }
@@ -94,7 +78,7 @@ export default class CheckBox extends Base {
     annotationContainer.style.height = rect.height + 'px'
     this.annotationContainer = annotationContainer
     this.annotationContainer.addEventListener('mousedown', this.handleClick.bind(this))
-      debugger
+
     let borderElement
     borderElement = createElement(
       'div',
@@ -106,9 +90,9 @@ export default class CheckBox extends Base {
         justifyContent: 'center',
         width: `${Math.abs(rect.width)}px`,
         height: `${Math.abs(rect.height)}px`,
-        borderColor: '#43474D',
-        borderWidth: annotation.borderWidth + 'px',
-        borderStyle: 'solid',
+        borderColor: annotation.borderColor,
+        borderWidth: annotation.borderWidth | 1 + 'px',
+        borderStyle: annotation.borderStyle,
         backgroundColor: annotation.backgroundColor,
         position: 'relative'
       }

+ 222 - 134
packages/core/src/form/combo_box.js

@@ -52,66 +52,25 @@ export default class ComboBox extends Base {
     this.eventBus._on('comboBoxPropertyPanelChanged', this.handlePropertyPanel.bind(this))
     this.eventBus._on('setProperty', this.setProperty.bind(this))
     this.eventBus._on('changeSelectAvailable', this.changeSelectAvailable.bind(this))
-
-    for (let key in this.annotation) {
-      if (key === 'background-color') {
-        let newName = 'backgroundColor'
-        this.annotation[newName] = this.annotation[key]
-        delete this.annotation[key]
-      }
-      if (key === 'fieldname') {
-        let newKey = 'fieldName'
-        this.annotation[newKey] = this.annotation[key]
-        delete this.annotation[key]
-      }
-      if (key === 'opt') {
-        let newKey = 'options'
-        let options = []
-        if (Array.isArray(this.annotation[key])) {
-          for (const item of this.annotation[key]) {
-            options.push(item.value ?? item.key)
-          }
-        } else {
-          options.push(this.annotation[key].value)
-        }
-        this.annotation[newKey] = options
-        delete this.annotation[key]
-      }
-      if (!this.annotation['opt'] && !this.annotation['options']) {
-        this.annotation.options = []
-      }
-      if (key === 'options' && typeof this.annotation.options === 'string') {
-        this.annotation.options = this.annotation.options.split(',')
-      }
-      if (key === 'flags') {
-        let newKey = 'isHidden'
-        this.annotation[newKey] = this.annotation[key].indexOf('noview') > -1 || this.annotation[key].indexOf('hidden') > -1 ? '1' : '0'
-        delete this.annotation[key]
-      }
-      if (key === 'select' && !this.layer.annotationStore.notFirstRender) {
-        this.annotation[key] = (parseInt(this.annotation[key]) + 1).toString()
-      }
-      if (key === 'textStyle') {
-        const textStyle = this.annotation[key]
-        if (textStyle.fontColor) this.annotation.textColor = textStyle.fontColor
-        if (textStyle.fontSize) this.annotation.fontSize = parseInt(textStyle.fontSize).toString()
-        if (textStyle.fontName && textStyle.fontName.length > 0) {
-          const fontArr = [ 'Courier', 'Courier-Bold', 'Courier-BoldOblique', 'Courier-Oblique', 'Helvetica', 'Helvetica-Bold', 'Helvetica-BoldOblique', 'Helvetica-Oblique', 'Times-Roman', 'Times-Bold', 'Times-BoldItalic', 'Times-Italic' ]
-          this.annotation.fontName = 'Helvetica'
-          for (const item of fontArr) {
-            if (item.toLowerCase() === textStyle.fontName.toLowerCase()) {
-              this.annotation.fontName = item
-            }
-          }
-        } else {
-          this.annotation.fontName = 'Helvetica'
-        }
-      }
+    const annotation = this.annotation
+    if (!annotation.items) {
+      annotation.items = []
     }
-    if (!this.annotation['select']) {
-      this.annotation.select = '1'
+    if (!annotation.fontName) {
+      annotation.fontName = 'Helvetica'
+    }
+    if (!annotation.select) {
+      annotation.select = 0
+    }
+    if (annotation.isBold && annotation.isItalic) {
+      annotation.fontStyle = 'boldItalic'
+    } else if (annotation.isBold) {
+      annotation.fontStyle = 'bold'
+    } else if (annotation.isItalic) {
+      annotation.fontStyle = 'italic'
+    } else {
+      annotation.fontStyle = 'normal'
     }
-    const annotation = this.annotation
 
     const { start, end } = this.getActualRect(
       this.viewport,
@@ -121,7 +80,6 @@ export default class ComboBox extends Base {
     this.end = end
 
     const rect = this.calculate(start, end)
-    const actualbdwidth = (this.annotation.lineWidth || this.annotation.width || 2) * this.scale
     
     const annotationContainer = document.createElement('div')
     annotationContainer.id = annotation.name
@@ -140,7 +98,6 @@ export default class ComboBox extends Base {
         top: 0,
         width: `${Math.abs(rect.width)}px`,
         height: `${Math.abs(rect.height)}px`,
-        backgroundColor: annotation.backgroundColor,
         position: 'relative',
         overflow: 'hidden'
       }
@@ -154,17 +111,18 @@ export default class ComboBox extends Base {
         paddingLeft: '4px',
         width: `${Math.abs(rect.width)}px`,
         height: `${Math.abs(rect.height)}px`,
-        borderColor: '#43474D',
-        borderWidth: '1px',
-        borderStyle: 'solid',
-        borderRadius: '0',
+        borderColor: annotation.borderColor,
+        borderWidth: (annotation.borderWidth || 1) + 'px',
+        borderStyle: annotation.borderStyle || 'solid',
         cursor: 'pointer',
         webkitAppearance: 'none',
         appearance: 'none',
-        background: 'transparent',
+        backgroundColor: annotation.backgroundColor,
         fontSize: annotation.fontSize + 'px',
         fontFamily: annotation.fontName,
-        color: annotation.textColor,
+        color: annotation.color,
+        fontWeight: annotation.isBold ? 'bold' : 'normal',
+        fontStyle: annotation.isItalic ? 'italic' : 'normal',
         textOverflow: 'ellipsis',
         whiteSpace: 'nowrap'
       }
@@ -212,12 +170,12 @@ export default class ComboBox extends Base {
     this.container.append(this.annotationContainer)
 
     // 添加选项
-    if (annotation.options && annotation.options.length > 0) {
-      for (var i = 0; i < annotation.options.length; i++) {
+    if (annotation.items && annotation.items.length > 0) {
+      for (var i = 0; i < annotation.items.length; i++) {
         const optionElement = createElement('option')
-        optionElement.value = annotation.options[i]
-        optionElement.innerHTML = annotation.options[i]
-        if (this.annotation.select - 1 === i) {
+        optionElement.value = annotation.items[i].Value
+        optionElement.innerHTML = annotation.items[i].Value
+        if (annotation.selected === i) {
           optionElement.selected = true
         }
         this.selectElement.appendChild(optionElement)
@@ -411,10 +369,10 @@ export default class ComboBox extends Base {
     this.initial = true
 
     if (this.layer.toolMode !== 'form') {
-      if (this.annotation['isHidden'] === '1') {
+      if (this.annotation.isHidden === 1) {
         this.annotationContainer.style.display = 'none'
         this.annotationContainer.style.pointerEvents = 'none'
-      } else if (this.annotation['isHidden'] === '0') {
+      } else if (this.annotation.isHidden === 0) {
         this.annotationContainer.style.display = 'block'
         this.annotationContainer.style.pointerEvents = 'auto'
       }
@@ -461,13 +419,13 @@ export default class ComboBox extends Base {
 
   calculate (start, end) {
     const initRect = this.rectCalc({ start, end });
-    const actualbdwidth = (this.annotation.width || this.annotation.lineWidth || 2) * this.scale
+    const actualBdWidth = (this.annotation.borderWidth || 1) * this.scale
 
     return {
-      top: initRect.top - actualbdwidth,
-      left: initRect.left - actualbdwidth,
-      width: initRect.width + actualbdwidth * 2,
-      height: initRect.height + actualbdwidth * 2,
+      top: initRect.top - actualBdWidth,
+      left: initRect.left - actualBdWidth,
+      width: initRect.width + actualBdWidth * 2,
+      height: initRect.height + actualBdWidth * 2,
     }
   }
 
@@ -779,8 +737,6 @@ export default class ComboBox extends Base {
     this.newStart = start
     this.newEnd = end
 
-    const actualbdwidth = (this.annotation.lineWidth || this.annotation.width || 2) * this.scale
-
     this.annotationContainer.style.top = rect.top + 'px'
     this.annotationContainer.style.left = rect.left + 'px'
     this.annotationContainer.style.width = rect.width + 'px'
@@ -833,73 +789,170 @@ export default class ComboBox extends Base {
   }
 
   handlePropertyPanel (props) {
-    if (this.layer.annotationStore.selectedElementName !== this.annotation.name) return
+    const annotation = this.annotation
+    if (this.layer.annotationStore.selectedElementName !== annotation.name) return
 
     let updatePropsNum = 0
     for (const key in props) {
-      for (const item in this.annotation) {
-        if (item === key && key === 'options' && JSON.stringify(this.annotation[item]) !== JSON.stringify(props[key])) {
-          if (typeof props[key] === 'string') {
-            props[key] = props[key].split(',')
-          } else {
-            props[key] = Array.from(props[key])
-          }
-          this.annotation[item] = props[key]
+      for (const item in annotation) {
+        if (item === key && annotation[item] !== props[key]) {
           updatePropsNum ++
 
-          this.selectElement.innerHTML = ''
-          for (var i = 0; i < this.annotation.options.length; i++) {
-            const optionElement = createElement('option')
-            optionElement.value = this.annotation.options[i]
-            optionElement.innerHTML = this.annotation.options[i]
-            if (this.annotation.select - 1 === i) {
-              optionElement.selected = true
-            }
-            this.selectElement.appendChild(optionElement)
-          }
-        }
-
-        if (item === key && this.annotation[item] !== props[key] && key !== 'options') {
-          this.annotation[item] = props[key]
-          updatePropsNum ++
+          annotation[item] = props[key]
 
           if (key === 'backgroundColor') {
-            this.borderElement.style[key] = props[key]
             if (props[key] === '') {
               props.clearBackgroundColor = true
             }
+            this.selectElement.style[key] = props[key]
           }
           if (key === 'fontSize') {
             this.selectElement.style.fontSize = props[key] + 'px'
           }
-          if (key === 'textColor') {
+          if (key === 'color') {
             this.selectElement.style.color = props[key]
           }
           if (key === 'fontName') {
             this.selectElement.style.fontFamily = props[key]
           }
+          if (key === 'fontStyle') {
+            const fontStyle = props[key]
+            if (fontStyle === 'boldItalic') {
+              this.selectElement.style.fontStyle = 'italic'
+              this.selectElement.style.fontWeight = 'bold'
+              annotation.isBold = true
+              annotation.isItalic = true
+            } else if (fontStyle === 'bold') {
+              this.selectElement.style.fontWeight = 'bold'
+              annotation.isBold = true
+              annotation.isItalic = false
+            } else if (fontStyle === 'italic') {
+              this.selectElement.style.fontStyle = 'italic'
+              annotation.isBold = false
+              annotation.isItalic = true
+            } else {
+              annotation.isItalic = false
+              annotation.isBold = false
+              this.selectElement.style.fontStyle = 'normal'
+              this.selectElement.style.fontWeight = 'normal'
+            }
+          }
+        }
+      }
+
+      if (key === 'addItem') {
+        if (annotation.items.includes(props.addItem)) {
+          delete props.addItem
+          continue
+        } else {
+          updatePropsNum ++
+
+          annotation.items.push({
+            Value: props.addItem,
+            String: props.addItem
+          })
+          const optionElement = createElement('option')
+          optionElement.value = props.addItem
+          optionElement.innerHTML = props.addItem
+          this.selectElement.appendChild(optionElement)
+
+          props.addItem = {
+            item: props.addItem,
+            index: annotation.items.length - 1
+          }
         }
       }
+
+      if (key === 'deleteItemIndex') {
+        updatePropsNum ++
+
+        const deleteItemIndex = props.deleteItemIndex
+        if (annotation.selected === props.deleteItemIndex) {
+          annotation.selected = null
+        }
+        annotation.items.splice(deleteItemIndex, 1)
+        this.selectElement.options[deleteItemIndex].remove()
+        // this.selectElement.options[props.selected].selected = true
+        // if (deleteIndex === annotation.selected) {
+        //   this.selectElement.options[deleteIndex] && (this.selectElement.options[deleteIndex].selected = true)
+        // }
+      }
+
+      if (key === 'moveOption') {
+        updatePropsNum ++
+
+        const fromIndex = props.moveOption.fromIndex
+        const toIndex = props.moveOption.toIndex
+
+        const items = annotation.items
+        if (fromIndex > toIndex) {
+          items.splice(fromIndex - 1, 2, items[fromIndex], items[fromIndex - 1])
+        } else {
+          items.splice(fromIndex, 2, items[fromIndex + 1], items[fromIndex])
+        }
+        props.moveOption.item = {
+          Value: items[toIndex].Value,
+          String: items[toIndex].String
+        }
+
+        const optionElement = this.selectElement.options[fromIndex]
+        optionElement.remove()
+
+        this.selectElement.insertBefore(optionElement, this.selectElement.options[toIndex])
+      }
     }
 
     if (updatePropsNum > 0) {
-      const annotation = {
+      const annotationData = {
         operate: "mod-form",
-        name: this.annotation.name,
+        name: annotation.name,
         pageIndex: this.page,
-        pagePtr: this.annotation.pagePtr,
-        annotPtr: this.annotation.annotPtr,
+        index: annotation.items.length - 1,
+        pagePtr: annotation.pagePtr,
+        annotPtr: annotation.annotPtr,
       }
-      if (props.options) {
-        props.options = props.options.join(',')
-        if (props.options === '') {
-          props.clearOption = true
-        }
+      if (!annotation.items.length) {
+        props.clearOption = true
       }
-      if (props.select && typeof props.select === 'number') {
-        props.select += ''
+
+      const isFont = ['fontSize', 'fontName', 'color', 'fontStyle'].some(item => props[item])
+      if (isFont) {
+        annotationData.fontSize = annotation.fontSize
+        annotationData.color = annotation.color
+        const fontArr = {
+          Courier: {
+            normal: 'Courier',
+            bold: 'Courier-Bold',
+            italic: 'Courier-Oblique',
+            boldItalic: 'Courier-BoldOblique'
+          },
+          Helvetica: {
+            normal: 'Helvetica',
+            bold: 'Helvetica-Bold',
+            italic: 'Helvetica-Oblique',
+            boldItalic: 'Helvetica-BoldOblique'
+          },
+          Times: {
+            normal: 'Times',
+            bold: 'Times-Bold',
+            italic: 'Times-Italic',
+            boldItalic: 'Times-BoldItalic'
+          }
+        }
+
+        const fontName = annotation.fontName
+        if (annotation.isBold && annotation.isItalic) {
+          annotationData.fontName = fontArr[fontName].boldItalic
+        } else if (annotation.isBold) {
+          annotationData.fontName = fontArr[fontName].bold
+        } else if (annotation.isItalic) {
+          annotationData.fontName = fontArr[fontName].italic
+        } else {
+          annotationData.fontName = fontArr[fontName].normal
+        }
       }
-      const updateAnnot = Object.assign({}, annotation, props)
+
+      const updateAnnot = Object.assign({}, annotationData, props)
       this.eventBus.dispatch('annotationChange', {
         type: 'modify',
         annotation: updateAnnot
@@ -908,27 +961,66 @@ export default class ComboBox extends Base {
   }
 
   setProperty (props) {
-    if (props.name !== this.annotation.name) return
+    const annotation = this.annotation
+    if (props.name !== annotation.name) return
 
     for (const key in props) {
-      for (const item in this.annotation) {
-        if (item === key && this.annotation[item] !== props[key]) {
-          this.annotation[item] = props[key]
+      for (const item in annotation) {
+        if (item === key && annotation[item] !== props[key]) {
+          annotation[item] = props[key]
 
           if (key === 'backgroundColor') {
-            this.borderElement.style[key] = props[key]
+            this.selectElement.style[key] = props[key]
           }
         }
       }
     }
 
-    const annotation = {
+    const annotationData = {
       operate: "mod-form",
       pageIndex: this.page,
-      pagePtr: this.annotation.pagePtr,
-      annotPtr: this.annotation.annotPtr,
+      pagePtr: annotation.pagePtr,
+      annotPtr: annotation.annotPtr,
     }
-    const updateAnnot = Object.assign({}, annotation, props)
+
+    const isFont = ['fontSize', 'fontName', 'color', 'fontStyle'].some(item => props[item])
+    if (isFont) {
+      annotationData.fontSize = annotation.fontSize
+      annotationData.color = annotation.color
+      const fontArr = {
+        Courier: {
+          normal: 'Courier',
+          bold: 'Courier-Bold',
+          italic: 'Courier-Oblique',
+          boldItalic: 'Courier-BoldOblique'
+        },
+        Helvetica: {
+          normal: 'Helvetica',
+          bold: 'Helvetica-Bold',
+          italic: 'Helvetica-Oblique',
+          boldItalic: 'Helvetica-BoldOblique'
+        },
+        Times: {
+          normal: 'Times',
+          bold: 'Times-Bold',
+          italic: 'Times-Italic',
+          boldItalic: 'Times-BoldItalic'
+        }
+      }
+
+      const fontName = annotation.fontName
+      if (annotation.isBold && annotation.isItalic) {
+        annotationData.fontName = fontArr[fontName].boldItalic
+      } else if (annotation.isBold) {
+        annotationData.fontName = fontArr[fontName].bold
+      } else if (annotation.isItalic) {
+        annotationData.fontName = fontArr[fontName].italic
+      } else {
+        annotationData.fontName = fontArr[fontName].normal
+      }
+    }
+
+    const updateAnnot = Object.assign({}, annotationData, props)
     this.eventBus.dispatch('annotationChange', {
       type: 'modify',
       annotation: updateAnnot
@@ -944,14 +1036,10 @@ export default class ComboBox extends Base {
   }
 
   handleSelect () {
-    this.annotation.select = this.selectElement.selectedIndex + 1
-    for (var i = 0; i < this.annotation.options.length; i++) {
-      if (this.selectElement.selectedIndex === i) {
-        this.selectElement.options[i].selected = true
-      }
-    }
+    this.annotation.selected = this.selectElement.selectedIndex
+
     this.setProperty({
-      select: this.annotation.select + '',
+      selected: this.annotation.selected,
       name: this.annotation.name
     })
   }

+ 219 - 138
packages/core/src/form/list_box.js

@@ -52,65 +52,26 @@ export default class ListBox extends Base {
     this.eventBus._on('setProperty', this.setProperty.bind(this))
     this.eventBus._on('changeSelectAvailable', this.changeSelectAvailable.bind(this))
 
-    for (let key in this.annotation) {
-      if (key === 'background-color') {
-        let newName = 'backgroundColor'
-        this.annotation[newName] = this.annotation[key]
-        delete this.annotation[key]
-      }
-      if (key === 'fieldname') {
-        let newKey = 'fieldName'
-        this.annotation[newKey] = this.annotation[key]
-        delete this.annotation[key]
-      }
-      if (key === 'opt') {
-        let newKey = 'options'
-        let options = []
-        if (Array.isArray(this.annotation[key])) {
-          for (const item of this.annotation[key]) {
-            options.push(item.value ?? item.key)
-          }
-        } else {
-          options.push(this.annotation[key].value)
-        }
-        this.annotation[newKey] = options
-        delete this.annotation[key]
-      }
-      if (!this.annotation['opt'] && !this.annotation['options']) {
-        this.annotation.options = []
-      }
-      if (key === 'options' && typeof this.annotation.options === 'string') {
-        this.annotation.options = this.annotation.options.split(',')
-      }
-      if (key === 'flags') {
-        let newKey = 'isHidden'
-        this.annotation[newKey] = this.annotation[key].indexOf('noview') > -1 || this.annotation[key].indexOf('hidden') > -1 ? '1' : '0'
-        delete this.annotation[key]
-      }
-      if (key === 'select' && !this.layer.annotationStore.notFirstRender) {
-        this.annotation[key] = (parseInt(this.annotation[key]) + 1).toString()
-      }
-      if (key === 'textStyle') {
-        const textStyle = this.annotation[key]
-        if (textStyle.fontColor) this.annotation.textColor = textStyle.fontColor
-        if (textStyle.fontSize) this.annotation.fontSize = parseInt(textStyle.fontSize).toString()
-        if (textStyle.fontName && textStyle.fontName.length > 0) {
-          const fontArr = [ 'Courier', 'Courier-Bold', 'Courier-BoldOblique', 'Courier-Oblique', 'Helvetica', 'Helvetica-Bold', 'Helvetica-BoldOblique', 'Helvetica-Oblique', 'Times-Roman', 'Times-Bold', 'Times-BoldItalic', 'Times-Italic' ]
-          this.annotation.fontName = 'Helvetica'
-          for (const item of fontArr) {
-            if (item.toLowerCase() === textStyle.fontName.toLowerCase()) {
-              this.annotation.fontName = item
-            }
-          }
-        } else {
-          this.annotation.fontName = 'Helvetica'
-        }
-      }
+    const annotation = this.annotation
+
+    if (!annotation.items) {
+      annotation.items = []
     }
-    if (!this.annotation['select']) {
-      this.annotation.select = ''
+    if (!annotation.fontName) {
+      annotation.fontName = 'Helvetica'
+    }
+    if (annotation.isBold && annotation.isItalic) {
+      annotation.fontStyle = 'boldItalic'
+    } else if (annotation.isBold) {
+      annotation.fontStyle = 'bold'
+    } else if (annotation.isItalic) {
+      annotation.fontStyle = 'italic'
+    } else {
+      annotation.fontStyle = 'normal'
+    }
+    if (!this.annotation.selected) {
+      this.annotation.selected = ''
     }
-    const annotation = this.annotation
 
     const { start, end } = this.getActualRect(
       this.viewport,
@@ -120,7 +81,6 @@ export default class ListBox extends Base {
     this.end = end
 
     const rect = this.calculate(start, end)
-    const actualbdwidth = (this.annotation.lineWidth || this.annotation.width || 2) * this.scale
     
     const annotationContainer = document.createElement('div')
     annotationContainer.id = annotation.name
@@ -139,27 +99,24 @@ export default class ListBox extends Base {
         top: 0,
         width: `${Math.abs(rect.width)}px`,
         height: `${Math.abs(rect.height)}px`,
-        backgroundColor: annotation.backgroundColor,
         position: 'relative'
       }
     )
 
     this.borderElement = borderElement
-
     let selectElement = createElement(
       'div',
       {
         width: `${Math.abs(rect.width)}px`,
         height: `${Math.abs(rect.height)}px`,
-        borderColor: '#43474D',
-        borderWidth: '1px',
-        borderStyle: 'solid',
-        borderRadius: '0',
+        borderColor: annotation.borderColor,
+        borderWidth: (annotation.borderWidth || 1) + 'px',
+        borderStyle: annotation.borderStyle || 'solid',
         cursor: 'pointer',
-        background: 'transparent',
+        backgroundColor: annotation.backgroundColor,
         fontSize: annotation.fontSize + 'px',
         fontFamily: annotation.fontName,
-        color: annotation.textColor || '#001A4E',
+        color: annotation.color || '#001A4E',
         overflow: 'auto'
       }
     )
@@ -170,8 +127,8 @@ export default class ListBox extends Base {
     this.container.append(this.annotationContainer)
 
     // 添加选项
-    if (annotation.options && annotation.options.length > 0) {
-      for (var i = 0; i < annotation.options.length; i++) {
+    if (annotation.items && annotation.items.length > 0) {
+      for (var i = 0; i < annotation.items.length; i++) {
         const optionElement = createElement(
           'div',
           {
@@ -187,8 +144,8 @@ export default class ListBox extends Base {
             class: 'option'
           }
         )
-        optionElement.innerText = annotation.options[i]
-        if (this.annotation.select - 1 === i) {
+        optionElement.innerText = annotation.items[i].Value
+        if (this.annotation.selected === i) {
           optionElement.style.backgroundColor = '#dcdcdc'
         }
         this.selectElement.appendChild(optionElement)
@@ -378,10 +335,10 @@ export default class ListBox extends Base {
     this.initial = true
 
     if (this.layer.toolMode !== 'form') {
-      if (this.annotation['isHidden'] === '1') {
+      if (this.annotation.isHidden === 1) {
         this.annotationContainer.style.display = 'none'
         this.annotationContainer.style.pointerEvents = 'none'
-      } else if (this.annotation['isHidden'] === '0') {
+      } else if (this.annotation.isHidden === 0) {
         this.annotationContainer.style.display = 'block'
         this.annotationContainer.style.pointerEvents = 'auto'
       }
@@ -428,13 +385,13 @@ export default class ListBox extends Base {
 
   calculate (start, end) {
     const initRect = this.rectCalc({ start, end });
-    const actualbdwidth = (this.annotation.width || this.annotation.lineWidth || 2) * this.scale
+    const actualBdWidth = (this.annotation.borderWidth || 1) * this.scale
 
     return {
-      top: initRect.top - actualbdwidth,
-      left: initRect.left - actualbdwidth,
-      width: initRect.width + actualbdwidth * 2,
-      height: initRect.height + actualbdwidth * 2,
+      top: initRect.top - actualBdWidth,
+      left: initRect.left - actualBdWidth,
+      width: initRect.width + actualBdWidth * 2,
+      height: initRect.height + actualBdWidth * 2,
     }
   }
 
@@ -511,10 +468,11 @@ export default class ListBox extends Base {
       onClickOutside([this.annotationContainer, this.outerLine, this.deletetButton, document.getElementById('propertyPanelButton'), document.getElementsByClassName('right-panel')[0]], this.handleOutside.bind(this))
     } else {
       if (event.target && event.target.className === 'option') {
+        debugger
         const children = event.target.parentNode.children
         for (let i = 0; i < children.length; i++) {
           if (children[i] === event.target) {
-            this.annotation.select = i + 1
+            this.annotation.selected = i
             break
           }
         }
@@ -808,86 +766,169 @@ export default class ListBox extends Base {
   }
 
   handlePropertyPanel (props) {
-    if (this.layer.annotationStore.selectedElementName !== this.annotation.name) return
+    const annotation = this.annotation
+    if (this.layer.annotationStore.selectedElementName !== annotation.name) return
 
     let updatePropsNum = 0
     for (const key in props) {
-      for (const item in this.annotation) {
-        if (item === key && key === 'options' && JSON.stringify(this.annotation[item]) !== JSON.stringify(props[key])) {
-          if (typeof props[key] === 'string') {
-            props[key] = props[key].split(',')
-          } else {
-            props[key] = Array.from(props[key])
-          }
-          this.annotation[item] = props[key]
-          updatePropsNum ++
-
-          this.selectElement.innerText = ''
-          for (var i = 0; i < this.annotation.options.length; i++) {
-            const optionElement = createElement(
-              'div',
-              {
-                width: '100%',
-                height: '30px',
-                lineHeight: '30px',
-                borderBottom: '1px solid #666666',
-                overflow: 'hidden',
-                textOverflow: 'ellipsis',
-                whiteSpace: 'nowrap'
-              },
-              {
-                class: 'option'
-              }
-            )
-            optionElement.innerText = this.annotation.options[i]
-            if (this.annotation.select - 1 === i) {
-              optionElement.style.backgroundColor = '#dcdcdc'
-            }
-            this.selectElement.appendChild(optionElement)
-          }
-        }
-
-        if (item === key && this.annotation[item] !== props[key] && key !== 'options') {
+      for (const item in annotation) {
+        if (item === key && this.annotation[item] !== props[key] && key !== 'items') {
           this.annotation[item] = props[key]
           updatePropsNum ++
 
+          annotation[item] = props[key]
           if (key === 'backgroundColor') {
-            this.borderElement.style[key] = props[key]
             if (props[key] === '') {
               props.clearBackgroundColor = true
             }
+            this.selectElement.style[key] = props[key]
           }
           if (key === 'fontSize') {
             this.selectElement.style.fontSize = props[key] + 'px'
           }
-          if (key === 'textColor') {
+          if (key === 'color') {
             this.selectElement.style.color = props[key]
           }
           if (key === 'fontName') {
             this.selectElement.style.fontFamily = props[key]
           }
+          if (key === 'fontStyle') {
+            const fontStyle = props[key]
+            if (fontStyle === 'boldItalic') {
+              this.selectElement.style.fontStyle = 'italic'
+              this.selectElement.style.fontWeight = 'bold'
+              annotation.isBold = true
+              annotation.isItalic = true
+            } else if (fontStyle === 'bold') {
+              this.selectElement.style.fontWeight = 'bold'
+              annotation.isBold = true
+              annotation.isItalic = false
+            } else if (fontStyle === 'italic') {
+              this.selectElement.style.fontStyle = 'italic'
+              annotation.isBold = false
+              annotation.isItalic = true
+            } else {
+              annotation.isItalic = false
+              annotation.isBold = false
+              this.selectElement.style.fontStyle = 'normal'
+              this.selectElement.style.fontWeight = 'normal'
+            }
+          }
         }
       }
+
+      if (key === 'addItem') {
+        if (annotation.items.includes(props.addItem)) {
+          delete props.addItem
+          continue
+        } else {
+          updatePropsNum ++
+
+          annotation.items.push({
+            Value: props.addItem,
+            String: props.addItem
+          })
+          const optionElement = createElement('option')
+          optionElement.value = props.addItem
+          optionElement.innerHTML = props.addItem
+          this.selectElement.appendChild(optionElement)
+
+          props.addItem = {
+            item: props.addItem,
+            index: annotation.items.length - 1
+          }
+        }
+      }
+
+      if (key === 'deleteItemIndex') {
+        updatePropsNum ++
+
+        const deleteItemIndex = props.deleteItemIndex
+        if (annotation.selected === props.deleteItemIndex) {
+          annotation.selected = null
+        }
+        annotation.items.splice(deleteItemIndex, 1)
+        this.selectElement.options[deleteItemIndex].remove()
+        // this.selectElement.options[props.selected].selected = true
+        // if (deleteIndex === annotation.selected) {
+        //   this.selectElement.options[deleteIndex] && (this.selectElement.options[deleteIndex].selected = true)
+        // }
+      }
+
+      if (key === 'moveOption') {
+        updatePropsNum ++
+
+        const fromIndex = props.moveOption.fromIndex
+        const toIndex = props.moveOption.toIndex
+
+        const items = annotation.items
+        if (fromIndex > toIndex) {
+          items.splice(fromIndex - 1, 2, items[fromIndex], items[fromIndex - 1])
+        } else {
+          items.splice(fromIndex, 2, items[fromIndex + 1], items[fromIndex])
+        }
+        props.moveOption.item = {
+          Value: items[toIndex].Value,
+          String: items[toIndex].String
+        }
+
+        const optionElement = this.selectElement.options[fromIndex]
+        optionElement.remove()
+
+        this.selectElement.insertBefore(optionElement, this.selectElement.options[toIndex])
+      }
     }
 
     if (updatePropsNum > 0) {
-      const annotation = {
+      const annotationData = {
         operate: "mod-form",
         name: this.annotation.name,
         pageIndex: this.page,
         pagePtr: this.annotation.pagePtr,
         annotPtr: this.annotation.annotPtr,
       }
-      if (props.options && Array.isArray(props.options)) {
-        props.options = props.options.join(',')
-        if (props.options === '') {
-          props.clearOption = true
-        }
+      if (!annotation.items.length) {
+        props.clearOption = true
       }
-      if (props.select && typeof props.select === 'number') {
-        props.select += ''
+
+      const isFont = ['fontSize', 'fontName', 'color', 'fontStyle'].some(item => props[item])
+      if (isFont) {
+        annotationData.fontSize = annotation.fontSize
+        annotationData.color = annotation.color
+        const fontArr = {
+          Courier: {
+            normal: 'Courier',
+            bold: 'Courier-Bold',
+            italic: 'Courier-Oblique',
+            boldItalic: 'Courier-BoldOblique'
+          },
+          Helvetica: {
+            normal: 'Helvetica',
+            bold: 'Helvetica-Bold',
+            italic: 'Helvetica-Oblique',
+            boldItalic: 'Helvetica-BoldOblique'
+          },
+          Times: {
+            normal: 'Times',
+            bold: 'Times-Bold',
+            italic: 'Times-Italic',
+            boldItalic: 'Times-BoldItalic'
+          }
+        }
+
+        const fontName = annotation.fontName
+        if (annotation.isBold && annotation.isItalic) {
+          annotationData.fontName = fontArr[fontName].boldItalic
+        } else if (annotation.isBold) {
+          annotationData.fontName = fontArr[fontName].bold
+        } else if (annotation.isItalic) {
+          annotationData.fontName = fontArr[fontName].italic
+        } else {
+          annotationData.fontName = fontArr[fontName].normal
+        }
       }
-      const updateAnnot = Object.assign({}, annotation, props)
+
+      const updateAnnot = Object.assign({}, annotationData, props)
       this.eventBus.dispatch('annotationChange', {
         type: 'modify',
         annotation: updateAnnot
@@ -896,27 +937,66 @@ export default class ListBox extends Base {
   }
 
   setProperty (props) {
-    if (props.name !== this.annotation.name) return
+    const annotation = this.annotation
+    if (props.name !== annotation.name) return
 
     for (const key in props) {
-      for (const item in this.annotation) {
-        if (item === key && this.annotation[item] !== props[key]) {
-          this.annotation[item] = props[key]
+      for (const item in annotation) {
+        if (item === key && annotation[item] !== props[key]) {
+          annotation[item] = props[key]
 
           if (key === 'backgroundColor') {
-            this.borderElement.style[key] = props[key]
+            this.selectElement.style[key] = props[key]
           }
         }
       }
     }
 
-    const annotation = {
+    const annotationData = {
       operate: "mod-form",
       pageIndex: this.page,
-      pagePtr: this.annotation.pagePtr,
-      annotPtr: this.annotation.annotPtr,
+      pagePtr: annotation.pagePtr,
+      annotPtr: annotation.annotPtr,
     }
-    const updateAnnot = Object.assign({}, annotation, props)
+
+    const isFont = ['fontSize', 'fontName', 'color', 'fontStyle'].some(item => props[item])
+    if (isFont) {
+      annotationData.fontSize = annotation.fontSize
+      annotationData.color = annotation.color
+      const fontArr = {
+        Courier: {
+          normal: 'Courier',
+          bold: 'Courier-Bold',
+          italic: 'Courier-Oblique',
+          boldItalic: 'Courier-BoldOblique'
+        },
+        Helvetica: {
+          normal: 'Helvetica',
+          bold: 'Helvetica-Bold',
+          italic: 'Helvetica-Oblique',
+          boldItalic: 'Helvetica-BoldOblique'
+        },
+        Times: {
+          normal: 'Times',
+          bold: 'Times-Bold',
+          italic: 'Times-Italic',
+          boldItalic: 'Times-BoldItalic'
+        }
+      }
+
+      const fontName = annotation.fontName
+      if (annotation.isBold && annotation.isItalic) {
+        annotationData.fontName = fontArr[fontName].boldItalic
+      } else if (annotation.isBold) {
+        annotationData.fontName = fontArr[fontName].bold
+      } else if (annotation.isItalic) {
+        annotationData.fontName = fontArr[fontName].italic
+      } else {
+        annotationData.fontName = fontArr[fontName].normal
+      }
+    }
+
+    const updateAnnot = Object.assign({}, annotationData, props)
     this.eventBus.dispatch('annotationChange', {
       type: 'modify',
       annotation: updateAnnot
@@ -935,11 +1015,12 @@ export default class ListBox extends Base {
     for (const opt of this.selectElement.children) {
       opt.style.backgroundColor = 'unset'
     }
-    if (this.selectElement.children[this.annotation.select - 1]) {
-      this.selectElement.children[this.annotation.select - 1].style.backgroundColor = '#dcdcdc'
+    if (this.selectElement.children[this.annotation.selected]) {
+      this.selectElement.children[this.annotation.selected].style.backgroundColor = '#dcdcdc'
     }
+    debugger
     this.setProperty({
-      select: this.annotation.select + '',
+      selected: this.annotation.selected,
       name: this.annotation.name
     })
   }

+ 11 - 64
packages/core/src/form/push_button.js

@@ -51,63 +51,9 @@ export default class PushButton extends Base {
     this.eventBus._on('pushButtonPropertyPanelChanged', this.handlePropertyPanel.bind(this))
     this.eventBus._on('setProperty', this.setProperty.bind(this))
 
-    for (let key in this.annotation) {
-      if (key === 'background-color') {
-        let newName = 'backgroundColor'
-        this.annotation[newName] = this.annotation[key]
-        delete this.annotation[key]
-      }
-      if (key === 'fieldname') {
-        let newKey = 'fieldName'
-        this.annotation[newKey] = this.annotation[key]
-        delete this.annotation[key]
-      }
-      if (key === 'flags') {
-        let newKey = 'isHidden'
-        this.annotation[newKey] = this.annotation[key].indexOf('noview') > -1 || this.annotation[key].indexOf('hidden') > -1 ? '1' : '0'
-        delete this.annotation[key]
-      }
-      if (key === 'textStyle') {
-        const textStyle = this.annotation[key]
-        if (textStyle.fontColor) this.annotation.textColor = textStyle.fontColor
-        if (textStyle.fontSize) this.annotation.fontSize = parseInt(textStyle.fontSize).toString()
-        if (textStyle.fontName && textStyle.fontName.length > 0) {
-          const fontArr = [ 'Courier', 'Courier-Bold', 'Courier-BoldOblique', 'Courier-Oblique', 'Helvetica', 'Helvetica-Bold', 'Helvetica-BoldOblique', 'Helvetica-Oblique', 'Times-Roman', 'Times-Bold', 'Times-BoldItalic', 'Times-Italic' ]
-          this.annotation.fontName = 'Helvetica'
-          for (const item of fontArr) {
-            if (item.toLowerCase() === textStyle.fontName.toLowerCase()) {
-              this.annotation.fontName = item
-            }
-          }
-        } else {
-          this.annotation.fontName = 'Helvetica'
-        }
-      }
-      if (key === 'OnActivation') {
-        if (this.annotation[key].Action && this.annotation[key].Action.Dest && this.annotation[key].Action.Dest.XYZ) {
-          this.annotation.actionType = '1'
-          this.annotation.destPage = (parseInt(this.annotation.OnActivation.Action.Dest.XYZ.Page) + 1).toString()
-          this.annotation.url = ''
-        } else if (this.annotation[key].Action && this.annotation[key].Action.URI && this.annotation[key].Action.URI) {
-          this.annotation.actionType = '2'
-          this.annotation.url = this.annotation.OnActivation.Action.URI.URI
-          this.annotation.destPage = ''
-        }
-      }
-      if (key === 'styleCA') {
-        let newKey = 'value'
-        this.annotation[newKey] = this.annotation[key]
-        delete this.annotation[key]
-      }
-    }
     if (!this.annotation.backgroundColor) {
       this.annotation.backgroundColor = '#1460F3'
     }
-    if (!this.annotation.OnActivation && (this.annotation.actionType === '0' || !this.annotation.actionType)) {
-      this.annotation.actionType = '0'
-      this.annotation.url = ''
-      this.annotation.destPage = ''
-    }
     const annotation = this.annotation
 
     const { start, end } = this.getActualRect(
@@ -118,7 +64,6 @@ export default class PushButton extends Base {
     this.end = end
 
     const rect = this.calculate(start, end)
-    const actualbdwidth = (this.annotation.lineWidth || this.annotation.width || 2) * this.scale
     
     const annotationContainer = document.createElement('div')
     annotationContainer.id = annotation.name
@@ -158,18 +103,20 @@ export default class PushButton extends Base {
         width: '100%',
         height: '100%',
         outline: 'none',
-        borderColor: '#001A4E',
-        borderWidth: '1px',
-        borderStyle: 'solid',
-        color: annotation.textColor,
-        backgroundColor: 'transparent',
-        fontSize: annotation.fontSize + 'px',
+        borderColor: annotation.borderColor,
+        borderWidth: (annotation.borderWidth || 1) + 'px',
+        borderStyle: annotation.borderStyle || 'solid',
+        color: annotation.color,
+        backgroundColor: annotation.backgroundColor,
         fontFamily: annotation.fontName,
+        fontSize: annotation.fontSize + 'px',
+        fontWeight: annotation.isBold ? 'bold' : 'normal',
+        fontStyle: annotation.isItalic ? 'italic' : 'normal',
         overflow: 'hidden',
         textDecoration: 'none'
       }
     )
-    this.buttonContainer.innerHTML = annotation.value
+    this.buttonContainer.innerHTML = annotation.title
     this.shapeElement.append(this.buttonContainer)
     this.buttonContainer.addEventListener('blur', this.onBlur)
     if (this.annotation.url) {
@@ -814,7 +761,7 @@ export default class PushButton extends Base {
           if (key === 'fontName') {
             this.buttonContainer.style.fontFamily = props[key]
           }
-          if (key === 'value') {
+          if (key === 'title') {
             this.buttonContainer.innerHTML = props[key]
           }
           if (key === 'url') {
@@ -864,7 +811,7 @@ export default class PushButton extends Base {
           if (key === 'fontName') {
             this.buttonContainer.style.fontFamily = props[key]
           }
-          if (key === 'value') {
+          if (key === 'title') {
             this.buttonContainer.innerHTML = props[key]
           }
           if (key === 'url') {

+ 67 - 50
packages/core/src/index.js

@@ -351,13 +351,15 @@ class ComPDFKitViewer {
           this.messageHandler.sendWithPromise('LoadFile', {
             buffer
           })
-          console.log(this.#pwd)
-          this.messageHandler.sendWithPromise('LoadDocumentByStream', {
+
+          const loadRes = await this.messageHandler.sendWithPromise('LoadDocumentByStream', {
             doc: this.doc,
             fileId: 0,
             length: buffer.length,
             password: this.#pwd
           })
+          console.log(loadRes)
+
           const annotations = await this.getAnnotations()
           this.initAnnotations(annotations)
           // const data = {
@@ -1057,13 +1059,11 @@ class ComPDFKitViewer {
       } else if (this.saveAction === 'remove') {
         saveType = 3
       }
-      const data = await this.messageHandler.sendWithPromise('FlattenPage', {
+      const blobData = await this.messageHandler.sendWithPromise('FlattenPage', {
         doc: this.doc,
         pagesPtr: this.pagesPtr,
         saveType
       })
-      console.log(data)
-      let blobData = new Blob(data, { type: "application/pdf" })
       saveAs(blobData, this._docName)
       return true
     }
@@ -1112,11 +1112,10 @@ class ComPDFKitViewer {
       } else if (this.saveAction === 'remove') {
         saveType = 3
       }
-      const data = await this.messageHandler.sendWithPromise('SaveDocumentByStream', {
+      const blobData = await this.messageHandler.sendWithPromise('SaveDocumentByStream', {
         doc: this.doc,
         saveType
       })
-      let blobData = new Blob(data, { type: "application/pdf" })
       if (download) {
         saveAs(blobData, this._docName)
       }
@@ -2006,50 +2005,68 @@ class ComPDFKitViewer {
     this.addAnnotations(annotData)
   }
 
-  compare (data) {
-    const formData = new FormData()
-    for (let key in data) {
-      formData.append(key, data[key])
-    }
-    const options = {
-      method: 'POST',
-      headers: {
-        'Authorization': this._token
-      },
-      body: formData
-    }
-    return fetch(this.optionUrl.webviewBaseUrl + this.optionUrl.compareUrl, options)
-      .then(async (res) => {
-        const type = res.headers.get("content-type")
-        if (type.startsWith("application/json")) {
-          const errorObj = await res.json();
-          return Promise.reject(errorObj);
-        } else {
-          const filename = res.headers.get("Content-Disposition").split("filename=")[1];
-          return { filename, blobData: res.blob(), type };
-        }
-      })
-      .then(async ({ filename, blobData, type }) => {
-        if (type === 'application/zip') {
-          return await unzipAndReadFiles(blobData)
-        } else {
-        // return blobData.then(blob => {
-        //   const reader = new FileReader();
-        //   reader.onload = function(event) {
-        //     const content = event.target.result;
-        //     console.log(content); // 打印blobData的内容
-        //   };
-        //   reader.readAsDataURL(blob);
-        //   return { filename, url: URL.createObjectURL(blob) };
-        // })
-          return blobData.then(blob => ({
-            filename,
-            url: URL.createObjectURL(blob)
-          }));
-        }
+  async compare (data) {
+    if (this.webviewerServer) {
+      const formData = new FormData()
+      for (let key in data) {
+        formData.append(key, data[key])
+      }
+      const options = {
+        method: 'POST',
+        headers: {
+          'Authorization': this._token
+        },
+        body: formData
+      }
+      return fetch(this.optionUrl.webviewBaseUrl + this.optionUrl.compareUrl, options)
+        .then(async (res) => {
+          const type = res.headers.get("content-type")
+          if (type.startsWith("application/json")) {
+            const errorObj = await res.json();
+            return Promise.reject(errorObj);
+          } else {
+            const filename = res.headers.get("Content-Disposition").split("filename=")[1];
+            return { filename, blobData: res.blob(), type };
+          }
+        })
+        .then(async ({ filename, blobData, type }) => {
+          if (type === 'application/zip') {
+            return await unzipAndReadFiles(blobData)
+          } else {
+          // return blobData.then(blob => {
+          //   const reader = new FileReader();
+          //   reader.onload = function(event) {
+          //     const content = event.target.result;
+          //     console.log(content); // 打印blobData的内容
+          //   };
+          //   reader.readAsDataURL(blob);
+          //   return { filename, url: URL.createObjectURL(blob) };
+          // })
+            return blobData.then(blob => ({
+              filename,
+              url: URL.createObjectURL(blob)
+            }));
+          }
+        })
+        .then((resp) => resp)
+        .catch((error) => ({ error: true, message: error.message }));
+    } else {
+      const res = await this.messageHandler.sendWithPromise('CompareDocument', {
+        data
       })
-      .then((resp) => resp)
-      .catch((error) => ({ error: true, message: error.message }));
+      // const { oldData, newData } = res
+      // let oldBlobData = new Blob(oldData, { type: "application/pdf" })
+      // saveAs(oldBlobData, 'old' + this._docName)
+
+      
+      // let newBlobData = new Blob(newData, { type: "application/pdf" })
+      // saveAs(newBlobData, 'new' + this._docName)
+
+      return {
+        filename: this._docName,
+        url: URL.createObjectURL(res)
+      }
+    }
   }
 
   async checkPassword (file) {

+ 1 - 2
packages/core/src/ink_sign.js

@@ -185,8 +185,7 @@ class InkSign {
     img.style.zIndex = "5";
     img.classList.add('sign-ink-save')
 
-    if(isSaveInk)
-    {
+    if(isSaveInk) {
      Object.defineProperty(img,'inkPath',{value:this.inkPath})
      Object.defineProperty(img,'inkParam',{value:param})
     }

+ 3 - 47
packages/core/src/pdf_page_view.js

@@ -31,6 +31,7 @@ import ComPDFAnnotationLayer from './annotation/layer.js';
 
 import AnnotationManager from "./annotations";
 import { v4 as uuidv4 } from 'uuid';
+import { convertbase64ToJpgBuffer } from './fileHandler.ts'
 /**
  * @typedef {Object} PDFPageViewOptions
  * @property {HTMLDivElement} [container] - The viewer element.
@@ -254,56 +255,13 @@ class PDFPageView {
             name: uuidv4()
           }
         } else {
-          debugger
-          const imageData = await new Promise((resolve) => {
-            const image = new Image()
-            image.onload = () => {
-              const canvas = document.createElement('canvas')
-              const width = actualRight - actualLeft
-              const height = actualBottom - actualTop
-              console.log(width, height)
-              canvas.width = width
-              canvas.height = height
-              canvas.style.width = width + 'px'
-              canvas.style.height = height + 'px'
-              const ctx = canvas.getContext('2d')
-              ctx.drawImage(image, 0, 0, width, height)
-              // canvas.toBlob((blob) => {
-              //   if (blob) {
-              //     const reader = new FileReader()
-                  
-              //     reader.onload = function (event) {
-              //       const arrayBuffer = event.target.result
-
-              //       const uint8Array = new Uint8Array(arrayBuffer)
-
-              //       resolve(uint8Array)
-              //     }
-
-              //     reader.readAsArrayBuffer(blob)
-              //   }
-              // })
-            }
-            image.src = imgData
-
-            const reader = new FileReader()
-
-            reader.onload = function (event) {
-              const arrayBuffer = event.target.result
-
-              const uint8Array = new Uint8Array(arrayBuffer)
-
-              resolve(uint8Array)
-            }
-
-            reader.readAsArrayBuffer(this.annotationStore.fileData)
-          })
+          const imageData = await convertbase64ToJpgBuffer(imgData)
           annotation = {
             operate: "add-annot",
             type: "stamp",
             stampType: 'image',
             pageIndex: pageNum - 1,
-            imageBase64: imageData,
+            imageData,
             rect: {
               left,
               top,
@@ -1014,7 +972,6 @@ class PDFPageView {
               textContent += args[j];
             } else if (typeof args[j].unicode === 'number') {
               // 字形参数
-              debugger
               var glyph = pdfPage.commonObjs.get(args[j]);
               var charCode = glyph.unicode.charCodeAt(0);
 
@@ -1160,7 +1117,6 @@ class PDFPageView {
               $t: this.$t
             })
           }
-          // debugger
           this.compdfAnnotationLayer.render(this.viewport)
 
           // this.AnnotationManager = new AnnotationManager({

+ 51 - 1
packages/core/src/ui_utils.js

@@ -124,7 +124,7 @@ export function parseAdobePDFTimestamp(timestamp) {
     return new Date()
   }
   // 使用正则表达式匹配时间戳格式
-  const regex = /D:(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})([-+]\d{2}'\d{2}')/;
+  const regex = /D:(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})([-+]\d{2}'\d{2}')?/;
   const match = timestamp.match(regex);
 
   if (match) {
@@ -1555,6 +1555,54 @@ class Util {
   }
 }
 
+function getColorFormat(colorString) {
+  if (colorString.startsWith("#")) {
+    return "hex";
+  } else if (colorString.startsWith("rgb(")) {
+    return "rgb";
+  } else {
+    return "unknown";
+  }
+}
+
+function convertColorToCppFormat (value) {
+  const format = getColorFormat(value)
+  if (format === 'hex') {
+    const { R, G, B } = hexToRgb(value)
+    return {
+      R: roundToDecimalPlaces(R / 255),
+      G: roundToDecimalPlaces(G / 255),
+      B: roundToDecimalPlaces(B / 255)
+    }
+  } else if (format === 'rgb') {
+    const match = value.match(/(\d+),\s*(\d+),\s*(\d+)/)
+    const R = roundToDecimalPlaces(parseInt(match[1]) / 255)
+    const G = roundToDecimalPlaces(parseInt(match[2]) / 255)
+    const B = roundToDecimalPlaces(parseInt(match[3]) / 255)
+    return {
+      R,
+      G,
+      B
+    }
+  } else {
+    console.error({
+      message: 'Invalid color value'
+    })
+  }
+}
+
+function rgbToHex(r, g, b) {
+  const hexString = ((1 << 24) | (r << 16) | (g << 8) | b).toString(16).slice(1).toUpperCase()
+  return `#${hexString}`;
+}
+
+function convertCppRGBToHex (R, G, B) {
+  const r = Math.round(R * 255)
+  const g = Math.round(G * 255)
+  const b = Math.round(B * 255)
+  return rgbToHex(r, g, b)
+}
+
 const onClickOutside = (el, cb) => {
   const listener = (event) => {
     let clickOutside = true
@@ -1728,6 +1776,8 @@ export {
   FeatureTest,
   shadow,
   Util,
+  convertColorToCppFormat,
+  convertCppRGBToHex,
   onClickOutside,
   findIndex,
   toDateObject

Разница между файлами не показана из-за своего большого размера
+ 301 - 552
packages/core/src/worker/compdfkit_worker.js


+ 69 - 90
packages/webview/src/components/RightPanel/RightPanel.vue

@@ -18,13 +18,13 @@
         <!-- 名称 -->
         <div class="content-block">
           <h2>{{ $t('rightPanel.name') }}</h2>
-          <input type="text" v-model="property.fieldName">
+          <input type="text" v-model="property.fieldName" @blur="handleProperty('fieldName')">
           <p class="error-text" v-if="!isOneCheckbox">{{ $t('rightPanel.differentNameError') }}</p>
         </div>
         <!-- 按钮文字 -->
         <div v-if="selectedElement === 'pushbutton' && toolMode === 'form'" class="content-block">
           <h2>{{ $t('rightPanel.buttonText') }}</h2>
-          <input type="text" v-model="property.value">
+          <input type="text" v-model="property.title">
         </div>
         <!-- 是否可见 -->
         <div class="content-block">
@@ -66,33 +66,33 @@
             <h2 class="wider">{{ $t('font') }}</h2>
             <div class="colors-container">
               <span class="cell-container">
-                <span class="cell-outer" :class="{ active: property.textColor === '#FF0000' }" @click="setActiveToolColor('textColor', '#FF0000')">
+                <span class="cell-outer" :class="{ active: property.color === '#FF0000' }" @click="setActiveToolColor('color', '#FF0000')">
                   <span class="cell red"></span></span>
               </span>
               <span class="cell-container">
-                <span class="cell-outer" :class="{ active: property.textColor === '#000000' }" @click="setActiveToolColor('textColor', '#000000')">
+                <span class="cell-outer" :class="{ active: property.color === '#000000' }" @click="setActiveToolColor('color', '#000000')">
                   <span class="cell black"></span></span>
               </span>
               <span class="cell-container">
-                <span class="cell-outer" :class="{ active: property.textColor === '#2D77FA' || property.textColor === '#2D77F9' }" @click="setActiveToolColor('textColor', '#2D77FA')">
+                <span class="cell-outer" :class="{ active: property.color === '#2D77FA' || property.color === '#2D77F9' }" @click="setActiveToolColor('color', '#2D77FA')">
                   <span class="cell blue"></span></span>
               </span>
             </div>
           </div>
           <div class="content-block">
-            <select v-model="fontFamily">
+            <select v-model="property.fontName">
               <option value="Helvetica">Helvetica</option>
               <option value="Courier">Courier</option>
-              <option value="Times-Roman">Times-Roman</option>
+              <option value="Times">Times-Roman</option>
             </select>
           </div>
           <div class="content-block">
             <div class="text-style">
-              <select v-model="property.fontName" class="font-family-select">
-                <option :value="fontFamily">{{ $t('rightPanel.regular') }}</option>
-                <option :value="matchFontFamily(0)">{{ $t('rightPanel.bold') }}</option>
-                <option :value="matchFontFamily(1)">{{ $t('rightPanel.boldOblique') }}</option>
-                <option :value="matchFontFamily(2)">{{ $t('rightPanel.oblique') }}</option>
+              <select v-model="property.fontStyle" class="font-family-select">
+                <option value="normal">{{ $t('rightPanel.regular') }}</option>
+                <option value="bold">{{ $t('rightPanel.bold') }}</option>
+                <option value="italic">{{ $t('rightPanel.oblique') }}</option>
+                <option value="boldItalic">{{ $t('rightPanel.boldOblique') }}</option>
               </select>
               <select v-model="property.fontSize" class="font-size-select">
                 <option value="12">12</option>
@@ -182,16 +182,16 @@
             <h2>{{ $t('rightPanel.itemList') }}</h2>
             <div class="button-content item-list">
               <ul>
-                <li v-for="(item, index) in options" :key="index" :class="{'active': index + 1 === selectedItemIndex}" @click="selectItem(index + 1, item)">{{ item }}</li>
+                <li v-for="(item, index) in items" :key="index" :class="{'active': index === selectedItemIndex}" @click="selectItem(index, item.Value)">{{ item.Value }}</li>
               </ul>
               <div class="buttons">
-                <div class="operate-button" :class="{ disabled: !selectedItemIndex }" @click="removeItem">
+                <div class="operate-button" :class="{ disabled: (!selectedItemIndex && selectedItemIndex !== 0) }" @click="removeItem">
                   <Minus />
                 </div>
-                <div class="operate-button" :class="{ disabled: selectedItemIndex === 1 || !selectedItemIndex }" @click="moveUp">
+                <div class="operate-button" :class="{ disabled: selectedItemIndex === 0 || !selectedItemIndex }" @click="moveUp">
                   <UpArrow />
                 </div>
-                <div class="operate-button" :class="{ disabled: selectedItemIndex === options.length || !selectedItemIndex }" @click="moveDown">
+                <div class="operate-button" :class="{ disabled: selectedItemIndex === items.length - 1 || (!selectedItemIndex && selectedItemIndex !== 0) }" @click="moveDown">
                   <DownArrow />
                 </div>
               </div>
@@ -250,9 +250,15 @@
   const selectedElement = ref(null)
   let editItem = ref(null)
   let selectedItemIndex = ref(null)
-  let options = ref([])
+  let items = ref([])
   let isOneCheckbox = ref(true)
 
+  const handleProperty = (key) => {
+    if (key === 'fieldName') {
+      useDocument.setPropertyPanel({'fieldName': property.fieldName})
+    }
+  }
+
   // 打开右侧属性面板时,关闭视图面板
   watch(() => isOpen.value, (newValue, oldValue) => {
     if (newValue) {
@@ -272,33 +278,16 @@
     useDocument.setPropertyPanel({'backgroundColor': newValue})
   })
   
-  watch(() => property.textColor, (newValue, oldValue) => {
-    useDocument.setPropertyPanel({'textColor': newValue})
-  })
-  
-  watch(() => fontFamily.value, (newValue, oldValue) => {
-    let font = ''
-    if (newValue === 'Times-Roman') {
-      font = 'Times'
-    } else {
-      font = newValue
-    }
-    if (!property.fontName.includes(font)) {
-      property.fontName = newValue
-    }
+  watch(() => property.color, (newValue, oldValue) => {
+    useDocument.setPropertyPanel({'color': newValue})
   })
-  
+
   watch(() => property.fontName, (newValue, oldValue) => {
     useDocument.setPropertyPanel({'fontName': newValue})
-    if (newValue === 'Helvetica' || newValue === 'Helvetica-Bold' || newValue === 'Helvetica-BoldOblique' || newValue === 'Helvetica-Oblique') {
-      fontFamily.value = 'Helvetica'
-    }
-    if (newValue === 'Courier' || newValue === 'Courier-Bold' || newValue === 'Courier-BoldOblique' || newValue === 'Courier-Oblique') {
-      fontFamily.value = 'Courier'
-    }
-    if (newValue === 'Times-Roman' || newValue === 'Times-Bold' || newValue === 'Times-BoldItalic' || newValue === 'Times-Italic') {
-      fontFamily.value = 'Times-Roman'
-    }
+  })
+
+  watch(() => property.fontStyle, (newValue, oldValue) => {
+    useDocument.setPropertyPanel({'fontStyle': newValue})
   })
   
   watch(() => property.fontSize, (newValue, oldValue) => {
@@ -380,8 +369,8 @@
     for (const item in props) {
       for (const key in property) {
         if (item === key) {
-          if (key === 'options') {
-            options.value = Array.from(props[item])
+          if (key === 'items') {
+            items.value = Array.from(props[item])
           } else {
             property[key] = props[item]
           }
@@ -391,37 +380,6 @@
   }
   core.addEvent('propertyChange', updateProperty)
 
-  const matchFontFamily = (type) => {
-    if (fontFamily.value === 'Helvetica') {
-      if (type === 0) {
-        return 'Helvetica-Bold'
-      } else if (type === 1) {
-        return 'Helvetica-BoldOblique'
-      } else if (type === 2) {
-        return 'Helvetica-Oblique'
-      }
-    }
-    if (fontFamily.value === 'Courier') {
-      if (type === 0) {
-        return 'Courier-Bold'
-      } else if (type === 1) {
-        return 'Courier-BoldOblique'
-      } else if (type === 2) {
-        return 'Courier-Oblique'
-      }
-    }
-    if (fontFamily.value === 'Times-Roman') {
-      if (type === 0) {
-        return 'Times-Bold'
-      } else if (type === 1) {
-        return 'Times-BoldItalic'
-      } else if (type === 2) {
-        return 'Times-Italic'
-      }
-    }
-    return property.fontName
-  }
-
   const setActiveToolColor = (key, color) => {
     property[key] = color
   }
@@ -445,24 +403,35 @@
   }
 
   const addItem = () => {
+    for (var i = 0; i < items.value.length; i++) {
+      if (items.value[i] === editItem.value) {
+        return
+      }
+    }
     if (editItem.value) {
-      options.value.push(editItem.value)
+      items.value.push({
+        Value: editItem.value,
+        String: editItem.value
+      })
     }
-    editItem.value = ''
     selectedItemIndex.value = null
     if (property.checkBoxIsChecked) {
-      useDocument.setPropertyPanel({'checkBoxIsChecked': property.checkBoxIsChecked, 'options': options.value})
+      useDocument.setPropertyPanel({'checkBoxIsChecked': property.checkBoxIsChecked, 'items': items.value})
     } else {
-      useDocument.setPropertyPanel({'options': options.value})
+      useDocument.setPropertyPanel({'addItem': editItem.value})
     }
+    editItem.value = ''
   }
 
   const removeItem = () => {
-    for (var i = 0; i < options.value.length; i++) {
-      if (options.value[i] === options.value[selectedItemIndex.value - 1]) {
-        options.value.splice(i, 1)
+    for (var i = 0; i < items.value.length; i++) {
+      if (items.value[i] === items.value[selectedItemIndex.value]) {
+        items.value.splice(i, 1)
         // select属性要放前面,确保更新option时select的值是最新的
-        useDocument.setPropertyPanel({'select': '1', 'options': options.value})
+        useDocument.setPropertyPanel({
+          deleteItemIndex: i,
+          selected: 0
+        })
         editItem.value = ''
         selectedItemIndex.value = null
       }
@@ -470,10 +439,15 @@
   }
 
   const moveUp = () => {
-    for (var i = 0; i < options.value.length; i++) {
-      if (options.value[i] === options.value[selectedItemIndex.value - 1] && i > 0) {
-        options.value.splice(i - 1, 2, options.value[i], options.value[i - 1])
-        useDocument.setPropertyPanel({'select': '1', 'options': options.value})
+    for (var i = 0; i < items.value.length; i++) {
+      if (items.value[i] === items.value[selectedItemIndex.value]) {
+        items.value.splice(i - 1, 2, items.value[i], items.value[i - 1])
+        useDocument.setPropertyPanel({
+          moveOption: {
+            fromIndex: i,
+            toIndex: i - 1
+          }
+        })
         selectedItemIndex.value -= 1
         break
       }
@@ -481,10 +455,15 @@
   }
 
   const moveDown = () => {
-    for (var i = 0; i < options.value.length; i++) {
-      if (options.value[i] === options.value[selectedItemIndex.value - 1] && i < options.value.length - 1) {
-        options.value.splice(i, 2, options.value[i + 1], options.value[i])
-        useDocument.setPropertyPanel({'select': '1', 'options': options.value})
+    for (var i = 0; i < items.value.length; i++) {
+      if (items.value[i] === items.value[selectedItemIndex.value] && i < items.value.length - 1) {
+        items.value.splice(i, 2, items.value[i + 1], items.value[i])
+        useDocument.setPropertyPanel({
+          moveOption: {
+            fromIndex: i,
+            toIndex: i + 1
+          }
+        })
         selectedItemIndex.value += 1
         break
       }

+ 7 - 2
packages/webview/src/stores/modules/document.js

@@ -101,9 +101,11 @@ export const useDocumentStore = defineStore({
     propertyPanel: {
       fieldName: '',
       isHidden: '0',
+      title: '',
       backgroundColor: '#DDE9FF',
-      textColor: '#000000',
+      color: '#000000',
       fontName: 'Helvetica',
+      fontStyle: 'normal',
       fontSize: '14',
       alignment: '0',
       value: '',
@@ -116,7 +118,10 @@ export const useDocumentStore = defineStore({
       text: 'OK',
       url: '',
       destPage: '',
-      options: []
+      items: [],
+      addItem: null,
+      deleteItemIndex: null,
+      moveOption: null
     },
     compareFiles: {
       oldFile: null,

+ 262 - 8
pnpm-lock.yaml

@@ -15,10 +15,12 @@ importers:
       '@rollup/plugin-commonjs': ^23.0.2
       '@rollup/plugin-json': ^6.0.0
       '@rollup/plugin-node-resolve': ^15.0.1
+      '@typescript-eslint/parser': ^6.7.2
       cross-env: ^7.0.3
       crypto-js: ^4.1.1
       dayjs: ^1.11.6
       file-saver: ^2.0.5
+      jszip: ^3.10.1
       lodash: ^4.17.21
       nanoid: ^4.0.2
       open-color: ^1.9.1
@@ -28,14 +30,17 @@ importers:
       print-js: ^1.6.0
       rollup: ^3.2.3
       rollup-plugin-node-builtins: ^2.1.2
+      rollup-plugin-typescript2: ^0.35.0
       rollup-plugin-uglify: ^6.0.4
       roughjs: ^4.5.2
+      typescript: ^5.2.2
       uuid: ^9.0.0
       uuidv4: ^6.2.13
     dependencies:
       crypto-js: 4.1.1
       dayjs: 1.11.7
       file-saver: 2.0.5
+      jszip: 3.10.1
       lodash: 4.17.21
       nanoid: 4.0.2
       open-color: 1.9.1
@@ -55,10 +60,13 @@ importers:
       '@rollup/plugin-commonjs': 23.0.7_rollup@3.20.2
       '@rollup/plugin-json': 6.0.0_rollup@3.20.2
       '@rollup/plugin-node-resolve': 15.0.2_rollup@3.20.2
+      '@typescript-eslint/parser': 6.7.2_typescript@5.2.2
       cross-env: 7.0.3
       rollup: 3.20.2
       rollup-plugin-node-builtins: 2.1.2
+      rollup-plugin-typescript2: 0.35.0_n62mu3igqaflart3wrngw5b5iy
       rollup-plugin-uglify: 6.0.4_rollup@3.20.2
+      typescript: 5.2.2
 
   packages/webview:
     specifiers:
@@ -1563,6 +1571,14 @@ packages:
       rollup: 3.20.2
     dev: true
 
+  /@rollup/pluginutils/4.2.1:
+    resolution: {integrity: sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==}
+    engines: {node: '>= 8.0.0'}
+    dependencies:
+      estree-walker: 2.0.2
+      picomatch: 2.3.1
+    dev: true
+
   /@rollup/pluginutils/5.0.2:
     resolution: {integrity: sha512-pTd9rIsP92h+B6wWwFbW8RkZv4hiR/xKsqre4SIuAOaOEQRxi0lqLke9k2/7WegC85GgUs9pjmOjCUi3In4vwA==}
     engines: {node: '>=14.0.0'}
@@ -1641,6 +1657,68 @@ packages:
     resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==}
     dev: false
 
+  /@typescript-eslint/parser/6.7.2_typescript@5.2.2:
+    resolution: {integrity: sha512-KA3E4ox0ws+SPyxQf9iSI25R6b4Ne78ORhNHeVKrPQnoYsb9UhieoiRoJgrzgEeKGOXhcY1i8YtOeCHHTDa6Fw==}
+    engines: {node: ^16.0.0 || >=18.0.0}
+    peerDependencies:
+      eslint: ^7.0.0 || ^8.0.0
+      typescript: '*'
+    peerDependenciesMeta:
+      typescript:
+        optional: true
+    dependencies:
+      '@typescript-eslint/scope-manager': 6.7.2
+      '@typescript-eslint/types': 6.7.2
+      '@typescript-eslint/typescript-estree': 6.7.2_typescript@5.2.2
+      '@typescript-eslint/visitor-keys': 6.7.2
+      debug: 4.3.4
+      typescript: 5.2.2
+    transitivePeerDependencies:
+      - supports-color
+    dev: true
+
+  /@typescript-eslint/scope-manager/6.7.2:
+    resolution: {integrity: sha512-bgi6plgyZjEqapr7u2mhxGR6E8WCzKNUFWNh6fkpVe9+yzRZeYtDTbsIBzKbcxI+r1qVWt6VIoMSNZ4r2A+6Yw==}
+    engines: {node: ^16.0.0 || >=18.0.0}
+    dependencies:
+      '@typescript-eslint/types': 6.7.2
+      '@typescript-eslint/visitor-keys': 6.7.2
+    dev: true
+
+  /@typescript-eslint/types/6.7.2:
+    resolution: {integrity: sha512-flJYwMYgnUNDAN9/GAI3l8+wTmvTYdv64fcH8aoJK76Y+1FCZ08RtI5zDerM/FYT5DMkAc+19E4aLmd5KqdFyg==}
+    engines: {node: ^16.0.0 || >=18.0.0}
+    dev: true
+
+  /@typescript-eslint/typescript-estree/6.7.2_typescript@5.2.2:
+    resolution: {integrity: sha512-kiJKVMLkoSciGyFU0TOY0fRxnp9qq1AzVOHNeN1+B9erKFCJ4Z8WdjAkKQPP+b1pWStGFqezMLltxO+308dJTQ==}
+    engines: {node: ^16.0.0 || >=18.0.0}
+    peerDependencies:
+      typescript: '*'
+    peerDependenciesMeta:
+      typescript:
+        optional: true
+    dependencies:
+      '@typescript-eslint/types': 6.7.2
+      '@typescript-eslint/visitor-keys': 6.7.2
+      debug: 4.3.4
+      globby: 11.1.0
+      is-glob: 4.0.3
+      semver: 7.5.4
+      ts-api-utils: 1.0.3_typescript@5.2.2
+      typescript: 5.2.2
+    transitivePeerDependencies:
+      - supports-color
+    dev: true
+
+  /@typescript-eslint/visitor-keys/6.7.2:
+    resolution: {integrity: sha512-uVw9VIMFBUTz8rIeaUT3fFe8xIUx8r4ywAdlQv1ifH+6acn/XF8Y6rwJ7XNmkNMDrTW+7+vxFFPIF40nJCVsMQ==}
+    engines: {node: ^16.0.0 || >=18.0.0}
+    dependencies:
+      '@typescript-eslint/types': 6.7.2
+      eslint-visitor-keys: 3.4.3
+    dev: true
+
   /@vitejs/plugin-vue/3.2.0_vite@3.2.5+vue@3.2.47:
     resolution: {integrity: sha512-E0tnaL4fr+qkdCNxJ+Xd0yM31UwMkQje76fsDVBBUCoGOUPexu2VDUYHL8P4CwV+zMvWw6nlRw19OnRKmYAJpw==}
     engines: {node: ^14.18.0 || >=16.0.0}
@@ -1913,6 +1991,11 @@ packages:
     resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
     dev: true
 
+  /array-union/2.1.0:
+    resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==}
+    engines: {node: '>=8'}
+    dev: true
+
   /asn1.js/5.4.1:
     resolution: {integrity: sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==}
     dependencies:
@@ -2284,7 +2367,6 @@ packages:
 
   /core-util-is/1.0.3:
     resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==}
-    dev: true
 
   /create-ecdh/4.0.4:
     resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==}
@@ -2487,6 +2569,13 @@ packages:
       randombytes: 2.1.0
     dev: true
 
+  /dir-glob/3.0.1:
+    resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
+    engines: {node: '>=8'}
+    dependencies:
+      path-type: 4.0.0
+    dev: true
+
   /doctrine/3.0.0:
     resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==}
     engines: {node: '>=6.0.0'}
@@ -2813,6 +2902,11 @@ packages:
     engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
     dev: true
 
+  /eslint-visitor-keys/3.4.3:
+    resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==}
+    engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+    dev: true
+
   /eslint/8.38.0:
     resolution: {integrity: sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg==}
     engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -2962,6 +3056,23 @@ packages:
       to-regex-range: 5.0.1
     dev: true
 
+  /find-cache-dir/3.3.2:
+    resolution: {integrity: sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==}
+    engines: {node: '>=8'}
+    dependencies:
+      commondir: 1.0.1
+      make-dir: 3.1.0
+      pkg-dir: 4.2.0
+    dev: true
+
+  /find-up/4.1.0:
+    resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==}
+    engines: {node: '>=8'}
+    dependencies:
+      locate-path: 5.0.0
+      path-exists: 4.0.0
+    dev: true
+
   /find-up/5.0.0:
     resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==}
     engines: {node: '>=10'}
@@ -3004,6 +3115,15 @@ packages:
       combined-stream: 1.0.8
       mime-types: 2.1.35
 
+  /fs-extra/10.1.0:
+    resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==}
+    engines: {node: '>=12'}
+    dependencies:
+      graceful-fs: 4.2.11
+      jsonfile: 6.1.0
+      universalify: 2.0.0
+    dev: true
+
   /fs-minipass/2.1.0:
     resolution: {integrity: sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==}
     engines: {node: '>= 8'}
@@ -3105,6 +3225,22 @@ packages:
       type-fest: 0.20.2
     dev: true
 
+  /globby/11.1.0:
+    resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==}
+    engines: {node: '>=10'}
+    dependencies:
+      array-union: 2.1.0
+      dir-glob: 3.0.1
+      fast-glob: 3.2.12
+      ignore: 5.2.4
+      merge2: 1.4.1
+      slash: 3.0.0
+    dev: true
+
+  /graceful-fs/4.2.11:
+    resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==}
+    dev: true
+
   /grapheme-splitter/1.0.4:
     resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==}
     dev: true
@@ -3203,6 +3339,10 @@ packages:
     engines: {node: '>= 4'}
     dev: true
 
+  /immediate/3.0.6:
+    resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==}
+    dev: false
+
   /immutable/4.3.0:
     resolution: {integrity: sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==}
     dev: true
@@ -3313,7 +3453,6 @@ packages:
 
   /isarray/1.0.0:
     resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==}
-    dev: true
 
   /isbuffer/0.0.0:
     resolution: {integrity: sha512-xU+NoHp+YtKQkaM2HsQchYn0sltxMxew0HavMfHbjnucBoTSGbw745tL+Z7QBANleWM1eEQMenEpi174mIeS4g==}
@@ -3423,6 +3562,23 @@ packages:
     hasBin: true
     dev: true
 
+  /jsonfile/6.1.0:
+    resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==}
+    dependencies:
+      universalify: 2.0.0
+    optionalDependencies:
+      graceful-fs: 4.2.11
+    dev: true
+
+  /jszip/3.10.1:
+    resolution: {integrity: sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==}
+    dependencies:
+      lie: 3.3.0
+      pako: 1.0.11
+      readable-stream: 2.3.8
+      setimmediate: 1.0.5
+    dev: false
+
   /level-blobs/0.1.7:
     resolution: {integrity: sha512-n0iYYCGozLd36m/Pzm206+brIgXP8mxPZazZ6ZvgKr+8YwOZ8/PPpYC5zMUu2qFygRN8RO6WC/HH3XWMW7RMVg==}
     dependencies:
@@ -3515,11 +3671,24 @@ packages:
       type-check: 0.4.0
     dev: true
 
+  /lie/3.3.0:
+    resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==}
+    dependencies:
+      immediate: 3.0.6
+    dev: false
+
   /local-pkg/0.4.3:
     resolution: {integrity: sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==}
     engines: {node: '>=14'}
     dev: true
 
+  /locate-path/5.0.0:
+    resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==}
+    engines: {node: '>=8'}
+    dependencies:
+      p-locate: 4.1.0
+    dev: true
+
   /locate-path/6.0.0:
     resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==}
     engines: {node: '>=10'}
@@ -3588,8 +3757,6 @@ packages:
     engines: {node: '>=8'}
     dependencies:
       semver: 6.3.0
-    dev: false
-    optional: true
 
   /md5.js/1.3.5:
     resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==}
@@ -3854,6 +4021,13 @@ packages:
       word-wrap: 1.2.3
     dev: true
 
+  /p-limit/2.3.0:
+    resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==}
+    engines: {node: '>=6'}
+    dependencies:
+      p-try: 2.2.0
+    dev: true
+
   /p-limit/3.1.0:
     resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==}
     engines: {node: '>=10'}
@@ -3861,6 +4035,13 @@ packages:
       yocto-queue: 0.1.0
     dev: true
 
+  /p-locate/4.1.0:
+    resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==}
+    engines: {node: '>=8'}
+    dependencies:
+      p-limit: 2.3.0
+    dev: true
+
   /p-locate/5.0.0:
     resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==}
     engines: {node: '>=10'}
@@ -3868,6 +4049,15 @@ packages:
       p-limit: 3.1.0
     dev: true
 
+  /p-try/2.2.0:
+    resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==}
+    engines: {node: '>=6'}
+    dev: true
+
+  /pako/1.0.11:
+    resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==}
+    dev: false
+
   /parent-module/1.0.1:
     resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
     engines: {node: '>=6'}
@@ -3913,6 +4103,11 @@ packages:
     resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==}
     dev: true
 
+  /path-type/4.0.0:
+    resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
+    engines: {node: '>=8'}
+    dev: true
+
   /path2d-polyfill/2.0.1:
     resolution: {integrity: sha512-ad/3bsalbbWhmBo0D6FZ4RNMwsLsPpL6gnvhuSaU5Vm7b06Kr5ubSltQQ0T7YKsiJQO+g22zJ4dJKNTXIyOXtA==}
     engines: {node: '>=8'}
@@ -3975,6 +4170,13 @@ packages:
       vue-demi: 0.13.11_vue@3.2.47
     dev: false
 
+  /pkg-dir/4.2.0:
+    resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==}
+    engines: {node: '>=8'}
+    dependencies:
+      find-up: 4.1.0
+    dev: true
+
   /points-on-curve/0.2.0:
     resolution: {integrity: sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==}
     dev: false
@@ -4026,7 +4228,6 @@ packages:
 
   /process-nextick-args/2.0.1:
     resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==}
-    dev: true
 
   /proto-list/1.2.4:
     resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==}
@@ -4113,7 +4314,6 @@ packages:
       safe-buffer: 5.1.2
       string_decoder: 1.1.1
       util-deprecate: 1.0.2
-    dev: true
 
   /readable-stream/3.6.2:
     resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==}
@@ -4215,6 +4415,21 @@ packages:
       process-es6: 0.11.6
     dev: true
 
+  /rollup-plugin-typescript2/0.35.0_n62mu3igqaflart3wrngw5b5iy:
+    resolution: {integrity: sha512-szcIO9hPUx3PhQl91u4pfNAH2EKbtrXaES+m163xQVE5O1CC0ea6YZV/5woiDDW3CR9jF2CszPrKN+AFiND0bg==}
+    peerDependencies:
+      rollup: '>=1.26.3'
+      typescript: '>=2.4.0'
+    dependencies:
+      '@rollup/pluginutils': 4.2.1
+      find-cache-dir: 3.3.2
+      fs-extra: 10.1.0
+      rollup: 3.20.2
+      semver: 7.4.0
+      tslib: 2.6.2
+      typescript: 5.2.2
+    dev: true
+
   /rollup-plugin-uglify/6.0.4_rollup@3.20.2:
     resolution: {integrity: sha512-ddgqkH02klveu34TF0JqygPwZnsbhHVI6t8+hGTcYHngPkQb5MIHI0XiztXIN/d6V9j+efwHAqEL7LspSxQXGw==}
     peerDependencies:
@@ -4259,7 +4474,6 @@ packages:
 
   /safe-buffer/5.1.2:
     resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==}
-    dev: true
 
   /safe-buffer/5.2.1:
     resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==}
@@ -4310,6 +4524,14 @@ packages:
     dependencies:
       lru-cache: 6.0.0
 
+  /semver/7.5.4:
+    resolution: {integrity: sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==}
+    engines: {node: '>=10'}
+    hasBin: true
+    dependencies:
+      lru-cache: 6.0.0
+    dev: true
+
   /serialize-javascript/2.1.2:
     resolution: {integrity: sha512-rs9OggEUF0V4jUSecXazOYsLfu7OGK2qIn3c7IPBiffz32XniEp/TX9Xmc9LQfK2nQ2QKHvZ2oygKUGU0lG4jQ==}
     dev: true
@@ -4319,6 +4541,10 @@ packages:
     dev: false
     optional: true
 
+  /setimmediate/1.0.5:
+    resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==}
+    dev: false
+
   /sha.js/2.4.11:
     resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==}
     hasBin: true
@@ -4362,6 +4588,11 @@ packages:
     dev: false
     optional: true
 
+  /slash/3.0.0:
+    resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==}
+    engines: {node: '>=8'}
+    dev: true
+
   /source-map-js/1.0.2:
     resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==}
     engines: {node: '>=0.10.0'}
@@ -4396,7 +4627,6 @@ packages:
     resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==}
     dependencies:
       safe-buffer: 5.1.2
-    dev: true
 
   /string_decoder/1.3.0:
     resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==}
@@ -4518,6 +4748,19 @@ packages:
     resolution: {integrity: sha512-M8RGFoKtZ8dF+iwJfAJTOH/SM4KluKOKRJpjCMhI8bG3qB74zrFoArKZ62ll0Fr3mqkMJiQOmWYkdYgDeITYQg==}
     dev: true
 
+  /ts-api-utils/1.0.3_typescript@5.2.2:
+    resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==}
+    engines: {node: '>=16.13.0'}
+    peerDependencies:
+      typescript: '>=4.2.0'
+    dependencies:
+      typescript: 5.2.2
+    dev: true
+
+  /tslib/2.6.2:
+    resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
+    dev: true
+
   /type-check/0.3.2:
     resolution: {integrity: sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==}
     engines: {node: '>= 0.8.0'}
@@ -4550,6 +4793,12 @@ packages:
     resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==}
     dev: true
 
+  /typescript/5.2.2:
+    resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==}
+    engines: {node: '>=14.17'}
+    hasBin: true
+    dev: true
+
   /uglify-js/3.17.4:
     resolution: {integrity: sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==}
     engines: {node: '>=0.8.0'}
@@ -4584,6 +4833,11 @@ packages:
     engines: {node: '>= 4.0.0'}
     dev: true
 
+  /universalify/2.0.0:
+    resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==}
+    engines: {node: '>= 10.0.0'}
+    dev: true
+
   /unplugin-vue-components/0.22.12_vue@3.2.47:
     resolution: {integrity: sha512-FxyzsuBvMCYPIk+8cgscGBQ345tvwVu+qY5IhE++eorkyvA4Z1TiD/HCiim+Kbqozl10i4K+z+NCa2WO2jexRA==}
     engines: {node: '>=14'}