@eternalheart/vue-file-preview 1.6.13 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/README.md +2 -0
  2. package/README.zh-CN.md +2 -0
  3. package/lib/FilePreviewContent.vue.d.ts +17 -6
  4. package/lib/FilePreviewEmbed.vue.d.ts +14 -6
  5. package/lib/FilePreviewModal.vue.d.ts +14 -6
  6. package/lib/chunks/{EmptyState.vue_vue_type_script_setup_true_lang-C7qk6wj0.mjs → EmptyState.vue_vue_type_script_setup_true_lang--ZOobbGi.mjs} +1 -1
  7. package/lib/chunks/{avifLoader-CAUzjn-d-C0KRpetN.mjs → avifLoader-CAUzjn-d-CnJpGYJ2.mjs} +1 -1
  8. package/lib/chunks/{heicLoader-D_9PukkA-Czof_5FJ.mjs → heicLoader-D_9PukkA-g_dLrWLP.mjs} +1 -1
  9. package/lib/chunks/index-6XZXYqbp.mjs +125 -0
  10. package/lib/chunks/{index-B21EAyWz.mjs → index-BPSzwMOC.mjs} +51 -51
  11. package/lib/chunks/index-BYQ9S7Mk.mjs +104 -0
  12. package/lib/chunks/{index-8Vpbg2kS.mjs → index-Bf94DwQu.mjs} +105 -104
  13. package/lib/chunks/index-BfOWoMpY.mjs +359 -0
  14. package/lib/chunks/index-Bg8poMIm.mjs +117 -0
  15. package/lib/chunks/index-BzwJ0VWu.mjs +108 -0
  16. package/lib/chunks/index-C41YET0_.mjs +51 -0
  17. package/lib/chunks/{index-BvBqDq3O.mjs → index-C4hIk6pa.mjs} +2023 -2023
  18. package/lib/chunks/{index-BASg1cr4.mjs → index-C8lyQPe3.mjs} +1018 -1018
  19. package/lib/chunks/{index-C9mAajbD.mjs → index-CWPdNhoe.mjs} +200 -200
  20. package/lib/chunks/{index-BuqPb5mP.mjs → index-CrVQPnFj.mjs} +112 -112
  21. package/lib/chunks/{index-D30L8tm9.mjs → index-D5IF9F-D.mjs} +57 -57
  22. package/lib/chunks/{index-DN4Ui0Gh.mjs → index-DFeKS8tR.mjs} +120 -120
  23. package/lib/chunks/index-DM8Dfl-m.mjs +52 -0
  24. package/lib/chunks/index-DZe0BxAB.mjs +90 -0
  25. package/lib/chunks/{index-BlrFFeqc.mjs → index-GFcSJEwj.mjs} +75 -75
  26. package/lib/chunks/{index-Dkro_8Fy.mjs → index-LPGxJDnT.mjs} +32 -32
  27. package/lib/chunks/index-aKiIuKKx.mjs +157 -0
  28. package/lib/chunks/{index-DZZN3kYi.mjs → index-c-pYJEmH.mjs} +1589 -1394
  29. package/lib/chunks/{index-CxKZKUJj.mjs → index-z9RqL2wI.mjs} +1651 -1651
  30. package/lib/chunks/index-zLQlyNR2.mjs +383 -0
  31. package/lib/chunks/{jp2Loader-Dig19xyo-CKUaGhPl.mjs → jp2Loader-Dig19xyo-fCO1knZ0.mjs} +1 -1
  32. package/lib/chunks/{psdLoader-C0tKUXXl-CYWoQis5.mjs → psdLoader-C0tKUXXl-DihMskai.mjs} +1 -1
  33. package/lib/chunks/{rawLoader-C-tPeFAB-C35zC8nZ.mjs → rawLoader-C-tPeFAB-BSfDPl-z.mjs} +5 -5
  34. package/lib/chunks/{tiffLoader-BlhByX8w-BOxg_Du5.mjs → tiffLoader-BlhByX8w-JY5DaTre.mjs} +1 -1
  35. package/lib/chunks/{useShikiHighlight-BPmcxA-h.mjs → useShikiHighlight-C-ztcJBE.mjs} +1 -1
  36. package/lib/composables/useAudioPlayer.d.ts +1 -1
  37. package/lib/composables/usePreviewEvents.d.ts +27 -0
  38. package/lib/composables/useRequest.d.ts +16 -4
  39. package/lib/composables/useThemeMode.d.ts +1 -1
  40. package/lib/composables/useTranslator.d.ts +2 -2
  41. package/lib/core/events.d.ts +52 -0
  42. package/lib/core/i18n/index.d.ts +29 -0
  43. package/lib/core/i18n/messages/en-US.d.ts +5 -0
  44. package/lib/core/i18n/messages/index.d.ts +9 -0
  45. package/lib/core/i18n/messages/zh-CN.d.ts +5 -0
  46. package/lib/core/i18n/types.d.ts +23 -0
  47. package/lib/core/index.d.ts +34 -0
  48. package/lib/core/loaders/avifLoader.d.ts +22 -0
  49. package/lib/core/loaders/heicLoader.d.ts +21 -0
  50. package/lib/core/loaders/jp2Loader.d.ts +16 -0
  51. package/lib/core/loaders/jp2Worker.d.ts +1 -0
  52. package/lib/core/loaders/psdLoader.d.ts +14 -0
  53. package/lib/core/loaders/rawLoader.d.ts +14 -0
  54. package/lib/core/loaders/registry.d.ts +32 -0
  55. package/lib/core/loaders/tiffLoader.d.ts +28 -0
  56. package/lib/core/loaders/types.d.ts +56 -0
  57. package/lib/core/types.d.ts +89 -0
  58. package/lib/core/utils/csvParser.d.ts +31 -0
  59. package/lib/core/utils/emptyState.d.ts +28 -0
  60. package/lib/core/utils/excelDataConverter.d.ts +61 -0
  61. package/lib/core/utils/fileNormalizer.d.ts +21 -0
  62. package/lib/core/utils/fileType.d.ts +21 -0
  63. package/lib/core/utils/legacy-office/doc.d.ts +25 -0
  64. package/lib/core/utils/legacy-office/index.d.ts +8 -0
  65. package/lib/core/utils/legacy-office/ole.d.ts +8 -0
  66. package/lib/core/utils/legacy-office/ppt.d.ts +79 -0
  67. package/lib/core/utils/legacy-office/xls.d.ts +28 -0
  68. package/lib/core/utils/mimeTypes.d.ts +29 -0
  69. package/lib/core/utils/ooxml/docx.d.ts +17 -0
  70. package/lib/core/utils/ooxml/index.d.ts +4 -0
  71. package/lib/core/utils/ooxml/pptx.d.ts +7 -0
  72. package/lib/core/utils/ooxml/xml.d.ts +15 -0
  73. package/lib/core/utils/ooxml/zip.d.ts +3 -0
  74. package/lib/core/utils/pdfWorker.d.ts +61 -0
  75. package/lib/core/utils/previewMode.d.ts +7 -0
  76. package/lib/core/utils/request.d.ts +49 -0
  77. package/lib/core/utils/subtitleParser.d.ts +44 -0
  78. package/lib/core/utils/textDecoder.d.ts +30 -0
  79. package/lib/core/utils/uint8ArrayPolyfill.d.ts +18 -0
  80. package/lib/core/utils/zipReader.d.ts +51 -0
  81. package/lib/core/workers/imageDecoder.worker.d.ts +31 -0
  82. package/lib/core/workers/workerClient.d.ts +14 -0
  83. package/lib/i18n/localeKey.d.ts +1 -1
  84. package/lib/index.cjs +60 -60
  85. package/lib/index.css +1 -1
  86. package/lib/index.d.ts +11 -9
  87. package/lib/index.mjs +15 -12
  88. package/lib/renderers/Audio/index.vue.d.ts +1 -1
  89. package/lib/renderers/Cad/index.vue.d.ts +1 -1
  90. package/lib/renderers/Cad/toolbar.d.ts +2 -2
  91. package/lib/renderers/Csv/index.vue.d.ts +1 -1
  92. package/lib/renderers/Doc/index.vue.d.ts +1 -1
  93. package/lib/renderers/Docx/index.vue.d.ts +1 -1
  94. package/lib/renderers/Epub/index.vue.d.ts +1 -1
  95. package/lib/renderers/Font/index.vue.d.ts +1 -1
  96. package/lib/renderers/Image/index.vue.d.ts +2 -2
  97. package/lib/renderers/Json/index.vue.d.ts +2 -2
  98. package/lib/renderers/Markdown/index.vue.d.ts +1 -1
  99. package/lib/renderers/Mobi/index.vue.d.ts +1 -1
  100. package/lib/renderers/Msg/index.vue.d.ts +1 -1
  101. package/lib/renderers/Pdf/index.vue.d.ts +1 -1
  102. package/lib/renderers/Ppt/index.vue.d.ts +1 -1
  103. package/lib/renderers/Pptx/index.vue.d.ts +2 -2
  104. package/lib/renderers/Subtitle/index.vue.d.ts +1 -1
  105. package/lib/renderers/Text/index.vue.d.ts +2 -2
  106. package/lib/renderers/Unsupported/index.vue.d.ts +1 -1
  107. package/lib/renderers/Video/index.vue.d.ts +1 -1
  108. package/lib/renderers/Xlsx/index.vue.d.ts +2 -2
  109. package/lib/renderers/Xml/index.vue.d.ts +1 -1
  110. package/lib/renderers/Zip/TreeItem.vue.d.ts +1 -1
  111. package/lib/renderers/Zip/index.vue.d.ts +1 -1
  112. package/lib/renderers/base.types.d.ts +1 -1
  113. package/lib/renderers/registry.d.ts +1 -1
  114. package/lib/types.d.ts +3 -3
  115. package/package.json +2 -2
  116. package/lib/chunks/index--612Smof.mjs +0 -383
  117. package/lib/chunks/index-BB0i4QqI.mjs +0 -117
  118. package/lib/chunks/index-BVdrGK3Q.mjs +0 -356
  119. package/lib/chunks/index-Bp9CuvMZ.mjs +0 -157
  120. package/lib/chunks/index-Bxpf9v5j.mjs +0 -104
  121. package/lib/chunks/index-CDg6vIbT.mjs +0 -51
  122. package/lib/chunks/index-CWE-hKSs.mjs +0 -90
  123. package/lib/chunks/index-CY3xzGgt.mjs +0 -108
  124. package/lib/chunks/index-VdzIFJJW.mjs +0 -118
  125. package/lib/chunks/index-aoXgVLBb.mjs +0 -52
