@ridp/threejs 1.1.4 → 1.1.5

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.
@@ -2,10 +2,10 @@ import * as _t from "three";
2
2
  import { TrianglesDrawMode as Ei, TriangleFanDrawMode as Or, TriangleStripDrawMode as Ds, Loader as Ns, FileLoader as Nn, SRGBColorSpace as ut, LinearSRGBColorSpace as Ge, BufferGeometry as Fs, BufferAttribute as Zt, Color as $e, ColorManagement as Mr, LoaderUtils as en, MeshPhysicalMaterial as He, Vector2 as Fr, SpotLight as Si, PointLight as Ri, DirectionalLight as ki, Matrix4 as Dt, Vector3 as le, Quaternion as js, InstancedMesh as Oi, InstancedBufferAttribute as Mi, Object3D as Ks, TextureLoader as Pi, ImageBitmapLoader as Ci, InterleavedBuffer as Ii, InterleavedBufferAttribute as Li, LinearMipmapLinearFilter as Bs, NearestMipmapLinearFilter as Di, LinearMipmapNearestFilter as Ni, NearestMipmapNearestFilter as Fi, LinearFilter as Pr, NearestFilter as Us, RepeatWrapping as Cr, MirroredRepeatWrapping as ji, ClampToEdgeWrapping as Ki, PointsMaterial as Bi, Material as Ar, LineBasicMaterial as Ui, MeshStandardMaterial as qs, DoubleSide as qi, MeshBasicMaterial as Jt, PropertyBinding as Gi, SkinnedMesh as Hi, Mesh as zi, LineSegments as Vi, Line as Xi, LineLoop as Wi, Points as Yi, Group as xr, PerspectiveCamera as Gs, MathUtils as It, OrthographicCamera as Qi, Skeleton as $i, AnimationClip as Ji, Bone as Zi, InterpolateDiscrete as eo, InterpolateLinear as Hs, Texture as vs, VectorKeyframeTrack as bs, NumberKeyframeTrack as ws, QuaternionKeyframeTrack as _s, FrontSide as to, Interpolant as no, Box3 as jn, Sphere as ro, Matrix3 as zs, Ray as so, WebGLRenderer as io, Scene as oo, Raycaster as ao } from "three";
3
3
  import { ref as Tr, shallowRef as uo, onMounted as co, onUnmounted as lo, nextTick as As } from "vue";
4
4
  import { d as fo, j as ho, S as po, l as mo } from "./ImageLoader-CB_URfeZ.js";
