@tresjs/core 5.0.0-next.0 → 5.0.0-next.1

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.
package/dist/tres.js CHANGED
@@ -1,44 +1,44 @@
1
1
  /**
2
2
  * name: @tresjs/core
3
- * version: v5.0.0-next.0
3
+ * version: v5.0.0-next.1
4
4
  * (c) 2025
5
5
  * description: Declarative ThreeJS using Vue Components
6
6
  * author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
7
7
  */
8
- var io = Object.defineProperty;
9
- var uo = (e, t, n) => t in e ? io(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
10
- var Xe = (e, t, n) => uo(e, typeof t != "symbol" ? t + "" : t, n);
11
- import { reactive as At, toValue as ot, watch as ye, onUnmounted as le, defineComponent as He, renderSlot as ir, unref as W, withAsyncContext as ao, ref as X, computed as ue, watchEffect as Ct, shallowRef as Z, readonly as st, provide as Le, inject as lo, isRef as co, useSlots as fo, getCurrentInstance as Nt, onMounted as po, createElementBlock as _o, openBlock as ho, normalizeStyle as mo, normalizeClass as go, createRenderer as Eo, h as Ut, Fragment as vo } from "vue";
12
- import * as ur from "three";
13
- import { Scene as ar, MathUtils as lr, Vector3 as Tt, MeshBasicMaterial as cr, DoubleSide as yo, TextureLoader as Ao, PerspectiveCamera as it, Camera as Co, Clock as fr, REVISION as To, Color as Ae, NoToneMapping as Oo, PCFSoftShadowMap as So, ACESFilmicToneMapping as dr, SRGBColorSpace as bo, WebGLRenderer as Ze, Vector2 as Je, Raycaster as wo, Object3D as Do, BufferAttribute as ko, ArrowHelper as Po, Line as Io, BufferGeometry as Ht, Float32BufferAttribute as jt, LineBasicMaterial as Ro, Mesh as xo, BackSide as Mo, HemisphereLightHelper as Bo, SpotLightHelper as Lo, PointLightHelper as Vo, DirectionalLightHelper as Fo } from "three";
14
- import { useAsyncState as No, whenever as zt, tryOnScopeDispose as Uo, toValue as B, unrefElement as Ho, useDevicePixelRatio as jo, useWindowSize as zo, useElementSize as Ko, refDebounced as Kt, usePointer as $o, useElementBounding as Go, createEventHook as $, useFps as Wo, useMemory as Yo, useRafFn as pr } from "@vueuse/core";
15
- const qo = "@tresjs/core", Xo = "module", Zo = "5.0.0-next.0", Jo = "pnpm@10.6.3", Qo = "Declarative ThreeJS using Vue Components", es = "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)", ts = "MIT", ns = { type: "git", url: "git+https://github.com/Tresjs/tres.git" }, rs = ["vue", "3d", "threejs", "three", "threejs-vue"], os = !1, ss = { ".": { types: "./dist/index.d.ts", import: "./dist/tres.js" }, "./components": { types: "./dist/src/components/index.d.ts" }, "./composables": { types: "./dist/src/composables/index.d.ts" }, "./types": { types: "./dist/src/types/index.d.ts" }, "./utils": { types: "./dist/src/utils/index.d.ts" }, "./*": "./*" }, is = "./dist/tres.js", us = "./dist/tres.js", as = "./dist/index.d.ts", ls = ["*.d.ts", "dist"], cs = { access: "public" }, fs = { dev: "pnpm --filter='./playground/vue' dev", "dev:nuxt": "pnpm --filter='./playground/nuxt' dev", build: "vite build", test: "vitest", "test:ci": "vitest run", "test:ui": "vitest --ui --coverage.enabled=true", release: "release-it", coverage: "vitest run --coverage", lint: "eslint .", "lint:fix": "eslint . --fix", "docs:dev": "vitepress dev docs", "docs:build": "vitepress build docs", "docs:serve": "vitepress serve docs", "docs:preview": "vitepress preview docs", "docs:contributors": "esno scripts/update-contributors.ts" }, ds = { three: ">=0.133", vue: ">=3.4" }, ps = { "@alvarosabu/utils": "^3.2.0", "@vue/devtools-api": "^7.7.2", "@vueuse/core": "^12.5.0" }, _s = { "@release-it/conventional-changelog": "^10.0.0", "@stackblitz/sdk": "^1.11.0", "@tresjs/cientos": "4.1.0", "@tresjs/eslint-config": "^1.4.0", "@types/three": "^0.173.0", "@typescript-eslint/eslint-plugin": "^8.23.0", "@typescript-eslint/parser": "^8.23.0", "@vitejs/plugin-vue": "^5.2.1", "@vitest/coverage-c8": "^0.33.0", "@vitest/coverage-v8": "^3.0.5", "@vitest/ui": "^3.0.5", "@vue/test-utils": "^2.4.6", eslint: "^9.19.0", "eslint-plugin-vue": "^9.32.0", esno: "^4.8.0", gsap: "^3.12.7", jsdom: "^26.0.0", kolorist: "^1.8.0", ohmyfetch: "^0.4.21", pathe: "^2.0.2", "release-it": "^18.1.2", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-copy": "^3.5.0", "rollup-plugin-visualizer": "^5.14.0", sponsorkit: "^16.3.0", three: "^0.173.0", unocss: "^65.4.3", unplugin: "^2.1.2", "unplugin-vue-components": "^28.0.0", vite: "^6.1.0", "vite-plugin-banner": "^0.8.0", "vite-plugin-dts": "4.5.0", "vite-plugin-inspect": "^10.1.0", "vite-plugin-require-transform": "^1.0.21", "vite-svg-loader": "^5.1.0", vitepress: "1.6.3", vitest: "3.0.5", vue: "3.5.13", "vue-demi": "^0.14.10" }, hs = {
16
- name: qo,
17
- type: Xo,
18
- version: Zo,
19
- packageManager: Jo,
20
- description: Qo,
21
- author: es,
22
- license: ts,
23
- repository: ns,
24
- keywords: rs,
25
- sideEffects: os,
26
- exports: ss,
27
- main: is,
28
- module: us,
29
- types: as,
30
- files: ls,
31
- publishConfig: cs,
32
- scripts: fs,
33
- peerDependencies: ds,
34
- dependencies: ps,
35
- devDependencies: _s
8
+ var ro = Object.defineProperty;
9
+ var oo = (e, t, n) => t in e ? ro(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
10
+ var Ye = (e, t, n) => oo(e, typeof t != "symbol" ? t + "" : t, n);
11
+ import { reactive as so, toValue as I, watch as Ae, onUnmounted as me, defineComponent as nt, renderSlot as io, unref as X, ref as ie, computed as Z, watchEffect as At, shallowRef as J, triggerRef as uo, readonly as rt, provide as Be, inject as ao, isRef as Ce, useSlots as lo, getCurrentInstance as Lt, onMounted as co, createElementBlock as fo, openBlock as po, normalizeStyle as _o, normalizeClass as ho, createRenderer as mo, h as Vt, Fragment as go } from "vue";
12
+ import * as nr from "three";
13
+ import { Layers as Eo, Scene as rr, MathUtils as or, Vector3 as Ct, MeshBasicMaterial as sr, DoubleSide as vo, Clock as ir, REVISION as yo, Color as Oe, NoToneMapping as Ao, PCFSoftShadowMap as Co, ACESFilmicToneMapping as ur, SRGBColorSpace as Oo, WebGLRenderer as qe, Vector2 as Xe, Raycaster as To, Object3D as bo, BufferAttribute as So, PerspectiveCamera as Do, ArrowHelper as wo, Line as ko, BufferGeometry as Ft, Float32BufferAttribute as Nt, LineBasicMaterial as Po, Mesh as Io, BackSide as Ro, HemisphereLightHelper as xo, SpotLightHelper as Mo, PointLightHelper as Bo, DirectionalLightHelper as Lo } from "three";
14
+ import { useAsyncState as Vo, whenever as He, tryOnScopeDispose as Fo, unrefElement as No, createEventHook as z, useDevicePixelRatio as Uo, useWindowSize as Ho, useElementSize as jo, refDebounced as Ut, usePointer as $o, useElementBounding as zo, useRafFn as ar, useFps as Ko, useMemory as Go } from "@vueuse/core";
15
+ const Wo = "@tresjs/core", Yo = "module", qo = "5.0.0-next.1", Xo = "pnpm@10.6.3", Zo = "Declarative ThreeJS using Vue Components", Jo = "Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)", Qo = "MIT", es = { type: "git", url: "git+https://github.com/Tresjs/tres.git" }, ts = ["vue", "3d", "threejs", "three", "threejs-vue"], ns = !1, rs = { ".": { types: "./dist/index.d.ts", import: "./dist/tres.js" }, "./components": { types: "./dist/src/components/index.d.ts" }, "./composables": { types: "./dist/src/composables/index.d.ts" }, "./types": { types: "./dist/src/types/index.d.ts" }, "./utils": { types: "./dist/src/utils/index.d.ts" }, "./*": "./*" }, os = "./dist/tres.js", ss = "./dist/tres.js", is = "./dist/index.d.ts", us = ["*.d.ts", "dist"], as = { access: "public" }, ls = { dev: "pnpm --filter='./playground/vue' dev", "dev:nuxt": "pnpm --filter='./playground/nuxt' dev", build: "vite build", test: "vitest", "test:ci": "vitest run", "test:ui": "vitest --ui --coverage.enabled=true", release: "release-it", coverage: "vitest run --coverage", lint: "eslint .", "lint:fix": "eslint . --fix", typecheck: "vue-tsc --noEmit", "docs:dev": "vitepress dev docs", "docs:build": "vitepress build docs", "docs:serve": "vitepress serve docs", "docs:preview": "vitepress preview docs", "docs:contributors": "esno scripts/update-contributors.ts" }, cs = { three: ">=0.133", vue: ">=3.4" }, fs = { "@alvarosabu/utils": "^3.2.0", "@vue/devtools-api": "^7.7.2", "@vueuse/core": "^12.5.0" }, ds = { "@release-it/conventional-changelog": "^10.0.0", "@stackblitz/sdk": "^1.11.0", "@tresjs/cientos": "https://pkg.pr.new/@tresjs/cientos@14afe95", "@tresjs/eslint-config": "^1.4.0", "@types/three": "^0.173.0", "@typescript-eslint/eslint-plugin": "^8.23.0", "@typescript-eslint/parser": "^8.23.0", "@vitejs/plugin-vue": "^5.2.1", "@vitest/coverage-c8": "^0.33.0", "@vitest/coverage-v8": "^3.0.5", "@vitest/ui": "^3.0.5", "@vue/test-utils": "^2.4.6", eslint: "^9.19.0", "eslint-plugin-vue": "^9.32.0", esno: "^4.8.0", gsap: "^3.12.7", jsdom: "^26.0.0", kolorist: "^1.8.0", ohmyfetch: "^0.4.21", pathe: "^2.0.2", "release-it": "^18.1.2", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-copy": "^3.5.0", "rollup-plugin-visualizer": "^5.14.0", sponsorkit: "^16.3.0", three: "^0.173.0", unocss: "^65.4.3", unplugin: "^2.1.2", "unplugin-vue-components": "^28.0.0", vite: "^6.1.0", "vite-plugin-banner": "^0.8.0", "vite-plugin-dts": "4.5.0", "vite-plugin-inspect": "^10.1.0", "vite-plugin-require-transform": "^1.0.21", "vite-svg-loader": "^5.1.0", vitepress: "1.6.3", vitest: "3.0.5", vue: "3.5.13", "vue-demi": "^0.14.10", "vue-tsc": "^2.2.0" }, ps = {
16
+ name: Wo,
17
+ type: Yo,
18
+ version: qo,
19
+ packageManager: Xo,
20
+ description: Zo,
21
+ author: Jo,
22
+ license: Qo,
23
+ repository: es,
24
+ keywords: ts,
25
+ sideEffects: ns,
26
+ exports: rs,
27
+ main: os,
28
+ module: ss,
29
+ types: is,
30
+ files: us,
31
+ publishConfig: as,
32
+ scripts: ls,
33
+ peerDependencies: cs,
34
+ dependencies: fs,
35
+ devDependencies: ds
36
36
  };
37
- class ms extends ur.Mesh {
37
+ class _s extends nr.Mesh {
38
38
  constructor(...n) {
39
39
  super(...n);
40
- Xe(this, "type", "HightlightMesh");
41
- Xe(this, "createTime");
40
+ Ye(this, "type", "HightlightMesh");
41
+ Ye(this, "createTime");
42
42
  this.createTime = Date.now();
43
43
  }
44
44
  onBeforeRender() {
@@ -46,94 +46,118 @@ class ms extends ur.Mesh {
46
46
  this.scale.set(i, i, i);
47
47
  }
48
48
  }
49
- function ut(e) {
49
+ function ot(e) {
50
50
  return typeof e > "u";
51
51
  }
52
- function je(e) {
52
+ function lr(e) {
53
53
  return Array.isArray(e);
54
54
  }
55
- function gs(e) {
55
+ function hs(e) {
56
56
  return typeof e == "number";
57
57
  }
58
- function _r(e) {
58
+ function cr(e) {
59
59
  return typeof e == "string";
60
60
  }
61
- function se(e) {
61
+ function le(e) {
62
62
  return typeof e == "function";
63
63
  }
64
- function J(e) {
65
- return e === Object(e) && !je(e) && !se(e);
64
+ function G(e) {
65
+ return e === Object(e) && !lr(e) && !le(e);
66
66
  }
67
67
  function ee(e) {
68
- return J(e) && !!e.isObject3D;
68
+ return G(e) && !!e.isObject3D;
69
+ }
70
+ function fe(e) {
71
+ return G(e) && !!e.isCamera;
72
+ }
73
+ function fr(e) {
74
+ return G(e) && !!e.isColor;
69
75
  }
70
- function $t(e) {
71
- return J(e) && !!e.isCamera;
76
+ function ms(e) {
77
+ return e != null && (typeof e == "string" || typeof e == "number" || fr(e));
78
+ }
79
+ function st(e) {
80
+ return e !== null && typeof e == "object" && "set" in e && typeof e.set == "function";
81
+ }
82
+ function gs(e) {
83
+ return st(e) && "copy" in e && typeof e.copy == "function";
72
84
  }
73
85
  function Es(e) {
74
- return J(e) && !!e.isBufferGeometry;
86
+ return !!(e != null && e.constructor);
87
+ }
88
+ function Ht(e) {
89
+ return e instanceof Eo;
75
90
  }
76
91
  function vs(e) {
77
- return J(e) && !!e.isMaterial;
92
+ return G(e) && !!e.isPerspectiveCamera;
78
93
  }
79
94
  function ys(e) {
80
- return J(e) && !!e.isLight;
95
+ return G(e) && !!e.isBufferGeometry;
81
96
  }
82
97
  function As(e) {
83
- return J(e) && !!e.isFog;
98
+ return G(e) && !!e.isMaterial;
84
99
  }
85
100
  function Cs(e) {
86
- return J(e) && !!e.isScene;
101
+ return G(e) && !!e.isLight;
87
102
  }
88
- function Ie(e) {
89
- return ee(e) || Es(e) || vs(e) || As(e);
103
+ function Os(e) {
104
+ return G(e) && !!e.isFog;
90
105
  }
91
106
  function Ts(e) {
92
- return J(e) && !!e.isPrimitive;
107
+ return G(e) && !!e.isScene;
93
108
  }
94
- const Ta = !0, ze = "[TresJS ▲ ■ ●] ";
95
- function at(...e) {
96
- typeof e[0] == "string" ? e[0] = ze + e[0] : e.unshift(ze), console.error(...e);
109
+ function ve(e) {
110
+ return ee(e) || ys(e) || As(e) || Os(e);
111
+ }
112
+ function bs(e) {
113
+ return G(e) && !!e.isPrimitive;
114
+ }
115
+ function Ss(e) {
116
+ return ve(e) && "__tres" in e;
117
+ }
118
+ const ba = !0, je = "[TresJS ▲ ■ ●] ";
119
+ function it(...e) {
120
+ typeof e[0] == "string" ? e[0] = je + e[0] : e.unshift(je), console.error(...e);
97
121
  }
98
- function Se(...e) {
99
- typeof e[0] == "string" ? e[0] = ze + e[0] : e.unshift(ze), console.warn(...e);
122
+ function ut(...e) {
123
+ typeof e[0] == "string" ? e[0] = je + e[0] : e.unshift(je), console.warn(...e);
100
124
  }
101
- function Oa(e, t) {
125
+ function Sa(e, t) {
102
126
  }
103
- const hr = (e, t) => {
127
+ const dr = (e, t) => {
104
128
  for (const n of Object.keys(t))
105
- t[n] instanceof Object && Object.assign(t[n], hr(e[n], t[n]));
129
+ t[n] instanceof Object && Object.assign(t[n], dr(e[n], t[n]));
106
130
  return Object.assign(e || {}, t), e;
107
- }, Os = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot", Ss = /* @__PURE__ */ Ds(Os);
108
- function Gt(e) {
131
+ }, Ds = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot", ws = /* @__PURE__ */ Is(Ds);
132
+ function jt(e) {
109
133
  return e && e.nodeType === 1;
110
134
  }
111
- function Re(e) {
135
+ function Le(e) {
112
136
  return e.replace(/-([a-z])/g, (t, n) => n.toUpperCase());
113
137
  }
114
- const bs = /\B([A-Z])/g;
115
- function ws(e) {
116
- return e.replace(bs, "-$1").toLowerCase();
138
+ const ks = /\B([A-Z])/g;
139
+ function Ps(e) {
140
+ return e.replace(ks, "-$1").toLowerCase();
117
141
  }
118
- function Ds(e, t) {
142
+ function Is(e, t) {
119
143
  const n = /* @__PURE__ */ Object.create(null), r = e.split(",");
120
144
  for (let o = 0; o < r.length; o++)
121
145
  n[r[o]] = !0;
122
146
  return t ? (o) => !!n[o.toLowerCase()] : (o) => !!n[o];
123
147
  }
124
- const Wt = (e, t) => {
148
+ const $t = (e, t) => {
125
149
  if (!t)
126
150
  return;
127
151
  const n = Array.isArray(t) ? t : t.match(/([^[.\]])+/g);
128
152
  return n == null ? void 0 : n.reduce((r, o) => r && r[o], e);
129
- }, ks = (e, t, n) => {
153
+ }, Rs = (e, t, n) => {
130
154
  const r = Array.isArray(t) ? t : t.match(/([^[.\]])+/g);
131
155
  r && r.reduce((o, s, i) => (o[s] === void 0 && (o[s] = {}), i === r.length - 1 && (o[s] = n), o[s]), e);
132
156
  };
133
- function mr(e, t) {
134
- if (Gt(e) && Gt(t)) {
157
+ function pr(e, t) {
158
+ if (jt(e) && jt(t)) {
135
159
  const o = e.attributes, s = t.attributes;
136
- return o.length !== s.length ? !1 : Array.from(o).every(({ name: i, value: u }) => t.getAttribute(i) === u);
160
+ return o.length !== s.length ? !1 : Array.from(o).every(({ name: i, value: a }) => t.getAttribute(i) === a);
137
161
  }
138
162
  if (e === t)
139
163
  return !0;
@@ -143,26 +167,26 @@ function mr(e, t) {
143
167
  if (n.length !== r.length)
144
168
  return !1;
145
169
  for (const o of n)
146
- if (!r.includes(o) || !mr(e[o], t[o]))
170
+ if (!r.includes(o) || !pr(e[o], t[o]))
147
171
  return !1;
148
172
  return !0;
149
173
  }
150
- function Ps(e, t) {
174
+ function xs(e, t) {
151
175
  if (!Array.isArray(e) || !Array.isArray(t) || e.length !== t.length)
152
176
  return !1;
153
177
  for (let n = 0; n < e.length; n++)
154
- if (!mr(e[n], t[n]))
178
+ if (!pr(e[n], t[n]))
155
179
  return !1;
156
180
  return !0;
157
181
  }
158
- function Is(e, t, n, r) {
182
+ function Ms(e, t, n, r) {
159
183
  const o = (l) => {
160
184
  if (l.uuid === t)
161
185
  return l;
162
- for (const a of l.children) {
163
- const f = o(a);
164
- if (f)
165
- return f;
186
+ for (const u of l.children) {
187
+ const c = o(u);
188
+ if (c)
189
+ return c;
166
190
  }
167
191
  }, s = o(e);
168
192
  if (!s) {
@@ -177,82 +201,82 @@ function Is(e, t, n, r) {
177
201
  console.warn(`Property path is not valid: ${n.join(".")}`);
178
202
  return;
179
203
  }
180
- const u = n[n.length - 1];
181
- i[u] !== void 0 ? i[u] = r : console.warn(`Property path is not valid: ${n.join(".")}`);
204
+ const a = n[n.length - 1];
205
+ i[a] !== void 0 ? i[a] = r : console.warn(`Property path is not valid: ${n.join(".")}`);
182
206
  }
183
- function Rs(e) {
184
- const t = new cr({
207
+ function Bs(e) {
208
+ const t = new sr({
185
209
  color: 11003607,
186
210
  // Highlight color, e.g., yellow
187
211
  transparent: !0,
188
212
  opacity: 0.2,
189
213
  depthTest: !1,
190
214
  // So the highlight is always visible
191
- side: yo
215
+ side: vo
192
216
  // To e
193
217
  });
194
- return new ms(e.geometry.clone(), t);
218
+ return new _s(e.geometry.clone(), t);
195
219
  }
196
- function xs(e) {
220
+ function Ls(e) {
197
221
  var n;
198
222
  let t = e.value;
199
- return e.value && ((n = e.value) != null && n.isMesh) && (t = e.value.position), Array.isArray(e.value) && (t = new Tt(...t)), t;
223
+ return e.value && ((n = e.value) != null && n.isMesh) && (t = e.value.position), Array.isArray(e.value) && (t = new Ct(...t)), t;
200
224
  }
201
- function Ms(e) {
225
+ function Vs(e) {
202
226
  return "map" in e;
203
227
  }
204
- function Yt(e) {
205
- Ms(e) && e.map && e.map.dispose(), e.dispose();
228
+ function zt(e) {
229
+ Vs(e) && e.map && e.map.dispose(), e.dispose();
206
230
  }
207
- function Ke(e) {
231
+ function $e(e) {
208
232
  var n, r;
209
- if (e.parent && ((n = e.removeFromParent) == null || n.call(e)), delete e.__tres, [...e.children].forEach((o) => Ke(o)), !(e instanceof ar)) {
233
+ if (e.parent && ((n = e.removeFromParent) == null || n.call(e)), delete e.__tres, [...e.children].forEach((o) => $e(o)), !(e instanceof rr)) {
210
234
  const o = e;
211
- e && ((r = e.dispose) == null || r.call(e)), o.geometry && o.geometry.dispose(), Array.isArray(o.material) ? o.material.forEach((s) => Yt(s)) : o.material && Yt(o.material);
235
+ e && ((r = e.dispose) == null || r.call(e)), o.geometry && o.geometry.dispose(), Array.isArray(o.material) ? o.material.forEach((s) => zt(s)) : o.material && zt(o.material);
212
236
  }
213
237
  }
214
- function Bs(e, t) {
238
+ function Fs(e, t) {
215
239
  let n = 0;
216
240
  for (let r = 0; r < e.length; r++)
217
241
  t(e[r], r) && (e[n] = e[r], n++);
218
242
  return e.length = n, e;
219
243
  }
220
- function lt(e, t) {
244
+ function at(e, t) {
221
245
  let n = e;
222
246
  if (t.includes("-")) {
223
247
  const r = t.split("-");
224
248
  let o = r.shift();
225
249
  for (; n && r.length; )
226
- o in n ? (n = n[o], o = r.shift()) : o = qt(o, r.shift());
227
- return { target: n, key: qt(o, ...r) };
250
+ o in n ? (n = n[o], o = r.shift()) : o = Kt(o, r.shift());
251
+ return { target: n, key: Kt(o, ...r) };
228
252
  } else
229
253
  return { target: n, key: t };
230
254
  }
231
- function qt(...e) {
255
+ function Kt(...e) {
232
256
  return e.map((t, n) => n === 0 ? t : t.charAt(0).toUpperCase() + t.slice(1)).join("");
233
257
  }
234
- const Xt = /-\d+$/;
235
- function Ls(e, t, n) {
236
- if (_r(n)) {
237
- if (Xt.test(n)) {
238
- const s = n.replace(Xt, ""), { target: i, key: u } = lt(e, s);
239
- if (!Array.isArray(i[u])) {
240
- const l = i[u], a = [];
241
- a.__tresDetach = () => {
242
- a.every((f) => ut(f)) && (i[u] = l);
243
- }, i[u] = a;
258
+ const Gt = /-\d+$/;
259
+ function Ns(e, t, n) {
260
+ if (cr(n)) {
261
+ if (Gt.test(n)) {
262
+ const s = n.replace(Gt, ""), { target: i, key: a } = at(e, s);
263
+ if (!Array.isArray(i[a])) {
264
+ const l = i[a], u = [];
265
+ u.__tresDetach = () => {
266
+ u.every((c) => ot(c)) && (i[a] = l);
267
+ }, i[a] = u;
244
268
  }
245
269
  }
246
- const { target: r, key: o } = lt(e, n);
270
+ const { target: r, key: o } = at(e, n);
247
271
  t.__tres.previousAttach = r[o], r[o] = de(t);
248
272
  } else
249
273
  t.__tres.previousAttach = n(e, t);
250
274
  }
251
- function Vs(e, t, n) {
275
+ function Us(e, t, n) {
252
276
  var r, o, s;
253
- if (_r(n)) {
254
- const { target: i, key: u } = lt(e, n), l = t.__tres.previousAttach;
255
- l === void 0 ? delete i[u] : i[u] = l, "__tresDetach" in i && i.__tresDetach();
277
+ if (cr(n)) {
278
+ const { target: i, key: a } = at(e, n), l = t.__tres.previousAttach;
279
+ l === void 0 ? delete i[a] : i[a] = l, "__tresDetach" in i && i.__tresDetach();
256
280
  } else
257
281
  (o = (r = t.__tres) == null ? void 0 : r.previousAttach) == null || o.call(r, e, t);
258
282
  (s = t.__tres) == null || delete s.previousAttach;
@@ -271,99 +295,99 @@ function oe(e, t, n) {
271
295
  ...t
272
296
  }, r.__tres.attach || (r.isMaterial ? r.__tres.attach = "material" : r.isBufferGeometry ? r.__tres.attach = "geometry" : r.isFog && (r.__tres.attach = "fog")), r;
273
297
  }
274
- function gr(e) {
298
+ function _r(e) {
275
299
  var n;
276
300
  const t = (n = e == null ? void 0 : e.__tres) == null ? void 0 : n.root;
277
- t && t.render && t.render.canBeInvalidated.value && t.invalidate();
301
+ t != null && t.renderer && t.renderer.canBeInvalidated.value && t.renderer.invalidate();
278
302
  }
279
- function Fs(e, t, n) {
303
+ function Hs(e, t, n) {
280
304
  var o;
281
- if (!se(e.setPixelRatio))
305
+ if (!le(e.setPixelRatio))
282
306
  return;
283
307
  let r = 0;
284
308
  if (n && Array.isArray(n) && n.length >= 2) {
285
309
  const [s, i] = n;
286
- r = lr.clamp(t, s, i);
287
- } else gs(n) ? r = n : r = t;
310
+ r = or.clamp(t, s, i);
311
+ } else hs(n) ? r = n : r = t;
288
312
  r !== ((o = e.getPixelRatio) == null ? void 0 : o.call(e)) && e.setPixelRatio(r);
289
313
  }
290
- function Ns(e, t, n, r, o) {
314
+ function js(e, t, n, r, o) {
291
315
  const s = [...t.__tres.objects], i = de(t);
292
316
  if (e = de(e), i === e)
293
317
  return !0;
294
- const u = oe(e, t.__tres ?? {}, o), l = t.parent ?? t.__tres.parent ?? null, a = { ...t.__tres.memoizedProps };
295
- delete a.object;
296
- for (const f of s)
297
- Er(f, o), vr(f, o);
318
+ const a = oe(e, t.__tres ?? {}, o), l = t.parent ?? t.__tres.parent ?? null, u = { ...t.__tres.memoizedProps };
319
+ delete u.object;
320
+ for (const c of s)
321
+ hr(c, o), mr(c, o);
298
322
  i.__tres.objects = [], r.remove(t);
299
- for (const [f, h] of Object.entries(a))
300
- r.patchProp(u, f, u[f], h);
323
+ for (const [c, p] of Object.entries(u))
324
+ r.patchProp(a, c, a[c], p);
301
325
  n(e), r.insert(t, l);
302
- for (const f of s)
303
- r.insert(f, t);
326
+ for (const c of s)
327
+ r.insert(c, t);
304
328
  return !0;
305
329
  }
306
330
  function de(e) {
307
- if (Ts(e)) {
331
+ if (bs(e)) {
308
332
  const t = e;
309
333
  return t.object.__tres = t.__tres, t.object;
310
334
  } else
311
335
  return e;
312
336
  }
313
- function Er(e, t) {
337
+ function hr(e, t) {
314
338
  var r, o, s, i;
315
339
  const n = ((r = e.__tres) == null ? void 0 : r.parent) || t.scene.value;
316
- e.__tres && (e.__tres.parent = null), n && n.__tres && "objects" in n.__tres && Bs(n.__tres.objects, (u) => u !== e), (o = e.__tres) != null && o.attach ? Vs(n, e, e.__tres.attach) : ((i = (s = e.parent) == null ? void 0 : s.remove) == null || i.call(s, de(e)), e.parent = null);
340
+ e.__tres && (e.__tres.parent = null), n && n.__tres && "objects" in n.__tres && Fs(n.__tres.objects, (a) => a !== e), (o = e.__tres) != null && o.attach ? Us(n, e, e.__tres.attach) : ((i = (s = e.parent) == null ? void 0 : s.remove) == null || i.call(s, de(e)), e.parent = null);
317
341
  }
318
- function vr(e, t) {
342
+ function mr(e, t) {
319
343
  var n;
320
344
  (n = e.traverse) == null || n.call(e, (r) => {
321
345
  var o;
322
- t.deregisterCamera(r), (o = t.eventManager) == null || o.deregisterPointerMissedObject(r);
323
- }), t.deregisterCamera(e), gr(e);
346
+ fe(r) && t.camera.deregisterCamera(r), (o = t.eventManager) == null || o.deregisterPointerMissedObject(r);
347
+ }), fe(e) && t.camera.deregisterCamera(e), _r(e);
324
348
  }
325
- function Us(e, t, n) {
349
+ function $s(e, t, n) {
326
350
  var l;
327
- const r = new e(n == null ? void 0 : n.manager), o = At({
351
+ const r = new e(n == null ? void 0 : n.manager), o = so({
328
352
  loaded: 0,
329
353
  total: 0,
330
354
  percentage: 0
331
355
  });
332
356
  n != null && n.extensions && n.extensions(r);
333
- const s = ot(t), i = No(
334
- (a) => new Promise((f, h) => {
335
- r.load(a || s || "", (c) => {
336
- f(c);
337
- }, (c) => {
338
- o.loaded = c.loaded, o.total = c.total, o.percentage = o.loaded / o.total * 100;
339
- }, (c) => {
340
- h(c);
357
+ const s = I(t), i = Vo(
358
+ (u) => new Promise((c, p) => {
359
+ r.load(u || s || "", (f) => {
360
+ c(f);
361
+ }, (f) => {
362
+ o.loaded = f.loaded, o.total = f.total, o.percentage = o.loaded / o.total * 100;
363
+ }, (f) => {
364
+ p(f);
341
365
  });
342
366
  }),
343
- null,
367
+ (n == null ? void 0 : n.initialValue) ?? null,
344
368
  {
345
369
  ...n == null ? void 0 : n.asyncOptions,
346
370
  immediate: ((l = n == null ? void 0 : n.asyncOptions) == null ? void 0 : l.immediate) ?? !0
347
371
  }
348
- ), u = ye(() => ot(t), (a) => {
349
- if (a) {
350
- const f = i.state.value;
351
- f && typeof f == "object" && "scene" in f && f.scene && Ke(f.scene), i.execute(0, a);
372
+ ), a = Ae(() => I(t), (u) => {
373
+ if (u) {
374
+ const c = i.state.value;
375
+ c && typeof c == "object" && "scene" in c && c.scene && $e(c.scene), i.execute(0, u);
352
376
  }
353
377
  });
354
- return le(() => {
355
- u();
356
- const a = i.state.value;
357
- a && typeof a == "object" && "scene" in a && a.scene && Ke(a.scene);
378
+ return me(() => {
379
+ a();
380
+ const u = i.state.value;
381
+ u && typeof u == "object" && "scene" in u && u.scene && $e(u.scene);
358
382
  }), {
359
383
  ...i,
360
- load: (a) => {
361
- i.execute(0, a);
384
+ load: (u) => {
385
+ i.execute(0, u);
362
386
  },
363
387
  progress: o
364
388
  };
365
389
  }
366
- const Sa = /* @__PURE__ */ He({
390
+ const Da = /* @__PURE__ */ nt({
367
391
  __name: "component",
368
392
  props: {
369
393
  loader: {},
@@ -372,111 +396,41 @@ const Sa = /* @__PURE__ */ He({
372
396
  },
373
397
  emits: ["loaded", "error"],
374
398
  setup(e, { emit: t }) {
375
- const n = e, r = t, { state: o, isLoading: s, error: i } = Us(n.loader, n.path, { manager: n.manager });
376
- return zt(i, (u) => {
377
- u && r("error", u);
378
- }), zt(o, (u) => {
379
- u && r("loaded", u);
380
- }), (u, l) => ir(u.$slots, "default", {
381
- state: W(o),
382
- isLoading: W(s),
383
- error: W(i)
399
+ const n = e, r = t, { state: o, isLoading: s, error: i } = $s(n.loader, n.path, { manager: n.manager });
400
+ return He(i, (a) => {
401
+ a && r("error", a);
402
+ }), He(o, (a) => {
403
+ a && r("loaded", a);
404
+ }), (a, l) => io(a.$slots, "default", {
405
+ state: X(o),
406
+ isLoading: X(s),
407
+ error: X(i)
384
408
  });
385
409
  }
386
- });
387
- async function Hs(e, t) {
388
- const n = new Ao(t), r = (o) => new Promise((s, i) => {
389
- n.load(
390
- o,
391
- (u) => s(u),
392
- () => null,
393
- () => {
394
- i(new Error("[useTextures] - Failed to load texture"));
395
- }
396
- );
397
- });
398
- if (je(e)) {
399
- const o = await Promise.all(e.map((s) => r(s)));
400
- return e.length > 1 ? o : o[0];
401
- } else {
402
- const {
403
- map: o,
404
- displacementMap: s,
405
- normalMap: i,
406
- roughnessMap: u,
407
- metalnessMap: l,
408
- aoMap: a,
409
- alphaMap: f,
410
- matcap: h
411
- } = e;
412
- return {
413
- map: o ? await r(o) : null,
414
- displacementMap: s ? await r(s) : null,
415
- normalMap: i ? await r(i) : null,
416
- roughnessMap: u ? await r(u) : null,
417
- metalnessMap: l ? await r(l) : null,
418
- aoMap: a ? await r(a) : null,
419
- alphaMap: f ? await r(f) : null,
420
- matcap: h ? await r(h) : null
421
- };
422
- }
423
- }
424
- const ba = /* @__PURE__ */ He({
425
- __name: "component",
426
- props: {
427
- map: {},
428
- displacementMap: {},
429
- normalMap: {},
430
- roughnessMap: {},
431
- metalnessMap: {},
432
- aoMap: {},
433
- alphaMap: {},
434
- matcap: {}
435
- },
436
- async setup(e) {
437
- let t, n;
438
- const r = e, o = ([t, n] = ao(() => At(Hs(r))), t = await t, n(), t);
439
- return (s, i) => ir(s.$slots, "default", { textures: W(o) });
440
- }
441
- }), js = ({ sizes: e }) => {
442
- const t = X([]), n = ue(
443
- () => t.value[0]
444
- ), r = (i) => {
445
- const u = i instanceof Co ? i : t.value.find((a) => a.uuid === i);
446
- if (!u)
410
+ }), zs = ({ sizes: e }) => {
411
+ const t = ie([]), n = Z(() => t.value[0]), r = (i) => {
412
+ const a = fe(i) ? i : t.value.find((u) => u.uuid === i);
413
+ if (!a)
447
414
  return;
448
- const l = t.value.filter(({ uuid: a }) => a !== u.uuid);
449
- t.value = [u, ...l];
450
- }, o = (i, u = !1) => {
451
- if ($t(i)) {
452
- const l = i;
453
- if (t.value.some(({ uuid: a }) => a === l.uuid))
454
- return;
455
- u ? r(l) : t.value.push(l);
456
- }
415
+ const l = t.value.filter(({ uuid: u }) => u !== a.uuid);
416
+ t.value = [a, ...l];
417
+ }, o = (i, a = !1) => {
418
+ t.value.some(({ uuid: l }) => l === i.uuid) || (t.value.push(i), a && r(i.uuid));
457
419
  }, s = (i) => {
458
- if ($t(i)) {
459
- const u = i;
460
- t.value = t.value.filter(({ uuid: l }) => l !== u.uuid);
461
- }
420
+ t.value = t.value.filter(({ uuid: a }) => a !== i.uuid);
462
421
  };
463
- return Ct(() => {
422
+ return At(() => {
464
423
  e.aspectRatio.value && t.value.forEach((i) => {
465
- !i.manual && (i instanceof it || zs(i)) && (i instanceof it ? i.aspect = e.aspectRatio.value : (i.left = e.width.value * -0.5, i.right = e.width.value * 0.5, i.top = e.height.value * 0.5, i.bottom = e.height.value * -0.5), i.updateProjectionMatrix());
424
+ vs(i) && (i.aspect = e.aspectRatio.value, i.updateProjectionMatrix());
466
425
  });
467
- }), le(() => {
468
- t.value = [];
469
426
  }), {
470
- camera: n,
427
+ activeCamera: n,
471
428
  cameras: t,
472
429
  registerCamera: o,
473
430
  deregisterCamera: s,
474
- setCameraActive: r
431
+ setActiveCamera: r
475
432
  };
476
433
  };
477
- function zs(e) {
478
- return e.hasOwnProperty("isOrthographicCamera") && e.isOrthographicCamera;
479
- }
480
434
  function Ks(e) {
481
435
  const t = { nodes: {}, materials: {}, meshes: {} };
482
436
  return e && e.traverse((n) => {
@@ -484,570 +438,470 @@ function Ks(e) {
484
438
  }), t;
485
439
  }
486
440
  function wa(e) {
487
- return ue(() => Ks(ot(e)));
441
+ return Z(() => Ks(I(e)));
488
442
  }
489
- const ct = X({}), ft = (e) => Object.assign(ct.value, e);
490
- function Qe() {
443
+ const lt = ie({}), ct = (e) => Object.assign(lt.value, e);
444
+ function Ze() {
491
445
  const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Set();
492
446
  let n = 0, r = !1;
493
447
  const o = () => {
494
- const a = Array.from(e.entries()).sort((f, h) => {
495
- const c = f[1].priority - h[1].priority;
496
- return c === 0 ? f[1].addI - h[1].addI : c;
448
+ const u = Array.from(e.entries()).sort((c, p) => {
449
+ const f = c[1].priority - p[1].priority;
450
+ return f === 0 ? c[1].addI - p[1].addI : f;
497
451
  });
498
- t.clear(), a.forEach((f) => t.add(f[0]));
499
- }, s = (a) => {
500
- e.delete(a), t.delete(a);
452
+ t.clear(), u.forEach((c) => t.add(c[0]));
453
+ }, s = (u) => {
454
+ e.delete(u), t.delete(u);
501
455
  };
502
- return { on: (a, f = 0) => {
503
- e.set(a, { priority: f, addI: n++ });
504
- const h = () => s(a);
505
- return Uo(h), r = !0, {
506
- off: h
456
+ return { on: (u, c = 0) => {
457
+ e.set(u, { priority: c, addI: n++ });
458
+ const p = () => s(u);
459
+ return Fo(p), r = !0, {
460
+ off: p
507
461
  };
508
- }, off: s, trigger: (...a) => {
509
- r && (o(), r = !1), t.forEach((f) => f(...a));
462
+ }, off: s, trigger: (...u) => {
463
+ r && (o(), r = !1), t.forEach((c) => c(...u));
510
464
  }, dispose: () => {
511
465
  e.clear(), t.clear();
512
466
  }, get count() {
513
467
  return e.size;
514
468
  } };
515
469
  }
516
- function $s() {
470
+ function Gs() {
517
471
  let e = !0, t = !0, n = !1;
518
- const r = new fr(!1), o = X(r.running), s = X(!1);
472
+ const r = new ir(!1), o = ie(r.running), s = ie(!1);
519
473
  let i;
520
- const u = lr.generateUUID();
474
+ const a = or.generateUUID();
521
475
  let l = null;
522
- const a = Qe(), f = Qe(), h = Qe();
476
+ const u = Ze(), c = Ze(), p = Ze();
523
477
  P();
524
- let c = {};
525
- function _(D) {
526
- c = D;
478
+ let f = {};
479
+ function h(O) {
480
+ f = O;
527
481
  }
528
- function d(D, x, v = 0) {
529
- switch (x) {
482
+ function d(O, k, E = 0) {
483
+ switch (k) {
530
484
  case "before":
531
- return a.on(D, v);
485
+ return u.on(O, E);
532
486
  case "render":
533
- return l || (l = D), f.dispose(), f.on(D);
487
+ return l || (l = O), c.dispose(), c.on(O);
534
488
  case "after":
535
- return h.on(D, v);
489
+ return p.on(O, E);
536
490
  }
537
491
  }
538
- function E() {
539
- t && (t = !1, P(), k());
492
+ function v() {
493
+ t && (t = !1, P(), M());
540
494
  }
541
- function p() {
495
+ function _() {
542
496
  t = !0, P(), cancelAnimationFrame(i);
543
497
  }
544
498
  function m() {
545
499
  n = !1, P();
546
500
  }
547
- function C() {
501
+ function T() {
548
502
  n = !0, P();
549
503
  }
550
- function T() {
504
+ function b() {
551
505
  s.value = !0;
552
506
  }
553
- function O() {
507
+ function C() {
554
508
  s.value = !1;
555
509
  }
556
- function k() {
510
+ function M() {
511
+ var x;
557
512
  if (!e) {
558
- i = requestAnimationFrame(k);
513
+ i = requestAnimationFrame(M);
559
514
  return;
560
515
  }
561
- const D = r.getDelta(), x = r.getElapsedTime(), v = {
562
- camera: W(c.camera),
563
- scene: W(c.scene),
564
- renderer: W(c.renderer),
565
- raycaster: W(c.raycaster),
566
- controls: W(c.controls),
567
- invalidate: c.invalidate,
568
- advance: c.advance
569
- }, S = { delta: D, elapsed: x, clock: r, ...v };
570
- o.value && a.trigger(S), s.value || (f.count ? f.trigger(S) : l && l(S)), o.value && h.trigger(S), i = requestAnimationFrame(k);
516
+ const O = r.getDelta(), k = r.getElapsedTime(), E = {
517
+ camera: X((x = f.camera) == null ? void 0 : x.activeCamera),
518
+ scene: X(f.scene),
519
+ renderer: X(f.renderer),
520
+ raycaster: X(f.raycaster),
521
+ controls: X(f.controls),
522
+ invalidate: f.invalidate,
523
+ advance: f.advance
524
+ }, S = { delta: O, elapsed: k, clock: r, ...E };
525
+ o.value && u.trigger(S), s.value || (c.count ? c.trigger(S) : l && l(S)), o.value && p.trigger(S), i = requestAnimationFrame(M);
571
526
  }
572
527
  function P() {
573
- const D = !t && !n;
574
- r.running !== D && (r.running ? r.stop() : r.start()), o.value = r.running;
528
+ const O = !t && !n;
529
+ r.running !== O && (r.running ? r.stop() : r.start()), o.value = r.running;
575
530
  }
576
531
  return {
577
- loopId: u,
578
- register: (D, x, v) => d(D, x, v),
579
- start: E,
580
- stop: p,
581
- pause: C,
532
+ loopId: a,
533
+ register: (O, k, E) => d(O, k, E),
534
+ start: v,
535
+ stop: _,
536
+ pause: T,
582
537
  resume: m,
583
- pauseRender: T,
584
- resumeRender: O,
538
+ pauseRender: b,
539
+ resumeRender: C,
585
540
  isRenderPaused: s,
586
541
  isActive: o,
587
- setContext: _,
588
- setReady: (D) => e = D
542
+ setContext: h,
543
+ setReady: (O) => e = O
589
544
  };
590
545
  }
591
- const Gs = Number.parseInt(To.replace("dev", ""));
592
- function Da(e) {
593
- return typeof e == "number" ? [e, e, e] : e instanceof Tt ? [e.x, e.y, e.z] : e;
546
+ const Ws = Number.parseInt(yo.replace("dev", ""));
547
+ function ka(e) {
548
+ return typeof e == "number" ? [e, e, e] : e instanceof Ct ? [e.x, e.y, e.z] : e;
594
549
  }
595
- function Ws(e) {
596
- return e instanceof Ae ? e : Array.isArray(e) ? new Ae(...e) : new Ae(e);
550
+ function Ys(e) {
551
+ return e instanceof Oe ? e : Array.isArray(e) ? new Oe(...e) : new Oe(e);
597
552
  }
598
- const xe = {
553
+ const Re = {
599
554
  realistic: {
600
555
  shadows: !0,
601
556
  physicallyCorrectLights: !0,
602
- outputColorSpace: bo,
603
- toneMapping: dr,
557
+ outputColorSpace: Oo,
558
+ toneMapping: ur,
604
559
  toneMappingExposure: 3,
605
560
  shadowMap: {
606
561
  enabled: !0,
607
- type: So
562
+ type: Co
608
563
  }
609
564
  },
610
565
  flat: {
611
- toneMapping: Oo,
566
+ toneMapping: Ao,
612
567
  toneMappingExposure: 1
613
568
  }
614
569
  };
615
- function Ys({
616
- canvas: e,
617
- options: t,
618
- contextParts: { sizes: n, render: r, invalidate: o, advance: s }
570
+ function qs({
571
+ scene: e,
572
+ canvas: t,
573
+ options: n,
574
+ contextParts: { sizes: r, loop: o, camera: s }
619
575
  }) {
620
- const i = ue(() => ({
621
- alpha: B(t.alpha) ?? !0,
622
- depth: B(t.depth),
623
- canvas: Ho(e),
624
- context: B(t.context),
625
- stencil: B(t.stencil),
626
- antialias: B(t.antialias) ?? !0,
627
- precision: B(t.precision),
628
- powerPreference: B(t.powerPreference),
629
- premultipliedAlpha: B(t.premultipliedAlpha),
630
- preserveDrawingBuffer: B(t.preserveDrawingBuffer),
631
- logarithmicDepthBuffer: B(t.logarithmicDepthBuffer),
632
- failIfMajorPerformanceCaveat: B(t.failIfMajorPerformanceCaveat)
633
- })), u = Z(new Ze(i.value));
634
- function l() {
635
- t.renderMode === "on-demand" && o();
636
- }
637
- ye(i, () => {
638
- u.value.dispose(), u.value = new Ze(i.value), l();
639
- }), ye([n.width, n.height], () => {
640
- u.value.setSize(n.width.value, n.height.value), l();
576
+ const i = Z(() => ({
577
+ alpha: I(n.alpha) ?? !0,
578
+ depth: I(n.depth),
579
+ canvas: No(t),
580
+ context: I(n.context),
581
+ stencil: I(n.stencil),
582
+ antialias: I(n.antialias) ?? !0,
583
+ precision: I(n.precision),
584
+ powerPreference: I(n.powerPreference),
585
+ premultipliedAlpha: I(n.premultipliedAlpha),
586
+ preserveDrawingBuffer: I(n.preserveDrawingBuffer),
587
+ logarithmicDepthBuffer: I(n.logarithmicDepthBuffer),
588
+ failIfMajorPerformanceCaveat: I(n.failIfMajorPerformanceCaveat)
589
+ })), a = J(new qe(i.value)), l = ie(0), u = 60, c = Z(() => I(n.renderMode) === "on-demand" && l.value === 0), p = (C = 1) => {
590
+ c.value && (l.value = Math.min(u, l.value + C));
591
+ }, f = () => {
592
+ if (I(n.renderMode) !== "manual")
593
+ throw new Error("advance can only be called in manual render mode.");
594
+ l.value = 1;
595
+ }, h = () => {
596
+ I(n.renderMode) === "on-demand" && p();
597
+ }, d = Z(() => I(n.renderMode) === "always"), v = z();
598
+ o.register(() => {
599
+ s.activeCamera.value && l.value && (a.value.render(e, s.activeCamera.value), v.trigger(a.value)), l.value = d.value ? 1 : Math.max(0, l.value - 1);
600
+ }, "render"), Ae(i, () => {
601
+ a.value.dispose(), a.value = new qe(i.value), h();
602
+ });
603
+ const _ = Z(
604
+ () => !!(a.value.domElement.width && a.value.domElement.height)
605
+ );
606
+ Ae([r.width, r.height], () => {
607
+ a.value.setSize(r.width.value, r.height.value), h(), uo(a);
641
608
  }, {
642
609
  immediate: !0
643
- }), ye(() => t.clearColor, l);
644
- const { pixelRatio: a } = jo(), h = (() => {
645
- const _ = new Ze(), d = {
610
+ }), Ae(() => n.clearColor, h);
611
+ const { pixelRatio: m } = Uo(), b = (() => {
612
+ const C = new qe(), M = {
646
613
  shadowMap: {
647
- enabled: _.shadowMap.enabled,
648
- type: _.shadowMap.type
614
+ enabled: C.shadowMap.enabled,
615
+ type: C.shadowMap.type
649
616
  },
650
- toneMapping: _.toneMapping,
651
- toneMappingExposure: _.toneMappingExposure,
652
- outputColorSpace: _.outputColorSpace
617
+ toneMapping: C.toneMapping,
618
+ toneMappingExposure: C.toneMappingExposure,
619
+ outputColorSpace: C.outputColorSpace
653
620
  };
654
- return _.dispose(), d;
655
- })(), c = B(t.renderMode);
656
- return c === "on-demand" && o(), c === "manual" && setTimeout(() => {
657
- s();
658
- }, 100), Ct(() => {
659
- const _ = B(t.preset);
660
- _ && (_ in xe || at(`Renderer Preset must be one of these: ${Object.keys(xe).join(", ")}`), hr(u.value, xe[_])), Fs(u.value, a.value, B(t.dpr)), c === "always" && (r.frames.value = Math.max(1, r.frames.value));
661
- const d = (m, C) => {
662
- const T = B(m), O = () => {
663
- if (_)
664
- return Wt(xe[_], C);
621
+ return C.dispose(), M;
622
+ })();
623
+ return I(n.renderMode) === "on-demand" && p(), I(n.renderMode) === "manual" && setTimeout(() => {
624
+ f();
625
+ }, 100), At(() => {
626
+ const C = I(n.preset);
627
+ C && (C in Re || it(`Renderer Preset must be one of these: ${Object.keys(Re).join(", ")}`), dr(a.value, Re[C])), Hs(a.value, m.value, I(n.dpr)), d.value && (l.value = Math.max(1, l.value));
628
+ const M = (k, E) => {
629
+ const S = I(k), x = () => {
630
+ if (C)
631
+ return $t(Re[C], E);
665
632
  };
666
- if (T !== void 0)
667
- return T;
668
- const k = O();
669
- return k !== void 0 ? k : Wt(h, C);
670
- }, E = (m, C) => ks(u.value, C, d(m, C));
671
- E(t.shadows, "shadowMap.enabled"), E(t.toneMapping ?? dr, "toneMapping"), E(t.shadowMapType, "shadowMap.type"), Gs < 150 && E(!t.useLegacyLights, "physicallyCorrectLights"), E(t.outputColorSpace, "outputColorSpace"), E(t.toneMappingExposure, "toneMappingExposure");
672
- const p = d(t.clearColor, "clearColor");
673
- p && u.value.setClearColor(
674
- p ? Ws(p) : new Ae(0)
633
+ if (S !== void 0)
634
+ return S;
635
+ const B = x();
636
+ return B !== void 0 ? B : $t(b, E);
637
+ }, P = (k, E) => Rs(a.value, E, M(k, E));
638
+ P(n.shadows, "shadowMap.enabled"), P(n.toneMapping ?? ur, "toneMapping"), P(n.shadowMapType, "shadowMap.type"), Ws < 150 && P(!n.useLegacyLights, "physicallyCorrectLights"), P(n.outputColorSpace, "outputColorSpace"), P(n.toneMappingExposure, "toneMappingExposure");
639
+ const O = M(n.clearColor, "clearColor");
640
+ O && a.value.setClearColor(
641
+ O ? Ys(O) : new Oe(0)
675
642
  // default clear color is not easily/efficiently retrievable from three
676
643
  );
677
- }), le(() => {
678
- u.value.dispose(), u.value.forceContextLoss();
644
+ }), me(() => {
645
+ a.value.dispose(), a.value.forceContextLoss();
679
646
  }), {
680
- renderer: u
647
+ instance: a,
648
+ isReady: rt(_),
649
+ advance: f,
650
+ onRender: v,
651
+ invalidate: p,
652
+ canBeInvalidated: c,
653
+ amountOfFramesToRender: l
681
654
  };
682
655
  }
683
- function qs(e, t, n = 10) {
684
- const r = B(e) ? zo() : Ko(ue(() => B(t).parentElement)), o = st(Kt(r.width, n)), s = st(Kt(r.height, n)), i = ue(() => o.value / s.value);
656
+ function Xs(e, t, n = 10) {
657
+ const r = I(e) ? Ho() : jo(Z(() => I(t).parentElement)), o = rt(Ut(r.width, n)), s = rt(Ut(r.height, n)), i = Z(() => o.value / s.value);
685
658
  return {
686
659
  height: s,
687
660
  width: o,
688
661
  aspectRatio: i
689
662
  };
690
663
  }
691
- const Xs = (e, t) => {
692
- const n = ue(() => t.renderer.value.domElement), r = Z([]), { x: o, y: s } = $o({ target: n });
664
+ const Zs = (e, t) => {
665
+ const n = Z(() => t.renderer.instance.value.domElement), r = J([]), { x: o, y: s } = $o({ target: n });
693
666
  let i = 0;
694
- const { width: u, height: l, top: a, left: f } = Go(n), h = ({ x: y, y: w }) => {
667
+ const { width: a, height: l, top: u, left: c } = zo(n), p = ({ x: y, y: w }) => {
695
668
  if (n.value)
696
669
  return {
697
- x: (y - f.value) / u.value * 2 - 1,
698
- y: -((w - a.value) / l.value) * 2 + 1
670
+ x: (y - c.value) / a.value * 2 - 1,
671
+ y: -((w - u.value) / l.value) * 2 + 1
699
672
  };
700
- }, c = ({ x: y, y: w }) => {
701
- if (t.camera.value)
702
- return t.raycaster.value.setFromCamera(new Je(y, w), t.camera.value), r.value = t.raycaster.value.intersectObjects(e.value, !0), r.value;
703
- }, _ = (y) => {
704
- const w = h({
673
+ }, f = ({ x: y, y: w }) => {
674
+ if (t.camera.activeCamera.value)
675
+ return t.raycaster.value.setFromCamera(new Xe(y, w), t.camera.activeCamera.value), r.value = t.raycaster.value.intersectObjects(e.value, !0), r.value;
676
+ }, h = (y) => {
677
+ const w = p({
705
678
  x: (y == null ? void 0 : y.clientX) ?? o.value,
706
679
  y: (y == null ? void 0 : y.clientY) ?? s.value
707
680
  });
708
- return w ? c(w) || [] : [];
709
- }, d = $(), E = $(), p = $(), m = $(), C = $(), T = $(), O = $(), k = $();
681
+ return w ? f(w) || [] : [];
682
+ }, d = z(), v = z(), _ = z(), m = z(), T = z(), b = z(), C = z(), M = z();
710
683
  function P(y) {
711
684
  const w = {};
712
685
  for (const H in y)
713
686
  typeof H != "function" && (w[H] = y[H]);
714
687
  return w;
715
688
  }
716
- const D = (y, w) => {
717
- var ce, Vt, Ft;
718
- const H = P(w), re = new Tt(w == null ? void 0 : w.clientX, w == null ? void 0 : w.clientY, 0).unproject((ce = t.camera) == null ? void 0 : ce.value);
689
+ const O = (y, w) => {
690
+ var ae;
691
+ const H = P(w);
692
+ if (!t.camera.activeCamera.value)
693
+ return;
694
+ const re = new Ct(w == null ? void 0 : w.clientX, w == null ? void 0 : w.clientY, 0).unproject(t.camera.activeCamera.value);
719
695
  y.trigger({
720
696
  ...H,
721
697
  intersections: r.value,
722
698
  // The unprojectedPoint is wrong, math needs to be fixed
723
699
  unprojectedPoint: re,
724
- ray: (Vt = t.raycaster) == null ? void 0 : Vt.value.ray,
725
- camera: (Ft = t.camera) == null ? void 0 : Ft.value,
700
+ ray: (ae = t.raycaster) == null ? void 0 : ae.value.ray,
701
+ camera: t.camera.activeCamera.value,
726
702
  sourceEvent: w,
727
703
  delta: i,
728
704
  stopPropagating: !1
729
705
  });
730
706
  };
731
- let x;
732
- const v = (y) => {
733
- _(y), D(p, y), x = y;
707
+ let k;
708
+ const E = (y) => {
709
+ h(y), O(_, y), k = y;
734
710
  }, S = () => {
735
- x && v(x);
711
+ k && E(k);
736
712
  };
737
- let M, V, K;
713
+ let x, B, K;
738
714
  const N = (y) => {
739
715
  var w;
740
- M = (w = r.value[0]) == null ? void 0 : w.object, i = 0, V = new Je(
716
+ x = (w = r.value[0]) == null ? void 0 : w.object, i = 0, B = new Xe(
741
717
  (y == null ? void 0 : y.clientX) ?? o.value,
742
718
  (y == null ? void 0 : y.clientY) ?? s.value
743
- ), D(C, y);
719
+ ), O(T, y);
744
720
  };
745
- let U, L = !1;
746
- const b = (y) => {
721
+ let U, V = !1;
722
+ const D = (y) => {
747
723
  var w, H, re;
748
- y instanceof PointerEvent && (r.value.length === 0 && D(T, y), M === ((w = r.value[0]) == null ? void 0 : w.object) && (K = new Je(
724
+ y instanceof PointerEvent && (r.value.length === 0 && O(b, y), x === ((w = r.value[0]) == null ? void 0 : w.object) && (K = new Xe(
749
725
  (y == null ? void 0 : y.clientX) ?? o.value,
750
726
  (y == null ? void 0 : y.clientY) ?? s.value
751
- ), i = V == null ? void 0 : V.distanceTo(K), y.button === 0 ? (D(d, y), U === ((H = r.value[0]) == null ? void 0 : H.object) ? L = !0 : (U = (re = r.value[0]) == null ? void 0 : re.object, L = !1)) : y.button === 2 && D(O, y)), D(m, y));
727
+ ), i = B == null ? void 0 : B.distanceTo(K), y.button === 0 ? (O(d, y), U === ((H = r.value[0]) == null ? void 0 : H.object) ? V = !0 : (U = (re = r.value[0]) == null ? void 0 : re.object, V = !1)) : y.button === 2 && O(C, y)), O(m, y));
752
728
  }, ne = (y) => {
753
- L && (D(E, y), U = void 0, L = !1);
754
- }, j = (y) => D(p, y), Y = (y) => D(k, y);
755
- return n.value.addEventListener("pointerup", b), n.value.addEventListener("pointerdown", N), n.value.addEventListener("pointermove", v), n.value.addEventListener("pointerleave", j), n.value.addEventListener("dblclick", ne), n.value.addEventListener("wheel", Y), le(() => {
756
- n != null && n.value && (n.value.removeEventListener("pointerup", b), n.value.removeEventListener("pointerdown", N), n.value.removeEventListener("pointermove", v), n.value.removeEventListener("pointerleave", j), n.value.removeEventListener("dblclick", ne), n.value.removeEventListener("wheel", Y));
729
+ V && (O(v, y), U = void 0, V = !1);
730
+ }, j = (y) => O(_, y), Y = (y) => O(M, y);
731
+ return n.value.addEventListener("pointerup", D), n.value.addEventListener("pointerdown", N), n.value.addEventListener("pointermove", E), n.value.addEventListener("pointerleave", j), n.value.addEventListener("dblclick", ne), n.value.addEventListener("wheel", Y), me(() => {
732
+ n != null && n.value && (n.value.removeEventListener("pointerup", D), n.value.removeEventListener("pointerdown", N), n.value.removeEventListener("pointermove", E), n.value.removeEventListener("pointerleave", j), n.value.removeEventListener("dblclick", ne), n.value.removeEventListener("wheel", Y));
757
733
  }), {
758
734
  intersects: r,
759
735
  onClick: (y) => d.on(y).off,
760
- onDblClick: (y) => E.on(y).off,
761
- onContextMenu: (y) => O.on(y).off,
762
- onPointerMove: (y) => p.on(y).off,
736
+ onDblClick: (y) => v.on(y).off,
737
+ onContextMenu: (y) => C.on(y).off,
738
+ onPointerMove: (y) => _.on(y).off,
763
739
  onPointerUp: (y) => m.on(y).off,
764
- onPointerDown: (y) => C.on(y).off,
765
- onPointerMissed: (y) => T.on(y).off,
766
- onWheel: (y) => k.on(y).off,
740
+ onPointerDown: (y) => T.on(y).off,
741
+ onPointerMissed: (y) => b.on(y).off,
742
+ onWheel: (y) => M.on(y).off,
767
743
  forceUpdate: S
768
744
  };
769
745
  };
770
- function et(e, t) {
746
+ function Je(e, t) {
771
747
  if (Array.isArray(e))
772
748
  for (const n of e)
773
749
  n(t);
774
750
  typeof e == "function" && e(t);
775
751
  }
776
- function Zs(e, t, n) {
777
- var x;
778
- const r = Z(), o = Z();
779
- e && (r.value = e), t && (o.value = t);
780
- const s = (v) => {
752
+ function Js(e, t) {
753
+ var k;
754
+ const n = J(), r = J();
755
+ e && (n.value = e), t && (r.value = t);
756
+ const o = (E) => {
781
757
  var S;
782
- return ((S = v.__tres) == null ? void 0 : S.eventCount) > 0;
783
- }, i = (v) => {
758
+ return ((S = E.__tres) == null ? void 0 : S.eventCount) > 0;
759
+ }, s = (E) => {
784
760
  var S;
785
- return ((S = v.children) == null ? void 0 : S.some((M) => i(M))) || s(v);
786
- }, u = Z(((x = r.value) == null ? void 0 : x.children).filter(i) || []);
787
- function l(v, S) {
788
- const M = [], V = () => S.stopPropagating = !0;
789
- S.stopPropagation = V;
761
+ return ((S = E.children) == null ? void 0 : S.some((x) => s(x))) || o(E);
762
+ }, i = J(((k = n.value) == null ? void 0 : k.children).filter(s) || []), a = z();
763
+ function l(E, S) {
764
+ const x = [], B = () => S.stopPropagating = !0;
765
+ S.stopPropagation = B;
790
766
  for (const K of S == null ? void 0 : S.intersections) {
791
767
  if (S.stopPropagating)
792
768
  return;
793
769
  S = { ...S, ...K };
794
770
  const { object: N } = K;
795
- S.eventObject = N, et(N[v], S), M.push(N);
771
+ S.eventObject = N, Je(N[E], S), x.push(N);
796
772
  let U = N.parent;
797
- for (; U !== null && !S.stopPropagating && !M.includes(U); )
798
- S.eventObject = U, et(U[v], S), M.push(U), U = U.parent;
799
- const L = ws(v.slice(2));
800
- n(L, { intersection: K, event: S });
773
+ for (; U !== null && !S.stopPropagating && !x.includes(U); )
774
+ S.eventObject = U, Je(U[E], S), x.push(U), U = U.parent;
775
+ const V = Ps(E.slice(2));
776
+ a.trigger({ type: V, event: S, intersection: K });
801
777
  }
802
778
  }
803
779
  const {
804
- onClick: a,
805
- onDblClick: f,
806
- onContextMenu: h,
807
- onPointerMove: c,
808
- onPointerDown: _,
780
+ onClick: u,
781
+ onDblClick: c,
782
+ onContextMenu: p,
783
+ onPointerMove: f,
784
+ onPointerDown: h,
809
785
  onPointerUp: d,
810
- onPointerMissed: E,
811
- onWheel: p,
786
+ onPointerMissed: v,
787
+ onWheel: _,
812
788
  forceUpdate: m
813
- } = Xs(u, t);
814
- d((v) => l("onPointerUp", v)), _((v) => l("onPointerDown", v)), a((v) => l("onClick", v)), f((v) => l("onDoubleClick", v)), h((v) => l("onContextMenu", v)), p((v) => l("onWheel", v));
815
- let C = [];
816
- c((v) => {
817
- const S = v.intersections.map(({ object: V }) => V), M = v.intersections;
818
- C.forEach(({ object: V }) => {
819
- S.includes(V) || (v.intersections = C, l("onPointerLeave", v), l("onPointerOut", v));
820
- }), v.intersections = M, v.intersections.forEach(({ object: V }) => {
821
- C.includes(V) || (l("onPointerEnter", v), l("onPointerOver", v));
822
- }), l("onPointerMove", v), C = v.intersections;
789
+ } = Zs(i, t);
790
+ d((E) => l("onPointerUp", E)), h((E) => l("onPointerDown", E)), u((E) => l("onClick", E)), c((E) => l("onDoubleClick", E)), p((E) => l("onContextMenu", E)), _((E) => l("onWheel", E));
791
+ let T = [];
792
+ f((E) => {
793
+ const S = E.intersections.map(({ object: B }) => B), x = E.intersections;
794
+ T.forEach(({ object: B }) => {
795
+ S.includes(B) || (E.intersections = T, l("onPointerLeave", E), l("onPointerOut", E));
796
+ }), E.intersections = x, E.intersections.forEach(({ object: B }) => {
797
+ T.includes(B) || (l("onPointerEnter", E), l("onPointerOver", E));
798
+ }), l("onPointerMove", E), T = E.intersections;
823
799
  });
824
- const T = [];
825
- E((v) => {
826
- const S = () => v.stopPropagating = !0;
827
- v.stopPropagation = S, T.forEach((M) => {
828
- v.stopPropagating || (v.eventObject = M, et(M.onPointerMissed, v));
829
- }), n("pointer-missed", { event: v });
800
+ const b = [];
801
+ v((E) => {
802
+ const S = () => E.stopPropagating = !0;
803
+ E.stopPropagation = S, b.forEach((x) => {
804
+ E.stopPropagating || (E.eventObject = x, Je(x.onPointerMissed, E));
805
+ }), a.trigger({ type: "pointer-missed", event: E });
830
806
  });
831
- function O(v) {
832
- Ie(v) && ee(v) && u.value.push(v);
807
+ function C(E) {
808
+ ve(E) && ee(E) && i.value.push(E);
833
809
  }
834
- function k(v) {
835
- if (Ie(v) && ee(v)) {
836
- const S = u.value.indexOf(v);
837
- S > -1 && u.value.splice(S, 1);
810
+ function M(E) {
811
+ if (ve(E) && ee(E)) {
812
+ const S = i.value.indexOf(E);
813
+ S > -1 && i.value.splice(S, 1);
838
814
  }
839
815
  }
840
- function P(v) {
841
- Ie(v) && ee(v) && v.onPointerMissed && T.push(v);
816
+ function P(E) {
817
+ ve(E) && ee(E) && E.onPointerMissed && b.push(E);
842
818
  }
843
- function D(v) {
844
- if (Ie(v) && ee(v)) {
845
- const S = T.indexOf(v);
846
- S > -1 && T.splice(S, 1);
819
+ function O(E) {
820
+ if (ve(E) && ee(E)) {
821
+ const S = b.indexOf(E);
822
+ S > -1 && b.splice(S, 1);
847
823
  }
848
824
  }
849
825
  return t.eventManager = {
826
+ onEvent: a.on,
850
827
  forceUpdate: m,
851
- registerObject: O,
852
- deregisterObject: k,
828
+ registerObject: C,
829
+ deregisterObject: M,
853
830
  registerPointerMissedObject: P,
854
- deregisterPointerMissedObject: D
831
+ deregisterPointerMissedObject: O
855
832
  }, {
833
+ onEvent: a.on,
856
834
  forceUpdate: m,
857
- registerObject: O,
858
- deregisterObject: k,
835
+ registerObject: C,
836
+ deregisterObject: M,
859
837
  registerPointerMissedObject: P,
860
- deregisterPointerMissedObject: D
838
+ deregisterPointerMissedObject: O
861
839
  };
862
840
  }
863
- function Js(e, t, n = 100) {
864
- n = n <= 0 ? 100 : n;
865
- const r = $(), o = /* @__PURE__ */ new Set();
866
- let s = !1, i = !1, u = null;
867
- function l() {
868
- u && clearTimeout(u), !i && !s && e() ? (r.trigger(t), o.forEach((c) => c()), o.clear(), s = !0) : !i && !s && (u = setTimeout(l, n));
869
- }
870
- function a() {
871
- i = !0, u && clearTimeout(u);
872
- }
873
- l();
874
- const f = (c, ..._) => {
875
- c(..._);
876
- };
877
- return {
878
- on: (c) => {
879
- if (s)
880
- return f(c, t), { off: () => {
881
- } };
882
- {
883
- const _ = r.on(c);
884
- return o.add(_.off), r.on(c);
885
- }
886
- },
887
- off: r.off,
888
- trigger: r.trigger,
889
- clear: r.clear,
890
- cancel: a
891
- };
892
- }
893
- const Ce = /* @__PURE__ */ new WeakMap();
894
- function yr(e) {
895
- if (e = e || Ge(), Ce.has(e))
896
- return Ce.get(e);
897
- const t = 100, n = Date.now(), s = Js(() => {
898
- if (Date.now() - n >= t)
899
- return !0;
900
- {
901
- const i = e.renderer.value, u = (i == null ? void 0 : i.domElement) || { width: 0, height: 0 };
902
- return !!(i && u.width > 0 && u.height > 0);
903
- }
904
- }, e);
905
- return Ce.set(e, s), s;
906
- }
907
- function ka(e) {
908
- const t = Ge();
909
- if (t)
910
- return Ce.has(t) ? Ce.get(t).on(e) : yr(t).on(e);
911
- }
912
- function Ot(e) {
913
- let t = 0;
914
- return e.traverse((n) => {
915
- if (n.isMesh && n.geometry && n.type !== "HightlightMesh") {
916
- const r = n.geometry, o = r.attributes.position.count * 3 * Float32Array.BYTES_PER_ELEMENT, s = r.index ? r.index.count * Uint32Array.BYTES_PER_ELEMENT : 0, i = r.attributes.normal ? r.attributes.normal.count * 3 * Float32Array.BYTES_PER_ELEMENT : 0, u = r.attributes.uv ? r.attributes.uv.count * 2 * Float32Array.BYTES_PER_ELEMENT : 0, l = o + s + i + u;
917
- t += l;
918
- }
919
- }), t;
920
- }
921
- function Zt(e, t, n) {
922
- e.push(t), e.length > n && e.shift();
923
- }
924
- function Qs(e) {
925
- return (e / 1024).toFixed(2);
926
- }
927
- function ei(e) {
928
- if (!e)
929
- return;
930
- const t = 100, n = Wo({ every: t }), { isSupported: r, memory: o } = Yo({ interval: t }), s = 160;
931
- let i = performance.now(), u = 0;
932
- const l = 1, a = ({ timestamp: h }) => {
933
- var c;
934
- e.scene.value && (e.perf.memory.allocatedMem = Ot(e.scene.value)), h - i >= t && (i = h, Zt(e.perf.fps.accumulator, n.value, s), e.perf.fps.value = n.value, r.value && ((c = o.value) != null && c.usedJSHeapSize) && (Zt(e.perf.memory.accumulator, o.value.usedJSHeapSize / 1024 / 1024, s), e.perf.memory.accumulator.length > 0 && (e.perf.memory.currentMem = e.perf.memory.accumulator.reduce((_, d) => _ + d, 0) / e.perf.memory.accumulator.length)));
935
- }, { pause: f } = pr(({ delta: h }) => {
936
- window.__TRES__DEVTOOLS__ && (a({ timestamp: performance.now() }), u += h, u >= l && (window.__TRES__DEVTOOLS__.cb(e), u = 0));
937
- }, { immediate: !0 });
938
- le(() => {
939
- f();
940
- });
941
- }
942
- function ti({
841
+ function Qs({
943
842
  scene: e,
944
843
  canvas: t,
945
844
  windowSize: n,
946
- rendererOptions: r,
947
- emit: o
845
+ rendererOptions: r
948
846
  }) {
949
- const s = Z(e), i = qs(n, t), {
950
- camera: u,
951
- cameras: l,
952
- registerCamera: a,
953
- deregisterCamera: f,
954
- setCameraActive: h
955
- } = js({ sizes: i }), c = {
956
- mode: X(r.renderMode || "always"),
957
- priority: X(0),
958
- frames: X(0),
959
- maxFrames: 60,
960
- canBeInvalidated: ue(() => c.mode.value === "on-demand" && c.frames.value === 0)
961
- };
962
- function _(T = 1) {
963
- r.renderMode === "on-demand" && (c.frames.value = Math.min(c.maxFrames, c.frames.value + T));
964
- }
965
- function d() {
966
- r.renderMode === "manual" && (c.frames.value = 1);
967
- }
968
- const { renderer: E } = Ys(
847
+ const o = J(e), s = Xs(n, t), i = zs({ sizes: s }), a = Gs(), l = qs(
969
848
  {
849
+ scene: e,
970
850
  canvas: t,
971
851
  options: r,
972
- // TODO: replace contextParts with full ctx at https://github.com/Tresjs/tres/issues/516
973
- contextParts: { sizes: i, render: c, invalidate: _, advance: d }
852
+ contextParts: { sizes: s, camera: i, loop: a }
974
853
  }
975
- ), p = {
976
- sizes: i,
977
- scene: s,
978
- camera: u,
979
- cameras: st(l),
980
- renderer: E,
981
- raycaster: Z(new wo()),
982
- controls: X(null),
983
- perf: {
984
- maxFrames: 160,
985
- fps: {
986
- value: 0,
987
- accumulator: []
988
- },
989
- memory: {
990
- currentMem: 0,
991
- allocatedMem: 0,
992
- accumulator: []
993
- }
994
- },
995
- render: c,
996
- advance: d,
997
- extend: ft,
998
- invalidate: _,
999
- registerCamera: a,
1000
- setCameraActive: h,
1001
- deregisterCamera: f,
1002
- loop: $s()
854
+ ), u = {
855
+ sizes: s,
856
+ scene: o,
857
+ camera: i,
858
+ renderer: l,
859
+ raycaster: J(new To()),
860
+ controls: ie(null),
861
+ extend: ct,
862
+ loop: a
1003
863
  };
1004
- Le("useTres", p), p.scene.value.__tres = {
1005
- root: p
1006
- }, p.loop.register(() => {
1007
- u.value && c.frames.value > 0 && (E.value.render(e, u.value), o("render", p.renderer.value)), c.priority.value = 0, c.mode.value === "always" ? c.frames.value = 1 : c.frames.value = Math.max(0, c.frames.value - 1);
1008
- }, "render");
1009
- const { on: m, cancel: C } = yr(p);
1010
- return p.loop.setReady(!1), p.loop.start(), m(() => {
1011
- o("ready", p), p.loop.setReady(!0), Zs(e, p, o);
1012
- }), le(() => {
1013
- C(), p.loop.stop();
1014
- }), ei(p), p;
1015
- }
1016
- function Ge() {
1017
- const e = lo("useTres");
864
+ return Be("useTres", u), u.scene.value.__tres = {
865
+ root: u
866
+ }, u.loop.setReady(!1), u.loop.start(), He(l.isReady, () => {
867
+ u.loop.setReady(!0);
868
+ }, {
869
+ once: !0,
870
+ immediate: !0
871
+ }), Js(e, u), me(() => {
872
+ u.loop.stop();
873
+ }), u;
874
+ }
875
+ function gr() {
876
+ const e = ao("useTres");
1018
877
  if (!e)
1019
878
  throw new Error("useTresContext must be used together with useTresContextProvider");
1020
879
  return e;
1021
880
  }
1022
- const Pa = Ge;
1023
- function Ia() {
881
+ function Pa() {
1024
882
  const {
1025
883
  camera: e,
1026
884
  scene: t,
1027
885
  renderer: n,
1028
886
  loop: r,
1029
887
  raycaster: o,
1030
- controls: s,
1031
- invalidate: i,
1032
- advance: u
1033
- } = Ge();
888
+ controls: s
889
+ } = gr();
1034
890
  r.setContext({
1035
891
  camera: e,
1036
892
  scene: t,
1037
- renderer: n,
893
+ renderer: n.instance,
1038
894
  raycaster: o,
1039
- controls: s,
1040
- invalidate: i,
1041
- advance: u
895
+ controls: s
1042
896
  });
1043
- function l(h, c = 0) {
1044
- return r.register(h, "before", c);
897
+ function i(u, c = 0) {
898
+ return r.register(u, "before", c);
1045
899
  }
1046
- function a(h) {
1047
- return r.register(h, "render");
900
+ function a(u) {
901
+ return r.register(u, "render");
1048
902
  }
1049
- function f(h, c = 0) {
1050
- return r.register(h, "after", c);
903
+ function l(u, c = 0) {
904
+ return r.register(u, "after", c);
1051
905
  }
1052
906
  return {
1053
907
  pause: r.pause,
@@ -1055,77 +909,66 @@ function Ia() {
1055
909
  pauseRender: r.pauseRender,
1056
910
  resumeRender: r.resumeRender,
1057
911
  isActive: r.isActive,
1058
- onBeforeRender: l,
912
+ onBeforeRender: i,
1059
913
  render: a,
1060
- onAfterRender: f
914
+ onAfterRender: l
1061
915
  };
1062
916
  }
1063
- const Ar = $(), Cr = $(), St = $(), Te = new fr();
917
+ const Er = z(), vr = z(), Ot = z(), Te = new ir();
1064
918
  let Ve = 0, Fe = 0;
1065
- const { pause: ni, resume: Jt, isActive: ri } = pr(
919
+ const { pause: ei, resume: Wt, isActive: ti } = ar(
1066
920
  () => {
1067
- Ar.trigger({ delta: Ve, elapsed: Fe, clock: Te }), Cr.trigger({ delta: Ve, elapsed: Fe, clock: Te }), St.trigger({ delta: Ve, elapsed: Fe, clock: Te });
921
+ Er.trigger({ delta: Ve, elapsed: Fe, clock: Te }), vr.trigger({ delta: Ve, elapsed: Fe, clock: Te }), Ot.trigger({ delta: Ve, elapsed: Fe, clock: Te });
1068
922
  },
1069
923
  { immediate: !1 }
1070
924
  );
1071
- St.on(() => {
925
+ Ot.on(() => {
1072
926
  Ve = Te.getDelta(), Fe = Te.getElapsedTime();
1073
927
  });
1074
- let Qt = !1;
1075
- const Ra = () => (Qt || (Qt = !0, Jt()), {
1076
- onBeforeLoop: Ar.on,
1077
- onLoop: Cr.on,
1078
- onAfterLoop: St.on,
1079
- pause: ni,
1080
- resume: Jt,
1081
- isActive: ri
928
+ let Yt = !1;
929
+ const Ia = () => (Yt || (Yt = !0, Wt()), {
930
+ onBeforeLoop: Er.on,
931
+ onLoop: vr.on,
932
+ onAfterLoop: Ot.on,
933
+ pause: ei,
934
+ resume: Wt,
935
+ isActive: ti
1082
936
  });
1083
- function xa() {
1084
- function e(o, s, i) {
1085
- let u = null;
1086
- return o.traverse((l) => {
1087
- l[s] === i && (u = l);
1088
- }), u || Se(`Child with ${s} '${i}' not found.`), u;
1089
- }
1090
- function t(o, s, i) {
1091
- const u = [];
1092
- return o.traverse((l) => {
1093
- l[s].includes(i) && u.push(l);
1094
- }), u.length || Se(`Children with ${s} '${i}' not found.`), u;
1095
- }
1096
- function n(o, s) {
1097
- return e(o, "name", s);
1098
- }
1099
- function r(o, s) {
1100
- return t(o, "name", s);
1101
- }
937
+ function Ra() {
938
+ const { scene: e, renderer: t, camera: n, sizes: r, controls: o, loop: s, extend: i, raycaster: a } = gr();
1102
939
  return {
1103
- seek: e,
1104
- seekByName: n,
1105
- seekAll: t,
1106
- seekAllByName: r
940
+ scene: e,
941
+ renderer: I(t.instance),
942
+ camera: n.activeCamera,
943
+ sizes: r,
944
+ controls: o,
945
+ loop: s,
946
+ extend: i,
947
+ raycaster: a,
948
+ invalidate: () => t.invalidate(),
949
+ advance: () => t.advance()
1107
950
  };
1108
951
  }
1109
- function oi(e, t = {}, n = {}) {
952
+ function ni(e, t = {}, n = {}) {
1110
953
  let r = e;
1111
- const o = (u) => {
1112
- r = u;
954
+ const o = (a) => {
955
+ r = a;
1113
956
  };
1114
957
  let s = new Proxy({}, {});
1115
958
  const i = {
1116
- has(u, l) {
959
+ has(a, l) {
1117
960
  return l in t || l in r;
1118
961
  },
1119
- get(u, l, a) {
962
+ get(a, l, u) {
1120
963
  return l in t ? t[l](r) : r[l];
1121
964
  },
1122
- set(u, l, a) {
1123
- return n[l] ? n[l](a, r, s, o) : r[l] = a, !0;
965
+ set(a, l, u) {
966
+ return n[l] ? n[l](u, r, s, o) : r[l] = u, !0;
1124
967
  }
1125
968
  };
1126
969
  return s = new Proxy({}, i), s;
1127
970
  }
1128
- const en = [
971
+ const qt = [
1129
972
  "onClick",
1130
973
  "onContextMenu",
1131
974
  "onPointerMove",
@@ -1140,135 +983,143 @@ const en = [
1140
983
  "onPointerMissed",
1141
984
  "onLostPointerCapture",
1142
985
  "onWheel"
1143
- ], si = (e) => {
986
+ ], ri = (e) => {
1144
987
  const t = e.scene.value;
1145
- function n(a, f, h, c) {
1146
- if (c || (c = {}), c.args || (c.args = []), a === "template" || Ss(a))
988
+ function n(u, c, p, f) {
989
+ if (f || (f = {}), f.args || (f.args = []), u === "template" || ws(u))
1147
990
  return null;
1148
- let _ = a.replace("Tres", ""), d;
1149
- if (a === "primitive") {
1150
- (!J(c.object) || co(c.object)) && at(
991
+ let h = u.replace("Tres", ""), d;
992
+ if (u === "primitive") {
993
+ (!G(f.object) || Ce(f.object)) && it(
1151
994
  "Tres primitives need an 'object' prop, whose value is an object or shallowRef<object>"
1152
- ), _ = c.object.type;
1153
- const E = {};
1154
- d = oi(
1155
- c.object,
995
+ ), h = f.object.type;
996
+ const v = {};
997
+ d = ni(
998
+ f.object,
1156
999
  {
1157
1000
  object: (m) => m,
1158
1001
  isPrimitive: () => !0,
1159
- __tres: () => E
1002
+ __tres: () => v
1160
1003
  },
1161
1004
  {
1162
- object: (m, C, T, O) => {
1163
- Ns(m, T, O, { patchProp: s, remove: o, insert: r }, e);
1005
+ object: (m, T, b, C) => {
1006
+ js(m, b, C, { patchProp: s, remove: o, insert: r }, e);
1164
1007
  },
1165
1008
  __tres: (m) => {
1166
- Object.assign(E, m);
1009
+ Object.assign(v, m);
1167
1010
  }
1168
1011
  }
1169
1012
  );
1170
1013
  } else {
1171
- const E = ct.value[_];
1172
- E || at(
1173
- `${_} is not defined on the THREE namespace. Use extend to add it to the catalog.`
1174
- ), d = new E(...c.args);
1014
+ const v = lt.value[h];
1015
+ v || it(
1016
+ `${h} is not defined on the THREE namespace. Use extend to add it to the catalog.`
1017
+ ), d = new v(...f.args);
1175
1018
  }
1176
- return d ? (d.isCamera && (c != null && c.position || d.position.set(3, 3, 3), c != null && c.lookAt || d.lookAt(0, 0, 0)), d = oe(d, {
1177
- ...d.__tres,
1178
- type: _,
1179
- memoizedProps: c,
1019
+ return d ? (fe(d) && (f != null && f.position || d.position.set(3, 3, 3), f != null && f.lookAt || d.lookAt(0, 0, 0)), d = oe(d, {
1020
+ ...Ss(d) ? d.__tres : {},
1021
+ type: h,
1022
+ memoizedProps: f,
1180
1023
  eventCount: 0,
1181
- primitive: a === "primitive",
1182
- attach: c.attach
1024
+ primitive: u === "primitive",
1025
+ attach: f.attach
1183
1026
  }, e), d) : null;
1184
1027
  }
1185
- function r(a, f) {
1186
- var _, d, E;
1187
- if (!a)
1028
+ function r(u, c) {
1029
+ var h, d, v, _;
1030
+ if (!u)
1188
1031
  return;
1189
- f = f || t;
1190
- const h = a.__tres ? a : oe(a, {}, e), c = f.__tres ? f : oe(f, {}, e);
1191
- a = de(h), f = de(c), a.__tres && ((_ = a.__tres) == null ? void 0 : _.eventCount) > 0 && ((d = e.eventManager) == null || d.registerObject(a)), e.registerCamera(a), (E = e.eventManager) == null || E.registerPointerMissedObject(a), h.__tres.attach ? Ls(c, h, h.__tres.attach) : ee(a) && ee(c) && (c.add(a), a.dispatchEvent({ type: "added" })), h.__tres.parent = c, c.__tres.objects && !c.__tres.objects.includes(h) && c.__tres.objects.push(h);
1032
+ c = c || t;
1033
+ const p = u.__tres ? u : oe(u, {}, e), f = c.__tres ? c : oe(c, {}, e);
1034
+ u = de(p), c = de(f), u.__tres && ((h = u.__tres) == null ? void 0 : h.eventCount) > 0 && ((d = e.eventManager) == null || d.registerObject(u)), fe(u) && ((v = e.camera) == null || v.registerCamera(u)), (_ = e.eventManager) == null || _.registerPointerMissedObject(u), p.__tres.attach ? Ns(f, p, p.__tres.attach) : ee(u) && ee(f) && (f.add(u), u.dispatchEvent({ type: "added" })), p.__tres.parent = f, f.__tres.objects && !f.__tres.objects.includes(p) && f.__tres.objects.push(p);
1192
1035
  }
1193
- function o(a, f) {
1194
- var d, E, p, m;
1195
- if (!a)
1036
+ function o(u, c) {
1037
+ var d, v, _, m;
1038
+ if (!u)
1196
1039
  return;
1197
- a != null && a.__tres && ((d = a.__tres) == null ? void 0 : d.eventCount) > 0 && ((E = e.eventManager) == null || E.deregisterObject(a)), f = ut(f) ? "default" : f;
1198
- const h = (p = a.__tres) == null ? void 0 : p.dispose;
1199
- ut(h) || (h === null ? f = !1 : f = h);
1200
- const c = (m = a.__tres) == null ? void 0 : m.primitive, _ = f === "default" ? !c : !!f;
1201
- if (a.__tres && "objects" in a.__tres && [...a.__tres.objects].forEach((C) => o(C, f)), _ && a.children && [...a.children].forEach((C) => o(C, f)), Er(a, e), vr(a, e), _ && !Cs(a)) {
1202
- if (se(f))
1203
- f(a);
1204
- else if (se(a.dispose))
1040
+ u != null && u.__tres && ((d = u.__tres) == null ? void 0 : d.eventCount) > 0 && ((v = e.eventManager) == null || v.deregisterObject(u)), c = ot(c) ? "default" : c;
1041
+ const p = (_ = u.__tres) == null ? void 0 : _.dispose;
1042
+ ot(p) || (p === null ? c = !1 : c = p);
1043
+ const f = (m = u.__tres) == null ? void 0 : m.primitive, h = c === "default" ? !f : !!c;
1044
+ if (u.__tres && "objects" in u.__tres && [...u.__tres.objects].forEach((T) => o(T, c)), h && u.children && [...u.children].forEach((T) => o(T, c)), hr(u, e), mr(u, e), h && !Ts(u)) {
1045
+ if (le(c))
1046
+ c(u);
1047
+ else if (le(u.dispose))
1205
1048
  try {
1206
- a.dispose();
1049
+ u.dispose();
1207
1050
  } catch {
1208
1051
  }
1209
1052
  }
1210
- "__tres" in a && delete a.__tres;
1053
+ "__tres" in u && delete u.__tres;
1211
1054
  }
1212
- function s(a, f, h, c) {
1213
- var C, T;
1214
- if (!a)
1055
+ function s(u, c, p, f) {
1056
+ var T, b;
1057
+ if (!u)
1215
1058
  return;
1216
- let _ = a, d = f;
1217
- if (a.__tres && (a.__tres.memoizedProps[f] = c), f === "attach") {
1218
- const O = ((C = a.__tres) == null ? void 0 : C.parent) || a.parent;
1219
- o(a), oe(a, { attach: c }, e), O && r(a, O);
1059
+ let h = u, d = c;
1060
+ if (u.__tres && (u.__tres.memoizedProps[c] = f), c === "attach") {
1061
+ const C = ((T = u.__tres) == null ? void 0 : T.parent) || u.parent;
1062
+ o(u), oe(u, { attach: f }, e), C && r(u, C);
1220
1063
  return;
1221
1064
  }
1222
- if (f === "dispose") {
1223
- a.__tres || (a = oe(a, {}, e)), a.__tres.dispose = c;
1065
+ if (c === "dispose") {
1066
+ u.__tres || (u = oe(u, {}, e)), u.__tres.dispose = f;
1224
1067
  return;
1225
1068
  }
1226
- if (ee(a) && d === "blocks-pointer-events") {
1227
- c || c === "" ? a[d] = c : delete a[d];
1069
+ if (ee(u) && d === "blocks-pointer-events") {
1070
+ f || f === "" ? u[d] = f : delete u[d];
1228
1071
  return;
1229
1072
  }
1230
- en.includes(f) && a.__tres && (a.__tres.eventCount += 1);
1231
- let E = Re(d), p = _ == null ? void 0 : _[E];
1073
+ qt.includes(c) && u.__tres && (u.__tres.eventCount += 1);
1074
+ let v = Le(d), _ = h == null ? void 0 : h[v];
1232
1075
  if (d === "args") {
1233
- const O = a, k = h ?? [], P = c ?? [], D = ((T = a.__tres) == null ? void 0 : T.type) || a.type;
1234
- D && k.length && !Ps(k, P) && (_ = Object.assign(
1235
- O,
1236
- new ct.value[D](...c)
1237
- ));
1076
+ const C = u, M = p ?? [], P = f ?? [], O = ((b = u.__tres) == null ? void 0 : b.type) || u.type;
1077
+ if (O && M.length && !xs(M, P)) {
1078
+ const k = new lt.value[O](...f), E = Object.getOwnPropertyDescriptors(k);
1079
+ Object.entries(E).forEach(([S, x]) => {
1080
+ if (!(!x.writable && !x.set) && S in C)
1081
+ try {
1082
+ C[S] = k[S];
1083
+ } catch (B) {
1084
+ console.warn(`Could not set property ${S} on ${O}:`, B);
1085
+ }
1086
+ }), h = C;
1087
+ }
1238
1088
  return;
1239
1089
  }
1240
- if (_.type === "BufferGeometry") {
1090
+ if (h.type === "BufferGeometry") {
1241
1091
  if (d === "args")
1242
1092
  return;
1243
- _.setAttribute(
1244
- Re(d),
1245
- new ko(...c)
1093
+ h.setAttribute(
1094
+ Le(d),
1095
+ new So(...f)
1246
1096
  );
1247
1097
  return;
1248
1098
  }
1249
- if (d.includes("-") && p === void 0) {
1250
- const O = d.split("-");
1251
- p = O.reduce((k, P) => k[Re(P)], _), d = O.pop(), E = d, p != null && p.set || (_ = O.reduce((k, P) => k[Re(P)], _));
1099
+ if (d.includes("-") && _ === void 0) {
1100
+ _ = h;
1101
+ for (const C of d.split("-"))
1102
+ v = d = Le(C), h = _, _ = _ == null ? void 0 : _[d];
1252
1103
  }
1253
- let m = c;
1254
- if (m === "" && (m = !0), se(p)) {
1255
- en.includes(f) || (je(m) ? a[E](...m) : a[E](m)), E.startsWith("on") && se(m) && (_[E] = m);
1104
+ let m = f;
1105
+ if (m === "" && (m = !0), le(_)) {
1106
+ qt.includes(c) || (lr(m) ? u[v](...m) : u[v](m)), v.startsWith("on") && le(m) && (h[v] = m);
1256
1107
  return;
1257
1108
  }
1258
- !(p != null && p.set) && !se(p) ? _[E] = m : p.constructor === m.constructor && (p != null && p.copy) ? p == null || p.copy(m) : je(m) ? p.set(...m) : !p.isColor && p.setScalar ? p.setScalar(m) : p.set(m), gr(a);
1109
+ Ht(_) && Ht(m) ? _.mask = m.mask : fr(_) && ms(m) ? _.set(m) : gs(_) && Es(m) && _.constructor === m.constructor ? _.copy(m) : st(_) && Array.isArray(m) ? "fromArray" in _ && typeof _.fromArray == "function" ? _.fromArray(m) : _.set(...m) : st(_) && typeof m == "number" ? "setScalar" in _ && typeof _.setScalar == "function" ? _.setScalar(m) : _.set(m) : h[v] = m, fe(u) && u.updateProjectionMatrix(), _r(u);
1259
1110
  }
1260
- function i(a) {
1261
- var f;
1262
- return ((f = a == null ? void 0 : a.__tres) == null ? void 0 : f.parent) || null;
1111
+ function i(u) {
1112
+ var c;
1113
+ return ((c = u == null ? void 0 : u.__tres) == null ? void 0 : c.parent) || null;
1263
1114
  }
1264
- function u(a) {
1265
- const f = oe(new Do(), { type: "Comment" }, e);
1266
- return f.name = a, f;
1115
+ function a(u) {
1116
+ const c = oe(new bo(), { type: "Comment" }, e);
1117
+ return c.name = u, c;
1267
1118
  }
1268
- function l(a) {
1269
- var _;
1270
- const f = i(a), h = ((_ = f == null ? void 0 : f.__tres) == null ? void 0 : _.objects) || [], c = h.indexOf(a);
1271
- return c < 0 || c >= h.length - 1 ? null : h[c + 1];
1119
+ function l(u) {
1120
+ var h;
1121
+ const c = i(u), p = ((h = c == null ? void 0 : c.__tres) == null ? void 0 : h.objects) || [], f = p.indexOf(u);
1122
+ return f < 0 || f >= p.length - 1 ? null : p[f + 1];
1272
1123
  }
1273
1124
  return {
1274
1125
  insert: r,
@@ -1277,7 +1128,7 @@ const en = [
1277
1128
  patchProp: s,
1278
1129
  parentNode: i,
1279
1130
  createText: () => void 0,
1280
- createComment: u,
1131
+ createComment: a,
1281
1132
  setText: () => void 0,
1282
1133
  setElementText: () => void 0,
1283
1134
  nextSibling: l,
@@ -1287,162 +1138,162 @@ const en = [
1287
1138
  insertStaticContent: () => void 0
1288
1139
  };
1289
1140
  };
1290
- var ii = Object.create, Tr = Object.defineProperty, ui = Object.getOwnPropertyDescriptor, bt = Object.getOwnPropertyNames, ai = Object.getPrototypeOf, li = Object.prototype.hasOwnProperty, ci = (e, t) => function() {
1291
- return e && (t = (0, e[bt(e)[0]])(e = 0)), t;
1292
- }, fi = (e, t) => function() {
1293
- return t || (0, e[bt(e)[0]])((t = { exports: {} }).exports, t), t.exports;
1294
- }, di = (e, t, n, r) => {
1141
+ var oi = Object.create, yr = Object.defineProperty, si = Object.getOwnPropertyDescriptor, Tt = Object.getOwnPropertyNames, ii = Object.getPrototypeOf, ui = Object.prototype.hasOwnProperty, ai = (e, t) => function() {
1142
+ return e && (t = (0, e[Tt(e)[0]])(e = 0)), t;
1143
+ }, li = (e, t) => function() {
1144
+ return t || (0, e[Tt(e)[0]])((t = { exports: {} }).exports, t), t.exports;
1145
+ }, ci = (e, t, n, r) => {
1295
1146
  if (t && typeof t == "object" || typeof t == "function")
1296
- for (let o of bt(t))
1297
- !li.call(e, o) && o !== n && Tr(e, o, { get: () => t[o], enumerable: !(r = ui(t, o)) || r.enumerable });
1147
+ for (let o of Tt(t))
1148
+ !ui.call(e, o) && o !== n && yr(e, o, { get: () => t[o], enumerable: !(r = si(t, o)) || r.enumerable });
1298
1149
  return e;
1299
- }, pi = (e, t, n) => (n = e != null ? ii(ai(e)) : {}, di(
1150
+ }, fi = (e, t, n) => (n = e != null ? oi(ii(e)) : {}, ci(
1300
1151
  // If the importer is in node compatibility mode or this is not an ESM
1301
1152
  // file that has been converted to a CommonJS file using a Babel-
1302
1153
  // compatible transform (i.e. "__esModule" has not been set), then set
1303
1154
  // "default" to the CommonJS "module.exports" for node compatibility.
1304
- Tr(n, "default", { value: e, enumerable: !0 }),
1155
+ yr(n, "default", { value: e, enumerable: !0 }),
1305
1156
  e
1306
- )), Pe = ci({
1307
- "../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.1_@types+node@22.10.5__jiti@2.4.2_postcss@8.4.49_tsx_s7k37zks4wtn7x2grzma6lrsfa/node_modules/tsup/assets/esm_shims.js"() {
1157
+ )), Ie = ai({
1158
+ "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"() {
1308
1159
  }
1309
- }), _i = fi({
1160
+ }), di = li({
1310
1161
  "../../node_modules/.pnpm/rfdc@1.4.1/node_modules/rfdc/index.js"(e, t) {
1311
- Pe(), t.exports = r;
1162
+ Ie(), t.exports = r;
1312
1163
  function n(s) {
1313
1164
  return s instanceof Buffer ? Buffer.from(s) : new s.constructor(s.buffer.slice(), s.byteOffset, s.length);
1314
1165
  }
1315
1166
  function r(s) {
1316
1167
  if (s = s || {}, s.circles) return o(s);
1317
1168
  const i = /* @__PURE__ */ new Map();
1318
- if (i.set(Date, (h) => new Date(h)), i.set(Map, (h, c) => new Map(l(Array.from(h), c))), i.set(Set, (h, c) => new Set(l(Array.from(h), c))), s.constructorHandlers)
1319
- for (const h of s.constructorHandlers)
1320
- i.set(h[0], h[1]);
1321
- let u = null;
1322
- return s.proto ? f : a;
1323
- function l(h, c) {
1324
- const _ = Object.keys(h), d = new Array(_.length);
1325
- for (let E = 0; E < _.length; E++) {
1326
- const p = _[E], m = h[p];
1327
- typeof m != "object" || m === null ? d[p] = m : m.constructor !== Object && (u = i.get(m.constructor)) ? d[p] = u(m, c) : ArrayBuffer.isView(m) ? d[p] = n(m) : d[p] = c(m);
1169
+ if (i.set(Date, (p) => new Date(p)), i.set(Map, (p, f) => new Map(l(Array.from(p), f))), i.set(Set, (p, f) => new Set(l(Array.from(p), f))), s.constructorHandlers)
1170
+ for (const p of s.constructorHandlers)
1171
+ i.set(p[0], p[1]);
1172
+ let a = null;
1173
+ return s.proto ? c : u;
1174
+ function l(p, f) {
1175
+ const h = Object.keys(p), d = new Array(h.length);
1176
+ for (let v = 0; v < h.length; v++) {
1177
+ const _ = h[v], m = p[_];
1178
+ typeof m != "object" || m === null ? d[_] = m : m.constructor !== Object && (a = i.get(m.constructor)) ? d[_] = a(m, f) : ArrayBuffer.isView(m) ? d[_] = n(m) : d[_] = f(m);
1328
1179
  }
1329
1180
  return d;
1330
1181
  }
1331
- function a(h) {
1332
- if (typeof h != "object" || h === null) return h;
1333
- if (Array.isArray(h)) return l(h, a);
1334
- if (h.constructor !== Object && (u = i.get(h.constructor)))
1335
- return u(h, a);
1336
- const c = {};
1337
- for (const _ in h) {
1338
- if (Object.hasOwnProperty.call(h, _) === !1) continue;
1339
- const d = h[_];
1340
- typeof d != "object" || d === null ? c[_] = d : d.constructor !== Object && (u = i.get(d.constructor)) ? c[_] = u(d, a) : ArrayBuffer.isView(d) ? c[_] = n(d) : c[_] = a(d);
1182
+ function u(p) {
1183
+ if (typeof p != "object" || p === null) return p;
1184
+ if (Array.isArray(p)) return l(p, u);
1185
+ if (p.constructor !== Object && (a = i.get(p.constructor)))
1186
+ return a(p, u);
1187
+ const f = {};
1188
+ for (const h in p) {
1189
+ if (Object.hasOwnProperty.call(p, h) === !1) continue;
1190
+ const d = p[h];
1191
+ typeof d != "object" || d === null ? f[h] = d : d.constructor !== Object && (a = i.get(d.constructor)) ? f[h] = a(d, u) : ArrayBuffer.isView(d) ? f[h] = n(d) : f[h] = u(d);
1341
1192
  }
1342
- return c;
1193
+ return f;
1343
1194
  }
1344
- function f(h) {
1345
- if (typeof h != "object" || h === null) return h;
1346
- if (Array.isArray(h)) return l(h, f);
1347
- if (h.constructor !== Object && (u = i.get(h.constructor)))
1348
- return u(h, f);
1349
- const c = {};
1350
- for (const _ in h) {
1351
- const d = h[_];
1352
- typeof d != "object" || d === null ? c[_] = d : d.constructor !== Object && (u = i.get(d.constructor)) ? c[_] = u(d, f) : ArrayBuffer.isView(d) ? c[_] = n(d) : c[_] = f(d);
1195
+ function c(p) {
1196
+ if (typeof p != "object" || p === null) return p;
1197
+ if (Array.isArray(p)) return l(p, c);
1198
+ if (p.constructor !== Object && (a = i.get(p.constructor)))
1199
+ return a(p, c);
1200
+ const f = {};
1201
+ for (const h in p) {
1202
+ const d = p[h];
1203
+ typeof d != "object" || d === null ? f[h] = d : d.constructor !== Object && (a = i.get(d.constructor)) ? f[h] = a(d, c) : ArrayBuffer.isView(d) ? f[h] = n(d) : f[h] = c(d);
1353
1204
  }
1354
- return c;
1205
+ return f;
1355
1206
  }
1356
1207
  }
1357
1208
  function o(s) {
1358
- const i = [], u = [], l = /* @__PURE__ */ new Map();
1359
- if (l.set(Date, (_) => new Date(_)), l.set(Map, (_, d) => new Map(f(Array.from(_), d))), l.set(Set, (_, d) => new Set(f(Array.from(_), d))), s.constructorHandlers)
1360
- for (const _ of s.constructorHandlers)
1361
- l.set(_[0], _[1]);
1362
- let a = null;
1363
- return s.proto ? c : h;
1364
- function f(_, d) {
1365
- const E = Object.keys(_), p = new Array(E.length);
1366
- for (let m = 0; m < E.length; m++) {
1367
- const C = E[m], T = _[C];
1368
- if (typeof T != "object" || T === null)
1369
- p[C] = T;
1370
- else if (T.constructor !== Object && (a = l.get(T.constructor)))
1371
- p[C] = a(T, d);
1372
- else if (ArrayBuffer.isView(T))
1373
- p[C] = n(T);
1209
+ const i = [], a = [], l = /* @__PURE__ */ new Map();
1210
+ if (l.set(Date, (h) => new Date(h)), l.set(Map, (h, d) => new Map(c(Array.from(h), d))), l.set(Set, (h, d) => new Set(c(Array.from(h), d))), s.constructorHandlers)
1211
+ for (const h of s.constructorHandlers)
1212
+ l.set(h[0], h[1]);
1213
+ let u = null;
1214
+ return s.proto ? f : p;
1215
+ function c(h, d) {
1216
+ const v = Object.keys(h), _ = new Array(v.length);
1217
+ for (let m = 0; m < v.length; m++) {
1218
+ const T = v[m], b = h[T];
1219
+ if (typeof b != "object" || b === null)
1220
+ _[T] = b;
1221
+ else if (b.constructor !== Object && (u = l.get(b.constructor)))
1222
+ _[T] = u(b, d);
1223
+ else if (ArrayBuffer.isView(b))
1224
+ _[T] = n(b);
1374
1225
  else {
1375
- const O = i.indexOf(T);
1376
- O !== -1 ? p[C] = u[O] : p[C] = d(T);
1226
+ const C = i.indexOf(b);
1227
+ C !== -1 ? _[T] = a[C] : _[T] = d(b);
1377
1228
  }
1378
1229
  }
1379
- return p;
1230
+ return _;
1380
1231
  }
1381
- function h(_) {
1382
- if (typeof _ != "object" || _ === null) return _;
1383
- if (Array.isArray(_)) return f(_, h);
1384
- if (_.constructor !== Object && (a = l.get(_.constructor)))
1385
- return a(_, h);
1232
+ function p(h) {
1233
+ if (typeof h != "object" || h === null) return h;
1234
+ if (Array.isArray(h)) return c(h, p);
1235
+ if (h.constructor !== Object && (u = l.get(h.constructor)))
1236
+ return u(h, p);
1386
1237
  const d = {};
1387
- i.push(_), u.push(d);
1388
- for (const E in _) {
1389
- if (Object.hasOwnProperty.call(_, E) === !1) continue;
1390
- const p = _[E];
1391
- if (typeof p != "object" || p === null)
1392
- d[E] = p;
1393
- else if (p.constructor !== Object && (a = l.get(p.constructor)))
1394
- d[E] = a(p, h);
1395
- else if (ArrayBuffer.isView(p))
1396
- d[E] = n(p);
1238
+ i.push(h), a.push(d);
1239
+ for (const v in h) {
1240
+ if (Object.hasOwnProperty.call(h, v) === !1) continue;
1241
+ const _ = h[v];
1242
+ if (typeof _ != "object" || _ === null)
1243
+ d[v] = _;
1244
+ else if (_.constructor !== Object && (u = l.get(_.constructor)))
1245
+ d[v] = u(_, p);
1246
+ else if (ArrayBuffer.isView(_))
1247
+ d[v] = n(_);
1397
1248
  else {
1398
- const m = i.indexOf(p);
1399
- m !== -1 ? d[E] = u[m] : d[E] = h(p);
1249
+ const m = i.indexOf(_);
1250
+ m !== -1 ? d[v] = a[m] : d[v] = p(_);
1400
1251
  }
1401
1252
  }
1402
- return i.pop(), u.pop(), d;
1253
+ return i.pop(), a.pop(), d;
1403
1254
  }
1404
- function c(_) {
1405
- if (typeof _ != "object" || _ === null) return _;
1406
- if (Array.isArray(_)) return f(_, c);
1407
- if (_.constructor !== Object && (a = l.get(_.constructor)))
1408
- return a(_, c);
1255
+ function f(h) {
1256
+ if (typeof h != "object" || h === null) return h;
1257
+ if (Array.isArray(h)) return c(h, f);
1258
+ if (h.constructor !== Object && (u = l.get(h.constructor)))
1259
+ return u(h, f);
1409
1260
  const d = {};
1410
- i.push(_), u.push(d);
1411
- for (const E in _) {
1412
- const p = _[E];
1413
- if (typeof p != "object" || p === null)
1414
- d[E] = p;
1415
- else if (p.constructor !== Object && (a = l.get(p.constructor)))
1416
- d[E] = a(p, c);
1417
- else if (ArrayBuffer.isView(p))
1418
- d[E] = n(p);
1261
+ i.push(h), a.push(d);
1262
+ for (const v in h) {
1263
+ const _ = h[v];
1264
+ if (typeof _ != "object" || _ === null)
1265
+ d[v] = _;
1266
+ else if (_.constructor !== Object && (u = l.get(_.constructor)))
1267
+ d[v] = u(_, f);
1268
+ else if (ArrayBuffer.isView(_))
1269
+ d[v] = n(_);
1419
1270
  else {
1420
- const m = i.indexOf(p);
1421
- m !== -1 ? d[E] = u[m] : d[E] = c(p);
1271
+ const m = i.indexOf(_);
1272
+ m !== -1 ? d[v] = a[m] : d[v] = f(_);
1422
1273
  }
1423
1274
  }
1424
- return i.pop(), u.pop(), d;
1275
+ return i.pop(), a.pop(), d;
1425
1276
  }
1426
1277
  }
1427
1278
  }
1428
1279
  });
1429
- Pe();
1430
- Pe();
1431
- Pe();
1432
- var Or = typeof navigator < "u", A = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : typeof global < "u" ? global : {};
1280
+ Ie();
1281
+ Ie();
1282
+ Ie();
1283
+ var Ar = typeof navigator < "u", A = typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : typeof global < "u" ? global : {};
1433
1284
  typeof A.chrome < "u" && A.chrome.devtools;
1434
- Or && (A.self, A.top);
1435
- var tn;
1436
- typeof navigator < "u" && ((tn = navigator.userAgent) == null || tn.toLowerCase().includes("electron"));
1437
- Pe();
1438
- var hi = pi(_i()), mi = /(?:^|[-_/])(\w)/g;
1439
- function gi(e, t) {
1285
+ Ar && (A.self, A.top);
1286
+ var Xt;
1287
+ typeof navigator < "u" && ((Xt = navigator.userAgent) == null || Xt.toLowerCase().includes("electron"));
1288
+ Ie();
1289
+ var pi = fi(di()), _i = /(?:^|[-_/])(\w)/g;
1290
+ function hi(e, t) {
1440
1291
  return t ? t.toUpperCase() : "";
1441
1292
  }
1442
- function Ei(e) {
1443
- return e && `${e}`.replace(mi, gi);
1293
+ function mi(e) {
1294
+ return e && `${e}`.replace(_i, hi);
1444
1295
  }
1445
- function vi(e, t) {
1296
+ function gi(e, t) {
1446
1297
  let n = e.replace(/^[a-z]:/i, "").replace(/\\/g, "/");
1447
1298
  n.endsWith(`index${t}`) && (n = n.replace(`/index${t}`, t));
1448
1299
  const r = n.lastIndexOf("/"), o = n.substring(r + 1);
@@ -1451,60 +1302,60 @@ function vi(e, t) {
1451
1302
  return o.substring(0, s);
1452
1303
  }
1453
1304
  }
1454
- var nn = (0, hi.default)({ circles: !0 });
1455
- const yi = {
1305
+ var Zt = (0, pi.default)({ circles: !0 });
1306
+ const Ei = {
1456
1307
  trailing: !0
1457
1308
  };
1458
1309
  function pe(e, t = 25, n = {}) {
1459
- if (n = { ...yi, ...n }, !Number.isFinite(t))
1310
+ if (n = { ...Ei, ...n }, !Number.isFinite(t))
1460
1311
  throw new TypeError("Expected `wait` to be a finite number");
1461
- let r, o, s = [], i, u;
1462
- const l = (a, f) => (i = Ai(e, a, f), i.finally(() => {
1463
- if (i = null, n.trailing && u && !o) {
1464
- const h = l(a, u);
1465
- return u = null, h;
1312
+ let r, o, s = [], i, a;
1313
+ const l = (u, c) => (i = vi(e, u, c), i.finally(() => {
1314
+ if (i = null, n.trailing && a && !o) {
1315
+ const p = l(u, a);
1316
+ return a = null, p;
1466
1317
  }
1467
1318
  }), i);
1468
- return function(...a) {
1469
- return i ? (n.trailing && (u = a), i) : new Promise((f) => {
1470
- const h = !o && n.leading;
1319
+ return function(...u) {
1320
+ return i ? (n.trailing && (a = u), i) : new Promise((c) => {
1321
+ const p = !o && n.leading;
1471
1322
  clearTimeout(o), o = setTimeout(() => {
1472
1323
  o = null;
1473
- const c = n.leading ? r : l(this, a);
1474
- for (const _ of s)
1475
- _(c);
1324
+ const f = n.leading ? r : l(this, u);
1325
+ for (const h of s)
1326
+ h(f);
1476
1327
  s = [];
1477
- }, t), h ? (r = l(this, a), f(r)) : s.push(f);
1328
+ }, t), p ? (r = l(this, u), c(r)) : s.push(c);
1478
1329
  });
1479
1330
  };
1480
1331
  }
1481
- async function Ai(e, t, n) {
1332
+ async function vi(e, t, n) {
1482
1333
  return await e.apply(t, n);
1483
1334
  }
1484
- function dt(e, t = {}, n) {
1335
+ function ft(e, t = {}, n) {
1485
1336
  for (const r in e) {
1486
1337
  const o = e[r], s = n ? `${n}:${r}` : r;
1487
- typeof o == "object" && o !== null ? dt(o, t, s) : typeof o == "function" && (t[s] = o);
1338
+ typeof o == "object" && o !== null ? ft(o, t, s) : typeof o == "function" && (t[s] = o);
1488
1339
  }
1489
1340
  return t;
1490
1341
  }
1491
- const Ci = { run: (e) => e() }, Ti = () => Ci, Sr = typeof console.createTask < "u" ? console.createTask : Ti;
1492
- function Oi(e, t) {
1493
- const n = t.shift(), r = Sr(n);
1342
+ const yi = { run: (e) => e() }, Ai = () => yi, Cr = typeof console.createTask < "u" ? console.createTask : Ai;
1343
+ function Ci(e, t) {
1344
+ const n = t.shift(), r = Cr(n);
1494
1345
  return e.reduce(
1495
1346
  (o, s) => o.then(() => r.run(() => s(...t))),
1496
1347
  Promise.resolve()
1497
1348
  );
1498
1349
  }
1499
- function Si(e, t) {
1500
- const n = t.shift(), r = Sr(n);
1350
+ function Oi(e, t) {
1351
+ const n = t.shift(), r = Cr(n);
1501
1352
  return Promise.all(e.map((o) => r.run(() => o(...t))));
1502
1353
  }
1503
- function tt(e, t) {
1354
+ function Qe(e, t) {
1504
1355
  for (const n of [...e])
1505
1356
  n(t);
1506
1357
  }
1507
- class bi {
1358
+ class Ti {
1508
1359
  constructor() {
1509
1360
  this._hooks = {}, this._before = void 0, this._after = void 0, this._deprecatedMessages = void 0, this._deprecatedHooks = {}, this.hook = this.hook.bind(this), this.callHook = this.callHook.bind(this), this.callHookWith = this.callHookWith.bind(this);
1510
1361
  }
@@ -1555,7 +1406,7 @@ class bi {
1555
1406
  this.deprecateHook(n, t[n]);
1556
1407
  }
1557
1408
  addHooks(t) {
1558
- const n = dt(t), r = Object.keys(n).map(
1409
+ const n = ft(t), r = Object.keys(n).map(
1559
1410
  (o) => this.hook(o, n[o])
1560
1411
  );
1561
1412
  return () => {
@@ -1564,7 +1415,7 @@ class bi {
1564
1415
  };
1565
1416
  }
1566
1417
  removeHooks(t) {
1567
- const n = dt(t);
1418
+ const n = ft(t);
1568
1419
  for (const r in n)
1569
1420
  this.removeHook(r, n[r]);
1570
1421
  }
@@ -1573,21 +1424,21 @@ class bi {
1573
1424
  delete this._hooks[t];
1574
1425
  }
1575
1426
  callHook(t, ...n) {
1576
- return n.unshift(t), this.callHookWith(Oi, t, ...n);
1427
+ return n.unshift(t), this.callHookWith(Ci, t, ...n);
1577
1428
  }
1578
1429
  callHookParallel(t, ...n) {
1579
- return n.unshift(t), this.callHookWith(Si, t, ...n);
1430
+ return n.unshift(t), this.callHookWith(Oi, t, ...n);
1580
1431
  }
1581
1432
  callHookWith(t, n, ...r) {
1582
1433
  const o = this._before || this._after ? { name: n, args: r, context: {} } : void 0;
1583
- this._before && tt(this._before, o);
1434
+ this._before && Qe(this._before, o);
1584
1435
  const s = t(
1585
1436
  n in this._hooks ? [...this._hooks[n]] : [],
1586
1437
  r
1587
1438
  );
1588
1439
  return s instanceof Promise ? s.finally(() => {
1589
- this._after && o && tt(this._after, o);
1590
- }) : (this._after && o && tt(this._after, o), s);
1440
+ this._after && o && Qe(this._after, o);
1441
+ }) : (this._after && o && Qe(this._after, o), s);
1591
1442
  }
1592
1443
  beforeEach(t) {
1593
1444
  return this._before = this._before || [], this._before.push(t), () => {
@@ -1606,29 +1457,29 @@ class bi {
1606
1457
  };
1607
1458
  }
1608
1459
  }
1609
- function br() {
1610
- return new bi();
1460
+ function Or() {
1461
+ return new Ti();
1611
1462
  }
1612
- var wi = Object.create, wr = Object.defineProperty, Di = Object.getOwnPropertyDescriptor, wt = Object.getOwnPropertyNames, ki = Object.getPrototypeOf, Pi = Object.prototype.hasOwnProperty, Ii = (e, t) => function() {
1613
- return e && (t = (0, e[wt(e)[0]])(e = 0)), t;
1614
- }, Dr = (e, t) => function() {
1615
- return t || (0, e[wt(e)[0]])((t = { exports: {} }).exports, t), t.exports;
1616
- }, Ri = (e, t, n, r) => {
1463
+ var bi = Object.create, Tr = Object.defineProperty, Si = Object.getOwnPropertyDescriptor, bt = Object.getOwnPropertyNames, Di = Object.getPrototypeOf, wi = Object.prototype.hasOwnProperty, ki = (e, t) => function() {
1464
+ return e && (t = (0, e[bt(e)[0]])(e = 0)), t;
1465
+ }, br = (e, t) => function() {
1466
+ return t || (0, e[bt(e)[0]])((t = { exports: {} }).exports, t), t.exports;
1467
+ }, Pi = (e, t, n, r) => {
1617
1468
  if (t && typeof t == "object" || typeof t == "function")
1618
- for (let o of wt(t))
1619
- !Pi.call(e, o) && o !== n && wr(e, o, { get: () => t[o], enumerable: !(r = Di(t, o)) || r.enumerable });
1469
+ for (let o of bt(t))
1470
+ !wi.call(e, o) && o !== n && Tr(e, o, { get: () => t[o], enumerable: !(r = Si(t, o)) || r.enumerable });
1620
1471
  return e;
1621
- }, xi = (e, t, n) => (n = e != null ? wi(ki(e)) : {}, Ri(
1472
+ }, Ii = (e, t, n) => (n = e != null ? bi(Di(e)) : {}, Pi(
1622
1473
  // If the importer is in node compatibility mode or this is not an ESM
1623
1474
  // file that has been converted to a CommonJS file using a Babel-
1624
1475
  // compatible transform (i.e. "__esModule" has not been set), then set
1625
1476
  // "default" to the CommonJS "module.exports" for node compatibility.
1626
- wr(n, "default", { value: e, enumerable: !0 }),
1477
+ Tr(n, "default", { value: e, enumerable: !0 }),
1627
1478
  e
1628
- )), g = Ii({
1629
- "../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.1_@types+node@22.10.5__jiti@2.4.2_postcss@8.4.49_tsx_s7k37zks4wtn7x2grzma6lrsfa/node_modules/tsup/assets/esm_shims.js"() {
1479
+ )), g = ki({
1480
+ "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.51.1_@types+node@22.13.14__jiti@2.4.2_postcss@8.5_96eb05a9d65343021e53791dd83f3773/node_modules/tsup/assets/esm_shims.js"() {
1630
1481
  }
1631
- }), Mi = Dr({
1482
+ }), Ri = br({
1632
1483
  "../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/lib/speakingurl.js"(e, t) {
1633
1484
  g(), function(n) {
1634
1485
  var r = {
@@ -2684,7 +2535,7 @@ var wi = Object.create, wr = Object.defineProperty, Di = Object.getOwnPropertyDe
2684
2535
  ü: "u",
2685
2536
  ö: "o"
2686
2537
  }
2687
- }, u = {
2538
+ }, a = {
2688
2539
  ar: {
2689
2540
  "∆": "delta",
2690
2541
  "∞": "la-nihaya",
@@ -2964,57 +2815,57 @@ var wi = Object.create, wr = Object.defineProperty, Di = Object.getOwnPropertyDe
2964
2815
  "∑": "tong",
2965
2816
  "¤": "tien te"
2966
2817
  }
2967
- }, l = [";", "?", ":", "@", "&", "=", "+", "$", ",", "/"].join(""), a = [";", "?", ":", "@", "&", "=", "+", "$", ","].join(""), f = [".", "!", "~", "*", "'", "(", ")"].join(""), h = function(p, m) {
2968
- var C = "-", T = "", O = "", k = !0, P = {}, D, x, v, S, M, V, K, N, U, L, b, ne, j, Y, y = "";
2969
- if (typeof p != "string")
2818
+ }, l = [";", "?", ":", "@", "&", "=", "+", "$", ",", "/"].join(""), u = [";", "?", ":", "@", "&", "=", "+", "$", ","].join(""), c = [".", "!", "~", "*", "'", "(", ")"].join(""), p = function(_, m) {
2819
+ var T = "-", b = "", C = "", M = !0, P = {}, O, k, E, S, x, B, K, N, U, V, D, ne, j, Y, y = "";
2820
+ if (typeof _ != "string")
2970
2821
  return "";
2971
- if (typeof m == "string" && (C = m), K = u.en, N = i.en, typeof m == "object") {
2972
- D = m.maintainCase || !1, P = m.custom && typeof m.custom == "object" ? m.custom : P, v = +m.truncate > 1 && m.truncate || !1, S = m.uric || !1, M = m.uricNoSlash || !1, V = m.mark || !1, k = !(m.symbols === !1 || m.lang === !1), C = m.separator || C, S && (y += l), M && (y += a), V && (y += f), K = m.lang && u[m.lang] && k ? u[m.lang] : k ? u.en : {}, N = m.lang && i[m.lang] ? i[m.lang] : m.lang === !1 || m.lang === !0 ? {} : i.en, m.titleCase && typeof m.titleCase.length == "number" && Array.prototype.toString.call(m.titleCase) ? (m.titleCase.forEach(function(w) {
2822
+ if (typeof m == "string" && (T = m), K = a.en, N = i.en, typeof m == "object") {
2823
+ O = m.maintainCase || !1, P = m.custom && typeof m.custom == "object" ? m.custom : P, E = +m.truncate > 1 && m.truncate || !1, S = m.uric || !1, x = m.uricNoSlash || !1, B = m.mark || !1, M = !(m.symbols === !1 || m.lang === !1), T = m.separator || T, S && (y += l), x && (y += u), B && (y += c), K = m.lang && a[m.lang] && M ? a[m.lang] : M ? a.en : {}, N = m.lang && i[m.lang] ? i[m.lang] : m.lang === !1 || m.lang === !0 ? {} : i.en, m.titleCase && typeof m.titleCase.length == "number" && Array.prototype.toString.call(m.titleCase) ? (m.titleCase.forEach(function(w) {
2973
2824
  P[w + ""] = w + "";
2974
- }), x = !0) : x = !!m.titleCase, m.custom && typeof m.custom.length == "number" && Array.prototype.toString.call(m.custom) && m.custom.forEach(function(w) {
2825
+ }), k = !0) : k = !!m.titleCase, m.custom && typeof m.custom.length == "number" && Array.prototype.toString.call(m.custom) && m.custom.forEach(function(w) {
2975
2826
  P[w + ""] = w + "";
2976
2827
  }), Object.keys(P).forEach(function(w) {
2977
2828
  var H;
2978
- w.length > 1 ? H = new RegExp("\\b" + _(w) + "\\b", "gi") : H = new RegExp(_(w), "gi"), p = p.replace(H, P[w]);
2829
+ w.length > 1 ? H = new RegExp("\\b" + h(w) + "\\b", "gi") : H = new RegExp(h(w), "gi"), _ = _.replace(H, P[w]);
2979
2830
  });
2980
- for (b in P)
2981
- y += b;
2831
+ for (D in P)
2832
+ y += D;
2982
2833
  }
2983
- for (y += C, y = _(y), p = p.replace(/(^\s+|\s+$)/g, ""), j = !1, Y = !1, L = 0, ne = p.length; L < ne; L++)
2984
- b = p[L], d(b, P) ? j = !1 : N[b] ? (b = j && N[b].match(/[A-Za-z0-9]/) ? " " + N[b] : N[b], j = !1) : b in r ? (L + 1 < ne && o.indexOf(p[L + 1]) >= 0 ? (O += b, b = "") : Y === !0 ? (b = s[O] + r[b], O = "") : b = j && r[b].match(/[A-Za-z0-9]/) ? " " + r[b] : r[b], j = !1, Y = !1) : b in s ? (O += b, b = "", L === ne - 1 && (b = s[O]), Y = !0) : /* process symbol chars */ K[b] && !(S && l.indexOf(b) !== -1) && !(M && a.indexOf(b) !== -1) ? (b = j || T.substr(-1).match(/[A-Za-z0-9]/) ? C + K[b] : K[b], b += p[L + 1] !== void 0 && p[L + 1].match(/[A-Za-z0-9]/) ? C : "", j = !0) : (Y === !0 ? (b = s[O] + b, O = "", Y = !1) : j && (/[A-Za-z0-9]/.test(b) || T.substr(-1).match(/A-Za-z0-9]/)) && (b = " " + b), j = !1), T += b.replace(new RegExp("[^\\w\\s" + y + "_-]", "g"), C);
2985
- return x && (T = T.replace(/(\w)(\S*)/g, function(w, H, re) {
2986
- var ce = H.toUpperCase() + (re !== null ? re : "");
2987
- return Object.keys(P).indexOf(ce.toLowerCase()) < 0 ? ce : ce.toLowerCase();
2988
- })), T = T.replace(/\s+/g, C).replace(new RegExp("\\" + C + "+", "g"), C).replace(new RegExp("(^\\" + C + "+|\\" + C + "+$)", "g"), ""), v && T.length > v && (U = T.charAt(v) === C, T = T.slice(0, v), U || (T = T.slice(0, T.lastIndexOf(C)))), !D && !x && (T = T.toLowerCase()), T;
2989
- }, c = function(p) {
2990
- return function(C) {
2991
- return h(C, p);
2834
+ for (y += T, y = h(y), _ = _.replace(/(^\s+|\s+$)/g, ""), j = !1, Y = !1, V = 0, ne = _.length; V < ne; V++)
2835
+ D = _[V], d(D, P) ? j = !1 : N[D] ? (D = j && N[D].match(/[A-Za-z0-9]/) ? " " + N[D] : N[D], j = !1) : D in r ? (V + 1 < ne && o.indexOf(_[V + 1]) >= 0 ? (C += D, D = "") : Y === !0 ? (D = s[C] + r[D], C = "") : D = j && r[D].match(/[A-Za-z0-9]/) ? " " + r[D] : r[D], j = !1, Y = !1) : D in s ? (C += D, D = "", V === ne - 1 && (D = s[C]), Y = !0) : /* process symbol chars */ K[D] && !(S && l.indexOf(D) !== -1) && !(x && u.indexOf(D) !== -1) ? (D = j || b.substr(-1).match(/[A-Za-z0-9]/) ? T + K[D] : K[D], D += _[V + 1] !== void 0 && _[V + 1].match(/[A-Za-z0-9]/) ? T : "", j = !0) : (Y === !0 ? (D = s[C] + D, C = "", Y = !1) : j && (/[A-Za-z0-9]/.test(D) || b.substr(-1).match(/A-Za-z0-9]/)) && (D = " " + D), j = !1), b += D.replace(new RegExp("[^\\w\\s" + y + "_-]", "g"), T);
2836
+ return k && (b = b.replace(/(\w)(\S*)/g, function(w, H, re) {
2837
+ var ae = H.toUpperCase() + (re !== null ? re : "");
2838
+ return Object.keys(P).indexOf(ae.toLowerCase()) < 0 ? ae : ae.toLowerCase();
2839
+ })), b = b.replace(/\s+/g, T).replace(new RegExp("\\" + T + "+", "g"), T).replace(new RegExp("(^\\" + T + "+|\\" + T + "+$)", "g"), ""), E && b.length > E && (U = b.charAt(E) === T, b = b.slice(0, E), U || (b = b.slice(0, b.lastIndexOf(T)))), !O && !k && (b = b.toLowerCase()), b;
2840
+ }, f = function(_) {
2841
+ return function(T) {
2842
+ return p(T, _);
2992
2843
  };
2993
- }, _ = function(p) {
2994
- return p.replace(/[-\\^$*+?.()|[\]{}\/]/g, "\\$&");
2995
- }, d = function(E, p) {
2996
- for (var m in p)
2997
- if (p[m] === E)
2844
+ }, h = function(_) {
2845
+ return _.replace(/[-\\^$*+?.()|[\]{}\/]/g, "\\$&");
2846
+ }, d = function(v, _) {
2847
+ for (var m in _)
2848
+ if (_[m] === v)
2998
2849
  return !0;
2999
2850
  };
3000
2851
  if (typeof t < "u" && t.exports)
3001
- t.exports = h, t.exports.createSlug = c;
2852
+ t.exports = p, t.exports.createSlug = f;
3002
2853
  else if (typeof define < "u" && define.amd)
3003
2854
  define([], function() {
3004
- return h;
2855
+ return p;
3005
2856
  });
3006
2857
  else
3007
2858
  try {
3008
2859
  if (n.getSlug || n.createSlug)
3009
2860
  throw "speakingurl: globals exists /(getSlug|createSlug)/";
3010
- n.getSlug = h, n.createSlug = c;
2861
+ n.getSlug = p, n.createSlug = f;
3011
2862
  } catch {
3012
2863
  }
3013
2864
  }(e);
3014
2865
  }
3015
- }), Bi = Dr({
2866
+ }), xi = br({
3016
2867
  "../../node_modules/.pnpm/speakingurl@14.0.1/node_modules/speakingurl/index.js"(e, t) {
3017
- g(), t.exports = Mi();
2868
+ g(), t.exports = Ri();
3018
2869
  }
3019
2870
  });
3020
2871
  g();
@@ -3025,55 +2876,55 @@ g();
3025
2876
  g();
3026
2877
  g();
3027
2878
  g();
3028
- function Li(e) {
2879
+ function Mi(e) {
3029
2880
  var t;
3030
2881
  const n = e.name || e._componentTag || e.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ || e.__name;
3031
2882
  return n === "index" && ((t = e.__file) != null && t.endsWith("index.vue")) ? "" : n;
3032
2883
  }
3033
- function Vi(e) {
2884
+ function Bi(e) {
3034
2885
  const t = e.__file;
3035
2886
  if (t)
3036
- return Ei(vi(t, ".vue"));
2887
+ return mi(gi(t, ".vue"));
3037
2888
  }
3038
- function rn(e, t) {
2889
+ function Jt(e, t) {
3039
2890
  return e.type.__VUE_DEVTOOLS_COMPONENT_GUSSED_NAME__ = t, t;
3040
2891
  }
3041
- function Dt(e) {
2892
+ function St(e) {
3042
2893
  if (e.__VUE_DEVTOOLS_NEXT_APP_RECORD__)
3043
2894
  return e.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
3044
2895
  if (e.root)
3045
2896
  return e.appContext.app.__VUE_DEVTOOLS_NEXT_APP_RECORD__;
3046
2897
  }
3047
- function kr(e) {
2898
+ function Sr(e) {
3048
2899
  var t, n;
3049
- const r = (t = e.subTree) == null ? void 0 : t.type, o = Dt(e);
2900
+ const r = (t = e.subTree) == null ? void 0 : t.type, o = St(e);
3050
2901
  return o ? ((n = o == null ? void 0 : o.types) == null ? void 0 : n.Fragment) === r : !1;
3051
2902
  }
3052
- function We(e) {
2903
+ function Ke(e) {
3053
2904
  var t, n, r;
3054
- const o = Li((e == null ? void 0 : e.type) || {});
2905
+ const o = Mi((e == null ? void 0 : e.type) || {});
3055
2906
  if (o)
3056
2907
  return o;
3057
2908
  if ((e == null ? void 0 : e.root) === e)
3058
2909
  return "Root";
3059
2910
  for (const i in (n = (t = e.parent) == null ? void 0 : t.type) == null ? void 0 : n.components)
3060
2911
  if (e.parent.type.components[i] === (e == null ? void 0 : e.type))
3061
- return rn(e, i);
2912
+ return Jt(e, i);
3062
2913
  for (const i in (r = e.appContext) == null ? void 0 : r.components)
3063
2914
  if (e.appContext.components[i] === (e == null ? void 0 : e.type))
3064
- return rn(e, i);
3065
- const s = Vi((e == null ? void 0 : e.type) || {});
2915
+ return Jt(e, i);
2916
+ const s = Bi((e == null ? void 0 : e.type) || {});
3066
2917
  return s || "Anonymous Component";
3067
2918
  }
3068
- function Fi(e) {
2919
+ function Li(e) {
3069
2920
  var t, n, r;
3070
2921
  const o = (r = (n = (t = e == null ? void 0 : e.appContext) == null ? void 0 : t.app) == null ? void 0 : n.__VUE_DEVTOOLS_NEXT_APP_RECORD_ID__) != null ? r : 0, s = e === (e == null ? void 0 : e.root) ? "root" : e.uid;
3071
2922
  return `${o}:${s}`;
3072
2923
  }
3073
- function pt(e, t) {
2924
+ function dt(e, t) {
3074
2925
  return t = t || `${e.id}:root`, e.instanceMap.get(t) || e.instanceMap.get(":root");
3075
2926
  }
3076
- function Ni() {
2927
+ function Vi() {
3077
2928
  const e = {
3078
2929
  top: 0,
3079
2930
  bottom: 0,
@@ -3088,31 +2939,31 @@ function Ni() {
3088
2939
  };
3089
2940
  return e;
3090
2941
  }
3091
- var Me;
3092
- function Ui(e) {
3093
- return Me || (Me = document.createRange()), Me.selectNode(e), Me.getBoundingClientRect();
2942
+ var xe;
2943
+ function Fi(e) {
2944
+ return xe || (xe = document.createRange()), xe.selectNode(e), xe.getBoundingClientRect();
3094
2945
  }
3095
- function Hi(e) {
3096
- const t = Ni();
2946
+ function Ni(e) {
2947
+ const t = Vi();
3097
2948
  if (!e.children)
3098
2949
  return t;
3099
2950
  for (let n = 0, r = e.children.length; n < r; n++) {
3100
2951
  const o = e.children[n];
3101
2952
  let s;
3102
2953
  if (o.component)
3103
- s = ae(o.component);
2954
+ s = ue(o.component);
3104
2955
  else if (o.el) {
3105
2956
  const i = o.el;
3106
- i.nodeType === 1 || i.getBoundingClientRect ? s = i.getBoundingClientRect() : i.nodeType === 3 && i.data.trim() && (s = Ui(i));
2957
+ i.nodeType === 1 || i.getBoundingClientRect ? s = i.getBoundingClientRect() : i.nodeType === 3 && i.data.trim() && (s = Fi(i));
3107
2958
  }
3108
- s && ji(t, s);
2959
+ s && Ui(t, s);
3109
2960
  }
3110
2961
  return t;
3111
2962
  }
3112
- function ji(e, t) {
2963
+ function Ui(e, t) {
3113
2964
  return (!e.top || t.top < e.top) && (e.top = t.top), (!e.bottom || t.bottom > e.bottom) && (e.bottom = t.bottom), (!e.left || t.left < e.left) && (e.left = t.left), (!e.right || t.right > e.right) && (e.right = t.right), e;
3114
2965
  }
3115
- var on = {
2966
+ var Qt = {
3116
2967
  top: 0,
3117
2968
  left: 0,
3118
2969
  right: 0,
@@ -3120,23 +2971,23 @@ var on = {
3120
2971
  width: 0,
3121
2972
  height: 0
3122
2973
  };
3123
- function ae(e) {
2974
+ function ue(e) {
3124
2975
  const t = e.subTree.el;
3125
- return typeof window > "u" ? on : kr(e) ? Hi(e.subTree) : (t == null ? void 0 : t.nodeType) === 1 ? t == null ? void 0 : t.getBoundingClientRect() : e.subTree.component ? ae(e.subTree.component) : on;
2976
+ return typeof window > "u" ? Qt : Sr(e) ? Ni(e.subTree) : (t == null ? void 0 : t.nodeType) === 1 ? t == null ? void 0 : t.getBoundingClientRect() : e.subTree.component ? ue(e.subTree.component) : Qt;
3126
2977
  }
3127
2978
  g();
3128
- function kt(e) {
3129
- return kr(e) ? zi(e.subTree) : e.subTree ? [e.subTree.el] : [];
2979
+ function Dt(e) {
2980
+ return Sr(e) ? Hi(e.subTree) : e.subTree ? [e.subTree.el] : [];
3130
2981
  }
3131
- function zi(e) {
2982
+ function Hi(e) {
3132
2983
  if (!e.children)
3133
2984
  return [];
3134
2985
  const t = [];
3135
2986
  return e.children.forEach((n) => {
3136
- n.component ? t.push(...kt(n.component)) : n != null && n.el && t.push(n.el);
2987
+ n.component ? t.push(...Dt(n.component)) : n != null && n.el && t.push(n.el);
3137
2988
  }), t;
3138
2989
  }
3139
- var Pr = "__vue-devtools-component-inspector__", Ir = "__vue-devtools-component-inspector__card__", Rr = "__vue-devtools-component-inspector__name__", xr = "__vue-devtools-component-inspector__indicator__", Mr = {
2990
+ var Dr = "__vue-devtools-component-inspector__", wr = "__vue-devtools-component-inspector__card__", kr = "__vue-devtools-component-inspector__name__", Pr = "__vue-devtools-component-inspector__indicator__", Ir = {
3140
2991
  display: "block",
3141
2992
  zIndex: 2147483640,
3142
2993
  position: "fixed",
@@ -3145,7 +2996,7 @@ var Pr = "__vue-devtools-component-inspector__", Ir = "__vue-devtools-component-
3145
2996
  borderRadius: "5px",
3146
2997
  transition: "all 0.1s ease-in",
3147
2998
  pointerEvents: "none"
3148
- }, Ki = {
2999
+ }, ji = {
3149
3000
  fontFamily: "Arial, Helvetica, sans-serif",
3150
3001
  padding: "5px 8px",
3151
3002
  borderRadius: "4px",
@@ -3165,19 +3016,19 @@ var Pr = "__vue-devtools-component-inspector__", Ir = "__vue-devtools-component-
3165
3016
  fontSize: "12px",
3166
3017
  opacity: 0.7
3167
3018
  };
3168
- function me() {
3169
- return document.getElementById(Pr);
3019
+ function ge() {
3020
+ return document.getElementById(Dr);
3170
3021
  }
3171
- function Gi() {
3172
- return document.getElementById(Ir);
3022
+ function zi() {
3023
+ return document.getElementById(wr);
3173
3024
  }
3174
- function Wi() {
3175
- return document.getElementById(xr);
3025
+ function Ki() {
3026
+ return document.getElementById(Pr);
3176
3027
  }
3177
- function Yi() {
3178
- return document.getElementById(Rr);
3028
+ function Gi() {
3029
+ return document.getElementById(kr);
3179
3030
  }
3180
- function Pt(e) {
3031
+ function wt(e) {
3181
3032
  return {
3182
3033
  left: `${Math.round(e.left * 100) / 100}px`,
3183
3034
  top: `${Math.round(e.top * 100) / 100}px`,
@@ -3185,88 +3036,88 @@ function Pt(e) {
3185
3036
  height: `${Math.round(e.height * 100) / 100}px`
3186
3037
  };
3187
3038
  }
3188
- function It(e) {
3039
+ function kt(e) {
3189
3040
  var t;
3190
3041
  const n = document.createElement("div");
3191
- n.id = (t = e.elementId) != null ? t : Pr, Object.assign(n.style, {
3192
- ...Mr,
3193
- ...Pt(e.bounds),
3042
+ n.id = (t = e.elementId) != null ? t : Dr, Object.assign(n.style, {
3043
+ ...Ir,
3044
+ ...wt(e.bounds),
3194
3045
  ...e.style
3195
3046
  });
3196
3047
  const r = document.createElement("span");
3197
- r.id = Ir, Object.assign(r.style, {
3198
- ...Ki,
3048
+ r.id = wr, Object.assign(r.style, {
3049
+ ...ji,
3199
3050
  top: e.bounds.top < 35 ? 0 : "-35px"
3200
3051
  });
3201
3052
  const o = document.createElement("span");
3202
- o.id = Rr, o.innerHTML = `&lt;${e.name}&gt;&nbsp;&nbsp;`;
3053
+ o.id = kr, o.innerHTML = `&lt;${e.name}&gt;&nbsp;&nbsp;`;
3203
3054
  const s = document.createElement("i");
3204
- return s.id = xr, s.innerHTML = `${Math.round(e.bounds.width * 100) / 100} x ${Math.round(e.bounds.height * 100) / 100}`, Object.assign(s.style, $i), r.appendChild(o), r.appendChild(s), n.appendChild(r), document.body.appendChild(n), n;
3055
+ return s.id = Pr, s.innerHTML = `${Math.round(e.bounds.width * 100) / 100} x ${Math.round(e.bounds.height * 100) / 100}`, Object.assign(s.style, $i), r.appendChild(o), r.appendChild(s), n.appendChild(r), document.body.appendChild(n), n;
3205
3056
  }
3206
- function Rt(e) {
3207
- const t = me(), n = Gi(), r = Yi(), o = Wi();
3057
+ function Pt(e) {
3058
+ const t = ge(), n = zi(), r = Gi(), o = Ki();
3208
3059
  t && (Object.assign(t.style, {
3209
- ...Mr,
3210
- ...Pt(e.bounds)
3060
+ ...Ir,
3061
+ ...wt(e.bounds)
3211
3062
  }), Object.assign(n.style, {
3212
3063
  top: e.bounds.top < 35 ? 0 : "-35px"
3213
3064
  }), r.innerHTML = `&lt;${e.name}&gt;&nbsp;&nbsp;`, o.innerHTML = `${Math.round(e.bounds.width * 100) / 100} x ${Math.round(e.bounds.height * 100) / 100}`);
3214
3065
  }
3215
- function qi(e) {
3216
- const t = ae(e);
3066
+ function Wi(e) {
3067
+ const t = ue(e);
3217
3068
  if (!t.width && !t.height)
3218
3069
  return;
3219
- const n = We(e);
3220
- me() ? Rt({ bounds: t, name: n }) : It({ bounds: t, name: n });
3070
+ const n = Ke(e);
3071
+ ge() ? Pt({ bounds: t, name: n }) : kt({ bounds: t, name: n });
3221
3072
  }
3222
- function Br() {
3223
- const e = me();
3073
+ function Rr() {
3074
+ const e = ge();
3224
3075
  e && (e.style.display = "none");
3225
3076
  }
3226
- var _t = null;
3227
- function ht(e) {
3077
+ var pt = null;
3078
+ function _t(e) {
3228
3079
  const t = e.target;
3229
3080
  if (t) {
3230
3081
  const n = t.__vueParentComponent;
3231
- if (n && (_t = n, n.vnode.el)) {
3232
- const o = ae(n), s = We(n);
3233
- me() ? Rt({ bounds: o, name: s }) : It({ bounds: o, name: s });
3082
+ if (n && (pt = n, n.vnode.el)) {
3083
+ const o = ue(n), s = Ke(n);
3084
+ ge() ? Pt({ bounds: o, name: s }) : kt({ bounds: o, name: s });
3234
3085
  }
3235
3086
  }
3236
3087
  }
3237
- function Xi(e, t) {
3238
- if (e.preventDefault(), e.stopPropagation(), _t) {
3239
- const n = Fi(_t);
3088
+ function Yi(e, t) {
3089
+ if (e.preventDefault(), e.stopPropagation(), pt) {
3090
+ const n = Li(pt);
3240
3091
  t(n);
3241
3092
  }
3242
3093
  }
3243
- var $e = null;
3244
- function Zi() {
3245
- Br(), window.removeEventListener("mouseover", ht), window.removeEventListener("click", $e, !0), $e = null;
3094
+ var ze = null;
3095
+ function qi() {
3096
+ Rr(), window.removeEventListener("mouseover", _t), window.removeEventListener("click", ze, !0), ze = null;
3246
3097
  }
3247
- function Ji() {
3248
- return window.addEventListener("mouseover", ht), new Promise((e) => {
3098
+ function Xi() {
3099
+ return window.addEventListener("mouseover", _t), new Promise((e) => {
3249
3100
  function t(n) {
3250
- n.preventDefault(), n.stopPropagation(), Xi(n, (r) => {
3251
- window.removeEventListener("click", t, !0), $e = null, window.removeEventListener("mouseover", ht);
3252
- const o = me();
3101
+ n.preventDefault(), n.stopPropagation(), Yi(n, (r) => {
3102
+ window.removeEventListener("click", t, !0), ze = null, window.removeEventListener("mouseover", _t);
3103
+ const o = ge();
3253
3104
  o && (o.style.display = "none"), e(JSON.stringify({ id: r }));
3254
3105
  });
3255
3106
  }
3256
- $e = t, window.addEventListener("click", t, !0);
3107
+ ze = t, window.addEventListener("click", t, !0);
3257
3108
  });
3258
3109
  }
3259
- function Qi(e) {
3260
- const t = pt(F.value, e.id);
3110
+ function Zi(e) {
3111
+ const t = dt(F.value, e.id);
3261
3112
  if (t) {
3262
- const [n] = kt(t);
3113
+ const [n] = Dt(t);
3263
3114
  if (typeof n.scrollIntoView == "function")
3264
3115
  n.scrollIntoView({
3265
3116
  behavior: "smooth"
3266
3117
  });
3267
3118
  else {
3268
- const r = ae(t), o = document.createElement("div"), s = {
3269
- ...Pt(r),
3119
+ const r = ue(t), o = document.createElement("div"), s = {
3120
+ ...wt(r),
3270
3121
  position: "absolute"
3271
3122
  };
3272
3123
  Object.assign(o.style, s), document.body.appendChild(o), o.scrollIntoView({
@@ -3276,10 +3127,10 @@ function Qi(e) {
3276
3127
  }, 2e3);
3277
3128
  }
3278
3129
  setTimeout(() => {
3279
- const r = ae(t);
3130
+ const r = ue(t);
3280
3131
  if (r.width || r.height) {
3281
- const o = We(t), s = me();
3282
- s ? Rt({ ...e, name: o, bounds: r }) : It({ ...e, name: o, bounds: r }), setTimeout(() => {
3132
+ const o = Ke(t), s = ge();
3133
+ s ? Pt({ ...e, name: o, bounds: r }) : kt({ ...e, name: o, bounds: r }), setTimeout(() => {
3283
3134
  s && (s.style.display = "none");
3284
3135
  }, 1500);
3285
3136
  }
@@ -3287,55 +3138,55 @@ function Qi(e) {
3287
3138
  }
3288
3139
  }
3289
3140
  g();
3290
- var sn, un;
3291
- (un = (sn = A).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__) != null || (sn.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = !0);
3292
- function eu(e) {
3141
+ var en, tn;
3142
+ (tn = (en = A).__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__) != null || (en.__VUE_DEVTOOLS_COMPONENT_INSPECTOR_ENABLED__ = !0);
3143
+ function Ji(e) {
3293
3144
  let t = 0;
3294
3145
  const n = setInterval(() => {
3295
3146
  A.__VUE_INSPECTOR__ && (clearInterval(n), t += 30, e()), t >= /* 5s */
3296
3147
  5e3 && clearInterval(n);
3297
3148
  }, 30);
3298
3149
  }
3299
- function tu() {
3150
+ function Qi() {
3300
3151
  const e = A.__VUE_INSPECTOR__, t = e.openInEditor;
3301
3152
  e.openInEditor = async (...n) => {
3302
3153
  e.disable(), t(...n);
3303
3154
  };
3304
3155
  }
3305
- function nu() {
3156
+ function eu() {
3306
3157
  return new Promise((e) => {
3307
3158
  function t() {
3308
- tu(), e(A.__VUE_INSPECTOR__);
3159
+ Qi(), e(A.__VUE_INSPECTOR__);
3309
3160
  }
3310
- A.__VUE_INSPECTOR__ ? t() : eu(() => {
3161
+ A.__VUE_INSPECTOR__ ? t() : Ji(() => {
3311
3162
  t();
3312
3163
  });
3313
3164
  });
3314
3165
  }
3315
3166
  g();
3316
3167
  g();
3317
- function ru(e) {
3168
+ function tu(e) {
3318
3169
  return !!(e && e.__v_isReadonly);
3319
3170
  }
3320
- function Lr(e) {
3321
- return ru(e) ? Lr(e.__v_raw) : !!(e && e.__v_isReactive);
3171
+ function xr(e) {
3172
+ return tu(e) ? xr(e.__v_raw) : !!(e && e.__v_isReactive);
3322
3173
  }
3323
- function nt(e) {
3174
+ function et(e) {
3324
3175
  return !!(e && e.__v_isRef === !0);
3325
3176
  }
3326
- function ve(e) {
3177
+ function ye(e) {
3327
3178
  const t = e && e.__v_raw;
3328
- return t ? ve(t) : e;
3179
+ return t ? ye(t) : e;
3329
3180
  }
3330
- var ou = class {
3181
+ var nu = class {
3331
3182
  constructor() {
3332
- this.refEditor = new su();
3183
+ this.refEditor = new ru();
3333
3184
  }
3334
3185
  set(e, t, n, r) {
3335
3186
  const o = Array.isArray(t) ? t : t.split(".");
3336
3187
  for (; o.length > 1; ) {
3337
- const u = o.shift();
3338
- e instanceof Map && (e = e.get(u)), e instanceof Set ? e = Array.from(e.values())[u] : e = e[u], this.refEditor.isRef(e) && (e = this.refEditor.get(e));
3188
+ const a = o.shift();
3189
+ e instanceof Map ? e = e.get(a) : e instanceof Set ? e = Array.from(e.values())[a] : e = e[a], this.refEditor.isRef(e) && (e = this.refEditor.get(e));
3339
3190
  }
3340
3191
  const s = o[0], i = this.refEditor.get(e)[s];
3341
3192
  r ? r(e, s, n) : this.refEditor.isRef(i) ? this.refEditor.set(i, n) : e[s] = n;
@@ -3359,15 +3210,15 @@ var ou = class {
3359
3210
  }
3360
3211
  createDefaultSetCallback(e) {
3361
3212
  return (t, n, r) => {
3362
- if ((e.remove || e.newKey) && (Array.isArray(t) ? t.splice(n, 1) : ve(t) instanceof Map ? t.delete(n) : ve(t) instanceof Set ? t.delete(Array.from(t.values())[n]) : Reflect.deleteProperty(t, n)), !e.remove) {
3213
+ if ((e.remove || e.newKey) && (Array.isArray(t) ? t.splice(n, 1) : ye(t) instanceof Map ? t.delete(n) : ye(t) instanceof Set ? t.delete(Array.from(t.values())[n]) : Reflect.deleteProperty(t, n)), !e.remove) {
3363
3214
  const o = t[e.newKey || n];
3364
- this.refEditor.isRef(o) ? this.refEditor.set(o, r) : ve(t) instanceof Map ? t.set(e.newKey || n, r) : ve(t) instanceof Set ? t.add(r) : t[e.newKey || n] = r;
3215
+ this.refEditor.isRef(o) ? this.refEditor.set(o, r) : ye(t) instanceof Map ? t.set(e.newKey || n, r) : ye(t) instanceof Set ? t.add(r) : t[e.newKey || n] = r;
3365
3216
  }
3366
3217
  };
3367
3218
  }
3368
- }, su = class {
3219
+ }, ru = class {
3369
3220
  set(e, t) {
3370
- if (nt(e))
3221
+ if (et(e))
3371
3222
  e.value = t;
3372
3223
  else {
3373
3224
  if (e instanceof Set && Array.isArray(t)) {
@@ -3389,18 +3240,18 @@ var ou = class {
3389
3240
  }
3390
3241
  }
3391
3242
  get(e) {
3392
- return nt(e) ? e.value : e;
3243
+ return et(e) ? e.value : e;
3393
3244
  }
3394
3245
  isRef(e) {
3395
- return nt(e) || Lr(e);
3246
+ return et(e) || xr(e);
3396
3247
  }
3397
3248
  };
3398
3249
  g();
3399
3250
  g();
3400
3251
  g();
3401
- var iu = "__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";
3402
- function uu() {
3403
- if (!Or || typeof localStorage > "u" || localStorage === null)
3252
+ var ou = "__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS_STATE__";
3253
+ function su() {
3254
+ if (!Ar || typeof localStorage > "u" || localStorage === null)
3404
3255
  return {
3405
3256
  recordingState: !1,
3406
3257
  mouseEventEnabled: !1,
@@ -3409,7 +3260,7 @@ function uu() {
3409
3260
  performanceEventEnabled: !1,
3410
3261
  selected: ""
3411
3262
  };
3412
- const e = localStorage.getItem(iu);
3263
+ const e = localStorage.getItem(ou);
3413
3264
  return e ? JSON.parse(e) : {
3414
3265
  recordingState: !1,
3415
3266
  mouseEventEnabled: !1,
@@ -3422,43 +3273,43 @@ function uu() {
3422
3273
  g();
3423
3274
  g();
3424
3275
  g();
3425
- var an, ln;
3426
- (ln = (an = A).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS) != null || (an.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS = []);
3427
- var au = new Proxy(A.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS, {
3276
+ var nn, rn;
3277
+ (rn = (nn = A).__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS) != null || (nn.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS = []);
3278
+ var iu = new Proxy(A.__VUE_DEVTOOLS_KIT_TIMELINE_LAYERS, {
3428
3279
  get(e, t, n) {
3429
3280
  return Reflect.get(e, t, n);
3430
3281
  }
3431
3282
  });
3432
- function lu(e, t) {
3433
- R.timelineLayersState[t.id] = !1, au.push({
3283
+ function uu(e, t) {
3284
+ L.timelineLayersState[t.id] = !1, iu.push({
3434
3285
  ...e,
3435
3286
  descriptorId: t.id,
3436
- appRecord: Dt(t.app)
3287
+ appRecord: St(t.app)
3437
3288
  });
3438
3289
  }
3439
- var cn, fn;
3440
- (fn = (cn = A).__VUE_DEVTOOLS_KIT_INSPECTOR__) != null || (cn.__VUE_DEVTOOLS_KIT_INSPECTOR__ = []);
3441
- var xt = new Proxy(A.__VUE_DEVTOOLS_KIT_INSPECTOR__, {
3290
+ var on, sn;
3291
+ (sn = (on = A).__VUE_DEVTOOLS_KIT_INSPECTOR__) != null || (on.__VUE_DEVTOOLS_KIT_INSPECTOR__ = []);
3292
+ var It = new Proxy(A.__VUE_DEVTOOLS_KIT_INSPECTOR__, {
3442
3293
  get(e, t, n) {
3443
3294
  return Reflect.get(e, t, n);
3444
3295
  }
3445
- }), Vr = pe(() => {
3446
- ge.hooks.callHook("sendInspectorToClient", Fr());
3296
+ }), Mr = pe(() => {
3297
+ Ee.hooks.callHook("sendInspectorToClient", Br());
3447
3298
  });
3448
- function cu(e, t) {
3299
+ function au(e, t) {
3449
3300
  var n, r;
3450
- xt.push({
3301
+ It.push({
3451
3302
  options: e,
3452
3303
  descriptor: t,
3453
3304
  treeFilterPlaceholder: (n = e.treeFilterPlaceholder) != null ? n : "Search tree...",
3454
3305
  stateFilterPlaceholder: (r = e.stateFilterPlaceholder) != null ? r : "Search state...",
3455
3306
  treeFilter: "",
3456
3307
  selectedNodeId: "",
3457
- appRecord: Dt(t.app)
3458
- }), Vr();
3308
+ appRecord: St(t.app)
3309
+ }), Mr();
3459
3310
  }
3460
- function Fr() {
3461
- return xt.filter((e) => e.descriptor.app === F.value.app).filter((e) => e.descriptor.id !== "components").map((e) => {
3311
+ function Br() {
3312
+ return It.filter((e) => e.descriptor.app === F.value.app).filter((e) => e.descriptor.id !== "components").map((e) => {
3462
3313
  var t;
3463
3314
  const n = e.descriptor, r = e.options;
3464
3315
  return {
@@ -3473,18 +3324,18 @@ function Fr() {
3473
3324
  });
3474
3325
  }
3475
3326
  function Ne(e, t) {
3476
- return xt.find((n) => n.options.id === e && (t ? n.descriptor.app === t : !0));
3327
+ return It.find((n) => n.options.id === e && (t ? n.descriptor.app === t : !0));
3477
3328
  }
3478
- function fu() {
3479
- const e = br();
3329
+ function lu() {
3330
+ const e = Or();
3480
3331
  e.hook("addInspector", ({ inspector: r, plugin: o }) => {
3481
- cu(r, o.descriptor);
3332
+ au(r, o.descriptor);
3482
3333
  });
3483
3334
  const t = pe(async ({ inspectorId: r, plugin: o }) => {
3484
3335
  var s;
3485
- if (!r || !((s = o == null ? void 0 : o.descriptor) != null && s.app) || R.highPerfModeEnabled)
3336
+ if (!r || !((s = o == null ? void 0 : o.descriptor) != null && s.app) || L.highPerfModeEnabled)
3486
3337
  return;
3487
- const i = Ne(r, o.descriptor.app), u = {
3338
+ const i = Ne(r, o.descriptor.app), a = {
3488
3339
  app: o.descriptor.app,
3489
3340
  inspectorId: r,
3490
3341
  filter: (i == null ? void 0 : i.treeFilter) || "",
@@ -3492,17 +3343,17 @@ function fu() {
3492
3343
  };
3493
3344
  await new Promise((l) => {
3494
3345
  e.callHookWith(
3495
- async (a) => {
3496
- await Promise.all(a.map((f) => f(u))), l();
3346
+ async (u) => {
3347
+ await Promise.all(u.map((c) => c(a))), l();
3497
3348
  },
3498
3349
  "getInspectorTree"
3499
3350
  /* GET_INSPECTOR_TREE */
3500
3351
  );
3501
3352
  }), e.callHookWith(
3502
3353
  async (l) => {
3503
- await Promise.all(l.map((a) => a({
3354
+ await Promise.all(l.map((u) => u({
3504
3355
  inspectorId: r,
3505
- rootNodes: u.rootNodes
3356
+ rootNodes: a.rootNodes
3506
3357
  })));
3507
3358
  },
3508
3359
  "sendInspectorTreeToClient"
@@ -3512,9 +3363,9 @@ function fu() {
3512
3363
  e.hook("sendInspectorTree", t);
3513
3364
  const n = pe(async ({ inspectorId: r, plugin: o }) => {
3514
3365
  var s;
3515
- if (!r || !((s = o == null ? void 0 : o.descriptor) != null && s.app) || R.highPerfModeEnabled)
3366
+ if (!r || !((s = o == null ? void 0 : o.descriptor) != null && s.app) || L.highPerfModeEnabled)
3516
3367
  return;
3517
- const i = Ne(r, o.descriptor.app), u = {
3368
+ const i = Ne(r, o.descriptor.app), a = {
3518
3369
  app: o.descriptor.app,
3519
3370
  inspectorId: r,
3520
3371
  nodeId: (i == null ? void 0 : i.selectedNodeId) || "",
@@ -3522,20 +3373,20 @@ function fu() {
3522
3373
  }, l = {
3523
3374
  currentTab: `custom-inspector:${r}`
3524
3375
  };
3525
- u.nodeId && await new Promise((a) => {
3376
+ a.nodeId && await new Promise((u) => {
3526
3377
  e.callHookWith(
3527
- async (f) => {
3528
- await Promise.all(f.map((h) => h(u, l))), a();
3378
+ async (c) => {
3379
+ await Promise.all(c.map((p) => p(a, l))), u();
3529
3380
  },
3530
3381
  "getInspectorState"
3531
3382
  /* GET_INSPECTOR_STATE */
3532
3383
  );
3533
3384
  }), e.callHookWith(
3534
- async (a) => {
3535
- await Promise.all(a.map((f) => f({
3385
+ async (u) => {
3386
+ await Promise.all(u.map((c) => c({
3536
3387
  inspectorId: r,
3537
- nodeId: u.nodeId,
3538
- state: u.state
3388
+ nodeId: a.nodeId,
3389
+ state: a.state
3539
3390
  })));
3540
3391
  },
3541
3392
  "sendInspectorStateToClient"
@@ -3546,13 +3397,13 @@ function fu() {
3546
3397
  const i = Ne(r, s.descriptor.app);
3547
3398
  i && (i.selectedNodeId = o);
3548
3399
  }), e.hook("timelineLayerAdded", ({ options: r, plugin: o }) => {
3549
- lu(r, o.descriptor);
3400
+ uu(r, o.descriptor);
3550
3401
  }), e.hook("timelineEventAdded", ({ options: r, plugin: o }) => {
3551
3402
  var s;
3552
3403
  const i = ["performance", "component-event", "keyboard", "mouse"];
3553
- R.highPerfModeEnabled || !((s = R.timelineLayersState) != null && s[o.descriptor.id]) && !i.includes(r.layerId) || e.callHookWith(
3554
- async (u) => {
3555
- await Promise.all(u.map((l) => l(r)));
3404
+ L.highPerfModeEnabled || !((s = L.timelineLayersState) != null && s[o.descriptor.id]) && !i.includes(r.layerId) || e.callHookWith(
3405
+ async (a) => {
3406
+ await Promise.all(a.map((l) => l(r)));
3556
3407
  },
3557
3408
  "sendTimelineEventToClient"
3558
3409
  /* SEND_TIMELINE_EVENT_TO_CLIENT */
@@ -3562,26 +3413,26 @@ function fu() {
3562
3413
  if (!o)
3563
3414
  return null;
3564
3415
  const s = o.id.toString();
3565
- return [...o.instanceMap].filter(([u]) => u.split(":")[0] === s).map(([, u]) => u);
3566
- }), e.hook("getComponentBounds", async ({ instance: r }) => ae(r)), e.hook("getComponentName", ({ instance: r }) => We(r)), e.hook("componentHighlight", ({ uid: r }) => {
3416
+ return [...o.instanceMap].filter(([a]) => a.split(":")[0] === s).map(([, a]) => a);
3417
+ }), e.hook("getComponentBounds", async ({ instance: r }) => ue(r)), e.hook("getComponentName", ({ instance: r }) => Ke(r)), e.hook("componentHighlight", ({ uid: r }) => {
3567
3418
  const o = F.value.instanceMap.get(r);
3568
- o && qi(o);
3419
+ o && Wi(o);
3569
3420
  }), e.hook("componentUnhighlight", () => {
3570
- Br();
3421
+ Rr();
3571
3422
  }), e;
3572
3423
  }
3573
- var dn, pn;
3574
- (pn = (dn = A).__VUE_DEVTOOLS_KIT_APP_RECORDS__) != null || (dn.__VUE_DEVTOOLS_KIT_APP_RECORDS__ = []);
3575
- var _n, hn;
3576
- (hn = (_n = A).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__) != null || (_n.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = {});
3577
- var mn, gn;
3578
- (gn = (mn = A).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__) != null || (mn.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = "");
3579
- var En, vn;
3580
- (vn = (En = A).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__) != null || (En.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ = []);
3581
- var yn, An;
3582
- (An = (yn = A).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__) != null || (yn.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ = []);
3583
- var ie = "__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";
3584
- function du() {
3424
+ var un, an;
3425
+ (an = (un = A).__VUE_DEVTOOLS_KIT_APP_RECORDS__) != null || (un.__VUE_DEVTOOLS_KIT_APP_RECORDS__ = []);
3426
+ var ln, cn;
3427
+ (cn = (ln = A).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__) != null || (ln.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = {});
3428
+ var fn, dn;
3429
+ (dn = (fn = A).__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__) != null || (fn.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = "");
3430
+ var pn, _n;
3431
+ (_n = (pn = A).__VUE_DEVTOOLS_KIT_CUSTOM_TABS__) != null || (pn.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ = []);
3432
+ var hn, mn;
3433
+ (mn = (hn = A).__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__) != null || (hn.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ = []);
3434
+ var se = "__VUE_DEVTOOLS_KIT_GLOBAL_STATE__";
3435
+ function cu() {
3585
3436
  return {
3586
3437
  connected: !1,
3587
3438
  clientConnected: !1,
@@ -3593,18 +3444,18 @@ function du() {
3593
3444
  highPerfModeEnabled: !0,
3594
3445
  devtoolsClientDetected: {},
3595
3446
  perfUniqueGroupId: 0,
3596
- timelineLayersState: uu()
3447
+ timelineLayersState: su()
3597
3448
  };
3598
3449
  }
3599
- var Cn, Tn;
3600
- (Tn = (Cn = A)[ie]) != null || (Cn[ie] = du());
3601
- var pu = pe((e) => {
3602
- ge.hooks.callHook("devtoolsStateUpdated", { state: e });
3450
+ var gn, En;
3451
+ (En = (gn = A)[se]) != null || (gn[se] = cu());
3452
+ var fu = pe((e) => {
3453
+ Ee.hooks.callHook("devtoolsStateUpdated", { state: e });
3603
3454
  });
3604
3455
  pe((e, t) => {
3605
- ge.hooks.callHook("devtoolsConnectedUpdated", { state: e, oldState: t });
3456
+ Ee.hooks.callHook("devtoolsConnectedUpdated", { state: e, oldState: t });
3606
3457
  });
3607
- var Ye = new Proxy(A.__VUE_DEVTOOLS_KIT_APP_RECORDS__, {
3458
+ var Ge = new Proxy(A.__VUE_DEVTOOLS_KIT_APP_RECORDS__, {
3608
3459
  get(e, t, n) {
3609
3460
  return t === "value" ? A.__VUE_DEVTOOLS_KIT_APP_RECORDS__ : A.__VUE_DEVTOOLS_KIT_APP_RECORDS__[t];
3610
3461
  }
@@ -3613,47 +3464,47 @@ var Ye = new Proxy(A.__VUE_DEVTOOLS_KIT_APP_RECORDS__, {
3613
3464
  return t === "value" ? A.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ : t === "id" ? A.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ : A.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__[t];
3614
3465
  }
3615
3466
  });
3616
- function Nr() {
3617
- pu({
3618
- ...A[ie],
3619
- appRecords: Ye.value,
3467
+ function Lr() {
3468
+ fu({
3469
+ ...A[se],
3470
+ appRecords: Ge.value,
3620
3471
  activeAppRecordId: F.id,
3621
3472
  tabs: A.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__,
3622
3473
  commands: A.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__
3623
3474
  });
3624
3475
  }
3625
- function _u(e) {
3626
- A.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = e, Nr();
3476
+ function du(e) {
3477
+ A.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD__ = e, Lr();
3627
3478
  }
3628
- function hu(e) {
3629
- A.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = e, Nr();
3479
+ function pu(e) {
3480
+ A.__VUE_DEVTOOLS_KIT_ACTIVE_APP_RECORD_ID__ = e, Lr();
3630
3481
  }
3631
- var R = new Proxy(A[ie], {
3482
+ var L = new Proxy(A[se], {
3632
3483
  get(e, t) {
3633
- return t === "appRecords" ? Ye : t === "activeAppRecordId" ? F.id : t === "tabs" ? A.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ : t === "commands" ? A.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ : A[ie][t];
3484
+ return t === "appRecords" ? Ge : t === "activeAppRecordId" ? F.id : t === "tabs" ? A.__VUE_DEVTOOLS_KIT_CUSTOM_TABS__ : t === "commands" ? A.__VUE_DEVTOOLS_KIT_CUSTOM_COMMANDS__ : A[se][t];
3634
3485
  },
3635
3486
  deleteProperty(e, t) {
3636
3487
  return delete e[t], !0;
3637
3488
  },
3638
3489
  set(e, t, n) {
3639
- return { ...A[ie] }, e[t] = n, A[ie][t] = n, !0;
3490
+ return { ...A[se] }, e[t] = n, A[se][t] = n, !0;
3640
3491
  }
3641
3492
  });
3642
- function mu(e = {}) {
3493
+ function _u(e = {}) {
3643
3494
  var t, n, r;
3644
- const { file: o, host: s, baseUrl: i = window.location.origin, line: u = 0, column: l = 0 } = e;
3495
+ const { file: o, host: s, baseUrl: i = window.location.origin, line: a = 0, column: l = 0 } = e;
3645
3496
  if (o) {
3646
3497
  if (s === "chrome-extension") {
3647
- const a = o.replace(/\\/g, "\\\\"), f = (n = (t = window.VUE_DEVTOOLS_CONFIG) == null ? void 0 : t.openInEditorHost) != null ? n : "/";
3648
- fetch(`${f}__open-in-editor?file=${encodeURI(o)}`).then((h) => {
3649
- if (!h.ok) {
3650
- const c = `Opening component ${a} failed`;
3651
- console.log(`%c${c}`, "color:red");
3498
+ const u = o.replace(/\\/g, "\\\\"), c = (n = (t = window.VUE_DEVTOOLS_CONFIG) == null ? void 0 : t.openInEditorHost) != null ? n : "/";
3499
+ fetch(`${c}__open-in-editor?file=${encodeURI(o)}`).then((p) => {
3500
+ if (!p.ok) {
3501
+ const f = `Opening component ${u} failed`;
3502
+ console.log(`%c${f}`, "color:red");
3652
3503
  }
3653
3504
  });
3654
- } else if (R.vitePluginDetected) {
3655
- const a = (r = A.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__) != null ? r : i;
3656
- A.__VUE_INSPECTOR__.openInEditor(a, o, u, l);
3505
+ } else if (L.vitePluginDetected) {
3506
+ const u = (r = A.__VUE_DEVTOOLS_OPEN_IN_EDITOR_BASE_URL__) != null ? r : i;
3507
+ A.__VUE_INSPECTOR__.openInEditor(u, o, a, l);
3657
3508
  }
3658
3509
  }
3659
3510
  }
@@ -3662,56 +3513,56 @@ g();
3662
3513
  g();
3663
3514
  g();
3664
3515
  g();
3665
- var On, Sn;
3666
- (Sn = (On = A).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__) != null || (On.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__ = []);
3667
- var Mt = new Proxy(A.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__, {
3516
+ var vn, yn;
3517
+ (yn = (vn = A).__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__) != null || (vn.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__ = []);
3518
+ var Rt = new Proxy(A.__VUE_DEVTOOLS_KIT_PLUGIN_BUFFER__, {
3668
3519
  get(e, t, n) {
3669
3520
  return Reflect.get(e, t, n);
3670
3521
  }
3671
3522
  });
3672
- function mt(e) {
3523
+ function ht(e) {
3673
3524
  const t = {};
3674
3525
  return Object.keys(e).forEach((n) => {
3675
3526
  t[n] = e[n].defaultValue;
3676
3527
  }), t;
3677
3528
  }
3678
- function Bt(e) {
3529
+ function xt(e) {
3679
3530
  return `__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__${e}__`;
3680
3531
  }
3681
- function gu(e) {
3532
+ function hu(e) {
3682
3533
  var t, n, r;
3683
- const o = (n = (t = Mt.find((s) => {
3534
+ const o = (n = (t = Rt.find((s) => {
3684
3535
  var i;
3685
3536
  return s[0].id === e && !!((i = s[0]) != null && i.settings);
3686
3537
  })) == null ? void 0 : t[0]) != null ? n : null;
3687
3538
  return (r = o == null ? void 0 : o.settings) != null ? r : null;
3688
3539
  }
3689
- function Ur(e, t) {
3540
+ function Vr(e, t) {
3690
3541
  var n, r, o;
3691
- const s = Bt(e);
3542
+ const s = xt(e);
3692
3543
  if (s) {
3693
3544
  const i = localStorage.getItem(s);
3694
3545
  if (i)
3695
3546
  return JSON.parse(i);
3696
3547
  }
3697
3548
  if (e) {
3698
- const i = (r = (n = Mt.find((u) => u[0].id === e)) == null ? void 0 : n[0]) != null ? r : null;
3699
- return mt((o = i == null ? void 0 : i.settings) != null ? o : {});
3549
+ const i = (r = (n = Rt.find((a) => a[0].id === e)) == null ? void 0 : n[0]) != null ? r : null;
3550
+ return ht((o = i == null ? void 0 : i.settings) != null ? o : {});
3700
3551
  }
3701
- return mt(t);
3552
+ return ht(t);
3702
3553
  }
3703
- function Eu(e, t) {
3704
- const n = Bt(e);
3705
- localStorage.getItem(n) || localStorage.setItem(n, JSON.stringify(mt(t)));
3554
+ function mu(e, t) {
3555
+ const n = xt(e);
3556
+ localStorage.getItem(n) || localStorage.setItem(n, JSON.stringify(ht(t)));
3706
3557
  }
3707
- function vu(e, t, n) {
3708
- const r = Bt(e), o = localStorage.getItem(r), s = JSON.parse(o || "{}"), i = {
3558
+ function gu(e, t, n) {
3559
+ const r = xt(e), o = localStorage.getItem(r), s = JSON.parse(o || "{}"), i = {
3709
3560
  ...s,
3710
3561
  [t]: n
3711
3562
  };
3712
- localStorage.setItem(r, JSON.stringify(i)), ge.hooks.callHookWith(
3713
- (u) => {
3714
- u.forEach((l) => l({
3563
+ localStorage.setItem(r, JSON.stringify(i)), Ee.hooks.callHookWith(
3564
+ (a) => {
3565
+ a.forEach((l) => l({
3715
3566
  pluginId: e,
3716
3567
  key: t,
3717
3568
  oldValue: s[t],
@@ -3734,43 +3585,43 @@ g();
3734
3585
  g();
3735
3586
  g();
3736
3587
  g();
3737
- var bn, wn, z = (wn = (bn = A).__VUE_DEVTOOLS_HOOK) != null ? wn : bn.__VUE_DEVTOOLS_HOOK = br(), yu = {
3588
+ var An, Cn, $ = (Cn = (An = A).__VUE_DEVTOOLS_HOOK) != null ? Cn : An.__VUE_DEVTOOLS_HOOK = Or(), Eu = {
3738
3589
  vueAppInit(e) {
3739
- z.hook("app:init", e);
3590
+ $.hook("app:init", e);
3740
3591
  },
3741
3592
  vueAppUnmount(e) {
3742
- z.hook("app:unmount", e);
3593
+ $.hook("app:unmount", e);
3743
3594
  },
3744
3595
  vueAppConnected(e) {
3745
- z.hook("app:connected", e);
3596
+ $.hook("app:connected", e);
3746
3597
  },
3747
3598
  componentAdded(e) {
3748
- return z.hook("component:added", e);
3599
+ return $.hook("component:added", e);
3749
3600
  },
3750
3601
  componentEmit(e) {
3751
- return z.hook("component:emit", e);
3602
+ return $.hook("component:emit", e);
3752
3603
  },
3753
3604
  componentUpdated(e) {
3754
- return z.hook("component:updated", e);
3605
+ return $.hook("component:updated", e);
3755
3606
  },
3756
3607
  componentRemoved(e) {
3757
- return z.hook("component:removed", e);
3608
+ return $.hook("component:removed", e);
3758
3609
  },
3759
3610
  setupDevtoolsPlugin(e) {
3760
- z.hook("devtools-plugin:setup", e);
3611
+ $.hook("devtools-plugin:setup", e);
3761
3612
  },
3762
3613
  perfStart(e) {
3763
- return z.hook("perf:start", e);
3614
+ return $.hook("perf:start", e);
3764
3615
  },
3765
3616
  perfEnd(e) {
3766
- return z.hook("perf:end", e);
3617
+ return $.hook("perf:end", e);
3767
3618
  }
3768
- }, Hr = {
3769
- on: yu,
3619
+ }, Fr = {
3620
+ on: Eu,
3770
3621
  setupDevToolsPlugin(e, t) {
3771
- return z.callHook("devtools-plugin:setup", e, t);
3622
+ return $.callHook("devtools-plugin:setup", e, t);
3772
3623
  }
3773
- }, Au = class {
3624
+ }, vu = class {
3774
3625
  constructor({ plugin: e, ctx: t }) {
3775
3626
  this.hooks = t.hooks, this.plugin = e;
3776
3627
  }
@@ -3812,9 +3663,9 @@ var bn, wn, z = (wn = (bn = A).__VUE_DEVTOOLS_HOOK) != null ? wn : bn.__VUE_DEVT
3812
3663
  // component inspector
3813
3664
  notifyComponentUpdate(e) {
3814
3665
  var t;
3815
- if (R.highPerfModeEnabled)
3666
+ if (L.highPerfModeEnabled)
3816
3667
  return;
3817
- const n = Fr().find((r) => r.packageName === this.plugin.descriptor.packageName);
3668
+ const n = Br().find((r) => r.packageName === this.plugin.descriptor.packageName);
3818
3669
  if (n != null && n.id) {
3819
3670
  if (e) {
3820
3671
  const r = [
@@ -3823,9 +3674,9 @@ var bn, wn, z = (wn = (bn = A).__VUE_DEVTOOLS_HOOK) != null ? wn : bn.__VUE_DEVT
3823
3674
  (t = e.parent) == null ? void 0 : t.uid,
3824
3675
  e
3825
3676
  ];
3826
- z.callHook("component:updated", ...r);
3677
+ $.callHook("component:updated", ...r);
3827
3678
  } else
3828
- z.callHook(
3679
+ $.callHook(
3829
3680
  "component:updated"
3830
3681
  /* COMPONENT_UPDATED */
3831
3682
  );
@@ -3834,13 +3685,13 @@ var bn, wn, z = (wn = (bn = A).__VUE_DEVTOOLS_HOOK) != null ? wn : bn.__VUE_DEVT
3834
3685
  }
3835
3686
  // custom inspector
3836
3687
  addInspector(e) {
3837
- this.hooks.callHook("addInspector", { inspector: e, plugin: this.plugin }), this.plugin.descriptor.settings && Eu(e.id, this.plugin.descriptor.settings);
3688
+ this.hooks.callHook("addInspector", { inspector: e, plugin: this.plugin }), this.plugin.descriptor.settings && mu(e.id, this.plugin.descriptor.settings);
3838
3689
  }
3839
3690
  sendInspectorTree(e) {
3840
- R.highPerfModeEnabled || this.hooks.callHook("sendInspectorTree", { inspectorId: e, plugin: this.plugin });
3691
+ L.highPerfModeEnabled || this.hooks.callHook("sendInspectorTree", { inspectorId: e, plugin: this.plugin });
3841
3692
  }
3842
3693
  sendInspectorState(e) {
3843
- R.highPerfModeEnabled || this.hooks.callHook("sendInspectorState", { inspectorId: e, plugin: this.plugin });
3694
+ L.highPerfModeEnabled || this.hooks.callHook("sendInspectorState", { inspectorId: e, plugin: this.plugin });
3844
3695
  }
3845
3696
  selectInspectorNode(e, t) {
3846
3697
  this.hooks.callHook("customInspectorSelectNode", { inspectorId: e, nodeId: t, plugin: this.plugin });
@@ -3850,17 +3701,17 @@ var bn, wn, z = (wn = (bn = A).__VUE_DEVTOOLS_HOOK) != null ? wn : bn.__VUE_DEVT
3850
3701
  }
3851
3702
  // timeline
3852
3703
  now() {
3853
- return R.highPerfModeEnabled ? 0 : Date.now();
3704
+ return L.highPerfModeEnabled ? 0 : Date.now();
3854
3705
  }
3855
3706
  addTimelineLayer(e) {
3856
3707
  this.hooks.callHook("timelineLayerAdded", { options: e, plugin: this.plugin });
3857
3708
  }
3858
3709
  addTimelineEvent(e) {
3859
- R.highPerfModeEnabled || this.hooks.callHook("timelineEventAdded", { options: e, plugin: this.plugin });
3710
+ L.highPerfModeEnabled || this.hooks.callHook("timelineEventAdded", { options: e, plugin: this.plugin });
3860
3711
  }
3861
3712
  // settings
3862
3713
  getSettings(e) {
3863
- return Ur(e ?? this.plugin.descriptor.id, this.plugin.descriptor.settings);
3714
+ return Vr(e ?? this.plugin.descriptor.id, this.plugin.descriptor.settings);
3864
3715
  }
3865
3716
  // utilities
3866
3717
  getComponentInstances(e) {
@@ -3882,79 +3733,79 @@ var bn, wn, z = (wn = (bn = A).__VUE_DEVTOOLS_HOOK) != null ? wn : bn.__VUE_DEVT
3882
3733
  /* COMPONENT_UNHIGHLIGHT */
3883
3734
  );
3884
3735
  }
3885
- }, Cu = Au;
3736
+ }, yu = vu;
3886
3737
  g();
3887
3738
  g();
3888
3739
  g();
3889
3740
  g();
3890
- var Tu = "__vue_devtool_undefined__", Ou = "__vue_devtool_infinity__", Su = "__vue_devtool_negative_infinity__", bu = "__vue_devtool_nan__";
3741
+ var Au = "__vue_devtool_undefined__", Cu = "__vue_devtool_infinity__", Ou = "__vue_devtool_negative_infinity__", Tu = "__vue_devtool_nan__";
3891
3742
  g();
3892
3743
  g();
3893
- var wu = {
3894
- [Tu]: "undefined",
3895
- [bu]: "NaN",
3896
- [Ou]: "Infinity",
3897
- [Su]: "-Infinity"
3744
+ var bu = {
3745
+ [Au]: "undefined",
3746
+ [Tu]: "NaN",
3747
+ [Cu]: "Infinity",
3748
+ [Ou]: "-Infinity"
3898
3749
  };
3899
- Object.entries(wu).reduce((e, [t, n]) => (e[n] = t, e), {});
3750
+ Object.entries(bu).reduce((e, [t, n]) => (e[n] = t, e), {});
3900
3751
  g();
3901
3752
  g();
3902
3753
  g();
3903
3754
  g();
3904
3755
  g();
3905
- var Dn, kn;
3906
- (kn = (Dn = A).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__) != null || (Dn.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__ = /* @__PURE__ */ new Set());
3907
- function Du(e, t) {
3908
- return Hr.setupDevToolsPlugin(e, t);
3756
+ var On, Tn;
3757
+ (Tn = (On = A).__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__) != null || (On.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__ = /* @__PURE__ */ new Set());
3758
+ function Su(e, t) {
3759
+ return Fr.setupDevToolsPlugin(e, t);
3909
3760
  }
3910
- function ku(e, t) {
3761
+ function Du(e, t) {
3911
3762
  const [n, r] = e;
3912
3763
  if (n.app !== t)
3913
3764
  return;
3914
- const o = new Cu({
3765
+ const o = new yu({
3915
3766
  plugin: {
3916
3767
  setupFn: r,
3917
3768
  descriptor: n
3918
3769
  },
3919
- ctx: ge
3770
+ ctx: Ee
3920
3771
  });
3921
3772
  n.packageName === "vuex" && o.on.editInspectorState((s) => {
3922
3773
  o.sendInspectorState(s.inspectorId);
3923
3774
  }), r(o);
3924
3775
  }
3925
- function jr(e, t) {
3926
- A.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e) || R.highPerfModeEnabled && !(t != null && t.inspectingComponent) || (A.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e), Mt.forEach((n) => {
3927
- ku(n, e);
3776
+ function Nr(e, t) {
3777
+ A.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.has(e) || L.highPerfModeEnabled && !(t != null && t.inspectingComponent) || (A.__VUE_DEVTOOLS_KIT__REGISTERED_PLUGIN_APPS__.add(e), Rt.forEach((n) => {
3778
+ Du(n, e);
3928
3779
  }));
3929
3780
  }
3930
3781
  g();
3931
3782
  g();
3932
- var be = "__VUE_DEVTOOLS_ROUTER__", _e = "__VUE_DEVTOOLS_ROUTER_INFO__", Pn, In;
3933
- (In = (Pn = A)[_e]) != null || (Pn[_e] = {
3783
+ var Se = "__VUE_DEVTOOLS_ROUTER__", _e = "__VUE_DEVTOOLS_ROUTER_INFO__", bn, Sn;
3784
+ (Sn = (bn = A)[_e]) != null || (bn[_e] = {
3934
3785
  currentRoute: null,
3935
3786
  routes: []
3936
3787
  });
3937
- var Rn, xn;
3938
- (xn = (Rn = A)[be]) != null || (Rn[be] = {});
3788
+ var Dn, wn;
3789
+ (wn = (Dn = A)[Se]) != null || (Dn[Se] = {});
3939
3790
  new Proxy(A[_e], {
3940
3791
  get(e, t) {
3941
3792
  return A[_e][t];
3942
3793
  }
3943
3794
  });
3944
- new Proxy(A[be], {
3795
+ new Proxy(A[Se], {
3945
3796
  get(e, t) {
3946
3797
  if (t === "value")
3947
- return A[be];
3798
+ return A[Se];
3948
3799
  }
3949
3800
  });
3950
- function Pu(e) {
3801
+ function wu(e) {
3951
3802
  const t = /* @__PURE__ */ new Map();
3952
3803
  return ((e == null ? void 0 : e.getRoutes()) || []).filter((n) => !t.has(n.path) && t.set(n.path, 1));
3953
3804
  }
3954
- function Lt(e) {
3805
+ function Mt(e) {
3955
3806
  return e.map((t) => {
3956
3807
  let { path: n, name: r, children: o, meta: s } = t;
3957
- return o != null && o.length && (o = Lt(o)), {
3808
+ return o != null && o.length && (o = Mt(o)), {
3958
3809
  path: n,
3959
3810
  name: r,
3960
3811
  children: o,
@@ -3962,38 +3813,38 @@ function Lt(e) {
3962
3813
  };
3963
3814
  });
3964
3815
  }
3965
- function Iu(e) {
3816
+ function ku(e) {
3966
3817
  if (e) {
3967
- const { fullPath: t, hash: n, href: r, path: o, name: s, matched: i, params: u, query: l } = e;
3818
+ const { fullPath: t, hash: n, href: r, path: o, name: s, matched: i, params: a, query: l } = e;
3968
3819
  return {
3969
3820
  fullPath: t,
3970
3821
  hash: n,
3971
3822
  href: r,
3972
3823
  path: o,
3973
3824
  name: s,
3974
- params: u,
3825
+ params: a,
3975
3826
  query: l,
3976
- matched: Lt(i)
3827
+ matched: Mt(i)
3977
3828
  };
3978
3829
  }
3979
3830
  return e;
3980
3831
  }
3981
- function Ru(e, t) {
3832
+ function Pu(e, t) {
3982
3833
  function n() {
3983
3834
  var r;
3984
- const o = (r = e.app) == null ? void 0 : r.config.globalProperties.$router, s = Iu(o == null ? void 0 : o.currentRoute.value), i = Lt(Pu(o)), u = console.warn;
3835
+ const o = (r = e.app) == null ? void 0 : r.config.globalProperties.$router, s = ku(o == null ? void 0 : o.currentRoute.value), i = Mt(wu(o)), a = console.warn;
3985
3836
  console.warn = () => {
3986
3837
  }, A[_e] = {
3987
- currentRoute: s ? nn(s) : {},
3988
- routes: nn(i)
3989
- }, A[be] = o, console.warn = u;
3838
+ currentRoute: s ? Zt(s) : {},
3839
+ routes: Zt(i)
3840
+ }, A[Se] = o, console.warn = a;
3990
3841
  }
3991
- n(), Hr.on.componentUpdated(pe(() => {
3842
+ n(), Fr.on.componentUpdated(pe(() => {
3992
3843
  var r;
3993
- ((r = t.value) == null ? void 0 : r.app) === e.app && (n(), !R.highPerfModeEnabled && ge.hooks.callHook("routerInfoUpdated", { state: A[_e] }));
3844
+ ((r = t.value) == null ? void 0 : r.app) === e.app && (n(), !L.highPerfModeEnabled && Ee.hooks.callHook("routerInfoUpdated", { state: A[_e] }));
3994
3845
  }, 200));
3995
3846
  }
3996
- function xu(e) {
3847
+ function Iu(e) {
3997
3848
  return {
3998
3849
  // get inspector tree
3999
3850
  async getInspectorTree(t) {
@@ -4033,11 +3884,11 @@ function xu(e) {
4033
3884
  },
4034
3885
  // edit inspector state
4035
3886
  editInspectorState(t) {
4036
- const n = new ou(), r = {
3887
+ const n = new nu(), r = {
4037
3888
  ...t,
4038
3889
  app: F.value.app,
4039
- set: (o, s = t.path, i = t.state.value, u) => {
4040
- n.set(o, s, i, u || n.createDefaultSetCallback(t.state));
3890
+ set: (o, s = t.path, i = t.state.value, a) => {
3891
+ n.set(o, s, i, a || n.createDefaultSetCallback(t.state));
4041
3892
  }
4042
3893
  };
4043
3894
  e.callHookWith(
@@ -4058,93 +3909,93 @@ function xu(e) {
4058
3909
  },
4059
3910
  // inspect component inspector
4060
3911
  inspectComponentInspector() {
4061
- return Ji();
3912
+ return Xi();
4062
3913
  },
4063
3914
  // cancel inspect component inspector
4064
3915
  cancelInspectComponentInspector() {
4065
- return Zi();
3916
+ return qi();
4066
3917
  },
4067
3918
  // get component render code
4068
3919
  getComponentRenderCode(t) {
4069
- const n = pt(F.value, t);
3920
+ const n = dt(F.value, t);
4070
3921
  if (n)
4071
- return (n == null ? void 0 : n.type) instanceof Function ? n.type.toString() : n.render.toString();
3922
+ return typeof (n == null ? void 0 : n.type) != "function" ? n.render.toString() : n.type.toString();
4072
3923
  },
4073
3924
  // scroll to component
4074
3925
  scrollToComponent(t) {
4075
- return Qi({ id: t });
3926
+ return Zi({ id: t });
4076
3927
  },
4077
3928
  // open in editor
4078
- openInEditor: mu,
3929
+ openInEditor: _u,
4079
3930
  // get vue inspector
4080
- getVueInspector: nu,
3931
+ getVueInspector: eu,
4081
3932
  // toggle app
4082
3933
  toggleApp(t, n) {
4083
- const r = Ye.value.find((o) => o.id === t);
4084
- r && (hu(t), _u(r), Ru(r, F), Vr(), jr(r.app, n));
3934
+ const r = Ge.value.find((o) => o.id === t);
3935
+ r && (pu(t), du(r), Pu(r, F), Mr(), Nr(r.app, n));
4085
3936
  },
4086
3937
  // inspect dom
4087
3938
  inspectDOM(t) {
4088
- const n = pt(F.value, t);
3939
+ const n = dt(F.value, t);
4089
3940
  if (n) {
4090
- const [r] = kt(n);
3941
+ const [r] = Dt(n);
4091
3942
  r && (A.__VUE_DEVTOOLS_INSPECT_DOM_TARGET__ = r);
4092
3943
  }
4093
3944
  },
4094
3945
  updatePluginSettings(t, n, r) {
4095
- vu(t, n, r);
3946
+ gu(t, n, r);
4096
3947
  },
4097
3948
  getPluginSettings(t) {
4098
3949
  return {
4099
- options: gu(t),
4100
- values: Ur(t)
3950
+ options: hu(t),
3951
+ values: Vr(t)
4101
3952
  };
4102
3953
  }
4103
3954
  };
4104
3955
  }
4105
3956
  g();
4106
- var Mn, Bn;
4107
- (Bn = (Mn = A).__VUE_DEVTOOLS_ENV__) != null || (Mn.__VUE_DEVTOOLS_ENV__ = {
3957
+ var kn, Pn;
3958
+ (Pn = (kn = A).__VUE_DEVTOOLS_ENV__) != null || (kn.__VUE_DEVTOOLS_ENV__ = {
4108
3959
  vitePluginDetected: !1
4109
3960
  });
4110
- var Ln = fu(), Vn, Fn;
4111
- (Fn = (Vn = A).__VUE_DEVTOOLS_KIT_CONTEXT__) != null || (Vn.__VUE_DEVTOOLS_KIT_CONTEXT__ = {
4112
- hooks: Ln,
3961
+ var In = lu(), Rn, xn;
3962
+ (xn = (Rn = A).__VUE_DEVTOOLS_KIT_CONTEXT__) != null || (Rn.__VUE_DEVTOOLS_KIT_CONTEXT__ = {
3963
+ hooks: In,
4113
3964
  get state() {
4114
3965
  return {
4115
- ...R,
3966
+ ...L,
4116
3967
  activeAppRecordId: F.id,
4117
3968
  activeAppRecord: F.value,
4118
- appRecords: Ye.value
3969
+ appRecords: Ge.value
4119
3970
  };
4120
3971
  },
4121
- api: xu(Ln)
3972
+ api: Iu(In)
4122
3973
  });
4123
- var ge = A.__VUE_DEVTOOLS_KIT_CONTEXT__;
3974
+ var Ee = A.__VUE_DEVTOOLS_KIT_CONTEXT__;
4124
3975
  g();
4125
- xi(Bi());
4126
- var Nn, Un;
4127
- (Un = (Nn = A).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__) != null || (Nn.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__ = {
3976
+ Ii(xi());
3977
+ var Mn, Bn;
3978
+ (Bn = (Mn = A).__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__) != null || (Mn.__VUE_DEVTOOLS_NEXT_APP_RECORD_INFO__ = {
4128
3979
  id: 0,
4129
3980
  appIds: /* @__PURE__ */ new Set()
4130
3981
  });
4131
3982
  g();
4132
- function Mu(e) {
4133
- R.highPerfModeEnabled = e ?? !R.highPerfModeEnabled, !e && F.value && jr(F.value.app);
3983
+ function Ru(e) {
3984
+ L.highPerfModeEnabled = e ?? !L.highPerfModeEnabled, !e && F.value && Nr(F.value.app);
4134
3985
  }
4135
3986
  g();
4136
3987
  g();
4137
3988
  g();
4138
- function Bu(e) {
4139
- R.devtoolsClientDetected = {
4140
- ...R.devtoolsClientDetected,
3989
+ function xu(e) {
3990
+ L.devtoolsClientDetected = {
3991
+ ...L.devtoolsClientDetected,
4141
3992
  ...e
4142
3993
  };
4143
- const t = Object.values(R.devtoolsClientDetected).some(Boolean);
4144
- Mu(!t);
3994
+ const t = Object.values(L.devtoolsClientDetected).some(Boolean);
3995
+ Ru(!t);
4145
3996
  }
4146
- var Hn, jn;
4147
- (jn = (Hn = A).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__) != null || (Hn.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__ = Bu);
3997
+ var Ln, Vn;
3998
+ (Vn = (Ln = A).__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__) != null || (Ln.__VUE_DEVTOOLS_UPDATE_CLIENT_DETECTED__ = xu);
4148
3999
  g();
4149
4000
  g();
4150
4001
  g();
@@ -4152,7 +4003,7 @@ g();
4152
4003
  g();
4153
4004
  g();
4154
4005
  g();
4155
- var Lu = class {
4006
+ var Mu = class {
4156
4007
  constructor() {
4157
4008
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
4158
4009
  }
@@ -4168,9 +4019,9 @@ var Lu = class {
4168
4019
  clear() {
4169
4020
  this.keyToValue.clear(), this.valueToKey.clear();
4170
4021
  }
4171
- }, zr = class {
4022
+ }, Ur = class {
4172
4023
  constructor(e) {
4173
- this.generateIdentifier = e, this.kv = new Lu();
4024
+ this.generateIdentifier = e, this.kv = new Mu();
4174
4025
  }
4175
4026
  register(e, t) {
4176
4027
  this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
@@ -4184,7 +4035,7 @@ var Lu = class {
4184
4035
  getValue(e) {
4185
4036
  return this.kv.getByKey(e);
4186
4037
  }
4187
- }, Vu = class extends zr {
4038
+ }, Bu = class extends Ur {
4188
4039
  constructor() {
4189
4040
  super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
4190
4041
  }
@@ -4197,7 +4048,7 @@ var Lu = class {
4197
4048
  };
4198
4049
  g();
4199
4050
  g();
4200
- function Fu(e) {
4051
+ function Lu(e) {
4201
4052
  if ("values" in Object)
4202
4053
  return Object.values(e);
4203
4054
  const t = [];
@@ -4205,8 +4056,8 @@ function Fu(e) {
4205
4056
  e.hasOwnProperty(n) && t.push(e[n]);
4206
4057
  return t;
4207
4058
  }
4208
- function Nu(e, t) {
4209
- const n = Fu(e);
4059
+ function Vu(e, t) {
4060
+ const n = Lu(e);
4210
4061
  if ("find" in n)
4211
4062
  return n.find(t);
4212
4063
  const r = n;
@@ -4222,14 +4073,14 @@ function he(e, t) {
4222
4073
  function Ue(e, t) {
4223
4074
  return e.indexOf(t) !== -1;
4224
4075
  }
4225
- function zn(e, t) {
4076
+ function Fn(e, t) {
4226
4077
  for (let n = 0; n < e.length; n++) {
4227
4078
  const r = e[n];
4228
4079
  if (t(r))
4229
4080
  return r;
4230
4081
  }
4231
4082
  }
4232
- var Uu = class {
4083
+ var Fu = class {
4233
4084
  constructor() {
4234
4085
  this.transfomers = {};
4235
4086
  }
@@ -4237,7 +4088,7 @@ var Uu = class {
4237
4088
  this.transfomers[e.name] = e;
4238
4089
  }
4239
4090
  findApplicable(e) {
4240
- return Nu(this.transfomers, (t) => t.isApplicable(e));
4091
+ return Vu(this.transfomers, (t) => t.isApplicable(e));
4241
4092
  }
4242
4093
  findByName(e) {
4243
4094
  return this.transfomers[e];
@@ -4245,9 +4096,9 @@ var Uu = class {
4245
4096
  };
4246
4097
  g();
4247
4098
  g();
4248
- var Hu = (e) => Object.prototype.toString.call(e).slice(8, -1), Kr = (e) => typeof e > "u", ju = (e) => e === null, we = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, gt = (e) => we(e) && Object.keys(e).length === 0, te = (e) => Array.isArray(e), zu = (e) => typeof e == "string", Ku = (e) => typeof e == "number" && !isNaN(e), $u = (e) => typeof e == "boolean", Gu = (e) => e instanceof RegExp, De = (e) => e instanceof Map, ke = (e) => e instanceof Set, $r = (e) => Hu(e) === "Symbol", Wu = (e) => e instanceof Date && !isNaN(e.valueOf()), Yu = (e) => e instanceof Error, Kn = (e) => typeof e == "number" && isNaN(e), qu = (e) => $u(e) || ju(e) || Kr(e) || Ku(e) || zu(e) || $r(e), Xu = (e) => typeof e == "bigint", Zu = (e) => e === 1 / 0 || e === -1 / 0, Ju = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Qu = (e) => e instanceof URL;
4099
+ var Nu = (e) => Object.prototype.toString.call(e).slice(8, -1), Hr = (e) => typeof e > "u", Uu = (e) => e === null, De = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, mt = (e) => De(e) && Object.keys(e).length === 0, te = (e) => Array.isArray(e), Hu = (e) => typeof e == "string", ju = (e) => typeof e == "number" && !isNaN(e), $u = (e) => typeof e == "boolean", zu = (e) => e instanceof RegExp, we = (e) => e instanceof Map, ke = (e) => e instanceof Set, jr = (e) => Nu(e) === "Symbol", Ku = (e) => e instanceof Date && !isNaN(e.valueOf()), Gu = (e) => e instanceof Error, Nn = (e) => typeof e == "number" && isNaN(e), Wu = (e) => $u(e) || Uu(e) || Hr(e) || ju(e) || Hu(e) || jr(e), Yu = (e) => typeof e == "bigint", qu = (e) => e === 1 / 0 || e === -1 / 0, Xu = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Zu = (e) => e instanceof URL;
4249
4100
  g();
4250
- var Gr = (e) => e.replace(/\./g, "\\."), rt = (e) => e.map(String).map(Gr).join("."), Oe = (e) => {
4101
+ var $r = (e) => e.replace(/\./g, "\\."), tt = (e) => e.map(String).map($r).join("."), be = (e) => {
4251
4102
  const t = [];
4252
4103
  let n = "";
4253
4104
  for (let o = 0; o < e.length; o++) {
@@ -4266,7 +4117,7 @@ var Gr = (e) => e.replace(/\./g, "\\."), rt = (e) => e.map(String).map(Gr).join(
4266
4117
  return t.push(r), t;
4267
4118
  };
4268
4119
  g();
4269
- function G(e, t, n, r) {
4120
+ function W(e, t, n, r) {
4270
4121
  return {
4271
4122
  isApplicable: e,
4272
4123
  annotation: t,
@@ -4274,12 +4125,12 @@ function G(e, t, n, r) {
4274
4125
  untransform: r
4275
4126
  };
4276
4127
  }
4277
- var Wr = [
4278
- G(Kr, "undefined", () => null, () => {
4128
+ var zr = [
4129
+ W(Hr, "undefined", () => null, () => {
4279
4130
  }),
4280
- G(Xu, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
4281
- G(Wu, "Date", (e) => e.toISOString(), (e) => new Date(e)),
4282
- G(Yu, "Error", (e, t) => {
4131
+ W(Yu, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : (console.error("Please add a BigInt polyfill."), e)),
4132
+ W(Ku, "Date", (e) => e.toISOString(), (e) => new Date(e)),
4133
+ W(Gu, "Error", (e, t) => {
4283
4134
  const n = {
4284
4135
  name: e.name,
4285
4136
  message: e.message
@@ -4293,11 +4144,11 @@ var Wr = [
4293
4144
  n[r] = e[r];
4294
4145
  }), n;
4295
4146
  }),
4296
- G(Gu, "regexp", (e) => "" + e, (e) => {
4147
+ W(zu, "regexp", (e) => "" + e, (e) => {
4297
4148
  const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
4298
4149
  return new RegExp(t, n);
4299
4150
  }),
4300
- G(
4151
+ W(
4301
4152
  ke,
4302
4153
  "set",
4303
4154
  // (sets only exist in es6+)
@@ -4305,12 +4156,12 @@ var Wr = [
4305
4156
  (e) => [...e.values()],
4306
4157
  (e) => new Set(e)
4307
4158
  ),
4308
- G(De, "map", (e) => [...e.entries()], (e) => new Map(e)),
4309
- G((e) => Kn(e) || Zu(e), "number", (e) => Kn(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
4310
- G((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
4311
- G(Qu, "URL", (e) => e.toString(), (e) => new URL(e))
4159
+ W(we, "map", (e) => [...e.entries()], (e) => new Map(e)),
4160
+ W((e) => Nn(e) || qu(e), "number", (e) => Nn(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
4161
+ W((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
4162
+ W(Zu, "URL", (e) => e.toString(), (e) => new URL(e))
4312
4163
  ];
4313
- function qe(e, t, n, r) {
4164
+ function We(e, t, n, r) {
4314
4165
  return {
4315
4166
  isApplicable: e,
4316
4167
  annotation: t,
@@ -4318,12 +4169,12 @@ function qe(e, t, n, r) {
4318
4169
  untransform: r
4319
4170
  };
4320
4171
  }
4321
- var Yr = qe((e, t) => $r(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
4172
+ var Kr = We((e, t) => jr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
4322
4173
  const r = n.symbolRegistry.getValue(t[1]);
4323
4174
  if (!r)
4324
4175
  throw new Error("Trying to deserialize unknown symbol");
4325
4176
  return r;
4326
- }), ea = [
4177
+ }), Ju = [
4327
4178
  Int8Array,
4328
4179
  Uint8Array,
4329
4180
  Int16Array,
@@ -4333,16 +4184,16 @@ var Yr = qe((e, t) => $r(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
4333
4184
  Float32Array,
4334
4185
  Float64Array,
4335
4186
  Uint8ClampedArray
4336
- ].reduce((e, t) => (e[t.name] = t, e), {}), qr = qe(Ju, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
4337
- const n = ea[t[1]];
4187
+ ].reduce((e, t) => (e[t.name] = t, e), {}), Gr = We(Xu, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
4188
+ const n = Ju[t[1]];
4338
4189
  if (!n)
4339
4190
  throw new Error("Trying to deserialize unknown typed array");
4340
4191
  return new n(e);
4341
4192
  });
4342
- function Xr(e, t) {
4193
+ function Wr(e, t) {
4343
4194
  return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
4344
4195
  }
4345
- var Zr = qe(Xr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
4196
+ var Yr = We(Wr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
4346
4197
  const n = t.classRegistry.getAllowedProps(e.constructor);
4347
4198
  if (!n)
4348
4199
  return { ...e };
@@ -4355,51 +4206,51 @@ var Zr = qe(Xr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
4355
4206
  if (!r)
4356
4207
  throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
4357
4208
  return Object.assign(Object.create(r.prototype), e);
4358
- }), Jr = qe((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
4209
+ }), qr = We((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
4359
4210
  const r = n.customTransformerRegistry.findByName(t[1]);
4360
4211
  if (!r)
4361
4212
  throw new Error("Trying to deserialize unknown custom value");
4362
4213
  return r.deserialize(e);
4363
- }), ta = [Zr, Yr, Jr, qr], $n = (e, t) => {
4364
- const n = zn(ta, (o) => o.isApplicable(e, t));
4214
+ }), Qu = [Yr, Kr, qr, Gr], Un = (e, t) => {
4215
+ const n = Fn(Qu, (o) => o.isApplicable(e, t));
4365
4216
  if (n)
4366
4217
  return {
4367
4218
  value: n.transform(e, t),
4368
4219
  type: n.annotation(e, t)
4369
4220
  };
4370
- const r = zn(Wr, (o) => o.isApplicable(e, t));
4221
+ const r = Fn(zr, (o) => o.isApplicable(e, t));
4371
4222
  if (r)
4372
4223
  return {
4373
4224
  value: r.transform(e, t),
4374
4225
  type: r.annotation
4375
4226
  };
4376
- }, Qr = {};
4377
- Wr.forEach((e) => {
4378
- Qr[e.annotation] = e;
4227
+ }, Xr = {};
4228
+ zr.forEach((e) => {
4229
+ Xr[e.annotation] = e;
4379
4230
  });
4380
- var na = (e, t, n) => {
4231
+ var ea = (e, t, n) => {
4381
4232
  if (te(t))
4382
4233
  switch (t[0]) {
4383
4234
  case "symbol":
4384
- return Yr.untransform(e, t, n);
4235
+ return Kr.untransform(e, t, n);
4385
4236
  case "class":
4386
- return Zr.untransform(e, t, n);
4237
+ return Yr.untransform(e, t, n);
4387
4238
  case "custom":
4388
- return Jr.untransform(e, t, n);
4389
- case "typed-array":
4390
4239
  return qr.untransform(e, t, n);
4240
+ case "typed-array":
4241
+ return Gr.untransform(e, t, n);
4391
4242
  default:
4392
4243
  throw new Error("Unknown transformation: " + t);
4393
4244
  }
4394
4245
  else {
4395
- const r = Qr[t];
4246
+ const r = Xr[t];
4396
4247
  if (!r)
4397
4248
  throw new Error("Unknown transformation: " + t);
4398
4249
  return r.untransform(e, n);
4399
4250
  }
4400
4251
  };
4401
4252
  g();
4402
- var fe = (e, t) => {
4253
+ var ce = (e, t) => {
4403
4254
  if (t > e.size)
4404
4255
  throw new Error("index out of bounds");
4405
4256
  const n = e.keys();
@@ -4407,7 +4258,7 @@ var fe = (e, t) => {
4407
4258
  n.next(), t--;
4408
4259
  return n.next().value;
4409
4260
  };
4410
- function eo(e) {
4261
+ function Zr(e) {
4411
4262
  if (Ue(e, "__proto__"))
4412
4263
  throw new Error("__proto__ is not allowed as a property");
4413
4264
  if (Ue(e, "prototype"))
@@ -4415,14 +4266,14 @@ function eo(e) {
4415
4266
  if (Ue(e, "constructor"))
4416
4267
  throw new Error("constructor is not allowed as a property");
4417
4268
  }
4418
- var ra = (e, t) => {
4419
- eo(t);
4269
+ var ta = (e, t) => {
4270
+ Zr(t);
4420
4271
  for (let n = 0; n < t.length; n++) {
4421
4272
  const r = t[n];
4422
4273
  if (ke(e))
4423
- e = fe(e, +r);
4424
- else if (De(e)) {
4425
- const o = +r, s = +t[++n] == 0 ? "key" : "value", i = fe(e, o);
4274
+ e = ce(e, +r);
4275
+ else if (we(e)) {
4276
+ const o = +r, s = +t[++n] == 0 ? "key" : "value", i = ce(e, o);
4426
4277
  switch (s) {
4427
4278
  case "key":
4428
4279
  e = i;
@@ -4435,41 +4286,41 @@ var ra = (e, t) => {
4435
4286
  e = e[r];
4436
4287
  }
4437
4288
  return e;
4438
- }, Et = (e, t, n) => {
4439
- if (eo(t), t.length === 0)
4289
+ }, gt = (e, t, n) => {
4290
+ if (Zr(t), t.length === 0)
4440
4291
  return n(e);
4441
4292
  let r = e;
4442
4293
  for (let s = 0; s < t.length - 1; s++) {
4443
4294
  const i = t[s];
4444
4295
  if (te(r)) {
4445
- const u = +i;
4446
- r = r[u];
4447
- } else if (we(r))
4296
+ const a = +i;
4297
+ r = r[a];
4298
+ } else if (De(r))
4448
4299
  r = r[i];
4449
4300
  else if (ke(r)) {
4450
- const u = +i;
4451
- r = fe(r, u);
4452
- } else if (De(r)) {
4301
+ const a = +i;
4302
+ r = ce(r, a);
4303
+ } else if (we(r)) {
4453
4304
  if (s === t.length - 2)
4454
4305
  break;
4455
- const l = +i, a = +t[++s] == 0 ? "key" : "value", f = fe(r, l);
4456
- switch (a) {
4306
+ const l = +i, u = +t[++s] == 0 ? "key" : "value", c = ce(r, l);
4307
+ switch (u) {
4457
4308
  case "key":
4458
- r = f;
4309
+ r = c;
4459
4310
  break;
4460
4311
  case "value":
4461
- r = r.get(f);
4312
+ r = r.get(c);
4462
4313
  break;
4463
4314
  }
4464
4315
  }
4465
4316
  }
4466
4317
  const o = t[t.length - 1];
4467
- if (te(r) ? r[+o] = n(r[+o]) : we(r) && (r[o] = n(r[o])), ke(r)) {
4468
- const s = fe(r, +o), i = n(s);
4318
+ if (te(r) ? r[+o] = n(r[+o]) : De(r) && (r[o] = n(r[o])), ke(r)) {
4319
+ const s = ce(r, +o), i = n(s);
4469
4320
  s !== i && (r.delete(s), r.add(i));
4470
4321
  }
4471
- if (De(r)) {
4472
- const s = +t[t.length - 2], i = fe(r, s);
4322
+ if (we(r)) {
4323
+ const s = +t[t.length - 2], i = ce(r, s);
4473
4324
  switch (+o == 0 ? "key" : "value") {
4474
4325
  case "key": {
4475
4326
  const l = n(i);
@@ -4484,112 +4335,112 @@ var ra = (e, t) => {
4484
4335
  }
4485
4336
  return e;
4486
4337
  };
4487
- function vt(e, t, n = []) {
4338
+ function Et(e, t, n = []) {
4488
4339
  if (!e)
4489
4340
  return;
4490
4341
  if (!te(e)) {
4491
- he(e, (s, i) => vt(s, t, [...n, ...Oe(i)]));
4342
+ he(e, (s, i) => Et(s, t, [...n, ...be(i)]));
4492
4343
  return;
4493
4344
  }
4494
4345
  const [r, o] = e;
4495
4346
  o && he(o, (s, i) => {
4496
- vt(s, t, [...n, ...Oe(i)]);
4347
+ Et(s, t, [...n, ...be(i)]);
4497
4348
  }), t(r, n);
4498
4349
  }
4499
- function oa(e, t, n) {
4500
- return vt(t, (r, o) => {
4501
- e = Et(e, o, (s) => na(s, r, n));
4350
+ function na(e, t, n) {
4351
+ return Et(t, (r, o) => {
4352
+ e = gt(e, o, (s) => ea(s, r, n));
4502
4353
  }), e;
4503
4354
  }
4504
- function sa(e, t) {
4355
+ function ra(e, t) {
4505
4356
  function n(r, o) {
4506
- const s = ra(e, Oe(o));
4507
- r.map(Oe).forEach((i) => {
4508
- e = Et(e, i, () => s);
4357
+ const s = ta(e, be(o));
4358
+ r.map(be).forEach((i) => {
4359
+ e = gt(e, i, () => s);
4509
4360
  });
4510
4361
  }
4511
4362
  if (te(t)) {
4512
4363
  const [r, o] = t;
4513
4364
  r.forEach((s) => {
4514
- e = Et(e, Oe(s), () => e);
4365
+ e = gt(e, be(s), () => e);
4515
4366
  }), o && he(o, n);
4516
4367
  } else
4517
4368
  he(t, n);
4518
4369
  return e;
4519
4370
  }
4520
- var ia = (e, t) => we(e) || te(e) || De(e) || ke(e) || Xr(e, t);
4521
- function ua(e, t, n) {
4371
+ var oa = (e, t) => De(e) || te(e) || we(e) || ke(e) || Wr(e, t);
4372
+ function sa(e, t, n) {
4522
4373
  const r = n.get(e);
4523
4374
  r ? r.push(t) : n.set(e, [t]);
4524
4375
  }
4525
- function aa(e, t) {
4376
+ function ia(e, t) {
4526
4377
  const n = {};
4527
4378
  let r;
4528
4379
  return e.forEach((o) => {
4529
4380
  if (o.length <= 1)
4530
4381
  return;
4531
- t || (o = o.map((u) => u.map(String)).sort((u, l) => u.length - l.length));
4382
+ t || (o = o.map((a) => a.map(String)).sort((a, l) => a.length - l.length));
4532
4383
  const [s, ...i] = o;
4533
- s.length === 0 ? r = i.map(rt) : n[rt(s)] = i.map(rt);
4534
- }), r ? gt(n) ? [r] : [r, n] : gt(n) ? void 0 : n;
4384
+ s.length === 0 ? r = i.map(tt) : n[tt(s)] = i.map(tt);
4385
+ }), r ? mt(n) ? [r] : [r, n] : mt(n) ? void 0 : n;
4535
4386
  }
4536
- var to = (e, t, n, r, o = [], s = [], i = /* @__PURE__ */ new Map()) => {
4537
- var u;
4538
- const l = qu(e);
4387
+ var Jr = (e, t, n, r, o = [], s = [], i = /* @__PURE__ */ new Map()) => {
4388
+ var a;
4389
+ const l = Wu(e);
4539
4390
  if (!l) {
4540
- ua(e, o, t);
4391
+ sa(e, o, t);
4541
4392
  const d = i.get(e);
4542
4393
  if (d)
4543
4394
  return r ? {
4544
4395
  transformedValue: null
4545
4396
  } : d;
4546
4397
  }
4547
- if (!ia(e, n)) {
4548
- const d = $n(e, n), E = d ? {
4398
+ if (!oa(e, n)) {
4399
+ const d = Un(e, n), v = d ? {
4549
4400
  transformedValue: d.value,
4550
4401
  annotations: [d.type]
4551
4402
  } : {
4552
4403
  transformedValue: e
4553
4404
  };
4554
- return l || i.set(e, E), E;
4405
+ return l || i.set(e, v), v;
4555
4406
  }
4556
4407
  if (Ue(s, e))
4557
4408
  return {
4558
4409
  transformedValue: null
4559
4410
  };
4560
- const a = $n(e, n), f = (u = a == null ? void 0 : a.value) != null ? u : e, h = te(f) ? [] : {}, c = {};
4561
- he(f, (d, E) => {
4562
- if (E === "__proto__" || E === "constructor" || E === "prototype")
4563
- throw new Error(`Detected property ${E}. This is a prototype pollution risk, please remove it from your object.`);
4564
- const p = to(d, t, n, r, [...o, E], [...s, e], i);
4565
- h[E] = p.transformedValue, te(p.annotations) ? c[E] = p.annotations : we(p.annotations) && he(p.annotations, (m, C) => {
4566
- c[Gr(E) + "." + C] = m;
4411
+ const u = Un(e, n), c = (a = u == null ? void 0 : u.value) != null ? a : e, p = te(c) ? [] : {}, f = {};
4412
+ he(c, (d, v) => {
4413
+ if (v === "__proto__" || v === "constructor" || v === "prototype")
4414
+ throw new Error(`Detected property ${v}. This is a prototype pollution risk, please remove it from your object.`);
4415
+ const _ = Jr(d, t, n, r, [...o, v], [...s, e], i);
4416
+ p[v] = _.transformedValue, te(_.annotations) ? f[v] = _.annotations : De(_.annotations) && he(_.annotations, (m, T) => {
4417
+ f[$r(v) + "." + T] = m;
4567
4418
  });
4568
4419
  });
4569
- const _ = gt(c) ? {
4570
- transformedValue: h,
4571
- annotations: a ? [a.type] : void 0
4420
+ const h = mt(f) ? {
4421
+ transformedValue: p,
4422
+ annotations: u ? [u.type] : void 0
4572
4423
  } : {
4573
- transformedValue: h,
4574
- annotations: a ? [a.type, c] : c
4424
+ transformedValue: p,
4425
+ annotations: u ? [u.type, f] : f
4575
4426
  };
4576
- return l || i.set(e, _), _;
4427
+ return l || i.set(e, h), h;
4577
4428
  };
4578
4429
  g();
4579
4430
  g();
4580
- function no(e) {
4431
+ function Qr(e) {
4581
4432
  return Object.prototype.toString.call(e).slice(8, -1);
4582
4433
  }
4583
- function Gn(e) {
4584
- return no(e) === "Array";
4434
+ function Hn(e) {
4435
+ return Qr(e) === "Array";
4585
4436
  }
4586
- function la(e) {
4587
- if (no(e) !== "Object")
4437
+ function ua(e) {
4438
+ if (Qr(e) !== "Object")
4588
4439
  return !1;
4589
4440
  const t = Object.getPrototypeOf(e);
4590
4441
  return !!t && t.constructor === Object && t === Object.prototype;
4591
4442
  }
4592
- function ca(e, t, n, r, o) {
4443
+ function aa(e, t, n, r, o) {
4593
4444
  const s = {}.propertyIsEnumerable.call(r, t) ? "enumerable" : "nonenumerable";
4594
4445
  s === "enumerable" && (e[t] = n), o && s === "nonenumerable" && Object.defineProperty(e, t, {
4595
4446
  value: n,
@@ -4598,38 +4449,38 @@ function ca(e, t, n, r, o) {
4598
4449
  configurable: !0
4599
4450
  });
4600
4451
  }
4601
- function yt(e, t = {}) {
4602
- if (Gn(e))
4603
- return e.map((o) => yt(o, t));
4604
- if (!la(e))
4452
+ function vt(e, t = {}) {
4453
+ if (Hn(e))
4454
+ return e.map((o) => vt(o, t));
4455
+ if (!ua(e))
4605
4456
  return e;
4606
4457
  const n = Object.getOwnPropertyNames(e), r = Object.getOwnPropertySymbols(e);
4607
4458
  return [...n, ...r].reduce((o, s) => {
4608
- if (Gn(t.props) && !t.props.includes(s))
4459
+ if (Hn(t.props) && !t.props.includes(s))
4609
4460
  return o;
4610
- const i = e[s], u = yt(i, t);
4611
- return ca(o, s, u, e, t.nonenumerable), o;
4461
+ const i = e[s], a = vt(i, t);
4462
+ return aa(o, s, a, e, t.nonenumerable), o;
4612
4463
  }, {});
4613
4464
  }
4614
- var I = class {
4465
+ var R = class {
4615
4466
  /**
4616
4467
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
4617
4468
  */
4618
4469
  constructor({ dedupe: e = !1 } = {}) {
4619
- this.classRegistry = new Vu(), this.symbolRegistry = new zr((t) => {
4470
+ this.classRegistry = new Bu(), this.symbolRegistry = new Ur((t) => {
4620
4471
  var n;
4621
4472
  return (n = t.description) != null ? n : "";
4622
- }), this.customTransformerRegistry = new Uu(), this.allowedErrorProps = [], this.dedupe = e;
4473
+ }), this.customTransformerRegistry = new Fu(), this.allowedErrorProps = [], this.dedupe = e;
4623
4474
  }
4624
4475
  serialize(e) {
4625
- const t = /* @__PURE__ */ new Map(), n = to(e, t, this, this.dedupe), r = {
4476
+ const t = /* @__PURE__ */ new Map(), n = Jr(e, t, this, this.dedupe), r = {
4626
4477
  json: n.transformedValue
4627
4478
  };
4628
4479
  n.annotations && (r.meta = {
4629
4480
  ...r.meta,
4630
4481
  values: n.annotations
4631
4482
  });
4632
- const o = aa(t, this.dedupe);
4483
+ const o = ia(t, this.dedupe);
4633
4484
  return o && (r.meta = {
4634
4485
  ...r.meta,
4635
4486
  referentialEqualities: o
@@ -4637,8 +4488,8 @@ var I = class {
4637
4488
  }
4638
4489
  deserialize(e) {
4639
4490
  const { json: t, meta: n } = e;
4640
- let r = yt(t);
4641
- return n != null && n.values && (r = oa(r, n.values, this)), n != null && n.referentialEqualities && (r = sa(r, n.referentialEqualities)), r;
4491
+ let r = vt(t);
4492
+ return n != null && n.values && (r = na(r, n.values, this)), n != null && n.referentialEqualities && (r = ra(r, n.referentialEqualities)), r;
4642
4493
  }
4643
4494
  stringify(e) {
4644
4495
  return JSON.stringify(this.serialize(e));
@@ -4662,15 +4513,15 @@ var I = class {
4662
4513
  this.allowedErrorProps.push(...e);
4663
4514
  }
4664
4515
  };
4665
- I.defaultInstance = new I();
4666
- I.serialize = I.defaultInstance.serialize.bind(I.defaultInstance);
4667
- I.deserialize = I.defaultInstance.deserialize.bind(I.defaultInstance);
4668
- I.stringify = I.defaultInstance.stringify.bind(I.defaultInstance);
4669
- I.parse = I.defaultInstance.parse.bind(I.defaultInstance);
4670
- I.registerClass = I.defaultInstance.registerClass.bind(I.defaultInstance);
4671
- I.registerSymbol = I.defaultInstance.registerSymbol.bind(I.defaultInstance);
4672
- I.registerCustom = I.defaultInstance.registerCustom.bind(I.defaultInstance);
4673
- I.allowErrorProps = I.defaultInstance.allowErrorProps.bind(I.defaultInstance);
4516
+ R.defaultInstance = new R();
4517
+ R.serialize = R.defaultInstance.serialize.bind(R.defaultInstance);
4518
+ R.deserialize = R.defaultInstance.deserialize.bind(R.defaultInstance);
4519
+ R.stringify = R.defaultInstance.stringify.bind(R.defaultInstance);
4520
+ R.parse = R.defaultInstance.parse.bind(R.defaultInstance);
4521
+ R.registerClass = R.defaultInstance.registerClass.bind(R.defaultInstance);
4522
+ R.registerSymbol = R.defaultInstance.registerSymbol.bind(R.defaultInstance);
4523
+ R.registerCustom = R.defaultInstance.registerCustom.bind(R.defaultInstance);
4524
+ R.allowErrorProps = R.defaultInstance.allowErrorProps.bind(R.defaultInstance);
4674
4525
  g();
4675
4526
  g();
4676
4527
  g();
@@ -4694,18 +4545,18 @@ g();
4694
4545
  g();
4695
4546
  g();
4696
4547
  g();
4697
- var Wn, Yn;
4698
- (Yn = (Wn = A).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__) != null || (Wn.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__ = []);
4699
- var qn, Xn;
4700
- (Xn = (qn = A).__VUE_DEVTOOLS_KIT_RPC_CLIENT__) != null || (qn.__VUE_DEVTOOLS_KIT_RPC_CLIENT__ = null);
4701
- var Zn, Jn;
4702
- (Jn = (Zn = A).__VUE_DEVTOOLS_KIT_RPC_SERVER__) != null || (Zn.__VUE_DEVTOOLS_KIT_RPC_SERVER__ = null);
4703
- var Qn, er;
4704
- (er = (Qn = A).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__) != null || (Qn.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__ = null);
4705
- var tr, nr;
4706
- (nr = (tr = A).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__) != null || (tr.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__ = null);
4707
- var rr, or;
4708
- (or = (rr = A).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__) != null || (rr.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__ = null);
4548
+ var jn, $n;
4549
+ ($n = (jn = A).__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__) != null || (jn.__VUE_DEVTOOLS_KIT_MESSAGE_CHANNELS__ = []);
4550
+ var zn, Kn;
4551
+ (Kn = (zn = A).__VUE_DEVTOOLS_KIT_RPC_CLIENT__) != null || (zn.__VUE_DEVTOOLS_KIT_RPC_CLIENT__ = null);
4552
+ var Gn, Wn;
4553
+ (Wn = (Gn = A).__VUE_DEVTOOLS_KIT_RPC_SERVER__) != null || (Gn.__VUE_DEVTOOLS_KIT_RPC_SERVER__ = null);
4554
+ var Yn, qn;
4555
+ (qn = (Yn = A).__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__) != null || (Yn.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__ = null);
4556
+ var Xn, Zn;
4557
+ (Zn = (Xn = A).__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__) != null || (Xn.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__ = null);
4558
+ var Jn, Qn;
4559
+ (Qn = (Jn = A).__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__) != null || (Jn.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__ = null);
4709
4560
  g();
4710
4561
  g();
4711
4562
  g();
@@ -4713,16 +4564,60 @@ g();
4713
4564
  g();
4714
4565
  g();
4715
4566
  g();
4716
- function fa(e, t) {
4567
+ function la(e, t) {
4717
4568
  const n = `▲ ■ ●${e}`;
4718
- typeof sr == "function" ? sr(n, t) : console.log(n);
4569
+ typeof er == "function" ? er(n, t) : console.log(n);
4719
4570
  }
4720
- function sr(e, t) {
4571
+ function er(e, t) {
4721
4572
  throw new Error(e + t);
4722
4573
  }
4723
- const ro = (e) => {
4574
+ function Bt(e) {
4575
+ let t = 0;
4576
+ return e.traverse((n) => {
4577
+ if (n.isMesh && n.geometry && n.type !== "HightlightMesh") {
4578
+ const r = n.geometry, o = r.attributes.position.count * 3 * Float32Array.BYTES_PER_ELEMENT, s = r.index ? r.index.count * Uint32Array.BYTES_PER_ELEMENT : 0, i = r.attributes.normal ? r.attributes.normal.count * 3 * Float32Array.BYTES_PER_ELEMENT : 0, a = r.attributes.uv ? r.attributes.uv.count * 2 * Float32Array.BYTES_PER_ELEMENT : 0, l = o + s + i + a;
4579
+ t += l;
4580
+ }
4581
+ }), t;
4582
+ }
4583
+ function tr(e, t, n) {
4584
+ e.push(t), e.length > n && e.shift();
4585
+ }
4586
+ function ca(e) {
4587
+ return (e / 1024).toFixed(2);
4588
+ }
4589
+ function fa(e) {
4590
+ if (!e)
4591
+ return;
4592
+ const t = {
4593
+ maxFrames: 160,
4594
+ fps: {
4595
+ value: 0,
4596
+ accumulator: []
4597
+ },
4598
+ memory: {
4599
+ currentMem: 0,
4600
+ allocatedMem: 0,
4601
+ accumulator: []
4602
+ }
4603
+ }, n = 100, r = Ko({ every: n }), { isSupported: o, memory: s } = Go({ interval: n }), i = 160;
4604
+ let a = performance.now(), l = 0;
4605
+ const u = 1, c = ({ timestamp: f }) => {
4606
+ var h;
4607
+ e.scene.value && (t.memory.allocatedMem = Bt(e.scene.value)), f - a >= n && (a = f, tr(t.fps.accumulator, r.value, i), t.fps.value = r.value, o.value && ((h = s.value) != null && h.usedJSHeapSize) && (tr(t.memory.accumulator, s.value.usedJSHeapSize / 1024 / 1024, i), t.memory.accumulator.length > 0 && (t.memory.currentMem = t.memory.accumulator.reduce((d, v) => d + v, 0) / t.memory.accumulator.length)));
4608
+ }, { pause: p } = ar(({ delta: f }) => {
4609
+ window.__TRES__DEVTOOLS__ && (c({ timestamp: performance.now() }), l += f, l >= u && (window.__TRES__DEVTOOLS__.cb({
4610
+ context: e,
4611
+ performance: t
4612
+ }), l = 0));
4613
+ }, { immediate: !0 });
4614
+ me(() => {
4615
+ p();
4616
+ });
4617
+ }
4618
+ const eo = (e) => {
4724
4619
  const t = {
4725
- id: e.uuid,
4620
+ id: `scene-${e.uuid}`,
4726
4621
  label: e.type,
4727
4622
  children: [],
4728
4623
  tags: []
@@ -4732,19 +4627,19 @@ const ro = (e) => {
4732
4627
  textColor: 5750629,
4733
4628
  backgroundColor: 15793395
4734
4629
  });
4735
- const n = Ot(e);
4630
+ const n = Bt(e);
4736
4631
  return n > 0 && t.tags.push({
4737
- label: `${Qs(n)} KB`,
4632
+ label: `${ca(n)} KB`,
4738
4633
  textColor: 15707189,
4739
4634
  backgroundColor: 16775644,
4740
4635
  tooltip: "Memory usage"
4741
- }), e.type.includes("Light") && (ys(e) && t.tags.push({
4636
+ }), e.type.includes("Light") && (Cs(e) && t.tags.push({
4742
4637
  label: `${e.intensity}`,
4743
4638
  textColor: 9738662,
4744
4639
  backgroundColor: 16316922,
4745
4640
  tooltip: "Intensity"
4746
4641
  }), t.tags.push({
4747
- label: `#${new Ae(e.color).getHexString()}`,
4642
+ label: `#${new Oe(e.color).getHexString()}`,
4748
4643
  textColor: 9738662,
4749
4644
  backgroundColor: 16316922,
4750
4645
  tooltip: "Color"
@@ -4760,90 +4655,177 @@ const ro = (e) => {
4760
4655
  tooltip: "Position"
4761
4656
  })), t;
4762
4657
  };
4763
- function oo(e, t, n = "") {
4658
+ function da(e, t, n = "") {
4659
+ const r = n ? `${n}.${e}` : e;
4660
+ return {
4661
+ id: `context-${t}-${r}`,
4662
+ label: e,
4663
+ children: [],
4664
+ tags: []
4665
+ };
4666
+ }
4667
+ function to(e, t, n = "") {
4764
4668
  e.children.forEach((r) => {
4765
4669
  if (r.type === "HightlightMesh" || n && !r.type.includes(n) && !r.name.includes(n))
4766
4670
  return;
4767
- const o = ro(r);
4768
- t.children.push(o), oo(r, o, n);
4671
+ const o = eo(r);
4672
+ t.children.push(o), to(r, o, n);
4769
4673
  });
4770
4674
  }
4771
- const da = [], Ee = "tres:inspector", pa = At({
4772
- sceneGraph: null
4773
- });
4774
- function _a(e, t) {
4775
- Du(
4776
- {
4777
- id: "dev.esm.tres",
4778
- label: "TresJS 🪐",
4779
- logo: "https://raw.githubusercontent.com/Tresjs/tres/main/public/favicon.svg",
4780
- packageName: "tresjs",
4781
- homepage: "https://docs.tresjs.org",
4782
- componentStateTypes: da,
4783
- app: e
4784
- },
4785
- (n) => {
4786
- typeof n.now != "function" && fa(
4675
+ function yt(e, t, n = /* @__PURE__ */ new WeakSet(), r = 0, o = 4, s, i = "") {
4676
+ var l, u;
4677
+ if (r >= o || !e || n.has(e))
4678
+ return;
4679
+ const a = r === 0 ? ((u = (l = e == null ? void 0 : e.scene) == null ? void 0 : l.value) == null ? void 0 : u.uuid) || Math.random().toString(36).slice(2, 11) : s;
4680
+ n.add(e), Object.entries(e).forEach(([c, p]) => {
4681
+ if (c.startsWith("_") || typeof p == "function")
4682
+ return;
4683
+ const f = i ? `${i}.${c}` : c, h = da(c, a, i);
4684
+ c !== "scene" && (Ce(p) ? (h.tags.push({
4685
+ label: `Ref<${typeof p.value}>`,
4686
+ textColor: 4372611,
4687
+ backgroundColor: 15793395
4688
+ }), p.value && typeof p.value == "object" ? yt(p.value, h, n, r + 1, o, a, f) : h.label = `${c}: ${JSON.stringify(p.value)}`) : p && typeof p == "object" && !Array.isArray(p) ? Object.keys(p).length > 0 ? n.has(p) ? h.tags.push({
4689
+ label: "Circular",
4690
+ textColor: 16711680,
4691
+ backgroundColor: 16773360
4692
+ }) : yt(p, h, n, r + 1, o, a, f) : h.label = `${c}: {}` : Array.isArray(p) ? (h.label = `${c}: Array(${p.length})`, h.tags.push({
4693
+ label: `length: ${p.length}`,
4694
+ textColor: 9738662,
4695
+ backgroundColor: 16316922
4696
+ })) : h.label = `${c}: ${JSON.stringify(p)}`, t.children.push(h));
4697
+ });
4698
+ }
4699
+ const pa = (e) => (t) => {
4700
+ if (t.inspectorId === Pe) {
4701
+ const n = eo(e.scene.value);
4702
+ to(e.scene.value, n, t.filter);
4703
+ const r = {
4704
+ id: "context-root",
4705
+ label: "Context",
4706
+ children: [],
4707
+ tags: []
4708
+ };
4709
+ yt(e, r), t.rootNodes = [n, r];
4710
+ }
4711
+ }, _a = (e, { highlightMesh: t, prevInstance: n }) => (r) => {
4712
+ var o;
4713
+ if (r.inspectorId === Pe) {
4714
+ if (r.nodeId.includes("scene")) {
4715
+ const s = r.nodeId.match(/^scene-(.+)$/), i = s ? s[1] : null;
4716
+ if (!i)
4717
+ return;
4718
+ const [a] = e.scene.value.getObjectsByProperty("uuid", i);
4719
+ if (!a)
4720
+ return;
4721
+ if (n && t && t.parent && n.remove(t), a.isMesh) {
4722
+ const l = Bs(a);
4723
+ a.add(l), t = l, n = a;
4724
+ }
4725
+ r.state = {
4726
+ object: Object.entries(a).map(([l, u]) => l === "children" ? { key: l, value: u.filter((c) => c.type !== "HightlightMesh") } : { key: l, value: u, editable: !0 }).filter(({ key: l }) => l !== "parent")
4727
+ }, a.isScene && (r.state = {
4728
+ ...r.state,
4729
+ state: [
4730
+ {
4731
+ key: "Scene Info",
4732
+ value: {
4733
+ objects: a.children.length,
4734
+ memory: Bt(a),
4735
+ calls: e.renderer.instance.value.info.render.calls,
4736
+ triangles: e.renderer.instance.value.info.render.triangles,
4737
+ points: e.renderer.instance.value.info.render.points,
4738
+ lines: e.renderer.instance.value.info.render.lines
4739
+ }
4740
+ },
4741
+ {
4742
+ key: "Programs",
4743
+ value: ((o = e.renderer.instance.value.info.programs) == null ? void 0 : o.map((l) => ({
4744
+ ...l,
4745
+ programName: l.name
4746
+ }))) || []
4747
+ }
4748
+ ]
4749
+ });
4750
+ } else if (r.nodeId.includes("context")) {
4751
+ const s = r.nodeId.match(/^context-([^-]+(?:-[^-]+)*)-(.+)$/), i = s ? s[2] : "context";
4752
+ if (!i || i === "context") {
4753
+ r.state = {
4754
+ object: Object.entries(e).filter(([u]) => !u.startsWith("_") && u !== "parent").map(([u, c]) => ({
4755
+ key: u,
4756
+ value: Ce(c) ? c.value : c,
4757
+ editable: !1
4758
+ }))
4759
+ };
4760
+ return;
4761
+ }
4762
+ const a = i.split(".");
4763
+ let l = e;
4764
+ for (const u of a) {
4765
+ if (!l || typeof l != "object")
4766
+ break;
4767
+ l = Ce(l[u]) ? l[u].value : l[u];
4768
+ }
4769
+ l !== void 0 && (r.state = {
4770
+ object: Object.entries(l).filter(([u]) => !u.startsWith("_") && u !== "parent").map(([u, c]) => Ce(c) ? {
4771
+ key: u,
4772
+ value: c.value,
4773
+ editable: !1
4774
+ } : typeof c == "function" ? {
4775
+ key: u,
4776
+ value: "ƒ()",
4777
+ editable: !1
4778
+ } : c && typeof c == "object" ? {
4779
+ key: u,
4780
+ value: Array.isArray(c) ? `Array(${c.length})` : "Object",
4781
+ editable: !1
4782
+ } : {
4783
+ key: u,
4784
+ value: c,
4785
+ editable: !1
4786
+ })
4787
+ });
4788
+ }
4789
+ }
4790
+ }, ha = (e) => (t) => {
4791
+ if (t.inspectorId === Pe && t.nodeId.includes("scene")) {
4792
+ const n = t.nodeId.match(/^scene-(.+)$/), r = n ? n[1] : null;
4793
+ if (!r)
4794
+ return;
4795
+ Ms(e.scene.value, r, t.path, t.state.value);
4796
+ }
4797
+ }, Pe = "tres:inspector";
4798
+ function ma(e, t) {
4799
+ const n = {
4800
+ id: "dev.esm.tres",
4801
+ label: "TresJS 🪐",
4802
+ logo: "https://raw.githubusercontent.com/Tresjs/tres/main/public/favicon.svg",
4803
+ packageName: "tresjs",
4804
+ homepage: "https://docs.tresjs.org",
4805
+ app: e
4806
+ }, r = null, o = null;
4807
+ fa(t), Su(
4808
+ n,
4809
+ (s) => {
4810
+ typeof s.now != "function" && la(
4787
4811
  "You seem to be using an outdated version of Vue Devtools. Are you still using the Beta release instead of the stable one? You can find the links at https://devtools.vuejs.org/guide/installation.html."
4788
- ), n.addInspector({
4789
- id: Ee,
4812
+ ), s.addInspector({
4813
+ id: Pe,
4790
4814
  label: "TresJS 🪐",
4791
4815
  icon: "account_tree",
4792
4816
  treeFilterPlaceholder: "Search instances"
4793
4817
  }), setInterval(() => {
4794
- n.sendInspectorTree(Ee);
4818
+ s.sendInspectorTree(Pe);
4795
4819
  }, 1e3), setInterval(() => {
4796
- n.notifyComponentUpdate();
4797
- }, 5e3), n.on.getInspectorTree((s) => {
4798
- if (s.inspectorId === Ee) {
4799
- const i = ro(t.scene.value);
4800
- oo(t.scene.value, i, s.filter), pa.sceneGraph = i, s.rootNodes = [i];
4801
- }
4802
- });
4803
- let r = null, o = null;
4804
- n.on.getInspectorState((s) => {
4805
- var i;
4806
- if (s.inspectorId === Ee) {
4807
- const [u] = t.scene.value.getObjectsByProperty("uuid", s.nodeId);
4808
- if (!u)
4809
- return;
4810
- if (o && r && r.parent && o.remove(r), u.isMesh) {
4811
- const l = Rs(u);
4812
- u.add(l), r = l, o = u;
4813
- }
4814
- s.state = {
4815
- object: Object.entries(u).map(([l, a]) => l === "children" ? { key: l, value: a.filter((f) => f.type !== "HightlightMesh") } : { key: l, value: a, editable: !0 }).filter(({ key: l }) => l !== "parent")
4816
- }, u.isScene && (s.state = {
4817
- ...s.state,
4818
- state: [
4819
- {
4820
- key: "Scene Info",
4821
- value: {
4822
- objects: u.children.length,
4823
- memory: Ot(u),
4824
- calls: t.renderer.value.info.render.calls,
4825
- triangles: t.renderer.value.info.render.triangles,
4826
- points: t.renderer.value.info.render.points,
4827
- lines: t.renderer.value.info.render.lines
4828
- }
4829
- },
4830
- {
4831
- key: "Programs",
4832
- value: ((i = t.renderer.value.info.programs) == null ? void 0 : i.map((l) => ({
4833
- ...l,
4834
- programName: l.name
4835
- }))) || []
4836
- }
4837
- ]
4838
- });
4839
- }
4840
- }), n.on.editInspectorState((s) => {
4841
- s.inspectorId === Ee && Is(t.scene.value, s.nodeId, s.path, s.state.value);
4842
- });
4820
+ s.notifyComponentUpdate();
4821
+ }, 5e3), s.on.getInspectorTree(pa(t)), s.on.getInspectorState(_a(t, {
4822
+ highlightMesh: r,
4823
+ prevInstance: o
4824
+ })), s.on.editInspectorState(ha(t));
4843
4825
  }
4844
4826
  );
4845
4827
  }
4846
- const ha = ["data-scene", "data-tres"], ma = /* @__PURE__ */ He({
4828
+ const ga = ["data-scene", "data-tres"], Ea = /* @__PURE__ */ nt({
4847
4829
  __name: "TresCanvas",
4848
4830
  props: {
4849
4831
  shadows: { type: Boolean, default: void 0 },
@@ -4872,89 +4854,87 @@ const ha = ["data-scene", "data-tres"], ma = /* @__PURE__ */ He({
4872
4854
  logarithmicDepthBuffer: { type: Boolean, default: void 0 },
4873
4855
  reverseDepthBuffer: { type: Boolean }
4874
4856
  },
4875
- emits: [
4876
- "render",
4877
- "click",
4878
- "double-click",
4879
- "context-menu",
4880
- "pointer-move",
4881
- "pointer-up",
4882
- "pointer-down",
4883
- "pointer-enter",
4884
- "pointer-leave",
4885
- "pointer-over",
4886
- "pointer-out",
4887
- "pointer-missed",
4888
- "wheel",
4889
- "ready"
4890
- ],
4857
+ emits: ["ready", "render", "click", "doubleClick", "contextMenu", "pointerMove", "pointerUp", "pointerDown", "pointerEnter", "pointerLeave", "pointerOver", "pointerOut", "pointerMissed", "wheel"],
4891
4858
  setup(e, { expose: t, emit: n }) {
4892
- const r = e, o = n, s = fo(), i = X(), u = Z(new ar()), l = Nt();
4893
- ft(ur);
4894
- const a = (d, E = !1) => He({
4859
+ const r = e, o = n, s = lo(), i = ie(), a = J(new rr()), l = Lt();
4860
+ ct(nr);
4861
+ const u = (d, v = !1) => nt({
4895
4862
  setup() {
4896
- var T;
4897
- const p = (T = Nt()) == null ? void 0 : T.appContext;
4898
- p && (p.app = l == null ? void 0 : l.appContext.app);
4863
+ var b;
4864
+ const _ = (b = Lt()) == null ? void 0 : b.appContext;
4865
+ _ && (_.app = l == null ? void 0 : l.appContext.app);
4899
4866
  const m = {};
4900
- function C(O) {
4901
- O && (O.parent && C(O.parent), O.provides && Object.assign(m, O.provides));
4867
+ function T(C) {
4868
+ C && (C.parent && T(C.parent), C.provides && Object.assign(m, C.provides));
4902
4869
  }
4903
- return l != null && l.parent && r.enableProvideBridge && (C(l.parent), Reflect.ownKeys(m).forEach((O) => {
4904
- Le(O, m[O]);
4905
- })), Le("useTres", d), Le("extend", ft), typeof window < "u" && _a(p == null ? void 0 : p.app, d), () => Ut(vo, null, E ? [] : s.default());
4870
+ return l != null && l.parent && r.enableProvideBridge && (T(l.parent), Reflect.ownKeys(m).forEach((C) => {
4871
+ Be(C, m[C]);
4872
+ })), Be("useTres", d), Be("extend", ct), typeof window < "u" && (_ != null && _.app) && ma(_ == null ? void 0 : _.app, d), () => Vt(go, null, v ? [] : s.default());
4906
4873
  }
4907
- }), f = (d, E = !1) => {
4908
- const p = a(d, E), { render: m } = Eo(si(d));
4909
- m(Ut(p), u.value);
4910
- }, h = (d, E = !1) => {
4911
- Ke(d.scene.value), E && (d.renderer.value.dispose(), d.renderer.value.renderLists.dispose(), d.renderer.value.forceContextLoss()), u.value.__tres = {
4874
+ }), c = (d, v = !1) => {
4875
+ const _ = u(d, v), { render: m } = mo(ri(d));
4876
+ m(Vt(_), a.value);
4877
+ }, p = (d, v = !1) => {
4878
+ $e(d.scene.value), v && (d.renderer.instance.value.dispose(), d.renderer.instance.value.renderLists.dispose(), d.renderer.instance.value.forceContextLoss()), a.value.__tres = {
4912
4879
  root: d
4913
4880
  };
4914
- }, c = Z(null);
4915
- t({ context: c, dispose: () => h(c.value, !0) });
4916
- const _ = () => {
4917
- h(c.value), f(c.value, !0);
4881
+ }, f = J(null);
4882
+ t({ context: f, dispose: () => p(f.value, !0) });
4883
+ const h = () => {
4884
+ p(f.value), c(f.value, !0);
4918
4885
  };
4919
- return po(() => {
4886
+ return co(() => {
4887
+ var P;
4920
4888
  const d = i;
4921
- c.value = ti({
4922
- scene: u.value,
4889
+ f.value = Qs({
4890
+ scene: a.value,
4923
4891
  canvas: d,
4924
4892
  windowSize: r.windowSize ?? !1,
4925
- rendererOptions: r,
4926
- emit: o
4893
+ rendererOptions: r
4927
4894
  });
4928
- const { registerCamera: E, camera: p, cameras: m, deregisterCamera: C } = c.value;
4929
- f(c.value);
4930
- const T = () => {
4931
- const O = new it(
4895
+ const { camera: v, renderer: _ } = f.value, { registerCamera: m, cameras: T, activeCamera: b, deregisterCamera: C } = v;
4896
+ c(f.value);
4897
+ const M = () => {
4898
+ const O = new Do(
4932
4899
  45,
4933
4900
  window.innerWidth / window.innerHeight,
4934
4901
  0.1,
4935
4902
  1e3
4936
4903
  );
4937
- O.position.set(3, 3, 3), O.lookAt(0, 0, 0), E(O);
4938
- const k = Ct(() => {
4939
- m.value.length >= 2 && (O.removeFromParent(), C(O), k == null || k());
4904
+ O.position.set(3, 3, 3), O.lookAt(0, 0, 0), m(O);
4905
+ const k = At(() => {
4906
+ T.value.length >= 2 && (O.removeFromParent(), C(O), k == null || k());
4940
4907
  });
4941
4908
  };
4942
- ye(
4909
+ Ae(
4943
4910
  () => r.camera,
4944
4911
  (O, k) => {
4945
- O && E(O), k && (k.removeFromParent(), C(k));
4912
+ O && m(I(O), !0), k && (I(k).removeFromParent(), C(I(k)));
4946
4913
  },
4947
4914
  {
4948
4915
  immediate: !0
4949
4916
  }
4950
- ), p.value || T();
4951
- }), le(_), (d, E) => (ho(), _o("canvas", {
4917
+ ), b.value || M(), _.onRender.on((O) => {
4918
+ o("render", O);
4919
+ }), (P = f.value.eventManager) == null || P.onEvent(({ type: O, event: k, intersection: E }) => {
4920
+ o(
4921
+ Le(O),
4922
+ // typescript doesn't know that kebabToCamel(type) is a valid key of PointerEmits
4923
+ { type: O, event: k, intersection: E }
4924
+ );
4925
+ });
4926
+ }), He(() => {
4927
+ var d;
4928
+ return (d = f.value) == null ? void 0 : d.renderer.isReady;
4929
+ }, () => {
4930
+ f.value && o("ready", f.value);
4931
+ }, { once: !0 }), me(h), (d, v) => (po(), fo("canvas", {
4952
4932
  ref_key: "canvas",
4953
4933
  ref: i,
4954
- "data-scene": u.value.uuid,
4955
- class: go(d.$attrs.class),
4956
- "data-tres": `tresjs ${W(hs).version}`,
4957
- style: mo({
4934
+ "data-scene": a.value.uuid,
4935
+ class: ho(d.$attrs.class),
4936
+ "data-tres": `tresjs ${X(ps).version}`,
4937
+ style: _o({
4958
4938
  display: "block",
4959
4939
  width: "100%",
4960
4940
  height: "100%",
@@ -4965,31 +4945,31 @@ const ha = ["data-scene", "data-tres"], ma = /* @__PURE__ */ He({
4965
4945
  touchAction: "none",
4966
4946
  ...d.$attrs.style
4967
4947
  })
4968
- }, null, 14, ha));
4948
+ }, null, 14, ga));
4969
4949
  }
4970
- }), ga = [
4950
+ }), va = [
4971
4951
  "TresCanvas",
4972
4952
  "TresLeches",
4973
4953
  "TresScene"
4974
- ], Ma = {
4954
+ ], xa = {
4975
4955
  template: {
4976
4956
  compilerOptions: {
4977
- isCustomElement: (e) => e.startsWith("Tres") && !ga.includes(e) || e === "primitive"
4957
+ isCustomElement: (e) => e.startsWith("Tres") && !va.includes(e) || e === "primitive"
4978
4958
  }
4979
4959
  }
4980
4960
  };
4981
4961
  let q = null;
4982
- const Ba = {
4962
+ const Ma = {
4983
4963
  updated: (e, t) => {
4984
4964
  var o;
4985
- const n = xs(t);
4965
+ const n = Ls(t);
4986
4966
  if (!n) {
4987
- Se(`v-distance-to: problem with binding value: ${t.value}`);
4967
+ ut(`v-distance-to: problem with binding value: ${t.value}`);
4988
4968
  return;
4989
4969
  }
4990
4970
  q && (q.dispose(), e.parent.remove(q));
4991
4971
  const r = n.clone().sub(e.position);
4992
- r.normalize(), q = new Po(r, e.position, e.position.distanceTo(n), 16776960), e.parent.add(q), console.table(
4972
+ r.normalize(), q = new wo(r, e.position, e.position.distanceTo(n), 16776960), e.parent.add(q), console.table(
4993
4973
  [
4994
4974
  ["Distance:", e.position.distanceTo(n)],
4995
4975
  [`origin: ${e.name || e.type}`, `x:${e.position.x}, y:${e.position.y}, z:${(o = e.position) == null ? void 0 : o.z}`],
@@ -5001,14 +4981,14 @@ const Ba = {
5001
4981
  q == null || q.dispose(), e.parent && e.parent.remove(q);
5002
4982
  }
5003
4983
  };
5004
- class so extends Io {
4984
+ class no extends ko {
5005
4985
  constructor(t, n) {
5006
- const r = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], o = new Ht();
5007
- o.setAttribute("position", new jt(r, 3)), o.computeBoundingSphere();
5008
- const s = new Ro({ fog: !1 });
4986
+ const r = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], o = new Ft();
4987
+ o.setAttribute("position", new Nt(r, 3)), o.computeBoundingSphere();
4988
+ const s = new Po({ fog: !1 });
5009
4989
  super(o, s), this.light = t, this.color = n, this.type = "RectAreaLightHelper";
5010
- const i = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], u = new Ht();
5011
- u.setAttribute("position", new jt(i, 3)), u.computeBoundingSphere(), this.add(new xo(u, new cr({ side: Mo, fog: !1 })));
4990
+ const i = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], a = new Ft();
4991
+ a.setAttribute("position", new Nt(i, 3)), a.computeBoundingSphere(), this.add(new Io(a, new sr({ side: Ro, fog: !1 })));
5012
4992
  }
5013
4993
  updateMatrixWorld() {
5014
4994
  if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
@@ -5024,32 +5004,32 @@ class so extends Io {
5024
5004
  this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
5025
5005
  }
5026
5006
  }
5027
- let Be, Q;
5028
- const Ea = {
5029
- DirectionalLight: Fo,
5030
- PointLight: Vo,
5031
- SpotLight: Lo,
5032
- HemisphereLight: Bo,
5033
- RectAreaLight: so
5034
- }, La = {
5007
+ let Me, Q;
5008
+ const ya = {
5009
+ DirectionalLight: Lo,
5010
+ PointLight: Bo,
5011
+ SpotLight: Mo,
5012
+ HemisphereLight: xo,
5013
+ RectAreaLight: no
5014
+ }, Ba = {
5035
5015
  mounted: (e) => {
5036
5016
  if (!e.isLight) {
5037
- Se(`${e.type} is not a light`);
5017
+ ut(`${e.type} is not a light`);
5038
5018
  return;
5039
5019
  }
5040
- Be = Ea[e.type], e.parent.add(new Be(e, 1, e.color.getHex()));
5020
+ Me = ya[e.type], e.parent.add(new Me(e, 1, e.color.getHex()));
5041
5021
  },
5042
5022
  updated: (e) => {
5043
- Q = e.parent.children.find((t) => t instanceof Be), !(Q instanceof so) && Q.update();
5023
+ Q = e.parent.children.find((t) => t instanceof Me), !(Q instanceof no) && Q.update();
5044
5024
  },
5045
5025
  unmounted: (e) => {
5046
5026
  if (!e.isLight) {
5047
- Se(`${e.type} is not a light`);
5027
+ ut(`${e.type} is not a light`);
5048
5028
  return;
5049
5029
  }
5050
- Q = e.parent.children.find((t) => t instanceof Be), Q && Q.dispose && Q.dispose(), e.parent && e.parent.remove(Q);
5030
+ Q = e.parent.children.find((t) => t instanceof Me), Q && Q.dispose && Q.dispose(), e.parent && e.parent.remove(Q);
5051
5031
  }
5052
- }, Va = {
5032
+ }, La = {
5053
5033
  mounted: (e, t) => {
5054
5034
  if (t.arg) {
5055
5035
  console.log(`v-log:${t.arg}`, e[t.arg]);
@@ -5057,43 +5037,40 @@ const Ea = {
5057
5037
  }
5058
5038
  console.log("v-log", e);
5059
5039
  }
5060
- }, Fa = {
5040
+ }, Va = ["click", "double-click", "context-menu", "pointer-move", "pointer-up", "pointer-down", "pointer-enter", "pointer-leave", "pointer-over", "pointer-out", "pointer-missed", "wheel"], Fa = {
5061
5041
  install(e) {
5062
- e.component("TresCanvas", ma);
5042
+ e.component("TresCanvas", Ea);
5063
5043
  }
5064
5044
  };
5065
5045
  export {
5066
- ma as TresCanvas,
5067
- Sa as UseLoader,
5068
- ba as UseTexture,
5046
+ Ea as TresCanvas,
5047
+ Da as UseLoader,
5069
5048
  Ks as buildGraph,
5070
- ct as catalogue,
5071
- $s as createRenderLoop,
5049
+ lt as catalogue,
5050
+ Gs as createRenderLoop,
5072
5051
  Fa as default,
5073
- Ke as dispose,
5074
- ft as extend,
5075
- Ta as isProd,
5076
- at as logError,
5077
- Oa as logMessage,
5078
- Se as logWarning,
5079
- Ws as normalizeColor,
5080
- Da as normalizeVectorFlexibleParam,
5081
- ka as onTresReady,
5082
- Ma as templateCompilerOptions,
5083
- js as useCamera,
5052
+ $e as dispose,
5053
+ ct as extend,
5054
+ ba as isProd,
5055
+ it as logError,
5056
+ Sa as logMessage,
5057
+ ut as logWarning,
5058
+ Ys as normalizeColor,
5059
+ ka as normalizeVectorFlexibleParam,
5060
+ Va as pointerEventTypes,
5061
+ xa as templateCompilerOptions,
5062
+ zs as useCameraManager,
5084
5063
  wa as useGraph,
5085
- Us as useLoader,
5086
- Ia as useLoop,
5087
- Xs as useRaycaster,
5088
- Ra as useRenderLoop,
5089
- Ys as useRenderer,
5090
- xa as useSeek,
5091
- Hs as useTexture,
5092
- Pa as useTres,
5093
- Ge as useTresContext,
5094
- ti as useTresContextProvider,
5095
- Zs as useTresEventManager,
5096
- Ba as vDistanceTo,
5097
- La as vLightHelper,
5098
- Va as vLog
5064
+ $s as useLoader,
5065
+ Pa as useLoop,
5066
+ Zs as useRaycaster,
5067
+ Ia as useRenderLoop,
5068
+ qs as useRendererManager,
5069
+ Ra as useTres,
5070
+ gr as useTresContext,
5071
+ Qs as useTresContextProvider,
5072
+ Js as useTresEventManager,
5073
+ Ma as vDistanceTo,
5074
+ Ba as vLightHelper,
5075
+ La as vLog
5099
5076
  };