@@ -1,21 +1,21 @@
1
- import { defineComponent as ne, ref as z, onMounted as re, onUnmounted as ae, watch as se, openBlock as k, createElementBlock as H, createVNode as le, createCommentVNode as q, createElementVNode as U, toDisplayString as fe, unref as ue } from "vue";
2
- import { u as de, c as ce, k as pe } from "./index-DZZN3kYi.mjs";
1
+ import { defineComponent as re, ref as z, onMounted as se, onUnmounted as ae, watch as le, openBlock as H, createElementBlock as U, createVNode as fe, createCommentVNode as q, createElementVNode as V, toDisplayString as ue, unref as de } from "vue";
2
+ import { u as ce, a as pe, b as me, J as ve } from "./index-c-pYJEmH.mjs";
3
3
  import * as o from "three";
4
- import { OrbitControls as me } from "three/examples/jsm/controls/OrbitControls";
5
- import { DXFLoader as ve } from "three-dxf-loader";
6
- import { STLLoader as ge } from "three/examples/jsm/loaders/STLLoader";
7
- import { OBJLoader as he } from "three/examples/jsm/loaders/OBJLoader";
8
- import { GLTFLoader as we } from "three/examples/jsm/loaders/GLTFLoader";
9
- import { _ as be } from "./RendererError.vue_vue_type_script_setup_true_lang-FmkMQHB8.mjs";
10
- import { T as Me } from "./base.types-DaftHyg7.mjs";
11
- import { RotateCcw as ye, Box as xe, Grid3x3 as Ce, Axis3d as Le } from "lucide-vue-next";
4
+ import { OrbitControls as ge } from "three/examples/jsm/controls/OrbitControls";
5
+ import { DXFLoader as he } from "three-dxf-loader";
6
+ import { STLLoader as we } from "three/examples/jsm/loaders/STLLoader";
7
+ import { OBJLoader as be } from "three/examples/jsm/loaders/OBJLoader";
8
+ import { GLTFLoader as Me } from "three/examples/jsm/loaders/GLTFLoader";
9
+ import { _ as ye } from "./RendererError.vue_vue_type_script_setup_true_lang-FmkMQHB8.mjs";
10
+ import { T as xe } from "./base.types-DaftHyg7.mjs";
11
+ import { RotateCcw as Ce, Box as Le, Grid3x3 as Ee, Axis3d as Pe } from "lucide-vue-next";
12
12
  function _e(m) {
13
13
  return [
14
14
  {
15
15
  items: [
16
16
  {
17
17
  type: "button",
18
- icon: ye,
18
+ icon: Ce,
19
19
  tooltip: m.t("toolbar.reset"),
20
20
  action: () => {
21
21
  var b;
@@ -29,7 +29,7 @@ function _e(m) {
29
29
  ...m.isDxf ? [] : [
30
30
  {
31
31
  type: "button",
32
- icon: xe,
32
+ icon: Le,
33
33
  tooltip: m.wireframe ? m.t("cad.solid") : m.t("cad.wireframe"),
34
34
  active: m.wireframe,
35
35
  action: () => {
@@ -40,7 +40,7 @@ function _e(m) {
40
40
  ],
41
41
  {
42
42
  type: "button",
43
- icon: Ce,
43
+ icon: Ee,
44
44
  tooltip: m.t("cad.grid"),
45
45
  active: m.showGrid,
46
46
  action: () => {
@@ -50,7 +50,7 @@ function _e(m) {
50
50
  },
51
51
  {
52
52
  type: "button",
53
- icon: Le,
53
+ icon: Pe,
54
54
  tooltip: m.t("cad.axes"),
55
55
  active: m.showAxes,
56
56
  action: () => {
@@ -65,10 +65,10 @@ function _e(m) {
65
65
  const Ae = {
66
66
  key: 0,
67
67
  class: "vfp-absolute vfp-inset-0 vfp-bg-surface-3 vfp-z-10"
68
- }, Ee = {
68
+ }, Re = {
69
69
  key: 1,
70
70
  class: "vfp-absolute vfp-inset-0 vfp-renderer-loading vfp-bg-surface-3 vfp-z-10"
71
- }, Pe = { class: "vfp-renderer-loading-content" }, Re = { class: "vfp-renderer-loading-text" }, He = /* @__PURE__ */ ne({
71
+ }, Se = { class: "vfp-renderer-loading-content" }, ze = { class: "vfp-renderer-loading-text" }, ke = /* @__PURE__ */ re({
72
72
  __name: "index",
73
73
  props: {
74
74
  url: {},
@@ -77,32 +77,32 @@ const Ae = {
77
77
  baseUrl: {}
78
78
  },
79
79
  setup(m, { expose: b }) {
80
- const J = (e) => {
80
+ const X = (e) => {
81
81
  if (!e || e.startsWith("blob:") || e.startsWith("data:")) return "";
82
82
  try {
83
83
  return new URL(".", new URL(e, document.baseURI)).href;
84
84
  } catch {
85
85
  return "";
86
86
  }
87
- }, V = (e, t, i, a) => {
88
- const c = Math.max(a.x, a.y, a.z), g = Number.isFinite(c) && c > 0 ? c : 1;
87
+ }, k = (e, t, i, s) => {
88
+ const c = Math.max(s.x, s.y, s.z), g = Number.isFinite(c) && c > 0 ? c : 1;
89
89
  if (e instanceof o.OrthographicCamera) {
90
- const l = (e.right - e.left) / (e.top - e.bottom), h = (Math.max(a.y, a.x / l) || g) * 0.55;
90
+ const l = (e.right - e.left) / (e.top - e.bottom), h = (Math.max(s.y, s.x / l) || g) * 0.55;
91
91
  e.left = -h * l, e.right = h * l, e.top = h, e.bottom = -h, e.near = 0, e.far = g * 4, e.zoom = 1, e.up.set(0, 1, 0), e.position.set(i.x, i.y, i.z + g * 2), e.lookAt(i), t.target.copy(i), t.update(), e.updateProjectionMatrix();
92
92
  return;
93
93
  }
94
- const r = e.fov * (Math.PI / 180), s = Math.abs(g / 2 / Math.tan(r / 2)) * 1.5;
95
- e.near = Math.max(g * 1e-3, 1e-4), e.far = Math.max(s * 4, i.length() * 2 + g * 4, e.near * 100), e.position.set(i.x + s, i.y + s, i.z + s), e.lookAt(i), t.target.copy(i), t.update(), e.updateProjectionMatrix();
96
- }, v = m, { t: P } = de(), X = ce(), x = z(null), A = z(!0), E = z(null), T = z(!1), F = z(!0), G = z(!0);
97
- let n = null, f = null, d = null, u = null, C = null, p = null, w = null, R = null, D = null, S = null, M = !1, L = !0;
98
- const O = new Me(), N = (e, t, i) => {
99
- var a, c, g;
100
- return i != null && i.name ? ((a = i.name.split(".").pop()) == null ? void 0 : a.toLowerCase()) || "" : t ? ((c = t.split(".").pop()) == null ? void 0 : c.toLowerCase()) || "" : ((g = e.split(".").pop()) == null ? void 0 : g.toLowerCase().split("?")[0]) || "";
101
- }, Y = () => {
94
+ const n = e.fov * (Math.PI / 180), a = Math.abs(g / 2 / Math.tan(n / 2)) * 1.5;
95
+ e.near = Math.max(g * 1e-3, 1e-4), e.far = Math.max(a * 4, i.length() * 2 + g * 4, e.near * 100), e.position.set(i.x + a, i.y + a, i.z + a), e.lookAt(i), t.target.copy(i), t.update(), e.updateProjectionMatrix();
96
+ }, v = m, { t: A } = ce(), Y = pe(), W = me(), x = z(null), P = z(!0), _ = z(null), T = z(!1), F = z(!0), G = z(!0);
97
+ let r = null, f = null, d = null, u = null, C = null, p = null, w = null, R = null, D = null, S = null, M = !1, L = !0;
98
+ const O = new xe(), N = (e, t, i) => {
99
+ var s, c, g;
100
+ return i != null && i.name ? ((s = i.name.split(".").pop()) == null ? void 0 : s.toLowerCase()) || "" : t ? ((c = t.split(".").pop()) == null ? void 0 : c.toLowerCase()) || "" : ((g = e.split(".").pop()) == null ? void 0 : g.toLowerCase().split("?")[0]) || "";
101
+ }, Z = () => {
102
102
  if (!u || !f || !C) return;
103
103
  const e = new o.Box3().setFromObject(C), t = e.getCenter(new o.Vector3()), i = e.getSize(new o.Vector3());
104
- V(f, u, t, i), L = !0;
105
- }, Z = () => {
104
+ k(f, u, t, i), L = !0;
105
+ }, $ = () => {
106
106
  T.value = !T.value, C && C.traverse((e) => {
107
107
  if (e instanceof o.Mesh) {
108
108
  const t = e.material;
@@ -111,140 +111,140 @@ const Ae = {
111
111
  }) : t.wireframe = T.value);
112
112
  }
113
113
  }), L = !0, O.notify();
114
- }, $ = () => {
115
- F.value = !F.value, p && (p.visible = F.value), L = !0, O.notify();
116
114
  }, K = () => {
115
+ F.value = !F.value, p && (p.visible = F.value), L = !0, O.notify();
116
+ }, Q = () => {
117
117
  G.value = !G.value, w && (w.visible = G.value), L = !0, O.notify();
118
- }, Q = (e) => {
119
- if (!n) return;
120
- const t = e.getSize(new o.Vector3()), i = Math.max(t.x, t.y, t.z), a = Number.isFinite(i) && i > 0 ? i : 1, c = Math.max(
118
+ }, ee = (e) => {
119
+ if (!r) return;
120
+ const t = e.getSize(new o.Vector3()), i = Math.max(t.x, t.y, t.z), s = Number.isFinite(i) && i > 0 ? i : 1, c = Math.max(
121
121
  Math.abs(e.min.x),
122
122
  Math.abs(e.max.x),
123
123
  Math.abs(e.min.y),
124
124
  Math.abs(e.max.y),
125
125
  Math.abs(e.min.z),
126
126
  Math.abs(e.max.z)
127
- ), g = Number.isFinite(c) ? c : a, r = Math.max(a, g * 1.25), s = f instanceof o.OrthographicCamera, l = s ? a * 2 : Math.max(a * 2, g * 2.5);
128
- p && (p.geometry.dispose(), p.material.dispose(), n.remove(p)), w && (w.geometry.dispose(), w.material.dispose(), n.remove(w)), p = new o.GridHelper(l, 20, 4473924, 2236962), s && (p.rotation.x = Math.PI / 2, e.getCenter(p.position), p.position.z = e.min.z - a * 1e-3), p.visible = F.value, n.add(p), w = new o.AxesHelper(r), w.visible = G.value, n.add(w);
127
+ ), g = Number.isFinite(c) ? c : s, n = Math.max(s, g * 1.25), a = f instanceof o.OrthographicCamera, l = a ? s * 2 : Math.max(s * 2, g * 2.5);
128
+ p && (p.geometry.dispose(), p.material.dispose(), r.remove(p)), w && (w.geometry.dispose(), w.material.dispose(), r.remove(w)), p = new o.GridHelper(l, 20, 4473924, 2236962), a && (p.rotation.x = Math.PI / 2, e.getCenter(p.position), p.position.z = e.min.z - s * 1e-3), p.visible = F.value, r.add(p), w = new o.AxesHelper(n), w.visible = G.value, r.add(w);
129
129
  };
130
130
  b({
131
131
  getToolbarGroups: () => _e({
132
- cadRef: { resetView: Y, toggleWireframe: Z, toggleGrid: $, toggleAxes: K },
132
+ cadRef: { resetView: Z, toggleWireframe: $, toggleGrid: K, toggleAxes: Q },
133
133
  isDxf: N(v.url, v.fileName, v.file) === "dxf",
134
134
  wireframe: T.value,
135
135
  showGrid: F.value,
136
136
  showAxes: G.value,
137
- t: P.value
137
+ t: A.value
138
138
  }),
139
139
  onToolbarChange: (e) => O.subscribe(e)
140
140
  });
141
- const ee = (e) => {
141
+ const te = (e) => {
142
142
  e.traverse((t) => {
143
143
  t.geometry && t.geometry.dispose(), t.material && (Array.isArray(t.material) ? t.material.forEach((i) => {
144
- W(i);
145
- }) : W(t.material));
144
+ j(i);
145
+ }) : j(t.material));
146
146
  });
147
- }, W = (e) => {
147
+ }, j = (e) => {
148
148
  e.map && e.map.dispose(), e.lightMap && e.lightMap.dispose(), e.bumpMap && e.bumpMap.dispose(), e.normalMap && e.normalMap.dispose(), e.specularMap && e.specularMap.dispose(), e.envMap && e.envMap.dispose(), e.dispose();
149
- }, j = () => {
149
+ }, I = () => {
150
150
  if (!x.value) return;
151
151
  M = !1, S = new AbortController();
152
152
  const e = x.value, t = e.clientWidth, i = e.clientHeight;
153
- n = new o.Scene(), n.background = new o.Color(1710618);
154
- const a = N(v.url, v.fileName, v.file) === "dxf", c = Math.max(t, 1) / Math.max(i, 1);
155
- f = a ? new o.OrthographicCamera(-c, c, 1, -1, 0, 1e6) : new o.PerspectiveCamera(45, c, 0.01, 1e6), f.position.set(100, 100, 100), d = new o.WebGLRenderer({ antialias: !0 }), d.setSize(t, i), d.setPixelRatio(Math.min(window.devicePixelRatio, 2)), L = !0, e.appendChild(d.domElement), u = new me(f, d.domElement), u.enableDamping = !0, u.dampingFactor = 0.05, a && (u.enableRotate = !1, u.screenSpacePanning = !0, u.mouseButtons.LEFT = o.MOUSE.PAN, u.touches.ONE = o.TOUCH.PAN, u.touches.TWO = o.TOUCH.DOLLY_PAN);
153
+ r = new o.Scene(), r.background = new o.Color(1710618);
154
+ const s = N(v.url, v.fileName, v.file) === "dxf", c = Math.max(t, 1) / Math.max(i, 1);
155
+ f = s ? new o.OrthographicCamera(-c, c, 1, -1, 0, 1e6) : new o.PerspectiveCamera(45, c, 0.01, 1e6), f.position.set(100, 100, 100), d = new o.WebGLRenderer({ antialias: !0 }), d.setSize(t, i), d.setPixelRatio(Math.min(window.devicePixelRatio, 2)), L = !0, e.appendChild(d.domElement), u = new ge(f, d.domElement), u.enableDamping = !0, u.dampingFactor = 0.05, s && (u.enableRotate = !1, u.screenSpacePanning = !0, u.mouseButtons.LEFT = o.MOUSE.PAN, u.touches.ONE = o.TOUCH.PAN, u.touches.TWO = o.TOUCH.DOLLY_PAN);
156
156
  const g = new o.AmbientLight(16777215, 0.6);
157
- n.add(g);
158
- const r = new o.DirectionalLight(16777215, 0.8);
159
- r.position.set(1, 1, 1), n.add(r);
160
- const s = new o.DirectionalLight(16777215, 0.4);
161
- s.position.set(-1, -1, -1), n.add(s), te();
157
+ r.add(g);
158
+ const n = new o.DirectionalLight(16777215, 0.8);
159
+ n.position.set(1, 1, 1), r.add(n);
160
+ const a = new o.DirectionalLight(16777215, 0.4);
161
+ a.position.set(-1, -1, -1), r.add(a), oe();
162
162
  const l = () => {
163
163
  if (M) return;
164
- D = requestAnimationFrame(l), ((u == null ? void 0 : u.update()) || L) && n && f && d && (d.render(n, f), L = !1);
164
+ D = requestAnimationFrame(l), ((u == null ? void 0 : u.update()) || L) && r && f && d && (d.render(r, f), L = !1);
165
165
  };
166
- l(), R = new ResizeObserver(oe), R.observe(e);
167
- }, te = () => {
168
- if (!n || !f || !u || M) return;
166
+ l(), R = new ResizeObserver(ie), R.observe(e);
167
+ }, oe = () => {
168
+ if (W.begin(v.url), !r || !f || !u || M) return;
169
169
  const e = N(v.url, v.fileName, v.file);
170
170
  let t;
171
171
  const i = new o.LoadingManager();
172
172
  if (e === "dxf")
173
- t = new ve();
173
+ t = new he();
174
174
  else if (e === "stl")
175
- t = new ge(i);
175
+ t = new we(i);
176
176
  else if (e === "obj")
177
- t = new he(i);
177
+ t = new be(i);
178
178
  else if (e === "gltf" || e === "glb")
179
- t = new we(i);
179
+ t = new Me(i);
180
180
  else {
181
- E.value = P.value("cad.parse_failed"), A.value = !1;
181
+ _.value = A.value("cad.parse_failed"), P.value = !1;
182
182
  return;
183
183
  }
184
- const a = (r, s) => {
184
+ const s = (n, a) => {
185
185
  if (M) return;
186
- if (!r) {
187
- E.value = P.value("cad.parse_failed"), A.value = !1;
186
+ if (!n) {
187
+ _.value = A.value("cad.parse_failed"), P.value = !1;
188
188
  return;
189
189
  }
190
190
  let l;
191
- if (s === "stl") {
192
- const _ = r, ie = new o.MeshPhongMaterial({
191
+ if (a === "stl") {
192
+ const E = n, ne = new o.MeshPhongMaterial({
193
193
  color: 8947848,
194
194
  flatShading: !0,
195
195
  side: o.DoubleSide
196
196
  });
197
- l = new o.Mesh(_, ie);
198
- } else if (s === "gltf" || s === "glb") {
199
- if (l = r.scene, !l) {
200
- E.value = P.value("cad.parse_failed"), A.value = !1;
197
+ l = new o.Mesh(E, ne);
198
+ } else if (a === "gltf" || a === "glb") {
199
+ if (l = n.scene, !l) {
200
+ _.value = A.value("cad.parse_failed"), P.value = !1;
201
201
  return;
202
202
  }
203
203
  } else
204
- l = r, l.traverse((_) => {
205
- _ instanceof o.Mesh && !_.material && (_.material = new o.MeshPhongMaterial({
204
+ l = n, l.traverse((E) => {
205
+ E instanceof o.Mesh && !E.material && (E.material = new o.MeshPhongMaterial({
206
206
  color: 8947848,
207
207
  side: o.DoubleSide
208
208
  }));
209
209
  });
210
210
  const h = new o.Box3().setFromObject(l);
211
211
  if (h.isEmpty()) {
212
- E.value = P.value("cad.parse_failed"), A.value = !1;
212
+ _.value = A.value("cad.parse_failed"), P.value = !1;
213
213
  return;
214
214
  }
215
- n.add(l), C = l;
215
+ r.add(l), C = l;
216
216
  const y = h.getCenter(new o.Vector3()), B = h.getSize(new o.Vector3());
217
- Q(h), V(f, u, y, B), L = !0, A.value = !1, O.notify();
218
- }, c = (r) => {
219
- M || r.name !== "AbortError" && (E.value = P.value("cad.load_failed"), A.value = !1);
217
+ ee(h), k(f, u, y, B), L = !0, P.value = !1, O.notify();
218
+ }, c = (n) => {
219
+ M || n.name !== "AbortError" && (_.value = A.value("cad.load_failed"), P.value = !1, W.error(n));
220
220
  };
221
- (v.file ? v.file.arrayBuffer() : X.value(v.url, { signal: S == null ? void 0 : S.signal }).then((r) => {
221
+ (v.file ? v.file.arrayBuffer() : Y.value(v.url, { signal: S == null ? void 0 : S.signal }).then((n) => {
222
222
  if (!M) {
223
- if (!r.ok) throw new pe("file.load_failed");
224
- return r.arrayBuffer();
223
+ if (!n.ok) throw new ve("file.load_failed");
224
+ return n.arrayBuffer();
225
225
  }
226
- })).then((r) => {
227
- if (!(M || !r)) {
226
+ })).then((n) => {
227
+ if (!(M || !n)) {
228
228
  if (e === "stl") {
229
- const s = t.parse(r);
230
- a(s, e);
229
+ const a = t.parse(n);
230
+ s(a, e);
231
231
  } else if (e === "obj") {
232
- const l = new TextDecoder("utf-8").decode(r), h = t.parse(l);
233
- a(h, e);
232
+ const l = new TextDecoder("utf-8").decode(n), h = t.parse(l);
233
+ s(h, e);
234
234
  } else if (e === "gltf" || e === "glb")
235
235
  t.parse(
236
- r,
237
- J(v.baseUrl || v.url),
238
- (s) => {
239
- M || a(s, e);
236
+ n,
237
+ X(v.baseUrl || v.url),
238
+ (a) => {
239
+ M || s(a, e);
240
240
  },
241
- (s) => c(s)
241
+ (a) => c(a)
242
242
  );
243
243
  else if (e === "dxf") {
244
- const l = new TextDecoder("utf-8").decode(r), h = o.BufferGeometry.prototype.setFromPoints;
244
+ const l = new TextDecoder("utf-8").decode(n), h = o.BufferGeometry.prototype.setFromPoints;
245
245
  o.BufferGeometry.prototype.setFromPoints = function(y) {
246
246
  const B = (y || []).filter(
247
- (_) => _ && _.x !== void 0 && _.y !== void 0
247
+ (E) => E && E.x !== void 0 && E.y !== void 0
248
248
  );
249
249
  return h.call(this, B);
250
250
  };
@@ -254,7 +254,7 @@ const Ae = {
254
254
  (y) => {
255
255
  if (!M) {
256
256
  const B = (y == null ? void 0 : y.entity) || y;
257
- a(B, e);
257
+ s(B, e);
258
258
  }
259
259
  },
260
260
  (y) => {
@@ -268,39 +268,39 @@ const Ae = {
268
268
  }
269
269
  }
270
270
  }
271
- }).catch((r) => {
272
- M || c(r);
271
+ }).catch((n) => {
272
+ M || c(n);
273
273
  });
274
- }, oe = () => {
274
+ }, ie = () => {
275
275
  if (!x.value || !f || !d || M) return;
276
276
  const e = x.value.clientWidth, t = x.value.clientHeight;
277
277
  e <= 0 || t <= 0 || (f instanceof o.OrthographicCamera ? (f.right = f.top * e / t, f.left = -f.right) : f.aspect = e / t, f.updateProjectionMatrix(), d.setSize(e, t), L = !0);
278
- }, I = () => {
279
- M = !0, S && S.abort(), D !== null && (cancelAnimationFrame(D), D = null), R == null || R.disconnect(), R = null, C && (ee(C), n == null || n.remove(C), C = null), p && (p.geometry.dispose(), p.material.dispose(), n == null || n.remove(p), p = null), w && (w.geometry.dispose(), w.material.dispose(), n == null || n.remove(w), w = null), u == null || u.dispose(), d == null || d.dispose(), x.value && (d != null && d.domElement) && x.value.contains(d.domElement) && x.value.removeChild(d.domElement), n = null, f = null, d = null, u = null;
278
+ }, J = () => {
279
+ M = !0, S && S.abort(), D !== null && (cancelAnimationFrame(D), D = null), R == null || R.disconnect(), R = null, C && (te(C), r == null || r.remove(C), C = null), p && (p.geometry.dispose(), p.material.dispose(), r == null || r.remove(p), p = null), w && (w.geometry.dispose(), w.material.dispose(), r == null || r.remove(w), w = null), u == null || u.dispose(), d == null || d.dispose(), x.value && (d != null && d.domElement) && x.value.contains(d.domElement) && x.value.removeChild(d.domElement), r = null, f = null, d = null, u = null;
280
280
  };
281
- return re(() => {
282
- j();
283
- }), ae(() => {
281
+ return se(() => {
284
282
  I();
285
- }), se(() => v.url, () => {
286
- I(), A.value = !0, E.value = null, x.value && j();
287
- }), (e, t) => (k(), H("div", {
283
+ }), ae(() => {
284
+ J();
285
+ }), le(() => v.url, () => {
286
+ J(), P.value = !0, _.value = null, x.value && I();
287
+ }), (e, t) => (H(), U("div", {
288
288
  ref_key: "containerRef",
289
289
  ref: x,
290
290
  class: "vfp-relative vfp-w-full vfp-h-full vfp-bg-media-bg"
291
291
  }, [
292
- E.value ? (k(), H("div", Ae, [
293
- le(be, { message: E.value }, null, 8, ["message"])
292
+ _.value ? (H(), U("div", Ae, [
293
+ fe(ye, { message: _.value }, null, 8, ["message"])
294
294
  ])) : q("", !0),
295
- A.value ? (k(), H("div", Ee, [
296
- U("div", Pe, [
297
- t[0] || (t[0] = U("div", { class: "vfp-renderer-spinner" }, null, -1)),
298
- U("p", Re, fe(ue(P)("cad.loading")), 1)
295
+ P.value ? (H(), U("div", Re, [
296
+ V("div", Se, [
297
+ t[0] || (t[0] = V("div", { class: "vfp-renderer-spinner" }, null, -1)),
298
+ V("p", ze, ue(de(A)("cad.loading")), 1)
299
299
  ])
300
300
  ])) : q("", !0)
301
301
  ], 512));
302
302
  }
303
303
  });
304
304
  export {
305
- He as default
305
+ ke as default
306
306
  };
@@ -1,42 +1,42 @@
1
- import { defineComponent as D, computed as K, ref as i, watch as k, nextTick as O, openBlock as d, createElementBlock as p, createElementVNode as y, toDisplayString as E, unref as R, createBlock as N } from "vue";
2
- import X from "markdown-it";
3
- import Y from "@traptitech/markdown-it-katex";
4
- import { codeToHtml as B } from "shiki";
5
- import { Code as F, Eye as W } from "lucide-vue-next";
6
- import { u as z, c as J, g as Q, X as U, _ as Z } from "./index-DZZN3kYi.mjs";
7
- import { _ as ee } from "./RendererError.vue_vue_type_script_setup_true_lang-FmkMQHB8.mjs";
8
- import { T as te } from "./base.types-DaftHyg7.mjs";
9
- const oe = {
1
+ import { defineComponent as K, computed as O, ref as i, watch as k, nextTick as R, openBlock as d, createElementBlock as p, createElementVNode as y, toDisplayString as B, unref as N, createBlock as Y } from "vue";
2
+ import F from "markdown-it";
3
+ import W from "@traptitech/markdown-it-katex";
4
+ import { codeToHtml as L } from "shiki";
5
+ import { Code as z, Eye as J } from "lucide-vue-next";
6
+ import { u as Q, a as U, b as X, g as Z, h as ee, e as te } from "./index-c-pYJEmH.mjs";
7
+ import { _ as oe } from "./RendererError.vue_vue_type_script_setup_true_lang-FmkMQHB8.mjs";
8
+ import { T as re } from "./base.types-DaftHyg7.mjs";
9
+ const ne = {
10
10
  key: 0,
11
11
  class: "vfp-renderer-loading"
12
- }, re = { class: "vfp-renderer-loading-content" }, ne = { class: "vfp-renderer-loading-text" }, ae = {
12
+ }, se = { class: "vfp-renderer-loading-content" }, le = { class: "vfp-renderer-loading-text" }, ae = {
13
13
  key: 2,
14
14
  class: "vfp-w-full vfp-h-full vfp-overflow-auto",
15
15
  style: { background: "var(--fp-code-bg)" }
16
- }, le = {
16
+ }, ce = {
17
17
  key: 0,
18
18
  class: "vfp-p-6 vfp-text-fg-primary vfp-font-mono vfp-text-sm vfp-whitespace-pre-wrap vfp-break-words"
19
- }, se = ["innerHTML"], ce = {
19
+ }, ie = ["innerHTML"], de = {
20
20
  key: 3,
21
21
  class: "vfp-w-full vfp-h-full vfp-overflow-auto vfp-py-6 vfp-px-4"
22
- }, ie = ["innerHTML"], L = '<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>', q = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>', de = '<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>', ue = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>', pe = /* @__PURE__ */ D({
22
+ }, ue = ["innerHTML"], q = '<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>', V = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>', pe = '<svg xmlns="http://www.w3.org/2000/svg" width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>', ve = '<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6 9 17l-5-5"/></svg>', he = /* @__PURE__ */ K({
23
23
  __name: "index",
24
24
  props: {
25
25
  url: {}
26
26
  },
27
- setup(V, { expose: G }) {
28
- const x = V, C = new te(), { t: s } = z(), $ = J(), j = Q(), _ = K(() => j.value === "light" ? "github-light" : "github-dark"), c = i("preview"), b = i(""), v = i(""), h = i(""), u = i(!0), f = i(null), m = i(null);
27
+ setup(G, { expose: $ }) {
28
+ const _ = G, C = new re(), { t: a } = Q(), j = U(), T = X(), A = Z(), b = O(() => A.value === "light" ? "github-light" : "github-dark"), c = i("preview"), x = i(""), v = i(""), h = i(""), u = i(!0), f = i(null), m = i(null);
29
29
  k([c, u], () => {
30
30
  C.notify();
31
- }), G({
31
+ }), $({
32
32
  getToolbarGroups: () => {
33
33
  const e = [];
34
34
  return e.push({
35
35
  items: [
36
36
  {
37
37
  type: "button",
38
- icon: c.value === "preview" ? F : W,
39
- tooltip: c.value === "preview" ? s.value("toolbar.source") : s.value("toolbar.preview"),
38
+ icon: c.value === "preview" ? z : J,
39
+ tooltip: c.value === "preview" ? a.value("toolbar.source") : a.value("toolbar.preview"),
40
40
  action: () => {
41
41
  c.value = c.value === "preview" ? "source" : "preview";
42
42
  },
@@ -47,48 +47,48 @@ const oe = {
47
47
  },
48
48
  onToolbarChange: (e) => C.subscribe(e)
49
49
  });
50
- const a = new X({
50
+ const s = new F({
51
51
  html: !0,
52
52
  linkify: !0,
53
53
  typographer: !1,
54
54
  breaks: !1
55
55
  });
56
- a.use(Y), a.renderer.rules.fence = (e, r) => {
56
+ s.use(W), s.renderer.rules.fence = (e, r) => {
57
57
  const t = e[r], n = t.info ? t.info.trim() : "", o = t.content;
58
58
  return n ? `<div class="code-block-wrapper">
59
59
  <div class="code-block-header">
60
60
  <span>${n}</span>
61
61
  </div>
62
- <pre data-shiki-pending="1" data-lang="${n}"><code>${a.utils.escapeHtml(o)}</code></pre>
62
+ <pre data-shiki-pending="1" data-lang="${n}"><code>${s.utils.escapeHtml(o)}</code></pre>
63
63
  </div>` : `<div class="code-block-wrapper">
64
- <pre class="no-lang-pre"><code>${a.utils.escapeHtml(o)}</code></pre>
64
+ <pre class="no-lang-pre"><code>${s.utils.escapeHtml(o)}</code></pre>
65
65
  </div>`;
66
- }, a.renderer.rules.code_block = (e, r) => {
66
+ }, s.renderer.rules.code_block = (e, r) => {
67
67
  const t = e[r].content;
68
68
  return `<div class="code-block-wrapper">
69
- <pre class="no-lang-pre"><code>${a.utils.escapeHtml(t)}</code></pre>
69
+ <pre class="no-lang-pre"><code>${s.utils.escapeHtml(t)}</code></pre>
70
70
  </div>`;
71
71
  };
72
- const A = a.renderer.rules.table_open || ((e, r, t, n, o) => o.renderToken(e, r, t));
73
- a.renderer.rules.table_open = (e, r, t, n, o) => '<div class="table-wrapper">' + A(e, r, t, n, o);
74
- const I = a.renderer.rules.table_close || ((e, r, t, n, o) => o.renderToken(e, r, t));
75
- a.renderer.rules.table_close = (e, r, t, n, o) => I(e, r, t, n, o) + "</div>";
76
- const T = async () => {
77
- u.value = !0, f.value = null;
72
+ const P = s.renderer.rules.table_open || ((e, r, t, n, o) => o.renderToken(e, r, t));
73
+ s.renderer.rules.table_open = (e, r, t, n, o) => '<div class="table-wrapper">' + P(e, r, t, n, o);
74
+ const I = s.renderer.rules.table_close || ((e, r, t, n, o) => o.renderToken(e, r, t));
75
+ s.renderer.rules.table_close = (e, r, t, n, o) => I(e, r, t, n, o) + "</div>";
76
+ const M = async () => {
77
+ T.begin(_.url), u.value = !0, f.value = null;
78
78
  try {
79
- const e = await U(x.url, { fetcher: $.value });
80
- b.value = e, v.value = a.render(e), u.value = !1;
79
+ const e = await ee(_.url, { fetcher: j.value });
80
+ x.value = e, v.value = s.render(e), u.value = !1;
81
81
  try {
82
- h.value = await B(e, { lang: "markdown", theme: _.value });
82
+ h.value = await L(e, { lang: "markdown", theme: b.value });
83
83
  } catch {
84
84
  h.value = "";
85
85
  }
86
86
  } catch (e) {
87
- console.error(e), f.value = s.value("markdown.load_failed"), u.value = !1;
87
+ console.error(e), f.value = a.value("markdown.load_failed"), u.value = !1, T.error(e);
88
88
  }
89
- }, M = (e, r) => {
89
+ }, S = (e, r) => {
90
90
  const t = document.createElement("button");
91
- return t.type = "button", t.className = r ? "code-copy-btn" : "code-copy-btn code-copy-float", t.title = s.value("markdown.copy_code"), t.innerHTML = r ? L : q, t.addEventListener("click", async (n) => {
91
+ return t.type = "button", t.className = r ? "code-copy-btn" : "code-copy-btn code-copy-float", t.title = a.value("markdown.copy_code"), t.innerHTML = r ? q : V, t.addEventListener("click", async (n) => {
92
92
  n.stopPropagation();
93
93
  try {
94
94
  await navigator.clipboard.writeText(e);
@@ -96,21 +96,21 @@ const oe = {
96
96
  const o = document.createElement("textarea");
97
97
  o.value = e, document.body.appendChild(o), o.select(), document.execCommand("copy"), document.body.removeChild(o);
98
98
  }
99
- t.innerHTML = r ? de : ue, t.title = s.value("markdown.copied"), setTimeout(() => {
100
- t.innerHTML = r ? L : q, t.title = s.value("markdown.copy_code");
99
+ t.innerHTML = r ? pe : ve, t.title = a.value("markdown.copied"), setTimeout(() => {
100
+ t.innerHTML = r ? q : V, t.title = a.value("markdown.copy_code");
101
101
  }, 2e3);
102
102
  }), t;
103
- }, P = async () => {
103
+ }, D = async () => {
104
104
  var t, n;
105
105
  if (!m.value) return;
106
106
  const e = m.value.querySelectorAll('pre[data-shiki-pending="1"]');
107
107
  for (const o of e) {
108
108
  const w = o.getAttribute("data-lang") || "text", l = ((t = o.querySelector("code")) == null ? void 0 : t.textContent) || "";
109
109
  try {
110
- const g = await B(l, { lang: w, theme: _.value }), S = document.createElement("div");
111
- S.innerHTML = g;
112
- const H = S.firstElementChild;
113
- H && o.replaceWith(H);
110
+ const g = await L(l, { lang: w, theme: b.value }), H = document.createElement("div");
111
+ H.innerHTML = g;
112
+ const E = H.firstElementChild;
113
+ E && o.replaceWith(E);
114
114
  } catch {
115
115
  o.style.backgroundColor = "var(--fp-code-bg)", o.removeAttribute("data-shiki-pending");
116
116
  }
@@ -119,19 +119,19 @@ const oe = {
119
119
  for (const o of r) {
120
120
  if (o.querySelector(".code-copy-btn")) continue;
121
121
  const w = o.querySelector(".code-block-header"), l = o.querySelector("pre"), g = ((n = l == null ? void 0 : l.querySelector("code")) == null ? void 0 : n.textContent) ?? (l == null ? void 0 : l.textContent) ?? "";
122
- w ? w.appendChild(M(g, !0)) : o.appendChild(M(g, !1));
122
+ w ? w.appendChild(S(g, !0)) : o.appendChild(S(g, !1));
123
123
  }
124
124
  };
125
- return k(() => x.url, T, { immediate: !0 }), k(v, async () => {
126
- v.value && (await O(), P());
127
- }), k(_, () => {
128
- b.value && T();
129
- }), (e, r) => u.value ? (d(), p("div", oe, [
130
- y("div", re, [
125
+ return k(() => _.url, M, { immediate: !0 }), k(v, async () => {
126
+ v.value && (await R(), D());
127
+ }), k(b, () => {
128
+ x.value && M();
129
+ }), (e, r) => u.value ? (d(), p("div", ne, [
130
+ y("div", se, [
131
131
  r[0] || (r[0] = y("div", { class: "vfp-renderer-spinner" }, null, -1)),
132
- y("span", ne, E(R(s)("common.loading")), 1)
132
+ y("span", le, B(N(a)("common.loading")), 1)
133
133
  ])
134
- ])) : f.value ? (d(), N(ee, {
134
+ ])) : f.value ? (d(), Y(oe, {
135
135
  key: 1,
136
136
  message: f.value
137
137
  }, null, 8, ["message"])) : c.value === "source" ? (d(), p("div", ae, [
@@ -139,17 +139,17 @@ const oe = {
139
139
  key: 1,
140
140
  class: "shiki-wrapper",
141
141
  innerHTML: h.value
142
- }, null, 8, se)) : (d(), p("pre", le, E(b.value), 1))
143
- ])) : (d(), p("div", ce, [
142
+ }, null, 8, ie)) : (d(), p("pre", ce, B(x.value), 1))
143
+ ])) : (d(), p("div", de, [
144
144
  y("div", {
145
145
  ref_key: "containerRef",
146
146
  ref: m,
147
147
  class: "markdown-body",
148
148
  innerHTML: v.value
149
- }, null, 8, ie)
149
+ }, null, 8, ue)
150
150
  ]));
151
151
  }
152
- }), be = /* @__PURE__ */ Z(pe, [["__scopeId", "data-v-9a471ad8"]]);
152
+ }), Ce = /* @__PURE__ */ te(he, [["__scopeId", "data-v-51689691"]]);
153
153
  export {
154
- be as default
154
+ Ce as default
155
155
  };