5
- function xs(C, r) {
6
- if (r === Ei)
5
+ function xs(C, s) {
6
+ if (s === Ei)
7
7
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), C;
8
- if (r === Or || r === Ds) {
8
+ if (s === Or || s === Ds) {
9
9
  let i = C.getIndex();
10
10
  if (i === null) {
11
11
  const l = [], p = C.getAttribute("position");
@@ -17,7 +17,7 @@ function xs(C, r) {
17
17
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), C;
18
18
  }
19
19
  const a = i.count - 2, u = [];
20
- if (r === Or)
20
+ if (s === Or)
21
21
  for (let l = 1; l <= a; l++)
22
22
  u.push(i.getX(0)), u.push(i.getX(l)), u.push(i.getX(l + 1));
23
23
  else
@@ -27,7 +27,7 @@ function xs(C, r) {
27
27
  const c = C.clone();
28
28
  return c.setIndex(u), c.clearGroups(), c;
29
29
  } else
30
- return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", r), C;
30
+ return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", s), C;
31
31
  }
32
32
  const Er = /* @__PURE__ */ new WeakMap();
33
33
  class yo extends Ns {
@@ -36,8 +36,8 @@ class yo extends Ns {
36
36
  *
37
37
  * @param {LoadingManager} [manager] - The loading manager.
38
38
  */
39
- constructor(r) {
40
- super(r), this.decoderPath = "", this.decoderConfig = {}, this.decoderBinary = null, this.decoderPending = null, this.workerLimit = 4, this.workerPool = [], this.workerNextTaskID = 1, this.workerSourceURL = "", this.defaultAttributeIDs = {
39
+ constructor(s) {
40
+ super(s), this.decoderPath = "", this.decoderConfig = {}, this.decoderBinary = null, this.decoderPending = null, this.workerLimit = 4, this.workerPool = [], this.workerNextTaskID = 1, this.workerSourceURL = "", this.defaultAttributeIDs = {
41
41
  position: "POSITION",
42
42
  normal: "NORMAL",
43
43
  color: "COLOR",
@@ -55,8 +55,8 @@ class yo extends Ns {
55
55
  * @param {string} path - The decoder path.
56
56
  * @return {DRACOLoader} A reference to this loader.
57
57
  */
58
- setDecoderPath(r) {
59
- return this.decoderPath = r, this;
58
+ setDecoderPath(s) {
59
+ return this.decoderPath = s, this;
60
60
  }
61
61
  /**
62
62
  * Provides configuration for the decoder libraries. Configuration cannot be changed after decoding begins.
@@ -64,8 +64,8 @@ class yo extends Ns {
64
64
  * @param {{type:('js'|'wasm')}} config - The decoder config.
65
65
  * @return {DRACOLoader} A reference to this loader.
66
66
  */
67
- setDecoderConfig(r) {
68
- return this.decoderConfig = r, this;
67
+ setDecoderConfig(s) {
68
+ return this.decoderConfig = s, this;
69
69
  }
70
70
  /**
71
71
  * Sets the maximum number of Web Workers to be used during decoding.
@@ -74,8 +74,8 @@ class yo extends Ns {
74
74
  * @param {number} workerLimit - The worker limit.
75
75
  * @return {DRACOLoader} A reference to this loader.
76
76
  */
77
- setWorkerLimit(r) {
78
- return this.workerLimit = r, this;
77
+ setWorkerLimit(s) {
78
+ return this.workerLimit = s, this;
79
79
  }
80
80
  /**
81
81
  * Starts loading from the given URL and passes the loaded Draco asset
@@ -86,9 +86,9 @@ class yo extends Ns {
86
86
  * @param {onProgressCallback} onProgress - Executed while the loading is in progress.
87
87
  * @param {onErrorCallback} onError - Executed when errors occur.
88
88
  */
89
- load(r, i, a, u) {
89
+ load(s, i, a, u) {
90
90
  const c = new Nn(this.manager);
91
- c.setPath(this.path), c.setResponseType("arraybuffer"), c.setRequestHeader(this.requestHeader), c.setWithCredentials(this.withCredentials), c.load(r, (l) => {
91
+ c.setPath(this.path), c.setResponseType("arraybuffer"), c.setRequestHeader(this.requestHeader), c.setWithCredentials(this.withCredentials), c.load(s, (l) => {
92
92
  this.parse(l, i, u);
93
93
  }, a, u);
94
94
  }
@@ -99,12 +99,12 @@ class yo extends Ns {
99
99
  * @param {function(BufferGeometry)} onLoad - Executed when the loading/parsing process has been finished.
100
100
  * @param {onErrorCallback} onError - Executed when errors occur.
101
101
  */
102
- parse(r, i, a = () => {
102
+ parse(s, i, a = () => {
103
103
  }) {
104
- this.decodeDracoFile(r, i, null, null, ut, a).catch(a);
104
+ this.decodeDracoFile(s, i, null, null, ut, a).catch(a);
105
105
  }
106
106
  //
107
- decodeDracoFile(r, i, a, u, c = Ge, l = () => {
107
+ decodeDracoFile(s, i, a, u, c = Ge, l = () => {
108
108
  }) {
109
109
  const p = {
110
110
  attributeIDs: a || this.defaultAttributeIDs,
@@ -112,49 +112,49 @@ class yo extends Ns {
112
112
  useUniqueIDs: !!a,
113
113
  vertexColorSpace: c
114
114
  };
115
- return this.decodeGeometry(r, p).then(i).catch(l);
115
+ return this.decodeGeometry(s, p).then(i).catch(l);
116
116
  }
117
- decodeGeometry(r, i) {
117
+ decodeGeometry(s, i) {
118
118
  const a = JSON.stringify(i);
119
- if (Er.has(r)) {
120
- const h = Er.get(r);
119
+ if (Er.has(s)) {
120
+ const h = Er.get(s);
121
121
  if (h.key === a)
122
122
  return h.promise;
123
- if (r.byteLength === 0)
123
+ if (s.byteLength === 0)
124
124
  throw new Error(
125
125
  "THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred."
126
126
  );
127
127
  }
128
128
  let u;
129
- const c = this.workerNextTaskID++, l = r.byteLength, p = this._getWorker(c, l).then((h) => (u = h, new Promise((y, E) => {
130
- u._callbacks[c] = { resolve: y, reject: E }, u.postMessage({ type: "decode", id: c, taskConfig: i, buffer: r }, [r]);
129
+ const c = this.workerNextTaskID++, l = s.byteLength, p = this._getWorker(c, l).then((h) => (u = h, new Promise((y, E) => {
130
+ u._callbacks[c] = { resolve: y, reject: E }, u.postMessage({ type: "decode", id: c, taskConfig: i, buffer: s }, [s]);
131
131
  }))).then((h) => this._createGeometry(h.geometry));
132
132
  return p.catch(() => !0).then(() => {
133
133
  u && c && this._releaseTask(u, c);
134
- }), Er.set(r, {
134
+ }), Er.set(s, {
135
135
  key: a,
136
136
  promise: p
137
137
  }), p;
138
138
  }
139
- _createGeometry(r) {
139
+ _createGeometry(s) {
140
140
  const i = new Fs();
141
- r.index && i.setIndex(new Zt(r.index.array, 1));
142
- for (let a = 0; a < r.attributes.length; a++) {
143
- const u = r.attributes[a], c = u.name, l = u.array, p = u.itemSize, h = new Zt(l, p);
141
+ s.index && i.setIndex(new Zt(s.index.array, 1));
142
+ for (let a = 0; a < s.attributes.length; a++) {
143
+ const u = s.attributes[a], c = u.name, l = u.array, p = u.itemSize, h = new Zt(l, p);
144
144
  c === "color" && (this._assignVertexColorSpace(h, u.vertexColorSpace), h.normalized = !(l instanceof Float32Array)), i.setAttribute(c, h);
145
145
  }
146
146
  return i;
147
147
  }
148
- _assignVertexColorSpace(r, i) {
148
+ _assignVertexColorSpace(s, i) {
149
149
  if (i !== ut) return;
150
150
  const a = new $e();
151
- for (let u = 0, c = r.count; u < c; u++)
152
- a.fromBufferAttribute(r, u), Mr.toWorkingColorSpace(a, ut), r.setXYZ(u, a.r, a.g, a.b);
151
+ for (let u = 0, c = s.count; u < c; u++)
152
+ a.fromBufferAttribute(s, u), Mr.toWorkingColorSpace(a, ut), s.setXYZ(u, a.r, a.g, a.b);
153
153
  }
154
- _loadLibrary(r, i) {
154
+ _loadLibrary(s, i) {
155
155
  const a = new Nn(this.manager);
156
156
  return a.setPath(this.decoderPath), a.setResponseType(i), a.setWithCredentials(this.withCredentials), new Promise((u, c) => {
157
- a.load(r, u, void 0, c);
157
+ a.load(s, u, void 0, c);
158
158
  });
159
159
  }
160
160
  preload() {
@@ -162,10 +162,10 @@ class yo extends Ns {
162
162
  }
163
163
  _initDecoder() {
164
164
  if (this.decoderPending) return this.decoderPending;
165
- const r = typeof WebAssembly != "object" || this.decoderConfig.type === "js", i = [];
166
- return r ? i.push(this._loadLibrary("draco_decoder.js", "text")) : (i.push(this._loadLibrary("draco_wasm_wrapper.js", "text")), i.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))), this.decoderPending = Promise.all(i).then((a) => {
165
+ const s = typeof WebAssembly != "object" || this.decoderConfig.type === "js", i = [];
166
+ return s ? i.push(this._loadLibrary("draco_decoder.js", "text")) : (i.push(this._loadLibrary("draco_wasm_wrapper.js", "text")), i.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))), this.decoderPending = Promise.all(i).then((a) => {
167
167
  const u = a[0];
168
- r || (this.decoderConfig.wasmBinary = a[1]);
168
+ s || (this.decoderConfig.wasmBinary = a[1]);
169
169
  const c = go.toString(), l = [
170
170
  "/* draco decoder */",
171
171
  u,
@@ -177,7 +177,7 @@ class yo extends Ns {
177
177
  this.workerSourceURL = URL.createObjectURL(new Blob([l]));
178
178
  }), this.decoderPending;
179
179
  }
180
- _getWorker(r, i) {
180
+ _getWorker(s, i) {
181
181
  return this._initDecoder().then(() => {
182
182
  if (this.workerPool.length < this.workerLimit) {
183
183
  const u = new Worker(this.workerSourceURL);
@@ -199,28 +199,28 @@ class yo extends Ns {
199
199
  return u._taskLoad > c._taskLoad ? -1 : 1;
200
200
  });
201
201
  const a = this.workerPool[this.workerPool.length - 1];
202
- return a._taskCosts[r] = i, a._taskLoad += i, a;
202
+ return a._taskCosts[s] = i, a._taskLoad += i, a;
203
203
  });
204
204
  }
205
- _releaseTask(r, i) {
206
- r._taskLoad -= r._taskCosts[i], delete r._callbacks[i], delete r._taskCosts[i];
205
+ _releaseTask(s, i) {
206
+ s._taskLoad -= s._taskCosts[i], delete s._callbacks[i], delete s._taskCosts[i];
207
207
  }
208
208
  debug() {
209
- console.log("Task load: ", this.workerPool.map((r) => r._taskLoad));
209
+ console.log("Task load: ", this.workerPool.map((s) => s._taskLoad));
210
210
  }
211
211
  dispose() {
212
- for (let r = 0; r < this.workerPool.length; ++r)
213
- this.workerPool[r].terminate();
212
+ for (let s = 0; s < this.workerPool.length; ++s)
213
+ this.workerPool[s].terminate();
214
214
  return this.workerPool.length = 0, this.workerSourceURL !== "" && URL.revokeObjectURL(this.workerSourceURL), this;
215
215
  }
216
216
  }
217
217
  function go() {
218
- let C, r;
218
+ let C, s;
219
219
  onmessage = function(l) {
220
220
  const p = l.data;
221
221
  switch (p.type) {
222
222
  case "init":
223
- C = p.decoderConfig, r = new Promise(function(E) {
223
+ C = p.decoderConfig, s = new Promise(function(E) {
224
224
  C.onModuleLoaded = function(_) {
225
225
  E({ draco: _ });
226
226
  }, DracoDecoderModule(C);
@@ -228,7 +228,7 @@ function go() {
228
228
  break;
229
229
  case "decode":
230
230
  const h = p.buffer, y = p.taskConfig;
231
- r.then((E) => {
231
+ s.then((E) => {
232
232
  const _ = E.draco, P = new _.Decoder();
233
233
  try {
234
234
  const L = i(_, P, new Int8Array(h), y), q = L.attributes.map((X) => X.array.buffer);
@@ -310,8 +310,8 @@ class vo extends Ns {
310
310
  *
311
311
  * @param {LoadingManager} [manager] - The loading manager.
312
312
  */
313
- constructor(r) {
314
- super(r), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(i) {
313
+ constructor(s) {
314
+ super(s), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(i) {
315
315
  return new xo(i);
316
316
  }), this.register(function(i) {
317
317
  return new To(i);
@@ -356,24 +356,24 @@ class vo extends Ns {
356
356
  * @param {onProgressCallback} onProgress - Executed while the loading is in progress.
357
357
  * @param {onErrorCallback} onError - Executed when errors occur.
358
358
  */
359
- load(r, i, a, u) {
359
+ load(s, i, a, u) {
360
360
  const c = this;
361
361
  let l;
362
362
  if (this.resourcePath !== "")
363
363
  l = this.resourcePath;
364
364
  else if (this.path !== "") {
365
- const y = en.extractUrlBase(r);
365
+ const y = en.extractUrlBase(s);
366
366
  l = en.resolveURL(y, this.path);
367
367
  } else
368
- l = en.extractUrlBase(r);
369
- this.manager.itemStart(r);
368
+ l = en.extractUrlBase(s);
369
+ this.manager.itemStart(s);
370
370
  const p = function(y) {
371
- u ? u(y) : console.error(y), c.manager.itemError(r), c.manager.itemEnd(r);
371
+ u ? u(y) : console.error(y), c.manager.itemError(s), c.manager.itemEnd(s);
372
372
  }, h = new Nn(this.manager);
373
- h.setPath(this.path), h.setResponseType("arraybuffer"), h.setRequestHeader(this.requestHeader), h.setWithCredentials(this.withCredentials), h.load(r, function(y) {
373
+ h.setPath(this.path), h.setResponseType("arraybuffer"), h.setRequestHeader(this.requestHeader), h.setWithCredentials(this.withCredentials), h.load(s, function(y) {
374
374
  try {
375
375
  c.parse(y, l, function(E) {
376
- i(E), c.manager.itemEnd(r);
376
+ i(E), c.manager.itemEnd(s);
377
377
  }, p);
378
378
  } catch (E) {
379
379
  p(E);
@@ -387,8 +387,8 @@ class vo extends Ns {
387
387
  * @param {DRACOLoader} dracoLoader - The Draco loader to set.
388
388
  * @return {GLTFLoader} A reference to this loader.
389
389
  */
390
- setDRACOLoader(r) {
391
- return this.dracoLoader = r, this;
390
+ setDRACOLoader(s) {
391
+ return this.dracoLoader = s, this;
392
392
  }
393
393
  /**
394
394
  * Sets the given KTX2 loader to this loader. Required for loading KTX2
@@ -397,8 +397,8 @@ class vo extends Ns {
397
397
  * @param {KTX2Loader} ktx2Loader - The KTX2 loader to set.
398
398
  * @return {GLTFLoader} A reference to this loader.
399
399
  */
400
- setKTX2Loader(r) {
401
- return this.ktx2Loader = r, this;
400
+ setKTX2Loader(s) {
401
+ return this.ktx2Loader = s, this;
402
402
  }
403
403
  /**
404
404
  * Sets the given meshopt decoder. Required for decoding assets
@@ -407,8 +407,8 @@ class vo extends Ns {
407
407
  * @param {Object} meshoptDecoder - The meshopt decoder to set.
408
408
  * @return {GLTFLoader} A reference to this loader.
409
409
  */
410
- setMeshoptDecoder(r) {
411
- return this.meshoptDecoder = r, this;
410
+ setMeshoptDecoder(s) {
411
+ return this.meshoptDecoder = s, this;
412
412
  }
413
413
  /**
414
414
  * Registers a plugin callback. This API is internally used to implement the various
@@ -418,8 +418,8 @@ class vo extends Ns {
418
418
  * @param {function(parser:GLTFParser)} callback - The callback function to register.
419
419
  * @return {GLTFLoader} A reference to this loader.
420
420
  */
421
- register(r) {
422
- return this.pluginCallbacks.indexOf(r) === -1 && this.pluginCallbacks.push(r), this;
421
+ register(s) {
422
+ return this.pluginCallbacks.indexOf(s) === -1 && this.pluginCallbacks.push(s), this;
423
423
  }
424
424
  /**
425
425
  * Unregisters a plugin callback.
@@ -427,8 +427,8 @@ class vo extends Ns {
427
427
  * @param {Function} callback - The callback function to unregister.
428
428
  * @return {GLTFLoader} A reference to this loader.
429
429
  */
430
- unregister(r) {
431
- return this.pluginCallbacks.indexOf(r) !== -1 && this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(r), 1), this;
430
+ unregister(s) {
431
+ return this.pluginCallbacks.indexOf(s) !== -1 && this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(s), 1), this;
432
432
  }
433
433
  /**
434
434
  * Parses the given FBX data and returns the resulting group.
@@ -438,24 +438,24 @@ class vo extends Ns {
438
438
  * @param {function(GLTFLoader~LoadObject)} onLoad - Executed when the loading process has been finished.
439
439
  * @param {onErrorCallback} onError - Executed when errors occur.
440
440
  */
441
- parse(r, i, a, u) {
441
+ parse(s, i, a, u) {
442
442
  let c;
443
443
  const l = {}, p = {}, h = new TextDecoder();
444
- if (typeof r == "string")
445
- c = JSON.parse(r);
446
- else if (r instanceof ArrayBuffer)
447
- if (h.decode(new Uint8Array(r, 0, 4)) === Vs) {
444
+ if (typeof s == "string")
445
+ c = JSON.parse(s);
446
+ else if (s instanceof ArrayBuffer)
447
+ if (h.decode(new Uint8Array(s, 0, 4)) === Vs) {
448
448
  try {
449
- l[ne.KHR_BINARY_GLTF] = new jo(r);
449
+ l[ne.KHR_BINARY_GLTF] = new jo(s);
450
450
  } catch (_) {
451
451
  u && u(_);
452
452
  return;
453
453
  }
454
454
  c = JSON.parse(l[ne.KHR_BINARY_GLTF].content);
455
455
  } else
456
- c = JSON.parse(h.decode(r));
456
+ c = JSON.parse(h.decode(s));
457
457
  else
458
- c = r;
458
+ c = s;
459
459
  if (c.asset === void 0 || c.asset.version[0] < 2) {
460
460
  u && u(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
461
461
  return;
@@ -503,24 +503,24 @@ class vo extends Ns {
503
503
  * @param {string} path - The URL base path.
504
504
  * @return {Promise<GLTFLoader~LoadObject>} A Promise that resolves with the loaded glTF when the parsing has been finished.
505
505
  */
506
- parseAsync(r, i) {
506
+ parseAsync(s, i) {
507
507
  const a = this;
508
508
  return new Promise(function(u, c) {
509
- a.parse(r, i, u, c);
509
+ a.parse(s, i, u, c);
510
510
  });
511
511
  }
512
512
  }
513
513
  function bo() {
514
514
  let C = {};
515
515
  return {
516
- get: function(r) {
517
- return C[r];
516
+ get: function(s) {
517
+ return C[s];
518
518
  },
519
- add: function(r, i) {
520
- C[r] = i;
519
+ add: function(s, i) {
520
+ C[s] = i;
521
521
  },
522
- remove: function(r) {
523
- delete C[r];
522
+ remove: function(s) {
523
+ delete C[s];
524
524
  },
525
525
  removeAll: function() {
526
526
  C = {};
@@ -552,21 +552,21 @@ const ne = {
552
552
  EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
553
553
  };
554
554
  class wo {
555
- constructor(r) {
556
- this.parser = r, this.name = ne.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
555
+ constructor(s) {
556
+ this.parser = s, this.name = ne.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
557
557
  }
558
558
  _markDefs() {
559
- const r = this.parser, i = this.parser.json.nodes || [];
559
+ const s = this.parser, i = this.parser.json.nodes || [];
560
560
  for (let a = 0, u = i.length; a < u; a++) {
561
561
  const c = i[a];
562
- c.extensions && c.extensions[this.name] && c.extensions[this.name].light !== void 0 && r._addNodeRef(this.cache, c.extensions[this.name].light);
562
+ c.extensions && c.extensions[this.name] && c.extensions[this.name].light !== void 0 && s._addNodeRef(this.cache, c.extensions[this.name].light);
563
563
  }
564
564
  }
565
- _loadLight(r) {
566
- const i = this.parser, a = "light:" + r;
565
+ _loadLight(s) {
566
+ const i = this.parser, a = "light:" + s;
567
567
  let u = i.cache.get(a);
568
568
  if (u) return u;
569
- const c = i.json, h = ((c.extensions && c.extensions[this.name] || {}).lights || [])[r];
569
+ const c = i.json, h = ((c.extensions && c.extensions[this.name] || {}).lights || [])[s];
570
570
  let y;
571
571
  const E = new $e(16777215);
572
572
  h.color !== void 0 && E.setRGB(h.color[0], h.color[1], h.color[2], Ge);
@@ -584,14 +584,14 @@ class wo {
584
584
  default:
585
585
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + h.type);
586
586
  }
587
- return y.position.set(0, 0, 0), Qe(y, h), h.intensity !== void 0 && (y.intensity = h.intensity), y.name = i.createUniqueName(h.name || "light_" + r), u = Promise.resolve(y), i.cache.add(a, u), u;
587
+ return y.position.set(0, 0, 0), Qe(y, h), h.intensity !== void 0 && (y.intensity = h.intensity), y.name = i.createUniqueName(h.name || "light_" + s), u = Promise.resolve(y), i.cache.add(a, u), u;
588
588
  }
589
- getDependency(r, i) {
590
- if (r === "light")
589
+ getDependency(s, i) {
590
+ if (s === "light")
591
591
  return this._loadLight(i);
592
592
  }
593
- createNodeAttachment(r) {
594
- const i = this, a = this.parser, c = a.json.nodes[r], p = (c.extensions && c.extensions[this.name] || {}).light;
593
+ createNodeAttachment(s) {
594
+ const i = this, a = this.parser, c = a.json.nodes[s], p = (c.extensions && c.extensions[this.name] || {}).light;
595
595
  return p === void 0 ? null : this._loadLight(p).then(function(h) {
596
596
  return a._getNodeRef(i.cache, p, h);
597
597
  });
@@ -604,26 +604,26 @@ class _o {
604
604
  getMaterialType() {
605
605
  return Jt;
606
606
  }
607
- extendParams(r, i, a) {
607
+ extendParams(s, i, a) {
608
608
  const u = [];
609
- r.color = new $e(1, 1, 1), r.opacity = 1;
609
+ s.color = new $e(1, 1, 1), s.opacity = 1;
610
610
  const c = i.pbrMetallicRoughness;
611
611
  if (c) {
612
612
  if (Array.isArray(c.baseColorFactor)) {
613
613
  const l = c.baseColorFactor;
614
- r.color.setRGB(l[0], l[1], l[2], Ge), r.opacity = l[3];
614
+ s.color.setRGB(l[0], l[1], l[2], Ge), s.opacity = l[3];
615
615
  }
616
- c.baseColorTexture !== void 0 && u.push(a.assignTexture(r, "map", c.baseColorTexture, ut));
616
+ c.baseColorTexture !== void 0 && u.push(a.assignTexture(s, "map", c.baseColorTexture, ut));
617
617
  }
618
618
  return Promise.all(u);
619
619
  }
620
620
  }
621
621
  class Ao {
622
- constructor(r) {
623
- this.parser = r, this.name = ne.KHR_MATERIALS_EMISSIVE_STRENGTH;
622
+ constructor(s) {
623
+ this.parser = s, this.name = ne.KHR_MATERIALS_EMISSIVE_STRENGTH;
624
624
  }
625
- extendMaterialParams(r, i) {
626
- const u = this.parser.json.materials[r];
625
+ extendMaterialParams(s, i) {
626
+ const u = this.parser.json.materials[s];
627
627
  if (!u.extensions || !u.extensions[this.name])
628
628
  return Promise.resolve();
629
629
  const c = u.extensions[this.name].emissiveStrength;
@@ -631,15 +631,15 @@ class Ao {
631
631
  }
632
632
  }
633
633
  class xo {
634
- constructor(r) {
635
- this.parser = r, this.name = ne.KHR_MATERIALS_CLEARCOAT;
634
+ constructor(s) {
635
+ this.parser = s, this.name = ne.KHR_MATERIALS_CLEARCOAT;
636
636
  }
637
- getMaterialType(r) {
638
- const a = this.parser.json.materials[r];
637
+ getMaterialType(s) {
638
+ const a = this.parser.json.materials[s];
639
639
  return !a.extensions || !a.extensions[this.name] ? null : He;
640
640
  }
641
- extendMaterialParams(r, i) {
642
- const a = this.parser, u = a.json.materials[r];
641
+ extendMaterialParams(s, i) {
642
+ const a = this.parser, u = a.json.materials[s];
643
643
  if (!u.extensions || !u.extensions[this.name])
644
644
  return Promise.resolve();
645
645
  const c = [], l = u.extensions[this.name];
@@ -651,15 +651,15 @@ class xo {
651
651
  }
652
652
  }
653
653
  class To {
654
- constructor(r) {
655
- this.parser = r, this.name = ne.KHR_MATERIALS_DISPERSION;
654
+ constructor(s) {
655
+ this.parser = s, this.name = ne.KHR_MATERIALS_DISPERSION;
656
656
  }
657
- getMaterialType(r) {
658
- const a = this.parser.json.materials[r];
657
+ getMaterialType(s) {
658
+ const a = this.parser.json.materials[s];
659
659
  return !a.extensions || !a.extensions[this.name] ? null : He;
660
660
  }
661
- extendMaterialParams(r, i) {
662
- const u = this.parser.json.materials[r];
661
+ extendMaterialParams(s, i) {
662
+ const u = this.parser.json.materials[s];
663
663
  if (!u.extensions || !u.extensions[this.name])
664
664
  return Promise.resolve();
665
665
  const c = u.extensions[this.name];
@@ -667,15 +667,15 @@ class To {
667
667
  }
668
668
  }
669
669
  class Eo {
670
- constructor(r) {
671
- this.parser = r, this.name = ne.KHR_MATERIALS_IRIDESCENCE;
670
+ constructor(s) {
671
+ this.parser = s, this.name = ne.KHR_MATERIALS_IRIDESCENCE;
672
672
  }
673
- getMaterialType(r) {
674
- const a = this.parser.json.materials[r];
673
+ getMaterialType(s) {
674
+ const a = this.parser.json.materials[s];
675
675
  return !a.extensions || !a.extensions[this.name] ? null : He;
676
676
  }
677
- extendMaterialParams(r, i) {
678
- const a = this.parser, u = a.json.materials[r];
677
+ extendMaterialParams(s, i) {
678
+ const a = this.parser, u = a.json.materials[s];
679
679
  if (!u.extensions || !u.extensions[this.name])
680
680
  return Promise.resolve();
681
681
  const c = [], l = u.extensions[this.name];
@@ -683,15 +683,15 @@ class Eo {
683
683
  }
684
684
  }
685
685
  class So {
686
- constructor(r) {
687
- this.parser = r, this.name = ne.KHR_MATERIALS_SHEEN;
686
+ constructor(s) {
687
+ this.parser = s, this.name = ne.KHR_MATERIALS_SHEEN;
688
688
  }
689
- getMaterialType(r) {
690
- const a = this.parser.json.materials[r];
689
+ getMaterialType(s) {
690
+ const a = this.parser.json.materials[s];
691
691
  return !a.extensions || !a.extensions[this.name] ? null : He;
692
692
  }
693
- extendMaterialParams(r, i) {
694
- const a = this.parser, u = a.json.materials[r];
693
+ extendMaterialParams(s, i) {
694
+ const a = this.parser, u = a.json.materials[s];
695
695
  if (!u.extensions || !u.extensions[this.name])
696
696
  return Promise.resolve();
697
697
  const c = [];
@@ -705,15 +705,15 @@ class So {
705
705
  }
706
706
  }
707
707
  class Ro {
708
- constructor(r) {
709
- this.parser = r, this.name = ne.KHR_MATERIALS_TRANSMISSION;
708
+ constructor(s) {
709
+ this.parser = s, this.name = ne.KHR_MATERIALS_TRANSMISSION;
710
710
  }
711
- getMaterialType(r) {
712
- const a = this.parser.json.materials[r];
711
+ getMaterialType(s) {
712
+ const a = this.parser.json.materials[s];
713
713
  return !a.extensions || !a.extensions[this.name] ? null : He;
714
714
  }
715
- extendMaterialParams(r, i) {
716
- const a = this.parser, u = a.json.materials[r];
715
+ extendMaterialParams(s, i) {
716
+ const a = this.parser, u = a.json.materials[s];
717
717
  if (!u.extensions || !u.extensions[this.name])
718
718
  return Promise.resolve();
719
719
  const c = [], l = u.extensions[this.name];
@@ -721,15 +721,15 @@ class Ro {
721
721
  }
722
722
  }
723
723
  class ko {
724
- constructor(r) {
725
- this.parser = r, this.name = ne.KHR_MATERIALS_VOLUME;
724
+ constructor(s) {
725
+ this.parser = s, this.name = ne.KHR_MATERIALS_VOLUME;
726
726
  }
727
- getMaterialType(r) {
728
- const a = this.parser.json.materials[r];
727
+ getMaterialType(s) {
728
+ const a = this.parser.json.materials[s];
729
729
  return !a.extensions || !a.extensions[this.name] ? null : He;
730
730
  }
731
- extendMaterialParams(r, i) {
732
- const a = this.parser, u = a.json.materials[r];
731
+ extendMaterialParams(s, i) {
732
+ const a = this.parser, u = a.json.materials[s];
733
733
  if (!u.extensions || !u.extensions[this.name])
734
734
  return Promise.resolve();
735
735
  const c = [], l = u.extensions[this.name];
@@ -739,15 +739,15 @@ class ko {
739
739
  }
740
740
  }
741
741
  class Oo {
742
- constructor(r) {
743
- this.parser = r, this.name = ne.KHR_MATERIALS_IOR;
742
+ constructor(s) {
743
+ this.parser = s, this.name = ne.KHR_MATERIALS_IOR;
744
744
  }
745
- getMaterialType(r) {
746
- const a = this.parser.json.materials[r];
745
+ getMaterialType(s) {
746
+ const a = this.parser.json.materials[s];
747
747
  return !a.extensions || !a.extensions[this.name] ? null : He;
748
748
  }
749
- extendMaterialParams(r, i) {
750
- const u = this.parser.json.materials[r];
749
+ extendMaterialParams(s, i) {
750
+ const u = this.parser.json.materials[s];
751
751
  if (!u.extensions || !u.extensions[this.name])
752
752
  return Promise.resolve();
753
753
  const c = u.extensions[this.name];
@@ -755,15 +755,15 @@ class Oo {
755
755
  }
756
756
  }
757
757
  class Mo {
758
- constructor(r) {
759
- this.parser = r, this.name = ne.KHR_MATERIALS_SPECULAR;
758
+ constructor(s) {
759
+ this.parser = s, this.name = ne.KHR_MATERIALS_SPECULAR;
760
760
  }
761
- getMaterialType(r) {
762
- const a = this.parser.json.materials[r];
761
+ getMaterialType(s) {
762
+ const a = this.parser.json.materials[s];
763
763
  return !a.extensions || !a.extensions[this.name] ? null : He;
764
764
  }
765
- extendMaterialParams(r, i) {
766
- const a = this.parser, u = a.json.materials[r];
765
+ extendMaterialParams(s, i) {
766
+ const a = this.parser, u = a.json.materials[s];
767
767
  if (!u.extensions || !u.extensions[this.name])
768
768
  return Promise.resolve();
769
769
  const c = [], l = u.extensions[this.name];
@@ -773,15 +773,15 @@ class Mo {
773
773
  }
774
774
  }
775
775
  class Po {
776
- constructor(r) {
777
- this.parser = r, this.name = ne.EXT_MATERIALS_BUMP;
776
+ constructor(s) {
777
+ this.parser = s, this.name = ne.EXT_MATERIALS_BUMP;
778
778
  }
779
- getMaterialType(r) {
780
- const a = this.parser.json.materials[r];
779
+ getMaterialType(s) {
780
+ const a = this.parser.json.materials[s];
781
781
  return !a.extensions || !a.extensions[this.name] ? null : He;
782
782
  }
783
- extendMaterialParams(r, i) {
784
- const a = this.parser, u = a.json.materials[r];
783
+ extendMaterialParams(s, i) {
784
+ const a = this.parser, u = a.json.materials[s];
785
785
  if (!u.extensions || !u.extensions[this.name])
786
786
  return Promise.resolve();
787
787
  const c = [], l = u.extensions[this.name];
@@ -789,15 +789,15 @@ class Po {
789
789
  }
790
790
  }
791
791
  class Co {
792
- constructor(r) {
793
- this.parser = r, this.name = ne.KHR_MATERIALS_ANISOTROPY;
792
+ constructor(s) {
793
+ this.parser = s, this.name = ne.KHR_MATERIALS_ANISOTROPY;
794
794
  }
795
- getMaterialType(r) {
796
- const a = this.parser.json.materials[r];
795
+ getMaterialType(s) {
796
+ const a = this.parser.json.materials[s];
797
797
  return !a.extensions || !a.extensions[this.name] ? null : He;
798
798
  }
799
- extendMaterialParams(r, i) {
800
- const a = this.parser, u = a.json.materials[r];
799
+ extendMaterialParams(s, i) {
800
+ const a = this.parser, u = a.json.materials[s];
801
801
  if (!u.extensions || !u.extensions[this.name])
802
802
  return Promise.resolve();
803
803
  const c = [], l = u.extensions[this.name];
@@ -805,11 +805,11 @@ class Co {
805
805
  }
806
806
  }
807
807
  class Io {
808
- constructor(r) {
809
- this.parser = r, this.name = ne.KHR_TEXTURE_BASISU;
808
+ constructor(s) {
809
+ this.parser = s, this.name = ne.KHR_TEXTURE_BASISU;
810
810
  }
811
- loadTexture(r) {
812
- const i = this.parser, a = i.json, u = a.textures[r];
811
+ loadTexture(s) {
812
+ const i = this.parser, a = i.json, u = a.textures[s];
813
813
  if (!u.extensions || !u.extensions[this.name])
814
814
  return null;
815
815
  const c = u.extensions[this.name], l = i.options.ktx2Loader;
@@ -818,15 +818,15 @@ class Io {
818
818
  throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");
819
819
  return null;
820
820
  }
821
- return i.loadTextureImage(r, c.source, l);
821
+ return i.loadTextureImage(s, c.source, l);
822
822
  }
823
823
  }
824
824
  class Lo {
825
- constructor(r) {
826
- this.parser = r, this.name = ne.EXT_TEXTURE_WEBP, this.isSupported = null;
825
+ constructor(s) {
826
+ this.parser = s, this.name = ne.EXT_TEXTURE_WEBP, this.isSupported = null;
827
827
  }
828
- loadTexture(r) {
829
- const i = this.name, a = this.parser, u = a.json, c = u.textures[r];
828
+ loadTexture(s) {
829
+ const i = this.name, a = this.parser, u = a.json, c = u.textures[s];
830
830
  if (!c.extensions || !c.extensions[i])
831
831
  return null;
832
832
  const l = c.extensions[i], p = u.images[l.source];
@@ -836,27 +836,27 @@ class Lo {
836
836
  y !== null && (h = y);
837
837
  }
838
838
  return this.detectSupport().then(function(y) {
839
- if (y) return a.loadTextureImage(r, l.source, h);
839
+ if (y) return a.loadTextureImage(s, l.source, h);
840
840
  if (u.extensionsRequired && u.extensionsRequired.indexOf(i) >= 0)
841
841
  throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");
842
- return a.loadTexture(r);
842
+ return a.loadTexture(s);
843
843
  });
844
844
  }
845
845
  detectSupport() {
846
- return this.isSupported || (this.isSupported = new Promise(function(r) {
846
+ return this.isSupported || (this.isSupported = new Promise(function(s) {
847
847
  const i = new Image();
848
848
  i.src = "data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA", i.onload = i.onerror = function() {
849
- r(i.height === 1);
849
+ s(i.height === 1);
850
850
  };
851
851
  })), this.isSupported;
852
852
  }
853
853
  }
854
854
  class Do {
855
- constructor(r) {
856
- this.parser = r, this.name = ne.EXT_TEXTURE_AVIF, this.isSupported = null;
855
+ constructor(s) {
856
+ this.parser = s, this.name = ne.EXT_TEXTURE_AVIF, this.isSupported = null;
857
857
  }
858
- loadTexture(r) {
859
- const i = this.name, a = this.parser, u = a.json, c = u.textures[r];
858
+ loadTexture(s) {
859
+ const i = this.name, a = this.parser, u = a.json, c = u.textures[s];
860
860
  if (!c.extensions || !c.extensions[i])
861
861
  return null;
862
862
  const l = c.extensions[i], p = u.images[l.source];
@@ -866,27 +866,27 @@ class Do {
866
866
  y !== null && (h = y);
867
867
  }
868
868
  return this.detectSupport().then(function(y) {
869
- if (y) return a.loadTextureImage(r, l.source, h);
869
+ if (y) return a.loadTextureImage(s, l.source, h);
870
870
  if (u.extensionsRequired && u.extensionsRequired.indexOf(i) >= 0)
871
871
  throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");
872
- return a.loadTexture(r);
872
+ return a.loadTexture(s);
873
873
  });
874
874
  }
875
875
  detectSupport() {
876
- return this.isSupported || (this.isSupported = new Promise(function(r) {
876
+ return this.isSupported || (this.isSupported = new Promise(function(s) {
877
877
  const i = new Image();
878
878
  i.src = "data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=", i.onload = i.onerror = function() {
879
- r(i.height === 1);
879
+ s(i.height === 1);
880
880
  };
881
881
  })), this.isSupported;
882
882
  }
883
883
  }
884
884
  class No {
885
- constructor(r) {
886
- this.name = ne.EXT_MESHOPT_COMPRESSION, this.parser = r;
885
+ constructor(s) {
886
+ this.name = ne.EXT_MESHOPT_COMPRESSION, this.parser = s;
887
887
  }
888
- loadBufferView(r) {
889
- const i = this.parser.json, a = i.bufferViews[r];
888
+ loadBufferView(s) {
889
+ const i = this.parser.json, a = i.bufferViews[s];
890
890
  if (a.extensions && a.extensions[this.name]) {
891
891
  const u = a.extensions[this.name], c = this.parser.getDependency("buffer", u.buffer), l = this.parser.options.meshoptDecoder;
892
892
  if (!l || !l.supported) {
@@ -908,11 +908,11 @@ class No {
908
908
  }
909
909
  }
910
910
  class Fo {
911
- constructor(r) {
912
- this.name = ne.EXT_MESH_GPU_INSTANCING, this.parser = r;
911
+ constructor(s) {
912
+ this.name = ne.EXT_MESH_GPU_INSTANCING, this.parser = s;
913
913
  }
914
- createNodeMesh(r) {
915
- const i = this.parser.json, a = i.nodes[r];
914
+ createNodeMesh(s) {
915
+ const i = this.parser.json, a = i.nodes[s];
916
916
  if (!a.extensions || !a.extensions[this.name] || a.mesh === void 0)
917
917
  return null;
918
918
  const u = i.meshes[a.mesh];
@@ -922,7 +922,7 @@ class Fo {
922
922
  const l = a.extensions[this.name].attributes, p = [], h = {};
923
923
  for (const y in l)
924
924
  p.push(this.parser.getDependency("accessor", l[y]).then((E) => (h[y] = E, h[y])));
925
- return p.length < 1 ? null : (p.push(this.parser.createNodeMesh(r)), Promise.all(p).then((y) => {
925
+ return p.length < 1 ? null : (p.push(this.parser.createNodeMesh(s)), Promise.all(p).then((y) => {
926
926
  const E = y.pop(), _ = E.isGroup ? E.children : [E], P = y[0].count, L = [];
927
927
  for (const q of _) {
928
928
  const X = new Dt(), H = new le(), W = new js(), Z = new le(1, 1, 1), ce = new Oi(q.geometry, q.material, P);
@@ -941,29 +941,29 @@ class Fo {
941
941
  }
942
942
  const Vs = "glTF", $t = 12, Ts = { JSON: 1313821514, BIN: 5130562 };
943
943
  class jo {
944
- constructor(r) {
944
+ constructor(s) {
945
945
  this.name = ne.KHR_BINARY_GLTF, this.content = null, this.body = null;
946
- const i = new DataView(r, 0, $t), a = new TextDecoder();
946
+ const i = new DataView(s, 0, $t), a = new TextDecoder();
947
947
  if (this.header = {
948
- magic: a.decode(new Uint8Array(r.slice(0, 4))),
948
+ magic: a.decode(new Uint8Array(s.slice(0, 4))),
949
949
  version: i.getUint32(4, !0),
950
950
  length: i.getUint32(8, !0)
951
951
  }, this.header.magic !== Vs)
952
952
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
953
953
  if (this.header.version < 2)
954
954
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
955
- const u = this.header.length - $t, c = new DataView(r, $t);
955
+ const u = this.header.length - $t, c = new DataView(s, $t);
956
956
  let l = 0;
957
957
  for (; l < u; ) {
958
958
  const p = c.getUint32(l, !0);
959
959
  l += 4;
960
960
  const h = c.getUint32(l, !0);
961
961
  if (l += 4, h === Ts.JSON) {
962
- const y = new Uint8Array(r, $t + l, p);
962
+ const y = new Uint8Array(s, $t + l, p);
963
963
  this.content = a.decode(y);
964
964
  } else if (h === Ts.BIN) {
965
965
  const y = $t + l;
966
- this.body = r.slice(y, y + p);
966
+ this.body = s.slice(y, y + p);
967
967
  }
968
968
  l += p;
969
969
  }
@@ -972,21 +972,21 @@ class jo {
972
972
  }
973
973
  }
974
974
  class Ko {
975
- constructor(r, i) {
975
+ constructor(s, i) {
976
976
  if (!i)
977
977
  throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
978
- this.name = ne.KHR_DRACO_MESH_COMPRESSION, this.json = r, this.dracoLoader = i, this.dracoLoader.preload();
978
+ this.name = ne.KHR_DRACO_MESH_COMPRESSION, this.json = s, this.dracoLoader = i, this.dracoLoader.preload();
979
979
  }
980
- decodePrimitive(r, i) {
981
- const a = this.json, u = this.dracoLoader, c = r.extensions[this.name].bufferView, l = r.extensions[this.name].attributes, p = {}, h = {}, y = {};
980
+ decodePrimitive(s, i) {
981
+ const a = this.json, u = this.dracoLoader, c = s.extensions[this.name].bufferView, l = s.extensions[this.name].attributes, p = {}, h = {}, y = {};
982
982
  for (const E in l) {
983
983
  const _ = Ir[E] || E.toLowerCase();
984
984
  p[_] = l[E];
985
985
  }
986
- for (const E in r.attributes) {
986
+ for (const E in s.attributes) {
987
987
  const _ = Ir[E] || E.toLowerCase();
988
988
  if (l[E] !== void 0) {
989
- const P = a.accessors[r.attributes[E]], L = Lt[P.componentType];
989
+ const P = a.accessors[s.attributes[E]], L = Lt[P.componentType];
990
990
  y[_] = L.name, h[_] = P.normalized === !0;
991
991
  }
992
992
  }
@@ -1007,8 +1007,8 @@ class Bo {
1007
1007
  constructor() {
1008
1008
  this.name = ne.KHR_TEXTURE_TRANSFORM;
1009
1009
  }
1010
- extendTexture(r, i) {
1011
- return (i.texCoord === void 0 || i.texCoord === r.channel) && i.offset === void 0 && i.rotation === void 0 && i.scale === void 0 || (r = r.clone(), i.texCoord !== void 0 && (r.channel = i.texCoord), i.offset !== void 0 && r.offset.fromArray(i.offset), i.rotation !== void 0 && (r.rotation = i.rotation), i.scale !== void 0 && r.repeat.fromArray(i.scale), r.needsUpdate = !0), r;
1010
+ extendTexture(s, i) {
1011
+ return (i.texCoord === void 0 || i.texCoord === s.channel) && i.offset === void 0 && i.rotation === void 0 && i.scale === void 0 || (s = s.clone(), i.texCoord !== void 0 && (s.channel = i.texCoord), i.offset !== void 0 && s.offset.fromArray(i.offset), i.rotation !== void 0 && (s.rotation = i.rotation), i.scale !== void 0 && s.repeat.fromArray(i.scale), s.needsUpdate = !0), s;
1012
1012
  }
1013
1013
  }
1014
1014
  class Uo {
@@ -1017,17 +1017,17 @@ class Uo {
1017
1017
  }
1018
1018
  }
1019
1019
  class Xs extends no {
1020
- constructor(r, i, a, u) {
1021
- super(r, i, a, u);
1020
+ constructor(s, i, a, u) {
1021
+ super(s, i, a, u);
1022
1022
  }
1023
- copySampleValue_(r) {
1024
- const i = this.resultBuffer, a = this.sampleValues, u = this.valueSize, c = r * u * 3 + u;
1023
+ copySampleValue_(s) {
1024
+ const i = this.resultBuffer, a = this.sampleValues, u = this.valueSize, c = s * u * 3 + u;
1025
1025
  for (let l = 0; l !== u; l++)
1026
1026
  i[l] = a[c + l];
1027
1027
  return i;
1028
1028
  }
1029
- interpolate_(r, i, a, u) {
1030
- const c = this.resultBuffer, l = this.sampleValues, p = this.valueSize, h = p * 2, y = p * 3, E = u - i, _ = (a - i) / E, P = _ * _, L = P * _, q = r * y, X = q - y, H = -2 * L + 3 * P, W = L - P, Z = 1 - H, ce = W - P + _;
1029
+ interpolate_(s, i, a, u) {
1030
+ const c = this.resultBuffer, l = this.sampleValues, p = this.valueSize, h = p * 2, y = p * 3, E = u - i, _ = (a - i) / E, P = _ * _, L = P * _, q = s * y, X = q - y, H = -2 * L + 3 * P, W = L - P, Z = 1 - H, ce = W - P + _;
1031
1031
  for (let Y = 0; Y !== p; Y++) {
1032
1032
  const Ae = l[X + Y + p], ve = l[X + Y + h] * E, ae = l[q + Y + p], Le = l[q + Y] * E;
1033
1033
  c[Y] = Z * Ae + ce * ve + H * ae + W * Le;
@@ -1037,8 +1037,8 @@ class Xs extends no {
1037
1037
  }
1038
1038
  const qo = new js();
1039
1039
  class Go extends Xs {
1040
- interpolate_(r, i, a, u) {
1041
- const c = super.interpolate_(r, i, a, u);
1040
+ interpolate_(s, i, a, u) {
1041
+ const c = super.interpolate_(s, i, a, u);
1042
1042
  return qo.fromArray(c).normalize().toArray(c), c;
1043
1043
  }
1044
1044
  }
@@ -1114,23 +1114,23 @@ function zo(C) {
1114
1114
  side: to
1115
1115
  })), C.DefaultMaterial;
1116
1116
  }
1117
- function At(C, r, i) {
1117
+ function At(C, s, i) {
1118
1118
  for (const a in i.extensions)
1119
- C[a] === void 0 && (r.userData.gltfExtensions = r.userData.gltfExtensions || {}, r.userData.gltfExtensions[a] = i.extensions[a]);
1119
+ C[a] === void 0 && (s.userData.gltfExtensions = s.userData.gltfExtensions || {}, s.userData.gltfExtensions[a] = i.extensions[a]);
1120
1120
  }
1121
- function Qe(C, r) {
1122
- r.extras !== void 0 && (typeof r.extras == "object" ? Object.assign(C.userData, r.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + r.extras));
1121
+ function Qe(C, s) {
1122
+ s.extras !== void 0 && (typeof s.extras == "object" ? Object.assign(C.userData, s.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + s.extras));
1123
1123
  }
1124
- function Vo(C, r, i) {
1124
+ function Vo(C, s, i) {
1125
1125
  let a = !1, u = !1, c = !1;
1126
- for (let y = 0, E = r.length; y < E; y++) {
1127
- const _ = r[y];
1126
+ for (let y = 0, E = s.length; y < E; y++) {
1127
+ const _ = s[y];
1128
1128
  if (_.POSITION !== void 0 && (a = !0), _.NORMAL !== void 0 && (u = !0), _.COLOR_0 !== void 0 && (c = !0), a && u && c) break;
1129
1129
  }
1130
1130
  if (!a && !u && !c) return Promise.resolve(C);
1131
1131
  const l = [], p = [], h = [];
1132
- for (let y = 0, E = r.length; y < E; y++) {
1133
- const _ = r[y];
1132
+ for (let y = 0, E = s.length; y < E; y++) {
1133
+ const _ = s[y];
1134
1134
  if (a) {
1135
1135
  const P = _.POSITION !== void 0 ? i.getDependency("accessor", _.POSITION) : C.attributes.position;
1136
1136
  l.push(P);
@@ -1153,12 +1153,12 @@ function Vo(C, r, i) {
1153
1153
  return a && (C.morphAttributes.position = E), u && (C.morphAttributes.normal = _), c && (C.morphAttributes.color = P), C.morphTargetsRelative = !0, C;
1154
1154
  });
1155
1155
  }
1156
- function Xo(C, r) {
1157
- if (C.updateMorphTargets(), r.weights !== void 0)
1158
- for (let i = 0, a = r.weights.length; i < a; i++)
1159
- C.morphTargetInfluences[i] = r.weights[i];
1160
- if (r.extras && Array.isArray(r.extras.targetNames)) {
1161
- const i = r.extras.targetNames;
1156
+ function Xo(C, s) {
1157
+ if (C.updateMorphTargets(), s.weights !== void 0)
1158
+ for (let i = 0, a = s.weights.length; i < a; i++)
1159
+ C.morphTargetInfluences[i] = s.weights[i];
1160
+ if (s.extras && Array.isArray(s.extras.targetNames)) {
1161
+ const i = s.extras.targetNames;
1162
1162
  if (C.morphTargetInfluences.length === i.length) {
1163
1163
  C.morphTargetDictionary = {};
1164
1164
  for (let a = 0, u = i.length; a < u; a++)
@@ -1168,19 +1168,19 @@ function Xo(C, r) {
1168
1168
  }
1169
1169
  }
1170
1170
  function Wo(C) {
1171
- let r;
1171
+ let s;
1172
1172
  const i = C.extensions && C.extensions[ne.KHR_DRACO_MESH_COMPRESSION];
1173
- if (i ? r = "draco:" + i.bufferView + ":" + i.indices + ":" + kr(i.attributes) : r = C.indices + ":" + kr(C.attributes) + ":" + C.mode, C.targets !== void 0)
1173
+ if (i ? s = "draco:" + i.bufferView + ":" + i.indices + ":" + kr(i.attributes) : s = C.indices + ":" + kr(C.attributes) + ":" + C.mode, C.targets !== void 0)
1174
1174
  for (let a = 0, u = C.targets.length; a < u; a++)
1175
- r += ":" + kr(C.targets[a]);
1176
- return r;
1175
+ s += ":" + kr(C.targets[a]);
1176
+ return s;
1177
1177
  }
1178
1178
  function kr(C) {
1179
- let r = "";
1179
+ let s = "";
1180
1180
  const i = Object.keys(C).sort();
1181
1181
  for (let a = 0, u = i.length; a < u; a++)
1182
- r += i[a] + ":" + C[i[a]] + ";";
1183
- return r;
1182
+ s += i[a] + ":" + C[i[a]] + ";";
1183
+ return s;
1184
1184
  }
1185
1185
  function Lr(C) {
1186
1186
  switch (C) {
@@ -1201,8 +1201,8 @@ function Yo(C) {
1201
1201
  }
1202
1202
  const Qo = new Dt();
1203
1203
  class $o {
1204
- constructor(r = {}, i = {}) {
1205
- this.json = r, this.extensions = {}, this.plugins = {}, this.options = i, this.cache = new bo(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
1204
+ constructor(s = {}, i = {}) {
1205
+ this.json = s, this.extensions = {}, this.plugins = {}, this.options = i, this.cache = new bo(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
1206
1206
  let a = !1, u = -1, c = !1, l = -1;
1207
1207
  if (typeof navigator < "u") {
1208
1208
  const p = navigator.userAgent;
@@ -1212,13 +1212,13 @@ class $o {
1212
1212
  }
1213
1213
  typeof createImageBitmap > "u" || a && u < 17 || c && l < 98 ? this.textureLoader = new Pi(this.options.manager) : this.textureLoader = new Ci(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new Nn(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
1214
1214
  }
1215
- setExtensions(r) {
1216
- this.extensions = r;
1215
+ setExtensions(s) {
1216
+ this.extensions = s;
1217
1217
  }
1218
- setPlugins(r) {
1219
- this.plugins = r;
1218
+ setPlugins(s) {
1219
+ this.plugins = s;
1220
1220
  }
1221
- parse(r, i) {
1221
+ parse(s, i) {
1222
1222
  const a = this, u = this.json, c = this.extensions;
1223
1223
  this.cache.removeAll(), this.nodeCache = {}, this._invokeAll(function(l) {
1224
1224
  return l._markDefs && l._markDefs();
@@ -1245,7 +1245,7 @@ class $o {
1245
1245
  })).then(function() {
1246
1246
  for (const h of p.scenes)
1247
1247
  h.updateMatrixWorld();
1248
- r(p);
1248
+ s(p);
1249
1249
  });
1250
1250
  }).catch(i);
1251
1251
  }
@@ -1255,14 +1255,14 @@ class $o {
1255
1255
  * @private
1256
1256
  */
1257
1257
  _markDefs() {
1258
- const r = this.json.nodes || [], i = this.json.skins || [], a = this.json.meshes || [];
1258
+ const s = this.json.nodes || [], i = this.json.skins || [], a = this.json.meshes || [];
1259
1259
  for (let u = 0, c = i.length; u < c; u++) {
1260
1260
  const l = i[u].joints;
1261
1261
  for (let p = 0, h = l.length; p < h; p++)
1262
- r[l[p]].isBone = !0;
1262
+ s[l[p]].isBone = !0;
1263
1263
  }
1264
- for (let u = 0, c = r.length; u < c; u++) {
1265
- const l = r[u];
1264
+ for (let u = 0, c = s.length; u < c; u++) {
1265
+ const l = s[u];
1266
1266
  l.mesh !== void 0 && (this._addNodeRef(this.meshCache, l.mesh), l.skin !== void 0 && (a[l.mesh].isSkinnedMesh = !0)), l.camera !== void 0 && this._addNodeRef(this.cameraCache, l.camera);
1267
1267
  }
1268
1268
  }
@@ -1279,8 +1279,8 @@ class $o {
1279
1279
  * @param {Object} cache
1280
1280
  * @param {Object3D} index
1281
1281
  */
1282
- _addNodeRef(r, i) {
1283
- i !== void 0 && (r.refs[i] === void 0 && (r.refs[i] = r.uses[i] = 0), r.refs[i]++);
1282
+ _addNodeRef(s, i) {
1283
+ i !== void 0 && (s.refs[i] === void 0 && (s.refs[i] = s.uses[i] = 0), s.refs[i]++);
1284
1284
  }
1285
1285
  /**
1286
1286
  * Returns a reference to a shared resource, cloning it if necessary.
@@ -1291,31 +1291,31 @@ class $o {
1291
1291
  * @param {Object} object
1292
1292
  * @return {Object}
1293
1293
  */
1294
- _getNodeRef(r, i, a) {
1295
- if (r.refs[i] <= 1) return a;
1294
+ _getNodeRef(s, i, a) {
1295
+ if (s.refs[i] <= 1) return a;
1296
1296
  const u = a.clone(), c = (l, p) => {
1297
1297
  const h = this.associations.get(l);
1298
1298
  h != null && this.associations.set(p, h);
1299
1299
  for (const [y, E] of l.children.entries())
1300
1300
  c(E, p.children[y]);
1301
1301
  };
1302
- return c(a, u), u.name += "_instance_" + r.uses[i]++, u;
1302
+ return c(a, u), u.name += "_instance_" + s.uses[i]++, u;
1303
1303
  }
1304
- _invokeOne(r) {
1304
+ _invokeOne(s) {
1305
1305
  const i = Object.values(this.plugins);
1306
1306
  i.push(this);
1307
1307
  for (let a = 0; a < i.length; a++) {
1308
- const u = r(i[a]);
1308
+ const u = s(i[a]);
1309
1309
  if (u) return u;
1310
1310
  }
1311
1311
  return null;
1312
1312
  }
1313
- _invokeAll(r) {
1313
+ _invokeAll(s) {
1314
1314
  const i = Object.values(this.plugins);
1315
1315
  i.unshift(this);
1316
1316
  const a = [];
1317
1317
  for (let u = 0; u < i.length; u++) {
1318
- const c = r(i[u]);
1318
+ const c = s(i[u]);
1319
1319
  c && a.push(c);
1320
1320
  }
1321
1321
  return a;
@@ -1328,11 +1328,11 @@ class $o {
1328
1328
  * @param {number} index
1329
1329
  * @return {Promise<Object3D|Material|THREE.Texture|AnimationClip|ArrayBuffer|Object>}
1330
1330
  */
1331
- getDependency(r, i) {
1332
- const a = r + ":" + i;
1331
+ getDependency(s, i) {
1332
+ const a = s + ":" + i;
1333
1333
  let u = this.cache.get(a);
1334
1334
  if (!u) {
1335
- switch (r) {
1335
+ switch (s) {
1336
1336
  case "scene":
1337
1337
  u = this.loadScene(i);
1338
1338
  break;
@@ -1380,9 +1380,9 @@ class $o {
1380
1380
  break;
1381
1381
  default:
1382
1382
  if (u = this._invokeOne(function(c) {
1383
- return c != this && c.getDependency && c.getDependency(r, i);
1383
+ return c != this && c.getDependency && c.getDependency(s, i);
1384
1384
  }), !u)
1385
- throw new Error("Unknown type: " + r);
1385
+ throw new Error("Unknown type: " + s);
1386
1386
  break;
1387
1387
  }
1388
1388
  this.cache.add(a, u);
@@ -1396,13 +1396,13 @@ class $o {
1396
1396
  * @param {string} type
1397
1397
  * @return {Promise<Array<Object>>}
1398
1398
  */
1399
- getDependencies(r) {
1400
- let i = this.cache.get(r);
1399
+ getDependencies(s) {
1400
+ let i = this.cache.get(s);
1401
1401
  if (!i) {
1402
- const a = this, u = this.json[r + (r === "mesh" ? "es" : "s")] || [];
1402
+ const a = this, u = this.json[s + (s === "mesh" ? "es" : "s")] || [];
1403
1403
  i = Promise.all(u.map(function(c, l) {
1404
- return a.getDependency(r, l);
1405
- })), this.cache.add(r, i);
1404
+ return a.getDependency(s, l);
1405
+ })), this.cache.add(s, i);
1406
1406
  }
1407
1407
  return i;
1408
1408
  }
@@ -1413,11 +1413,11 @@ class $o {
1413
1413
  * @param {number} bufferIndex
1414
1414
  * @return {Promise<ArrayBuffer>}
1415
1415
  */
1416
- loadBuffer(r) {
1417
- const i = this.json.buffers[r], a = this.fileLoader;
1416
+ loadBuffer(s) {
1417
+ const i = this.json.buffers[s], a = this.fileLoader;
1418
1418
  if (i.type && i.type !== "arraybuffer")
1419
1419
  throw new Error("THREE.GLTFLoader: " + i.type + " buffer type is not supported.");
1420
- if (i.uri === void 0 && r === 0)
1420
+ if (i.uri === void 0 && s === 0)
1421
1421
  return Promise.resolve(this.extensions[ne.KHR_BINARY_GLTF].body);
1422
1422
  const u = this.options;
1423
1423
  return new Promise(function(c, l) {
@@ -1433,8 +1433,8 @@ class $o {
1433
1433
  * @param {number} bufferViewIndex
1434
1434
  * @return {Promise<ArrayBuffer>}
1435
1435
  */
1436
- loadBufferView(r) {
1437
- const i = this.json.bufferViews[r];
1436
+ loadBufferView(s) {
1437
+ const i = this.json.bufferViews[s];
1438
1438
  return this.getDependency("buffer", i.buffer).then(function(a) {
1439
1439
  const u = i.byteLength || 0, c = i.byteOffset || 0;
1440
1440
  return a.slice(c, c + u);
@@ -1447,8 +1447,8 @@ class $o {
1447
1447
  * @param {number} accessorIndex
1448
1448
  * @return {Promise<BufferAttribute|InterleavedBufferAttribute>}
1449
1449
  */
1450
- loadAccessor(r) {
1451
- const i = this, a = this.json, u = this.json.accessors[r];
1450
+ loadAccessor(s) {
1451
+ const i = this, a = this.json, u = this.json.accessors[s];
1452
1452
  if (u.bufferView === void 0 && u.sparse === void 0) {
1453
1453
  const l = Sr[u.type], p = Lt[u.componentType], h = u.normalized === !0, y = new p(u.count * l);
1454
1454
  return Promise.resolve(new Zt(y, l, h));
@@ -1482,33 +1482,33 @@ class $o {
1482
1482
  * @param {number} textureIndex
1483
1483
  * @return {Promise<THREE.Texture|null>}
1484
1484
  */
1485
- loadTexture(r) {
1486
- const i = this.json, a = this.options, c = i.textures[r].source, l = i.images[c];
1485
+ loadTexture(s) {
1486
+ const i = this.json, a = this.options, c = i.textures[s].source, l = i.images[c];
1487
1487
  let p = this.textureLoader;
1488
1488
  if (l.uri) {
1489
1489
  const h = a.manager.getHandler(l.uri);
1490
1490
  h !== null && (p = h);
1491
1491
  }
1492
- return this.loadTextureImage(r, c, p);
1492
+ return this.loadTextureImage(s, c, p);
1493
1493
  }
1494
- loadTextureImage(r, i, a) {
1495
- const u = this, c = this.json, l = c.textures[r], p = c.images[i], h = (p.uri || p.bufferView) + ":" + l.sampler;
1494
+ loadTextureImage(s, i, a) {
1495
+ const u = this, c = this.json, l = c.textures[s], p = c.images[i], h = (p.uri || p.bufferView) + ":" + l.sampler;
1496
1496
  if (this.textureCache[h])
1497
1497
  return this.textureCache[h];
1498
1498
  const y = this.loadImageSource(i, a).then(function(E) {
1499
1499
  E.flipY = !1, E.name = l.name || p.name || "", E.name === "" && typeof p.uri == "string" && p.uri.startsWith("data:image/") === !1 && (E.name = p.uri);
1500
1500
  const P = (c.samplers || {})[l.sampler] || {};
1501
- return E.magFilter = Es[P.magFilter] || Pr, E.minFilter = Es[P.minFilter] || Bs, E.wrapS = Ss[P.wrapS] || Cr, E.wrapT = Ss[P.wrapT] || Cr, E.generateMipmaps = !E.isCompressedTexture && E.minFilter !== Us && E.minFilter !== Pr, u.associations.set(E, { textures: r }), E;
1501
+ return E.magFilter = Es[P.magFilter] || Pr, E.minFilter = Es[P.minFilter] || Bs, E.wrapS = Ss[P.wrapS] || Cr, E.wrapT = Ss[P.wrapT] || Cr, E.generateMipmaps = !E.isCompressedTexture && E.minFilter !== Us && E.minFilter !== Pr, u.associations.set(E, { textures: s }), E;
1502
1502
  }).catch(function() {
1503
1503
  return null;
1504
1504
  });
1505
1505
  return this.textureCache[h] = y, y;
1506
1506
  }
1507
- loadImageSource(r, i) {
1507
+ loadImageSource(s, i) {
1508
1508
  const a = this, u = this.json, c = this.options;
1509
- if (this.sourceCache[r] !== void 0)
1510
- return this.sourceCache[r].then((_) => _.clone());
1511
- const l = u.images[r], p = self.URL || self.webkitURL;
1509
+ if (this.sourceCache[s] !== void 0)
1510
+ return this.sourceCache[s].then((_) => _.clone());
1511
+ const l = u.images[s], p = self.URL || self.webkitURL;
1512
1512
  let h = l.uri || "", y = !1;
1513
1513
  if (l.bufferView !== void 0)
1514
1514
  h = a.getDependency("bufferView", l.bufferView).then(function(_) {
@@ -1517,7 +1517,7 @@ class $o {
1517
1517
  return h = p.createObjectURL(P), h;
1518
1518
  });
1519
1519
  else if (l.uri === void 0)
1520
- throw new Error("THREE.GLTFLoader: Image " + r + " is missing URI and bufferView");
1520
+ throw new Error("THREE.GLTFLoader: Image " + s + " is missing URI and bufferView");
1521
1521
  const E = Promise.resolve(h).then(function(_) {
1522
1522
  return new Promise(function(P, L) {
1523
1523
  let q = P;
@@ -1531,7 +1531,7 @@ class $o {
1531
1531
  }).catch(function(_) {
1532
1532
  throw console.error("THREE.GLTFLoader: Couldn't load texture", h), _;
1533
1533
  });
1534
- return this.sourceCache[r] = E, E;
1534
+ return this.sourceCache[s] = E, E;
1535
1535
  }
1536
1536
  /**
1537
1537
  * Asynchronously assigns a texture to the given material parameters.
@@ -1543,7 +1543,7 @@ class $o {
1543
1543
  * @param {string} [colorSpace]
1544
1544
  * @return {Promise<Texture>}
1545
1545
  */
1546
- assignTexture(r, i, a, u) {
1546
+ assignTexture(s, i, a, u) {
1547
1547
  const c = this;
1548
1548
  return this.getDependency("texture", a.index).then(function(l) {
1549
1549
  if (!l) return null;
@@ -1554,7 +1554,7 @@ class $o {
1554
1554
  l = c.extensions[ne.KHR_TEXTURE_TRANSFORM].extendTexture(l, p), c.associations.set(l, h);
1555
1555
  }
1556
1556
  }
1557
- return u !== void 0 && (l.colorSpace = u), r[i] = l, l;
1557
+ return u !== void 0 && (l.colorSpace = u), s[i] = l, l;
1558
1558
  });
1559
1559
  }
1560
1560
  /**
@@ -1567,15 +1567,15 @@ class $o {
1567
1567
  * @private
1568
1568
  * @param {Object3D} mesh Mesh, Line, or Points instance.
1569
1569
  */
1570
- assignFinalMaterial(r) {
1571
- const i = r.geometry;
1572
- let a = r.material;
1570
+ assignFinalMaterial(s) {
1571
+ const i = s.geometry;
1572
+ let a = s.material;
1573
1573
  const u = i.attributes.tangent === void 0, c = i.attributes.color !== void 0, l = i.attributes.normal === void 0;
1574
- if (r.isPoints) {
1574
+ if (s.isPoints) {
1575
1575
  const p = "PointsMaterial:" + a.uuid;
1576
1576
  let h = this.cache.get(p);
1577
1577
  h || (h = new Bi(), Ar.prototype.copy.call(h, a), h.color.copy(a.color), h.map = a.map, h.sizeAttenuation = !1, this.cache.add(p, h)), a = h;
1578
- } else if (r.isLine) {
1578
+ } else if (s.isLine) {
1579
1579
  const p = "LineBasicMaterial:" + a.uuid;
1580
1580
  let h = this.cache.get(p);
1581
1581
  h || (h = new Ui(), Ar.prototype.copy.call(h, a), h.color.copy(a.color), h.map = a.map, this.cache.add(p, h)), a = h;
@@ -1586,7 +1586,7 @@ class $o {
1586
1586
  let h = this.cache.get(p);
1587
1587
  h || (h = a.clone(), c && (h.vertexColors = !0), l && (h.flatShading = !0), u && (h.normalScale && (h.normalScale.y *= -1), h.clearcoatNormalScale && (h.clearcoatNormalScale.y *= -1)), this.cache.add(p, h), this.associations.set(h, this.associations.get(a))), a = h;
1588
1588
  }
1589
- r.material = a;
1589
+ s.material = a;
1590
1590
  }
1591
1591
  getMaterialType() {
1592
1592
  return qs;
@@ -1598,8 +1598,8 @@ class $o {
1598
1598
  * @param {number} materialIndex
1599
1599
  * @return {Promise<Material>}
1600
1600
  */
1601
- loadMaterial(r) {
1602
- const i = this, a = this.json, u = this.extensions, c = a.materials[r];
1601
+ loadMaterial(s) {
1602
+ const i = this, a = this.json, u = this.extensions, c = a.materials[s];
1603
1603
  let l;
1604
1604
  const p = {}, h = c.extensions || {}, y = [];
1605
1605
  if (h[ne.KHR_MATERIALS_UNLIT]) {
@@ -1612,9 +1612,9 @@ class $o {
1612
1612
  p.color.setRGB(P[0], P[1], P[2], Ge), p.opacity = P[3];
1613
1613
  }
1614
1614
  _.baseColorTexture !== void 0 && y.push(i.assignTexture(p, "map", _.baseColorTexture, ut)), p.metalness = _.metallicFactor !== void 0 ? _.metallicFactor : 1, p.roughness = _.roughnessFactor !== void 0 ? _.roughnessFactor : 1, _.metallicRoughnessTexture !== void 0 && (y.push(i.assignTexture(p, "metalnessMap", _.metallicRoughnessTexture)), y.push(i.assignTexture(p, "roughnessMap", _.metallicRoughnessTexture))), l = this._invokeOne(function(P) {
1615
- return P.getMaterialType && P.getMaterialType(r);
1615
+ return P.getMaterialType && P.getMaterialType(s);
1616
1616
  }), y.push(Promise.all(this._invokeAll(function(P) {
1617
- return P.extendMaterialParams && P.extendMaterialParams(r, p);
1617
+ return P.extendMaterialParams && P.extendMaterialParams(s, p);
1618
1618
  })));
1619
1619
  }
1620
1620
  c.doubleSided === !0 && (p.side = qi);
@@ -1629,7 +1629,7 @@ class $o {
1629
1629
  }
1630
1630
  return c.emissiveTexture !== void 0 && l !== Jt && y.push(i.assignTexture(p, "emissiveMap", c.emissiveTexture, ut)), Promise.all(y).then(function() {
1631
1631
  const _ = new l(p);
1632
- return c.name && (_.name = c.name), Qe(_, c), i.associations.set(_, { materials: r }), c.extensions && At(u, _, c), _;
1632
+ return c.name && (_.name = c.name), Qe(_, c), i.associations.set(_, { materials: s }), c.extensions && At(u, _, c), _;
1633
1633
  });
1634
1634
  }
1635
1635
  /**
@@ -1639,8 +1639,8 @@ class $o {
1639
1639
  * @param {string} originalName
1640
1640
  * @return {string}
1641
1641
  */
1642
- createUniqueName(r) {
1643
- const i = Gi.sanitizeNodeName(r || "");
1642
+ createUniqueName(s) {
1643
+ const i = Gi.sanitizeNodeName(s || "");
1644
1644
  return i in this.nodeNamesUsed ? i + "_" + ++this.nodeNamesUsed[i] : (this.nodeNamesUsed[i] = 0, i);
1645
1645
  }
1646
1646
  /**
@@ -1652,7 +1652,7 @@ class $o {
1652
1652
  * @param {Array<GLTF.Primitive>} primitives
1653
1653
  * @return {Promise<Array<BufferGeometry>>}
1654
1654
  */
1655
- loadGeometries(r) {
1655
+ loadGeometries(s) {
1656
1656
  const i = this, a = this.extensions, u = this.primitiveCache;
1657
1657
  function c(p) {
1658
1658
  return a[ne.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(p, i).then(function(h) {
@@ -1660,8 +1660,8 @@ class $o {
1660
1660
  });
1661
1661
  }
1662
1662
  const l = [];
1663
- for (let p = 0, h = r.length; p < h; p++) {
1664
- const y = r[p], E = Wo(y), _ = u[E];
1663
+ for (let p = 0, h = s.length; p < h; p++) {
1664
+ const y = s[p], E = Wo(y), _ = u[E];
1665
1665
  if (_)
1666
1666
  l.push(_.promise);
1667
1667
  else {
@@ -1678,8 +1678,8 @@ class $o {
1678
1678
  * @param {number} meshIndex
1679
1679
  * @return {Promise<Group|Mesh|SkinnedMesh|Line|Points>}
1680
1680
  */
1681
- loadMesh(r) {
1682
- const i = this, a = this.json, u = this.extensions, c = a.meshes[r], l = c.primitives, p = [];
1681
+ loadMesh(s) {
1682
+ const i = this, a = this.json, u = this.extensions, c = a.meshes[s], l = c.primitives, p = [];
1683
1683
  for (let h = 0, y = l.length; h < y; h++) {
1684
1684
  const E = l[h].material === void 0 ? zo(this.cache) : this.getDependency("material", l[h].material);
1685
1685
  p.push(E);
@@ -1702,17 +1702,17 @@ class $o {
1702
1702
  W = new Yi(X, Z);
1703
1703
  else
1704
1704
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + H.mode);
1705
- Object.keys(W.geometry.morphAttributes).length > 0 && Xo(W, c), W.name = i.createUniqueName(c.name || "mesh_" + r), Qe(W, c), H.extensions && At(u, W, H), i.assignFinalMaterial(W), _.push(W);
1705
+ Object.keys(W.geometry.morphAttributes).length > 0 && Xo(W, c), W.name = i.createUniqueName(c.name || "mesh_" + s), Qe(W, c), H.extensions && At(u, W, H), i.assignFinalMaterial(W), _.push(W);
1706
1706
  }
1707
1707
  for (let L = 0, q = _.length; L < q; L++)
1708
1708
  i.associations.set(_[L], {
1709
- meshes: r,
1709
+ meshes: s,
1710
1710
  primitives: L
1711
1711
  });
1712
1712
  if (_.length === 1)
1713
1713
  return c.extensions && At(u, _[0], c), _[0];
1714
1714
  const P = new xr();
1715
- c.extensions && At(u, P, c), i.associations.set(P, { meshes: r });
1715
+ c.extensions && At(u, P, c), i.associations.set(P, { meshes: s });
1716
1716
  for (let L = 0, q = _.length; L < q; L++)
1717
1717
  P.add(_[L]);
1718
1718
  return P;
@@ -1725,9 +1725,9 @@ class $o {
1725
1725
  * @param {number} cameraIndex
1726
1726
  * @return {Promise<THREE.Camera>}
1727
1727
  */
1728
- loadCamera(r) {
1728
+ loadCamera(s) {
1729
1729
  let i;
1730
- const a = this.json.cameras[r], u = a[a.type];
1730
+ const a = this.json.cameras[s], u = a[a.type];
1731
1731
  if (!u) {
1732
1732
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
1733
1733
  return;
@@ -1741,8 +1741,8 @@ class $o {
1741
1741
  * @param {number} skinIndex
1742
1742
  * @return {Promise<Skeleton>}
1743
1743
  */
1744
- loadSkin(r) {
1745
- const i = this.json.skins[r], a = [];
1744
+ loadSkin(s) {
1745
+ const i = this.json.skins[s], a = [];
1746
1746
  for (let u = 0, c = i.joints.length; u < c; u++)
1747
1747
  a.push(this._loadNodeShallow(i.joints[u]));
1748
1748
  return i.inverseBindMatrices !== void 0 ? a.push(this.getDependency("accessor", i.inverseBindMatrices)) : a.push(null), Promise.all(a).then(function(u) {
@@ -1766,8 +1766,8 @@ class $o {
1766
1766
  * @param {number} animationIndex
1767
1767
  * @return {Promise<AnimationClip>}
1768
1768
  */
1769
- loadAnimation(r) {
1770
- const i = this.json, a = this, u = i.animations[r], c = u.name ? u.name : "animation_" + r, l = [], p = [], h = [], y = [], E = [];
1769
+ loadAnimation(s) {
1770
+ const i = this.json, a = this, u = i.animations[s], c = u.name ? u.name : "animation_" + s, l = [], p = [], h = [], y = [], E = [];
1771
1771
  for (let _ = 0, P = u.channels.length; _ < P; _++) {
1772
1772
  const L = u.channels[_], q = u.samplers[L.sampler], X = L.target, H = X.node, W = u.parameters !== void 0 ? u.parameters[q.input] : q.input, Z = u.parameters !== void 0 ? u.parameters[q.output] : q.output;
1773
1773
  X.node !== void 0 && (l.push(this.getDependency("node", H)), p.push(this.getDependency("accessor", W)), h.push(this.getDependency("accessor", Z)), y.push(q), E.push(X));
@@ -1792,8 +1792,8 @@ class $o {
1792
1792
  return new Ji(c, void 0, W);
1793
1793
  });
1794
1794
  }
1795
- createNodeMesh(r) {
1796
- const i = this.json, a = this, u = i.nodes[r];
1795
+ createNodeMesh(s) {
1796
+ const i = this.json, a = this, u = i.nodes[s];
1797
1797
  return u.mesh === void 0 ? null : a.getDependency("mesh", u.mesh).then(function(c) {
1798
1798
  const l = a._getNodeRef(a.meshCache, u.mesh, c);
1799
1799
  return u.weights !== void 0 && l.traverse(function(p) {
@@ -1810,8 +1810,8 @@ class $o {
1810
1810
  * @param {number} nodeIndex
1811
1811
  * @return {Promise<Object3D>}
1812
1812
  */
1813
- loadNode(r) {
1814
- const i = this.json, a = this, u = i.nodes[r], c = a._loadNodeShallow(r), l = [], p = u.children || [];
1813
+ loadNode(s) {
1814
+ const i = this.json, a = this, u = i.nodes[s], c = a._loadNodeShallow(s), l = [], p = u.children || [];
1815
1815
  for (let y = 0, E = p.length; y < E; y++)
1816
1816
  l.push(a.getDependency("node", p[y]));
1817
1817
  const h = u.skin === void 0 ? Promise.resolve(null) : a.getDependency("skin", u.skin);
@@ -1831,20 +1831,20 @@ class $o {
1831
1831
  }
1832
1832
  // ._loadNodeShallow() parses a single node.
1833
1833
  // skin and child nodes are created and added in .loadNode() (no '_' prefix).
1834
- _loadNodeShallow(r) {
1834
+ _loadNodeShallow(s) {
1835
1835
  const i = this.json, a = this.extensions, u = this;
1836
- if (this.nodeCache[r] !== void 0)
1837
- return this.nodeCache[r];
1838
- const c = i.nodes[r], l = c.name ? u.createUniqueName(c.name) : "", p = [], h = u._invokeOne(function(y) {
1839
- return y.createNodeMesh && y.createNodeMesh(r);
1836
+ if (this.nodeCache[s] !== void 0)
1837
+ return this.nodeCache[s];
1838
+ const c = i.nodes[s], l = c.name ? u.createUniqueName(c.name) : "", p = [], h = u._invokeOne(function(y) {
1839
+ return y.createNodeMesh && y.createNodeMesh(s);
1840
1840
  });
1841
1841
  return h && p.push(h), c.camera !== void 0 && p.push(u.getDependency("camera", c.camera).then(function(y) {
1842
1842
  return u._getNodeRef(u.cameraCache, c.camera, y);
1843
1843
  })), u._invokeAll(function(y) {
1844
- return y.createNodeAttachment && y.createNodeAttachment(r);
1844
+ return y.createNodeAttachment && y.createNodeAttachment(s);
1845
1845
  }).forEach(function(y) {
1846
1846
  p.push(y);
1847
- }), this.nodeCache[r] = Promise.all(p).then(function(y) {
1847
+ }), this.nodeCache[s] = Promise.all(p).then(function(y) {
1848
1848
  let E;
1849
1849
  if (c.isBone === !0 ? E = new Zi() : y.length > 1 ? E = new xr() : y.length === 1 ? E = y[0] : E = new Ks(), E !== y[0])
1850
1850
  for (let _ = 0, P = y.length; _ < P; _++)
@@ -1854,8 +1854,8 @@ class $o {
1854
1854
  _.fromArray(c.matrix), E.applyMatrix4(_);
1855
1855
  } else
1856
1856
  c.translation !== void 0 && E.position.fromArray(c.translation), c.rotation !== void 0 && E.quaternion.fromArray(c.rotation), c.scale !== void 0 && E.scale.fromArray(c.scale);
1857
- return u.associations.has(E) || u.associations.set(E, {}), u.associations.get(E).nodes = r, E;
1858
- }), this.nodeCache[r];
1857
+ return u.associations.has(E) || u.associations.set(E, {}), u.associations.get(E).nodes = s, E;
1858
+ }), this.nodeCache[s];
1859
1859
  }
1860
1860
  /**
1861
1861
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#scenes
@@ -1864,8 +1864,8 @@ class $o {
1864
1864
  * @param {number} sceneIndex
1865
1865
  * @return {Promise<Group>}
1866
1866
  */
1867
- loadScene(r) {
1868
- const i = this.extensions, a = this.json.scenes[r], u = this, c = new xr();
1867
+ loadScene(s) {
1868
+ const i = this.extensions, a = this.json.scenes[s], u = this, c = new xr();
1869
1869
  a.name && (c.name = u.createUniqueName(a.name)), Qe(c, a), a.extensions && At(i, c, a);
1870
1870
  const l = a.nodes || [], p = [];
1871
1871
  for (let h = 0, y = l.length; h < y; h++)
@@ -1885,9 +1885,9 @@ class $o {
1885
1885
  return u.associations = y(c), c;
1886
1886
  });
1887
1887
  }
1888
- _createAnimationTracks(r, i, a, u, c) {
1889
- const l = [], p = r.name ? r.name : r.uuid, h = [];
1890
- at[c.path] === at.weights ? r.traverse(function(P) {
1888
+ _createAnimationTracks(s, i, a, u, c) {
1889
+ const l = [], p = s.name ? s.name : s.uuid, h = [];
1890
+ at[c.path] === at.weights ? s.traverse(function(P) {
1891
1891
  P.morphTargetInfluences && h.push(P.name ? P.name : P.uuid);
1892
1892
  }) : h.push(p);
1893
1893
  let y;
@@ -1927,9 +1927,9 @@ class $o {
1927
1927
  }
1928
1928
  return l;
1929
1929
  }
1930
- _getArrayFromAccessor(r) {
1931
- let i = r.array;
1932
- if (r.normalized) {
1930
+ _getArrayFromAccessor(s) {
1931
+ let i = s.array;
1932
+ if (s.normalized) {
1933
1933
  const a = Lr(i.constructor), u = new Float32Array(i.length);
1934
1934
  for (let c = 0, l = i.length; c < l; c++)
1935
1935
  u[c] = i[c] * a;
@@ -1937,15 +1937,15 @@ class $o {
1937
1937
  }
1938
1938
  return i;
1939
1939
  }
1940
- _createCubicSplineTrackInterpolant(r) {
1941
- r.createInterpolant = function(a) {
1940
+ _createCubicSplineTrackInterpolant(s) {
1941
+ s.createInterpolant = function(a) {
1942
1942
  const u = this instanceof _s ? Go : Xs;
1943
1943
  return new u(this.times, this.values, this.getValueSize() / 3, a);
1944
- }, r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
1944
+ }, s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
1945
1945
  }
1946
1946
  }
1947
- function Jo(C, r, i) {
1948
- const a = r.attributes, u = new jn();
1947
+ function Jo(C, s, i) {
1948
+ const a = s.attributes, u = new jn();
1949
1949
  if (a.POSITION !== void 0) {
1950
1950
  const p = i.json.accessors[a.POSITION], h = p.min, y = p.max;
1951
1951
  if (h !== void 0 && y !== void 0) {
@@ -1962,7 +1962,7 @@ function Jo(C, r, i) {
1962
1962
  }
1963
1963
  } else
1964
1964
  return;
1965
- const c = r.targets;
1965
+ const c = s.targets;
1966
1966
  if (c !== void 0) {
1967
1967
  const p = new le(), h = new le();
1968
1968
  for (let y = 0, E = c.length; y < E; y++) {
@@ -1985,8 +1985,8 @@ function Jo(C, r, i) {
1985
1985
  const l = new ro();
1986
1986
  u.getCenter(l.center), l.radius = u.min.distanceTo(u.max) / 2, C.boundingSphere = l;
1987
1987
  }
1988
- function Rs(C, r, i) {
1989
- const a = r.attributes, u = [];
1988
+ function Rs(C, s, i) {
1989
+ const a = s.attributes, u = [];
1990
1990
  function c(l, p) {
1991
1991
  return i.getDependency("accessor", l).then(function(h) {
1992
1992
  C.setAttribute(p, h);
@@ -1996,14 +1996,14 @@ function Rs(C, r, i) {
1996
1996
  const p = Ir[l] || l.toLowerCase();
1997
1997
  p in C.attributes || u.push(c(a[l], p));
1998
1998
  }
1999
- if (r.indices !== void 0 && !C.index) {
2000
- const l = i.getDependency("accessor", r.indices).then(function(p) {
1999
+ if (s.indices !== void 0 && !C.index) {
2000
+ const l = i.getDependency("accessor", s.indices).then(function(p) {
2001
2001
  C.setIndex(p);
2002
2002
  });
2003
2003
  u.push(l);
2004
2004
  }
2005
- return Mr.workingColorSpace !== Ge && "COLOR_0" in a && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Mr.workingColorSpace}" not supported.`), Qe(C, r), Jo(C, r, i), Promise.all(u).then(function() {
2006
- return r.targets !== void 0 ? Vo(C, r.targets, i) : C;
2005
+ return Mr.workingColorSpace !== Ge && "COLOR_0" in a && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Mr.workingColorSpace}" not supported.`), Qe(C, s), Jo(C, s, i), Promise.all(u).then(function() {
2006
+ return s.targets !== void 0 ? Vo(C, s.targets, i) : C;
2007
2007
  });
2008
2008
  }
2009
2009
  const se = {
@@ -2029,8 +2029,8 @@ class Dr {
2029
2029
  * @param {Vector3} [halfSize] - Positive halfwidth extents of the OBB along each axis.
2030
2030
  * @param {Matrix3} [rotation] - The rotation of the OBB.
2031
2031
  */
2032
- constructor(r = new le(), i = new le(), a = new zs()) {
2033
- this.center = r, this.halfSize = i, this.rotation = a;
2032
+ constructor(s = new le(), i = new le(), a = new zs()) {
2033
+ this.center = s, this.halfSize = i, this.rotation = a;
2034
2034
  }
2035
2035
  /**
2036
2036
  * Sets the OBBs components to the given values.
@@ -2040,8 +2040,8 @@ class Dr {
2040
2040
  * @param {Matrix3} [rotation] - The rotation of the OBB.
2041
2041
  * @return {OBB} A reference to this OBB.
2042
2042
  */
2043
- set(r, i, a) {
2044
- return this.center = r, this.halfSize = i, this.rotation = a, this;
2043
+ set(s, i, a) {
2044
+ return this.center = s, this.halfSize = i, this.rotation = a, this;
2045
2045
  }
2046
2046
  /**
2047
2047
  * Copies the values of the given OBB to this instance.
@@ -2049,8 +2049,8 @@ class Dr {
2049
2049
  * @param {OBB} obb - The OBB to copy.
2050
2050
  * @return {OBB} A reference to this OBB.
2051
2051
  */
2052
- copy(r) {
2053
- return this.center.copy(r.center), this.halfSize.copy(r.halfSize), this.rotation.copy(r.rotation), this;
2052
+ copy(s) {
2053
+ return this.center.copy(s.center), this.halfSize.copy(s.halfSize), this.rotation.copy(s.rotation), this;
2054
2054
  }
2055
2055
  /**
2056
2056
  * Returns a new OBB with copied values from this instance.
@@ -2066,8 +2066,8 @@ class Dr {
2066
2066
  * @param {Vector3} target - The target vector that is used to store the method's result.
2067
2067
  * @return {Vector3} The size.
2068
2068
  */
2069
- getSize(r) {
2070
- return r.copy(this.halfSize).multiplyScalar(2);
2069
+ getSize(s) {
2070
+ return s.copy(this.halfSize).multiplyScalar(2);
2071
2071
  }
2072
2072
  /**
2073
2073
  * Clamps the given point within the bounds of this OBB.
@@ -2076,9 +2076,9 @@ class Dr {
2076
2076
  * @param {Vector3} target - The target vector that is used to store the method's result.
2077
2077
  * @returns {Vector3} - The clamped point.
2078
2078
  */
2079
- clampPoint(r, i) {
2079
+ clampPoint(s, i) {
2080
2080
  const a = this.halfSize;
2081
- be.subVectors(r, this.center), this.rotation.extractBasis(xt, Tt, Et), i.copy(this.center);
2081
+ be.subVectors(s, this.center), this.rotation.extractBasis(xt, Tt, Et), i.copy(this.center);
2082
2082
  const u = It.clamp(be.dot(xt), -a.x, a.x);
2083
2083
  i.add(xt.multiplyScalar(u));
2084
2084
  const c = It.clamp(be.dot(Tt), -a.y, a.y);
@@ -2092,8 +2092,8 @@ class Dr {
2092
2092
  * @param {Vector3} point - The point to test.
2093
2093
  * @returns {boolean} - Whether the given point lies within this OBB or not.
2094
2094
  */
2095
- containsPoint(r) {
2096
- return be.subVectors(r, this.center), this.rotation.extractBasis(xt, Tt, Et), Math.abs(be.dot(xt)) <= this.halfSize.x && Math.abs(be.dot(Tt)) <= this.halfSize.y && Math.abs(be.dot(Et)) <= this.halfSize.z;
2095
+ containsPoint(s) {
2096
+ return be.subVectors(s, this.center), this.rotation.extractBasis(xt, Tt, Et), Math.abs(be.dot(xt)) <= this.halfSize.x && Math.abs(be.dot(Tt)) <= this.halfSize.y && Math.abs(be.dot(Et)) <= this.halfSize.z;
2097
2097
  }
2098
2098
  /**
2099
2099
  * Returns `true` if the given AABB intersects this OBB.
@@ -2101,8 +2101,8 @@ class Dr {
2101
2101
  * @param {Box3} box3 - The AABB to test.
2102
2102
  * @returns {boolean} - Whether the given AABB intersects this OBB or not.
2103
2103
  */
2104
- intersectsBox3(r) {
2105
- return this.intersectsOBB(Zo.fromBox3(r));
2104
+ intersectsBox3(s) {
2105
+ return this.intersectsOBB(Zo.fromBox3(s));
2106
2106
  }
2107
2107
  /**
2108
2108
  * Returns `true` if the given bounding sphere intersects this OBB.
@@ -2110,8 +2110,8 @@ class Dr {
2110
2110
  * @param {Sphere} sphere - The bounding sphere to test.
2111
2111
  * @returns {boolean} - Whether the given bounding sphere intersects this OBB or not.
2112
2112
  */
2113
- intersectsSphere(r) {
2114
- return this.clampPoint(r.center, Os), Os.distanceToSquared(r.center) <= r.radius * r.radius;
2113
+ intersectsSphere(s) {
2114
+ return this.clampPoint(s.center, Os), Os.distanceToSquared(s.center) <= s.radius * s.radius;
2115
2115
  }
2116
2116
  /**
2117
2117
  * Returns `true` if the given OBB intersects this OBB.
@@ -2120,8 +2120,8 @@ class Dr {
2120
2120
  * @param {number} [epsilon=Number.EPSILON] - A small value to prevent arithmetic errors.
2121
2121
  * @returns {boolean} - Whether the given OBB intersects this OBB or not.
2122
2122
  */
2123
- intersectsOBB(r, i = Number.EPSILON) {
2124
- se.c = this.center, se.e[0] = this.halfSize.x, se.e[1] = this.halfSize.y, se.e[2] = this.halfSize.z, this.rotation.extractBasis(se.u[0], se.u[1], se.u[2]), oe.c = r.center, oe.e[0] = r.halfSize.x, oe.e[1] = r.halfSize.y, oe.e[2] = r.halfSize.z, r.rotation.extractBasis(oe.u[0], oe.u[1], oe.u[2]);
2123
+ intersectsOBB(s, i = Number.EPSILON) {
2124
+ se.c = this.center, se.e[0] = this.halfSize.x, se.e[1] = this.halfSize.y, se.e[2] = this.halfSize.z, this.rotation.extractBasis(se.u[0], se.u[1], se.u[2]), oe.c = s.center, oe.e[0] = s.halfSize.x, oe.e[1] = s.halfSize.y, oe.e[2] = s.halfSize.z, s.rotation.extractBasis(oe.u[0], oe.u[1], oe.u[2]);
2125
2125
  for (let c = 0; c < 3; c++)
2126
2126
  for (let l = 0; l < 3; l++)
2127
2127
  pe[c][l] = se.u[c].dot(oe.u[l]);
@@ -2142,9 +2142,9 @@ class Dr {
2142
2142
  * @param {Plane} plane - The plane to test.
2143
2143
  * @returns {boolean} Whether the given plane intersects this OBB or not.
2144
2144
  */
2145
- intersectsPlane(r) {
2145
+ intersectsPlane(s) {
2146
2146
  this.rotation.extractBasis(xt, Tt, Et);
2147
- const i = this.halfSize.x * Math.abs(r.normal.dot(xt)) + this.halfSize.y * Math.abs(r.normal.dot(Tt)) + this.halfSize.z * Math.abs(r.normal.dot(Et)), a = r.normal.dot(this.center) - r.constant;
2147
+ const i = this.halfSize.x * Math.abs(s.normal.dot(xt)) + this.halfSize.y * Math.abs(s.normal.dot(Tt)) + this.halfSize.z * Math.abs(s.normal.dot(Et)), a = s.normal.dot(this.center) - s.constant;
2148
2148
  return Math.abs(a) <= i;
2149
2149
  }
2150
2150
  /**
@@ -2155,8 +2155,8 @@ class Dr {
2155
2155
  * @param {Vector3} target - The target vector that is used to store the method's result.
2156
2156
  * @return {?Vector3} The intersection point. If no intersection is detected, `null` is returned.
2157
2157
  */
2158
- intersectRay(r, i) {
2159
- return this.getSize(ks), Ms.setFromCenterAndSize(be.set(0, 0, 0), ks), In.setFromMatrix3(this.rotation), In.setPosition(this.center), Ps.copy(In).invert(), Cs.copy(r).applyMatrix4(Ps), Cs.intersectBox(Ms, i) ? i.applyMatrix4(In) : null;
2158
+ intersectRay(s, i) {
2159
+ return this.getSize(ks), Ms.setFromCenterAndSize(be.set(0, 0, 0), ks), In.setFromMatrix3(this.rotation), In.setPosition(this.center), Ps.copy(In).invert(), Cs.copy(s).applyMatrix4(Ps), Cs.intersectBox(Ms, i) ? i.applyMatrix4(In) : null;
2160
2160
  }
2161
2161
  /**
2162
2162
  * Returns `true` if the given ray intersects this OBB.
@@ -2164,8 +2164,8 @@ class Dr {
2164
2164
  * @param {Ray} ray - The ray to test.
2165
2165
  * @returns {boolean} Whether the given ray intersects this OBB or not.
2166
2166
  */
2167
- intersectsRay(r) {
2168
- return this.intersectRay(r, be) !== null;
2167
+ intersectsRay(s) {
2168
+ return this.intersectRay(s, be) !== null;
2169
2169
  }
2170
2170
  /**
2171
2171
  * Defines an OBB based on the given AABB.
@@ -2173,8 +2173,8 @@ class Dr {
2173
2173
  * @param {Box3} box3 - The AABB to setup the OBB from.
2174
2174
  * @return {OBB} A reference of this OBB.
2175
2175
  */
2176
- fromBox3(r) {
2177
- return r.getCenter(this.center), r.getSize(this.halfSize).multiplyScalar(0.5), this.rotation.identity(), this;
2176
+ fromBox3(s) {
2177
+ return s.getCenter(this.center), s.getSize(this.halfSize).multiplyScalar(0.5), this.rotation.identity(), this;
2178
2178
  }
2179
2179
  /**
2180
2180
  * Returns `true` if the given OBB is equal to this OBB.
@@ -2182,8 +2182,8 @@ class Dr {
2182
2182
  * @param {OBB} obb - The OBB to test.
2183
2183
  * @returns {boolean} Whether the given OBB is equal to this OBB or not.
2184
2184
  */
2185
- equals(r) {
2186
- return r.center.equals(this.center) && r.halfSize.equals(this.halfSize) && r.rotation.equals(this.rotation);
2185
+ equals(s) {
2186
+ return s.center.equals(this.center) && s.halfSize.equals(this.halfSize) && s.rotation.equals(this.rotation);
2187
2187
  }
2188
2188
  /**
2189
2189
  * Applies the given transformation matrix to this OBB. This method can be
@@ -2193,13 +2193,13 @@ class Dr {
2193
2193
  * @param {Matrix4} matrix - The matrix to apply.
2194
2194
  * @return {OBB} A reference of this OBB.
2195
2195
  */
2196
- applyMatrix4(r) {
2197
- const i = r.elements;
2196
+ applyMatrix4(s) {
2197
+ const i = s.elements;
2198
2198
  let a = be.set(i[0], i[1], i[2]).length();
2199
2199
  const u = be.set(i[4], i[5], i[6]).length(), c = be.set(i[8], i[9], i[10]).length();
2200
- r.determinant() < 0 && (a = -a), De.setFromMatrix4(r);
2200
+ s.determinant() < 0 && (a = -a), De.setFromMatrix4(s);
2201
2201
  const p = 1 / a, h = 1 / u, y = 1 / c;
2202
- return De.elements[0] *= p, De.elements[1] *= p, De.elements[2] *= p, De.elements[3] *= h, De.elements[4] *= h, De.elements[5] *= h, De.elements[6] *= y, De.elements[7] *= y, De.elements[8] *= y, this.rotation.multiply(De), this.halfSize.x *= a, this.halfSize.y *= u, this.halfSize.z *= c, be.setFromMatrixPosition(r), this.center.add(be), this;
2202
+ return De.elements[0] *= p, De.elements[1] *= p, De.elements[2] *= p, De.elements[3] *= h, De.elements[4] *= h, De.elements[5] *= h, De.elements[6] *= y, De.elements[7] *= y, De.elements[8] *= y, this.rotation.multiply(De), this.halfSize.x *= a, this.halfSize.y *= u, this.halfSize.z *= c, be.setFromMatrixPosition(s), this.center.add(be), this;
2203
2203
  }
2204
2204
  }
2205
2205
  const Zo = new Dr(), ea = {
@@ -2210,7 +2210,7 @@ const Zo = new Dr(), ea = {
2210
2210
  maxDistance: 1e3,
2211
2211
  maxPolarAngle: It.degToRad(60)
2212
2212
  };
2213
- function la(C, r) {
2213
+ function la(C, s) {
2214
2214
  const i = Object.assign(
2215
2215
  {
2216
2216
  css3d: !1,
@@ -2221,7 +2221,7 @@ function la(C, r) {
2221
2221
  options: {}
2222
2222
  }
2223
2223
  },
2224
- r || {}
2224
+ s || {}
2225
2225
  );
2226
2226
  let a, u, c, l = [];
2227
2227
  const p = Tr(!1), h = uo(), y = Tr(0), E = Tr(0), _ = new io({
@@ -2272,7 +2272,7 @@ function la(C, r) {
2272
2272
  function ae() {
2273
2273
  As(() => {
2274
2274
  const me = Le();
2275
- y.value = me[0], E.value = me[1], L.aspect = y.value / E.value, L.fov = 360 / Math.PI * Math.atan(q * (E.value / y.value)), L.updateProjectionMatrix(), L.lookAt(P.position), _.setSize(y.value, E.value), c && c.setSize(y.value, E.value), _.render(P, L);
2275
+ y.value = me[0], E.value = me[1], L.aspect = y.value / E.value, L.fov = 360 / Math.PI * Math.atan(q * (E.value / y.value)), L.updateProjectionMatrix(), L.lookAt(P.position), _.setSize(y.value, E.value), _.render(P, L), c && c.setSize(y.value, E.value);
2276
2276
  });
2277
2277
  }
2278
2278
  function Le() {
@@ -2328,6 +2328,7 @@ function la(C, r) {
2328
2328
  addAnimate: ce,
2329
2329
  frameArea: Je,
2330
2330
  onRender: Ae,
2331
+ css3dRenderer: c,
2331
2332
  scene: P,
2332
2333
  camera: L,
2333
2334
  control: h,
@@ -2338,8 +2339,8 @@ function la(C, r) {
2338
2339
  };
2339
2340
  }
2340
2341
  const fa = (C = "app") => {
2341
- const r = new ao();
2342
- r.params.Line.threshold = 8;
2342
+ const s = new ao();
2343
+ s.params.Line.threshold = 8;
2343
2344
  const i = new Fr(), a = document.getElementById(C);
2344
2345
  function u(p, h) {
2345
2346
  const { scaleX: y, scaleY: E } = l(a), { clientWidth: _, clientHeight: P } = h, L = h.getBoundingClientRect(), q = _ * y, X = P * E, H = p.clientX - L.left, W = p.clientY - L.top;
@@ -2347,7 +2348,7 @@ const fa = (C = "app") => {
2347
2348
  }
2348
2349
  function c(p, h, y, E) {
2349
2350
  const { pointer: _, x: P, y: L } = u(p, h);
2350
- return r.setFromCamera(_, y), { intersects: r.intersectObjects(E), pointer: _, x: P, y: L };
2351
+ return s.setFromCamera(_, y), { intersects: s.intersectObjects(E), pointer: _, x: P, y: L };
2351
2352
  }
2352
2353
  function l(p) {
2353
2354
  const h = window.getComputedStyle(p), y = h.transform || h.webkitTransform || h.mozTransform;
@@ -2361,7 +2362,7 @@ const fa = (C = "app") => {
2361
2362
  return { scaleX: 1, scaleY: 1 };
2362
2363
  }
2363
2364
  return {
2364
- raycaster: r,
2365
+ raycaster: s,
2365
2366
  pointer: i,
2366
2367
  getPointer: u,
2367
2368
  getScale: l,
@@ -2370,7 +2371,7 @@ const fa = (C = "app") => {
2370
2371
  }, Ye = [], ha = new $e(16711680), da = () => {
2371
2372
  const C = () => {
2372
2373
  Ye.splice(0);
2373
- }, r = (p, h) => {
2374
+ }, s = (p, h) => {
2374
2375
  h.traverse((y) => {
2375
2376
  y && i(p, y);
2376
2377
  });
@@ -2385,7 +2386,7 @@ const fa = (C = "app") => {
2385
2386
  };
2386
2387
  return {
2387
2388
  resetObbs: C,
2388
- initObb: r,
2389
+ initObb: s,
2389
2390
  getObbObjectByParentUid: (p) => Ye.filter((h) => h.parentUid === p),
2390
2391
  addObbFromArray: (p, h) => {
2391
2392
  for (let y = 0, E = h.length; y < E; y++)
@@ -2407,25 +2408,25 @@ function na(C) {
2407
2408
  }
2408
2409
  var Dn = { exports: {} }, ra = Dn.exports, Is;
2409
2410
  function sa() {
2410
- return Is || (Is = 1, function(C, r) {
2411
+ return Is || (Is = 1, function(C, s) {
2411
2412
  (function(i, a) {
2412
2413
  C.exports = a();
2413
2414
  })(ra, function() {
2414
2415
  var i = function(e, t) {
2415
- return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, s) {
2416
- n.__proto__ = s;
2417
- } || function(n, s) {
2418
- for (var o in s) Object.prototype.hasOwnProperty.call(s, o) && (n[o] = s[o]);
2416
+ return (i = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, r) {
2417
+ n.__proto__ = r;
2418
+ } || function(n, r) {
2419
+ for (var o in r) Object.prototype.hasOwnProperty.call(r, o) && (n[o] = r[o]);
2419
2420
  })(e, t);
2420
2421
  }, a = function() {
2421
2422
  return (a = Object.assign || function(e) {
2422
- for (var t, n = 1, s = arguments.length; n < s; n++) for (var o in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
2423
+ for (var t, n = 1, r = arguments.length; n < r; n++) for (var o in t = arguments[n]) Object.prototype.hasOwnProperty.call(t, o) && (e[o] = t[o]);
2423
2424
  return e;
2424
2425
  }).apply(this, arguments);
2425
2426
  };
2426
2427
  function u(e, t, n) {
2427
- for (var s, o = 0, f = t.length; o < f; o++) !s && o in t || ((s = s || Array.prototype.slice.call(t, 0, o))[o] = t[o]);
2428
- return e.concat(s || Array.prototype.slice.call(t));
2428
+ for (var r, o = 0, f = t.length; o < f; o++) !r && o in t || ((r = r || Array.prototype.slice.call(t, 0, o))[o] = t[o]);
2429
+ return e.concat(r || Array.prototype.slice.call(t));
2429
2430
  }
2430
2431
  var c = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : ta, l = Object.keys, p = Array.isArray;
2431
2432
  function h(e, t) {
@@ -2444,8 +2445,8 @@ function sa() {
2444
2445
  });
2445
2446
  }
2446
2447
  var L = Object.defineProperty;
2447
- function q(e, t, n, s) {
2448
- L(e, t, h(n && _(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, s));
2448
+ function q(e, t, n, r) {
2449
+ L(e, t, h(n && _(n, "get") && typeof n.get == "function" ? { get: n.get, set: n.set, configurable: !0 } : { value: n, configurable: !0, writable: !0 }, r));
2449
2450
  }
2450
2451
  function X(e) {
2451
2452
  return { from: function(t) {
@@ -2469,8 +2470,8 @@ function sa() {
2469
2470
  if (typeof t == "string" && _(e, t)) return e[t];
2470
2471
  if (!t) return e;
2471
2472
  if (typeof t != "string") {
2472
- for (var n = [], s = 0, o = t.length; s < o; ++s) {
2473
- var f = ve(e, t[s]);
2473
+ for (var n = [], r = 0, o = t.length; r < o; ++r) {
2474
+ var f = ve(e, t[r]);
2474
2475
  n.push(f);
2475
2476
  }
2476
2477
  return n;
@@ -2484,7 +2485,7 @@ function sa() {
2484
2485
  function ae(e, t, n) {
2485
2486
  if (e && t !== void 0 && !("isFrozen" in Object && Object.isFrozen(e))) if (typeof t != "string" && "length" in t) {
2486
2487
  Y(typeof n != "string" && "length" in n);
2487
- for (var s = 0, o = t.length; s < o; ++s) ae(e, t[s], n[s]);
2488
+ for (var r = 0, o = t.length; r < o; ++r) ae(e, t[r], n[r]);
2488
2489
  } else {
2489
2490
  var f, d, m = t.indexOf(".");
2490
2491
  m !== -1 ? (f = t.substr(0, m), (d = t.substr(m + 1)) === "" ? n === void 0 ? p(e) && !isNaN(parseInt(f)) ? e.splice(f, 1) : delete e[f] : e[f] = n : ae(m = !(m = e[f]) || !_(e, f) ? e[f] = {} : m, d, n)) : n === void 0 ? p(e) && !isNaN(parseInt(t)) ? e.splice(t, 1) : delete e[t] : e[t] = n;
@@ -2511,17 +2512,17 @@ function sa() {
2511
2512
  function me(e) {
2512
2513
  return ct = /* @__PURE__ */ new WeakMap(), e = function t(n) {
2513
2514
  if (!n || typeof n != "object") return n;
2514
- var s = ct.get(n);
2515
- if (s) return s;
2515
+ var r = ct.get(n);
2516
+ if (r) return r;
2516
2517
  if (p(n)) {
2517
- s = [], ct.set(n, s);
2518
- for (var o = 0, f = n.length; o < f; ++o) s.push(t(n[o]));
2519
- } else if (tn.has(n.constructor)) s = n;
2518
+ r = [], ct.set(n, r);
2519
+ for (var o = 0, f = n.length; o < f; ++o) r.push(t(n[o]));
2520
+ } else if (tn.has(n.constructor)) r = n;
2520
2521
  else {
2521
2522
  var d, m = y(n);
2522
- for (d in s = m === Object.prototype ? {} : Object.create(m), ct.set(n, s), n) _(n, d) && (s[d] = t(n[d]));
2523
+ for (d in r = m === Object.prototype ? {} : Object.create(m), ct.set(n, r), n) _(n, d) && (r[d] = t(n[d]));
2523
2524
  }
2524
- return s;
2525
+ return r;
2525
2526
  }(e), ct = null, e;
2526
2527
  }
2527
2528
  var Ne = {}.toString;
@@ -2539,12 +2540,12 @@ function sa() {
2539
2540
  }
2540
2541
  var Ve = {};
2541
2542
  function xe(e) {
2542
- var t, n, s, o;
2543
+ var t, n, r, o;
2543
2544
  if (arguments.length === 1) {
2544
2545
  if (p(e)) return e.slice();
2545
2546
  if (this === Ve && typeof e == "string") return [e];
2546
2547
  if (o = nn(e)) {
2547
- for (n = []; !(s = o.next()).done; ) n.push(s.value);
2548
+ for (n = []; !(r = o.next()).done; ) n.push(r.value);
2548
2549
  return n;
2549
2550
  }
2550
2551
  if (e == null) return [e];
@@ -2566,13 +2567,13 @@ function sa() {
2566
2567
  function sn(e, t) {
2567
2568
  return e + ". Errors: " + Object.keys(t).map(function(n) {
2568
2569
  return t[n].toString();
2569
- }).filter(function(n, s, o) {
2570
- return o.indexOf(n) === s;
2570
+ }).filter(function(n, r, o) {
2571
+ return o.indexOf(n) === r;
2571
2572
  }).join(`
2572
2573
  `);
2573
2574
  }
2574
- function Nt(e, t, n, s) {
2575
- this.failures = t, this.failedKeys = s, this.successCount = n, this.message = sn(e, t);
2575
+ function Nt(e, t, n, r) {
2576
+ this.failures = t, this.failedKeys = r, this.successCount = n, this.message = sn(e, t);
2576
2577
  }
2577
2578
  function je(e, t) {
2578
2579
  this.name = "BulkError", this.failures = Object.keys(t).map(function(n) {
@@ -2586,11 +2587,11 @@ function sa() {
2586
2587
  return e[t] = t + "Error", e;
2587
2588
  }, {}), Ws = Ze, V = Ce.reduce(function(e, t) {
2588
2589
  var n = t + "Error";
2589
- function s(o, f) {
2590
+ function r(o, f) {
2590
2591
  this.name = n, o ? typeof o == "string" ? (this.message = "".concat(o).concat(f ? `
2591
2592
  ` + f : ""), this.inner = f || null) : typeof o == "object" && (this.message = "".concat(o.name, " ").concat(o.message), this.inner = o) : (this.message = Kn[t] || n, this.inner = null);
2592
2593
  }
2593
- return X(s).from(Ws), e[t] = s, e;
2594
+ return X(r).from(Ws), e[t] = r, e;
2594
2595
  }, {});
2595
2596
  V.Syntax = SyntaxError, V.Type = TypeError, V.Range = RangeError;
2596
2597
  var jr = Kt.reduce(function(e, t) {
@@ -2617,25 +2618,25 @@ function sa() {
2617
2618
  return e === ue ? t : function() {
2618
2619
  var n = e.apply(this, arguments);
2619
2620
  n !== void 0 && (arguments[0] = n);
2620
- var s = this.onsuccess, o = this.onerror;
2621
+ var r = this.onsuccess, o = this.onerror;
2621
2622
  this.onsuccess = null, this.onerror = null;
2622
2623
  var f = t.apply(this, arguments);
2623
- return s && (this.onsuccess = this.onsuccess ? lt(s, this.onsuccess) : s), o && (this.onerror = this.onerror ? lt(o, this.onerror) : o), f !== void 0 ? f : n;
2624
+ return r && (this.onsuccess = this.onsuccess ? lt(r, this.onsuccess) : r), o && (this.onerror = this.onerror ? lt(o, this.onerror) : o), f !== void 0 ? f : n;
2624
2625
  };
2625
2626
  }
2626
2627
  function $s(e, t) {
2627
2628
  return e === ue ? t : function() {
2628
2629
  e.apply(this, arguments);
2629
- var n = this.onsuccess, s = this.onerror;
2630
- this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? lt(n, this.onsuccess) : n), s && (this.onerror = this.onerror ? lt(s, this.onerror) : s);
2630
+ var n = this.onsuccess, r = this.onerror;
2631
+ this.onsuccess = this.onerror = null, t.apply(this, arguments), n && (this.onsuccess = this.onsuccess ? lt(n, this.onsuccess) : n), r && (this.onerror = this.onerror ? lt(r, this.onerror) : r);
2631
2632
  };
2632
2633
  }
2633
2634
  function Js(e, t) {
2634
2635
  return e === ue ? t : function(n) {
2635
- var s = e.apply(this, arguments);
2636
- h(n, s);
2636
+ var r = e.apply(this, arguments);
2637
+ h(n, r);
2637
2638
  var o = this.onsuccess, f = this.onerror;
2638
- return this.onsuccess = null, this.onerror = null, n = t.apply(this, arguments), o && (this.onsuccess = this.onsuccess ? lt(o, this.onsuccess) : o), f && (this.onerror = this.onerror ? lt(f, this.onerror) : f), s === void 0 ? n === void 0 ? void 0 : n : h(s, n);
2639
+ return this.onsuccess = null, this.onerror = null, n = t.apply(this, arguments), o && (this.onsuccess = this.onsuccess ? lt(o, this.onsuccess) : o), f && (this.onerror = this.onerror ? lt(f, this.onerror) : f), r === void 0 ? n === void 0 ? void 0 : n : h(r, n);
2639
2640
  };
2640
2641
  }
2641
2642
  function Zs(e, t) {
@@ -2647,9 +2648,9 @@ function sa() {
2647
2648
  return e === ue ? t : function() {
2648
2649
  var n = e.apply(this, arguments);
2649
2650
  if (n && typeof n.then == "function") {
2650
- for (var s = this, o = arguments.length, f = new Array(o); o--; ) f[o] = arguments[o];
2651
+ for (var r = this, o = arguments.length, f = new Array(o); o--; ) f[o] = arguments[o];
2651
2652
  return n.then(function() {
2652
- return t.apply(s, f);
2653
+ return t.apply(r, f);
2653
2654
  });
2654
2655
  }
2655
2656
  return t.apply(this, arguments);
@@ -2676,27 +2677,27 @@ function sa() {
2676
2677
  if (e !== jt) throw new TypeError("Not a function");
2677
2678
  return this._state = arguments[1], this._value = arguments[2], void (this._state === !1 && zn(this, this._value));
2678
2679
  }
2679
- this._state = null, this._value = null, ++t.ref, function n(s, o) {
2680
+ this._state = null, this._value = null, ++t.ref, function n(r, o) {
2680
2681
  try {
2681
2682
  o(function(f) {
2682
- if (s._state === null) {
2683
- if (f === s) throw new TypeError("A promise cannot be resolved with itself.");
2684
- var d = s._lib && St();
2685
- f && typeof f.then == "function" ? n(s, function(m, v) {
2683
+ if (r._state === null) {
2684
+ if (f === r) throw new TypeError("A promise cannot be resolved with itself.");
2685
+ var d = r._lib && St();
2686
+ f && typeof f.then == "function" ? n(r, function(m, v) {
2686
2687
  f instanceof U ? f._then(m, v) : f.then(m, v);
2687
- }) : (s._state = !0, s._value = f, qr(s)), d && Rt();
2688
+ }) : (r._state = !0, r._value = f, qr(r)), d && Rt();
2688
2689
  }
2689
- }, zn.bind(null, s));
2690
+ }, zn.bind(null, r));
2690
2691
  } catch (f) {
2691
- zn(s, f);
2692
+ zn(r, f);
2692
2693
  }
2693
2694
  }(this, e);
2694
2695
  }
2695
2696
  var Hn = { get: function() {
2696
2697
  var e = z, t = dn;
2697
- function n(s, o) {
2698
+ function n(r, o) {
2698
2699
  var f = this, d = !e.global && (e !== z || t !== dn), m = d && !nt(), v = new U(function(w, T) {
2699
- Vn(f, new Ur(Hr(s, e, d, m), Hr(o, e, d, m), w, T, e));
2700
+ Vn(f, new Ur(Hr(r, e, d, m), Hr(o, e, d, m), w, T, e));
2700
2701
  });
2701
2702
  return this._consoleTask && (v._consoleTask = this._consoleTask), v;
2702
2703
  }
@@ -2706,19 +2707,19 @@ function sa() {
2706
2707
  return e;
2707
2708
  }, set: Hn.set });
2708
2709
  } };
2709
- function Ur(e, t, n, s, o) {
2710
- this.onFulfilled = typeof e == "function" ? e : null, this.onRejected = typeof t == "function" ? t : null, this.resolve = n, this.reject = s, this.psd = o;
2710
+ function Ur(e, t, n, r, o) {
2711
+ this.onFulfilled = typeof e == "function" ? e : null, this.onRejected = typeof t == "function" ? t : null, this.resolve = n, this.reject = r, this.psd = o;
2711
2712
  }
2712
2713
  function zn(e, t) {
2713
- var n, s;
2714
- un.push(t), e._state === null && (n = e._lib && St(), t = Gn(t), e._state = !1, e._value = t, s = e, dt.some(function(o) {
2715
- return o._value === s._value;
2716
- }) || dt.push(s), qr(e), n && Rt());
2714
+ var n, r;
2715
+ un.push(t), e._state === null && (n = e._lib && St(), t = Gn(t), e._state = !1, e._value = t, r = e, dt.some(function(o) {
2716
+ return o._value === r._value;
2717
+ }) || dt.push(r), qr(e), n && Rt());
2717
2718
  }
2718
2719
  function qr(e) {
2719
2720
  var t = e._listeners;
2720
2721
  e._listeners = [];
2721
- for (var n = 0, s = t.length; n < s; ++n) Vn(e, t[n]);
2722
+ for (var n = 0, r = t.length; n < r; ++n) Vn(e, t[n]);
2722
2723
  var o = e._PSD;
2723
2724
  --o.ref || o.finalize(), pt === 0 && (++pt, Bt(function() {
2724
2725
  --pt == 0 && Xn();
@@ -2733,12 +2734,12 @@ function sa() {
2733
2734
  }
2734
2735
  function ei(e, t, n) {
2735
2736
  try {
2736
- var s, o = t._value;
2737
- !t._state && un.length && (un = []), s = Be && t._consoleTask ? t._consoleTask.run(function() {
2737
+ var r, o = t._value;
2738
+ !t._state && un.length && (un = []), r = Be && t._consoleTask ? t._consoleTask.run(function() {
2738
2739
  return e(o);
2739
2740
  }) : e(o), t._state || un.indexOf(o) !== -1 || function(f) {
2740
2741
  for (var d = dt.length; d; ) if (dt[--d]._value === f._value) return dt.splice(d, 1);
2741
- }(t), n.resolve(s);
2742
+ }(t), n.resolve(r);
2742
2743
  } catch (f) {
2743
2744
  n.reject(f);
2744
2745
  } finally {
@@ -2758,16 +2759,16 @@ function sa() {
2758
2759
  var e, t, n;
2759
2760
  do
2760
2761
  for (; 0 < Ut.length; ) for (e = Ut, Ut = [], n = e.length, t = 0; t < n; ++t) {
2761
- var s = e[t];
2762
- s[0].apply(null, s[1]);
2762
+ var r = e[t];
2763
+ r[0].apply(null, r[1]);
2763
2764
  }
2764
2765
  while (0 < Ut.length);
2765
2766
  an = qn = !0;
2766
2767
  }
2767
2768
  function Xn() {
2768
2769
  var e = dt;
2769
- dt = [], e.forEach(function(s) {
2770
- s._PSD.onunhandled.call(null, s._value, s);
2770
+ dt = [], e.forEach(function(r) {
2771
+ r._PSD.onunhandled.call(null, r._value, r);
2771
2772
  });
2772
2773
  for (var t = cn.slice(0), n = t.length; n; ) t[--n]();
2773
2774
  }
@@ -2777,13 +2778,13 @@ function sa() {
2777
2778
  function de(e, t) {
2778
2779
  var n = z;
2779
2780
  return function() {
2780
- var s = St(), o = z;
2781
+ var r = St(), o = z;
2781
2782
  try {
2782
2783
  return rt(n, !0), e.apply(this, arguments);
2783
2784
  } catch (f) {
2784
2785
  t && t(f);
2785
2786
  } finally {
2786
- rt(o, !1), s && Rt();
2787
+ rt(o, !1), r && Rt();
2787
2788
  }
2788
2789
  };
2789
2790
  }
@@ -2792,10 +2793,10 @@ function sa() {
2792
2793
  }, catch: function(e) {
2793
2794
  if (arguments.length === 1) return this.then(null, e);
2794
2795
  var t = e, n = arguments[1];
2795
- return typeof t == "function" ? this.then(null, function(s) {
2796
- return (s instanceof t ? n : ln)(s);
2797
- }) : this.then(null, function(s) {
2798
- return (s && s.name === t ? n : ln)(s);
2796
+ return typeof t == "function" ? this.then(null, function(r) {
2797
+ return (r instanceof t ? n : ln)(r);
2798
+ }) : this.then(null, function(r) {
2799
+ return (r && r.name === t ? n : ln)(r);
2799
2800
  });
2800
2801
  }, finally: function(e) {
2801
2802
  return this.then(function(t) {
@@ -2809,20 +2810,20 @@ function sa() {
2809
2810
  });
2810
2811
  }, timeout: function(e, t) {
2811
2812
  var n = this;
2812
- return e < 1 / 0 ? new U(function(s, o) {
2813
+ return e < 1 / 0 ? new U(function(r, o) {
2813
2814
  var f = setTimeout(function() {
2814
2815
  return o(new V.Timeout(t));
2815
2816
  }, e);
2816
- n.then(s, o).finally(clearTimeout.bind(null, f));
2817
+ n.then(r, o).finally(clearTimeout.bind(null, f));
2817
2818
  }) : this;
2818
2819
  } }), typeof Symbol < "u" && Symbol.toStringTag && q(U.prototype, Symbol.toStringTag, "Dexie.Promise"), et.env = Gr(), P(U, { all: function() {
2819
2820
  var e = xe.apply(null, arguments).map(pn);
2820
2821
  return new U(function(t, n) {
2821
2822
  e.length === 0 && t([]);
2822
- var s = e.length;
2823
+ var r = e.length;
2823
2824
  e.forEach(function(o, f) {
2824
2825
  return U.resolve(o).then(function(d) {
2825
- e[f] = d, --s || t(e);
2826
+ e[f] = d, --r || t(e);
2826
2827
  }, n);
2827
2828
  });
2828
2829
  });
@@ -2833,8 +2834,8 @@ function sa() {
2833
2834
  }, reject: ln, race: function() {
2834
2835
  var e = xe.apply(null, arguments).map(pn);
2835
2836
  return new U(function(t, n) {
2836
- e.map(function(s) {
2837
- return U.resolve(s).then(t, n);
2837
+ e.map(function(r) {
2838
+ return U.resolve(r).then(t, n);
2838
2839
  });
2839
2840
  });
2840
2841
  }, PSD: { get: function() {
@@ -2852,7 +2853,7 @@ function sa() {
2852
2853
  }, set: function(e) {
2853
2854
  Gn = e;
2854
2855
  } }, follow: function(e, t) {
2855
- return new U(function(n, s) {
2856
+ return new U(function(n, r) {
2856
2857
  return tt(function(o, f) {
2857
2858
  var d = z;
2858
2859
  d.unhandleds = [], d.onunhandled = f, d.finalize = lt(function() {
@@ -2865,20 +2866,20 @@ function sa() {
2865
2866
  --pt == 0 && Xn();
2866
2867
  }, []);
2867
2868
  }, d.finalize), e();
2868
- }, t, n, s);
2869
+ }, t, n, r);
2869
2870
  });
2870
2871
  } }), ht && (ht.allSettled && q(U, "allSettled", function() {
2871
2872
  var e = xe.apply(null, arguments).map(pn);
2872
2873
  return new U(function(t) {
2873
2874
  e.length === 0 && t([]);
2874
- var n = e.length, s = new Array(n);
2875
+ var n = e.length, r = new Array(n);
2875
2876
  e.forEach(function(o, f) {
2876
2877
  return U.resolve(o).then(function(d) {
2877
- return s[f] = { status: "fulfilled", value: d };
2878
+ return r[f] = { status: "fulfilled", value: d };
2878
2879
  }, function(d) {
2879
- return s[f] = { status: "rejected", reason: d };
2880
+ return r[f] = { status: "rejected", reason: d };
2880
2881
  }).then(function() {
2881
- return --n || t(s);
2882
+ return --n || t(r);
2882
2883
  });
2883
2884
  });
2884
2885
  });
@@ -2886,22 +2887,22 @@ function sa() {
2886
2887
  var e = xe.apply(null, arguments).map(pn);
2887
2888
  return new U(function(t, n) {
2888
2889
  e.length === 0 && n(new AggregateError([]));
2889
- var s = e.length, o = new Array(s);
2890
+ var r = e.length, o = new Array(r);
2890
2891
  e.forEach(function(f, d) {
2891
2892
  return U.resolve(f).then(function(m) {
2892
2893
  return t(m);
2893
2894
  }, function(m) {
2894
- o[d] = m, --s || n(new AggregateError(o));
2895
+ o[d] = m, --r || n(new AggregateError(o));
2895
2896
  });
2896
2897
  });
2897
2898
  });
2898
2899
  }), ht.withResolvers && (U.withResolvers = ht.withResolvers));
2899
2900
  var we = { awaits: 0, echoes: 0, id: 0 }, ni = 0, fn = [], hn = 0, dn = 0, ri = 0;
2900
- function tt(e, t, n, s) {
2901
+ function tt(e, t, n, r) {
2901
2902
  var o = z, f = Object.create(o);
2902
2903
  return f.parent = o, f.ref = 0, f.global = !1, f.id = ++ri, et.env, f.env = Un ? { Promise: U, PromiseProp: { value: U, configurable: !0, writable: !0 }, all: U.all, race: U.race, allSettled: U.allSettled, any: U.any, resolve: U.resolve, reject: U.reject } : {}, t && h(f, t), ++o.ref, f.finalize = function() {
2903
2904
  --this.parent.ref || this.parent.finalize();
2904
- }, s = mt(f, e, n, s), f.ref === 0 && f.finalize(), s;
2905
+ }, r = mt(f, e, n, r), f.ref === 0 && f.finalize(), r;
2905
2906
  }
2906
2907
  function kt() {
2907
2908
  return we.id || (we.id = ++ni), ++we.awaits, we.echoes += Br, we.id;
@@ -2921,31 +2922,31 @@ function sa() {
2921
2922
  fn.pop(), rt(e, !1);
2922
2923
  }
2923
2924
  function rt(e, t) {
2924
- var n, s = z;
2925
+ var n, r = z;
2925
2926
  (t ? !we.echoes || hn++ && e === z : !hn || --hn && e === z) || queueMicrotask(t ? (function(o) {
2926
2927
  ++dn, we.echoes && --we.echoes != 0 || (we.echoes = we.awaits = we.id = 0), fn.push(z), rt(o, !0);
2927
- }).bind(null, e) : si), e !== z && (z = e, s === et && (et.env = Gr()), Un && (n = et.env.Promise, t = e.env, (s.global || e.global) && (Object.defineProperty(c, "Promise", t.PromiseProp), n.all = t.all, n.race = t.race, n.resolve = t.resolve, n.reject = t.reject, t.allSettled && (n.allSettled = t.allSettled), t.any && (n.any = t.any))));
2928
+ }).bind(null, e) : si), e !== z && (z = e, r === et && (et.env = Gr()), Un && (n = et.env.Promise, t = e.env, (r.global || e.global) && (Object.defineProperty(c, "Promise", t.PromiseProp), n.all = t.all, n.race = t.race, n.resolve = t.resolve, n.reject = t.reject, t.allSettled && (n.allSettled = t.allSettled), t.any && (n.any = t.any))));
2928
2929
  }
2929
2930
  function Gr() {
2930
2931
  var e = c.Promise;
2931
2932
  return Un ? { Promise: e, PromiseProp: Object.getOwnPropertyDescriptor(c, "Promise"), all: e.all, race: e.race, allSettled: e.allSettled, any: e.any, resolve: e.resolve, reject: e.reject } : {};
2932
2933
  }
2933
- function mt(e, t, n, s, o) {
2934
+ function mt(e, t, n, r, o) {
2934
2935
  var f = z;
2935
2936
  try {
2936
- return rt(e, !0), t(n, s, o);
2937
+ return rt(e, !0), t(n, r, o);
2937
2938
  } finally {
2938
2939
  rt(f, !1);
2939
2940
  }
2940
2941
  }
2941
- function Hr(e, t, n, s) {
2942
+ function Hr(e, t, n, r) {
2942
2943
  return typeof e != "function" ? e : function() {
2943
2944
  var o = z;
2944
2945
  n && kt(), rt(t, !0);
2945
2946
  try {
2946
2947
  return e.apply(this, arguments);
2947
2948
  } finally {
2948
- rt(o, !1), s && queueMicrotask(nt);
2949
+ rt(o, !1), r && queueMicrotask(nt);
2949
2950
  }
2950
2951
  };
2951
2952
  }
@@ -2972,8 +2973,8 @@ function sa() {
2972
2973
  }
2973
2974
  function re(e, t) {
2974
2975
  try {
2975
- var n = Wr(e), s = Wr(t);
2976
- if (n !== s) return n === "Array" ? 1 : s === "Array" ? -1 : n === "binary" ? 1 : s === "binary" ? -1 : n === "string" ? 1 : s === "string" ? -1 : n === "Date" ? 1 : s !== "Date" ? NaN : -1;
2976
+ var n = Wr(e), r = Wr(t);
2977
+ if (n !== r) return n === "Array" ? 1 : r === "Array" ? -1 : n === "binary" ? 1 : r === "binary" ? -1 : n === "string" ? 1 : r === "string" ? -1 : n === "Date" ? 1 : r !== "Date" ? NaN : -1;
2977
2978
  switch (n) {
2978
2979
  case "number":
2979
2980
  case "Date":
@@ -3005,16 +3006,16 @@ function sa() {
3005
3006
  return e instanceof Uint8Array ? e : ArrayBuffer.isView(e) ? new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : new Uint8Array(e);
3006
3007
  }
3007
3008
  var Qr = (fe.prototype._trans = function(e, t, n) {
3008
- var s = this._tx || z.trans, o = this.name, f = Be && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
3009
+ var r = this._tx || z.trans, o = this.name, f = Be && typeof console < "u" && console.createTask && console.createTask("Dexie: ".concat(e === "readonly" ? "read" : "write", " ").concat(this.name));
3009
3010
  function d(w, T, g) {
3010
3011
  if (!g.schema[o]) throw new V.NotFound("Table " + o + " not part of transaction");
3011
3012
  return t(g.idbtrans, g);
3012
3013
  }
3013
3014
  var m = St();
3014
3015
  try {
3015
- var v = s && s.db._novip === this.db._novip ? s === z.trans ? s._promise(e, d, n) : tt(function() {
3016
- return s._promise(e, d, n);
3017
- }, { trans: s, transless: z.transless || z }) : function w(T, g, R, b) {
3016
+ var v = r && r.db._novip === this.db._novip ? r === z.trans ? r._promise(e, d, n) : tt(function() {
3017
+ return r._promise(e, d, n);
3018
+ }, { trans: r, transless: z.transless || z }) : function w(T, g, R, b) {
3018
3019
  if (T.idbdb && (T._state.openComplete || z.letThrough || T._vip)) {
3019
3020
  var x = T._createTransaction(g, R, T._dbSchema);
3020
3021
  try {
@@ -3055,8 +3056,8 @@ function sa() {
3055
3056
  }
3056
3057
  }, fe.prototype.get = function(e, t) {
3057
3058
  var n = this;
3058
- return e && e.constructor === Object ? this.where(e).first(t) : e == null ? ye(new V.Type("Invalid argument to Table.get()")) : this._trans("readonly", function(s) {
3059
- return n.core.get({ trans: s, key: e }).then(function(o) {
3059
+ return e && e.constructor === Object ? this.where(e).first(t) : e == null ? ye(new V.Type("Invalid argument to Table.get()")) : this._trans("readonly", function(r) {
3060
+ return n.core.get({ trans: r, key: e }).then(function(o) {
3060
3061
  return n.hook.reading.fire(o);
3061
3062
  });
3062
3063
  }).then(t);
@@ -3083,12 +3084,12 @@ function sa() {
3083
3084
  }));
3084
3085
  }
3085
3086
  !n && Be && console.warn("The query ".concat(JSON.stringify(e), " on ").concat(this.name, " would benefit from a ") + "compound index [".concat(t.join("+"), "]"));
3086
- var s = this.schema.idxByName;
3087
+ var r = this.schema.idxByName;
3087
3088
  function o(m, v) {
3088
3089
  return re(m, v) === 0;
3089
3090
  }
3090
3091
  var d = t.reduce(function(g, v) {
3091
- var w = g[0], T = g[1], g = s[v], R = e[v];
3092
+ var w = g[0], T = g[1], g = r[v], R = e[v];
3092
3093
  return [w || g, w || !g ? gt(T, g && g.multi ? function(b) {
3093
3094
  return b = ve(b, v), p(b) && b.some(function(x) {
3094
3095
  return o(R, x);
@@ -3117,7 +3118,7 @@ function sa() {
3117
3118
  }, fe.prototype.reverse = function() {
3118
3119
  return this.toCollection().reverse();
3119
3120
  }, fe.prototype.mapToClass = function(e) {
3120
- var t, n = this.db, s = this.name;
3121
+ var t, n = this.db, r = this.name;
3121
3122
  function o() {
3122
3123
  return t !== null && t.apply(this, arguments) || this;
3123
3124
  }
@@ -3130,7 +3131,7 @@ function sa() {
3130
3131
  }(o, t = e), Object.defineProperty(o.prototype, "db", { get: function() {
3131
3132
  return n;
3132
3133
  }, enumerable: !1, configurable: !0 }), o.prototype.table = function() {
3133
- return s;
3134
+ return r;
3134
3135
  }, e = o);
3135
3136
  for (var f = /* @__PURE__ */ new Set(), d = e.prototype; d; d = y(d)) Object.getOwnPropertyNames(d).forEach(function(v) {
3136
3137
  return f.add(v);
@@ -3150,7 +3151,7 @@ function sa() {
3150
3151
  h(this, e);
3151
3152
  });
3152
3153
  }, fe.prototype.add = function(e, t) {
3153
- var n = this, s = this.schema.primKey, o = s.auto, f = s.keyPath, d = e;
3154
+ var n = this, r = this.schema.primKey, o = r.auto, f = r.keyPath, d = e;
3154
3155
  return f && o && (d = yn(f)(e)), this._trans("readwrite", function(m) {
3155
3156
  return n.core.mutate({ trans: m, type: "add", keys: t != null ? [t] : null, values: [d] });
3156
3157
  }).then(function(m) {
@@ -3165,7 +3166,7 @@ function sa() {
3165
3166
  }, fe.prototype.update = function(e, t) {
3166
3167
  return typeof e != "object" || p(e) ? this.where(":id").equals(e).modify(t) : (e = ve(e, this.schema.primKey.keyPath), e === void 0 ? ye(new V.InvalidArgument("Given object does not contain its primary key")) : this.where(":id").equals(e).modify(t));
3167
3168
  }, fe.prototype.put = function(e, t) {
3168
- var n = this, s = this.schema.primKey, o = s.auto, f = s.keyPath, d = e;
3169
+ var n = this, r = this.schema.primKey, o = r.auto, f = r.keyPath, d = e;
3169
3170
  return f && o && (d = yn(f)(e)), this._trans("readwrite", function(m) {
3170
3171
  return n.core.mutate({ trans: m, type: "put", values: [d], keys: t != null ? [t] : null });
3171
3172
  }).then(function(m) {
@@ -3194,46 +3195,46 @@ function sa() {
3194
3195
  }, fe.prototype.bulkGet = function(e) {
3195
3196
  var t = this;
3196
3197
  return this._trans("readonly", function(n) {
3197
- return t.core.getMany({ keys: e, trans: n }).then(function(s) {
3198
- return s.map(function(o) {
3198
+ return t.core.getMany({ keys: e, trans: n }).then(function(r) {
3199
+ return r.map(function(o) {
3199
3200
  return t.hook.reading.fire(o);
3200
3201
  });
3201
3202
  });
3202
3203
  });
3203
3204
  }, fe.prototype.bulkAdd = function(e, t, n) {
3204
- var s = this, o = Array.isArray(t) ? t : void 0, f = (n = n || (o ? void 0 : t)) ? n.allKeys : void 0;
3205
+ var r = this, o = Array.isArray(t) ? t : void 0, f = (n = n || (o ? void 0 : t)) ? n.allKeys : void 0;
3205
3206
  return this._trans("readwrite", function(d) {
3206
- var w = s.schema.primKey, m = w.auto, w = w.keyPath;
3207
+ var w = r.schema.primKey, m = w.auto, w = w.keyPath;
3207
3208
  if (w && o) throw new V.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");
3208
3209
  if (o && o.length !== e.length) throw new V.InvalidArgument("Arguments objects and keys must have the same length");
3209
3210
  var v = e.length, w = w && m ? e.map(yn(w)) : e;
3210
- return s.core.mutate({ trans: d, type: "add", keys: o, values: w, wantResults: f }).then(function(x) {
3211
+ return r.core.mutate({ trans: d, type: "add", keys: o, values: w, wantResults: f }).then(function(x) {
3211
3212
  var g = x.numFailures, R = x.results, b = x.lastResult, x = x.failures;
3212
3213
  if (g === 0) return f ? R : b;
3213
- throw new je("".concat(s.name, ".bulkAdd(): ").concat(g, " of ").concat(v, " operations failed"), x);
3214
+ throw new je("".concat(r.name, ".bulkAdd(): ").concat(g, " of ").concat(v, " operations failed"), x);
3214
3215
  });
3215
3216
  });
3216
3217
  }, fe.prototype.bulkPut = function(e, t, n) {
3217
- var s = this, o = Array.isArray(t) ? t : void 0, f = (n = n || (o ? void 0 : t)) ? n.allKeys : void 0;
3218
+ var r = this, o = Array.isArray(t) ? t : void 0, f = (n = n || (o ? void 0 : t)) ? n.allKeys : void 0;
3218
3219
  return this._trans("readwrite", function(d) {
3219
- var w = s.schema.primKey, m = w.auto, w = w.keyPath;
3220
+ var w = r.schema.primKey, m = w.auto, w = w.keyPath;
3220
3221
  if (w && o) throw new V.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");
3221
3222
  if (o && o.length !== e.length) throw new V.InvalidArgument("Arguments objects and keys must have the same length");
3222
3223
  var v = e.length, w = w && m ? e.map(yn(w)) : e;
3223
- return s.core.mutate({ trans: d, type: "put", keys: o, values: w, wantResults: f }).then(function(x) {
3224
+ return r.core.mutate({ trans: d, type: "put", keys: o, values: w, wantResults: f }).then(function(x) {
3224
3225
  var g = x.numFailures, R = x.results, b = x.lastResult, x = x.failures;
3225
3226
  if (g === 0) return f ? R : b;
3226
- throw new je("".concat(s.name, ".bulkPut(): ").concat(g, " of ").concat(v, " operations failed"), x);
3227
+ throw new je("".concat(r.name, ".bulkPut(): ").concat(g, " of ").concat(v, " operations failed"), x);
3227
3228
  });
3228
3229
  });
3229
3230
  }, fe.prototype.bulkUpdate = function(e) {
3230
- var t = this, n = this.core, s = e.map(function(d) {
3231
+ var t = this, n = this.core, r = e.map(function(d) {
3231
3232
  return d.key;
3232
3233
  }), o = e.map(function(d) {
3233
3234
  return d.changes;
3234
3235
  }), f = [];
3235
3236
  return this._trans("readwrite", function(d) {
3236
- return n.getMany({ trans: d, keys: s, cache: "clone" }).then(function(m) {
3237
+ return n.getMany({ trans: d, keys: r, cache: "clone" }).then(function(m) {
3237
3238
  var v = [], w = [];
3238
3239
  e.forEach(function(g, R) {
3239
3240
  var b = g.key, x = g.changes, S = m[R];
@@ -3248,7 +3249,7 @@ function sa() {
3248
3249
  }
3249
3250
  });
3250
3251
  var T = v.length;
3251
- return n.mutate({ trans: d, type: "put", keys: v, values: w, updates: { keys: s, changeSpecs: o } }).then(function(g) {
3252
+ return n.mutate({ trans: d, type: "put", keys: v, values: w, updates: { keys: r, changeSpecs: o } }).then(function(g) {
3252
3253
  var R = g.numFailures, b = g.failures;
3253
3254
  if (R === 0) return T;
3254
3255
  for (var x = 0, S = Object.keys(b); x < S.length; x++) {
@@ -3261,8 +3262,8 @@ function sa() {
3261
3262
  });
3262
3263
  }, fe.prototype.bulkDelete = function(e) {
3263
3264
  var t = this, n = e.length;
3264
- return this._trans("readwrite", function(s) {
3265
- return t.core.mutate({ trans: s, type: "delete", keys: e });
3265
+ return this._trans("readwrite", function(r) {
3266
+ return t.core.mutate({ trans: r, type: "delete", keys: e });
3266
3267
  }).then(function(d) {
3267
3268
  var o = d.numFailures, f = d.lastResult, d = d.failures;
3268
3269
  if (o === 0) return f;
@@ -3281,7 +3282,7 @@ function sa() {
3281
3282
  }
3282
3283
  var n = {};
3283
3284
  t.addEventType = f;
3284
- for (var s = 1, o = arguments.length; s < o; ++s) f(arguments[s]);
3285
+ for (var r = 1, o = arguments.length; r < o; ++r) f(arguments[r]);
3285
3286
  return t;
3286
3287
  function f(d, m, v) {
3287
3288
  if (typeof d != "object") {
@@ -3323,10 +3324,10 @@ function sa() {
3323
3324
  e.filter = gt(e.filter, t);
3324
3325
  }
3325
3326
  function Jn(e, t, n) {
3326
- var s = e.replayFilter;
3327
- e.replayFilter = s ? function() {
3328
- return gt(s(), t());
3329
- } : t, e.justLimit = n && !s;
3327
+ var r = e.replayFilter;
3328
+ e.replayFilter = r ? function() {
3329
+ return gt(r(), t());
3330
+ } : t, e.justLimit = n && !r;
3330
3331
  }
3331
3332
  function gn(e, t) {
3332
3333
  if (e.isPrimKey) return t.primaryKey;
@@ -3335,10 +3336,10 @@ function sa() {
3335
3336
  return n;
3336
3337
  }
3337
3338
  function $r(e, t, n) {
3338
- var s = gn(e, t.schema);
3339
- return t.openCursor({ trans: n, values: !e.keysOnly, reverse: e.dir === "prev", unique: !!e.unique, query: { index: s, range: e.range } });
3339
+ var r = gn(e, t.schema);
3340
+ return t.openCursor({ trans: n, values: !e.keysOnly, reverse: e.dir === "prev", unique: !!e.unique, query: { index: r, range: e.range } });
3340
3341
  }
3341
- function vn(e, t, n, s) {
3342
+ function vn(e, t, n, r) {
3342
3343
  var o = e.replayFilter ? gt(e.filter, e.replayFilter()) : e.filter;
3343
3344
  if (e.or) {
3344
3345
  var f = {}, d = function(m, v, w) {
@@ -3349,13 +3350,13 @@ function sa() {
3349
3350
  return v.fail(R);
3350
3351
  }) || ((g = "" + (T = v.primaryKey)) == "[object ArrayBuffer]" && (g = "" + new Uint8Array(T)), _(f, g) || (f[g] = !0, t(m, v, w)));
3351
3352
  };
3352
- return Promise.all([e.or._iterate(d, n), Jr($r(e, s, n), e.algorithm, d, !e.keysOnly && e.valueMapper)]);
3353
+ return Promise.all([e.or._iterate(d, n), Jr($r(e, r, n), e.algorithm, d, !e.keysOnly && e.valueMapper)]);
3353
3354
  }
3354
- return Jr($r(e, s, n), gt(e.algorithm, o), t, !e.keysOnly && e.valueMapper);
3355
+ return Jr($r(e, r, n), gt(e.algorithm, o), t, !e.keysOnly && e.valueMapper);
3355
3356
  }
3356
- function Jr(e, t, n, s) {
3357
- var o = de(s ? function(f, d, m) {
3358
- return n(s(f), d, m);
3357
+ function Jr(e, t, n, r) {
3358
+ var o = de(r ? function(f, d, m) {
3359
+ return n(r(f), d, m);
3359
3360
  } : n);
3360
3361
  return e.then(function(f) {
3361
3362
  if (f) return f.start(function() {
@@ -3388,17 +3389,17 @@ function sa() {
3388
3389
  throw new TypeError("Invalid term ".concat(n));
3389
3390
  }
3390
3391
  if (t.remove !== void 0) {
3391
- var s = t.remove;
3392
- if (p(s)) return p(e) ? e.filter(function(o) {
3393
- return !s.includes(o);
3392
+ var r = t.remove;
3393
+ if (p(r)) return p(e) ? e.filter(function(o) {
3394
+ return !r.includes(o);
3394
3395
  }).sort() : [];
3395
- if (typeof s == "number") return Number(e) - s;
3396
- if (typeof s == "bigint") try {
3397
- return BigInt(e) - s;
3396
+ if (typeof r == "number") return Number(e) - r;
3397
+ if (typeof r == "bigint") try {
3398
+ return BigInt(e) - r;
3398
3399
  } catch {
3399
- return BigInt(0) - s;
3400
+ return BigInt(0) - r;
3400
3401
  }
3401
- throw new TypeError("Invalid subtrahend ".concat(s));
3402
+ throw new TypeError("Invalid subtrahend ".concat(r));
3402
3403
  }
3403
3404
  return n = (n = t.replacePrefix) === null || n === void 0 ? void 0 : n[0], n && typeof e == "string" && e.startsWith(n) ? t.replacePrefix[1] + e.substring(n.length) : e;
3404
3405
  }, Zr);
@@ -3429,21 +3430,21 @@ function sa() {
3429
3430
  }, ie.prototype.count = function(e) {
3430
3431
  var t = this;
3431
3432
  return this._read(function(n) {
3432
- var s = t._ctx, o = s.table.core;
3433
- if (Mt(s, !0)) return o.count({ trans: n, query: { index: gn(s, o.schema), range: s.range } }).then(function(d) {
3434
- return Math.min(d, s.limit);
3433
+ var r = t._ctx, o = r.table.core;
3434
+ if (Mt(r, !0)) return o.count({ trans: n, query: { index: gn(r, o.schema), range: r.range } }).then(function(d) {
3435
+ return Math.min(d, r.limit);
3435
3436
  });
3436
3437
  var f = 0;
3437
- return vn(s, function() {
3438
+ return vn(r, function() {
3438
3439
  return ++f, !1;
3439
3440
  }, n, o).then(function() {
3440
3441
  return f;
3441
3442
  });
3442
3443
  }).then(e);
3443
3444
  }, ie.prototype.sortBy = function(e, t) {
3444
- var n = e.split(".").reverse(), s = n[0], o = n.length - 1;
3445
+ var n = e.split(".").reverse(), r = n[0], o = n.length - 1;
3445
3446
  function f(v, w) {
3446
- return w ? f(v[n[w]], w - 1) : v[s];
3447
+ return w ? f(v[n[w]], w - 1) : v[r];
3447
3448
  }
3448
3449
  var d = this._ctx.dir === "next" ? 1 : -1;
3449
3450
  function m(v, w) {
@@ -3455,17 +3456,17 @@ function sa() {
3455
3456
  }, ie.prototype.toArray = function(e) {
3456
3457
  var t = this;
3457
3458
  return this._read(function(n) {
3458
- var s = t._ctx;
3459
- if (s.dir === "next" && Mt(s, !0) && 0 < s.limit) {
3460
- var o = s.valueMapper, f = gn(s, s.table.core.schema);
3461
- return s.table.core.query({ trans: n, limit: s.limit, values: !0, query: { index: f, range: s.range } }).then(function(m) {
3459
+ var r = t._ctx;
3460
+ if (r.dir === "next" && Mt(r, !0) && 0 < r.limit) {
3461
+ var o = r.valueMapper, f = gn(r, r.table.core.schema);
3462
+ return r.table.core.query({ trans: n, limit: r.limit, values: !0, query: { index: f, range: r.range } }).then(function(m) {
3462
3463
  return m = m.result, o ? m.map(o) : m;
3463
3464
  });
3464
3465
  }
3465
3466
  var d = [];
3466
- return vn(s, function(m) {
3467
+ return vn(r, function(m) {
3467
3468
  return d.push(m);
3468
- }, n, s.table.core).then(function() {
3469
+ }, n, r.table.core).then(function() {
3469
3470
  return d;
3470
3471
  });
3471
3472
  }, e);
@@ -3473,9 +3474,9 @@ function sa() {
3473
3474
  var t = this._ctx;
3474
3475
  return e <= 0 || (t.offset += e, Mt(t) ? Jn(t, function() {
3475
3476
  var n = e;
3476
- return function(s, o) {
3477
+ return function(r, o) {
3477
3478
  return n === 0 || (n === 1 ? --n : o(function() {
3478
- s.advance(n), n = 0;
3479
+ r.advance(n), n = 0;
3479
3480
  }), !1);
3480
3481
  };
3481
3482
  }) : Jn(t, function() {
@@ -3487,13 +3488,13 @@ function sa() {
3487
3488
  }, ie.prototype.limit = function(e) {
3488
3489
  return this._ctx.limit = Math.min(this._ctx.limit, e), Jn(this._ctx, function() {
3489
3490
  var t = e;
3490
- return function(n, s, o) {
3491
- return --t <= 0 && s(o), 0 <= t;
3491
+ return function(n, r, o) {
3492
+ return --t <= 0 && r(o), 0 <= t;
3492
3493
  };
3493
3494
  }, !0), this;
3494
3495
  }, ie.prototype.until = function(e, t) {
3495
- return $n(this._ctx, function(n, s, o) {
3496
- return !e(n.value) || (s(o), t);
3496
+ return $n(this._ctx, function(n, r, o) {
3497
+ return !e(n.value) || (r(o), t);
3497
3498
  }), this;
3498
3499
  }, ie.prototype.first = function(e) {
3499
3500
  return this.limit(1).toArray(function(t) {
@@ -3516,36 +3517,36 @@ function sa() {
3516
3517
  return this.reverse();
3517
3518
  }, ie.prototype.eachKey = function(e) {
3518
3519
  var t = this._ctx;
3519
- return t.keysOnly = !t.isMatch, this.each(function(n, s) {
3520
- e(s.key, s);
3520
+ return t.keysOnly = !t.isMatch, this.each(function(n, r) {
3521
+ e(r.key, r);
3521
3522
  });
3522
3523
  }, ie.prototype.eachUniqueKey = function(e) {
3523
3524
  return this._ctx.unique = "unique", this.eachKey(e);
3524
3525
  }, ie.prototype.eachPrimaryKey = function(e) {
3525
3526
  var t = this._ctx;
3526
- return t.keysOnly = !t.isMatch, this.each(function(n, s) {
3527
- e(s.primaryKey, s);
3527
+ return t.keysOnly = !t.isMatch, this.each(function(n, r) {
3528
+ e(r.primaryKey, r);
3528
3529
  });
3529
3530
  }, ie.prototype.keys = function(e) {
3530
3531
  var t = this._ctx;
3531
3532
  t.keysOnly = !t.isMatch;
3532
3533
  var n = [];
3533
- return this.each(function(s, o) {
3534
+ return this.each(function(r, o) {
3534
3535
  n.push(o.key);
3535
3536
  }).then(function() {
3536
3537
  return n;
3537
3538
  }).then(e);
3538
3539
  }, ie.prototype.primaryKeys = function(e) {
3539
3540
  var t = this._ctx;
3540
- if (t.dir === "next" && Mt(t, !0) && 0 < t.limit) return this._read(function(s) {
3541
+ if (t.dir === "next" && Mt(t, !0) && 0 < t.limit) return this._read(function(r) {
3541
3542
  var o = gn(t, t.table.core.schema);
3542
- return t.table.core.query({ trans: s, values: !1, limit: t.limit, query: { index: o, range: t.range } });
3543
- }).then(function(s) {
3544
- return s.result;
3543
+ return t.table.core.query({ trans: r, values: !1, limit: t.limit, query: { index: o, range: t.range } });
3544
+ }).then(function(r) {
3545
+ return r.result;
3545
3546
  }).then(e);
3546
3547
  t.keysOnly = !t.isMatch;
3547
3548
  var n = [];
3548
- return this.each(function(s, o) {
3549
+ return this.each(function(r, o) {
3549
3550
  n.push(o.primaryKey);
3550
3551
  }).then(function() {
3551
3552
  return n;
@@ -3563,12 +3564,12 @@ function sa() {
3563
3564
  if (!e || !e.multi) return this;
3564
3565
  var t = {};
3565
3566
  return $n(this._ctx, function(o) {
3566
- var s = o.primaryKey.toString(), o = _(t, s);
3567
- return t[s] = !0, !o;
3567
+ var r = o.primaryKey.toString(), o = _(t, r);
3568
+ return t[r] = !0, !o;
3568
3569
  }), this;
3569
3570
  }, ie.prototype.modify = function(e) {
3570
3571
  var t = this, n = this._ctx;
3571
- return this._write(function(s) {
3572
+ return this._write(function(r) {
3572
3573
  var o, f, d;
3573
3574
  d = typeof e == "function" ? e : (o = l(e), f = o.length, function(A) {
3574
3575
  for (var k = !1, O = 0; O < f; ++O) {
@@ -3591,20 +3592,20 @@ function sa() {
3591
3592
  return t.clone().primaryKeys().then(function(A) {
3592
3593
  function k(M) {
3593
3594
  var I = Math.min(T, A.length - M);
3594
- return m.getMany({ trans: s, keys: A.slice(M, M + I), cache: "immutable" }).then(function(D) {
3595
+ return m.getMany({ trans: r, keys: A.slice(M, M + I), cache: "immutable" }).then(function(D) {
3595
3596
  for (var K = [], N = [], F = v ? [] : null, B = [], j = 0; j < I; ++j) {
3596
3597
  var G = D[j], J = { value: me(G), primKey: A[M + j] };
3597
3598
  d.call(J, J.value, J) !== !1 && (J.value == null ? B.push(A[M + j]) : v || re(w(G), w(J.value)) === 0 ? (N.push(J.value), v && F.push(A[M + j])) : (B.push(A[M + j]), K.push(J.value)));
3598
3599
  }
3599
- return Promise.resolve(0 < K.length && m.mutate({ trans: s, type: "add", values: K }).then(function(ee) {
3600
+ return Promise.resolve(0 < K.length && m.mutate({ trans: r, type: "add", values: K }).then(function(ee) {
3600
3601
  for (var te in ee.failures) B.splice(parseInt(te), 1);
3601
3602
  R(K.length, ee);
3602
3603
  })).then(function() {
3603
- return (0 < N.length || O && typeof e == "object") && m.mutate({ trans: s, type: "put", keys: F, values: N, criteria: O, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < M }).then(function(ee) {
3604
+ return (0 < N.length || O && typeof e == "object") && m.mutate({ trans: r, type: "put", keys: F, values: N, criteria: O, changeSpec: typeof e != "function" && e, isAdditionalChunk: 0 < M }).then(function(ee) {
3604
3605
  return R(N.length, ee);
3605
3606
  });
3606
3607
  }).then(function() {
3607
- return (0 < B.length || O && e === Zn) && m.mutate({ trans: s, type: "delete", keys: B, criteria: O, isAdditionalChunk: 0 < M }).then(function(ee) {
3608
+ return (0 < B.length || O && e === Zn) && m.mutate({ trans: r, type: "delete", keys: B, criteria: O, isAdditionalChunk: 0 < M }).then(function(ee) {
3608
3609
  return R(B.length, ee);
3609
3610
  });
3610
3611
  }).then(function() {
@@ -3622,8 +3623,8 @@ function sa() {
3622
3623
  }, ie.prototype.delete = function() {
3623
3624
  var e = this._ctx, t = e.range;
3624
3625
  return Mt(e) && (e.isPrimKey || t.type === 3) ? this._write(function(n) {
3625
- var s = e.table.core.schema.primaryKey, o = t;
3626
- return e.table.core.count({ trans: n, query: { index: s, range: o } }).then(function(f) {
3626
+ var r = e.table.core.schema.primaryKey, o = t;
3627
+ return e.table.core.count({ trans: n, query: { index: r, range: o } }).then(function(f) {
3627
3628
  return e.table.core.mutate({ trans: n, type: "deleteRange", range: o }).then(function(d) {
3628
3629
  var m = d.failures;
3629
3630
  if (d.lastResult, d.results, d = d.numFailures, d) throw new Nt("Could not delete some values", Object.keys(m).map(function(v) {
@@ -3653,7 +3654,7 @@ function sa() {
3653
3654
  return es("");
3654
3655
  }).limit(0);
3655
3656
  }
3656
- function bn(e, t, n, s) {
3657
+ function bn(e, t, n, r) {
3657
3658
  var o, f, d, m, v, w, T, g = n.length;
3658
3659
  if (!n.every(function(x) {
3659
3660
  return typeof x == "string";
@@ -3677,10 +3678,10 @@ function sa() {
3677
3678
  return A.upper;
3678
3679
  }), v = S.map(function(A) {
3679
3680
  return A.lower;
3680
- }), T = (w = x) === "next" ? "" : s;
3681
+ }), T = (w = x) === "next" ? "" : r;
3681
3682
  }
3682
3683
  R("next"), e = new e.Collection(e, function() {
3683
- return st(m[0], v[g - 1] + s);
3684
+ return st(m[0], v[g - 1] + r);
3684
3685
  }), e._ondirectionchange = function(x) {
3685
3686
  R(x);
3686
3687
  };
@@ -3706,19 +3707,19 @@ function sa() {
3706
3707
  } : A), !1;
3707
3708
  }), e;
3708
3709
  }
3709
- function st(e, t, n, s) {
3710
- return { type: 2, lower: e, upper: t, lowerOpen: n, upperOpen: s };
3710
+ function st(e, t, n, r) {
3711
+ return { type: 2, lower: e, upper: t, lowerOpen: n, upperOpen: r };
3711
3712
  }
3712
3713
  function es(e) {
3713
3714
  return { type: 1, lower: e, upper: e };
3714
3715
  }
3715
3716
  var ts = (Object.defineProperty(_e.prototype, "Collection", { get: function() {
3716
3717
  return this._ctx.table.db.Collection;
3717
- }, enumerable: !1, configurable: !0 }), _e.prototype.between = function(e, t, n, s) {
3718
- n = n !== !1, s = s === !0;
3718
+ }, enumerable: !1, configurable: !0 }), _e.prototype.between = function(e, t, n, r) {
3719
+ n = n !== !1, r = r === !0;
3719
3720
  try {
3720
- return 0 < this._cmp(e, t) || this._cmp(e, t) === 0 && (n || s) && (!n || !s) ? Pt(this) : new this.Collection(this, function() {
3721
- return st(e, t, !n, !s);
3721
+ return 0 < this._cmp(e, t) || this._cmp(e, t) === 0 && (n || r) && (!n || !r) ? Pt(this) : new this.Collection(this, function() {
3722
+ return st(e, t, !n, !r);
3722
3723
  });
3723
3724
  } catch {
3724
3725
  return ke(this, Xe);
@@ -3761,8 +3762,8 @@ function sa() {
3761
3762
  }, _e.prototype.startsWithAnyOfIgnoreCase = function() {
3762
3763
  var e = xe.apply(Ve, arguments);
3763
3764
  return e.length === 0 ? Pt(this) : bn(this, function(t, n) {
3764
- return n.some(function(s) {
3765
- return t.indexOf(s) === 0;
3765
+ return n.some(function(r) {
3766
+ return t.indexOf(r) === 0;
3766
3767
  });
3767
3768
  }, e, yt);
3768
3769
  }, _e.prototype.anyOf = function() {
@@ -3773,19 +3774,19 @@ function sa() {
3773
3774
  return ke(this, Xe);
3774
3775
  }
3775
3776
  if (t.length === 0) return Pt(this);
3776
- var s = new this.Collection(this, function() {
3777
+ var r = new this.Collection(this, function() {
3777
3778
  return st(t[0], t[t.length - 1]);
3778
3779
  });
3779
- s._ondirectionchange = function(f) {
3780
+ r._ondirectionchange = function(f) {
3780
3781
  n = f === "next" ? e._ascending : e._descending, t.sort(n);
3781
3782
  };
3782
3783
  var o = 0;
3783
- return s._addAlgorithm(function(f, d, m) {
3784
+ return r._addAlgorithm(function(f, d, m) {
3784
3785
  for (var v = f.key; 0 < n(v, t[o]); ) if (++o === t.length) return d(m), !1;
3785
3786
  return n(v, t[o]) === 0 || (d(function() {
3786
3787
  f.continue(t[o]);
3787
3788
  }), !1);
3788
- }), s;
3789
+ }), r;
3789
3790
  }, _e.prototype.notEqual = function(e) {
3790
3791
  return this.inAnyRange([[-1 / 0, e], [e, this.db._maxKey]], { includeLowers: !1, includeUppers: !1 });
3791
3792
  }, _e.prototype.noneOf = function() {
@@ -3796,12 +3797,12 @@ function sa() {
3796
3797
  } catch {
3797
3798
  return ke(this, Xe);
3798
3799
  }
3799
- var t = e.reduce(function(n, s) {
3800
- return n ? n.concat([[n[n.length - 1][1], s]]) : [[-1 / 0, s]];
3800
+ var t = e.reduce(function(n, r) {
3801
+ return n ? n.concat([[n[n.length - 1][1], r]]) : [[-1 / 0, r]];
3801
3802
  }, null);
3802
3803
  return t.push([e[e.length - 1], this.db._maxKey]), this.inAnyRange(t, { includeLowers: !1, includeUppers: !1 });
3803
3804
  }, _e.prototype.inAnyRange = function(k, t) {
3804
- var n = this, s = this._cmp, o = this._ascending, f = this._descending, d = this._min, m = this._max;
3805
+ var n = this, r = this._cmp, o = this._ascending, f = this._descending, d = this._min, m = this._max;
3805
3806
  if (k.length === 0) return Pt(this);
3806
3807
  if (!k.every(function(O) {
3807
3808
  return O[0] !== void 0 && O[1] !== void 0 && o(O[0], O[1]) <= 0;
@@ -3814,7 +3815,7 @@ function sa() {
3814
3815
  (T = k.reduce(function(O, M) {
3815
3816
  for (var I = 0, D = O.length; I < D; ++I) {
3816
3817
  var K = O[I];
3817
- if (s(M[0], K[1]) < 0 && 0 < s(M[1], K[0])) {
3818
+ if (r(M[0], K[1]) < 0 && 0 < r(M[1], K[0])) {
3818
3819
  K[0] = d(K[0], M[0]), K[1] = m(K[1], M[1]);
3819
3820
  break;
3820
3821
  }
@@ -3877,14 +3878,14 @@ function sa() {
3877
3878
  }, qe.prototype.create = function(e) {
3878
3879
  var t = this;
3879
3880
  if (!this.mode) return this;
3880
- var n = this.db.idbdb, s = this.db._state.dbOpenError;
3881
- if (Y(!this.idbtrans), !e && !n) switch (s && s.name) {
3881
+ var n = this.db.idbdb, r = this.db._state.dbOpenError;
3882
+ if (Y(!this.idbtrans), !e && !n) switch (r && r.name) {
3882
3883
  case "DatabaseClosedError":
3883
- throw new V.DatabaseClosed(s);
3884
+ throw new V.DatabaseClosed(r);
3884
3885
  case "MissingAPIError":
3885
- throw new V.MissingAPI(s.message, s);
3886
+ throw new V.MissingAPI(r.message, r);
3886
3887
  default:
3887
- throw new V.OpenFailed(s);
3888
+ throw new V.OpenFailed(r);
3888
3889
  }
3889
3890
  if (!this.active) throw new V.TransactionInactive();
3890
3891
  return Y(this._completion._state === null), (e = this.idbtrans = e || (this.db.core || n).transaction(this.storeNames, this.mode, { durability: this.chromeTransactionDurability })).onerror = de(function(o) {
@@ -3895,42 +3896,42 @@ function sa() {
3895
3896
  t.active = !1, t._resolve(), "mutatedParts" in e && it.storagemutated.fire(e.mutatedParts);
3896
3897
  }), this;
3897
3898
  }, qe.prototype._promise = function(e, t, n) {
3898
- var s = this;
3899
+ var r = this;
3899
3900
  if (e === "readwrite" && this.mode !== "readwrite") return ye(new V.ReadOnly("Transaction is readonly"));
3900
3901
  if (!this.active) return ye(new V.TransactionInactive());
3901
3902
  if (this._locked()) return new U(function(f, d) {
3902
- s._blockedFuncs.push([function() {
3903
- s._promise(e, t, n).then(f, d);
3903
+ r._blockedFuncs.push([function() {
3904
+ r._promise(e, t, n).then(f, d);
3904
3905
  }, z]);
3905
3906
  });
3906
3907
  if (n) return tt(function() {
3907
3908
  var f = new U(function(d, m) {
3908
- s._lock();
3909
- var v = t(d, m, s);
3909
+ r._lock();
3910
+ var v = t(d, m, r);
3910
3911
  v && v.then && v.then(d, m);
3911
3912
  });
3912
3913
  return f.finally(function() {
3913
- return s._unlock();
3914
+ return r._unlock();
3914
3915
  }), f._lib = !0, f;
3915
3916
  });
3916
3917
  var o = new U(function(f, d) {
3917
- var m = t(f, d, s);
3918
+ var m = t(f, d, r);
3918
3919
  m && m.then && m.then(f, d);
3919
3920
  });
3920
3921
  return o._lib = !0, o;
3921
3922
  }, qe.prototype._root = function() {
3922
3923
  return this.parent ? this.parent._root() : this;
3923
3924
  }, qe.prototype.waitFor = function(e) {
3924
- var t, n = this._root(), s = U.resolve(e);
3925
+ var t, n = this._root(), r = U.resolve(e);
3925
3926
  n._waitingFor ? n._waitingFor = n._waitingFor.then(function() {
3926
- return s;
3927
- }) : (n._waitingFor = s, n._waitingQueue = [], t = n.idbtrans.objectStore(n.storeNames[0]), function f() {
3927
+ return r;
3928
+ }) : (n._waitingFor = r, n._waitingQueue = [], t = n.idbtrans.objectStore(n.storeNames[0]), function f() {
3928
3929
  for (++n._spinCount; n._waitingQueue.length; ) n._waitingQueue.shift()();
3929
3930
  n._waitingFor && (t.get(-1 / 0).onsuccess = f);
3930
3931
  }());
3931
3932
  var o = n._waitingFor;
3932
3933
  return new U(function(f, d) {
3933
- s.then(function(m) {
3934
+ r.then(function(m) {
3934
3935
  return n._waitingQueue.push(de(f.bind(null, m)));
3935
3936
  }, function(m) {
3936
3937
  return n._waitingQueue.push(de(d.bind(null, m)));
@@ -3949,19 +3950,19 @@ function sa() {
3949
3950
  }, qe);
3950
3951
  function qe() {
3951
3952
  }
3952
- function tr(e, t, n, s, o, f, d) {
3953
- return { name: e, keyPath: t, unique: n, multi: s, auto: o, compound: f, src: (n && !d ? "&" : "") + (s ? "*" : "") + (o ? "++" : "") + ns(t) };
3953
+ function tr(e, t, n, r, o, f, d) {
3954
+ return { name: e, keyPath: t, unique: n, multi: r, auto: o, compound: f, src: (n && !d ? "&" : "") + (r ? "*" : "") + (o ? "++" : "") + ns(t) };
3954
3955
  }
3955
3956
  function ns(e) {
3956
3957
  return typeof e == "string" ? e : e ? "[" + [].join.call(e, "+") + "]" : "";
3957
3958
  }
3958
3959
  function nr(e, t, n) {
3959
- return { name: e, primKey: t, indexes: n, mappedClass: null, idxByName: (s = function(o) {
3960
+ return { name: e, primKey: t, indexes: n, mappedClass: null, idxByName: (r = function(o) {
3960
3961
  return [o.name, o];
3961
3962
  }, n.reduce(function(o, f, d) {
3962
- return d = s(f, d), d && (o[d[0]] = d[1]), o;
3963
+ return d = r(f, d), d && (o[d[0]] = d[1]), o;
3963
3964
  }, {})) };
3964
- var s;
3965
+ var r;
3965
3966
  }
3966
3967
  var Xt = function(e) {
3967
3968
  try {
@@ -3993,7 +3994,7 @@ function sa() {
3993
3994
  return e == null ? ":id" : typeof e == "string" ? e : "[".concat(e.join("+"), "]");
3994
3995
  }
3995
3996
  function li(e, t, v) {
3996
- function s(A) {
3997
+ function r(A) {
3997
3998
  if (A.type === 3) return null;
3998
3999
  if (A.type === 4) throw new Error("Cannot convert never type to IDBKeyRange");
3999
4000
  var b = A.lower, x = A.upper, S = A.lowerOpen, A = A.upperOpen;
@@ -4016,7 +4017,7 @@ function sa() {
4016
4017
  var ee = [], te = [], Oe = 0;
4017
4018
  if (k === "deleteRange") {
4018
4019
  if (I.type === 4) return D({ numFailures: Oe, failures: te, results: [], lastResult: void 0 });
4019
- I.type === 3 ? ee.push(j = N.clear()) : ee.push(j = N.delete(s(I)));
4020
+ I.type === 3 ? ee.push(j = N.clear()) : ee.push(j = N.delete(r(I)));
4020
4021
  } else {
4021
4022
  var F = B ? F ? [M, O] : [M, null] : [O, null], Q = F[0], Ee = F[1];
4022
4023
  if (B) for (var Se = 0; Se < G; ++Se) ee.push(j = Ee && Ee[Se] !== void 0 ? N[k](Q[Se], Ee[Se]) : N[k](Q[Se])), j.onerror = J;
@@ -4054,7 +4055,7 @@ function sa() {
4054
4055
  }, query: (b = w, function(S) {
4055
4056
  return new Promise(function(A, k) {
4056
4057
  A = de(A);
4057
- var O, M, I, F = S.trans, D = S.values, K = S.limit, j = S.query, N = K === 1 / 0 ? void 0 : K, B = j.index, j = j.range, F = F.objectStore(x), B = B.isPrimaryKey ? F : F.index(B.name), j = s(j);
4058
+ var O, M, I, F = S.trans, D = S.values, K = S.limit, j = S.query, N = K === 1 / 0 ? void 0 : K, B = j.index, j = j.range, F = F.objectStore(x), B = B.isPrimaryKey ? F : F.index(B.name), j = r(j);
4058
4059
  if (K === 0) return A({ result: [] });
4059
4060
  b ? ((N = D ? B.getAll(j, N) : B.getAllKeys(j, N)).onsuccess = function(G) {
4060
4061
  return A({ result: G.target.result });
@@ -4067,7 +4068,7 @@ function sa() {
4067
4068
  var A = S.trans, k = S.values, O = S.query, M = S.reverse, I = S.unique;
4068
4069
  return new Promise(function(D, K) {
4069
4070
  D = de(D);
4070
- var B = O.index, N = O.range, F = A.objectStore(x), F = B.isPrimaryKey ? F : F.index(B.name), B = M ? I ? "prevunique" : "prev" : I ? "nextunique" : "next", j = !k && "openKeyCursor" in F ? F.openKeyCursor(s(N), B) : F.openCursor(s(N), B);
4071
+ var B = O.index, N = O.range, F = A.objectStore(x), F = B.isPrimaryKey ? F : F.index(B.name), B = M ? I ? "prevunique" : "prev" : I ? "nextunique" : "next", j = !k && "openKeyCursor" in F ? F.openKeyCursor(r(N), B) : F.openCursor(r(N), B);
4071
4072
  j.onerror = Ue(K), j.onsuccess = de(function(G) {
4072
4073
  var J, ee, te, Oe, Q = j.result;
4073
4074
  Q ? (Q.___id = ++ci, Q.done = !1, J = Q.continue.bind(Q), ee = (ee = Q.continuePrimaryKey) && ee.bind(Q), te = Q.advance.bind(Q), Oe = function() {
@@ -4106,7 +4107,7 @@ function sa() {
4106
4107
  }, count: function(S) {
4107
4108
  var A = S.query, k = S.trans, O = A.index, M = A.range;
4108
4109
  return new Promise(function(I, D) {
4109
- var K = k.objectStore(x), N = O.isPrimaryKey ? K : K.index(O.name), K = s(M), N = K ? N.count(K) : N.count();
4110
+ var K = k.objectStore(x), N = O.isPrimaryKey ? K : K.index(O.name), K = r(M), N = K ? N.count(K) : N.count();
4110
4111
  N.onsuccess = de(function(F) {
4111
4112
  return I(F.target.result);
4112
4113
  }), N.onerror = Ue(D);
@@ -4133,24 +4134,24 @@ function sa() {
4133
4134
  return g[R];
4134
4135
  }, MIN_KEY: -1 / 0, MAX_KEY: Xt(t), schema: v };
4135
4136
  }
4136
- function fi(e, t, n, s) {
4137
+ function fi(e, t, n, r) {
4137
4138
  var o = n.IDBKeyRange;
4138
- return n.indexedDB, { dbcore: (s = li(t, o, s), e.dbcore.reduce(function(f, d) {
4139
+ return n.indexedDB, { dbcore: (r = li(t, o, r), e.dbcore.reduce(function(f, d) {
4139
4140
  return d = d.create, a(a({}, f), d(f));
4140
- }, s)) };
4141
+ }, r)) };
4141
4142
  }
4142
- function wn(e, s) {
4143
- var n = s.db, s = fi(e._middlewares, n, e._deps, s);
4144
- e.core = s.dbcore, e.tables.forEach(function(o) {
4143
+ function wn(e, r) {
4144
+ var n = r.db, r = fi(e._middlewares, n, e._deps, r);
4145
+ e.core = r.dbcore, e.tables.forEach(function(o) {
4145
4146
  var f = o.name;
4146
4147
  e.core.schema.tables.some(function(d) {
4147
4148
  return d.name === f;
4148
4149
  }) && (o.core = e.core.table(f), e[f] instanceof e.Table && (e[f].core = o.core));
4149
4150
  });
4150
4151
  }
4151
- function _n(e, t, n, s) {
4152
+ function _n(e, t, n, r) {
4152
4153
  n.forEach(function(o) {
4153
- var f = s[o];
4154
+ var f = r[o];
4154
4155
  t.forEach(function(d) {
4155
4156
  var m = function v(w, T) {
4156
4157
  return H(w, T) || (w = y(w)) && v(w, T);
@@ -4165,17 +4166,17 @@ function sa() {
4165
4166
  }
4166
4167
  function sr(e, t) {
4167
4168
  t.forEach(function(n) {
4168
- for (var s in n) n[s] instanceof e.Table && delete n[s];
4169
+ for (var r in n) n[r] instanceof e.Table && delete n[r];
4169
4170
  });
4170
4171
  }
4171
4172
  function hi(e, t) {
4172
4173
  return e._cfg.version - t._cfg.version;
4173
4174
  }
4174
- function di(e, t, n, s) {
4175
+ function di(e, t, n, r) {
4175
4176
  var o = e._dbSchema;
4176
4177
  n.objectStoreNames.contains("$meta") && !o.$meta && (o.$meta = nr("$meta", is("")[0], []), e._storeNames.push("$meta"));
4177
4178
  var f = e._createTransaction("readwrite", e._storeNames, o);
4178
- f.create(n), f._completion.catch(s);
4179
+ f.create(n), f._completion.catch(r);
4179
4180
  var d = f._reject.bind(f), m = z.transless || z;
4180
4181
  tt(function() {
4181
4182
  return z.trans = f, z.transless = m, t !== 0 ? (wn(e, n), w = t, ((v = f).storeNames.includes("$meta") ? v.table("$meta").get("version").then(function(T) {
@@ -4244,25 +4245,25 @@ function sa() {
4244
4245
  ss(e._dbSchema, t), t.db.version % 10 != 0 || t.objectStoreNames.contains("$meta") || t.db.createObjectStore("$meta").add(Math.ceil(t.db.version / 10 - 1), "version");
4245
4246
  var n = xn(0, e.idbdb, t);
4246
4247
  Tn(e, e._dbSchema, t);
4247
- for (var s = 0, o = ir(n, e._dbSchema).change; s < o.length; s++) {
4248
+ for (var r = 0, o = ir(n, e._dbSchema).change; r < o.length; r++) {
4248
4249
  var f = function(d) {
4249
4250
  if (d.change.length || d.recreate) return console.warn("Unable to patch indexes of table ".concat(d.name, " because it has changes on the type of index or primary key.")), { value: void 0 };
4250
4251
  var m = t.objectStore(d.name);
4251
4252
  d.add.forEach(function(v) {
4252
4253
  Be && console.debug("Dexie upgrade patch: Creating missing index ".concat(d.name, ".").concat(v.src)), An(m, v);
4253
4254
  });
4254
- }(o[s]);
4255
+ }(o[r]);
4255
4256
  if (typeof f == "object") return f.value;
4256
4257
  }
4257
4258
  }
4258
4259
  function ir(e, t) {
4259
- var n, s = { del: [], add: [], change: [] };
4260
- for (n in e) t[n] || s.del.push(n);
4260
+ var n, r = { del: [], add: [], change: [] };
4261
+ for (n in e) t[n] || r.del.push(n);
4261
4262
  for (n in t) {
4262
4263
  var o = e[n], f = t[n];
4263
4264
  if (o) {
4264
4265
  var d = { name: n, def: f, recreate: !1, del: [], add: [], change: [] };
4265
- if ("" + (o.primKey.keyPath || "") != "" + (f.primKey.keyPath || "") || o.primKey.auto !== f.primKey.auto) d.recreate = !0, s.change.push(d);
4266
+ if ("" + (o.primKey.keyPath || "") != "" + (f.primKey.keyPath || "") || o.primKey.auto !== f.primKey.auto) d.recreate = !0, r.change.push(d);
4266
4267
  else {
4267
4268
  var m = o.idxByName, v = f.idxByName, w = void 0;
4268
4269
  for (w in m) v[w] || d.del.push(w);
@@ -4270,15 +4271,15 @@ function sa() {
4270
4271
  var T = m[w], g = v[w];
4271
4272
  T ? T.src !== g.src && d.change.push(g) : d.add.push(g);
4272
4273
  }
4273
- (0 < d.del.length || 0 < d.add.length || 0 < d.change.length) && s.change.push(d);
4274
+ (0 < d.del.length || 0 < d.add.length || 0 < d.change.length) && r.change.push(d);
4274
4275
  }
4275
- } else s.add.push([n, f]);
4276
+ } else r.add.push([n, f]);
4276
4277
  }
4277
- return s;
4278
+ return r;
4278
4279
  }
4279
- function or(e, t, n, s) {
4280
+ function or(e, t, n, r) {
4280
4281
  var o = e.db.createObjectStore(t, n.keyPath ? { keyPath: n.keyPath, autoIncrement: n.auto } : { autoIncrement: n.auto });
4281
- return s.forEach(function(f) {
4282
+ return r.forEach(function(f) {
4282
4283
  return An(o, f);
4283
4284
  }), o;
4284
4285
  }
@@ -4291,18 +4292,18 @@ function sa() {
4291
4292
  e.createIndex(t.name, t.keyPath, { unique: t.unique, multiEntry: t.multi });
4292
4293
  }
4293
4294
  function xn(e, t, n) {
4294
- var s = {};
4295
+ var r = {};
4295
4296
  return Z(t.objectStoreNames, 0).forEach(function(o) {
4296
4297
  for (var f = n.objectStore(o), d = tr(ns(w = f.keyPath), w || "", !0, !1, !!f.autoIncrement, w && typeof w != "string", !0), m = [], v = 0; v < f.indexNames.length; ++v) {
4297
4298
  var T = f.index(f.indexNames[v]), w = T.keyPath, T = tr(T.name, w, !!T.unique, !!T.multiEntry, !1, w && typeof w != "string", !1);
4298
4299
  m.push(T);
4299
4300
  }
4300
- s[o] = nr(o, d, m);
4301
- }), s;
4301
+ r[o] = nr(o, d, m);
4302
+ }), r;
4302
4303
  }
4303
4304
  function Tn(e, t, n) {
4304
- for (var s = n.db.objectStoreNames, o = 0; o < s.length; ++o) {
4305
- var f = s[o], d = n.objectStore(f);
4305
+ for (var r = n.db.objectStoreNames, o = 0; o < r.length; ++o) {
4306
+ var f = r[o], d = n.objectStore(f);
4306
4307
  e._hasGetAll = "getAll" in d;
4307
4308
  for (var m = 0; m < d.indexNames.length; ++m) {
4308
4309
  var v = d.indexNames[m], w = d.index(v).keyPath, T = typeof w == "string" ? w : "[" + Z(w).join("+") + "]";
@@ -4313,27 +4314,27 @@ function sa() {
4313
4314
  }
4314
4315
  function is(e) {
4315
4316
  return e.split(",").map(function(t, n) {
4316
- var s = (t = t.trim()).replace(/([&*]|\+\+)/g, ""), o = /^\[/.test(s) ? s.match(/^\[(.*)\]$/)[1].split("+") : s;
4317
- return tr(s, o || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t), p(o), n === 0);
4317
+ var r = (t = t.trim()).replace(/([&*]|\+\+)/g, ""), o = /^\[/.test(r) ? r.match(/^\[(.*)\]$/)[1].split("+") : r;
4318
+ return tr(r, o || null, /\&/.test(t), /\*/.test(t), /\+\+/.test(t), p(o), n === 0);
4318
4319
  });
4319
4320
  }
4320
4321
  var mi = (En.prototype._parseStoresSpec = function(e, t) {
4321
4322
  l(e).forEach(function(n) {
4322
4323
  if (e[n] !== null) {
4323
- var s = is(e[n]), o = s.shift();
4324
+ var r = is(e[n]), o = r.shift();
4324
4325
  if (o.unique = !0, o.multi) throw new V.Schema("Primary key cannot be multi-valued");
4325
- s.forEach(function(f) {
4326
+ r.forEach(function(f) {
4326
4327
  if (f.auto) throw new V.Schema("Only primary key can be marked as autoIncrement (++)");
4327
4328
  if (!f.keyPath) throw new V.Schema("Index must have a name and cannot be an empty string");
4328
- }), t[n] = nr(n, o, s);
4329
+ }), t[n] = nr(n, o, r);
4329
4330
  }
4330
4331
  });
4331
4332
  }, En.prototype.stores = function(n) {
4332
4333
  var t = this.db;
4333
4334
  this._cfg.storesSource = this._cfg.storesSource ? h(this._cfg.storesSource, n) : n;
4334
- var n = t._versions, s = {}, o = {};
4335
+ var n = t._versions, r = {}, o = {};
4335
4336
  return n.forEach(function(f) {
4336
- h(s, f._cfg.storesSource), o = f._cfg.dbschema = {}, f._parseStoresSpec(s, o);
4337
+ h(r, f._cfg.storesSource), o = f._cfg.dbschema = {}, f._parseStoresSpec(r, o);
4337
4338
  }), t._dbSchema = o, sr(t, [t._allTables, t, t.Transaction.prototype]), _n(t, [t._allTables, t, t.Transaction.prototype, this._cfg.tables], l(o), o), t._storeNames = l(o), this;
4338
4339
  }, En.prototype.upgrade = function(e) {
4339
4340
  return this._cfg.contentUpgrade = Bn(this._cfg.contentUpgrade || ue, e), this;
@@ -4363,40 +4364,40 @@ function sa() {
4363
4364
  h(this, arguments.length ? { d: 1, from: e, to: 1 < arguments.length ? t : e } : { d: 0 });
4364
4365
  };
4365
4366
  function Yt(e, t, n) {
4366
- var s = re(t, n);
4367
- if (!isNaN(s)) {
4368
- if (0 < s) throw RangeError();
4367
+ var r = re(t, n);
4368
+ if (!isNaN(r)) {
4369
+ if (0 < r) throw RangeError();
4369
4370
  if (lr(e)) return h(e, { from: t, to: n, d: 1 });
4370
- var o = e.l, s = e.r;
4371
+ var o = e.l, r = e.r;
4371
4372
  if (re(n, e.from) < 0) return o ? Yt(o, t, n) : e.l = { from: t, to: n, d: 1, l: null, r: null }, as(e);
4372
- if (0 < re(t, e.to)) return s ? Yt(s, t, n) : e.r = { from: t, to: n, d: 1, l: null, r: null }, as(e);
4373
- re(t, e.from) < 0 && (e.from = t, e.l = null, e.d = s ? s.d + 1 : 1), 0 < re(n, e.to) && (e.to = n, e.r = null, e.d = e.l ? e.l.d + 1 : 1), n = !e.r, o && !e.l && Qt(e, o), s && n && Qt(e, s);
4373
+ if (0 < re(t, e.to)) return r ? Yt(r, t, n) : e.r = { from: t, to: n, d: 1, l: null, r: null }, as(e);
4374
+ re(t, e.from) < 0 && (e.from = t, e.l = null, e.d = r ? r.d + 1 : 1), 0 < re(n, e.to) && (e.to = n, e.r = null, e.d = e.l ? e.l.d + 1 : 1), n = !e.r, o && !e.l && Qt(e, o), r && n && Qt(e, r);
4374
4375
  }
4375
4376
  }
4376
4377
  function Qt(e, t) {
4377
- lr(t) || function n(s, v) {
4378
+ lr(t) || function n(r, v) {
4378
4379
  var f = v.from, d = v.to, m = v.l, v = v.r;
4379
- Yt(s, f, d), m && n(s, m), v && n(s, v);
4380
+ Yt(r, f, d), m && n(r, m), v && n(r, v);
4380
4381
  }(e, t);
4381
4382
  }
4382
4383
  function os(e, t) {
4383
- var n = Sn(t), s = n.next();
4384
- if (s.done) return !1;
4385
- for (var o = s.value, f = Sn(e), d = f.next(o.from), m = d.value; !s.done && !d.done; ) {
4384
+ var n = Sn(t), r = n.next();
4385
+ if (r.done) return !1;
4386
+ for (var o = r.value, f = Sn(e), d = f.next(o.from), m = d.value; !r.done && !d.done; ) {
4386
4387
  if (re(m.from, o.to) <= 0 && 0 <= re(m.to, o.from)) return !0;
4387
- re(o.from, m.from) < 0 ? o = (s = n.next(m.from)).value : m = (d = f.next(o.from)).value;
4388
+ re(o.from, m.from) < 0 ? o = (r = n.next(m.from)).value : m = (d = f.next(o.from)).value;
4388
4389
  }
4389
4390
  return !1;
4390
4391
  }
4391
4392
  function Sn(e) {
4392
4393
  var t = lr(e) ? null : { s: 0, n: e };
4393
4394
  return { next: function(n) {
4394
- for (var s = 0 < arguments.length; t; ) switch (t.s) {
4395
+ for (var r = 0 < arguments.length; t; ) switch (t.s) {
4395
4396
  case 0:
4396
- if (t.s = 1, s) for (; t.n.l && re(n, t.n.from) < 0; ) t = { up: t, n: t.n.l, s: 1 };
4397
+ if (t.s = 1, r) for (; t.n.l && re(n, t.n.from) < 0; ) t = { up: t, n: t.n.l, s: 1 };
4397
4398
  else for (; t.n.l; ) t = { up: t, n: t.n.l, s: 1 };
4398
4399
  case 1:
4399
- if (t.s = 2, !s || re(n, t.n.to) <= 0) return { value: t.n, done: !1 };
4400
+ if (t.s = 2, !r || re(n, t.n.to) <= 0) return { value: t.n, done: !1 };
4400
4401
  case 2:
4401
4402
  if (t.n.r) {
4402
4403
  t.s = 3, t = { up: t, n: t.n.r, s: 0 };
@@ -4409,8 +4410,8 @@ function sa() {
4409
4410
  } };
4410
4411
  }
4411
4412
  function as(e) {
4412
- var t, n, s = (((t = e.r) === null || t === void 0 ? void 0 : t.d) || 0) - (((n = e.l) === null || n === void 0 ? void 0 : n.d) || 0), o = 1 < s ? "r" : s < -1 ? "l" : "";
4413
- o && (t = o == "r" ? "l" : "r", n = a({}, e), s = e[o], e.from = s.from, e.to = s.to, e[o] = s[o], n[o] = s[t], (e[t] = n).d = us(n)), e.d = us(e);
4413
+ var t, n, r = (((t = e.r) === null || t === void 0 ? void 0 : t.d) || 0) - (((n = e.l) === null || n === void 0 ? void 0 : n.d) || 0), o = 1 < r ? "r" : r < -1 ? "l" : "";
4414
+ o && (t = o == "r" ? "l" : "r", n = a({}, e), r = e[o], e.from = r.from, e.to = r.to, e[o] = r[o], n[o] = r[t], (e[t] = n).d = us(n)), e.d = us(e);
4414
4415
  }
4415
4416
  function us(n) {
4416
4417
  var t = n.r, n = n.l;
@@ -4418,9 +4419,9 @@ function sa() {
4418
4419
  }
4419
4420
  function Rn(e, t) {
4420
4421
  return l(t).forEach(function(n) {
4421
- e[n] ? Qt(e[n], t[n]) : e[n] = function s(o) {
4422
+ e[n] ? Qt(e[n], t[n]) : e[n] = function r(o) {
4422
4423
  var f, d, m = {};
4423
- for (f in o) _(o, f) && (d = o[f], m[f] = !d || typeof d != "object" || tn.has(d.constructor) ? d : s(d));
4424
+ for (f in o) _(o, f) && (d = o[f], m[f] = !d || typeof d != "object" || tn.has(d.constructor) ? d : r(d));
4424
4425
  return m;
4425
4426
  }(t[n]);
4426
4427
  }), e;
@@ -4454,7 +4455,7 @@ function sa() {
4454
4455
  function pr(e, t) {
4455
4456
  t === void 0 && (t = !1);
4456
4457
  var n = /* @__PURE__ */ new Set();
4457
- if (e.all) for (var s = 0, o = Object.values(vt); s < o.length; s++) cs(d = o[s], e, n, t);
4458
+ if (e.all) for (var r = 0, o = Object.values(vt); r < o.length; r++) cs(d = o[r], e, n, t);
4458
4459
  else for (var f in e) {
4459
4460
  var d, m = /^idb\:\/\/(.*)\/(.*)\//.exec(f);
4460
4461
  m && (f = m[1], m = m[2], (d = vt["idb://".concat(f, "/").concat(m)]) && cs(d, e, n, t));
@@ -4463,17 +4464,17 @@ function sa() {
4463
4464
  return v();
4464
4465
  });
4465
4466
  }
4466
- function cs(e, t, n, s) {
4467
+ function cs(e, t, n, r) {
4467
4468
  for (var o = [], f = 0, d = Object.entries(e.queries.query); f < d.length; f++) {
4468
4469
  for (var m = d[f], v = m[0], w = [], T = 0, g = m[1]; T < g.length; T++) {
4469
4470
  var R = g[T];
4470
4471
  fr(t, R.obsSet) ? R.subscribers.forEach(function(A) {
4471
4472
  return n.add(A);
4472
- }) : s && w.push(R);
4473
+ }) : r && w.push(R);
4473
4474
  }
4474
- s && o.push([v, w]);
4475
+ r && o.push([v, w]);
4475
4476
  }
4476
- if (s) for (var b = 0, x = o; b < x.length; b++) {
4477
+ if (r) for (var b = 0, x = o; b < x.length; b++) {
4477
4478
  var S = x[b], v = S[0], w = S[1];
4478
4479
  e.queries.query[v] = w;
4479
4480
  }
@@ -4484,9 +4485,9 @@ function sa() {
4484
4485
  return t.dbOpenError ? ye(t.dbOpenError) : e;
4485
4486
  });
4486
4487
  t.isBeingOpened = !0, t.dbOpenError = null, t.openComplete = !1;
4487
- var s = t.openCanceller, o = Math.round(10 * e.verno), f = !1;
4488
+ var r = t.openCanceller, o = Math.round(10 * e.verno), f = !1;
4488
4489
  function d() {
4489
- if (t.openCanceller !== s) throw new V.DatabaseClosed("db.open() was cancelled");
4490
+ if (t.openCanceller !== r) throw new V.DatabaseClosed("db.open() was cancelled");
4490
4491
  }
4491
4492
  function m() {
4492
4493
  return new U(function(R, b) {
@@ -4528,7 +4529,7 @@ function sa() {
4528
4529
  });
4529
4530
  }
4530
4531
  var v, w = t.dbReadyResolve, T = null, g = !1;
4531
- return U.race([s, (typeof navigator > "u" ? U.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(R) {
4532
+ return U.race([r, (typeof navigator > "u" ? U.resolve() : !navigator.userAgentData && /Safari\//.test(navigator.userAgent) && !/Chrom(e|ium)\//.test(navigator.userAgent) && indexedDB.databases ? new Promise(function(R) {
4532
4533
  function b() {
4533
4534
  return indexedDB.databases().finally(R);
4534
4535
  }
@@ -4547,14 +4548,14 @@ function sa() {
4547
4548
  }
4548
4549
  });
4549
4550
  }).finally(function() {
4550
- t.openCanceller === s && (t.onReadyBeingFired = null, t.isBeingOpened = !1);
4551
+ t.openCanceller === r && (t.onReadyBeingFired = null, t.isBeingOpened = !1);
4551
4552
  }).catch(function(R) {
4552
4553
  t.dbOpenError = R;
4553
4554
  try {
4554
4555
  T && T.abort();
4555
4556
  } catch {
4556
4557
  }
4557
- return s === t.openCanceller && e._close(), ye(R);
4558
+ return r === t.openCanceller && e._close(), ye(R);
4558
4559
  }).finally(function() {
4559
4560
  t.openComplete = !0, w();
4560
4561
  }).then(function() {
@@ -4570,32 +4571,32 @@ function sa() {
4570
4571
  function t(f) {
4571
4572
  return e.next(f);
4572
4573
  }
4573
- var n = o(t), s = o(function(f) {
4574
+ var n = o(t), r = o(function(f) {
4574
4575
  return e.throw(f);
4575
4576
  });
4576
4577
  function o(f) {
4577
4578
  return function(v) {
4578
4579
  var m = f(v), v = m.value;
4579
- return m.done ? v : v && typeof v.then == "function" ? v.then(n, s) : p(v) ? Promise.all(v).then(n, s) : n(v);
4580
+ return m.done ? v : v && typeof v.then == "function" ? v.then(n, r) : p(v) ? Promise.all(v).then(n, r) : n(v);
4580
4581
  };
4581
4582
  }
4582
4583
  return o(t)();
4583
4584
  }
4584
4585
  function On(e, t, n) {
4585
- for (var s = p(e) ? e.slice() : [e], o = 0; o < n; ++o) s.push(t);
4586
- return s;
4586
+ for (var r = p(e) ? e.slice() : [e], o = 0; o < n; ++o) r.push(t);
4587
+ return r;
4587
4588
  }
4588
4589
  var gi = { stack: "dbcore", name: "VirtualIndexMiddleware", level: 1, create: function(e) {
4589
4590
  return a(a({}, e), { table: function(t) {
4590
- var n = e.table(t), s = n.schema, o = {}, f = [];
4591
+ var n = e.table(t), r = n.schema, o = {}, f = [];
4591
4592
  function d(g, R, b) {
4592
4593
  var x = Wt(g), S = o[x] = o[x] || [], A = g == null ? 0 : typeof g == "string" ? 1 : g.length, k = 0 < R, k = a(a({}, b), { name: k ? "".concat(x, "(virtual-from:").concat(b.name, ")") : b.name, lowLevelIndex: b, isVirtual: k, keyTail: R, keyLength: A, extractKey: rr(g), unique: !k && b.unique });
4593
4594
  return S.push(k), k.isPrimaryKey || f.push(k), 1 < A && d(A === 2 ? g[0] : g.slice(0, A - 1), R + 1, b), S.sort(function(O, M) {
4594
4595
  return O.keyTail - M.keyTail;
4595
4596
  }), k;
4596
4597
  }
4597
- t = d(s.primaryKey.keyPath, 0, s.primaryKey), o[":id"] = [t];
4598
- for (var m = 0, v = s.indexes; m < v.length; m++) {
4598
+ t = d(r.primaryKey.keyPath, 0, r.primaryKey), o[":id"] = [t];
4599
+ for (var m = 0, v = r.indexes; m < v.length; m++) {
4599
4600
  var w = v[m];
4600
4601
  d(w.keyPath, 0, w);
4601
4602
  }
@@ -4603,7 +4604,7 @@ function sa() {
4603
4604
  var R, b = g.query.index;
4604
4605
  return b.isVirtual ? a(a({}, g), { query: { index: b.lowLevelIndex, range: (R = g.query.range, b = b.keyTail, { type: R.type === 1 ? 2 : R.type, lower: On(R.lower, R.lowerOpen ? e.MAX_KEY : e.MIN_KEY, b), lowerOpen: !0, upper: On(R.upper, R.upperOpen ? e.MIN_KEY : e.MAX_KEY, b), upperOpen: !0 }) } }) : g;
4605
4606
  }
4606
- return a(a({}, n), { schema: a(a({}, s), { primaryKey: t, indexes: f, getIndexByKeyPath: function(g) {
4607
+ return a(a({}, n), { schema: a(a({}, r), { primaryKey: t, indexes: f, getIndexByKeyPath: function(g) {
4607
4608
  return (g = o[Wt(g)]) && g[0];
4608
4609
  } }), count: function(g) {
4609
4610
  return n.count(T(g));
@@ -4631,12 +4632,12 @@ function sa() {
4631
4632
  } });
4632
4633
  } });
4633
4634
  } };
4634
- function yr(e, t, n, s) {
4635
- return n = n || {}, s = s || "", l(e).forEach(function(o) {
4635
+ function yr(e, t, n, r) {
4636
+ return n = n || {}, r = r || "", l(e).forEach(function(o) {
4636
4637
  var f, d, m;
4637
- _(t, o) ? (f = e[o], d = t[o], typeof f == "object" && typeof d == "object" && f && d ? (m = Pe(f)) !== Pe(d) ? n[s + o] = t[o] : m === "Object" ? yr(f, d, n, s + o + ".") : f !== d && (n[s + o] = t[o]) : f !== d && (n[s + o] = t[o])) : n[s + o] = void 0;
4638
+ _(t, o) ? (f = e[o], d = t[o], typeof f == "object" && typeof d == "object" && f && d ? (m = Pe(f)) !== Pe(d) ? n[r + o] = t[o] : m === "Object" ? yr(f, d, n, r + o + ".") : f !== d && (n[r + o] = t[o]) : f !== d && (n[r + o] = t[o])) : n[r + o] = void 0;
4638
4639
  }), l(t).forEach(function(o) {
4639
- _(e, o) || (n[s + o] = t[o]);
4640
+ _(e, o) || (n[r + o] = t[o]);
4640
4641
  }), n;
4641
4642
  }
4642
4643
  function gr(e, t) {
@@ -4644,7 +4645,7 @@ function sa() {
4644
4645
  }
4645
4646
  var vi = { stack: "dbcore", name: "HooksMiddleware", level: 2, create: function(e) {
4646
4647
  return a(a({}, e), { table: function(t) {
4647
- var n = e.table(t), s = n.schema.primaryKey;
4648
+ var n = e.table(t), r = n.schema.primaryKey;
4648
4649
  return a(a({}, n), { mutate: function(o) {
4649
4650
  var f = z.trans, d = f.table(t).hook, m = d.deleting, v = d.creating, w = d.updating;
4650
4651
  switch (o.type) {
@@ -4667,7 +4668,7 @@ function sa() {
4667
4668
  if (m.fire === ue) break;
4668
4669
  return f._promise("readwrite", function() {
4669
4670
  return function g(R, b, x) {
4670
- return n.query({ trans: R, values: !1, query: { index: s, range: b }, limit: x }).then(function(S) {
4671
+ return n.query({ trans: R, values: !1, query: { index: r, range: b }, limit: x }).then(function(S) {
4671
4672
  var A = S.result;
4672
4673
  return T({ type: "delete", keys: A, trans: R }).then(function(k) {
4673
4674
  return 0 < k.numFailures ? Promise.reject(k.failures[0]) : A.length < x ? { failures: [], numFailures: 0, lastResult: void 0 } : g(R, a(a({}, b), { lower: A[A.length - 1], lowerOpen: !0 }), x);
@@ -4678,12 +4679,12 @@ function sa() {
4678
4679
  }
4679
4680
  return n.mutate(o);
4680
4681
  function T(g) {
4681
- var R, b, x, S = z.trans, A = g.keys || gr(s, g);
4682
+ var R, b, x, S = z.trans, A = g.keys || gr(r, g);
4682
4683
  if (!A) throw new Error("Keys missing");
4683
4684
  return (g = g.type === "add" || g.type === "put" ? a(a({}, g), { keys: A }) : a({}, g)).type !== "delete" && (g.values = u([], g.values)), g.keys && (g.keys = u([], g.keys)), R = n, x = A, ((b = g).type === "add" ? Promise.resolve([]) : R.getMany({ trans: b.trans, keys: x, cache: "immutable" })).then(function(k) {
4684
4685
  var O = A.map(function(M, I) {
4685
4686
  var D, K, N, F = k[I], B = { onerror: null, onsuccess: null };
4686
- return g.type === "delete" ? m.fire.call(B, M, F, S) : g.type === "add" || F === void 0 ? (D = v.fire.call(B, M, g.values[I], S), M == null && D != null && (g.keys[I] = M = D, s.outbound || ae(g.values[I], s.keyPath, M))) : (D = yr(F, g.values[I]), (K = w.fire.call(B, D, M, F, S)) && (N = g.values[I], Object.keys(K).forEach(function(j) {
4687
+ return g.type === "delete" ? m.fire.call(B, M, F, S) : g.type === "add" || F === void 0 ? (D = v.fire.call(B, M, g.values[I], S), M == null && D != null && (g.keys[I] = M = D, r.outbound || ae(g.values[I], r.keyPath, M))) : (D = yr(F, g.values[I]), (K = w.fire.call(B, D, M, F, S)) && (N = g.values[I], Object.keys(K).forEach(function(j) {
4687
4688
  _(N, j) ? N[j] = K[j] : ae(N, j, K[j]);
4688
4689
  }))), B;
4689
4690
  });
@@ -4706,8 +4707,8 @@ function sa() {
4706
4707
  function ls(e, t, n) {
4707
4708
  try {
4708
4709
  if (!t || t.keys.length < e.length) return null;
4709
- for (var s = [], o = 0, f = 0; o < t.keys.length && f < e.length; ++o) re(t.keys[o], e[f]) === 0 && (s.push(n ? me(t.values[o]) : t.values[o]), ++f);
4710
- return s.length === e.length ? s : null;
4710
+ for (var r = [], o = 0, f = 0; o < t.keys.length && f < e.length; ++o) re(t.keys[o], e[f]) === 0 && (r.push(n ? me(t.values[o]) : t.values[o]), ++f);
4711
+ return r.length === e.length ? r : null;
4711
4712
  } catch {
4712
4713
  return null;
4713
4714
  }
@@ -4715,14 +4716,14 @@ function sa() {
4715
4716
  var bi = { stack: "dbcore", level: -1, create: function(e) {
4716
4717
  return { table: function(t) {
4717
4718
  var n = e.table(t);
4718
- return a(a({}, n), { getMany: function(s) {
4719
- if (!s.cache) return n.getMany(s);
4720
- var o = ls(s.keys, s.trans._cache, s.cache === "clone");
4721
- return o ? U.resolve(o) : n.getMany(s).then(function(f) {
4722
- return s.trans._cache = { keys: s.keys, values: s.cache === "clone" ? me(f) : f }, f;
4719
+ return a(a({}, n), { getMany: function(r) {
4720
+ if (!r.cache) return n.getMany(r);
4721
+ var o = ls(r.keys, r.trans._cache, r.cache === "clone");
4722
+ return o ? U.resolve(o) : n.getMany(r).then(function(f) {
4723
+ return r.trans._cache = { keys: r.keys, values: r.cache === "clone" ? me(f) : f }, f;
4723
4724
  });
4724
- }, mutate: function(s) {
4725
- return s.type !== "add" && (s.trans._cache = null), n.mutate(s);
4725
+ }, mutate: function(r) {
4726
+ return r.type !== "add" && (r.trans._cache = null), n.mutate(r);
4726
4727
  } });
4727
4728
  } };
4728
4729
  } };
@@ -4742,15 +4743,15 @@ function sa() {
4742
4743
  }
4743
4744
  var wi = { stack: "dbcore", level: 0, name: "Observability", create: function(e) {
4744
4745
  var t = e.schema.name, n = new Te(e.MIN_KEY, e.MAX_KEY);
4745
- return a(a({}, e), { transaction: function(s, o, f) {
4746
+ return a(a({}, e), { transaction: function(r, o, f) {
4746
4747
  if (z.subscr && o !== "readonly") throw new V.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(z.querier));
4747
- return e.transaction(s, o, f);
4748
- }, table: function(s) {
4749
- var o = e.table(s), f = o.schema, d = f.primaryKey, g = f.indexes, m = d.extractKey, v = d.outbound, w = d.autoIncrement && g.filter(function(b) {
4748
+ return e.transaction(r, o, f);
4749
+ }, table: function(r) {
4750
+ var o = e.table(r), f = o.schema, d = f.primaryKey, g = f.indexes, m = d.extractKey, v = d.outbound, w = d.autoIncrement && g.filter(function(b) {
4750
4751
  return b.compound && b.keyPath.includes(d.keyPath);
4751
4752
  }), T = a(a({}, o), { mutate: function(b) {
4752
4753
  function x(j) {
4753
- return j = "idb://".concat(t, "/").concat(s, "/").concat(j), M[j] || (M[j] = new Te());
4754
+ return j = "idb://".concat(t, "/").concat(r, "/").concat(j), M[j] || (M[j] = new Te());
4754
4755
  }
4755
4756
  var S, A, k, O = b.trans, M = b.mutatedParts || (b.mutatedParts = {}), I = x(""), D = x(":dels"), K = b.type, B = b.type === "deleteRange" ? [b.range] : b.type === "delete" ? [b.keys] : b.values.length < 50 ? [gr(d, b).filter(function(j) {
4756
4757
  return j;
@@ -4794,7 +4795,7 @@ function sa() {
4794
4795
  var S = z.subscr, A = !!S, k = fs(z, o) && hs(b, x) ? x.obsSet = {} : S;
4795
4796
  if (A) {
4796
4797
  var O = function(F) {
4797
- return F = "idb://".concat(t, "/").concat(s, "/").concat(F), k[F] || (k[F] = new Te());
4798
+ return F = "idb://".concat(t, "/").concat(r, "/").concat(F), k[F] || (k[F] = new Te());
4798
4799
  }, M = O(""), I = O(":dels"), S = R[b](x), A = S[0], S = S[1];
4799
4800
  if ((b === "query" && A.isPrimaryKey && !x.values ? I : O(A.name || "")).add(S), !A.isPrimaryKey) {
4800
4801
  if (b !== "count") {
@@ -4831,20 +4832,20 @@ function sa() {
4831
4832
  function ds(e, t, n) {
4832
4833
  if (n.numFailures === 0) return t;
4833
4834
  if (t.type === "deleteRange") return null;
4834
- var s = t.keys ? t.keys.length : "values" in t && t.values ? t.values.length : 1;
4835
- return n.numFailures === s ? null : (t = a({}, t), p(t.keys) && (t.keys = t.keys.filter(function(o, f) {
4835
+ var r = t.keys ? t.keys.length : "values" in t && t.values ? t.values.length : 1;
4836
+ return n.numFailures === r ? null : (t = a({}, t), p(t.keys) && (t.keys = t.keys.filter(function(o, f) {
4836
4837
  return !(f in n.failures);
4837
4838
  })), "values" in t && p(t.values) && (t.values = t.values.filter(function(o, f) {
4838
4839
  return !(f in n.failures);
4839
4840
  })), t);
4840
4841
  }
4841
4842
  function vr(e, t) {
4842
- return n = e, ((s = t).lower === void 0 || (s.lowerOpen ? 0 < re(n, s.lower) : 0 <= re(n, s.lower))) && (e = e, (t = t).upper === void 0 || (t.upperOpen ? re(e, t.upper) < 0 : re(e, t.upper) <= 0));
4843
- var n, s;
4843
+ return n = e, ((r = t).lower === void 0 || (r.lowerOpen ? 0 < re(n, r.lower) : 0 <= re(n, r.lower))) && (e = e, (t = t).upper === void 0 || (t.upperOpen ? re(e, t.upper) < 0 : re(e, t.upper) <= 0));
4844
+ var n, r;
4844
4845
  }
4845
- function ps(e, t, R, s, o, f) {
4846
+ function ps(e, t, R, r, o, f) {
4846
4847
  if (!R || R.length === 0) return e;
4847
- var d = t.query.index, m = d.multiEntry, v = t.query.range, w = s.schema.primaryKey.extractKey, T = d.extractKey, g = (d.lowLevelIndex || d).extractKey, R = R.reduce(function(b, x) {
4848
+ var d = t.query.index, m = d.multiEntry, v = t.query.range, w = r.schema.primaryKey.extractKey, T = d.extractKey, g = (d.lowLevelIndex || d).extractKey, R = R.reduce(function(b, x) {
4848
4849
  var S = b, A = [];
4849
4850
  if (x.type === "add" || x.type === "put") for (var k = new Te(), O = x.values.length - 1; 0 <= O; --O) {
4850
4851
  var M, I = x.values[O], D = w(I);
@@ -4896,28 +4897,28 @@ function sa() {
4896
4897
  return re(e.lower, t.lower) === 0 && re(e.upper, t.upper) === 0 && !!e.lowerOpen == !!t.lowerOpen && !!e.upperOpen == !!t.upperOpen;
4897
4898
  }
4898
4899
  function _i(e, t) {
4899
- return function(n, s, o, f) {
4900
- if (n === void 0) return s !== void 0 ? -1 : 0;
4901
- if (s === void 0) return 1;
4902
- if ((s = re(n, s)) === 0) {
4900
+ return function(n, r, o, f) {
4901
+ if (n === void 0) return r !== void 0 ? -1 : 0;
4902
+ if (r === void 0) return 1;
4903
+ if ((r = re(n, r)) === 0) {
4903
4904
  if (o && f) return 0;
4904
4905
  if (o) return 1;
4905
4906
  if (f) return -1;
4906
4907
  }
4907
- return s;
4908
- }(e.lower, t.lower, e.lowerOpen, t.lowerOpen) <= 0 && 0 <= function(n, s, o, f) {
4909
- if (n === void 0) return s !== void 0 ? 1 : 0;
4910
- if (s === void 0) return -1;
4911
- if ((s = re(n, s)) === 0) {
4908
+ return r;
4909
+ }(e.lower, t.lower, e.lowerOpen, t.lowerOpen) <= 0 && 0 <= function(n, r, o, f) {
4910
+ if (n === void 0) return r !== void 0 ? 1 : 0;
4911
+ if (r === void 0) return -1;
4912
+ if ((r = re(n, r)) === 0) {
4912
4913
  if (o && f) return 0;
4913
4914
  if (o) return -1;
4914
4915
  if (f) return 1;
4915
4916
  }
4916
- return s;
4917
+ return r;
4917
4918
  }(e.upper, t.upper, e.upperOpen, t.upperOpen);
4918
4919
  }
4919
- function Ai(e, t, n, s) {
4920
- e.subscribers.add(n), s.addEventListener("abort", function() {
4920
+ function Ai(e, t, n, r) {
4921
+ e.subscribers.add(n), r.addEventListener("abort", function() {
4921
4922
  var o, f;
4922
4923
  e.subscribers.delete(n), e.subscribers.size === 0 && (o = e, f = t, setTimeout(function() {
4923
4924
  o.subscribers.size === 0 && Fe(f, o);
@@ -4926,11 +4927,11 @@ function sa() {
4926
4927
  }
4927
4928
  var xi = { stack: "dbcore", level: 0, name: "Cache", create: function(e) {
4928
4929
  var t = e.schema.name;
4929
- return a(a({}, e), { transaction: function(n, s, o) {
4930
- var f, d, m = e.transaction(n, s, o);
4931
- return s === "readwrite" && (d = (f = new AbortController()).signal, o = function(v) {
4930
+ return a(a({}, e), { transaction: function(n, r, o) {
4931
+ var f, d, m = e.transaction(n, r, o);
4932
+ return r === "readwrite" && (d = (f = new AbortController()).signal, o = function(v) {
4932
4933
  return function() {
4933
- if (f.abort(), s === "readwrite") {
4934
+ if (f.abort(), r === "readwrite") {
4934
4935
  for (var w = /* @__PURE__ */ new Set(), T = 0, g = n; T < g.length; T++) {
4935
4936
  var R = g[T], b = vt["idb://".concat(t, "/").concat(R)];
4936
4937
  if (b) {
@@ -4959,12 +4960,12 @@ function sa() {
4959
4960
  };
4960
4961
  }, m.addEventListener("abort", o(!1), { signal: d }), m.addEventListener("error", o(!1), { signal: d }), m.addEventListener("complete", o(!0), { signal: d })), m;
4961
4962
  }, table: function(n) {
4962
- var s = e.table(n), o = s.schema.primaryKey;
4963
- return a(a({}, s), { mutate: function(f) {
4963
+ var r = e.table(n), o = r.schema.primaryKey;
4964
+ return a(a({}, r), { mutate: function(f) {
4964
4965
  var d = z.trans;
4965
- if (o.outbound || d.db._options.cache === "disabled" || d.explicit || d.idbtrans.mode !== "readwrite") return s.mutate(f);
4966
+ if (o.outbound || d.db._options.cache === "disabled" || d.explicit || d.idbtrans.mode !== "readwrite") return r.mutate(f);
4966
4967
  var m = vt["idb://".concat(t, "/").concat(n)];
4967
- return m ? (d = s.mutate(f), f.type !== "add" && f.type !== "put" || !(50 <= f.values.length || gr(o, f).some(function(v) {
4968
+ return m ? (d = r.mutate(f), f.type !== "add" && f.type !== "put" || !(50 <= f.values.length || gr(o, f).some(function(v) {
4968
4969
  return v == null;
4969
4970
  })) ? (m.optimisticOps.push(f), f.mutatedParts && kn(f.mutatedParts), d.then(function(v) {
4970
4971
  0 < v.numFailures && (Fe(m.optimisticOps, f), (v = ds(0, f, v)) && m.optimisticOps.push(v), f.mutatedParts && kn(f.mutatedParts));
@@ -4978,9 +4979,9 @@ function sa() {
4978
4979
  m.optimisticOps.push(w), queueMicrotask(function() {
4979
4980
  return f.mutatedParts && kn(f.mutatedParts);
4980
4981
  });
4981
- }), d) : s.mutate(f);
4982
+ }), d) : r.mutate(f);
4982
4983
  }, query: function(f) {
4983
- if (!fs(z, s) || !hs("query", f)) return s.query(f);
4984
+ if (!fs(z, r) || !hs("query", f)) return r.query(f);
4984
4985
  var d = ((w = z.trans) === null || w === void 0 ? void 0 : w.db._options.cache) === "immutable", g = z, m = g.requery, v = g.signal, w = function(x, S, A, k) {
4985
4986
  var O = vt["idb://".concat(x, "/").concat(S)];
4986
4987
  if (!O) return [];
@@ -5001,7 +5002,7 @@ function sa() {
5001
5002
  }), [I, !!I, O, M];
5002
5003
  }
5003
5004
  }(t, n, "query", f), T = w[0], g = w[1], R = w[2], b = w[3];
5004
- return T && g ? T.obsSet = f.obsSet : (g = s.query(f).then(function(x) {
5005
+ return T && g ? T.obsSet = f.obsSet : (g = r.query(f).then(function(x) {
5005
5006
  var S = x.result;
5006
5007
  if (T && (T.res = S), d) {
5007
5008
  for (var A = 0, k = S.length; A < k; ++A) Object.freeze(S[A]);
@@ -5011,43 +5012,43 @@ function sa() {
5011
5012
  }).catch(function(x) {
5012
5013
  return b && T && Fe(b, T), Promise.reject(x);
5013
5014
  }), T = { obsSet: f.obsSet, promise: g, subscribers: /* @__PURE__ */ new Set(), type: "query", req: f, dirty: !1 }, b ? b.push(T) : (b = [T], (R = R || (vt["idb://".concat(t, "/").concat(n)] = { queries: { query: {}, count: {} }, objs: /* @__PURE__ */ new Map(), optimisticOps: [], unsignaledParts: {} })).queries.query[f.query.index.name || ""] = b)), Ai(T, b, m, v), T.promise.then(function(x) {
5014
- return { result: ps(x.result, f, R == null ? void 0 : R.optimisticOps, s, T, d) };
5015
+ return { result: ps(x.result, f, R == null ? void 0 : R.optimisticOps, r, T, d) };
5015
5016
  });
5016
5017
  } });
5017
5018
  } });
5018
5019
  } };
5019
5020
  function Mn(e, t) {
5020
- return new Proxy(e, { get: function(n, s, o) {
5021
- return s === "db" ? t : Reflect.get(n, s, o);
5021
+ return new Proxy(e, { get: function(n, r, o) {
5022
+ return r === "db" ? t : Reflect.get(n, r, o);
5022
5023
  } });
5023
5024
  }
5024
5025
  var We = (ge.prototype.version = function(e) {
5025
5026
  if (isNaN(e) || e < 0.1) throw new V.Type("Given version is not a positive number");
5026
5027
  if (e = Math.round(10 * e) / 10, this.idbdb || this._state.isBeingOpened) throw new V.Schema("Cannot add version when database is open");
5027
5028
  this.verno = Math.max(this.verno, e);
5028
- var t = this._versions, n = t.filter(function(s) {
5029
- return s._cfg.version === e;
5029
+ var t = this._versions, n = t.filter(function(r) {
5030
+ return r._cfg.version === e;
5030
5031
  })[0];
5031
5032
  return n || (n = new this.Version(e), t.push(n), t.sort(hi), n.stores({}), this._state.autoSchema = !1, n);
5032
5033
  }, ge.prototype._whenReady = function(e) {
5033
5034
  var t = this;
5034
- return this.idbdb && (this._state.openComplete || z.letThrough || this._vip) ? e() : new U(function(n, s) {
5035
- if (t._state.openComplete) return s(new V.DatabaseClosed(t._state.dbOpenError));
5035
+ return this.idbdb && (this._state.openComplete || z.letThrough || this._vip) ? e() : new U(function(n, r) {
5036
+ if (t._state.openComplete) return r(new V.DatabaseClosed(t._state.dbOpenError));
5036
5037
  if (!t._state.isBeingOpened) {
5037
- if (!t._state.autoOpen) return void s(new V.DatabaseClosed());
5038
+ if (!t._state.autoOpen) return void r(new V.DatabaseClosed());
5038
5039
  t.open().catch(ue);
5039
5040
  }
5040
- t._state.dbReadyPromise.then(n, s);
5041
+ t._state.dbReadyPromise.then(n, r);
5041
5042
  }).then(e);
5042
5043
  }, ge.prototype.use = function(e) {
5043
- var t = e.stack, n = e.create, s = e.level, o = e.name;
5044
- return o && this.unuse({ stack: t, name: o }), e = this._middlewares[t] || (this._middlewares[t] = []), e.push({ stack: t, create: n, level: s ?? 10, name: o }), e.sort(function(f, d) {
5044
+ var t = e.stack, n = e.create, r = e.level, o = e.name;
5045
+ return o && this.unuse({ stack: t, name: o }), e = this._middlewares[t] || (this._middlewares[t] = []), e.push({ stack: t, create: n, level: r ?? 10, name: o }), e.sort(function(f, d) {
5045
5046
  return f.level - d.level;
5046
5047
  }), this;
5047
5048
  }, ge.prototype.unuse = function(e) {
5048
- var t = e.stack, n = e.name, s = e.create;
5049
+ var t = e.stack, n = e.name, r = e.create;
5049
5050
  return t && this._middlewares[t] && (this._middlewares[t] = this._middlewares[t].filter(function(o) {
5050
- return s ? o.create !== s : !!n && o.name !== n;
5051
+ return r ? o.create !== r : !!n && o.name !== n;
5051
5052
  })), this;
5052
5053
  }, ge.prototype.open = function() {
5053
5054
  var e = this;
@@ -5065,8 +5066,8 @@ function sa() {
5065
5066
  }
5066
5067
  e.isBeingOpened || (e.dbReadyPromise = new U(function(n) {
5067
5068
  e.dbReadyResolve = n;
5068
- }), e.openCanceller = new U(function(n, s) {
5069
- e.cancelOpen = s;
5069
+ }), e.openCanceller = new U(function(n, r) {
5070
+ e.cancelOpen = r;
5070
5071
  }));
5071
5072
  }, ge.prototype.close = function(n) {
5072
5073
  var t = (n === void 0 ? { disableAutoOpen: !0 } : n).disableAutoOpen, n = this._state;
@@ -5074,7 +5075,7 @@ function sa() {
5074
5075
  }, ge.prototype.delete = function(e) {
5075
5076
  var t = this;
5076
5077
  e === void 0 && (e = { disableAutoOpen: !0 });
5077
- var n = 0 < arguments.length && typeof arguments[0] != "object", s = this._state;
5078
+ var n = 0 < arguments.length && typeof arguments[0] != "object", r = this._state;
5078
5079
  return new U(function(o, f) {
5079
5080
  function d() {
5080
5081
  t.close(e);
@@ -5085,7 +5086,7 @@ function sa() {
5085
5086
  }), m.onerror = Ue(f), m.onblocked = t._fireOnBlocked;
5086
5087
  }
5087
5088
  if (n) throw new V.InvalidArgument("Invalid closeOptions argument to db.delete()");
5088
- s.isBeingOpened ? s.dbReadyPromise.then(d) : d();
5089
+ r.isBeingOpened ? r.dbReadyPromise.then(d) : d();
5089
5090
  });
5090
5091
  }, ge.prototype.backendDB = function() {
5091
5092
  return this.idbdb;
@@ -5104,21 +5105,21 @@ function sa() {
5104
5105
  return e._allTables[t];
5105
5106
  });
5106
5107
  }, enumerable: !1, configurable: !0 }), ge.prototype.transaction = function() {
5107
- var e = (function(t, n, s) {
5108
+ var e = (function(t, n, r) {
5108
5109
  var o = arguments.length;
5109
5110
  if (o < 2) throw new V.InvalidArgument("Too few arguments");
5110
5111
  for (var f = new Array(o - 1); --o; ) f[o - 1] = arguments[o];
5111
- return s = f.pop(), [t, Je(f), s];
5112
+ return r = f.pop(), [t, Je(f), r];
5112
5113
  }).apply(this, arguments);
5113
5114
  return this._transaction.apply(this, e);
5114
5115
  }, ge.prototype._transaction = function(e, t, n) {
5115
- var s = this, o = z.trans;
5116
+ var r = this, o = z.trans;
5116
5117
  o && o.db === this && e.indexOf("!") === -1 || (o = null);
5117
5118
  var f, d, m = e.indexOf("?") !== -1;
5118
5119
  e = e.replace("!", "").replace("?", "");
5119
5120
  try {
5120
5121
  if (d = t.map(function(w) {
5121
- if (w = w instanceof s.Table ? w.name : w, typeof w != "string") throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");
5122
+ if (w = w instanceof r.Table ? w.name : w, typeof w != "string") throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");
5122
5123
  return w;
5123
5124
  }), e == "r" || e === Yn) f = Yn;
5124
5125
  else {
@@ -5171,7 +5172,7 @@ function sa() {
5171
5172
  });
5172
5173
  }).bind(null, this, f, d, o, n);
5173
5174
  return o ? o._promise(f, v, "lock") : z.trans ? mt(z.transless, function() {
5174
- return s._whenReady(v);
5175
+ return r._whenReady(v);
5175
5176
  }) : this._whenReady(v);
5176
5177
  }, ge.prototype.table = function(e) {
5177
5178
  if (!_(this._allTables, e)) throw new V.InvalidTable("Table ".concat(e, " does not exist"));
@@ -5180,8 +5181,8 @@ function sa() {
5180
5181
  function ge(e, t) {
5181
5182
  var n = this;
5182
5183
  this._middlewares = {}, this.verno = 0;
5183
- var s = ge.dependencies;
5184
- this._options = t = a({ addons: ge.addons, autoOpen: !0, indexedDB: s.indexedDB, IDBKeyRange: s.IDBKeyRange, cache: "cloned" }, t), this._deps = { indexedDB: t.indexedDB, IDBKeyRange: t.IDBKeyRange }, s = t.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
5184
+ var r = ge.dependencies;
5185
+ this._options = t = a({ addons: ge.addons, autoOpen: !0, indexedDB: r.indexedDB, IDBKeyRange: r.IDBKeyRange, cache: "cloned" }, t), this._deps = { indexedDB: t.indexedDB, IDBKeyRange: t.IDBKeyRange }, r = t.addons, this._dbSchema = {}, this._versions = [], this._storeNames = [], this._allTables = {}, this.idbdb = null, this._novip = this;
5185
5186
  var o, f, d, m, v, w = { dbOpenError: null, isBeingOpened: !1, onReadyBeingFired: null, openComplete: !1, dbReadyResolve: ue, dbReadyPromise: null, cancelOpen: ue, openCanceller: null, autoSchema: !0, PR1398_maxLoop: 3, autoOpen: t.autoOpen };
5186
5187
  w.dbReadyPromise = new U(function(g) {
5187
5188
  w.dbReadyResolve = g;
@@ -5253,7 +5254,7 @@ function sa() {
5253
5254
  return Mn(x.apply(this, arguments), T);
5254
5255
  } : x;
5255
5256
  } });
5256
- this.vip = T, s.forEach(function(g) {
5257
+ this.vip = T, r.forEach(function(g) {
5257
5258
  return g(n);
5258
5259
  });
5259
5260
  }
@@ -5271,7 +5272,7 @@ function sa() {
5271
5272
  Pn = { indexedDB: null, IDBKeyRange: null };
5272
5273
  }
5273
5274
  function ys(e) {
5274
- var t, n = !1, s = new Ti(function(o) {
5275
+ var t, n = !1, r = new Ti(function(o) {
5275
5276
  var f = rn(e), d, m = !1, v = {}, w = {}, T = { get closed() {
5276
5277
  return m;
5277
5278
  }, unsubscribe: function() {
@@ -5308,11 +5309,11 @@ function sa() {
5308
5309
  };
5309
5310
  return setTimeout(R, 0), T;
5310
5311
  });
5311
- return s.hasValue = function() {
5312
+ return r.hasValue = function() {
5312
5313
  return n;
5313
- }, s.getValue = function() {
5314
+ }, r.getValue = function() {
5314
5315
  return t;
5315
- }, s;
5316
+ }, r;
5316
5317
  }
5317
5318
  var bt = We;
5318
5319
  function wr(e) {
@@ -5333,8 +5334,8 @@ function sa() {
5333
5334
  });
5334
5335
  }, getDatabaseNames: function(e) {
5335
5336
  try {
5336
- return t = bt.dependencies, n = t.indexedDB, t = t.IDBKeyRange, (ur(n) ? Promise.resolve(n.databases()).then(function(s) {
5337
- return s.map(function(o) {
5337
+ return t = bt.dependencies, n = t.indexedDB, t = t.IDBKeyRange, (ur(n) ? Promise.resolve(n.databases()).then(function(r) {
5338
+ return r.map(function(o) {
5338
5339
  return o.name;
5339
5340
  }).filter(function(o) {
5340
5341
  return o !== mn;
@@ -5361,8 +5362,8 @@ function sa() {
5361
5362
  };
5362
5363
  }, spawn: function(e, t, n) {
5363
5364
  try {
5364
- var s = mr(e.apply(n, t || []));
5365
- return s && typeof s.then == "function" ? s : U.resolve(s);
5365
+ var r = mr(e.apply(n, t || []));
5366
+ return r && typeof r.then == "function" ? r : U.resolve(r);
5366
5367
  } catch (o) {
5367
5368
  return ye(o);
5368
5369
  }
@@ -5439,11 +5440,11 @@ class oa {
5439
5440
  * @param {Object} tableDefinitions - 表定义对象,例如 { models: "&path, data" }
5440
5441
  * @param {number} version - 数据库版本号
5441
5442
  */
5442
- constructor(r = "threeJsIDBCache", i = 2) {
5443
- this.version = i, this.dbName = r, this.dbInit();
5443
+ constructor(s = "threeJsIDBCache", i = 3) {
5444
+ this.version = i, this.dbName = s, this.dbInit();
5444
5445
  }
5445
5446
  dbInit() {
5446
- this.db = new Fn(this.dbName), this.materialMap = {}, this.db.version(this.version).stores({ models: "&version, path, data" });
5447
+ this.db = new Fn(this.dbName), this.materialMap = {}, this.db.version(this.version).stores({ models: "&path, version, data" });
5447
5448
  }
5448
5449
  /**
5449
5450
  * 获取 Dexie 数据库实例
@@ -5457,21 +5458,21 @@ class oa {
5457
5458
  * @param {THREE.Object3D} object - 要序列化的对象
5458
5459
  * @returns {Object} 序列化后的数据
5459
5460
  */
5460
- serObject3D(r) {
5461
+ serObject3D(s) {
5461
5462
  const i = {
5462
- type: r.type,
5463
- name: r.name,
5464
- position: r.position.toArray(),
5465
- rotation: r.rotation.toArray(),
5466
- scale: r.scale.toArray(),
5467
- visible: r.visible,
5463
+ type: s.type,
5464
+ name: s.name,
5465
+ position: s.position.toArray(),
5466
+ rotation: s.rotation.toArray(),
5467
+ scale: s.scale.toArray(),
5468
+ visible: s.visible,
5468
5469
  children: [],
5469
5470
  geometry: null,
5470
5471
  material: null,
5471
- userData: r.userData
5472
+ userData: s.userData
5472
5473
  };
5473
- r.isMesh && (i.geometry = this.serGeometry(r.geometry), i.material = this.serMaterial(r.material));
5474
- for (const a of r.children)
5474
+ s.isMesh && (i.geometry = this.serGeometry(s.geometry), i.material = this.serMaterial(s.material));
5475
+ for (const a of s.children)
5475
5476
  i.children.push(this.serObject3D(a));
5476
5477
  return i;
5477
5478
  }
@@ -5480,8 +5481,8 @@ class oa {
5480
5481
  * @param {THREE.BufferGeometry} geometry - 几何体
5481
5482
  * @returns {Object} 序列化后的几何体数据
5482
5483
  */
5483
- serGeometry(r) {
5484
- const i = [], { attributes: a, index: u, type: c } = r;
5484
+ serGeometry(s) {
5485
+ const i = [], { attributes: a, index: u, type: c } = s;
5485
5486
  a.position && (i.position = {
5486
5487
  type: "Float32Array",
5487
5488
  array: Array.from(a.position.array),
@@ -5510,8 +5511,8 @@ class oa {
5510
5511
  * @param {Object} data - 序列化后的几何体数据
5511
5512
  * @returns {THREE.BufferGeometry} 反序列化后的几何体
5512
5513
  */
5513
- reSerGeometry(r) {
5514
- const { type: i, attributes: a, index: u } = r, c = new _t.BufferGeometry();
5514
+ reSerGeometry(s) {
5515
+ const { type: i, attributes: a, index: u } = s, c = new _t.BufferGeometry();
5515
5516
  return Object.keys(a).forEach((l) => {
5516
5517
  const { type: p, array: h, itemSize: y } = a[l];
5517
5518
  c.setAttribute(
@@ -5525,20 +5526,20 @@ class oa {
5525
5526
  * @param {THREE.Material} material - 材质
5526
5527
  * @returns {Object} 序列化后的材质数据
5527
5528
  */
5528
- serMaterial(r) {
5529
+ serMaterial(s) {
5529
5530
  return {
5530
- type: r.type,
5531
- color: r.color.getHex(),
5532
- map: r.map ? r.map.image.src : null,
5533
- opacity: r.opacity,
5534
- name: r.name,
5535
- depthTest: r.depthTest,
5536
- depthWrite: r.depthWrite,
5537
- transparent: r.transparent,
5538
- side: r.side,
5539
- roughness: r.roughness,
5540
- metalness: r.metalness,
5541
- emissive: r.emissive.getHex()
5531
+ type: s.type,
5532
+ color: s.color.getHex(),
5533
+ map: s.map ? s.map.image.src : null,
5534
+ opacity: s.opacity,
5535
+ name: s.name,
5536
+ depthTest: s.depthTest,
5537
+ depthWrite: s.depthWrite,
5538
+ transparent: s.transparent,
5539
+ side: s.side,
5540
+ roughness: s.roughness,
5541
+ metalness: s.metalness,
5542
+ emissive: s.emissive.getHex()
5542
5543
  };
5543
5544
  }
5544
5545
  /**
@@ -5546,25 +5547,25 @@ class oa {
5546
5547
  * @param {Object} data - 序列化后的材质数据
5547
5548
  * @returns {THREE.Material} 反序列化后的材质
5548
5549
  */
5549
- reSerMaterial(r) {
5550
- if (this.materialMap[r.name]) return this.materialMap[r.name];
5551
- const { type: i, ...a } = r, u = i || "MeshStandardMaterial", c = new _t[u]({ ...a });
5552
- if (r.map) {
5553
- const l = new _t.TextureLoader().load(r.map);
5550
+ reSerMaterial(s) {
5551
+ if (this.materialMap[s.name]) return this.materialMap[s.name];
5552
+ const { type: i, ...a } = s, u = i || "MeshStandardMaterial", c = new _t[u]({ ...a });
5553
+ if (s.map) {
5554
+ const l = new _t.TextureLoader().load(s.map);
5554
5555
  c.map = l;
5555
5556
  }
5556
- return c.needsUpdate = !0, this.materialMap[r.name] = c, c;
5557
+ return c.needsUpdate = !0, this.materialMap[s.name] = c, c;
5557
5558
  }
5558
5559
  /**
5559
5560
  * 反序列化 Three.js 对象
5560
5561
  * @param {Object} data - 序列化后的数据
5561
5562
  * @returns {THREE.Object3D} 反序列化后的对象
5562
5563
  */
5563
- reSerObject3D(r) {
5564
+ reSerObject3D(s) {
5564
5565
  let i;
5565
- switch (r.type) {
5566
+ switch (s.type) {
5566
5567
  case "Mesh":
5567
- const a = this.reSerGeometry(r.geometry), u = this.reSerMaterial(r.material);
5568
+ const a = this.reSerGeometry(s.geometry), u = this.reSerMaterial(s.material);
5568
5569
  i = new _t.Mesh(a, u);
5569
5570
  break;
5570
5571
  case "Group":
@@ -5574,10 +5575,10 @@ class oa {
5574
5575
  i = new _t.Object3D();
5575
5576
  break;
5576
5577
  default:
5577
- return console.warn(`Unsupported object type: ${r.type}`), null;
5578
+ return console.warn(`Unsupported object type: ${s.type}`), null;
5578
5579
  }
5579
- i.name = r.name, i.position.fromArray(r.position), i.rotation.fromArray(r.rotation), i.scale.fromArray(r.scale), i.visible = r.visible, i.userData = r.userData;
5580
- for (const a of r.children) {
5580
+ i.name = s.name, i.position.fromArray(s.position), i.rotation.fromArray(s.rotation), i.scale.fromArray(s.scale), i.visible = s.visible, i.userData = s.userData;
5581
+ for (const a of s.children) {
5581
5582
  const u = this.reSerObject3D(a);
5582
5583
  u && i.add(u);
5583
5584
  }
@@ -5589,10 +5590,10 @@ class oa {
5589
5590
  * @param {THREE.Object3D} model - 要缓存的模型
5590
5591
  * @param {string} [version] - 缓存模型版本
5591
5592
  */
5592
- async cacheModel(r, i, a) {
5593
+ async cacheModel(s, i, a) {
5593
5594
  const u = this.serObject3D(i);
5594
5595
  try {
5595
- await this.db.table("models").put({ version: a, path: r, data: u }), console.log(`Model "${r}" cached successfully in table models`);
5596
+ await this.db.table("models").put({ version: a, path: s, data: u }), console.log(`Model "${s}" cached successfully in table models`);
5596
5597
  } catch {
5597
5598
  console.log(" 缓存模型失败 =====> ");
5598
5599
  }
@@ -5602,28 +5603,30 @@ class oa {
5602
5603
  * @param {string} path - 主键值
5603
5604
  * @returns {THREE.Object3D | null} 加载的模型
5604
5605
  */
5605
- async loadCachedModel(r) {
5606
- let i = null;
5606
+ async loadCachedModel(s, i) {
5607
+ let a = null;
5607
5608
  try {
5608
- if (i = await this.db.table("models").get(r), !i)
5609
- return console.warn(`Model "${r}" not found in table models`), null;
5609
+ if (a = await this.db.table("models").get(s), !a)
5610
+ return console.warn(`Model "${i}" not found in table models`), null;
5611
+ if (a.version !== i)
5612
+ return console.log(" =====> 模型版本不一致, 清除当前记录"), await this.db.table("models").delete(s), null;
5610
5613
  } catch {
5611
5614
  return console.log(" =====> 查询表中模型失败"), this.db.delete().then(() => {
5612
5615
  this.init();
5613
5616
  }), null;
5614
5617
  }
5615
5618
  try {
5616
- const a = this.reSerObject3D(i.data);
5617
- return console.log(`Model "${r}" loaded from table models`), a;
5618
- } catch (a) {
5619
- return console.log(" =====> 模型序列号处理失败:", a), null;
5619
+ const u = this.reSerObject3D(a.data);
5620
+ return console.log(`Model "${i}" loaded from table models`), u;
5621
+ } catch (u) {
5622
+ return console.log(" =====> 模型序列号处理失败:", u), null;
5620
5623
  }
5621
5624
  }
5622
5625
  }
5623
5626
  let Ln;
5624
5627
  const Ta = () => {
5625
- const C = new vo(), r = new yo();
5626
- r.setDecoderPath("/draco/"), C.setDRACOLoader(r);
5628
+ const C = new vo(), s = new yo();
5629
+ s.setDecoderPath("/draco/"), C.setDRACOLoader(s);
5627
5630
  function i(c, l, p, h) {
5628
5631
  return C.load(c, l, p, h);
5629
5632
  }
@@ -5634,7 +5637,7 @@ const Ta = () => {
5634
5637
  }
5635
5638
  async function u(c, l, p) {
5636
5639
  Ln || (Ln = new oa());
5637
- const h = await Ln.loadCachedModel(l);
5640
+ const h = await Ln.loadCachedModel(c, l);
5638
5641
  return h || new Promise((y, E) => {
5639
5642
  C.load(c, y, p, E);
5640
5643
  }).then(async (y) => (await Ln.cacheModel(c, y.scene, l), y.scene));