@maptalks/vt 0.67.1 → 0.67.2

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @maptalks/vt v0.67.1
2
+ * @maptalks/vt v0.67.2
3
3
  * LICENSE : undefined
4
4
  * (c) 2016-2022 maptalks.org
5
5
  */
@@ -205,18 +205,22 @@ class Z {
205
205
  this.m = t, this.g = e, this.v = n || [ 0, 1, 0 ];
206
206
  }
207
207
  draw(t, e, n, i, r) {
208
- this.A || this.k();
209
- if (!this._) {
210
- this._ = this.m.buffer(new Uint16Array([ 0, 0, 0, i, 0, i, i, i, i, i, i, 0, i, 0, 0, 0 ]));
208
+ if (this.A || this.k(), !this._) {
209
+ this._ = this.m.buffer(K(i));
211
210
  const t = i / n;
212
- this.S = this.m.buffer(new Uint16Array([ 0, i - 64 * t, 0, i, 512 * t, i - 64 * t, 512 * t, i ]));
211
+ this.S = this.m.buffer(Q(i, t));
213
212
  }
214
- let o = this.T;
213
+ if (i !== this.T) {
214
+ const t = i / n;
215
+ this._(K(i)), this.S(Q(i, t));
216
+ }
217
+ this.T = i;
218
+ let o = this.M;
215
219
  if (!o) {
216
220
  const t = this.g.getDevicePixelRatio() > 1 ? 2 : 1;
217
- o = this.T = document.createElement("canvas"), o.width = 512 * t, o.height = 64 * t;
221
+ o = this.M = document.createElement("canvas"), o.width = 512 * t, o.height = 64 * t;
218
222
  const e = o.getContext("2d");
219
- e.font = "36px monospace", e.scale(t, t), this.M = this.m.texture({
223
+ e.font = "36px monospace", e.scale(t, t), this.P = this.m.texture({
220
224
  width: o.width,
221
225
  height: o.height,
222
226
  data: o
@@ -224,7 +228,7 @@ class Z {
224
228
  }
225
229
  const s = o.getContext("2d");
226
230
  s.clearRect(0, 0, o.width, o.height), s.fillStyle = `rgba(${this.v.map(t => 255 * t).join()})`,
227
- s.fillText(t, 20, 36), this.M({
231
+ s.fillText(t, 20, 36), this.P({
228
232
  width: o.width,
229
233
  height: o.height,
230
234
  data: o
@@ -234,7 +238,7 @@ class Z {
234
238
  debugLine: 1,
235
239
  primitive: "lines",
236
240
  framebuffer: r || null,
237
- image: this.M,
241
+ image: this.P,
238
242
  count: 8
239
243
  }), this.A({
240
244
  transform: e,
@@ -242,23 +246,23 @@ class Z {
242
246
  debugLine: 0,
243
247
  primitive: "triangle strip",
244
248
  framebuffer: r || null,
245
- image: this.M,
249
+ image: this.P,
246
250
  count: 4
247
251
  });
248
252
  }
249
253
  delete() {
250
- this.M && (this.M.destroy(), delete this.M), this.P && (this.P.destroy(), delete this.P),
254
+ this.P && (this.P.destroy(), delete this.P), this.I && (this.I.destroy(), delete this.I),
251
255
  this._ && (this._.destroy(), this.S.destroy(), delete this._, delete this.S), this.A && (this.A.destroy(),
252
256
  delete this.A);
253
257
  }
254
258
  k() {
255
- this.P = this.m.buffer(new Uint8Array([ 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1 ])),
259
+ this.I = this.m.buffer(new Uint8Array([ 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1 ])),
256
260
  this.A = this.m({
257
261
  vert: "\n attribute vec2 aPosition;\n attribute vec2 aTexCoord;\n uniform mat4 transform;\n\n varying vec2 vTexCoord;\n void main()\n {\n gl_Position = transform * vec4(aPosition, 0.0, 1.0);\n vTexCoord = aTexCoord;\n }\n ",
258
262
  frag: "\n precision mediump float;\n uniform sampler2D uImage;\n uniform vec3 uColor;\n uniform float uOpacity;\n uniform float uDebugLine;\n\n varying vec2 vTexCoord;\n\n void main()\n {\n if (uDebugLine == 1.) {\n gl_FragColor = vec4(uColor, 1.0) * uOpacity;\n } else {\n gl_FragColor = texture2D(uImage, vTexCoord) * uOpacity;\n }\n gl_FragColor *= gl_FragColor.a;\n }\n ",
259
263
  attributes: {
260
264
  aPosition: this.m.prop("data"),
261
- aTexCoord: this.P
265
+ aTexCoord: this.I
262
266
  },
263
267
  uniforms: {
264
268
  transform: this.m.prop("transform"),
@@ -295,38 +299,46 @@ class Z {
295
299
  }
296
300
  }
297
301
 
298
- const K = new Uint8Array([ 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1 ]), Q = [];
302
+ function K(t) {
303
+ return new Uint16Array([ 0, 0, 0, t, 0, t, t, t, t, t, t, 0, t, 0, 0, 0 ]);
304
+ }
305
+
306
+ function Q(t, e) {
307
+ return new Uint16Array([ 0, t - 64 * e, 0, t, 512 * e, t - 64 * e, 512 * e, t ]);
308
+ }
299
309
 
300
- class tt {
310
+ const tt = new Uint8Array([ 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1 ]), et = [];
311
+
312
+ class nt {
301
313
  constructor(t, e, i) {
302
314
  this.m = t;
303
- (this.I = new n.Geometry({
304
- aPosition: K
305
- }, null, K.length / 2, {
315
+ (this.O = new n.Geometry({
316
+ aPosition: tt
317
+ }, null, tt.length / 2, {
306
318
  positionSize: 2
307
- })).generateBuffers(t), this.O = new n.Scene, this.C = [], this.F = 0, this.j = e,
319
+ })).generateBuffers(t), this.C = new n.Scene, this.F = [], this.j = 0, this.D = e,
308
320
  this.g = i, this.k(t);
309
321
  }
310
322
  start() {
311
- this.F = 0, this.O.clear();
323
+ this.j = 0, this.C.clear();
312
324
  }
313
325
  add(t, e, n) {
314
- const o = this.D(n);
315
- o.setUniform("ref", t), i.set(Q, e, e, 1);
326
+ const o = this.R(n);
327
+ o.setUniform("ref", t), i.set(et, e, e, 1);
316
328
  const s = o.localTransform;
317
- r.fromScaling(s, Q), r.mul(s, n, s), o.setLocalTransform(s), this.O.addMesh(o);
329
+ r.fromScaling(s, et), r.mul(s, n, s), o.setLocalTransform(s), this.C.addMesh(o);
318
330
  }
319
331
  render(t) {
320
- this.R.render(this.N, {
332
+ this.N.render(this.L, {
321
333
  projViewMatrix: this.g.projViewMatrix
322
- }, this.O, t);
334
+ }, this.C, t);
323
335
  }
324
- D() {
325
- const t = this.F++;
326
- return this.C[t] || (this.C[t] = new n.Mesh(this.I)), this.C[t];
336
+ R() {
337
+ const t = this.j++;
338
+ return this.F[t] || (this.F[t] = new n.Mesh(this.O)), this.F[t];
327
339
  }
328
340
  k(t) {
329
- const e = this.j, i = {
341
+ const e = this.D, i = {
330
342
  viewport: {
331
343
  x: 0,
332
344
  y: 0,
@@ -354,7 +366,7 @@ class tt {
354
366
  },
355
367
  colorMask: [ !1, !1, !1, !1 ]
356
368
  };
357
- this.N = new n.MeshShader({
369
+ this.L = new n.MeshShader({
358
370
  vert: "\n#define SHADER_NAME TILE_STENCIL_VERT\nattribute vec2 aPosition;\nuniform mat4 projViewModelMatrix;\n\nvoid main()\n{\n gl_Position = projViewModelMatrix * vec4(aPosition, 0.0, 1.0);\n}\n",
359
371
  frag: "\n#define SHADER_NAME TILE_STENCIL_FRAG\nvoid main()\n{\n gl_FragColor = vec4(1.0, 0.0, 0.0, 0.1);\n}\n",
360
372
  uniforms: [ {
@@ -366,18 +378,18 @@ class tt {
366
378
  }
367
379
  } ],
368
380
  extraCommandProps: i
369
- }), this.R = new n.Renderer(t);
381
+ }), this.N = new n.Renderer(t);
370
382
  }
371
383
  remove() {
372
- this.I.dispose();
373
- for (let t = 0; t < this.C.length; t++) this.C[t].dispose();
374
- this.C.length = 0, this.N.dispose();
384
+ this.O.dispose();
385
+ for (let t = 0; t < this.F.length; t++) this.F[t].dispose();
386
+ this.F.length = 0, this.L.dispose();
375
387
  }
376
388
  }
377
389
 
378
- const et = "__fea_idx".trim();
390
+ const it = "__fea_idx".trim();
379
391
 
380
- function nt(t, e, n, i, r) {
392
+ function rt(t, e, n, i, r) {
381
393
  const o = {};
382
394
  if (function(t) {
383
395
  if (!t) return !1;
@@ -387,7 +399,7 @@ function nt(t, e, n, i, r) {
387
399
  for (let s = 0, a = (e || t).length; s < a; s++) {
388
400
  let a = e ? t[e[s]] : t[s];
389
401
  "id" === r.options.features && r.getFeature && (a = r.getFeature(a), a.layer = n);
390
- o[e ? e[s] : a[et]] = {
402
+ o[e ? e[s] : a[it]] = {
391
403
  feature: a,
392
404
  symbol: i
393
405
  };
@@ -396,14 +408,14 @@ function nt(t, e, n, i, r) {
396
408
  return o;
397
409
  }
398
410
 
399
- const it = [], rt = [ 0, 0, 0, 0 ], ot = new t.Point(0, 0);
411
+ const ot = [], st = [ 0, 0, 0, 0 ], at = new t.Point(0, 0);
400
412
 
401
- class st extends t.renderer.TileLayerCanvasRenderer {
413
+ class lt extends t.renderer.TileLayerCanvasRenderer {
402
414
  supportRenderMode() {
403
415
  return !0;
404
416
  }
405
417
  constructor(t) {
406
- super(t), this.ready = !1, this.L = 0, this.H = {}, this.V = {}, this.U = {}, this.q = [];
418
+ super(t), this.ready = !1, this.H = 0, this.V = {}, this.U = {}, this.q = {}, this.G = [];
407
419
  }
408
420
  getTileLevelValue(t, e) {
409
421
  if (this.isBackTile(t.id)) {
@@ -413,71 +425,71 @@ class st extends t.renderer.TileLayerCanvasRenderer {
413
425
  return 0;
414
426
  }
415
427
  getWorkerConnection() {
416
- return this.G;
428
+ return this.W;
417
429
  }
418
430
  setStyle() {
419
- this.W && this.W.update(), this.G ? (this.L++, this.G.updateStyle(this.layer.B(), t => {
431
+ this.B && this.B.update(), this.W ? (this.H++, this.W.updateStyle(this.layer.X(), t => {
420
432
  if (t) throw new Error(t);
421
- this.X = !0, this.clear(), this.$(), this.J(), this.setToRedraw(), this.layer.fire("refreshstyle");
422
- })) : this.J();
433
+ this.$ = !0, this.clear(), this.J(), this.Y(), this.setToRedraw(), this.layer.fire("refreshstyle");
434
+ })) : this.Y();
423
435
  }
424
436
  updateOptions(t) {
425
- this.G && this.G.updateOptions(this.layer.getWorkerOptions(), e => {
437
+ this.W && this.W.updateOptions(this.layer.getWorkerOptions(), e => {
426
438
  if (e) throw new Error(e);
427
- (t.features || t.pickingGeometry || t.altitudeProperty) && (this.clear(), this.$(),
428
- this.J()), this.setToRedraw();
439
+ (t.features || t.pickingGeometry || t.altitudeProperty) && (this.clear(), this.J(),
440
+ this.Y()), this.setToRedraw();
429
441
  });
430
442
  }
431
443
  updateSceneConfig(t, e, n) {
432
444
  const i = 0 === t ? this.plugins : this.featurePlugins;
433
445
  if (!i || !i[e]) return;
434
- this.X = !0;
435
- const r = this.layer.B(), o = this.layer.Y(t, r);
446
+ this.$ = !0;
447
+ const r = this.layer.X(), o = this.layer.Z(t, r);
436
448
  i[e].config = o[e].renderPlugin, i[e].updateSceneConfig({
437
449
  sceneConfig: n
438
450
  }), this.setToRedraw();
439
451
  }
440
452
  updateDataConfig(t, e, n, i) {
441
453
  const r = 0 === t ? this.plugins : this.featurePlugins;
442
- r && r[e] && (this.X = !0, r[e].updateDataConfig(n, i) ? this.setStyle() : this.setToRedraw());
454
+ r && r[e] && (this.$ = !0, r[e].updateDataConfig(n, i) ? this.setStyle() : this.setToRedraw());
443
455
  }
444
456
  updateSymbol(t, e, n) {
445
457
  const i = 0 === t ? this.plugins : this.featurePlugins;
446
458
  if (!i || !i[e]) return !1;
447
- const r = this.layer.B(), o = this.layer.Y(t, r), s = i[e];
459
+ const r = this.layer.X(), o = this.layer.Z(t, r), s = i[e];
448
460
  s.style = o[e];
449
461
  const a = s.updateSymbol(n, o[e].symbol);
450
462
  return this.setToRedraw(), a;
451
463
  }
452
464
  needToRedraw() {
453
- if (this.q.length) return !0;
465
+ if (this.G.length) return !0;
454
466
  const t = super.needToRedraw();
455
467
  if (!t) {
456
- const t = this.Z();
468
+ const t = this.K();
457
469
  for (let e = 0; e < t.length; e++) if (t[e] && t[e].needToRedraw()) return !0;
458
470
  }
459
471
  return t;
460
472
  }
461
473
  needRetireFrames() {
462
- if (this.X) return !0;
463
- const t = this.Z();
474
+ if (this.$) return !0;
475
+ const t = this.K();
464
476
  for (let e = 0; e < t.length; e++) if (t[e] && t[e].needToRetireFrames()) return !0;
465
477
  return !1;
466
478
  }
467
479
  createContext() {
468
480
  const t = this.canvas.gl && this.canvas.gl.wrap;
469
- t ? (this.gl = this.canvas.gl.wrap(), this.regl = this.canvas.gl.regl) : this.K(),
481
+ t ? (this.gl = this.canvas.gl.wrap(), this.regl = this.canvas.gl.regl) : this.tt(),
470
482
  t && (this.canvas.pickingFBO = this.canvas.pickingFBO || this.regl.framebuffer(this.canvas.width, this.canvas.height)),
471
483
  this.pickingFBO = this.canvas.pickingFBO || this.regl.framebuffer(this.canvas.width, this.canvas.height),
472
- this.tt = new Z(this.regl, this.getMap()), this.et(), this.W = new o(this.regl, this.layer);
484
+ this.et = new Z(this.regl, this.getMap()), this.nt(), this.B = new o(this.regl, this.layer);
473
485
  }
474
- K() {
486
+ tt() {
475
487
  const t = this.layer, e = t.options.glOptions || {
476
488
  alpha: !0,
477
489
  depth: !0,
478
490
  antialias: this.layer.options.antialias
479
491
  };
480
- e.preserveDrawingBuffer = !0, e.stencil = !0, this.glOptions = e, this.gl = this.gl || this.nt(this.canvas, e),
492
+ e.preserveDrawingBuffer = !0, e.stencil = !0, this.glOptions = e, this.gl = this.gl || this.it(this.canvas, e),
481
493
  this.regl = s({
482
494
  gl: this.gl,
483
495
  attributes: e,
@@ -485,20 +497,20 @@ class st extends t.renderer.TileLayerCanvasRenderer {
485
497
  optionalExtensions: t.options.glExtensions || [ "OES_vertex_array_object", "OES_texture_half_float", "OES_texture_half_float_linear", "OES_texture_float", "OES_texture_float_linear", "WEBGL_draw_buffers", "EXT_shader_texture_lod" ]
486
498
  });
487
499
  }
488
- et() {
489
- this.G || (this.G = new J("@maptalks/vt", this.layer));
490
- this.G.addLayer((t, e) => {
500
+ nt() {
501
+ this.W || (this.W = new J("@maptalks/vt", this.layer));
502
+ this.W.addLayer((t, e) => {
491
503
  this.layer && (this.ready = !0, this.layer.onWorkerReady(t, e), this.layer.fire("workerready"),
492
504
  this.setToRedraw());
493
505
  });
494
506
  }
495
507
  clearCanvas() {
496
508
  super.clearCanvas(), this.regl && (this.glOptions.depth ? this.regl.clear({
497
- color: rt,
509
+ color: st,
498
510
  depth: 1,
499
511
  stencil: 0
500
512
  }) : this.regl.clear({
501
- color: rt,
513
+ color: st,
502
514
  stencil: 0
503
515
  }));
504
516
  }
@@ -506,67 +518,67 @@ class st extends t.renderer.TileLayerCanvasRenderer {
506
518
  return !0;
507
519
  }
508
520
  checkResources() {
509
- return it;
521
+ return ot;
510
522
  }
511
523
  draw(t, e) {
512
- this.it !== t && (this.X = !1, this.rt());
524
+ this.rt !== t && (this.$ = !1, this.ot());
513
525
  const n = this.layer;
514
- this.prepareCanvas(), this.ready && n.ready ? (this.plugins || this.J(), n.isDefaultRender() || this.plugins.length || this.featurePlugins.length ? (n.options.collision && (n.clearCollisionIndex(),
515
- n.clearBackgroundCollisionIndex()), this.ot = t, this.st = this.at(this.getMap().getGLRes()),
516
- this.lt = e || {}, this.ct(t), (!e || e && e.isFinalRender) && this.ht(), super.draw(t),
517
- this.it !== t && this.ut(t), this.dt(t), this.completeRender(), this.it = t) : this.completeRender()) : this.completeRender();
526
+ this.prepareCanvas(), this.ready && n.ready ? (this.plugins || this.Y(), n.isDefaultRender() || this.plugins.length || this.featurePlugins.length ? (n.options.collision && (n.clearCollisionIndex(),
527
+ n.clearBackgroundCollisionIndex()), this.st = t, this.at = this.lt(this.getMap().getGLRes()),
528
+ this.ct = e || {}, this.ht(t), (!e || e && e.isFinalRender) && this.ut(), super.draw(t),
529
+ this.rt !== t && this.dt(t), this.ft(t), this.completeRender(), this.rt = t) : this.completeRender()) : this.completeRender();
518
530
  }
519
- rt() {
520
- this.Z().forEach((t, e) => {
531
+ ot() {
532
+ this.K().forEach((t, e) => {
521
533
  t.renderIndex = e;
522
534
  });
523
535
  }
524
- ut() {
525
- const t = this.Z();
526
- this.ft = [];
536
+ dt() {
537
+ const t = this.K();
538
+ this.pt = [];
527
539
  let e = +!!this.layer.getGroundConfig().enable;
528
540
  t.forEach((t, n) => {
529
- t.isVisible() && ct(t) && (this.ft[n] = e, t.needPolygonOffset() && e++);
530
- }), this.pt = e;
541
+ t.isVisible() && ut(t) && (this.pt[n] = e, t.needPolygonOffset() && e++);
542
+ }), this.yt = e;
531
543
  }
532
544
  getFrameTimestamp() {
533
- return this.ot;
545
+ return this.st;
534
546
  }
535
547
  drawOnInteracting(t, e, n) {
536
548
  this.draw(e, n);
537
549
  }
538
550
  drawOutline(t) {
539
- (this.yt || this.gt) && (this.gt ? this.paintOutlineAll(t) : this.yt.forEach(e => {
551
+ (this.gt || this.vt) && (this.vt ? this.paintOutlineAll(t) : this.gt.forEach(e => {
540
552
  this[e[0]](t, ...e[1]);
541
553
  }));
542
554
  }
543
555
  getShadowMeshes() {
544
556
  const t = [];
545
- return this.Z().forEach((e, n) => {
557
+ return this.K().forEach((e, n) => {
546
558
  if (!e) return;
547
- if (!this.vt(n)) return;
559
+ if (!this.bt(n)) return;
548
560
  const i = e.getShadowMeshes();
549
561
  if (Array.isArray(i)) for (let e = 0; e < i.length; e++) t.push(i[e]);
550
562
  }), t;
551
563
  }
552
564
  isForeground(t) {
553
- return !(!this.bt || !this.bt[t.properties.tile.id]);
565
+ return !(!this.xt || !this.xt[t.properties.tile.id]);
554
566
  }
555
567
  isBackTile(t) {
556
- return !(!this.xt || !this.xt[t]);
568
+ return !(!this.wt || !this.wt[t]);
557
569
  }
558
570
  loadTile(t) {
559
- const {url: e} = t, n = this.H[e];
571
+ const {url: e} = t, n = this.V[e];
560
572
  if (n) n.keys[t.id] || (n.tiles.push(t), n.keys[t.id] = 1); else {
561
573
  const n = this.getTileGLScale(t.z);
562
- this.H[e] = {
574
+ this.V[e] = {
563
575
  keys: {},
564
576
  tiles: [ t ]
565
- }, this.H[e].keys[t.id] = 1, this.G.loadTile({
577
+ }, this.V[e].keys[t.id] = 1, this.W.loadTile({
566
578
  tileInfo: t,
567
579
  glScale: n,
568
- zScale: this.st
569
- }, this.wt.bind(this, e));
580
+ zScale: this.at
581
+ }, this.At.bind(this, e));
570
582
  }
571
583
  return {};
572
584
  }
@@ -574,11 +586,11 @@ class st extends t.renderer.TileLayerCanvasRenderer {
574
586
  const e = this.getMap();
575
587
  return this.layer.getSpatialReference().getResolution(t) / e.getGLRes();
576
588
  }
577
- wt(t, e, n) {
578
- if (!this.H[t]) return;
589
+ At(t, e, n) {
590
+ if (!this.V[t]) return;
579
591
  if (n && n.canceled) return;
580
- const i = this.layer, r = i.isDefaultRender(), {tiles: o} = this.H[t];
581
- if (delete this.H[t], e) {
592
+ const i = this.layer, r = i.isDefaultRender(), {tiles: o} = this.V[t];
593
+ if (delete this.V[t], e) {
582
594
  if (e.status && 404 === e.status) for (let t = 0; t < o.length; t++) {
583
595
  const e = o[t];
584
596
  this.onTileError(Y, e);
@@ -589,35 +601,35 @@ class st extends t.renderer.TileLayerCanvasRenderer {
589
601
  for (let t = 0; t < o.length; t++) {
590
602
  const e = o[t];
591
603
  this.onTileLoad({
592
- At: !0
604
+ kt: !0
593
605
  }, e);
594
606
  }
595
607
  return;
596
608
  }
597
- if (n.style !== this.L) return;
609
+ if (n.style !== this.H) return;
598
610
  let s = !1;
599
611
  const a = n.features, l = [];
600
612
  for (let t = 0; t < n.data.length; t++) {
601
613
  const e = n.data[t];
602
614
  if (!e || !e.data || !e.styledFeatures.length) continue;
603
- const {isUpdated: i, layer: r} = this.kt(0, t, e, a, l);
615
+ const {isUpdated: i, layer: r} = this._t(0, t, e, a, l);
604
616
  l.push(r), i && (s = i);
605
617
  }
606
618
  for (let t = 0; t < n.featureData.length; t++) {
607
619
  const e = n.featureData[t];
608
- e && e.data && e.styledFeatures.length && this.kt(1, t, e, a);
620
+ e && e.data && e.styledFeatures.length && this._t(1, t, e, a);
609
621
  }
610
- s && i._t();
622
+ s && i.St();
611
623
  const c = o[0].z, h = this.layer.getDataSchema(c);
612
- if (this.St(h, n.schema), delete n.features, r && n.data.length !== l.length) {
624
+ if (this.Tt(h, n.schema), delete n.features, r && n.data.length !== l.length) {
613
625
  const t = n.data;
614
626
  n.data = [];
615
627
  for (let e = 0; e < t.length; e++) t[e] && t[e].features && n.data.push(t[e]);
616
628
  }
617
629
  n.layers = l;
618
630
  for (let t = 0; t < o.length; t++) {
619
- const e = o[t], i = 0 === t ? n : at(n);
620
- this.q.push({
631
+ const e = o[t], i = 0 === t ? n : ct(n);
632
+ e.extent = i && i.extent, this.G.push({
621
633
  tileData: i,
622
634
  tileInfo: e
623
635
  });
@@ -626,8 +638,8 @@ class st extends t.renderer.TileLayerCanvasRenderer {
626
638
  url: t
627
639
  });
628
640
  }
629
- kt(t, e, n, i) {
630
- const {style: r, isUpdated: o} = this.Tt(t, e, n.data), s = this.layer, a = s.isDefaultRender(), l = r.symbol, c = nt(i, n.styledFeatures, e, l, s);
641
+ _t(t, e, n, i) {
642
+ const {style: r, isUpdated: o} = this.Mt(t, e, n.data), s = this.layer, a = s.isDefaultRender(), l = r.symbol, c = rt(i, n.styledFeatures, e, l, s);
631
643
  delete n.styledFeatures, n.features = c;
632
644
  let h = n.data;
633
645
  return Array.isArray(h) && (h = h[0]), {
@@ -638,7 +650,7 @@ class st extends t.renderer.TileLayerCanvasRenderer {
638
650
  } : null
639
651
  };
640
652
  }
641
- St(t, e) {
653
+ Tt(t, e) {
642
654
  for (const n in e) {
643
655
  t[n] || (t[n] = {
644
656
  types: e[n].types,
@@ -648,23 +660,23 @@ class st extends t.renderer.TileLayerCanvasRenderer {
648
660
  for (const t in i) (!r[t] || r[t] && "object" !== i[t] && "object" === r[t]) && (r[t] = i[t]);
649
661
  }
650
662
  }
651
- Tt(t, e, n) {
663
+ Mt(t, e, n) {
652
664
  Array.isArray(n) && (n = n[0]);
653
665
  const i = this.layer;
654
666
  let r, o = !1;
655
667
  if (i.isDefaultRender() && 0 === t) {
656
- let t = this.Mt;
657
- t || (t = this.Mt = {});
668
+ let t = this.Pt;
669
+ t || (t = this.Pt = {});
658
670
  const e = n.layer, i = n.type;
659
671
  t[e] || (t[e] = []);
660
672
  const s = ("plugin_" + i).trim();
661
- t[e][s] ? r = t[e][s] : (r = this.Pt(i), r.filter = n.filter, t[e].push(r), t[e][s] = r,
673
+ t[e][s] ? r = t[e][s] : (r = this.It(i), r.filter = n.filter, t[e].push(r), t[e][s] = r,
662
674
  o = !0);
663
675
  } else {
664
- const s = i.B();
665
- if (r = i.Y(t, s)[e], !r.renderPlugin) {
676
+ const s = i.X();
677
+ if (r = i.Z(t, s)[e], !r.renderPlugin) {
666
678
  o = !0;
667
- const {plugin: t, symbol: i, renderPlugin: s} = this.Pt(n.type);
679
+ const {plugin: t, symbol: i, renderPlugin: s} = this.It(n.type);
668
680
  this.plugins[e] = t, r.symbol = i, r.renderPlugin = s;
669
681
  }
670
682
  }
@@ -673,30 +685,30 @@ class st extends t.renderer.TileLayerCanvasRenderer {
673
685
  isUpdated: o
674
686
  };
675
687
  }
676
- Z(t) {
688
+ K(t) {
677
689
  let e = this.plugins || [];
678
- return this.layer.isDefaultRender() && this.Mt && (e = [], t ? t.layers && t.layers.forEach(t => {
690
+ return this.layer.isDefaultRender() && this.Pt && (e = [], t ? t.layers && t.layers.forEach(t => {
679
691
  const n = ("plugin_" + t.type).trim();
680
- e.push(this.Mt[t.layer][n].plugin);
681
- }) : Object.keys(this.Mt).forEach(t => {
682
- for (let n = 0; n < this.Mt[t].length; n++) e.push(this.Mt[t][n].plugin);
692
+ e.push(this.Pt[t.layer][n].plugin);
693
+ }) : Object.keys(this.Pt).forEach(t => {
694
+ for (let n = 0; n < this.Pt[t].length; n++) e.push(this.Pt[t][n].plugin);
683
695
  })), this.featurePlugins && this.featurePlugins.length && (e = e.slice(), G(e, this.featurePlugins)),
684
696
  e;
685
697
  }
686
- It() {
687
- if (this.layer.isDefaultRender() && this.Mt) {
698
+ Ot() {
699
+ if (this.layer.isDefaultRender() && this.Pt) {
688
700
  const t = [];
689
- return Object.keys(this.Mt).forEach(e => {
690
- for (let n = 0; n < this.Mt[e].length; n++) t.push(this.Mt[e][n].plugin);
701
+ return Object.keys(this.Pt).forEach(e => {
702
+ for (let n = 0; n < this.Pt[e].length; n++) t.push(this.Pt[e][n].plugin);
691
703
  }), t;
692
704
  }
693
705
  return this.plugins;
694
706
  }
695
- ct(t) {
696
- const e = this.layer.isDefaultRender() && this.Mt, n = this.lt;
697
- this.Z().forEach((i, r) => {
707
+ ht(t) {
708
+ const e = this.layer.isDefaultRender() && this.Pt, n = this.ct;
709
+ this.K().forEach((i, r) => {
698
710
  if (!i) return;
699
- if (!this.vt(r)) return;
711
+ if (!this.bt(r)) return;
700
712
  const o = e ? i.defaultSymbol : i.style && i.style.symbol, s = {
701
713
  regl: this.regl,
702
714
  layer: this.layer,
@@ -710,54 +722,57 @@ class st extends t.renderer.TileLayerCanvasRenderer {
710
722
  n && L(s, n), i.startFrame(s);
711
723
  });
712
724
  }
713
- dt(t) {
714
- const e = this.lt, n = e.renderMode, i = e && e.renderTarget && e.renderTarget.fbo, r = this.getMap().cameraPosition, o = this.Z();
725
+ ft(t) {
726
+ const e = this.ct, n = e.renderMode, i = e && e.renderTarget && e.renderTarget.fbo, r = this.getMap().cameraPosition, o = this.K();
715
727
  this.layer.options.collision ? o.forEach(e => {
716
- if (!ct(e)) return;
728
+ if (!ut(e)) return;
717
729
  if (n && "default" !== n && !e.supportRenderMode(n)) return;
718
- const i = this.Ot(e, 0, r, t);
730
+ const i = this.Ct(e, 0, r, t);
719
731
  e.prepareRender(i), e.updateCollision(i);
720
732
  }) : o.forEach(e => {
721
- if (!ct(e)) return;
733
+ if (!ut(e)) return;
722
734
  if (n && "default" !== n && !e.supportRenderMode(n)) return;
723
- const i = this.Ot(e, 0, r, t);
735
+ const i = this.Ct(e, 0, r, t);
724
736
  e.prepareRender(i);
725
737
  });
726
- const s = !e.timestamp || e.isFinalRender, a = this.it !== e.timestamp;
738
+ const s = !e.timestamp || e.isFinalRender, a = this.rt !== e.timestamp;
727
739
  let l = !1;
728
740
  if (a) {
729
- const e = -this.layer.getPolygonOffset(), n = this.Ot(null, e, r, t);
730
- n.offsetFactor = n.offsetUnits = e, this.W.paint(n);
741
+ const e = -this.layer.getPolygonOffset(), n = this.Ct(null, e, r, t);
742
+ n.offsetFactor = n.offsetUnits = e, this.B.paint(n);
731
743
  }
732
744
  o.forEach((e, o) => {
733
- if (!this.Ct(e)) return;
745
+ if (!this.Ft(e)) return;
734
746
  if (n && "default" !== n && !e.supportRenderMode(n)) return;
735
747
  this.regl.clear({
736
748
  stencil: 255,
737
749
  fbo: i
738
- }), this.isEnableTileStencil() && e.painter && !e.painter.needClearStencil() && this.Ft(i);
739
- const s = this.ft[o] || 0, a = this.Ot(e, s, r, t), c = e.endFrame(a);
750
+ }), this.isEnableTileStencil() && e.painter && !e.painter.needClearStencil() && this.zt(i);
751
+ const s = this.pt[o] || 0, a = this.Ct(e, s, r, t), c = e.endFrame(a);
740
752
  c && c.redraw && this.setToRedraw(), l = !0;
741
- }), l && this.layer.fire("canvasisdirty"), s && this.zt();
753
+ }), l && this.layer.fire("canvasisdirty"), s && this.Et();
742
754
  }
743
755
  getPolygonOffsetCount() {
744
- return this.pt || 0;
756
+ return this.yt || 0;
745
757
  }
746
- zt() {
758
+ Et() {
747
759
  if (this.layer.options.debug) {
748
- const t = this.lt, e = [], n = this.getMap().projViewMatrix;
760
+ const t = this.ct, e = [], n = this.getMap().projViewMatrix;
749
761
  for (const i in this.tilesInView) {
750
762
  const o = this.tilesInView[i].info, s = o.transform, a = this.tilesInView[i].image.extent, l = t && t.renderTarget;
751
- s && a && this.tt.draw(this.getDebugInfo(o.id), r.multiply(e, n, s), this.layer.getTileSize().width, a, l && l.fbo);
763
+ if (s && a) {
764
+ const t = this.getDebugInfo(o.id), i = r.multiply(e, n, s), c = this.layer.getTileSize().width;
765
+ this.et.draw(t, i, c, a, l && l.fbo);
766
+ }
752
767
  }
753
768
  }
754
769
  }
755
- Ct(t) {
770
+ Ft(t) {
756
771
  if (!t) return !0;
757
- const e = t.renderIndex, n = this.lt, i = this.vt(e), r = n && n.states && n.states.includesChanged, o = this.Et(t.painter.scene.getMeshes());
772
+ const e = t.renderIndex, n = this.ct, i = this.bt(e), r = n && n.states && n.states.includesChanged, o = this.jt(t.painter.scene.getMeshes());
758
773
  return !i || !r && !o ? 0 : o ? 2 : 1;
759
774
  }
760
- Ot(t, e, n, i) {
775
+ Ct(t, e, n, i) {
761
776
  const r = {
762
777
  regl: this.regl,
763
778
  layer: this.layer,
@@ -767,54 +782,54 @@ class st extends t.renderer.TileLayerCanvasRenderer {
767
782
  polygonOffsetIndex: e,
768
783
  cameraPosition: n,
769
784
  timestamp: i
770
- }, o = this.lt;
785
+ }, o = this.ct;
771
786
  return o && L(r, o), r;
772
787
  }
773
- Et(t) {
788
+ jt(t) {
774
789
  if (!t) return !1;
775
- const e = this.lt && this.lt.sceneFilter;
790
+ const e = this.ct && this.ct.sceneFilter;
776
791
  return e ? t.filter(e).length > 0 : t.length > 0;
777
792
  }
778
- Ft(t) {
793
+ zt(t) {
779
794
  const e = this.isEnableTileStencil(), n = this.getCurrentTileZoom();
780
- let i = this.jt;
781
- i || (i = this.jt = new tt(this.regl, this.canvas, this.getMap())), i.start();
782
- const {tiles: r} = this.Dt;
783
- let {parentTiles: o, childTiles: s} = this.Dt, a = 1;
784
- s = s.sort(lt);
785
- for (let t = 0; t < s.length; t++) this.Rt(s[t].info, e ? a : this.getTileLevelValue(s[t].info.z, n)),
795
+ let i = this.Dt;
796
+ i || (i = this.Dt = new nt(this.regl, this.canvas, this.getMap())), i.start();
797
+ const {tiles: r} = this.Rt;
798
+ let {parentTiles: o, childTiles: s} = this.Rt, a = 1;
799
+ s = s.sort(ht);
800
+ for (let t = 0; t < s.length; t++) this.Nt(s[t].info, e ? a : this.getTileLevelValue(s[t].info.z, n)),
786
801
  a++;
787
- o = o.sort(lt);
788
- for (let t = 0; t < o.length; t++) this.Rt(o[t].info, e ? a : this.getTileLevelValue(o[t].info.z, n)),
802
+ o = o.sort(ht);
803
+ for (let t = 0; t < o.length; t++) this.Nt(o[t].info, e ? a : this.getTileLevelValue(o[t].info.z, n)),
789
804
  a++;
790
- const l = r.sort(lt);
791
- for (let t = l.length - 1; t >= 0; t--) this.Rt(l[t].info, e ? a : this.getTileLevelValue(l[t].info.z, n)),
805
+ const l = r.sort(ht);
806
+ for (let t = l.length - 1; t >= 0; t--) this.Nt(l[t].info, e ? a : this.getTileLevelValue(l[t].info.z, n)),
792
807
  a++;
793
808
  i.render(t);
794
809
  }
795
- Rt(t, e) {
796
- const n = this.Nt, i = ot.set(t.extent2d.xmin, t.extent2d.ymax), r = t.transform = t.transform || this.calculateTileMatrix(i, t.z);
797
- t.stencilRef = e, this.jt.add(e, n, r);
810
+ Nt(t, e) {
811
+ const n = at.set(t.extent2d.xmin, t.extent2d.ymax), i = t.transform = t.transform || this.calculateTileMatrix(n, t.z, t.extent);
812
+ t.stencilRef = e, this.Dt.add(e, t.extent, i);
798
813
  }
799
814
  onDrawTileStart(t) {
800
815
  super.onDrawTileStart(t);
801
816
  const {tiles: e, childTiles: n, parentTiles: i} = t;
802
- this.bt = {}, this.xt = {};
803
- for (let t = 0; t < e.length; t++) this.bt[e[t].info.id] = 1;
804
- for (let t = 0; t < n.length; t++) this.xt[n[t].info.id] = 1;
805
- for (let t = 0; t < i.length; t++) this.xt[i[t].info.id] = 1;
806
- this.Dt = t;
817
+ this.xt = {}, this.wt = {};
818
+ for (let t = 0; t < e.length; t++) this.xt[e[t].info.id] = 1;
819
+ for (let t = 0; t < n.length; t++) this.wt[n[t].info.id] = 1;
820
+ for (let t = 0; t < i.length; t++) this.wt[i[t].info.id] = 1;
821
+ this.Rt = t;
807
822
  }
808
823
  isEnableTileStencil() {
809
824
  return this.layer.isOnly2D();
810
825
  }
811
826
  drawTile(t, e) {
812
827
  if (!e.cache) return;
813
- const n = e.cache, i = ot.set(t.extent2d.xmin, t.extent2d.ymax), r = t.transform = t.transform || this.calculateTileMatrix(i, t.z), o = t.tileTranslationMatrix = t.tileTranslationMatrix || this.calculateTileTranslationMatrix(i, t.z), s = [];
828
+ const n = e.cache, i = at.set(t.extent2d.xmin, t.extent2d.ymax), r = t.transform = t.transform || this.calculateTileMatrix(i, t.z, t.extent), o = t.tileTranslationMatrix = t.tileTranslationMatrix || this.calculateTileTranslationMatrix(i, t.z), s = [];
814
829
  G(s, e.data), G(s, e.featureData);
815
- this.Z(e).forEach((i, a) => {
830
+ this.K(e).forEach((i, a) => {
816
831
  if (!i) return;
817
- const l = this.vt(a);
832
+ const l = this.bt(a);
818
833
  if (!s[a] || !l) return;
819
834
  if (!n[a]) return;
820
835
  const c = {
@@ -828,24 +843,24 @@ class st extends t.renderer.TileLayerCanvasRenderer {
828
843
  tileTransform: r,
829
844
  tileTranslationMatrix: o,
830
845
  tileExtent: e.extent,
831
- timestamp: this.ot,
846
+ timestamp: this.st,
832
847
  tileInfo: t,
833
848
  tileZoom: this._tileZoom,
834
- bloom: this.lt && this.lt.bloom
849
+ bloom: this.ct && this.ct.bloom
835
850
  }, h = i.paintTile(c);
836
- !this.X && (h.retire || h.redraw) && i.supportRenderMode("taa") && (this.X = !0),
851
+ !this.$ && (h.retire || h.redraw) && i.supportRenderMode("taa") && (this.$ = !0),
837
852
  h.redraw && this.setToRedraw();
838
853
  }), this.setCanvasUpdated();
839
854
  }
840
855
  Lt(t, e) {
841
- if (!e.loadTime || e.At) return;
856
+ if (!e.loadTime || e.kt) return;
842
857
  let n = e.cache;
843
- n || (n = e.cache = {}), this.Nt || (this.Nt = e.extent);
844
- const i = ot.set(t.extent2d.xmin, t.extent2d.ymax), r = t.transform = t.transform || this.calculateTileMatrix(i, t.z), o = t.tileTranslationMatrix = t.tileTranslationMatrix || this.calculateTileTranslationMatrix(i, t.z), s = [];
858
+ n || (n = e.cache = {});
859
+ const i = at.set(t.extent2d.xmin, t.extent2d.ymax), r = t.transform = t.transform || this.calculateTileMatrix(i, t.z, e.extent), o = t.tileTranslationMatrix = t.tileTranslationMatrix || this.calculateTileTranslationMatrix(i, t.z), s = [];
845
860
  G(s, e.data), G(s, e.featureData);
846
- this.Z(e).forEach((i, a) => {
861
+ this.K(e).forEach((i, a) => {
847
862
  if (!i) return;
848
- const l = this.vt(a);
863
+ const l = this.bt(a);
849
864
  if (!s[a] || !l) return;
850
865
  n[a] || (n[a] = {});
851
866
  const c = {
@@ -859,16 +874,16 @@ class st extends t.renderer.TileLayerCanvasRenderer {
859
874
  tileTransform: r,
860
875
  tileTranslationMatrix: o,
861
876
  tileExtent: e.extent,
862
- timestamp: this.ot,
877
+ timestamp: this.st,
863
878
  tileInfo: t,
864
879
  tileZoom: this._tileZoom
865
880
  }, h = i.createTile(c);
866
- n[a].geometry && (s[a] = 1), !this.X && h.retire && i.supportRenderMode("taa") && (this.X = !0);
881
+ n[a].geometry && (s[a] = 1), !this.$ && h.retire && i.supportRenderMode("taa") && (this.$ = !0);
867
882
  });
868
883
  }
869
- ht() {
884
+ ut() {
870
885
  let t = 0;
871
- const e = this.layer.options.meshLimitPerFrame, n = this.q;
886
+ const e = this.layer.options.meshLimitPerFrame, n = this.G;
872
887
  for (;n.length && t < e; ) {
873
888
  const {tileData: e, tileInfo: i} = n.shift();
874
889
  this.onTileLoad(e, i), this.Lt(i, e), t++;
@@ -876,17 +891,17 @@ class st extends t.renderer.TileLayerCanvasRenderer {
876
891
  }
877
892
  pick(t, e, n) {
878
893
  const i = [];
879
- return this.Z().forEach((r, o) => {
894
+ return this.K().forEach((r, o) => {
880
895
  if (!r) return;
881
- if (!this.vt(o)) return;
896
+ if (!this.bt(o)) return;
882
897
  const s = r.pick(t, e, n.tolerance);
883
898
  s && (s.type = r.getType(), i.push(s));
884
899
  }), i;
885
900
  }
886
901
  deleteTile(t) {
887
902
  if (t) {
888
- if (t.image && !t.image.At) {
889
- const e = this.It();
903
+ if (t.image && !t.image.kt) {
904
+ const e = this.Ot();
890
905
  e && e.forEach((e, n) => {
891
906
  e && e.deleteTile({
892
907
  pluginIndex: n,
@@ -903,25 +918,25 @@ class st extends t.renderer.TileLayerCanvasRenderer {
903
918
  }
904
919
  }
905
920
  abortTileLoading(t, e) {
906
- e && e.url && (this.G && this.G.abortTile(e.url), delete this.H[e.url]), super.abortTileLoading(t, e);
921
+ e && e.url && (this.W && this.W.abortTile(e.url), delete this.V[e.url]), super.abortTileLoading(t, e);
907
922
  }
908
923
  resizeCanvas(t) {
909
924
  super.resizeCanvas(t);
910
925
  const e = this.canvas;
911
926
  e && (!this.pickingFBO || this.pickingFBO.width === e.width && this.pickingFBO.height === e.height || this.pickingFBO.resize(e.width, e.height),
912
- this.Z().forEach(t => {
927
+ this.K().forEach(t => {
913
928
  t && t.resize(e.width, e.height);
914
929
  }));
915
930
  }
916
931
  onRemove() {
917
- this.jt && this.jt.remove(), this.G && (this.G.removeLayer(t => {
932
+ this.Dt && this.Dt.remove(), this.W && (this.W.removeLayer(t => {
918
933
  if (t) throw t;
919
- }), this.G.remove(), delete this.G), this.pickingFBO && (this.canvas.pickingFBO || this.pickingFBO.destroy(),
920
- delete this.pickingFBO), this.tt && this.tt.delete(), super.onRemove && super.onRemove(),
921
- this.$();
934
+ }), this.W.remove(), delete this.W), this.pickingFBO && (this.canvas.pickingFBO || this.pickingFBO.destroy(),
935
+ delete this.pickingFBO), this.et && this.et.delete(), super.onRemove && super.onRemove(),
936
+ this.J();
922
937
  }
923
- $() {
924
- this.Z().forEach(t => {
938
+ J() {
939
+ this.K().forEach(t => {
925
940
  t.remove();
926
941
  }), this.plugins = [];
927
942
  }
@@ -930,8 +945,8 @@ class st extends t.renderer.TileLayerCanvasRenderer {
930
945
  const e = this.gl, n = new Uint8Array(4), i = this.canvas.height;
931
946
  return e.readPixels(t.x, i - t.y, 1, 1, e.RGBA, e.UNSIGNED_BYTE, n), n[3] > 0;
932
947
  }
933
- J() {
934
- const {style: t, featureStyle: e} = this.layer.B(), n = t.map((t, e) => {
948
+ Y() {
949
+ const {style: t, featureStyle: e} = this.layer.X(), n = t.map((t, e) => {
935
950
  const n = t.renderPlugin;
936
951
  if (!n) return null;
937
952
  if (!n.type) throw new Error("invalid plugin type for style at " + e);
@@ -953,7 +968,7 @@ class st extends t.renderer.TileLayerCanvasRenderer {
953
968
  const n = new e;
954
969
  return n.config = t, n.config.sceneConfig || (n.config.sceneConfig = {}), n;
955
970
  }
956
- nt(t, e) {
971
+ it(t, e) {
957
972
  const n = [ "webgl", "experimental-webgl" ];
958
973
  let i = null;
959
974
  for (let r = 0; r < n.length; ++r) {
@@ -964,7 +979,7 @@ class st extends t.renderer.TileLayerCanvasRenderer {
964
979
  }
965
980
  return i;
966
981
  }
967
- at(t) {
982
+ lt(t) {
968
983
  return X(t, this.getMap());
969
984
  }
970
985
  debugFBO(t, e) {
@@ -982,7 +997,7 @@ class st extends t.renderer.TileLayerCanvasRenderer {
982
997
  const h = new ImageData(i, r);
983
998
  h.data.set(s), o.putImageData(h, 0, 0);
984
999
  }
985
- Pt(t) {
1000
+ It(t) {
986
1001
  let e;
987
1002
  switch (t) {
988
1003
  case "native-line":
@@ -1050,7 +1065,7 @@ class st extends t.renderer.TileLayerCanvasRenderer {
1050
1065
  renderPlugin: e
1051
1066
  };
1052
1067
  }
1053
- vt() {
1068
+ bt() {
1054
1069
  return !0;
1055
1070
  }
1056
1071
  isEnableWorkAround(t) {
@@ -1064,76 +1079,76 @@ class st extends t.renderer.TileLayerCanvasRenderer {
1064
1079
  }(this.gl));
1065
1080
  }
1066
1081
  isCachePlaced(t) {
1067
- return 1 === this.U[t];
1082
+ return 1 === this.q[t];
1068
1083
  }
1069
1084
  placeCache(t) {
1070
- this.U[t] = 1;
1085
+ this.q[t] = 1;
1071
1086
  }
1072
1087
  fetchCache(t) {
1073
- return this.V[t] && this.V[t].resource;
1088
+ return this.U[t] && this.U[t].resource;
1074
1089
  }
1075
1090
  removeCache(t) {
1076
- delete this.U[t];
1077
- const e = this.V[t];
1078
- e && (e.count--, e.count <= 0 && (e.onDelete && e.onDelete(e.resource), delete this.V[t]));
1091
+ delete this.q[t];
1092
+ const e = this.U[t];
1093
+ e && (e.count--, e.count <= 0 && (e.onDelete && e.onDelete(e.resource), delete this.U[t]));
1079
1094
  }
1080
1095
  addToCache(t, e, n) {
1081
- delete this.U[t], this.V[t] ? this.V[t].count++ : this.V[t] = {
1096
+ delete this.q[t], this.U[t] ? this.U[t].count++ : this.U[t] = {
1082
1097
  resource: e,
1083
1098
  onDelete: n,
1084
1099
  count: 1
1085
1100
  };
1086
1101
  }
1087
1102
  getZScale() {
1088
- return this.st;
1103
+ return this.at;
1089
1104
  }
1090
1105
  outline(t, e) {
1091
- e && (Array.isArray(e) || (e = [ e ]), this.yt || (this.yt = []), this.yt.push([ "paintOutline", [ t, e ] ]),
1106
+ e && (Array.isArray(e) || (e = [ e ]), this.gt || (this.gt = []), this.gt.push([ "paintOutline", [ t, e ] ]),
1092
1107
  this.setToRedraw());
1093
1108
  }
1094
1109
  outlineBatch(t) {
1095
- this.yt || (this.yt = []), this.yt.push([ "paintBatchOutline", [ t ] ]), this.setToRedraw();
1110
+ this.gt || (this.gt = []), this.gt.push([ "paintBatchOutline", [ t ] ]), this.setToRedraw();
1096
1111
  }
1097
1112
  outlineAll() {
1098
- this.gt = !0, this.setToRedraw();
1113
+ this.vt = !0, this.setToRedraw();
1099
1114
  }
1100
1115
  paintOutlineAll(t) {
1101
- const e = this.Z();
1116
+ const e = this.K();
1102
1117
  for (let n = 0; n < e.length; n++) e[n].outlineAll(t);
1103
1118
  }
1104
1119
  paintOutline(t, e, n) {
1105
- const i = e, r = this.Z();
1120
+ const i = e, r = this.K();
1106
1121
  !r[i] || r[i].painter && !r[i].painter.isVisible() || r[i].outline(t, n);
1107
1122
  }
1108
1123
  paintBatchOutline(t, e) {
1109
- const n = this.Z();
1124
+ const n = this.K();
1110
1125
  !n[e] || n[e].painter && !n[e].painter.isVisible() || n[e].outlineAll(t);
1111
1126
  }
1112
1127
  cancelOutline() {
1113
- delete this.yt, delete this.gt, this.setToRedraw();
1128
+ delete this.gt, delete this.vt, this.setToRedraw();
1114
1129
  }
1115
1130
  setZIndex() {
1116
- return this.setToRedraw(), this.X = !0, super.setZIndex.apply(this, arguments);
1131
+ return this.setToRedraw(), this.$ = !0, super.setZIndex.apply(this, arguments);
1117
1132
  }
1118
1133
  }
1119
1134
 
1120
- function at(t) {
1135
+ function ct(t) {
1121
1136
  let e;
1122
1137
  Array.isArray(t.data) ? (e = [], G(e, t.data)) : (e = {}, L(e, t.data));
1123
1138
  const n = L({}, t);
1124
1139
  return n.data = e, n;
1125
1140
  }
1126
1141
 
1127
- function lt(t, e) {
1142
+ function ht(t, e) {
1128
1143
  return e.info.z - t.info.z;
1129
1144
  }
1130
1145
 
1131
- function ct(t) {
1146
+ function ut(t) {
1132
1147
  const e = t.painter && t.painter.scene && t.painter.scene.getMeshes();
1133
1148
  return e && e.length;
1134
1149
  }
1135
1150
 
1136
- function ht(t, e, n) {
1151
+ function dt(t, e, n) {
1137
1152
  for (let i = 0; i < t.length; i++) {
1138
1153
  const r = t[i], o = L({}, r), {renderPlugin: s} = r, a = L({}, s);
1139
1154
  a.sceneConfig && !Object.keys(a.sceneConfig).length && delete a.sceneConfig;
@@ -1146,12 +1161,12 @@ function ht(t, e, n) {
1146
1161
  }
1147
1162
  }
1148
1163
 
1149
- st.include({
1164
+ lt.include({
1150
1165
  calculateTileMatrix: function() {
1151
1166
  const t = new Array(3), e = new Array(3), n = new Array(3);
1152
- return function(o, s) {
1153
- const a = this.Nt, l = this.getTileGLScale(s), c = o, h = this.layer.getTileSize(), u = r.identity([]);
1154
- return r.scale(u, u, i.set(t, l, l, this.st)), r.translate(u, u, i.set(e, c.x, c.y, 0)),
1167
+ return function(o, s, a) {
1168
+ const l = this.getTileGLScale(s), c = o, h = this.layer.getTileSize(), u = r.identity([]);
1169
+ return r.scale(u, u, i.set(t, l, l, this.at)), r.translate(u, u, i.set(e, c.x, c.y, 0)),
1155
1170
  r.scale(u, u, i.set(n, h.width / a, -h.height / a, 1)), u;
1156
1171
  };
1157
1172
  }(),
@@ -1164,7 +1179,7 @@ st.include({
1164
1179
  }()
1165
1180
  });
1166
1181
 
1167
- const ut = "function" == typeof fetch && "function" == typeof AbortController, dt = {
1182
+ const ft = "function" == typeof fetch && "function" == typeof AbortController, pt = {
1168
1183
  jsonp: function(t, e) {
1169
1184
  const n = "_maptalks_jsonp_" + R();
1170
1185
  t.match(/\?/) ? t += "&callback=" + n : t += "?callback=" + n;
@@ -1180,7 +1195,7 @@ const ut = "function" == typeof fetch && "function" == typeof AbortController, d
1180
1195
  }
1181
1196
  (e = e || {}).method && (e.method = e.method.toUpperCase());
1182
1197
  const i = "POST" === e.method;
1183
- if (ut) {
1198
+ if (ft) {
1184
1199
  const r = new AbortController, o = {
1185
1200
  signal: r.signal,
1186
1201
  method: e.method || "GET",
@@ -1204,7 +1219,7 @@ const ut = "function" == typeof fetch && "function" == typeof AbortController, d
1204
1219
  }), r;
1205
1220
  }
1206
1221
  {
1207
- const r = dt.Ut(n);
1222
+ const r = pt.Ut(n);
1208
1223
  if (r.open(e.method || "GET", t, !0), e) {
1209
1224
  for (const t in e.headers) r.setRequestHeader(t, e.headers[t]);
1210
1225
  r.withCredentials = "include" === e.credentials, e.responseType && (r.responseType = e.responseType);
@@ -1250,14 +1265,14 @@ const ut = "function" == typeof fetch && "function" == typeof AbortController, d
1250
1265
  } catch (t) {}
1251
1266
  }
1252
1267
  }
1253
- return e.onreadystatechange = dt.qt(e, t), e;
1268
+ return e.onreadystatechange = pt.qt(e, t), e;
1254
1269
  },
1255
1270
  getArrayBuffer(t, e, n) {
1256
1271
  if (U(e)) {
1257
1272
  const t = n;
1258
1273
  n = e, e = t;
1259
1274
  }
1260
- return e || (e = {}), e.responseType = "arraybuffer", dt.get(t, e, n);
1275
+ return e || (e = {}), e.responseType = "arraybuffer", pt.get(t, e, n);
1261
1276
  },
1262
1277
  getJSON: function(t, e, n) {
1263
1278
  if (U(e)) {
@@ -1268,9 +1283,9 @@ const ut = "function" == typeof fetch && "function" == typeof AbortController, d
1268
1283
  const i = "string" == typeof e ? JSON.parse(e) : e || null;
1269
1284
  n(t, i);
1270
1285
  };
1271
- return e && e.jsonp ? dt.jsonp(t, i) : ((e = e || {}).returnJSON = !0, dt.get(t, e, i));
1286
+ return e && e.jsonp ? pt.jsonp(t, i) : ((e = e || {}).returnJSON = !0, pt.get(t, e, i));
1272
1287
  }
1273
- }, ft = {
1288
+ }, mt = {
1274
1289
  renderer: "gl",
1275
1290
  altitudeProperty: "altitude",
1276
1291
  forceRenderOnZooming: !0,
@@ -1303,9 +1318,9 @@ const ut = "function" == typeof fetch && "function" == typeof AbortController, d
1303
1318
  enableAltitude: !0
1304
1319
  };
1305
1320
 
1306
- class pt extends t.TileLayer {
1321
+ class yt extends t.TileLayer {
1307
1322
  constructor(t, e) {
1308
- super(t, e), this.VERSION = pt.VERSION;
1323
+ super(t, e), this.VERSION = yt.VERSION;
1309
1324
  const n = e && e.style;
1310
1325
  this.setStyle(n);
1311
1326
  }
@@ -1329,7 +1344,7 @@ class pt extends t.TileLayer {
1329
1344
  style: this.isDefaultRender() ? {
1330
1345
  style: [],
1331
1346
  featureStyle: []
1332
- } : this.B(),
1347
+ } : this.X(),
1333
1348
  features: this.options.features,
1334
1349
  schema: this.options.schema,
1335
1350
  pickingGeometry: this.options.pickingGeometry
@@ -1338,7 +1353,7 @@ class pt extends t.TileLayer {
1338
1353
  setStyle(t) {
1339
1354
  if (t && (H(t) || t.url)) {
1340
1355
  const e = t, n = e.lastIndexOf("/"), i = n < 0 ? "." : e.substring(0, n);
1341
- return this.ready = !1, dt.getJSON(t.url ? t.url : t, t.url ? t : {}, (t, n) => {
1356
+ return this.ready = !1, pt.getJSON(t.url ? t.url : t, t.url ? t : {}, (t, n) => {
1342
1357
  if (t) throw this.setStyle([]), t;
1343
1358
  let r;
1344
1359
  n.style ? (r = n, r.$root || (r.$root = i)) : r = {
@@ -1386,11 +1401,11 @@ class pt extends t.TileLayer {
1386
1401
  const e = t.background || {};
1387
1402
  this.Jt = {
1388
1403
  enable: e.enable || !1,
1389
- color: yt(e.color) || [ 0, 0, 0, 0 ],
1390
- opacity: gt(e.opacity, 1),
1404
+ color: vt(e.color) || [ 0, 0, 0, 0 ],
1405
+ opacity: bt(e.opacity, 1),
1391
1406
  patternFile: e.patternFile,
1392
1407
  depthRange: e.depthRange
1393
- }, this.validateStyle(), this.Gt && this.Yt(), this._t();
1408
+ }, this.validateStyle(), this.Gt && this.Yt(), this.St();
1394
1409
  const n = this.getRenderer();
1395
1410
  return n && n.setStyle(), this.fire("setstyle", {
1396
1411
  style: this.getStyle(),
@@ -1436,22 +1451,22 @@ class pt extends t.TileLayer {
1436
1451
  return this.Qt(1, t, n, e);
1437
1452
  }
1438
1453
  Qt(t, e, n, i) {
1439
- const r = this.Y(t);
1454
+ const r = this.Z(t);
1440
1455
  if (!r) return this;
1441
1456
  let o, s = e;
1442
1457
  if (r[e].renderPlugin.sceneConfig || (r[e].renderPlugin.sceneConfig = {}), L(r[e].renderPlugin.sceneConfig, n),
1443
1458
  void 0 !== i) {
1444
- vt(this.Wt, e, i), s = this.Wt[e].style[i].Xt;
1459
+ xt(this.Wt, e, i), s = this.Wt[e].style[i].Xt;
1445
1460
  const t = r[s].renderPlugin;
1446
1461
  t.sceneConfig || (t.sceneConfig = {}), o = t.sceneConfig;
1447
- } else bt(r, e), o = r[e].renderPlugin.sceneConfig;
1462
+ } else wt(r, e), o = r[e].renderPlugin.sceneConfig;
1448
1463
  if (L(o, n), Array.isArray(this.options.style)) {
1449
1464
  const t = this.options.style[e].renderPlugin;
1450
1465
  t.sceneConfig || (t.sceneConfig = {}), L(t.sceneConfig, n);
1451
1466
  } else {
1452
- const r = this.Y(t, this.options.style);
1467
+ const r = this.Z(t, this.options.style);
1453
1468
  let o;
1454
- void 0 !== i ? (vt(r, e, i), o = r[e].style[i].renderPlugin) : (bt(r, e), o = r[e].renderPlugin),
1469
+ void 0 !== i ? (xt(r, e, i), o = r[e].style[i].renderPlugin) : (wt(r, e), o = r[e].renderPlugin),
1455
1470
  o.sceneConfig || (o.sceneConfig = {}), L(o.sceneConfig, n);
1456
1471
  }
1457
1472
  const a = this.getRenderer();
@@ -1471,16 +1486,16 @@ class pt extends t.TileLayer {
1471
1486
  return this.te(1, t, n, e);
1472
1487
  }
1473
1488
  te(t, e, n, i) {
1474
- const r = this.Y(t);
1489
+ const r = this.Z(t);
1475
1490
  if (!r) return this;
1476
1491
  let o, s = e;
1477
- void 0 !== i ? (vt(this.Wt, e, i), s = this.Wt[e].style[i].Xt, o = r[s].renderPlugin.dataConfig) : (bt(r, e),
1492
+ void 0 !== i ? (xt(this.Wt, e, i), s = this.Wt[e].style[i].Xt, o = r[s].renderPlugin.dataConfig) : (wt(r, e),
1478
1493
  o = r[e].renderPlugin.dataConfig);
1479
1494
  const a = L({}, o);
1480
1495
  if (L(o, n), Array.isArray(this.options.style)) L(this.options.style[e].renderPlugin.dataConfig, n); else {
1481
- const r = this.Y(t, this.options.style);
1496
+ const r = this.Z(t, this.options.style);
1482
1497
  let o;
1483
- void 0 !== i ? (vt(r, e, i), o = r[e].style[i].renderPlugin) : (bt(r, e), o = r[e].renderPlugin),
1498
+ void 0 !== i ? (xt(r, e, i), o = r[e].style[i].renderPlugin) : (wt(r, e), o = r[e].renderPlugin),
1484
1499
  o.dataConfig || (o.dataConfig = {}), L(o.dataConfig, n);
1485
1500
  }
1486
1501
  const l = this.getRenderer();
@@ -1500,10 +1515,10 @@ class pt extends t.TileLayer {
1500
1515
  return this.ee(1, t, n, e);
1501
1516
  }
1502
1517
  ee(e, n, i, r) {
1503
- const o = this.Y(e);
1518
+ const o = this.Z(e);
1504
1519
  if (!o) return this;
1505
1520
  let s = n;
1506
- void 0 !== r && (vt(this.Wt, n, r), s = this.Wt[n].style[r].Xt);
1521
+ void 0 !== r && (xt(this.Wt, n, r), s = this.Wt[n].style[r].Xt);
1507
1522
  const a = o[s];
1508
1523
  if (!a) throw new Error("No style defined at " + n);
1509
1524
  const l = this, c = this.Gt;
@@ -1514,7 +1529,7 @@ class pt extends t.TileLayer {
1514
1529
  let h = !1;
1515
1530
  for (let t = 0; t < a.length; t++) {
1516
1531
  const e = a[t];
1517
- if (mt(o[e]) || mt(i[e])) {
1532
+ if (gt(o[e]) || gt(i[e])) {
1518
1533
  h = !0;
1519
1534
  break;
1520
1535
  }
@@ -1522,20 +1537,20 @@ class pt extends t.TileLayer {
1522
1537
  for (const e in i) B(i, e) && (!t.Util.isObject(i[e]) || Array.isArray(i[e]) || i[e].stops ? o[e] = i[e] : (o[e] || (o[e] = {}),
1523
1538
  L(o[e], i[e])));
1524
1539
  let u = l.options.style;
1525
- Array.isArray(u) || (u = l.Y(e, l.options.style));
1540
+ Array.isArray(u) || (u = l.Z(e, l.options.style));
1526
1541
  const d = JSON.parse(JSON.stringify(o));
1527
- return void 0 !== r ? (vt(u, n, r), void 0 === s ? u[n].style[r].symbol = d : u[n].style[r].symbol[s] = d) : (bt(u, n),
1542
+ return void 0 !== r ? (xt(u, n, r), void 0 === s ? u[n].style[r].symbol = d : u[n].style[r].symbol[s] = d) : (wt(u, n),
1528
1543
  void 0 === s ? u[n].symbol = d : u[n].symbol[s] = d), h;
1529
1544
  }
1530
1545
  const u = this.getRenderer();
1531
- if (!u) return h(), this._t(), this;
1546
+ if (!u) return h(), this.St(), this;
1532
1547
  let d = !1;
1533
1548
  const f = a.symbol;
1534
1549
  if (Array.isArray(i)) for (let t = 0; t < i.length; t++) {
1535
1550
  const e = h(i[t], f[t], t);
1536
1551
  e && (d = e);
1537
1552
  } else h(i, f);
1538
- return this._t(), d ? u.setStyle() : (d = u.updateSymbol(e, s, i), d && u.setStyle()),
1553
+ return this.St(), d ? u.setStyle() : (d = u.updateSymbol(e, s, i), d && u.setStyle()),
1539
1554
  0 === e ? this.fire("updatesymbol", {
1540
1555
  index: n,
1541
1556
  symbol: i
@@ -1545,7 +1560,7 @@ class pt extends t.TileLayer {
1545
1560
  symbol: i
1546
1561
  }), this;
1547
1562
  }
1548
- Y(t, e) {
1563
+ Z(t, e) {
1549
1564
  if (e) {
1550
1565
  return 0 === t ? e.style : e.featureStyle;
1551
1566
  }
@@ -1579,15 +1594,15 @@ class pt extends t.TileLayer {
1579
1594
  polygonOpacity: 1
1580
1595
  }
1581
1596
  });
1582
- const t = this.B().background || {};
1597
+ const t = this.X().background || {};
1583
1598
  return this.re.enable = t.enable, this.re.symbol.polygonFill = t.color, this.re.symbol.polygonOpacity = t.opacity,
1584
1599
  this.re.symbol.polygonPatternFile = t.patternFile, this.re.renderPlugin.sceneConfig.depthRange = t.depthRange,
1585
1600
  this.re;
1586
1601
  }
1587
1602
  getComputedStyle() {
1588
- return JSON.parse(JSON.stringify(this.B()));
1603
+ return JSON.parse(JSON.stringify(this.X()));
1589
1604
  }
1590
- B() {
1605
+ X() {
1591
1606
  return {
1592
1607
  background: this.Jt,
1593
1608
  style: this.$t || [],
@@ -1622,14 +1637,14 @@ class pt extends t.TileLayer {
1622
1637
  super.onRemove();
1623
1638
  }
1624
1639
  static fromJSON(t) {
1625
- return t && "VectorTileLayer" === t.type ? new pt(t.id, t.options) : null;
1640
+ return t && "VectorTileLayer" === t.type ? new yt(t.id, t.options) : null;
1626
1641
  }
1627
- _t() {}
1642
+ St() {}
1628
1643
  static registerPlugin(t) {
1629
- pt.plugins || (pt.plugins = {}), pt.plugins[t.type] = t;
1644
+ yt.plugins || (yt.plugins = {}), yt.plugins[t.type] = t;
1630
1645
  }
1631
1646
  static getPlugins() {
1632
- return pt.plugins || {};
1647
+ return yt.plugins || {};
1633
1648
  }
1634
1649
  static compressStyleJSON(t) {
1635
1650
  return Array.isArray(t) && t.length ? function(t) {
@@ -1638,7 +1653,7 @@ class pt extends t.TileLayer {
1638
1653
  featureStyle: []
1639
1654
  });
1640
1655
  const e = [], n = [], i = [];
1641
- ht(t.style, e, i), ht(t.featureStyle, n, i);
1656
+ dt(t.style, e, i), dt(t.featureStyle, n, i);
1642
1657
  const r = {
1643
1658
  plugins: i,
1644
1659
  styles: {
@@ -1652,56 +1667,56 @@ class pt extends t.TileLayer {
1652
1667
  }
1653
1668
  }
1654
1669
 
1655
- function mt(t) {
1670
+ function gt(t) {
1656
1671
  return !(!t || !t.properties);
1657
1672
  }
1658
1673
 
1659
- function yt(t) {
1674
+ function vt(t) {
1660
1675
  return t ? (Array.isArray(t) || (t = C(t).unitArray()), 3 === t.length && t.push(1),
1661
1676
  t) : null;
1662
1677
  }
1663
1678
 
1664
- function gt(t, e) {
1679
+ function bt(t, e) {
1665
1680
  return null == t ? e : t;
1666
1681
  }
1667
1682
 
1668
- function vt(t, e, n) {
1683
+ function xt(t, e, n) {
1669
1684
  if (!t[e] || !t[e].style || !t[e].style[n]) throw new Error(`No plugin defined at feature style of ${e} - ${n}`);
1670
1685
  }
1671
1686
 
1672
- function bt(t, e) {
1687
+ function wt(t, e) {
1673
1688
  if (!t[e]) throw new Error("No plugin defined at style of " + e);
1674
1689
  }
1675
1690
 
1676
- pt.prototype._getTileZoom = function(e) {
1691
+ yt.prototype._getTileZoom = function(e) {
1677
1692
  return e = Math.floor(e), t.TileLayer.prototype._getTileZoom.call(this, e);
1678
- }, pt.registerJSONType("VectorTileLayer"), pt.mergeOptions(ft), pt.registerRenderer("gl", st),
1679
- pt.registerRenderer("canvas", null);
1693
+ }, yt.registerJSONType("VectorTileLayer"), yt.mergeOptions(mt), yt.registerRenderer("gl", lt),
1694
+ yt.registerRenderer("canvas", null);
1680
1695
 
1681
- class xt extends pt {
1696
+ class At extends yt {
1682
1697
  getTileUrl(t, e, n) {
1683
1698
  const i = this.getMap().getResolution(n);
1684
1699
  return super.getTileUrl(t, e, function(t) {
1685
- return 19 - Math.log(t / wt) / Math.LN2;
1700
+ return 19 - Math.log(t / kt) / Math.LN2;
1686
1701
  }(i));
1687
1702
  }
1688
1703
  static fromJSON(t) {
1689
- return t && "MapboxVectorTileLayer" === t.type ? new xt(t.id, t.options) : null;
1704
+ return t && "MapboxVectorTileLayer" === t.type ? new At(t.id, t.options) : null;
1690
1705
  }
1691
1706
  }
1692
1707
 
1693
- xt.registerJSONType("MapboxVectorTileLayer");
1708
+ At.registerJSONType("MapboxVectorTileLayer");
1694
1709
 
1695
- const wt = 12756274 * Math.PI / (256 * Math.pow(2, 20));
1710
+ const kt = 12756274 * Math.PI / (256 * Math.pow(2, 20));
1696
1711
 
1697
- class At extends pt {
1712
+ class _t extends yt {
1698
1713
  constructor(t, e = {}) {
1699
1714
  e.spatialReference = null, super(t, e), this.setData(e.data);
1700
1715
  }
1701
1716
  getWorkerOptions() {
1702
1717
  const t = super.getWorkerOptions();
1703
1718
  let e = this.options.data;
1704
- return e = H(e) || e && e.url ? _t(e) : this.features, t.data = e, t.tileBuffer = this.options.tileBuffer,
1719
+ return e = H(e) || e && e.url ? Tt(e) : this.features, t.data = e, t.tileBuffer = this.options.tileBuffer,
1705
1720
  t.extent = this.options.extent, t.hasAltitude = this.options.enableAltitude, t;
1706
1721
  }
1707
1722
  setData(t) {
@@ -1722,7 +1737,7 @@ class At extends pt {
1722
1737
  const e = t.getWorkerConnection();
1723
1738
  if (e) {
1724
1739
  let n = this.options.data;
1725
- n = H(n) || n.url ? _t(n) : this.features, e.setData(n, (e, n) => {
1740
+ n = H(n) || n.url ? Tt(n) : this.features, e.setData(n, (e, n) => {
1726
1741
  t.clear(), this.onWorkerReady(null, n), t.setToRedraw();
1727
1742
  });
1728
1743
  }
@@ -1742,7 +1757,7 @@ class At extends pt {
1742
1757
  this.he = new t.Extent(...e);
1743
1758
  }
1744
1759
  fe(t, e) {
1745
- H(t) ? dt.getJSON(t, e) : dt.getJSON(t.url, t, e);
1760
+ H(t) ? pt.getJSON(t, e) : pt.getJSON(t.url, t, e);
1746
1761
  }
1747
1762
  getData() {
1748
1763
  return this.features || null;
@@ -1754,7 +1769,7 @@ class At extends pt {
1754
1769
  return this.de[t];
1755
1770
  }
1756
1771
  static fromJSON(t) {
1757
- return t && "GeoJSONVectorTileLayer" === t.type ? new At(t.id, t.options) : null;
1772
+ return t && "GeoJSONVectorTileLayer" === t.type ? new _t(t.id, t.options) : null;
1758
1773
  }
1759
1774
  ce() {
1760
1775
  if (!this.features) return;
@@ -1770,28 +1785,28 @@ class At extends pt {
1770
1785
  }
1771
1786
  }
1772
1787
 
1773
- function kt(t) {
1788
+ function St(t) {
1774
1789
  let e = document.createElement("a");
1775
1790
  return e.href = t, t = e.href, e = null, t;
1776
1791
  }
1777
1792
 
1778
- function _t(t) {
1779
- return t.url ? t.url = kt(t.url) : t = kt(t), t;
1793
+ function Tt(t) {
1794
+ return t.url ? t.url = St(t.url) : t = St(t), t;
1780
1795
  }
1781
1796
 
1782
- At.registerJSONType("GeoJSONVectorTileLayer"), At.mergeOptions({
1797
+ _t.registerJSONType("GeoJSONVectorTileLayer"), _t.mergeOptions({
1783
1798
  features: "id",
1784
1799
  tileBuffer: 64,
1785
1800
  extent: 8192,
1786
1801
  pyramidMode: 1
1787
1802
  });
1788
1803
 
1789
- class St extends t.OverlayLayer {
1804
+ class Mt extends t.OverlayLayer {
1790
1805
  static registerPainter(t, e) {
1791
- St.painters || (St.painters = {}), St.painters[t] = e;
1806
+ Mt.painters || (Mt.painters = {}), Mt.painters[t] = e;
1792
1807
  }
1793
1808
  static get3DPainterClass(t) {
1794
- return St.painters[t];
1809
+ return Mt.painters[t];
1795
1810
  }
1796
1811
  constructor(...t) {
1797
1812
  super(...t), this.options.sceneConfig || (this.options.sceneConfig = {});
@@ -1859,7 +1874,7 @@ class St extends t.OverlayLayer {
1859
1874
  }
1860
1875
  }
1861
1876
 
1862
- St.mergeOptions({
1877
+ Mt.mergeOptions({
1863
1878
  picking: !0,
1864
1879
  renderer: "gl",
1865
1880
  collision: !1,
@@ -1875,7 +1890,7 @@ St.mergeOptions({
1875
1890
  }
1876
1891
  });
1877
1892
 
1878
- const Tt = {
1893
+ const Pt = {
1879
1894
  markerFile: {
1880
1895
  type: "identity",
1881
1896
  default: void 0,
@@ -2021,7 +2036,7 @@ const Tt = {
2021
2036
  default: "point",
2022
2037
  property: "_symbol_markerPlacement"
2023
2038
  }
2024
- }, Mt = {
2039
+ }, It = {
2025
2040
  textName: {
2026
2041
  type: "identity",
2027
2042
  default: void 0,
@@ -2132,7 +2147,7 @@ const Tt = {
2132
2147
  default: "point",
2133
2148
  property: "_symbol_textPlacement"
2134
2149
  }
2135
- }, Pt = {
2150
+ }, Ot = {
2136
2151
  lineWidth: {
2137
2152
  type: "identity",
2138
2153
  default: 2,
@@ -2203,35 +2218,35 @@ const Tt = {
2203
2218
  default: void 0,
2204
2219
  property: "_symbol_lineDashColor"
2205
2220
  }
2206
- }, It = new t.Point(0, 0), Ot = "_vector3dlayer_id", Ct = "_line_gradient_property".trim();
2221
+ }, Ct = new t.Point(0, 0), Ft = "_vector3dlayer_id", zt = "_line_gradient_property".trim();
2207
2222
 
2208
- function Ft(e, n, i) {
2223
+ function Et(e, n, i) {
2209
2224
  const r = "__fea_idx".trim(), o = e.getMap(), s = o.getGLRes();
2210
2225
  let a = e.getCoordinates();
2211
2226
  const l = [];
2212
2227
  let c = 1;
2213
2228
  if (e instanceof t.Marker || e instanceof t.MultiPoint) {
2214
2229
  e instanceof t.Marker && (a = [ a ]);
2215
- for (let t = 0; t < a.length; t++) o.coordToPointAtRes(a[t], s, It), l.push([ It.x, It.y, a[t].z || 0 ]);
2230
+ for (let t = 0; t < a.length; t++) o.coordToPointAtRes(a[t], s, Ct), l.push([ Ct.x, Ct.y, a[t].z || 0 ]);
2216
2231
  } else if (e instanceof t.LineString || e instanceof t.MultiLineString) {
2217
2232
  c = 2, e instanceof t.LineString && (a = [ a ]);
2218
2233
  for (let t = 0; t < a.length; t++) {
2219
2234
  l[t] = [];
2220
- for (let e = 0; e < a[t].length; e++) o.coordToPointAtRes(a[t][e], s, It), l[t].push([ It.x, It.y, a[t][e].z || 0 ]);
2235
+ for (let e = 0; e < a[t].length; e++) o.coordToPointAtRes(a[t][e], s, Ct), l[t].push([ Ct.x, Ct.y, a[t][e].z || 0 ]);
2221
2236
  }
2222
2237
  } else if (e instanceof t.Polygon || e instanceof t.MultiPolygon) {
2223
2238
  c = 3, e instanceof t.Polygon && (a = [ a ]);
2224
2239
  let n = 0;
2225
2240
  for (let t = 0; t < a.length; t++) for (let e = 0; e < a[t].length; e++) {
2226
2241
  l[n] = [];
2227
- for (let i = 0; i < a[t][e].length; i++) o.coordToPointAtRes(a[t][e][i], s, It),
2228
- l[n].push([ It.x, It.y, a[t][e][i].z || 0 ]);
2242
+ for (let i = 0; i < a[t][e].length; i++) o.coordToPointAtRes(a[t][e][i], s, Ct),
2243
+ l[n].push([ Ct.x, Ct.y, a[t][e][i].z || 0 ]);
2229
2244
  n++;
2230
2245
  }
2231
2246
  }
2232
2247
  const h = e.getProperties() ? Object.assign({}, e.getProperties()) : {}, u = e._getInternalSymbol();
2233
2248
  let d = u.lineGradientProperty;
2234
- d && (h[Ct] = h[d], h.mapbox_clip_start = 0, h.mapbox_clip_end = 1, delete h[d]),
2249
+ d && (h[zt] = h[d], h.mapbox_clip_start = 0, h.mapbox_clip_end = 1, delete h[d]),
2235
2250
  delete u.lineGradientProperty;
2236
2251
  const f = i ? Array.isArray(i) ? i[0][r] : i[r] : n.id++;
2237
2252
  if (Array.isArray(u) && u.length) {
@@ -2268,19 +2283,19 @@ function Ft(e, n, i) {
2268
2283
  return m[r] = p, m;
2269
2284
  }
2270
2285
 
2271
- let zt = 1;
2286
+ let jt = 1;
2272
2287
 
2273
- const Et = "_symbol_".trim(), jt = "__fea_idx".trim();
2288
+ const Dt = "_symbol_".trim(), Rt = "__fea_idx".trim();
2274
2289
 
2275
- let Dt = new Float32Array(1);
2290
+ let Nt = new Float32Array(1);
2276
2291
 
2277
- class Rt extends t.renderer.CanvasRenderer {
2292
+ class Lt extends t.renderer.CanvasRenderer {
2278
2293
  constructor(...t) {
2279
- super(...t), this.features = {}, this.pe = {}, this.F = 0, this.me = {}, this.ye = {},
2294
+ super(...t), this.features = {}, this.pe = {}, this.j = 0, this.me = {}, this.ye = {},
2280
2295
  this.ge = {}, this.ve = {}, this.be = {}, this.xe = !0, this.we = {
2281
2296
  id: 0,
2282
2297
  pickingId: 0
2283
- }, this.Ae = L({}, Tt, Mt), this.ke = {};
2298
+ }, this.Ae = L({}, Pt, It), this.ke = {};
2284
2299
  }
2285
2300
  hasNoAARendering() {
2286
2301
  return !0;
@@ -2291,7 +2306,7 @@ class Rt extends t.renderer.CanvasRenderer {
2291
2306
  }
2292
2307
  draw(t, e) {
2293
2308
  const n = this.layer;
2294
- if (this.prepareCanvas(), this.st = this.at(this.getMap().getGLRes()), this.xe) this.buildMesh(),
2309
+ if (this.prepareCanvas(), this.at = this.lt(this.getMap().getGLRes()), this.xe) this.buildMesh(),
2295
2310
  this.Te(), this.Me(), this.ke = {}, this.Pe = !1, this.xe = !1, this.Ie = !1; else if (this.Pe) {
2296
2311
  const t = this.atlas, e = this.Oe, n = this.Ce;
2297
2312
  delete this.atlas, delete this.Oe, delete this.Ce, this.buildMesh(t), this.Te(e),
@@ -2301,8 +2316,8 @@ class Rt extends t.renderer.CanvasRenderer {
2301
2316
  delete this.Ce, this.Me(t), this.Ie = !1;
2302
2317
  }
2303
2318
  if (!this.meshes && !this.Fe && !this.ze) return void this.completeRender();
2304
- this.Ee && (this.je(), this.Ee = !1), this.De(), this.ot = t, this.lt = e || {};
2305
- const i = this.lt.renderMode, r = !i || "default" === i, o = this.Re();
2319
+ this.Ee && (this.je(), this.Ee = !1), this.De(), this.st = t, this.ct = e || {};
2320
+ const i = this.ct.renderMode, r = !i || "default" === i, o = this.Re();
2306
2321
  let s = 0;
2307
2322
  0 === this.layer.options.meshRenderOrder && this.Ne(o, s, i), this.ze && (r || this.Se.supportRenderMode(i)) && (this.Se.startFrame(o),
2308
2323
  this.Se.addMesh(this.ze, null, {
@@ -2338,20 +2353,20 @@ class Rt extends t.renderer.CanvasRenderer {
2338
2353
  cameraPosition: this.getMap().cameraPosition,
2339
2354
  timestamp: this.getFrameTimestamp()
2340
2355
  };
2341
- return this.lt && L(t, this.lt), t;
2356
+ return this.ct && L(t, this.ct), t;
2342
2357
  }
2343
2358
  drawOnInteracting(t, e, n) {
2344
2359
  this.draw(e, n);
2345
2360
  }
2346
2361
  getFrameTimestamp() {
2347
- return this.ot;
2362
+ return this.st;
2348
2363
  }
2349
2364
  He() {
2350
2365
  const t = [], e = [ 0, 0, 0, 0 ];
2351
2366
  this.layer._sortGeometries();
2352
2367
  const n = this.layer.getGeometries();
2353
2368
  for (let i = 0; i < n.length; i++) {
2354
- const r = n[i][Ot];
2369
+ const r = n[i][Ft];
2355
2370
  if (!this.features[r]) continue;
2356
2371
  const o = this.features[r];
2357
2372
  if (Array.isArray(o)) for (let n = 0; n < o.length; n++) {
@@ -2382,10 +2397,10 @@ class Rt extends t.renderer.CanvasRenderer {
2382
2397
  const l = [], c = [];
2383
2398
  return this.createVectorPacks(t, e, n, o, s, a).then(e => {
2384
2399
  if (!e) return null;
2385
- const s = t.createGeometries([ e.data ], nt(o, null, 0, n, this.layer));
2400
+ const s = t.createGeometries([ e.data ], rt(o, null, 0, n, this.layer));
2386
2401
  for (let t = 0; t < s.length; t++) this.Ue(s[t].geometry);
2387
2402
  const h = r.identity([]);
2388
- r.translate(h, h, i.set(c, a[0], a[1], 0)), r.scale(h, h, i.set(l, 1, 1, this.st));
2403
+ r.translate(h, h, i.set(c, a[0], a[1], 0)), r.scale(h, h, i.set(l, 1, 1, this.at));
2389
2404
  const u = t.createMeshes(s, h, {
2390
2405
  tilePoint: [ a[0], a[1] ]
2391
2406
  });
@@ -2419,7 +2434,7 @@ class Rt extends t.renderer.CanvasRenderer {
2419
2434
  }), n.tileRatio = 1, n.z = 1, n.tileExtent = 1;
2420
2435
  }
2421
2436
  qe(t) {
2422
- return "win-intel-gpu-crash" === t && (this.layer.options.workarounds["win-intel-gpu-crash"] && Lt(this.gl));
2437
+ return "win-intel-gpu-crash" === t && (this.layer.options.workarounds["win-intel-gpu-crash"] && Vt(this.gl));
2423
2438
  }
2424
2439
  prepareRequestors() {
2425
2440
  if (this.h) return;
@@ -2460,7 +2475,7 @@ class Rt extends t.renderer.CanvasRenderer {
2460
2475
  delete this.Fe));
2461
2476
  const {features: o, center: s} = this.He(), a = [], l = [];
2462
2477
  for (let t = 0; t < o.length; t++) {
2463
- const e = o[t][jt];
2478
+ const e = o[t][Rt];
2464
2479
  this.ge[e] && a.push(o[t]), this.ve[e] && l.push(o[t]);
2465
2480
  }
2466
2481
  if (!a.length && !l.length) return void (this.Fe && (this._e.deleteMesh(this.Fe),
@@ -2477,10 +2492,10 @@ class Rt extends t.renderer.CanvasRenderer {
2477
2492
  const n = t[0] && t[0].data.iconAtlas, o = t[0] && t[0].data.glyphAtlas || t[1] && t[1].data.glyphAtlas;
2478
2493
  n && (this.Oe.iconAtlas = n), o && (this.Oe.glyphAtlas = o);
2479
2494
  const a = r.identity([]);
2480
- r.translate(a, a, i.set(d, s[0], s[1], 0)), r.scale(a, a, i.set(u, 1, 1, this.st));
2495
+ r.translate(a, a, i.set(d, s[0], s[1], 0)), r.scale(a, a, i.set(u, 1, 1, this.at));
2481
2496
  const l = this._e.createMeshes(e, a);
2482
2497
  for (let t = 0; t < l.length; t++) l[t].geometry.properties.originElements = l[t].geometry.properties.elements.slice(),
2483
- l[t].setUniform("level", 0), l[t].material.set("flipY", 1), l[t].properties.meshKey = zt++;
2498
+ l[t].setUniform("level", 0), l[t].material.set("flipY", 1), l[t].properties.meshKey = jt++;
2484
2499
  this.Fe = l, c && (this.Ee = !0), this.Je = !1, this.setToRedraw();
2485
2500
  });
2486
2501
  }
@@ -2530,7 +2545,7 @@ class Rt extends t.renderer.CanvasRenderer {
2530
2545
  !1;
2531
2546
  }
2532
2547
  for (let t = 0; t < r.length; t++) {
2533
- const e = r[t][jt];
2548
+ const e = r[t][Rt];
2534
2549
  this.ge[e] && o.push(r[t]), this.ve[e] && s.push(r[t]);
2535
2550
  }
2536
2551
  const h = r[0].id, u = this.$e(o, s, this.Oe, this.Xe), d = this.Fe;
@@ -2550,14 +2565,14 @@ class Rt extends t.renderer.CanvasRenderer {
2550
2565
  }), !0;
2551
2566
  }
2552
2567
  tn(t) {
2553
- return this.en(t, this.ze, this.Ce, this.nn, this.Se, A, Pt, this.in);
2568
+ return this.en(t, this.ze, this.Ce, this.nn, this.Se, A, Ot, this.in);
2554
2569
  }
2555
2570
  en(t, e, n, i, r, o, s, a) {
2556
2571
  if (!e) return !1;
2557
2572
  if (!n) return this.Qe(), this.setToRedraw(), !1;
2558
2573
  const l = t._getInternalSymbol(), c = {
2559
2574
  zoom: this.getMap().getZoom()
2560
- }, h = t[Ot];
2575
+ }, h = t[Ft];
2561
2576
  let u = this.features[h];
2562
2577
  Array.isArray(u) || (u = [ u ]);
2563
2578
  const d = [];
@@ -2598,7 +2613,7 @@ class Rt extends t.renderer.CanvasRenderer {
2598
2613
  let t = o + 1;
2599
2614
  for (;r[t] === f; ) t++;
2600
2615
  const e = t - o;
2601
- Dt.length !== 3 * e && (Dt = new Float32Array(3 * e), Dt.fill(-1 / 0, 0)), i.geometry.updateSubData(i.geometry.desc.positionAttribute, Dt, 3 * o);
2616
+ Nt.length !== 3 * e && (Nt = new Float32Array(3 * e), Nt.fill(-1 / 0, 0)), i.geometry.updateSubData(i.geometry.desc.positionAttribute, Nt, 3 * o);
2602
2617
  }
2603
2618
  this.setToRedraw();
2604
2619
  }
@@ -2612,7 +2627,7 @@ class Rt extends t.renderer.CanvasRenderer {
2612
2627
  if (!e.length) return;
2613
2628
  const i = this.Ee;
2614
2629
  this.nn = n;
2615
- const r = this.in(e), o = L({}, Pt), s = r.map((e, i) => this.createMesh(this.Se, A, o, e, t && t[i], n));
2630
+ const r = this.in(e), o = L({}, Ot), s = r.map((e, i) => this.createMesh(this.Se, A, o, e, t && t[i], n));
2616
2631
  this.rn = !0, Promise.all(s).then(t => {
2617
2632
  this.ze && this.Se.deleteMesh(this.ze);
2618
2633
  const e = [], n = [];
@@ -2630,10 +2645,10 @@ class Rt extends t.renderer.CanvasRenderer {
2630
2645
  });
2631
2646
  }
2632
2647
  in(t) {
2633
- const e = (Et + "lineDasharray").trim(), n = (Et + "linePatternFile").trim(), i = [], r = [], o = [];
2648
+ const e = (Dt + "lineDasharray").trim(), n = (Dt + "linePatternFile").trim(), i = [], r = [], o = [];
2634
2649
  for (let s = 0; s < t.length; s++) {
2635
2650
  const a = t[s], l = a.properties && a.properties[e];
2636
- l && Wt(l) ? o.push(a) : a.properties && a.properties[n] ? r.push(a) : i.push(a);
2651
+ l && Xt(l) ? o.push(a) : a.properties && a.properties[n] ? r.push(a) : i.push(a);
2637
2652
  }
2638
2653
  return [ r, o, i ];
2639
2654
  }
@@ -2657,9 +2672,9 @@ class Rt extends t.renderer.CanvasRenderer {
2657
2672
  }
2658
2673
  }
2659
2674
  Ke(t) {
2660
- void 0 === t[Ot] && (t[Ot] = this.F++);
2661
- const e = t[Ot];
2662
- this.features[e] && this.ln(e), this.features[e] = Ft(t, this.we, this.features[e]);
2675
+ void 0 === t[Ft] && (t[Ft] = this.j++);
2676
+ const e = t[Ft];
2677
+ this.features[e] && this.ln(e), this.features[e] = Et(t, this.we, this.features[e]);
2663
2678
  const n = this.features[e];
2664
2679
  return this.cn(n, e), this.pe[e] = t, e;
2665
2680
  }
@@ -2667,30 +2682,30 @@ class Rt extends t.renderer.CanvasRenderer {
2667
2682
  if (!t) return;
2668
2683
  const n = Array.isArray(t) ? t[0].id : t.id;
2669
2684
  if (this.ye[n] = t, Array.isArray(t)) for (let n = 0; n < t.length; n++) {
2670
- const i = t[n][jt];
2671
- t[n][Ot] = e, this.me[i] = {
2685
+ const i = t[n][Rt];
2686
+ t[n][Ft] = e, this.me[i] = {
2672
2687
  feature: t[n]
2673
- }, this.me[i][Ot] = e;
2688
+ }, this.me[i][Ft] = e;
2674
2689
  const r = {
2675
2690
  feature: t[n]
2676
2691
  };
2677
- Ht(t[n]) && (this.ge[i] = r), Vt(t[n]) && (this.ve[i] = r), Gt(t[n]) && (this.be[i] = r);
2692
+ Ut(t[n]) && (this.ge[i] = r), qt(t[n]) && (this.ve[i] = r), Bt(t[n]) && (this.be[i] = r);
2678
2693
  } else {
2679
- t[Ot] = e;
2694
+ t[Ft] = e;
2680
2695
  const n = {
2681
2696
  feature: t
2682
- }, i = t[jt];
2683
- Ht(t) && (this.ge[i] = n), Vt(t) && (this.ve[i] = n), Gt(t) && (this.be[i] = n),
2697
+ }, i = t[Rt];
2698
+ Ut(t) && (this.ge[i] = n), qt(t) && (this.ve[i] = n), Bt(t) && (this.be[i] = n),
2684
2699
  this.me[i] = n;
2685
2700
  }
2686
2701
  }
2687
2702
  ln(t) {
2688
2703
  const e = this.features[t];
2689
2704
  if (Array.isArray(e)) for (let t = 0; t < e.length; t++) {
2690
- const n = e[t][jt], i = e[t].id;
2705
+ const n = e[t][Rt], i = e[t].id;
2691
2706
  delete this.ye[i], delete this.me[n], delete this.ge[n], delete this.ve[n], delete this.be[n];
2692
2707
  } else {
2693
- const t = e[jt], n = e.id;
2708
+ const t = e[Rt], n = e.id;
2694
2709
  delete this.ye[n], delete this.me[t], delete this.ge[t], delete this.ve[t], delete this.be[t];
2695
2710
  }
2696
2711
  }
@@ -2701,13 +2716,13 @@ class Rt extends t.renderer.CanvasRenderer {
2701
2716
  const o = r.pick(t, e, n.tolerance);
2702
2717
  if (o && o.data && o.data.feature) {
2703
2718
  const t = o.data.feature;
2704
- i.push(this.pe[t[Ot]]);
2719
+ i.push(this.pe[t[Ft]]);
2705
2720
  }
2706
2721
  }), i;
2707
2722
  }
2708
2723
  hn(t) {
2709
- const e = t[Ot], n = this.features[e];
2710
- return Array.isArray(n) ? n[0][jt] : n[jt];
2724
+ const e = t[Ft], n = this.features[e];
2725
+ return Array.isArray(n) ? n[0][Rt] : n[Rt];
2711
2726
  }
2712
2727
  De() {
2713
2728
  let t = !1;
@@ -2726,40 +2741,40 @@ class Rt extends t.renderer.CanvasRenderer {
2726
2741
  t = t || e;
2727
2742
  }
2728
2743
  }
2729
- this.ke = {}, t && (Nt(this), this.layer.fire("partialupdate"));
2744
+ this.ke = {}, t && (Ht(this), this.layer.fire("partialupdate"));
2730
2745
  }
2731
2746
  dn(t) {
2732
- this.Ke(t), this.Qe(), Nt(this);
2747
+ this.Ke(t), this.Qe(), Ht(this);
2733
2748
  }
2734
2749
  onGeometryAdd(t) {
2735
- this.canvas && t && t.length && (this.an(t), this.Qe(), Nt(this));
2750
+ this.canvas && t && t.length && (this.an(t), this.Qe(), Ht(this));
2736
2751
  }
2737
2752
  onGeometryRemove(t) {
2738
2753
  if (t && t.length) {
2739
2754
  for (let e = 0; e < t.length; e++) {
2740
- const n = t[e][Ot];
2755
+ const n = t[e][Ft];
2741
2756
  void 0 !== n && (delete this.pe[n], this.ln(n), delete this.features[n]);
2742
2757
  }
2743
- this.Qe(), Nt(this);
2758
+ this.Qe(), Ht(this);
2744
2759
  }
2745
2760
  }
2746
2761
  onGeometrySymbolChange(t) {
2747
2762
  const e = t.target._getParent() || t.target, n = t.properties;
2748
2763
  for (const t in n) if (B(n, t) && _[t]) return void this.dn(e);
2749
- const i = e[Ot], r = e._getInternalSymbol(), o = this.features[i];
2764
+ const i = e[Ft], r = e._getInternalSymbol(), o = this.features[i];
2750
2765
  if (this.Ke(e), o) if (function(t, e) {
2751
2766
  return Array.isArray(t) ? !!Array.isArray(e) && t.length === e.length : !Array.isArray(e);
2752
2767
  }(r, o)) {
2753
2768
  if (Array.isArray(r)) for (let t = 0; t < r.length; t++) {
2754
- if (!Bt(r[t], o[t])) return void this.dn(e);
2755
- } else if (!Bt(r, o)) return void this.dn(e);
2769
+ if (!$t(r[t], o[t])) return void this.dn(e);
2770
+ } else if (!$t(r, o)) return void this.dn(e);
2756
2771
  this.onGeometryPositionChange(t);
2757
2772
  } else this.dn(e); else this.dn(e);
2758
2773
  }
2759
2774
  onGeometryShapeChange(t) {
2760
- const e = t.target._getParent() || t.target, n = Ft(e, {
2775
+ const e = t.target._getParent() || t.target, n = Et(e, {
2761
2776
  id: 0
2762
- }).geometry, i = e[Ot], r = this.features[i];
2777
+ }).geometry, i = e[Ft], r = this.features[i];
2763
2778
  if (function t(e, n) {
2764
2779
  if (e.length !== n.length) return !1;
2765
2780
  if (Array.isArray(e[0]) && Array.isArray(n[0])) {
@@ -2768,11 +2783,11 @@ class Rt extends t.renderer.CanvasRenderer {
2768
2783
  return !0;
2769
2784
  }(n, (Array.isArray(r) ? r[0] : r).geometry)) return this.ze && (this.Ie = !0),
2770
2785
  void this.onGeometryPositionChange(t);
2771
- this.an([ e ]), this.sn(), Nt(this);
2786
+ this.an([ e ]), this.sn(), Ht(this);
2772
2787
  }
2773
2788
  onGeometryPositionChange(t) {
2774
- const e = t.target._getParent() || t.target, n = e[Ot];
2775
- this.an([ e ]), this.ke[n] = e, Nt(this);
2789
+ const e = t.target._getParent() || t.target, n = e[Ft];
2790
+ this.an([ e ]), this.ke[n] = e, Ht(this);
2776
2791
  }
2777
2792
  onGeometryZIndexChange() {
2778
2793
  this.Qe();
@@ -2784,7 +2799,7 @@ class Rt extends t.renderer.CanvasRenderer {
2784
2799
  this.pn(t);
2785
2800
  }
2786
2801
  pn(t) {
2787
- const e = t.target, n = e[Ot], i = this.features[n];
2802
+ const e = t.target, n = e[Ft], i = this.features[n];
2788
2803
  if (i) {
2789
2804
  const t = e.isVisible();
2790
2805
  if (Array.isArray(i)) {
@@ -2794,37 +2809,37 @@ class Rt extends t.renderer.CanvasRenderer {
2794
2809
  if (t === i.visible) return;
2795
2810
  i.visible = t;
2796
2811
  }
2797
- this.mn(), Nt(this);
2812
+ this.mn(), Ht(this);
2798
2813
  }
2799
2814
  }
2800
2815
  mn() {
2801
2816
  this.Ee = !0;
2802
2817
  }
2803
2818
  onGeometryPropertiesChange(t) {
2804
- const e = t.target, n = e[Ot];
2805
- this.features[n] = Ft(e, this.we), this.cn(this.features[n], n), this.Qe(), Nt(this);
2819
+ const e = t.target, n = e[Ft];
2820
+ this.features[n] = Et(e, this.we), this.cn(this.features[n], n), this.Qe(), Ht(this);
2806
2821
  }
2807
2822
  createContext() {
2808
2823
  const t = this.canvas.gl && this.canvas.gl.wrap;
2809
- t ? (this.gl = this.canvas.gl.wrap(), this.regl = this.canvas.gl.regl) : this.K(),
2824
+ t ? (this.gl = this.canvas.gl.wrap(), this.regl = this.canvas.gl.regl) : this.tt(),
2810
2825
  t && (this.canvas.pickingFBO = this.canvas.pickingFBO || this.regl.framebuffer(this.canvas.width, this.canvas.height)),
2811
2826
  this.prepareRequestors(), this.pickingFBO = this.canvas.pickingFBO || this.regl.framebuffer(this.canvas.width, this.canvas.height),
2812
2827
  this.painter = this.createPainter();
2813
- const e = St.get3DPainterClass("icon"), n = L({}, Tt, Mt);
2828
+ const e = Mt.get3DPainterClass("icon"), n = L({}, Pt, It);
2814
2829
  this._e = new e(this.regl, this.layer, n, this.layer.options.sceneConfig, 0), this._e.setTextShaderDefines({
2815
2830
  REVERSE_MAP_ROTATION_ON_PITCH: 1
2816
2831
  });
2817
- const i = St.get3DPainterClass("line"), r = L({}, Pt);
2832
+ const i = Mt.get3DPainterClass("line"), r = L({}, Ot);
2818
2833
  this.Se = new i(this.regl, this.layer, r, this.layer.options.sceneConfig, 0), this.layer.getGeometries() && this.onGeometryAdd(this.layer.getGeometries());
2819
2834
  }
2820
2835
  createPainter() {}
2821
- K() {
2836
+ tt() {
2822
2837
  const t = this.layer.options.glOptions || {
2823
2838
  alpha: !0,
2824
2839
  depth: !0,
2825
2840
  antialias: !1
2826
2841
  };
2827
- t.preserveDrawingBuffer = !0, t.stencil = !0, this.glOptions = t, this.gl = this.gl || this.nt(this.canvas, t),
2842
+ t.preserveDrawingBuffer = !0, t.stencil = !0, this.glOptions = t, this.gl = this.gl || this.it(this.canvas, t),
2828
2843
  this.regl = s({
2829
2844
  gl: this.gl,
2830
2845
  attributes: t,
@@ -2832,7 +2847,7 @@ class Rt extends t.renderer.CanvasRenderer {
2832
2847
  optionalExtensions: n.Constants.WEBGL_OPTIONAL_EXTENSIONS
2833
2848
  });
2834
2849
  }
2835
- nt(t, e) {
2850
+ it(t, e) {
2836
2851
  const n = [ "webgl", "experimental-webgl" ];
2837
2852
  let i = null;
2838
2853
  for (let r = 0; r < n.length; ++r) {
@@ -2861,12 +2876,12 @@ class Rt extends t.renderer.CanvasRenderer {
2861
2876
  this.Se && this.Se.delete();
2862
2877
  }
2863
2878
  drawOutline(t) {
2864
- if (this.gt && (this.painter && this.painter.outlineAll(t), this._e.outlineAll(t),
2879
+ if (this.vt && (this.painter && this.painter.outlineAll(t), this._e.outlineAll(t),
2865
2880
  this.Se.outlineAll(t)), this.yn) for (let e = 0; e < this.yn.length; e++) this.painter && this.painter.outline(t, this.yn[e]),
2866
2881
  this._e.outline(t, this.yn[e]), this.Se.outline(t, this.yn[e]);
2867
2882
  }
2868
2883
  outlineAll() {
2869
- this.gt = !0, this.setToRedraw();
2884
+ this.vt = !0, this.setToRedraw();
2870
2885
  }
2871
2886
  outline(t) {
2872
2887
  this.yn || (this.yn = []);
@@ -2874,28 +2889,28 @@ class Rt extends t.renderer.CanvasRenderer {
2874
2889
  for (let n = 0; n < t.length; n++) {
2875
2890
  const i = this.layer.getGeometryById(t[n]);
2876
2891
  if (i) {
2877
- const t = this.features[i[Ot]];
2892
+ const t = this.features[i[Ft]];
2878
2893
  if (Array.isArray(t)) for (let n = 0; n < t.length; n++) e.push(t[n].id); else e.push(t.id);
2879
2894
  }
2880
2895
  }
2881
2896
  this.yn.push(e), this.setToRedraw();
2882
2897
  }
2883
2898
  cancelOutline() {
2884
- delete this.gt, delete this.yn, this.setToRedraw();
2899
+ delete this.vt, delete this.yn, this.setToRedraw();
2885
2900
  }
2886
2901
  isEnableWorkAround(t) {
2887
- return "win-intel-gpu-crash" === t && (this.layer.options.workarounds["win-intel-gpu-crash"] && Lt(this.gl));
2902
+ return "win-intel-gpu-crash" === t && (this.layer.options.workarounds["win-intel-gpu-crash"] && Vt(this.gl));
2888
2903
  }
2889
- at(t) {
2904
+ lt(t) {
2890
2905
  return X(t, this.getMap());
2891
2906
  }
2892
2907
  }
2893
2908
 
2894
- function Nt(t) {
2909
+ function Ht(t) {
2895
2910
  t.setToRedraw();
2896
2911
  }
2897
2912
 
2898
- function Lt(t) {
2913
+ function Vt(t) {
2899
2914
  const e = t.getExtension("WEBGL_debug_renderer_info");
2900
2915
  if (e && "undefined" != typeof navigator) {
2901
2916
  const n = t.getParameter(e.UNMASKED_RENDERER_WEBGL), i = "Win32" === navigator.platform || "Win64" === navigator.platform;
@@ -2904,38 +2919,38 @@ function Lt(t) {
2904
2919
  return !1;
2905
2920
  }
2906
2921
 
2907
- function Ht({properties: t}) {
2908
- const e = (Et + "markerFile").trim(), n = (Et + "markerType").trim();
2922
+ function Ut({properties: t}) {
2923
+ const e = (Dt + "markerFile").trim(), n = (Dt + "markerType").trim();
2909
2924
  return t[e] || t[n];
2910
2925
  }
2911
2926
 
2912
- function Vt({properties: t}) {
2913
- return t[(Et + "textName").trim()];
2927
+ function qt({properties: t}) {
2928
+ return t[(Dt + "textName").trim()];
2914
2929
  }
2915
2930
 
2916
- const Ut = (Et + "lineWidth").trim(), qt = "_line_gradient_property".trim();
2931
+ const Gt = (Dt + "lineWidth").trim(), Wt = "_line_gradient_property".trim();
2917
2932
 
2918
- function Gt(t) {
2919
- return 2 === t.type && !t.properties[qt] || 3 === t.type && !!t.properties[Ut];
2933
+ function Bt(t) {
2934
+ return 2 === t.type && !t.properties[Wt] || 3 === t.type && !!t.properties[Gt];
2920
2935
  }
2921
2936
 
2922
- function Wt(t) {
2937
+ function Xt(t) {
2923
2938
  if (!Array.isArray(t)) return 0;
2924
2939
  let e = 0;
2925
2940
  for (let n = 0; n < t.length; n++) e += t[n];
2926
2941
  return e;
2927
2942
  }
2928
2943
 
2929
- function Bt(t, e) {
2930
- if (Object.keys(t).sort().join() !== Object.keys(e.properties || {}).filter(t => 0 === t.indexOf(Et)).map(t => t.substring(Et.length)).sort().join()) return !1;
2944
+ function $t(t, e) {
2945
+ if (Object.keys(t).sort().join() !== Object.keys(e.properties || {}).filter(t => 0 === t.indexOf(Dt)).map(t => t.substring(Dt.length)).sort().join()) return !1;
2931
2946
  for (const n in t) if (B(t, n)) {
2932
- const i = (Et + n).trim();
2947
+ const i = (Dt + n).trim();
2933
2948
  if (p(t[n]) !== p(e.properties[i])) return !1;
2934
2949
  }
2935
2950
  return !0;
2936
2951
  }
2937
2952
 
2938
- function Xt(e, n, i) {
2953
+ function Jt(e, n, i) {
2939
2954
  if (!e || e.type !== n) return null;
2940
2955
  const r = new i(e.id, e.options), o = e.geometries, s = [];
2941
2956
  for (let e = 0; e < o.length; e++) {
@@ -2945,13 +2960,13 @@ function Xt(e, n, i) {
2945
2960
  return r.addGeometry(s), r;
2946
2961
  }
2947
2962
 
2948
- class $t extends St {
2963
+ class Yt extends Mt {
2949
2964
  static fromJSON(t) {
2950
- return Xt(t, "PointLayer", $t);
2965
+ return Jt(t, "PointLayer", Yt);
2951
2966
  }
2952
2967
  }
2953
2968
 
2954
- $t.mergeOptions({
2969
+ Yt.mergeOptions({
2955
2970
  glyphSdfLimitPerFrame: 15,
2956
2971
  iconErrorUrl: null,
2957
2972
  workarounds: {
@@ -2968,9 +2983,9 @@ $t.mergeOptions({
2968
2983
  uniquePlacement: !1,
2969
2984
  depthFunc: "always"
2970
2985
  }
2971
- }), $t.registerJSONType("PointLayer"), $t.registerRenderer("canvas", null);
2986
+ }), Yt.registerJSONType("PointLayer"), Yt.registerRenderer("canvas", null);
2972
2987
 
2973
- $t.registerRenderer("gl", class extends Rt {
2988
+ Yt.registerRenderer("gl", class extends Lt {
2974
2989
  constructor(...e) {
2975
2990
  super(...e), this.GeometryTypes = [ t.Marker, t.MultiPoint ];
2976
2991
  }
@@ -2981,32 +2996,32 @@ $t.registerRenderer("gl", class extends Rt {
2981
2996
  }
2982
2997
  });
2983
2998
 
2984
- class Jt extends St {
2999
+ class Zt extends Mt {
2985
3000
  static fromJSON(t) {
2986
- return Xt(t, "LineStringLayer", Jt);
3001
+ return Jt(t, "LineStringLayer", Zt);
2987
3002
  }
2988
3003
  }
2989
3004
 
2990
- Jt.mergeOptions({
3005
+ Zt.mergeOptions({
2991
3006
  meshRenderOrder: 1
2992
- }), Jt.registerJSONType("LineStringLayer");
3007
+ }), Zt.registerJSONType("LineStringLayer");
2993
3008
 
2994
- const Yt = "_line_gradient_property".trim();
3009
+ const Kt = "_line_gradient_property".trim();
2995
3010
 
2996
- Jt.registerRenderer("gl", class extends Rt {
3011
+ Zt.registerRenderer("gl", class extends Lt {
2997
3012
  constructor(...e) {
2998
3013
  super(...e), this.GeometryTypes = [ t.LineString, t.MultiLineString ];
2999
3014
  }
3000
3015
  createPainter() {
3001
- const t = St.get3DPainterClass("line-gradient");
3016
+ const t = Mt.get3DPainterClass("line-gradient");
3002
3017
  this.painterSymbol = L({}, {
3003
- lineGradientProperty: Yt
3004
- }, Pt);
3018
+ lineGradientProperty: Kt
3019
+ }, Ot);
3005
3020
  return new t(this.regl, this.layer, this.painterSymbol, this.layer.options.sceneConfig, 0);
3006
3021
  }
3007
3022
  buildMesh() {
3008
3023
  let {features: t, center: e} = this.He();
3009
- if (t = t.filter(t => !!t.properties[Yt]), !t.length) return;
3024
+ if (t = t.filter(t => !!t.properties[Kt]), !t.length) return;
3010
3025
  const n = this.Ee;
3011
3026
  this.gn = e;
3012
3027
  const i = L({}, this.painterSymbol), r = this.createMesh(this.painter, A, i, t, null, e);
@@ -3020,17 +3035,17 @@ Jt.registerRenderer("gl", class extends Rt {
3020
3035
  this.meshes = e, n && (this.Ee = n), this.un = !1, this.setToRedraw();
3021
3036
  });
3022
3037
  }
3023
- }), Jt.registerRenderer("canvas", null);
3038
+ }), Zt.registerRenderer("canvas", null);
3024
3039
 
3025
- class Zt extends St {
3040
+ class Qt extends Mt {
3026
3041
  static fromJSON(t) {
3027
- return Xt(t, "PolygonLayer", Zt);
3042
+ return Jt(t, "PolygonLayer", Qt);
3028
3043
  }
3029
3044
  }
3030
3045
 
3031
- Zt.registerJSONType("PolygonLayer");
3046
+ Qt.registerJSONType("PolygonLayer");
3032
3047
 
3033
- const Kt = {
3048
+ const te = {
3034
3049
  polygonFill: {
3035
3050
  type: "identity",
3036
3051
  default: void 0,
@@ -3058,7 +3073,7 @@ const Kt = {
3058
3073
  }
3059
3074
  };
3060
3075
 
3061
- Zt.registerRenderer("gl", class extends Rt {
3076
+ Qt.registerRenderer("gl", class extends Lt {
3062
3077
  constructor(...e) {
3063
3078
  super(...e), this.PackClass = S, this.GeometryTypes = [ t.Polygon, t.MultiPolygon ];
3064
3079
  }
@@ -3067,7 +3082,7 @@ Zt.registerRenderer("gl", class extends Rt {
3067
3082
  if (!e.length) return;
3068
3083
  const i = this.Ee;
3069
3084
  this.gn = n;
3070
- const r = this.vn(e), o = L({}, Kt), s = r.map((e, i) => this.createMesh(this.painter, S, o, e, t && t[i], n));
3085
+ const r = this.vn(e), o = L({}, te), s = r.map((e, i) => this.createMesh(this.painter, S, o, e, t && t[i], n));
3071
3086
  this.un = !0, Promise.all(s).then(t => {
3072
3087
  this.meshes && this.painter.deleteMesh(this.meshes);
3073
3088
  const e = [], n = [];
@@ -3092,23 +3107,23 @@ Zt.registerRenderer("gl", class extends Rt {
3092
3107
  return [ e, n ];
3093
3108
  }
3094
3109
  createPainter() {
3095
- const t = St.get3DPainterClass("fill");
3096
- this.painterSymbol = L({}, Kt);
3110
+ const t = Mt.get3DPainterClass("fill");
3111
+ this.painterSymbol = L({}, te);
3097
3112
  return new t(this.regl, this.layer, this.painterSymbol, this.layer.options.sceneConfig, 0);
3098
3113
  }
3099
3114
  updateMesh(t) {
3100
- return this.en(t, this.meshes, this.atlas, this.gn, this.painter, S, Kt, this.vn);
3115
+ return this.en(t, this.meshes, this.atlas, this.gn, this.painter, S, te, this.vn);
3101
3116
  }
3102
- }), Zt.registerRenderer("canvas", null);
3117
+ }), Qt.registerRenderer("canvas", null);
3103
3118
 
3104
- const Qt = {
3119
+ const ee = {
3105
3120
  redraw: !1,
3106
3121
  retire: !1
3107
- }, te = [];
3122
+ }, ne = [];
3108
3123
 
3109
- let ee = 1;
3124
+ let ie = 1;
3110
3125
 
3111
- function ne(t, e) {
3126
+ function re(t, e) {
3112
3127
  return E.extend(t, {
3113
3128
  init: function() {
3114
3129
  this.bn = {};
@@ -3145,7 +3160,7 @@ function ne(t, e) {
3145
3160
  },
3146
3161
  getShadowMeshes() {
3147
3162
  const t = this.painter;
3148
- return t && t.getShadowMeshes && t.getShadowMeshes() || te;
3163
+ return t && t.getShadowMeshes && t.getShadowMeshes() || ne;
3149
3164
  },
3150
3165
  createTile: function(t) {
3151
3166
  const {tileCache: e, tileData: n} = t;
@@ -3170,7 +3185,7 @@ function ne(t, e) {
3170
3185
  for (let e = 0; e < s.length; e++) s[e] && s[e].geometry && (i = !0, s[e].geometry.properties.features = o,
3171
3186
  this.Ue(s[e].geometry, t));
3172
3187
  }
3173
- let a = this.D(o);
3188
+ let a = this.R(o);
3174
3189
  if (!a) {
3175
3190
  const {meshes: e, retire: n} = this.Sn(s, t);
3176
3191
  i || (i = n), a = e;
@@ -3190,7 +3205,7 @@ function ne(t, e) {
3190
3205
  });
3191
3206
  if (d.length) {
3192
3207
  const t = n.getRenderer().isEnableTileStencil();
3193
- for (let n = 0; n < d.length; n++) d[n] && (c = !0, this.Tn(d[n], o, e.timestamp, ee++, t));
3208
+ for (let n = 0; n < d.length; n++) d[n] && (c = !0, this.Tn(d[n], o, e.timestamp, ie++, t));
3194
3209
  l.animation && (d.Mn = e.timestamp);
3195
3210
  const i = this.kn(e);
3196
3211
  this.bn[i] = d;
@@ -3202,17 +3217,17 @@ function ne(t, e) {
3202
3217
  },
3203
3218
  paintTile: function(t) {
3204
3219
  const {tileCache: e, tileInfo: n, tileZoom: i, sceneConfig: r, bloom: o} = t, s = this.painter;
3205
- if (!s) return Qt;
3220
+ if (!s) return ee;
3206
3221
  let a = e.geometry;
3207
- if (!a) return Qt;
3222
+ if (!a) return ee;
3208
3223
  let l = !1;
3209
3224
  const c = this.kn(t);
3210
- let h = this.D(c);
3225
+ let h = this.R(c);
3211
3226
  if (!h) {
3212
3227
  const {meshes: e, retire: n} = this.Sn(a, t);
3213
3228
  l || (l = n), h = e;
3214
3229
  }
3215
- if (!h.length) return Qt;
3230
+ if (!h.length) return ee;
3216
3231
  const u = s.getTileLevelValue(n, i);
3217
3232
  h.forEach(t => {
3218
3233
  t.properties.tile = n, t.properties.level = u, t.setUniform("level", u);
@@ -3314,9 +3329,9 @@ function ne(t, e) {
3314
3329
  },
3315
3330
  kn: function(t) {
3316
3331
  const e = t.tileInfo;
3317
- return e.meshKey || (e.meshKey = ee++), e.meshKey;
3332
+ return e.meshKey || (e.meshKey = ie++), e.meshKey;
3318
3333
  },
3319
- D: function(t) {
3334
+ R: function(t) {
3320
3335
  return this.bn[t];
3321
3336
  },
3322
3337
  Pn(t, e) {
@@ -3356,7 +3371,7 @@ function ne(t, e) {
3356
3371
  });
3357
3372
  }
3358
3373
 
3359
- class ie {
3374
+ class oe {
3360
3375
  constructor() {
3361
3376
  this.On = 1;
3362
3377
  }
@@ -3373,7 +3388,7 @@ class ie {
3373
3388
  }
3374
3389
  }
3375
3390
 
3376
- function re(t) {
3391
+ function se(t) {
3377
3392
  for (let e = 1; e < arguments.length; e++) {
3378
3393
  const n = arguments[e];
3379
3394
  for (const e in n) t[e] = n[e];
@@ -3381,76 +3396,76 @@ function re(t) {
3381
3396
  return t;
3382
3397
  }
3383
3398
 
3384
- function oe(t, e, n) {
3399
+ function ae(t, e, n) {
3385
3400
  return Math.min(n, Math.max(e, t));
3386
3401
  }
3387
3402
 
3388
- function se(t, e, n) {
3403
+ function le(t, e, n) {
3389
3404
  if (t === n || t === e) return t;
3390
3405
  const i = n - e;
3391
3406
  return ((t - e) % i + i) % i + e;
3392
3407
  }
3393
3408
 
3394
- function ae(t) {
3409
+ function ce(t) {
3395
3410
  return null == t;
3396
3411
  }
3397
3412
 
3398
- function le(t) {
3413
+ function he(t) {
3399
3414
  return JSON.parse(JSON.stringify(t));
3400
3415
  }
3401
3416
 
3402
- function ce(t, e, n, i, r, o) {
3417
+ function ue(t, e, n, i, r, o) {
3403
3418
  Object.defineProperty(t, e, {
3404
3419
  enumerable: !0,
3405
3420
  get: function() {
3406
- const t = ae(n[i]) || p(n[i]) ? r : n[i];
3421
+ const t = ce(n[i]) || p(n[i]) ? r : n[i];
3407
3422
  return o ? o(t) : t;
3408
3423
  }
3409
3424
  });
3410
3425
  }
3411
3426
 
3412
- const he = [];
3427
+ const de = [];
3413
3428
 
3414
- function ue(t) {
3415
- for (let e = 0; e < t.length; e++) he[e] = t[e], he[e] *= 255;
3416
- return 3 === t.length && (he[3] = 255), he;
3429
+ function fe(t) {
3430
+ for (let e = 0; e < t.length; e++) de[e] = t[e], de[e] *= 255;
3431
+ return 3 === t.length && (de[3] = 255), de;
3417
3432
  }
3418
3433
 
3419
- function de(t, e = 4) {
3420
- return fe.bind(this, t, e);
3434
+ function pe(t, e = 4) {
3435
+ return me.bind(this, t, e);
3421
3436
  }
3422
3437
 
3423
- function fe(t, e, n) {
3438
+ function me(t, e, n) {
3424
3439
  if (Array.isArray(n)) return 3 === n.length && 4 === e && n.push(1), n;
3425
3440
  if (t && t[n]) return t[n];
3426
3441
  const i = C(n).unitArray();
3427
3442
  return 3 === i.length && 4 === e && i.push(1), t && (t[n] = i), i;
3428
3443
  }
3429
3444
 
3430
- function pe(t, e, n, i) {
3445
+ function ye(t, e, n, i) {
3431
3446
  if (t.fill) t.fill(e, n, i); else for (let r = n; r < i; r++) t[r] = e;
3432
3447
  }
3433
3448
 
3434
- function me(t) {
3449
+ function ge(t) {
3435
3450
  return "number" == typeof t && !isNaN(t);
3436
3451
  }
3437
3452
 
3438
- function ye(t) {
3453
+ function ve(t) {
3439
3454
  return t && (t.markerFile || t.markerType) && void 0 !== t.textName;
3440
3455
  }
3441
3456
 
3442
- function ge(t, e) {
3457
+ function be(t, e) {
3443
3458
  return Object.prototype.hasOwnProperty.call(t, e);
3444
3459
  }
3445
3460
 
3446
- function ve(t) {
3461
+ function xe(t) {
3447
3462
  const e = [ t[0] ];
3448
3463
  let n = t[0];
3449
3464
  for (let i = 1; i < t.length; i++) t[i] !== n && (e.push(t[i]), n = t[i]);
3450
3465
  return e;
3451
3466
  }
3452
3467
 
3453
- const be = "_fn_type_", xe = {
3468
+ const we = "_fn_type_", Ae = {
3454
3469
  textFill: 1,
3455
3470
  textSize: 1,
3456
3471
  textOpacity: 1,
@@ -3466,39 +3481,39 @@ const be = "_fn_type_", xe = {
3466
3481
  polygonOpacity: 1
3467
3482
  };
3468
3483
 
3469
- function we(t, e, n) {
3484
+ function ke(t, e, n) {
3470
3485
  for (let i = 0; i < n.length; i++) {
3471
3486
  const {symbolName: r} = n[i];
3472
- (t.Cn = t.Cn || {})[r] = e[r], Ae(t, e, n[i]);
3487
+ (t.Cn = t.Cn || {})[r] = e[r], _e(t, e, n[i]);
3473
3488
  }
3474
3489
  }
3475
3490
 
3476
- function Ae(t, e, n) {
3491
+ function _e(t, e, n) {
3477
3492
  const i = t.properties;
3478
3493
  let r = i.aPickingId;
3479
3494
  r || (r = i.aPickingId = new t.data.aPickingId.constructor(t.data.aPickingId));
3480
- const {attrName: o, symbolName: s, evaluate: a, related: l} = n, c = (be + o + "Index").trim();
3495
+ const {attrName: o, symbolName: s, evaluate: a, related: l} = n, c = (we + o + "Index").trim();
3481
3496
  let h = t.data[o];
3482
3497
  if (!h) {
3483
- if (Ce(e[s])) {
3484
- h = t.data[o] = new n.type(n.width * r.length), ke(t, e, n);
3485
- return Ie(o, t, t.properties[c], a), h;
3498
+ if (ze(e[s])) {
3499
+ h = t.data[o] = new n.type(n.width * r.length), Se(t, e, n);
3500
+ return Ce(o, t, t.properties[c], a), h;
3486
3501
  }
3487
3502
  return null;
3488
3503
  }
3489
- return Ce(e[s]) || function(t, e) {
3504
+ return ze(e[s]) || function(t, e) {
3490
3505
  if (!Array.isArray(t)) return !1;
3491
- for (let n = 0; n < t.length; n++) if (Ce(e[t[n]])) return !0;
3506
+ for (let n = 0; n < t.length; n++) if (ze(e[t[n]])) return !0;
3492
3507
  return !1;
3493
- }(l, e) ? (Ce(e[s]) && ke(t, e, n), h) : (h && h.buffer && h.buffer.destroy && h.buffer.destroy(),
3494
- delete t.data[o], _e(t, o), null);
3508
+ }(l, e) ? (ze(e[s]) && Se(t, e, n), h) : (h && h.buffer && h.buffer.destroy && h.buffer.destroy(),
3509
+ delete t.data[o], Te(t, o), null);
3495
3510
  }
3496
3511
 
3497
- function ke(t, e, n) {
3498
- const {attrName: i, symbolName: r} = n, o = t.properties, s = (be + i + "Index").trim(), a = (be + i).trim();
3512
+ function Se(t, e, n) {
3513
+ const {attrName: i, symbolName: r} = n, o = t.properties, s = (we + i + "Index").trim(), a = (we + i).trim();
3499
3514
  if (o[s] && o[a]) return;
3500
3515
  const l = function(t) {
3501
- if (!t) return Pe;
3516
+ if (!t) return Oe;
3502
3517
  const e = [];
3503
3518
  for (let n = 0; n < t.length; n++) p(t[n][1]) && !m(t[n][1]).isZoomConstant && e.push(t[n][0]);
3504
3519
  return e;
@@ -3507,7 +3522,7 @@ function ke(t, e, n) {
3507
3522
  Array.isArray(i) || (i = Object.values(i));
3508
3523
  if (!i || !i.length) return !1;
3509
3524
  const {symbolName: r} = t;
3510
- if (!xe[r]) return !1;
3525
+ if (!Ae[r]) return !1;
3511
3526
  const o = e.property;
3512
3527
  for (let t = 0; t < i.length; t++) {
3513
3528
  const e = i[t] && i[t].feature;
@@ -3517,45 +3532,45 @@ function ke(t, e, n) {
3517
3532
  }
3518
3533
  return !1;
3519
3534
  }(n, e[r], t);
3520
- if (!c && !l.length) return void _e(t, i);
3535
+ if (!c && !l.length) return void Te(t, i);
3521
3536
  const {features: h, aPickingId: u} = o, d = function(t, e, n, i, r) {
3522
3537
  const o = [];
3523
3538
  let s = 0, a = e[0];
3524
- for (let l = 1, c = e.length; l < c; l++) e[l] === a && l !== c - 1 || ((r || Me(t[a].feature, n, i)) && o.push(s, l === c - 1 ? c : l),
3539
+ for (let l = 1, c = e.length; l < c; l++) e[l] === a && l !== c - 1 || ((r || Ie(t[a].feature, n, i)) && o.push(s, l === c - 1 ? c : l),
3525
3540
  a = e[l], s = l);
3526
3541
  return o;
3527
3542
  }(h, u, e[r].property, l, c);
3528
- if (!d.length) return void _e(t, i);
3543
+ if (!d.length) return void Te(t, i);
3529
3544
  const f = t.data[i];
3530
3545
  o[s] = d, o[a] = f.BYTES_PER_ELEMENT ? new f.constructor(f) : new n.type(f.length);
3531
3546
  }
3532
3547
 
3533
- function _e(t, e) {
3534
- const n = t.properties, i = (be + e + "Index").trim(), r = (be + e).trim();
3548
+ function Te(t, e) {
3549
+ const n = t.properties, i = (we + e + "Index").trim(), r = (we + e).trim();
3535
3550
  delete n[i], delete n[r];
3536
3551
  }
3537
3552
 
3538
- function Se(t, e, n, i, r) {
3553
+ function Me(t, e, n, i, r) {
3539
3554
  if (!i) return;
3540
3555
  const o = i.geometry;
3541
3556
  if (o) {
3542
3557
  for (let s = 0; s < n.length; s++) {
3543
- const a = n[s], l = a.attrName, c = (be + l + "Index").trim();
3544
- if (!Te(o, e, a)) {
3558
+ const a = n[s], l = a.attrName, c = (we + l + "Index").trim();
3559
+ if (!Pe(o, e, a)) {
3545
3560
  const {aPickingId: t} = o.properties;
3546
3561
  if (!t || o.Fn === r) continue;
3547
3562
  const e = o.properties[c];
3548
3563
  if (!e) continue;
3549
- Ie(l, o, e, a.evaluate);
3564
+ Ce(l, o, e, a.evaluate);
3550
3565
  continue;
3551
3566
  }
3552
3567
  if (o.data[l]) {
3553
3568
  const t = o.data[l];
3554
3569
  t && t.buffer && t.buffer.destroy && t.buffer.destroy(), delete o.data[l];
3555
3570
  }
3556
- const h = Ae(o, e, a), u = a.define;
3571
+ const h = _e(o, e, a), u = a.define;
3557
3572
  if (h) {
3558
- if (Ie(l, o, o.properties[c], a.evaluate), u) {
3573
+ if (Ce(l, o, o.properties[c], a.evaluate), u) {
3559
3574
  const t = i.defines;
3560
3575
  t[u] = 1, i.setDefines(t);
3561
3576
  }
@@ -3569,29 +3584,29 @@ function Se(t, e, n, i, r) {
3569
3584
  }
3570
3585
  }
3571
3586
 
3572
- function Te(t, e, n) {
3587
+ function Pe(t, e, n) {
3573
3588
  const i = e[n.symbolName], r = t.Cn;
3574
3589
  return i !== r[n.symbolName] && (r[n.symbolName] = i, !0);
3575
3590
  }
3576
3591
 
3577
- function Me(t, e, n) {
3592
+ function Ie(t, e, n) {
3578
3593
  for (let i = 0; i < n.length; i++) if ("$" === e[0] && t[e.substring(1)] === n[i] || t.properties[e] === n[i]) return !0;
3579
3594
  return !1;
3580
3595
  }
3581
3596
 
3582
- const Pe = [];
3597
+ const Oe = [];
3583
3598
 
3584
- function Ie(t, e, n, i) {
3599
+ function Ce(t, e, n, i) {
3585
3600
  const {aPickingId: r, features: o} = e.properties;
3586
3601
  let s;
3587
3602
  if (n) {
3588
- const a = (be + t).trim();
3603
+ const a = (we + t).trim();
3589
3604
  s = e.properties[a];
3590
3605
  const l = s.length / r.length, c = n.length;
3591
3606
  for (let t = 0; t < c; t += 2) {
3592
3607
  const a = n[t], c = n[t + 1];
3593
3608
  let h = o[r[a]];
3594
- h && h.feature && Oe(s, h, i, a, c, l, e);
3609
+ h && h.feature && Fe(s, h, i, a, c, l, e);
3595
3610
  }
3596
3611
  } else {
3597
3612
  s = e.data[t], s.dirty = !0;
@@ -3600,13 +3615,13 @@ function Ie(t, e, n, i) {
3600
3615
  for (let t = 0; t < a; t++) {
3601
3616
  if (r[t] === r[l] && t < a - 1) continue;
3602
3617
  let c = o[r[l]];
3603
- c && c.feature && (Oe(s, c, i, l, t === a - 1 ? a : t, n, e), l = t);
3618
+ c && c.feature && (Fe(s, c, i, l, t === a - 1 ? a : t, n, e), l = t);
3604
3619
  }
3605
3620
  }
3606
3621
  s.dirty && (e.updateData(t, s), s.dirty = !1);
3607
3622
  }
3608
3623
 
3609
- function Oe(t, e, n, i, r, o, s) {
3624
+ function Fe(t, e, n, i, r, o, s) {
3610
3625
  const a = (e = e.feature).properties || {};
3611
3626
  void 0 === a.$layer && (e.properties || (e.properties = a), a.$layer = e.layer,
3612
3627
  a.$type = e.type);
@@ -3621,26 +3636,26 @@ function Oe(t, e, n, i, r, o, s) {
3621
3636
  for (let e = i * o; e < r * o; e += o) t.set(l, e);
3622
3637
  t.dirty = !0;
3623
3638
  }
3624
- } else t[i] !== l && (pe(t, l, i, r), t.dirty = !0);
3639
+ } else t[i] !== l && (ye(t, l, i, r), t.dirty = !0);
3625
3640
  }
3626
3641
 
3627
- function Ce(t) {
3642
+ function ze(t) {
3628
3643
  return T.isFnTypeSymbol(t);
3629
3644
  }
3630
3645
 
3631
- const {loginIBLResOnCanvas: Fe, logoutIBLResOnCanvas: ze, getIBLResOnCanvas: Ee} = n.pbr.PBRUtils, je = [], De = [], Re = t => 0 === t.getUniform("level"), Ne = t => t.getUniform("level") > 0;
3646
+ const {loginIBLResOnCanvas: Ee, logoutIBLResOnCanvas: je, getIBLResOnCanvas: De} = n.pbr.PBRUtils, Re = [], Ne = [], Le = t => 0 === t.getUniform("level"), He = t => t.getUniform("level") > 0;
3632
3647
 
3633
- class Le {
3648
+ class Ve {
3634
3649
  constructor(t, e, i, r, o, s) {
3635
3650
  this.regl = t, this.layer = e, this.canvas = e.getRenderer().canvas, this.sceneConfig = r || {},
3636
3651
  this.dataConfig = s || {}, this.pluginIndex = o, this.scene = new n.Scene, this.pickingFBO = e.getRenderer().pickingFBO,
3637
- this.zn = new ie, this.level0Filter = Re, this.levelNFilter = Ne, this.loginTextureCache(),
3638
- this.symbolDef = Array.isArray(i) ? i.map(t => le(t)) : [ le(i) ], this.En(), this.pickingViewport = {
3652
+ this.zn = new oe, this.level0Filter = Le, this.levelNFilter = He, this.loginTextureCache(),
3653
+ this.symbolDef = Array.isArray(i) ? i.map(t => he(t)) : [ he(i) ], this.En(), this.pickingViewport = {
3639
3654
  x: 0,
3640
3655
  y: 0,
3641
3656
  width: () => this.canvas ? this.canvas.width : 1,
3642
3657
  height: () => this.canvas ? this.canvas.height : 1
3643
- }, this.sortByCommandKey = He.bind(this), this.colorCache = {};
3658
+ }, this.sortByCommandKey = Ue.bind(this), this.colorCache = {};
3644
3659
  }
3645
3660
  getMap() {
3646
3661
  return this.layer ? this.layer.getMap() : null;
@@ -3674,19 +3689,19 @@ class Le {
3674
3689
  return this.Dn;
3675
3690
  }
3676
3691
  needToRetireFrames() {
3677
- return this.X;
3692
+ return this.$;
3678
3693
  }
3679
3694
  fillIncludes(t, e, n) {
3680
3695
  const i = n && n.includes;
3681
3696
  if (i) for (const r in i) i[r] && (n[r].uniformDeclares && e.push(...n[r].uniformDeclares),
3682
- n[r].defines && re(t, n[r].defines));
3697
+ n[r].defines && se(t, n[r].defines));
3683
3698
  }
3684
3699
  setIncludeUniformValues(t, e) {
3685
3700
  const n = e && e.includes;
3686
- if (n) for (const i in n) n[i] && e[i].renderUniforms && re(t, e[i].renderUniforms);
3701
+ if (n) for (const i in n) n[i] && e[i].renderUniforms && se(t, e[i].renderUniforms);
3687
3702
  }
3688
3703
  createGeometries(t, e) {
3689
- if (!t.length) return De;
3704
+ if (!t.length) return Ne;
3690
3705
  const n = [];
3691
3706
  for (let i = 0; i < t.length; i++) if (t[i]) if (void 0 !== t[i].ref) n[t[i].ref] ? n.push({
3692
3707
  geometry: n[t[i].ref].geometry,
@@ -3747,8 +3762,8 @@ class Le {
3747
3762
  this.paint(t);
3748
3763
  }
3749
3764
  prepareRender(t) {
3750
- if (this.it === t.timestamp) return;
3751
- if (this.it = t.timestamp, !this.createFnTypeConfig) return;
3765
+ if (this.rt === t.timestamp) return;
3766
+ if (this.rt = t.timestamp, !this.createFnTypeConfig) return;
3752
3767
  const e = this.scene.getMeshes();
3753
3768
  if (!e || !e.length) return;
3754
3769
  const n = this.getMap().getZoom();
@@ -3757,7 +3772,7 @@ class Le {
3757
3772
  const {symbolIndex: i} = e[t].properties, r = this.getSymbolDef(i);
3758
3773
  if (!r) continue;
3759
3774
  const o = this.getFnTypeConfig(i);
3760
- Se(this.regl, r, o, e[t], n);
3775
+ Me(this.regl, r, o, e[t], n);
3761
3776
  }
3762
3777
  }
3763
3778
  paint(t) {
@@ -3772,7 +3787,7 @@ class Le {
3772
3787
  };
3773
3788
  }
3774
3789
  setToRedraw(t) {
3775
- t && (this.X = t), this.Dn = !0;
3790
+ t && (this.$ = t), this.Dn = !0;
3776
3791
  }
3777
3792
  callShader(t, e) {
3778
3793
  this.callCurrentTileShader(t, e), this.callBackgroundTileShader(t, e);
@@ -3783,7 +3798,7 @@ class Le {
3783
3798
  }
3784
3799
  callBackgroundTileShader(t, e) {
3785
3800
  this.shader && (this.shader.filter = e.sceneFilter ? [ this.levelNFilter, e.sceneFilter ] : this.levelNFilter),
3786
- this.scene.getMeshes().sort(Ve), this.callRenderer(t, e);
3801
+ this.scene.getMeshes().sort(qe), this.callRenderer(t, e);
3787
3802
  }
3788
3803
  callRenderer(t, e) {
3789
3804
  this.renderer.render(this.shader, t, this.scene, this.getRenderFBO(e));
@@ -3852,8 +3867,8 @@ class Le {
3852
3867
  }
3853
3868
  }
3854
3869
  startFrame(t) {
3855
- this.Ln || (this.init(t), this.Ln = !0), this.it !== t.timestamp && (this.Dn = !1,
3856
- this.X = !1), this.scene.clear();
3870
+ this.Ln || (this.init(t), this.Ln = !0), this.rt !== t.timestamp && (this.Dn = !1,
3871
+ this.$ = !1), this.scene.clear();
3857
3872
  }
3858
3873
  resize() {}
3859
3874
  delete() {
@@ -3878,13 +3893,13 @@ class Le {
3878
3893
  return delete this.Un, this.setToRedraw(n), i;
3879
3894
  }
3880
3895
  qn(t, e) {
3881
- for (const n in e) if (ge(e, n) && M[n] && !O(e[n], t[n])) return !0;
3896
+ for (const n in e) if (be(e, n) && M[n] && !O(e[n], t[n])) return !0;
3882
3897
  return !1;
3883
3898
  }
3884
3899
  Vn(t, e, n) {
3885
3900
  if (!this.Gn) return !1;
3886
3901
  const i = this.qn(this.symbolDef[t] || {}, n);
3887
- this.symbolDef[t] = le(n);
3902
+ this.symbolDef[t] = he(n);
3888
3903
  const r = this.Gn[t];
3889
3904
  for (const t in r) delete r[t];
3890
3905
  const o = this.getMap(), s = f(this.symbolDef[t], () => [ o.getZoom() ]);
@@ -3912,7 +3927,7 @@ class Le {
3912
3927
  En() {
3913
3928
  const t = this.getMap(), e = () => [ t.getZoom() ];
3914
3929
  this.Gn = [], this.jn = [];
3915
- for (let t = 0; t < this.symbolDef.length; t++) this.Gn[t] = f(re({}, this.symbolDef[t]), e),
3930
+ for (let t = 0; t < this.symbolDef.length; t++) this.Gn[t] = f(se({}, this.symbolDef[t]), e),
3916
3931
  this.symbolDef[t] && p(this.symbolDef[t].visible) && (this.jn[t] = m(this.symbolDef[t].visible));
3917
3932
  }
3918
3933
  getFnTypeConfig(t) {
@@ -3935,7 +3950,7 @@ class Le {
3935
3950
  }
3936
3951
  logoutTextureCache() {
3937
3952
  const t = "__gl_textures".trim(), e = this.getMap(), n = this.Bn;
3938
- if (n) for (const i in n) ge(n, i) && e[t][i] && (e[t][i].count--, e[t][i].count <= 0 && delete e[t][i]);
3953
+ if (n) for (const i in n) be(n, i) && e[t][i] && (e[t][i].count--, e[t][i].count <= 0 && delete e[t][i]);
3939
3954
  e[t].count--, e[t].count <= 0 && (e[t] = {});
3940
3955
  }
3941
3956
  getCachedTexture(t) {
@@ -3980,7 +3995,7 @@ class Le {
3980
3995
  for (let e = 0; e < n.length; e++) {
3981
3996
  const s = n[e].mesh;
3982
3997
  let a = o[s.properties.tile.id];
3983
- void 0 === a && (r.multiply(je, i, n[e].transform), a = this.zn.write(t, je), o[s.properties.tile.id] = a),
3998
+ void 0 === a && (r.multiply(Re, i, n[e].transform), a = this.zn.write(t, Re), o[s.properties.tile.id] = a),
3984
3999
  s.setUniform("ref", a);
3985
4000
  }
3986
4001
  this.zn.end(t), this.regl.Jn();
@@ -3990,7 +4005,7 @@ class Le {
3990
4005
  }
3991
4006
  outline(t, e) {
3992
4007
  const n = {};
3993
- for (let i = 0; i < e.length; i++) ae(e[i]) || n[e[i]] || (this.Yn(t, e[i]), n[e[i]] = 1);
4008
+ for (let i = 0; i < e.length; i++) ce(e[i]) || n[e[i]] || (this.Yn(t, e[i]), n[e[i]] = 1);
3994
4009
  }
3995
4010
  Yn(t, e) {
3996
4011
  if (!this.picking) return;
@@ -4079,15 +4094,15 @@ class Le {
4079
4094
  }
4080
4095
  getIBLRes() {
4081
4096
  const t = this.layer.getRenderer().canvas;
4082
- return Ee(t);
4097
+ return De(t);
4083
4098
  }
4084
4099
  createIBLTextures() {
4085
4100
  const t = this.layer.getRenderer().canvas;
4086
- Fe(t, this.regl, this.getMap()), this.setToRedraw(!0), this.layer.fire("iblupdated");
4101
+ Ee(t, this.regl, this.getMap()), this.setToRedraw(!0), this.layer.fire("iblupdated");
4087
4102
  }
4088
4103
  disposeIBLTextures() {
4089
4104
  const t = this.layer.getRenderer().canvas;
4090
- ze(t, this.getMap());
4105
+ je(t, this.getMap());
4091
4106
  }
4092
4107
  evaluateInFnTypeConfig(t, e, n, i, r) {
4093
4108
  let o = this.ti;
@@ -4105,16 +4120,16 @@ class Le {
4105
4120
  }
4106
4121
  }
4107
4122
 
4108
- function He(t, e) {
4123
+ function Ue(t, e) {
4109
4124
  const n = t && t.getCommandKey(this.regl) || "", i = e && e.getCommandKey(this.regl) || "";
4110
4125
  return n.localeCompare(i);
4111
4126
  }
4112
4127
 
4113
- function Ve(t, e) {
4128
+ function qe(t, e) {
4114
4129
  return t.properties.level - e.properties.level;
4115
4130
  }
4116
4131
 
4117
- class Ue extends Le {
4132
+ class Ge extends Ve {
4118
4133
  createGeometry(t, e) {
4119
4134
  if (!t.data) return {
4120
4135
  geometry: null,
@@ -4122,7 +4137,7 @@ class Ue extends Le {
4122
4137
  };
4123
4138
  t.iconAtlas && t.iconAtlas.image && (t.iconAtlas.image.dataType = t.type, t.iconAtlas.image.type = "icon"),
4124
4139
  t.glyphAtlas && t.glyphAtlas.image && (t.glyphAtlas.image.type = "glyph");
4125
- const i = re({}, t.data), r = new n.Geometry(i, t.indices, 0, {
4140
+ const i = se({}, t.data), r = new n.Geometry(i, t.indices, 0, {
4126
4141
  primitive: this.getPrimitive(),
4127
4142
  positionSize: t.positionSize
4128
4143
  });
@@ -4131,7 +4146,7 @@ class Ue extends Le {
4131
4146
  elements: t.indices
4132
4147
  }, t.iconAtlas && (r.properties.iconAtlas = t.iconAtlas.image), t.glyphAtlas && (r.properties.glyphAtlas = t.glyphAtlas.image),
4133
4148
  r.properties.aFeaIds = t.featureIds, r.properties.collideIds = t.featureIds && t.featureIds.length ? t.featureIds : t.data.aPickingId,
4134
- r.properties.uniqueCollideIds = ve(r.properties.collideIds), re(r.properties, t.properties),
4149
+ r.properties.uniqueCollideIds = xe(r.properties.collideIds), se(r.properties, t.properties),
4135
4150
  {
4136
4151
  geometry: r,
4137
4152
  symbolIndex: t.symbolIndex
@@ -4176,9 +4191,9 @@ class Ue extends Le {
4176
4191
  }
4177
4192
  }
4178
4193
 
4179
- var qe = "attribute vec3 aPosition;\nuniform mat4 projViewModelMatrix;\n#include <fbo_picking_vert>\nvoid main() {\n gl_Position = projViewModelMatrix * vec4(aPosition, 1.);\n fbo_picking_setData(gl_Position.w, true);\n}";
4194
+ var We = "attribute vec3 aPosition;\nuniform mat4 projViewModelMatrix;\n#include <fbo_picking_vert>\nvoid main() {\n gl_Position = projViewModelMatrix * vec4(aPosition, 1.);\n fbo_picking_setData(gl_Position.w, true);\n}";
4180
4195
 
4181
- function Ge(t, e, n) {
4196
+ function Be(t, e, n) {
4182
4197
  const i = e, r = {
4183
4198
  width: i.width,
4184
4199
  height: i.height,
@@ -4195,14 +4210,14 @@ function Ge(t, e, n) {
4195
4210
  return t.texture(r);
4196
4211
  }
4197
4212
 
4198
- const We = {
4213
+ const Xe = {
4199
4214
  polygonFill: [ 1, 1, 1, 1 ],
4200
4215
  polygonOpacity: 1,
4201
4216
  uvScale: [ 1, 1 ],
4202
4217
  uvOffset: [ 0, 0 ]
4203
4218
  };
4204
4219
 
4205
- class Be extends Ue {
4220
+ class $e extends Ge {
4206
4221
  prepareSymbol(t) {
4207
4222
  const e = t.polygonFill;
4208
4223
  Array.isArray(e) && (3 === e.length && e.push(1), t.polygonFill = e.map(t => 255 * t));
@@ -4221,11 +4236,11 @@ class Be extends Ue {
4221
4236
  tileExtent: o.properties.tileExtent,
4222
4237
  tileRatio: o.properties.tileRatio
4223
4238
  }, h = this.getSymbol(s);
4224
- if (ce(c, "polygonFill", h, "polygonFill", We.polygonFill, de(this.colorCache)),
4225
- ce(c, "polygonOpacity", h, "polygonOpacity", We.polygonOpacity), ce(c, "uvScale", h, "uvScale", We.uvScale),
4226
- ce(c, "uvOffset", h, "uvOffset", We.uvOffset), void 0 === a) {
4239
+ if (ue(c, "polygonFill", h, "polygonFill", Xe.polygonFill, pe(this.colorCache)),
4240
+ ue(c, "polygonOpacity", h, "polygonOpacity", Xe.polygonOpacity), ue(c, "uvScale", h, "uvScale", Xe.uvScale),
4241
+ ue(c, "uvOffset", h, "uvOffset", Xe.uvOffset), void 0 === a) {
4227
4242
  const t = this.getSymbolDef(s), e = this.getFnTypeConfig(s);
4228
- we(o, t, e), o.generateBuffers(this.regl);
4243
+ ke(o, t, e), o.generateBuffers(this.regl);
4229
4244
  }
4230
4245
  const u = o.properties.iconAtlas;
4231
4246
  if (u && o.data.aTexInfo) {
@@ -4235,10 +4250,10 @@ class Be extends Ue {
4235
4250
  get: function() {
4236
4251
  return o.properties.tileResolution / t.getResolution();
4237
4252
  }
4238
- }), c.polygonPatternFile = Ge(this.regl, u, !1), c.atlasSize = [ u.width, u.height ],
4253
+ }), c.polygonPatternFile = Be(this.regl, u, !1), c.atlasSize = [ u.width, u.height ],
4239
4254
  this.drawDebugAtlas(u);
4240
4255
  }
4241
- const d = new n.Material(c, We), f = new n.Mesh(o, d, {
4256
+ const d = new n.Material(c, Xe), f = new n.Mesh(o, d, {
4242
4257
  disableVAO: !0,
4243
4258
  castShadow: !1,
4244
4259
  picking: !0
@@ -4259,7 +4274,7 @@ class Be extends Ue {
4259
4274
  evaluate: (e, i) => {
4260
4275
  let r = n(t.getZoom(), e);
4261
4276
  return p(r) && (r = this.evaluateInFnTypeConfig(r, i, t, e, !0)), Array.isArray(r) || (r = this.colorCache[r] = this.colorCache[r] || C(r).unitArray()),
4262
- r = ue(r), r;
4277
+ r = fe(r), r;
4263
4278
  }
4264
4279
  }, {
4265
4280
  attrName: "aOpacity",
@@ -4318,10 +4333,10 @@ class Be extends Ue {
4318
4333
  enable: !0,
4319
4334
  range: s || [ 0, 1 ],
4320
4335
  mask: (t, e) => {
4321
- if (!ae(this.sceneConfig.depthMask)) return !!this.sceneConfig.depthMask;
4336
+ if (!ce(this.sceneConfig.depthMask)) return !!this.sceneConfig.depthMask;
4322
4337
  if (e.meshConfig.transparent) return !1;
4323
4338
  const n = e.polygonOpacity;
4324
- return !(me(n) && n < 1);
4339
+ return !(ge(n) && n < 1);
4325
4340
  },
4326
4341
  func: this.sceneConfig.depthFunc || "<="
4327
4342
  },
@@ -4336,7 +4351,7 @@ class Be extends Ue {
4336
4351
  }
4337
4352
  };
4338
4353
  this.ei(t, a), this.pickingFBO && (this.picking = [ new n.FBORayPicking(this.renderer, {
4339
- vert: qe,
4354
+ vert: We,
4340
4355
  uniforms: [ {
4341
4356
  name: "projViewModelMatrix",
4342
4357
  type: "function",
@@ -4375,9 +4390,9 @@ class Be extends Ue {
4375
4390
  }
4376
4391
  }
4377
4392
 
4378
- var Xe = "#define SHADER_NAME LINE\n#define AA_CLIP_LIMIT 2.0\n#define AA_LINE_WIDTH 16.0\n#define DEVICE_PIXEL_RATIO 1.0\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n#define EXTRUDE_SCALE 63.0\n#define EXTRUDE_MOD 64.0\n#define MAX_LINE_DISTANCE 65535.0\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\n#if defined(HAS_PATTERN) || defined(HAS_DASHARRAY)\nattribute vec3 aExtrude;\n#else\nattribute vec2 aExtrude;\n#endif\n#if defined(HAS_PATTERN) || defined(HAS_DASHARRAY) || defined(HAS_GRADIENT) || defined(HAS_TRAIL)\nattribute float aLinesofar;\nvarying highp float vLinesofar;\n#endif\nuniform float cameraToCenterDistance;\n#if defined(HAS_STROKE_WIDTH)\nattribute float aLineStrokeWidth;\n#else\nuniform float lineStrokeWidth;\n#endif\nuniform mat4 projViewModelMatrix;\nuniform mat4 modelMatrix;\nuniform float tileResolution;\nuniform float resolution;\nuniform float tileRatio;\n#if defined(HAS_LINE_DX) || defined(HAS_LINE_DY)\nattribute vec2 aLineDxDy;\n#endif\n#ifndef HAS_LINE_DX\nuniform float lineDx;\n#endif\n#ifndef HAS_LINE_DY\nuniform float lineDy;\n#endif\nuniform vec2 canvasSize;\nuniform float layerScale;\nvarying vec2 vNormal;\nvarying vec2 vWidth;\nvarying float vGammaScale;\n#ifndef ENABLE_TILE_STENCIL\nvarying vec2 vPosition;\n#endif\n#ifdef USE_LINE_OFFSET\nattribute vec2 aExtrudeOffset;\n#endif\n#ifdef HAS_LINE_WIDTH\nattribute float aLineWidth;\n#else\nuniform float lineWidth;\n#endif\n#ifndef PICKING_MODE\n#ifndef HAS_GRADIENT\n#ifdef HAS_COLOR\nattribute vec4 aColor;\nvarying vec4 vColor;\n#endif\n#ifdef HAS_PATTERN\n#if defined(HAS_PATTERN_ANIM) || defined(HAS_PATTERN_GAP)\nattribute vec2 aLinePattern;\n#endif\n#ifdef HAS_PATTERN_ANIM\nvarying float vLinePatternAnimSpeed;\n#endif\n#ifdef HAS_PATTERN_GAP\nvarying float vLinePatternGap;\n#endif\nattribute vec4 aTexInfo;\nvarying vec4 vTexInfo;\n#endif\n#ifdef HAS_DASHARRAY\n#ifdef HAS_DASHARRAY_ATTR\nattribute vec4 aDasharray;\nvarying vec4 vDasharray;\n#endif\n#ifdef HAS_DASHARRAY_COLOR\nattribute vec4 aDashColor;\nvarying vec4 vDashColor;\n#endif\n#endif\n#endif\n#ifdef HAS_STROKE_COLOR\nattribute vec4 aStrokeColor;\nvarying vec4 vStrokeColor;\n#endif\n#ifdef HAS_OPACITY\nattribute float aOpacity;\nvarying float vOpacity;\n#endif\n#ifdef HAS_GRADIENT\nattribute float aGradIndex;\nvarying float vGradIndex;\n#endif\n#if defined(HAS_SHADOWING) && !defined(HAS_BLOOM)\n#include <vsm_shadow_vert>\n#endif\n#else\n#include <fbo_picking_vert>\n#endif\nvarying vec3 vVertex;\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n float d = mod(abs(aExtrude.x), 2.);\n float e = mod(abs(aExtrude.y), 2.);\n vNormal = vec2(d, e * 2. - 1.);\n vec4 f = vec4(c, 1.);\n vec4 h = projViewModelMatrix * f;\n vVertex = (modelMatrix * f).xyz;\n#ifdef HAS_STROKE_WIDTH\nfloat i = aLineStrokeWidth / 2. * layerScale;\n#else\nfloat i = lineStrokeWidth;\n#endif\n#ifdef HAS_LINE_WIDTH\nfloat j = aLineWidth / 2. * layerScale;\n#else\nfloat j = lineWidth * layerScale;\n#endif\nfloat k = j / 2. + i;\n float l = sign(i) * j / 2.;\n float m = l + sign(l) * ANTIALIASING;\n float n = k + sign(k) * ANTIALIASING;\n#ifdef USE_LINE_OFFSET\nvec2 o = lineOffset * (vNormal.y * (aExtrude.xy - aExtrudeOffset) + aExtrudeOffset);\n vec2 u = (n * aExtrude.xy + o) / EXTRUDE_SCALE;\n#else\nvec2 v = aExtrude.xy / EXTRUDE_SCALE;\n vec2 u = n * v;\n#endif\nfloat A = tileResolution / resolution;\n vec4 B = vec4(c + vec3(u, .0) * tileRatio / A, 1.);\n gl_Position = projViewModelMatrix * B;\n float C = min(AA_CLIP_LIMIT / canvasSize.x, AA_CLIP_LIMIT / canvasSize.y);\n float D = distance(gl_Position.xy / gl_Position.w, h.xy / h.w) - C;\n if(D * j < .0) {\n float E = -D / C;\n float F = E * E * E * E * AA_LINE_WIDTH;\n u += F * v;\n n += F / 6.;\n B = vec4(c + vec3(u, .0) * tileRatio / A, 1.);\n gl_Position = projViewModelMatrix * B;\n }\n#ifdef HAS_LINE_DX\nfloat G = aLineDxDy[0];\n#else\nfloat G = lineDx;\n#endif\n#ifdef HAS_LINE_DY\nfloat H = aLineDxDy[1];\n#else\nfloat H = lineDy;\n#endif\nfloat I = gl_Position.w;\n gl_Position.xy += vec2(G, H) * 2. / canvasSize * I;\n#ifndef PICKING_MODE\nvWidth = vec2(n, m);\n vGammaScale = I / cameraToCenterDistance;\n#ifndef ENABLE_TILE_STENCIL\nvPosition = c.xy;\n#ifdef USE_LINE_OFFSET\nvPosition += tileRatio * o / EXTRUDE_SCALE;\n#endif\n#endif\n#if defined(HAS_PATTERN) || defined(HAS_DASHARRAY) || defined(HAS_GRADIENT)\n#ifdef HAS_GRADIENT\nvLinesofar = aLinesofar / MAX_LINE_DISTANCE;\n vGradIndex = aGradIndex;\n#else\nfloat J = aLinesofar - k * aExtrude.z / EXTRUDE_SCALE / A * tileRatio;\n vLinesofar = J / tileRatio * A;\n#endif\n#endif\n#ifndef HAS_GRADIENT\n#ifdef HAS_COLOR\nvColor = aColor;\n#endif\n#ifdef HAS_DASHARRAY\n#ifdef HAS_DASHARRAY_ATTR\nvDasharray = aDasharray;\n#endif\n#ifdef HAS_DASHARRAY_COLOR\nvDashColor = aDashColor / 255.;\n#endif\n#endif\n#ifdef HAS_PATTERN\nvTexInfo = vec4(aTexInfo.xy, aTexInfo.zw + 1.);\n#ifdef HAS_PATTERN_ANIM\nvLinePatternAnimSpeed = aLinePattern[0] / 127.;\n#endif\n#ifdef HAS_PATTERN_GAP\nvLinePatternGap = aLinePattern[1] / 10.0;\n#endif\n#endif\n#endif\n#ifdef HAS_STROKE_COLOR\nvStrokeColor = aStrokeColor;\n#endif\n#ifdef HAS_OPACITY\nvOpacity = aOpacity / 255.;\n#endif\n#if defined(HAS_SHADOWING) && !defined(HAS_BLOOM)\nshadow_computeShadowPars(B);\n#endif\n#else\nfbo_picking_setData(I, true);\n#endif\n}";
4393
+ var Je = "#define SHADER_NAME LINE\n#define AA_CLIP_LIMIT 2.0\n#define AA_LINE_WIDTH 16.0\n#define DEVICE_PIXEL_RATIO 1.0\n#define ANTIALIASING 1.0 / DEVICE_PIXEL_RATIO / 2.0\n#define EXTRUDE_SCALE 63.0\n#define EXTRUDE_MOD 64.0\n#define MAX_LINE_DISTANCE 65535.0\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\n#if defined(HAS_PATTERN) || defined(HAS_DASHARRAY)\nattribute vec3 aExtrude;\n#else\nattribute vec2 aExtrude;\n#endif\n#if defined(HAS_PATTERN) || defined(HAS_DASHARRAY) || defined(HAS_GRADIENT) || defined(HAS_TRAIL)\nattribute float aLinesofar;\nvarying highp float vLinesofar;\n#endif\nuniform float cameraToCenterDistance;\n#if defined(HAS_STROKE_WIDTH)\nattribute float aLineStrokeWidth;\n#else\nuniform float lineStrokeWidth;\n#endif\nuniform mat4 projViewModelMatrix;\nuniform mat4 modelMatrix;\nuniform float tileResolution;\nuniform float resolution;\nuniform float tileRatio;\n#if defined(HAS_LINE_DX) || defined(HAS_LINE_DY)\nattribute vec2 aLineDxDy;\n#endif\n#ifndef HAS_LINE_DX\nuniform float lineDx;\n#endif\n#ifndef HAS_LINE_DY\nuniform float lineDy;\n#endif\nuniform vec2 canvasSize;\nuniform float layerScale;\nvarying vec2 vNormal;\nvarying vec2 vWidth;\nvarying float vGammaScale;\n#ifndef ENABLE_TILE_STENCIL\nvarying vec2 vPosition;\n#endif\n#ifdef USE_LINE_OFFSET\nattribute vec2 aExtrudeOffset;\n#endif\n#ifdef HAS_LINE_WIDTH\nattribute float aLineWidth;\n#else\nuniform float lineWidth;\n#endif\n#ifndef PICKING_MODE\n#ifndef HAS_GRADIENT\n#ifdef HAS_COLOR\nattribute vec4 aColor;\nvarying vec4 vColor;\n#endif\n#ifdef HAS_PATTERN\n#if defined(HAS_PATTERN_ANIM) || defined(HAS_PATTERN_GAP)\nattribute vec2 aLinePattern;\n#endif\n#ifdef HAS_PATTERN_ANIM\nvarying float vLinePatternAnimSpeed;\n#endif\n#ifdef HAS_PATTERN_GAP\nvarying float vLinePatternGap;\n#endif\nattribute vec4 aTexInfo;\nvarying vec4 vTexInfo;\n#endif\n#ifdef HAS_DASHARRAY\n#ifdef HAS_DASHARRAY_ATTR\nattribute vec4 aDasharray;\nvarying vec4 vDasharray;\n#endif\n#ifdef HAS_DASHARRAY_COLOR\nattribute vec4 aDashColor;\nvarying vec4 vDashColor;\n#endif\n#endif\n#endif\n#ifdef HAS_STROKE_COLOR\nattribute vec4 aStrokeColor;\nvarying vec4 vStrokeColor;\n#endif\n#ifdef HAS_OPACITY\nattribute float aOpacity;\nvarying float vOpacity;\n#endif\n#ifdef HAS_GRADIENT\nattribute float aGradIndex;\nvarying float vGradIndex;\n#endif\n#if defined(HAS_SHADOWING) && !defined(HAS_BLOOM)\n#include <vsm_shadow_vert>\n#endif\n#else\n#include <fbo_picking_vert>\n#endif\nvarying vec3 vVertex;\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n float d = mod(abs(aExtrude.x), 2.);\n float e = mod(abs(aExtrude.y), 2.);\n vNormal = vec2(d, e * 2. - 1.);\n vec4 f = vec4(c, 1.);\n vec4 h = projViewModelMatrix * f;\n vVertex = (modelMatrix * f).xyz;\n#ifdef HAS_STROKE_WIDTH\nfloat i = aLineStrokeWidth / 2. * layerScale;\n#else\nfloat i = lineStrokeWidth;\n#endif\n#ifdef HAS_LINE_WIDTH\nfloat j = aLineWidth / 2. * layerScale;\n#else\nfloat j = lineWidth * layerScale;\n#endif\nfloat k = j / 2. + i;\n float l = sign(i) * j / 2.;\n float m = l + sign(l) * ANTIALIASING;\n float n = k + sign(k) * ANTIALIASING;\n#ifdef USE_LINE_OFFSET\nvec2 o = lineOffset * (vNormal.y * (aExtrude.xy - aExtrudeOffset) + aExtrudeOffset);\n vec2 u = (n * aExtrude.xy + o) / EXTRUDE_SCALE;\n#else\nvec2 v = aExtrude.xy / EXTRUDE_SCALE;\n vec2 u = n * v;\n#endif\nfloat A = tileResolution / resolution;\n vec4 B = vec4(c + vec3(u, .0) * tileRatio / A, 1.);\n gl_Position = projViewModelMatrix * B;\n float C = min(AA_CLIP_LIMIT / canvasSize.x, AA_CLIP_LIMIT / canvasSize.y);\n float D = distance(gl_Position.xy / gl_Position.w, h.xy / h.w) - C;\n if(D * j < .0) {\n float E = -D / C;\n float F = E * E * E * E * AA_LINE_WIDTH;\n u += F * v;\n n += F / 6.;\n B = vec4(c + vec3(u, .0) * tileRatio / A, 1.);\n gl_Position = projViewModelMatrix * B;\n }\n#ifdef HAS_LINE_DX\nfloat G = aLineDxDy[0];\n#else\nfloat G = lineDx;\n#endif\n#ifdef HAS_LINE_DY\nfloat H = aLineDxDy[1];\n#else\nfloat H = lineDy;\n#endif\nfloat I = gl_Position.w;\n gl_Position.xy += vec2(G, H) * 2. / canvasSize * I;\n#ifndef PICKING_MODE\nvWidth = vec2(n, m);\n vGammaScale = I / cameraToCenterDistance;\n#ifndef ENABLE_TILE_STENCIL\nvPosition = c.xy;\n#ifdef USE_LINE_OFFSET\nvPosition += tileRatio * o / EXTRUDE_SCALE;\n#endif\n#endif\n#if defined(HAS_PATTERN) || defined(HAS_DASHARRAY) || defined(HAS_GRADIENT)\n#ifdef HAS_GRADIENT\nvLinesofar = aLinesofar / MAX_LINE_DISTANCE;\n vGradIndex = aGradIndex;\n#else\nfloat J = aLinesofar - k * aExtrude.z / EXTRUDE_SCALE / A * tileRatio;\n vLinesofar = J / tileRatio * A;\n#endif\n#endif\n#ifndef HAS_GRADIENT\n#ifdef HAS_COLOR\nvColor = aColor;\n#endif\n#ifdef HAS_DASHARRAY\n#ifdef HAS_DASHARRAY_ATTR\nvDasharray = aDasharray;\n#endif\n#ifdef HAS_DASHARRAY_COLOR\nvDashColor = aDashColor / 255.;\n#endif\n#endif\n#ifdef HAS_PATTERN\nvTexInfo = vec4(aTexInfo.xy, aTexInfo.zw + 1.);\n#ifdef HAS_PATTERN_ANIM\nvLinePatternAnimSpeed = aLinePattern[0] / 127.;\n#endif\n#ifdef HAS_PATTERN_GAP\nvLinePatternGap = aLinePattern[1] / 10.0;\n#endif\n#endif\n#endif\n#ifdef HAS_STROKE_COLOR\nvStrokeColor = aStrokeColor;\n#endif\n#ifdef HAS_OPACITY\nvOpacity = aOpacity / 255.;\n#endif\n#if defined(HAS_SHADOWING) && !defined(HAS_BLOOM)\nshadow_computeShadowPars(B);\n#endif\n#else\nfbo_picking_setData(I, true);\n#endif\n}";
4379
4394
 
4380
- class $e extends Ue {
4395
+ class Ye extends Ge {
4381
4396
  prepareSymbol(t) {
4382
4397
  const e = t.lineColor;
4383
4398
  Array.isArray(e) && (3 === e.length && e.push(1), t.lineColor = e.map(t => 255 * t));
@@ -4403,25 +4418,25 @@ class $e extends Ue {
4403
4418
  if (!t.geometry) return null;
4404
4419
  const {geometry: i, symbolIndex: r, ref: o} = t, s = this.getSymbolDef(r);
4405
4420
  if (void 0 === o) {
4406
- we(i, s, this.getFnTypeConfig(r));
4421
+ ke(i, s, this.getFnTypeConfig(r));
4407
4422
  }
4408
4423
  const a = this.getSymbol(r), l = {
4409
4424
  tileResolution: i.properties.tileResolution,
4410
4425
  tileRatio: i.properties.tileRatio,
4411
4426
  tileExtent: i.properties.tileExtent
4412
4427
  };
4413
- this.setLineUniforms(a, l), ce(l, "lineColor", a, "lineColor", "#fff", de(this.colorCache)),
4414
- ce(l, "lineStrokeColor", a, "lineStrokeColor", [ 0, 0, 0, 0 ], de(this.colorCache)),
4415
- ce(l, "lineDasharray", a, "lineDasharray", [ 0, 0, 0, 0 ], t => {
4428
+ this.setLineUniforms(a, l), ue(l, "lineColor", a, "lineColor", "#fff", pe(this.colorCache)),
4429
+ ue(l, "lineStrokeColor", a, "lineStrokeColor", [ 0, 0, 0, 0 ], pe(this.colorCache)),
4430
+ ue(l, "lineDasharray", a, "lineDasharray", [ 0, 0, 0, 0 ], t => {
4416
4431
  let e;
4417
4432
  if (t && t.length) {
4418
4433
  const n = t;
4419
4434
  1 === t.length ? e = [ n[0], n[0], n[0], n[0] ] : 2 === t.length ? e = [ n[0], n[1], n[0], n[1] ] : 3 === t.length ? e = [ n[0], n[1], n[2], n[2] ] : 4 === t.length && (e = t);
4420
4435
  }
4421
4436
  return e || [ 0, 0, 0, 0 ];
4422
- }), ce(l, "lineDashColor", a, "lineDashColor", [ 0, 0, 0, 0 ], de(this.colorCache));
4437
+ }), ue(l, "lineDashColor", a, "lineDashColor", [ 0, 0, 0, 0 ], pe(this.colorCache));
4423
4438
  const c = i.properties.iconAtlas, h = i.data.aPosition instanceof Int16Array;
4424
- c && (l.linePatternFile = Ge(this.regl, c, !1), l.atlasSize = c ? [ c.width, c.height ] : [ 0, 0 ],
4439
+ c && (l.linePatternFile = Be(this.regl, c, !1), l.atlasSize = c ? [ c.width, c.height ] : [ 0, 0 ],
4425
4440
  l.flipY = h ? -1 : 1, this.drawDebugAtlas(c)), void 0 === o && i.generateBuffers(this.regl);
4426
4441
  const u = new n.Material(l), d = new n.Mesh(i, u, {
4427
4442
  castShadow: !1,
@@ -4451,16 +4466,16 @@ class $e extends Ue {
4451
4466
  n.data.aDasharray && (e.HAS_DASHARRAY_ATTR = 1), n.data.aDashColor && (e.HAS_DASHARRAY_COLOR = 1)) : e.HAS_DASHARRAY && delete e.HAS_DASHARRAY;
4452
4467
  }
4453
4468
  setLineUniforms(t, e) {
4454
- ce(e, "lineWidth", t, "lineWidth", 2), ce(e, "lineOpacity", t, "lineOpacity", 1),
4455
- ce(e, "lineStrokeWidth", t, "lineStrokeWidth", 0), ce(e, "lineBlur", t, "lineBlur", .7),
4456
- ce(e, "lineOffset", t, "lineOffset", 0), ce(e, "lineDx", t, "lineDx", 0), ce(e, "lineDy", t, "lineDy", 0),
4457
- ce(e, "linePatternAnimSpeed", t, "linePatternAnimSpeed", 0), ce(e, "linePatternGap", t, "linePatternGap", 0);
4469
+ ue(e, "lineWidth", t, "lineWidth", 2), ue(e, "lineOpacity", t, "lineOpacity", 1),
4470
+ ue(e, "lineStrokeWidth", t, "lineStrokeWidth", 0), ue(e, "lineBlur", t, "lineBlur", .7),
4471
+ ue(e, "lineOffset", t, "lineOffset", 0), ue(e, "lineDx", t, "lineDx", 0), ue(e, "lineDy", t, "lineDy", 0),
4472
+ ue(e, "linePatternAnimSpeed", t, "linePatternAnimSpeed", 0), ue(e, "linePatternGap", t, "linePatternGap", 0);
4458
4473
  }
4459
4474
  setMeshDefines(t, e, n) {
4460
4475
  e.data.aOpacity && (t.HAS_OPACITY = 1), e.data.aLineWidth && (t.HAS_LINE_WIDTH = 1),
4461
- e.data.aLineStrokeWidth && (t.HAS_STROKE_WIDTH = 1), Ce(n.lineDx) && (t.HAS_LINE_DX = 1),
4462
- Ce(n.lineDy) && (t.HAS_LINE_DY = 1), Ce(n.linePatternAnimSpeed) && (t.HAS_PATTERN_ANIM = 1),
4463
- Ce(n.linePatternGap) && (t.HAS_PATTERN_GAP = 1);
4476
+ e.data.aLineStrokeWidth && (t.HAS_STROKE_WIDTH = 1), ze(n.lineDx) && (t.HAS_LINE_DX = 1),
4477
+ ze(n.lineDy) && (t.HAS_LINE_DY = 1), ze(n.linePatternAnimSpeed) && (t.HAS_PATTERN_ANIM = 1),
4478
+ ze(n.linePatternGap) && (t.HAS_PATTERN_GAP = 1);
4464
4479
  }
4465
4480
  paint(t) {
4466
4481
  t.states && t.states.includesChanged.shadow && (this.shader.dispose(), this.createShader(t)),
@@ -4477,7 +4492,7 @@ class $e extends Ue {
4477
4492
  evaluate: (e, i) => {
4478
4493
  let r = n(t.getZoom(), e);
4479
4494
  return p(r) && (r = this.evaluateInFnTypeConfig(r, i, t, e, !0)), Array.isArray(r) || (r = this.colorCache[r] = this.colorCache[r] || C(r).unitArray()),
4480
- r = ue(r), r;
4495
+ r = fe(r), r;
4481
4496
  }
4482
4497
  }, {
4483
4498
  attrName: "aLinePattern",
@@ -4488,7 +4503,7 @@ class $e extends Ue {
4488
4503
  define: "HAS_LINE_PATTERN",
4489
4504
  evaluate: (e, n, r, o) => {
4490
4505
  let a = i(t.getZoom(), e);
4491
- return ae(a) && (a = 0), 0 !== a && (n.properties.hasPatternAnim = 1), s[0] = a / 127,
4506
+ return ce(a) && (a = 0), 0 !== a && (n.properties.hasPatternAnim = 1), s[0] = a / 127,
4492
4507
  s[1] = r[o + 1], s[0];
4493
4508
  }
4494
4509
  }, {
@@ -4500,7 +4515,7 @@ class $e extends Ue {
4500
4515
  define: "HAS_LINE_PATTERN",
4501
4516
  evaluate: (e, n, i, o) => {
4502
4517
  let a = r(t.getZoom(), e);
4503
- return ae(a) && (a = 0), s[1] = 10 * a, s[0] = i[o], s[0];
4518
+ return ce(a) && (a = 0), s[1] = 10 * a, s[0] = i[o], s[0];
4504
4519
  }
4505
4520
  } ].concat(o);
4506
4521
  }
@@ -4565,7 +4580,7 @@ class $e extends Ue {
4565
4580
  init(t) {
4566
4581
  const e = this.regl;
4567
4582
  this.renderer = new n.Renderer(e), this.createShader(t), this.pickingFBO && (this.picking = [ new n.FBORayPicking(this.renderer, {
4568
- vert: "#define PICKING_MODE 1\n" + Xe,
4583
+ vert: "#define PICKING_MODE 1\n" + Je,
4569
4584
  uniforms: [ {
4570
4585
  name: "projViewModelMatrix",
4571
4586
  type: "function",
@@ -4589,7 +4604,7 @@ class $e extends Ue {
4589
4604
  return r.multiply(n, e.projViewMatrix, e.modelMatrix), n;
4590
4605
  }
4591
4606
  }), this.shader = new n.MeshShader({
4592
- vert: Xe,
4607
+ vert: Je,
4593
4608
  frag: "#define SHADER_NAME LINE\n#define DEVICE_PIXEL_RATIO 1.0\nprecision highp float;\n#if defined(HAS_SHADOWING) && !defined(HAS_BLOOM)\n#include <vsm_shadow_frag>\n#endif\nuniform lowp float blendSrcIsOne;\nuniform lowp float lineBlur;\n#ifdef HAS_COLOR\nvarying vec4 vColor;\n#else\nuniform lowp vec4 lineColor;\n#endif\n#ifdef HAS_STROKE_COLOR\nvarying vec4 vStrokeColor;\n#else\nuniform lowp vec4 lineStrokeColor;\n#endif\n#ifdef HAS_OPACITY\nvarying float vOpacity;\n#else\nuniform lowp float lineOpacity;\n#endif\n#ifdef HAS_PATTERN\nuniform sampler2D linePatternFile;\nuniform vec2 atlasSize;\nuniform float flipY;\n#ifdef HAS_PATTERN_ANIM\nvarying float vLinePatternAnimSpeed;\n#else\nuniform float linePatternAnimSpeed;\n#endif\n#ifdef HAS_PATTERN_GAP\nvarying float vLinePatternGap;\n#else\nuniform float linePatternGap;\n#endif\nvarying vec4 vTexInfo;\nvarying float vJoin;\nvec2 c(vec2 d) {\n vec2 e = mod(d, 1.);\n vec2 f = vTexInfo.xy;\n vec2 h = vTexInfo.zw;\n return (f + e * h) / atlasSize;\n}\n#endif\nvarying vec2 vNormal;\nvarying vec2 vWidth;\nvarying float vGammaScale;\n#ifndef ENABLE_TILE_STENCIL\nvarying vec2 vPosition;\n#endif\nuniform float tileExtent;\n#ifdef HAS_DASHARRAY\n#ifdef HAS_DASHARRAY_ATTR\nvarying vec4 vDasharray;\n#else\nuniform vec4 lineDasharray;\n#endif\n#ifdef HAS_DASHARRAY_COLOR\nvarying vec4 vDashColor;\n#else\nuniform vec4 lineDashColor;\n#endif\n#endif\n#if defined(HAS_PATTERN) || defined(HAS_DASHARRAY) || defined(HAS_GRADIENT) || defined(HAS_TRAIL)\nvarying highp float vLinesofar;\n#endif\n#ifdef HAS_TRAIL\nuniform float trailSpeed;\nuniform float trailLength;\nuniform float trailCircle;\n#endif\n#if defined(HAS_TRAIL) || defined(HAS_PATTERN)\nuniform float currentTime;\n#endif\nfloat i(float j, float k) {\n float l = k / 2.;\n float m = abs(j - l);\n float n = (.1 + 1. / DEVICE_PIXEL_RATIO) * vGammaScale;\n return clamp(min(m + n, l - m) / n, .0, 1.);\n}\nvarying vec3 vVertex;\nuniform vec3 cameraPosition;\nuniform float cameraToCenterDistance;\nvoid main() {\n \n#ifndef ENABLE_TILE_STENCIL\nfloat o = sign(tileExtent - min(tileExtent, abs(vPosition.x))) * sign(1. + sign(vPosition.x)) * sign(tileExtent - min(tileExtent, abs(vPosition.y))) * sign(1. + sign(vPosition.y));\n if(o == .0) {\n discard;\n }\n#endif\n#if defined(HAS_PATTERN) || defined(HAS_DASHARRAY) || defined(HAS_GRADIENT) || defined(HAS_TRAIL)\nfloat u = vLinesofar;\n#endif\nfloat v = length(vNormal) * vWidth.s;\n#ifdef HAS_PATTERN\nvec2 h = vTexInfo.zw;\n float A = sign(h.x * h.y);\n float B = mix(lineBlur, .0, A);\n#else\nfloat B = lineBlur;\n#endif\nfloat n = (B + 1. / DEVICE_PIXEL_RATIO) * vGammaScale;\n float C = clamp(min(v - (vWidth.t - n), vWidth.s - v) / n, .0, 1.);\n#ifdef HAS_COLOR\nvec4 D = vColor / 255.;\n#else\nvec4 D = lineColor;\n#endif\n#ifdef HAS_PATTERN\nif(A == 1.) {\n \n#ifdef HAS_PATTERN_GAP\nfloat E = vLinePatternGap;\n#else\nfloat E = linePatternGap;\n#endif\n#ifdef HAS_PATTERN_ANIM\nfloat F = vLinePatternAnimSpeed;\n#else\nfloat F = linePatternAnimSpeed;\n#endif\nfloat G = ceil(h.x * vWidth.s * 2. / h.y);\n float H = G * (1. + E);\n u += mod(currentTime * -F * .2, H);\n float I = mod(u / H, 1.);\n float J = mod((flipY * vNormal.y + 1.) / 2., 1.);\n D *= texture2D(linePatternFile, c(vec2(I * (1. + E), J)));\n float K = clamp(sign(1. / (1. + E) - I) + .000001, .0, 1.);\n D *= K;\n }\n#endif\n#ifdef HAS_STROKE_COLOR\nvec4 L = vStrokeColor / 255.;\n#else\nvec4 L = lineStrokeColor;\n#endif\nL = mix(D, L, sign(vWidth.t));\n D = L * C + max(sign(vWidth.t - v), .0) * D * (1. - C);\n#ifdef HAS_DASHARRAY\n#ifdef HAS_DASHARRAY_ATTR\nvec4 M = vDasharray;\n#else\nvec4 M = lineDasharray;\n#endif\n#ifdef HAS_DASHARRAY_COLOR\nvec4 N = vDashColor;\n#else\nvec4 N = lineDashColor;\n#endif\nfloat k = M[0] + M[1] + M[2] + M[3];\n float j = mod(u, k);\n float O = max(sign(M[0] - j), .0);\n float P = j - M[0] - M[1];\n float Q = max(sign(P), .0) * max(sign(M[2] - P), .0);\n float R = O + Q;\n float S = i(j, M[0]);\n float T = i(P, M[2]);\n float U = S * O + T * Q;\n D = D * (1. - U) + C * N * U;\n#endif\n#ifdef HAS_TRAIL\nfloat V = mod(u - currentTime * trailSpeed * .1, trailCircle);\n float W = V < trailLength ? mix(.0, 1., V / trailLength) : .0;\n D *= W;\n#endif\n#ifdef HAS_OPACITY\nfloat X = vOpacity;\n#else\nfloat X = lineOpacity;\n#endif\ngl_FragColor = D * X;\n#if defined(HAS_SHADOWING) && !defined(HAS_BLOOM)\nfloat Y = shadow_computeShadow();\n gl_FragColor.rgb = shadow_blend(gl_FragColor.rgb, Y);\n#endif\nfloat Z = clamp(cameraToCenterDistance * 1.5 / distance(vVertex, cameraPosition), .0, 1.);\n if(blendSrcIsOne == 1.) {\n gl_FragColor *= gl_FragColor.a;\n }\n gl_FragColor *= Z;\n}",
4594
4609
  uniforms: e,
4595
4610
  defines: i,
@@ -4653,7 +4668,7 @@ class $e extends Ue {
4653
4668
  }
4654
4669
  }
4655
4670
 
4656
- class Je extends $e {
4671
+ class Ze extends Ye {
4657
4672
  postCreateGeometry(t) {
4658
4673
  const {symbolIndex: e, geometry: n} = t, {features: i} = n.properties, r = this.getSymbol(e).lineGradientProperty, o = n.data.aPickingId, s = new Uint8Array(o.length), a = [];
4659
4674
  let l = o[0];
@@ -4665,7 +4680,7 @@ class Je extends $e {
4665
4680
  createMesh(t, e) {
4666
4681
  const {geometry: i, symbolIndex: r, ref: o} = t, s = this.getSymbolDef(r);
4667
4682
  if (void 0 === o) {
4668
- we(i, s, this.getFnTypeConfig(r));
4683
+ ke(i, s, this.getFnTypeConfig(r));
4669
4684
  }
4670
4685
  const a = {
4671
4686
  tileResolution: i.properties.tileResolution,
@@ -4675,11 +4690,11 @@ class Je extends $e {
4675
4690
  this.setLineUniforms(l, a);
4676
4691
  const c = i.properties.gradients;
4677
4692
  let h = 2 * c.length;
4678
- Ze(h) || (h = Ke(h));
4693
+ Qe(h) || (h = tn(h));
4679
4694
  const u = this.regl.texture({
4680
4695
  width: 256,
4681
4696
  height: h,
4682
- data: Ye(c),
4697
+ data: Ke(c),
4683
4698
  format: "rgba",
4684
4699
  mag: "linear",
4685
4700
  min: "linear",
@@ -4712,7 +4727,7 @@ class Je extends $e {
4712
4727
  return r.multiply(n, e.projViewMatrix, e.modelMatrix), n;
4713
4728
  }
4714
4729
  }), this.shader = new n.MeshShader({
4715
- vert: Xe,
4730
+ vert: Je,
4716
4731
  frag: "#define SHADER_NAME LINE_GRADIENT\n#define DEVICE_PIXEL_RATIO 1.0\n#define MAX_LINE_COUNT 128.0\nprecision mediump float;\n#if defined(HAS_SHADOWING) && !defined(HAS_BLOOM)\n#include <vsm_shadow_frag>\n#endif\n#ifdef HAS_OPACITY\nvarying float vOpacity;\n#else\nuniform lowp float lineOpacity;\n#endif\nuniform lowp float lineBlur;\nuniform float lineGradientTextureHeight;\nuniform float tileExtent;\nuniform sampler2D lineGradientTexture;\nvarying vec2 vNormal;\nvarying vec2 vWidth;\nvarying float vGammaScale;\nvarying highp float vLinesofar;\nvarying float vGradIndex;\n#ifndef ENABLE_TILE_STENCIL\nvarying vec2 vPosition;\n#endif\n#ifdef HAS_TRAIL\nuniform float trailSpeed;\nuniform float trailLength;\nuniform float trailCircle;\nuniform float currentTime;\n#endif\nvoid main() {\n \n#ifndef ENABLE_TILE_STENCIL\nfloat c = sign(tileExtent - min(tileExtent, abs(vPosition.x))) * sign(1. + sign(vPosition.x)) * sign(tileExtent - min(tileExtent, abs(vPosition.y))) * sign(1. + sign(vPosition.y));\n if(c == .0) {\n discard;\n }\n#endif\nfloat d = length(vNormal) * vWidth.s;\n float e = (lineBlur + 1. / DEVICE_PIXEL_RATIO) * vGammaScale;\n float f = clamp(min(d - (vWidth.t - e), vWidth.s - d) / e, .0, 1.);\n float h = vLinesofar;\n vec4 i = texture2D(lineGradientTexture, vec2(h, (vGradIndex * 2. + .5) / lineGradientTextureHeight)) * f;\n i *= max(sign(MAX_LINE_COUNT - vGradIndex), .0);\n#ifdef HAS_TRAIL\nfloat j = mod(h - currentTime * trailSpeed * .1, trailCircle);\n float k = j < trailLength ? mix(.0, 1., j / trailLength) : .0;\n i *= k;\n#endif\n#ifdef HAS_OPACITY\nfloat l = vOpacity;\n#else\nfloat l = lineOpacity;\n#endif\ngl_FragColor = i * l;\n#if defined(HAS_SHADOWING) && !defined(HAS_BLOOM)\nfloat m = shadow_computeShadow();\n gl_FragColor.rgb = shadow_blend(gl_FragColor.rgb, m);\n#endif\n}",
4717
4732
  uniforms: e,
4718
4733
  defines: i,
@@ -4721,11 +4736,11 @@ class Je extends $e {
4721
4736
  }
4722
4737
  }
4723
4738
 
4724
- function Ye(t) {
4739
+ function Ke(t) {
4725
4740
  t.length > 128 && (console.warn("Line count in a tile exceeds maximum limit (128) for line-gradient render plugin."),
4726
4741
  t = t.slice(0, 128));
4727
4742
  const e = document.createElement("canvas"), n = e.getContext("2d");
4728
- e.width = 256, e.height = 2 * t.length, Ze(e.height) || (e.height = Ke(2 * t.length));
4743
+ e.width = 256, e.height = 2 * t.length, Qe(e.height) || (e.height = tn(2 * t.length));
4729
4744
  for (let e = 0; e < t.length; e++) {
4730
4745
  const i = t[e], r = n.createLinearGradient(0, 0, 256, 0);
4731
4746
  for (let t = 0; t < i.length; t += 2) r.addColorStop(+i[t], i[t + 1]);
@@ -4736,38 +4751,38 @@ function Ye(t) {
4736
4751
  return n.canvas;
4737
4752
  }
4738
4753
 
4739
- function Ze(t) {
4754
+ function Qe(t) {
4740
4755
  return 0 == (t & t - 1) && 0 !== t;
4741
4756
  }
4742
4757
 
4743
- function Ke(t) {
4758
+ function tn(t) {
4744
4759
  return Math.pow(2, Math.ceil(Math.log(t) / Math.LN2));
4745
4760
  }
4746
4761
 
4747
- class Qe {
4762
+ class en {
4748
4763
  constructor(t) {
4749
- this.C = t || [], this.properties = {};
4764
+ this.F = t || [], this.properties = {};
4750
4765
  }
4751
4766
  set meshes(t) {
4752
- this.C = t;
4767
+ this.F = t;
4753
4768
  }
4754
4769
  get meshes() {
4755
- return this.C;
4770
+ return this.F;
4756
4771
  }
4757
4772
  }
4758
4773
 
4759
- const tn = 224, en = 600, nn = 100, rn = new Uint8Array(1), on = [], sn = {
4774
+ const nn = 224, rn = 600, on = 100, sn = new Uint8Array(1), an = [], ln = {
4760
4775
  collides: 0,
4761
4776
  boxes: []
4762
4777
  };
4763
4778
 
4764
- class an extends Ue {
4779
+ class cn extends Ge {
4765
4780
  supportRenderMode(t) {
4766
4781
  return "point" === t;
4767
4782
  }
4768
4783
  startMeshCollision(t) {
4769
- const {meshKey: e} = t.properties, {renderer: n} = this.si, i = n.isForeground(t instanceof Qe ? t.meshes[0] : t);
4770
- if (t.properties.isForeground = i, t instanceof Qe && t.meshes.length) for (let e = 0; e < t.meshes.length; e++) t.meshes[e].properties.isForeground = i;
4784
+ const {meshKey: e} = t.properties, {renderer: n} = this.si, i = n.isForeground(t instanceof en ? t.meshes[0] : t);
4785
+ if (t.properties.isForeground = i, t instanceof en && t.meshes.length) for (let e = 0; e < t.meshes.length; e++) t.meshes[e].properties.isForeground = i;
4771
4786
  this.ai = performance.now(), this.li = this.ci(), this.hi = this.ui(e);
4772
4787
  }
4773
4788
  endMeshCollision(t) {
@@ -4824,10 +4839,10 @@ class an extends Ue {
4824
4839
  const e = this.getMap();
4825
4840
  s = this.gi[r] = e.coordToContainerPoint(t), a = this.gi[o] = e.coordToContainerPoint(i);
4826
4841
  }
4827
- return s.z = t.z, on[0] = s, on[1] = a, s.width = t.width, s.height = t.height,
4828
- on;
4842
+ return s.z = t.z, an[0] = s, an[1] = a, s.width = t.width, s.height = t.height,
4843
+ an;
4829
4844
  }
4830
- return on[0] = on[1] = null, on;
4845
+ return an[0] = an[1] = null, an;
4831
4846
  }
4832
4847
  updateBoxCollisionFading(t, e, n, i, r) {
4833
4848
  const {layer: o, renderer: s, zoom: a, collisionTags: l, isEnableUniquePlacement: c} = this.si, {meshKey: h, isForeground: u} = e.properties;
@@ -4876,8 +4891,8 @@ class an extends Ue {
4876
4891
  const n = e.Mi;
4877
4892
  if (n && 1 === g && t[r] > 0) {
4878
4893
  let {fadeOutDelay: t, fadingDuration: e} = this.sceneConfig;
4879
- ae(e) && (e = tn), ae(t) && (t = nn);
4880
- const i = oe(1 - (s.getFrameTimestamp() - n - t) / e, 0, 1);
4894
+ ce(e) && (e = nn), ce(t) && (t = on);
4895
+ const i = ae(1 - (s.getFrameTimestamp() - n - t) / e, 0, 1);
4881
4896
  g *= i, i > 0 && this.setToRedraw();
4882
4897
  }
4883
4898
  }
@@ -4888,7 +4903,7 @@ class an extends Ue {
4888
4903
  !this.Oi(i, t, e) && f && f.boxes && this.Ci(f.boxes, t);
4889
4904
  }
4890
4905
  if (y) {
4891
- const t = rn[0] = 255 * g;
4906
+ const t = sn[0] = 255 * g;
4892
4907
  for (let e = 0; e < d; e++) {
4893
4908
  const {mesh: i, allElements: r, start: o, end: s, boxIndex: a} = n[e];
4894
4909
  this.setCollisionOpacity(i, r, t, o, s, a);
@@ -4916,12 +4931,12 @@ class an extends Ue {
4916
4931
  isBoxFading(t, e) {
4917
4932
  const {frameTimestamp: n} = this.si;
4918
4933
  let i = this.sceneConfig.fadingDuration;
4919
- ae(i) && (i = tn);
4934
+ ce(i) && (i = nn);
4920
4935
  return n - Math.abs(this.Si(t)[e]) < i;
4921
4936
  }
4922
4937
  _i(t, e, n, i, r, o, s) {
4923
4938
  const a = this.getSymbol(t.properties.symbolIndex), l = this.Oi(a, t, e[i]), c = this.zi(a, t, e[i]);
4924
- if (!1 === this.sceneConfig.collision || l && c) return sn;
4939
+ if (!1 === this.sceneConfig.collision || l && c) return ln;
4925
4940
  const h = this.isBoxCollides(t, e, n, i, r, o, s);
4926
4941
  return c && (h.collides = 0, h.isAllowOverlap = 1), h;
4927
4942
  }
@@ -4944,7 +4959,7 @@ class an extends Ue {
4944
4959
  }
4945
4960
  Pi(t, e, n, i) {
4946
4961
  let {fadingDuration: r, fadeInDelay: o, fadeOutDelay: s} = this.sceneConfig;
4947
- ae(r) && (r = tn), ae(o) && (o = en), ae(s) && (s = nn);
4962
+ ce(r) && (r = nn), ce(o) && (o = rn), ce(s) && (s = on);
4948
4963
  const {frameTimestamp: a} = this.si;
4949
4964
  let l = n[i], c = e ? 1 : 0;
4950
4965
  if (!l) return e && t && (n[i] = a + o), 0;
@@ -4953,7 +4968,7 @@ class an extends Ue {
4953
4968
  n[i] = l = e ? t : -t;
4954
4969
  }
4955
4970
  return a - Math.abs(l) < r ? c = l > 0 ? (a - l) / r : 1 - (a + l) / r : e ? (l < 0 && (n[i] = l = a + o),
4956
- c = (a - l) / r) : (l > 0 && (n[i] = l = -(a + s)), c = 1 - (a + l) / r), (c < 0 || c > 1) && (c = oe(c, 0, 1)),
4971
+ c = (a - l) / r) : (l > 0 && (n[i] = l = -(a + s)), c = 1 - (a + l) / r), (c < 0 || c > 1) && (c = ae(c, 0, 1)),
4957
4972
  c;
4958
4973
  }
4959
4974
  Si(t) {
@@ -4982,7 +4997,7 @@ class an extends Ue {
4982
4997
  if (!t) return;
4983
4998
  const {frameTimestamp: n} = this.si;
4984
4999
  let {fadingDuration: i} = this.sceneConfig;
4985
- ae(i) && (i = tn), t[e] = -(n - i - 1);
5000
+ ce(i) && (i = nn), t[e] = -(n - i - 1);
4986
5001
  }
4987
5002
  deleteMesh(t, e) {
4988
5003
  if (t) {
@@ -5052,7 +5067,7 @@ class an extends Ue {
5052
5067
  } else e && !this.ki && (this.Ji = t.getResolution());
5053
5068
  if (e) this.Yi && (clearTimeout(this.Yi), delete this.Ti, delete this.Yi), this.Ti = this.Ji && t.getResolution() > this.Ji; else if (this.ki && !this.Yi) {
5054
5069
  let {fadeOutDelay: t, fadingDuration: e} = this.sceneConfig;
5055
- ae(t) && (t = nn), ae(e) && (e = tn), this.Yi = setTimeout(() => {
5070
+ ce(t) && (t = on), ce(e) && (e = nn), this.Yi = setTimeout(() => {
5056
5071
  delete this.Ti, delete this.Yi;
5057
5072
  }, t + e + 1);
5058
5073
  }
@@ -5109,7 +5124,7 @@ class an extends Ue {
5109
5124
  }
5110
5125
  Wi() {
5111
5126
  let {fadeOutDelay: t, fadingDuration: e} = this.sceneConfig;
5112
- ae(t) && (t = nn), ae(e) && (e = tn);
5127
+ ce(t) && (t = on), ce(e) && (e = nn);
5113
5128
  const n = this.layer.getRenderer(), i = n.getCurrentTileZoom(), r = n.getFrameTimestamp(), o = [];
5114
5129
  for (let s = 0; s < this.Gi.length; s++) {
5115
5130
  const a = this.Gi[s], l = a.properties.tile;
@@ -5157,7 +5172,7 @@ class an extends Ue {
5157
5172
  break;
5158
5173
  }
5159
5174
  if (!n) return;
5160
- this.tr = e, this.er = {}, this.Qi = {}, t = t.sort(cn);
5175
+ this.tr = e, this.er = {}, this.Qi = {}, t = t.sort(un);
5161
5176
  const i = this.getMap().getGLScale(), r = {};
5162
5177
  for (let e = 0; e < t.length; e++) {
5163
5178
  const n = t[e];
@@ -5167,7 +5182,7 @@ class an extends Ue {
5167
5182
  const {uniquePlacements: s} = n.geometry.properties;
5168
5183
  if (s) for (let t = 0; t < s.length; t++) {
5169
5184
  if (!s[t]) continue;
5170
- const {key: e, index: o} = s[t], a = this.Si(n), l = ln(e, i), c = r[l];
5185
+ const {key: e, index: o} = s[t], a = this.Si(n), l = hn(e, i), c = r[l];
5171
5186
  if (c) {
5172
5187
  const t = c.length, e = c[t - 3].properties.meshKey, i = c[t - 2], r = c[t - 1];
5173
5188
  this.er[e] = this.er[e] || {}, this.er[e][r] = 1, this.nr(a, o, i, r), c.push(n, a, o);
@@ -5226,125 +5241,125 @@ class an extends Ue {
5226
5241
  }
5227
5242
  }
5228
5243
 
5229
- function ln(t, e) {
5244
+ function hn(t, e) {
5230
5245
  return Math.round(t[0] / e / 10) * Math.round(t[1] / e / 10) * (t[2] ? Math.round(t[2] / 10) : 1) + "-" + t[3];
5231
5246
  }
5232
5247
 
5233
- function cn(t, e) {
5248
+ function un(t, e) {
5234
5249
  const n = e.uniforms.level - t.uniforms.level;
5235
5250
  return 0 === n ? t.properties.meshKey - e.properties.meshKey : n;
5236
5251
  }
5237
5252
 
5238
- var hn = "#include <gl2_vert>\n#define SHADER_NAME MARKER\n#define RAD 0.0174532925\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec2 aShape;\nattribute vec2 aTexCoord;\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute float aColorOpacity;\n#endif\n#ifdef HAS_MARKER_WIDTH\nattribute float aMarkerWidth;\n#else\nuniform float markerWidth;\n#endif\n#ifdef HAS_MARKER_HEIGHT\nattribute float aMarkerHeight;\n#else\nuniform float markerHeight;\n#endif\n#ifdef HAS_MARKER_DX\nattribute float aMarkerDx;\n#else\nuniform float markerDx;\n#endif\n#ifdef HAS_MARKER_DY\nattribute float aMarkerDy;\n#else\nuniform float markerDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nattribute float aPitchAlign;\n#else\nuniform float pitchWithMap;\n#endif\n#if defined(HAS_ROTATION_ALIGN)\nattribute float aRotationAlign;\n#else\nuniform float rotateWithMap;\n#endif\nuniform float flipY;\n#ifdef HAS_ROTATION\nattribute float aRotation;\n#else\nuniform float markerRotation;\n#endif\n#ifdef HAS_PAD_OFFSET\nattribute float aPadOffsetX;\nattribute float aPadOffsetY;\n#endif\nuniform float cameraToCenterDistance;\nuniform mat4 projViewModelMatrix;\nuniform float markerPerspectiveRatio;\nuniform vec2 iconSize;\nuniform vec2 texSize;\nuniform vec2 canvasSize;\nuniform float mapPitch;\nuniform float mapRotation;\nuniform float zoomScale;\nuniform float tileRatio;\nuniform float layerScale;\n#include <vt_position_vert>\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vOpacity;\n#else\n#include <fbo_picking_vert>\n#endif\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_MARKER_WIDTH\nfloat d = aMarkerWidth;\n#else\nfloat d = markerWidth;\n#endif\n#ifdef HAS_MARKER_HEIGHT\nfloat e = aMarkerHeight;\n#else\nfloat e = markerHeight;\n#endif\n#ifdef HAS_MARKER_DX\nfloat f = aMarkerDx;\n#else\nfloat f = markerDx;\n#endif\n#ifdef HAS_MARKER_DY\nfloat h = aMarkerDy;\n#else\nfloat h = markerDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nfloat i = aPitchAlign;\n#else\nfloat i = pitchWithMap;\n#endif\n#if defined(HAS_ROTATION_ALIGN)\nfloat j = aRotationAlign;\n#else\nfloat j = rotateWithMap;\n#endif\ngl_Position = projViewModelMatrix * vec4(c, 1.);\n float k = gl_Position.w;\n float l = (1. - cameraToCenterDistance / k) * markerPerspectiveRatio;\n float m = clamp(.5 + .5 * (1. - l), .0, 4.);\n#ifdef HAS_ROTATION\nfloat n = aRotation / 9362. - mapRotation * j;\n#else\nfloat n = markerRotation - mapRotation * j;\n#endif\nif(i == 1.) {\n n += mapRotation;\n }\n float o = sin(n);\n float u = cos(n);\n mat2 v = mat2(u, -1. * o, o, u);\n vec2 A = (aShape / 10.0);\n if(i == 1. && flipY == .0) {\n A *= vec2(1., -1.);\n }\n#ifdef HAS_PAD_OFFSET\nA = (A / iconSize * vec2(d, e) + vec2(aPadOffsetX - 1., aPadOffsetY)) * layerScale;\n#else\nA = A / iconSize * vec2(d, e) * layerScale;\n#endif\nA = v * A;\n if(i == .0) {\n vec2 B = A * 2. / canvasSize;\n gl_Position.xy += B * m * k;\n } else {\n float C = k / cameraToCenterDistance;\n vec2 B = A;\n gl_Position = projViewModelMatrix * vec4(c + vec3(B, .0) * tileRatio / zoomScale * C * m, 1.);\n }\n gl_Position.xy += vec2(f, -h) * 2. / canvasSize * k;\n#ifndef PICKING_MODE\nvTexCoord = aTexCoord / texSize;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nvOpacity *= aColorOpacity / 255.;\n#endif\n#else\n#ifdef ENABLE_COLLISION\nbool D = aOpacity == 255.;\n#else\nbool D = true;\n#endif\nfbo_picking_setData(gl_Position.w, D);\n#endif\n}";
5253
+ var dn = "#include <gl2_vert>\n#define SHADER_NAME MARKER\n#define RAD 0.0174532925\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec2 aShape;\nattribute vec2 aTexCoord;\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute float aColorOpacity;\n#endif\n#ifdef HAS_MARKER_WIDTH\nattribute float aMarkerWidth;\n#else\nuniform float markerWidth;\n#endif\n#ifdef HAS_MARKER_HEIGHT\nattribute float aMarkerHeight;\n#else\nuniform float markerHeight;\n#endif\n#ifdef HAS_MARKER_DX\nattribute float aMarkerDx;\n#else\nuniform float markerDx;\n#endif\n#ifdef HAS_MARKER_DY\nattribute float aMarkerDy;\n#else\nuniform float markerDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nattribute float aPitchAlign;\n#else\nuniform float pitchWithMap;\n#endif\n#if defined(HAS_ROTATION_ALIGN)\nattribute float aRotationAlign;\n#else\nuniform float rotateWithMap;\n#endif\nuniform float flipY;\n#ifdef HAS_ROTATION\nattribute float aRotation;\n#else\nuniform float markerRotation;\n#endif\n#ifdef HAS_PAD_OFFSET\nattribute float aPadOffsetX;\nattribute float aPadOffsetY;\n#endif\nuniform float cameraToCenterDistance;\nuniform mat4 projViewModelMatrix;\nuniform float markerPerspectiveRatio;\nuniform vec2 iconSize;\nuniform vec2 texSize;\nuniform vec2 canvasSize;\nuniform float mapPitch;\nuniform float mapRotation;\nuniform float zoomScale;\nuniform float tileRatio;\nuniform float layerScale;\n#include <vt_position_vert>\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vOpacity;\n#else\n#include <fbo_picking_vert>\n#endif\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_MARKER_WIDTH\nfloat d = aMarkerWidth;\n#else\nfloat d = markerWidth;\n#endif\n#ifdef HAS_MARKER_HEIGHT\nfloat e = aMarkerHeight;\n#else\nfloat e = markerHeight;\n#endif\n#ifdef HAS_MARKER_DX\nfloat f = aMarkerDx;\n#else\nfloat f = markerDx;\n#endif\n#ifdef HAS_MARKER_DY\nfloat h = aMarkerDy;\n#else\nfloat h = markerDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nfloat i = aPitchAlign;\n#else\nfloat i = pitchWithMap;\n#endif\n#if defined(HAS_ROTATION_ALIGN)\nfloat j = aRotationAlign;\n#else\nfloat j = rotateWithMap;\n#endif\ngl_Position = projViewModelMatrix * vec4(c, 1.);\n float k = gl_Position.w;\n float l = (1. - cameraToCenterDistance / k) * markerPerspectiveRatio;\n float m = clamp(.5 + .5 * (1. - l), .0, 4.);\n#ifdef HAS_ROTATION\nfloat n = aRotation / 9362. - mapRotation * j;\n#else\nfloat n = markerRotation - mapRotation * j;\n#endif\nif(i == 1.) {\n n += mapRotation;\n }\n float o = sin(n);\n float u = cos(n);\n mat2 v = mat2(u, -1. * o, o, u);\n vec2 A = (aShape / 10.0);\n if(i == 1. && flipY == .0) {\n A *= vec2(1., -1.);\n }\n#ifdef HAS_PAD_OFFSET\nA = (A / iconSize * vec2(d, e) + vec2(aPadOffsetX - 1., aPadOffsetY)) * layerScale;\n#else\nA = A / iconSize * vec2(d, e) * layerScale;\n#endif\nA = v * A;\n if(i == .0) {\n vec2 B = A * 2. / canvasSize;\n gl_Position.xy += B * m * k;\n } else {\n float C = k / cameraToCenterDistance;\n vec2 B = A;\n gl_Position = projViewModelMatrix * vec4(c + vec3(B, .0) * tileRatio / zoomScale * C * m, 1.);\n }\n gl_Position.xy += vec2(f, -h) * 2. / canvasSize * k;\n#ifndef PICKING_MODE\nvTexCoord = aTexCoord / texSize;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nvOpacity *= aColorOpacity / 255.;\n#endif\n#else\n#ifdef ENABLE_COLLISION\nbool D = aOpacity == 255.;\n#else\nbool D = true;\n#endif\nfbo_picking_setData(gl_Position.w, D);\n#endif\n}";
5239
5254
 
5240
- const un = [];
5255
+ const fn = [];
5241
5256
 
5242
- function dn(t, e, n, i, r) {
5243
- return a.set(un, e[0], e[1], e[2], 1), a.transformMat4(un, un, n), t[2] = un[3],
5244
- a.scale(un, un, 1 / un[3]), t[0] = (un[0] + 1) * i / 2, t[1] = (1 - un[1]) * r / 2,
5257
+ function pn(t, e, n, i, r) {
5258
+ return a.set(fn, e[0], e[1], e[2], 1), a.transformMat4(fn, fn, n), t[2] = fn[3],
5259
+ a.scale(fn, fn, 1 / fn[3]), t[0] = (fn[0] + 1) * i / 2, t[1] = (1 - fn[1]) * r / 2,
5245
5260
  t;
5246
5261
  }
5247
5262
 
5248
- const fn = [], pn = [], mn = [], yn = [], gn = [], vn = [];
5263
+ const mn = [], yn = [], gn = [], vn = [], bn = [], xn = [];
5249
5264
 
5250
- function bn(t, e, n, r, o, s, l, h, u, d, f, p, m, y) {
5265
+ function wn(t, e, n, r, o, s, l, h, u, d, f, p, m, y) {
5251
5266
  const {tileRatio: g, tileResolution: v} = u, b = g / (v / d.getResolution()) * (f / d.cameraToCenterDistance) * p;
5252
- c.scale(n, n, b), c.scale(r, r, b), c.scale(o, o, b), c.scale(s, s, b), i.set(fn, n[0], n[1], m ? n[2] / y : 0),
5253
- i.set(pn, r[0], r[1], m ? r[2] / y : 0), i.set(mn, o[0], o[1], m ? o[2] / y : 0),
5254
- i.set(yn, s[0], s[1], m ? s[2] / y : 0), i.add(fn, fn, e), i.add(pn, pn, e), i.add(mn, mn, e),
5255
- i.add(yn, yn, e), dn(n, fn, l, d.width, d.height), dn(r, pn, l, d.width, d.height),
5256
- dn(o, mn, l, d.width, d.height), dn(s, yn, l, d.width, d.height), c.set(gn, Math.min(n[0], r[0], o[0], s[0]), Math.min(n[1], r[1], o[1], s[1])),
5257
- c.set(vn, Math.max(n[0], r[0], o[0], s[0]), Math.max(n[1], r[1], o[1], s[1])), a.set(t, gn[0] + h[0], gn[1] + h[1], vn[0] + h[0], vn[1] + h[1]);
5267
+ c.scale(n, n, b), c.scale(r, r, b), c.scale(o, o, b), c.scale(s, s, b), i.set(mn, n[0], n[1], m ? n[2] / y : 0),
5268
+ i.set(yn, r[0], r[1], m ? r[2] / y : 0), i.set(gn, o[0], o[1], m ? o[2] / y : 0),
5269
+ i.set(vn, s[0], s[1], m ? s[2] / y : 0), i.add(mn, mn, e), i.add(yn, yn, e), i.add(gn, gn, e),
5270
+ i.add(vn, vn, e), pn(n, mn, l, d.width, d.height), pn(r, yn, l, d.width, d.height),
5271
+ pn(o, gn, l, d.width, d.height), pn(s, vn, l, d.width, d.height), c.set(bn, Math.min(n[0], r[0], o[0], s[0]), Math.min(n[1], r[1], o[1], s[1])),
5272
+ c.set(xn, Math.max(n[0], r[0], o[0], s[0]), Math.max(n[1], r[1], o[1], s[1])), a.set(t, bn[0] + h[0], bn[1] + h[1], xn[0] + h[0], xn[1] + h[1]);
5258
5273
  }
5259
5274
 
5260
- function xn(t, e, n, i, r, o, s, l) {
5275
+ function An(t, e, n, i, r, o, s, l) {
5261
5276
  1 !== l && (c.scale(n, n, l), c.scale(i, i, l), c.scale(r, r, l), c.scale(o, o, l)),
5262
- c.set(gn, Math.min(n[0], i[0], r[0], o[0]), Math.min(n[1], i[1], r[1], o[1])), c.set(vn, Math.max(n[0], i[0], r[0], o[0]), Math.max(n[1], i[1], r[1], o[1])),
5263
- a.set(t, e[0] + gn[0] + s[0], e[1] + gn[1] - s[1], e[0] + vn[0] + s[0], e[1] + vn[1] - s[1]);
5277
+ c.set(bn, Math.min(n[0], i[0], r[0], o[0]), Math.min(n[1], i[1], r[1], o[1])), c.set(xn, Math.max(n[0], i[0], r[0], o[0]), Math.max(n[1], i[1], r[1], o[1])),
5278
+ a.set(t, e[0] + bn[0] + s[0], e[1] + bn[1] - s[1], e[0] + xn[0] + s[0], e[1] + xn[1] - s[1]);
5264
5279
  }
5265
5280
 
5266
- function wn(t, e, n, i, r) {
5281
+ function kn(t, e, n, i, r) {
5267
5282
  e -= n * i, 1 === r && (e += n);
5268
5283
  const o = Math.sin(e), s = Math.cos(e);
5269
5284
  return l.set(t, s, -o, o, s);
5270
5285
  }
5271
5286
 
5272
- const An = [], kn = [], _n = [], Sn = [], Tn = [], Mn = [], Pn = [], In = [], On = [ 1, -1 ], Cn = [ 1, 1 ];
5287
+ const _n = [], Sn = [], Tn = [], Mn = [], Pn = [], In = [], On = [], Cn = [], Fn = [ 1, -1 ], zn = [ 1, 1 ];
5273
5288
 
5274
- function Fn(t, e, n, r, o) {
5275
- const s = e.material.uniforms, a = o.cameraToCenterDistance, l = e.geometry.properties, h = this.getSymbol(l.symbolIndex), u = e.geometry.desc.positionSize, d = l.aAnchor, f = i.set(An, d[n * u], d[n * u + 1], 2 === u ? 0 : d[n * u + 2]);
5276
- let p = dn(kn, f, r, o.width, o.height);
5289
+ function En(t, e, n, r, o) {
5290
+ const s = e.material.uniforms, a = o.cameraToCenterDistance, l = e.geometry.properties, h = this.getSymbol(l.symbolIndex), u = e.geometry.desc.positionSize, d = l.aAnchor, f = i.set(_n, d[n * u], d[n * u + 1], 2 === u ? 0 : d[n * u + 2]);
5291
+ let p = pn(Sn, f, r, o.width, o.height);
5277
5292
  const m = p[2];
5278
5293
  let y = 1;
5279
5294
  if (s.markerPerspectiveRatio) {
5280
- y = oe(.5 + .5 * (1 - (1 - a / m) * s.markerPerspectiveRatio), 0, 4);
5295
+ y = ae(.5 + .5 * (1 - (1 - a / m) * s.markerPerspectiveRatio), 0, 4);
5281
5296
  }
5282
- const {aShape: g, aMarkerDx: v, aMarkerDy: b, aMarkerWidth: x, aMarkerHeight: w, aPitchAlign: A, aRotationAlign: k, aRotation: _} = l, S = v ? v[n] : h.markerDx, T = b ? b[n] : h.markerDy, M = A ? A[n] : s.pitchWithMap, P = k ? k[n] : s.rotateWithMap, I = c.set(In, S || 0, -(T || 0));
5283
- let O = c.set(Sn, g[2 * n] / 10, g[2 * n + 1] / 10), C = c.set(Tn, g[2 * n + 2] / 10, g[2 * n + 3] / 10), F = c.set(Mn, g[2 * n + 4] / 10, g[2 * n + 5] / 10), z = c.set(Pn, g[2 * n + 6] / 10, g[2 * n + 7] / 10);
5284
- 0 === s.flipY && 1 === M && (c.multiply(O, O, On), c.multiply(C, C, On), c.multiply(F, F, On),
5285
- c.multiply(z, z, On));
5297
+ const {aShape: g, aMarkerDx: v, aMarkerDy: b, aMarkerWidth: x, aMarkerHeight: w, aPitchAlign: A, aRotationAlign: k, aRotation: _} = l, S = v ? v[n] : h.markerDx, T = b ? b[n] : h.markerDy, M = A ? A[n] : s.pitchWithMap, P = k ? k[n] : s.rotateWithMap, I = c.set(Cn, S || 0, -(T || 0));
5298
+ let O = c.set(Mn, g[2 * n] / 10, g[2 * n + 1] / 10), C = c.set(Pn, g[2 * n + 2] / 10, g[2 * n + 3] / 10), F = c.set(In, g[2 * n + 4] / 10, g[2 * n + 5] / 10), z = c.set(On, g[2 * n + 6] / 10, g[2 * n + 7] / 10);
5299
+ 0 === s.flipY && 1 === M && (c.multiply(O, O, Fn), c.multiply(C, C, Fn), c.multiply(F, F, Fn),
5300
+ c.multiply(z, z, Fn));
5286
5301
  let E = x ? x[n] : h.markerWidth;
5287
- ae(E) && (E = 15);
5302
+ ce(E) && (E = 15);
5288
5303
  let j = w ? w[n] : h.markerHeight;
5289
- ae(j) && (j = 15);
5290
- const D = c.set(Cn, E / 24, j / 24);
5304
+ ce(j) && (j = 15);
5305
+ const D = c.set(zn, E / 24, j / 24);
5291
5306
  c.mul(O, O, D), c.mul(C, C, D), c.mul(F, F, D), c.mul(z, z, D);
5292
5307
  let R = _ ? _[n] / 9362 : -(h.markerRotation || 0) * Math.PI / 180;
5293
5308
  const N = o.getBearing() * Math.PI / 180;
5294
5309
  if (N * P || R) {
5295
- const t = wn(_n, R, N, P, M);
5310
+ const t = kn(Tn, R, N, P, M);
5296
5311
  O = c.transformMat2(O, O, t), C = c.transformMat2(C, C, t), F = c.transformMat2(F, F, t),
5297
5312
  z = c.transformMat2(z, z, t);
5298
5313
  }
5299
- return 1 === M ? bn(t, f, O, C, F, z, r, I, s, o, m, y) : (c.multiply(O, O, On),
5300
- c.multiply(C, C, On), c.multiply(F, F, On), c.multiply(z, z, On), xn(t, p, O, C, F, z, I, y)),
5314
+ return 1 === M ? wn(t, f, O, C, F, z, r, I, s, o, m, y) : (c.multiply(O, O, Fn),
5315
+ c.multiply(C, C, Fn), c.multiply(F, F, Fn), c.multiply(z, z, Fn), An(t, p, O, C, F, z, I, y)),
5301
5316
  t;
5302
5317
  }
5303
5318
 
5304
- const zn = [], En = [], jn = [], Dn = [], Rn = [], Nn = [], Ln = [ 1, -1 ];
5319
+ const jn = [], Dn = [], Rn = [], Nn = [], Ln = [], Hn = [], Vn = [ 1, -1 ];
5305
5320
 
5306
- function Hn(t, e, n, r, o, s, a, l, h) {
5307
- const u = r.material.uniforms, d = h.cameraToCenterDistance, f = r.geometry.properties, p = this.getSymbol(f.symbolIndex), m = "line" === p.textPlacement && !ye(p), y = n[2];
5321
+ function Un(t, e, n, r, o, s, a, l, h) {
5322
+ const u = r.material.uniforms, d = h.cameraToCenterDistance, f = r.geometry.properties, p = this.getSymbol(f.symbolIndex), m = "line" === p.textPlacement && !ve(p), y = n[2];
5308
5323
  let g = 1;
5309
5324
  if (u.textPerspectiveRatio) {
5310
- g = oe(.5 + .5 * (1 - (1 - d / y) * u.textPerspectiveRatio), 0, 4);
5325
+ g = ae(.5 + .5 * (1 - (1 - d / y) * u.textPerspectiveRatio), 0, 4);
5311
5326
  }
5312
- const {aTextDx: v, aTextDy: b, aPitchAlign: x, aRotationAlign: w, aRotation: A} = r.geometry.properties, k = v ? v[a] : p.textDx, _ = b ? b[a] : p.textDy, S = x ? x[a] : u.pitchWithMap, T = w ? w[a] : u.rotateWithMap, M = c.set(Nn, k || 0, -(_ || 0));
5327
+ const {aTextDx: v, aTextDy: b, aPitchAlign: x, aRotationAlign: w, aRotation: A} = r.geometry.properties, k = v ? v[a] : p.textDx, _ = b ? b[a] : p.textDy, S = x ? x[a] : u.pitchWithMap, T = w ? w[a] : u.rotateWithMap, M = c.set(Hn, k || 0, -(_ || 0));
5313
5328
  if (m) {
5314
5329
  const {aOffset: r, aShape: o} = f, s = r.length !== o.length;
5315
5330
  let d, p, m, v;
5316
- if (s ? (d = i.set(En, r[3 * a] / 10, r[3 * a + 1] / 10, r[3 * a + 2] / 10), p = i.set(jn, r[3 * a + 3] / 10, r[3 * a + 4] / 10, r[3 * a + 5] / 10),
5317
- m = i.set(Dn, r[3 * a + 6] / 10, r[3 * a + 7] / 10, r[3 * a + 8] / 10), v = i.set(Rn, r[3 * a + 9] / 10, r[3 * a + 10] / 10, r[3 * a + 11] / 10)) : (d = c.set(En, r[2 * a] / 10, r[2 * a + 1] / 10),
5318
- p = c.set(jn, r[2 * a + 2] / 10, r[2 * a + 3] / 10), m = c.set(Dn, r[2 * a + 4] / 10, r[2 * a + 5] / 10),
5319
- v = c.set(Rn, r[2 * a + 6] / 10, r[2 * a + 7] / 10)), 1 === S) {
5331
+ if (s ? (d = i.set(Dn, r[3 * a] / 10, r[3 * a + 1] / 10, r[3 * a + 2] / 10), p = i.set(Rn, r[3 * a + 3] / 10, r[3 * a + 4] / 10, r[3 * a + 5] / 10),
5332
+ m = i.set(Nn, r[3 * a + 6] / 10, r[3 * a + 7] / 10, r[3 * a + 8] / 10), v = i.set(Ln, r[3 * a + 9] / 10, r[3 * a + 10] / 10, r[3 * a + 11] / 10)) : (d = c.set(Dn, r[2 * a] / 10, r[2 * a + 1] / 10),
5333
+ p = c.set(Rn, r[2 * a + 2] / 10, r[2 * a + 3] / 10), m = c.set(Nn, r[2 * a + 4] / 10, r[2 * a + 5] / 10),
5334
+ v = c.set(Ln, r[2 * a + 6] / 10, r[2 * a + 7] / 10)), 1 === S) {
5320
5335
  const n = X(h.getResolution(), h);
5321
- bn(t, e, d, p, m, v, l, M, u, h, y, g, s, n);
5322
- } else c.multiply(d, d, Ln), c.multiply(p, p, Ln), c.multiply(m, m, Ln), c.multiply(v, v, Ln),
5323
- xn(t, n, d, p, m, v, M, g);
5336
+ wn(t, e, d, p, m, v, l, M, u, h, y, g, s, n);
5337
+ } else c.multiply(d, d, Vn), c.multiply(p, p, Vn), c.multiply(m, m, Vn), c.multiply(v, v, Vn),
5338
+ An(t, n, d, p, m, v, M, g);
5324
5339
  } else {
5325
5340
  const {aShape: i} = f;
5326
- let r = c.set(En, i[2 * a] / 10, i[2 * a + 1] / 10), s = c.set(jn, i[2 * a + 2] / 10, i[2 * a + 3] / 10), d = c.set(Dn, i[2 * a + 4] / 10, i[2 * a + 5] / 10), v = c.set(Rn, i[2 * a + 6] / 10, i[2 * a + 7] / 10);
5327
- 0 === u.flipY && 1 === S && (c.multiply(r, r, Ln), c.multiply(s, s, Ln), c.multiply(d, d, Ln),
5328
- c.multiply(v, v, Ln));
5341
+ let r = c.set(Dn, i[2 * a] / 10, i[2 * a + 1] / 10), s = c.set(Rn, i[2 * a + 2] / 10, i[2 * a + 3] / 10), d = c.set(Nn, i[2 * a + 4] / 10, i[2 * a + 5] / 10), v = c.set(Ln, i[2 * a + 6] / 10, i[2 * a + 7] / 10);
5342
+ 0 === u.flipY && 1 === S && (c.multiply(r, r, Vn), c.multiply(s, s, Vn), c.multiply(d, d, Vn),
5343
+ c.multiply(v, v, Vn));
5329
5344
  let b = A ? -A[a] / 9362 : -(p.textRotation || 0) * Math.PI / 180;
5330
5345
  const x = m ? 0 : h.getBearing() * Math.PI / 180;
5331
5346
  if (b || x) {
5332
- const t = wn(zn, b, x, T, S);
5347
+ const t = kn(jn, b, x, T, S);
5333
5348
  r = c.transformMat2(r, r, t), s = c.transformMat2(s, s, t), d = c.transformMat2(d, d, t),
5334
5349
  v = c.transformMat2(v, v, t);
5335
5350
  }
5336
5351
  const w = o / 24;
5337
- c.scale(r, r, w), c.scale(s, s, w), c.scale(d, d, w), c.scale(v, v, w), 1 === S ? bn(t, e, r, s, d, v, l, M, u, h, y, g) : xn(t, n, r, s, d, v, M, g);
5352
+ c.scale(r, r, w), c.scale(s, s, w), c.scale(d, d, w), c.scale(v, v, w), 1 === S ? wn(t, e, r, s, d, v, l, M, u, h, y, g) : An(t, n, r, s, d, v, M, g);
5338
5353
  }
5339
5354
  return s = s || 0, t[0] -= s + 1, t[1] -= s + 1, t[2] += s + 1, t[3] += s + 1, t;
5340
5355
  }
5341
5356
 
5342
- function Vn(t, e, n) {
5357
+ function qn(t, e, n) {
5343
5358
  const r = e.geometry.desc.positionSize, {aAnchor: o, aAltitude: s} = e.geometry.properties, a = n * r;
5344
5359
  return s ? i.set(t, o[a], o[a + 1], s[n]) : 3 === r ? P.unpackPosition(t, o[a], o[a + 1], o[a + 2]) : i.set(t, o[a], o[a + 1], 0);
5345
5360
  }
5346
5361
 
5347
- const Un = {
5362
+ const Gn = {
5348
5363
  textFill: [ 0, 0, 0, 1 ],
5349
5364
  textOpacity: 1,
5350
5365
  textPitchAlignment: 0,
@@ -5360,61 +5375,61 @@ const Un = {
5360
5375
  textRotation: 0
5361
5376
  };
5362
5377
 
5363
- function qn(t, e, i, r, o, s, a, l, c) {
5378
+ function Wn(t, e, i, r, o, s, a, l, c) {
5364
5379
  const h = [];
5365
5380
  if (e.isDisposed() || 0 === e.data.aPosition.length) return h;
5366
5381
  const u = e.properties.glyphAtlas;
5367
5382
  if (!u) return h;
5368
5383
  if (0 === r.textSize || 0 === r.textOpacity) return h;
5369
- if (we(e, r, s), !e.properties.aAnchor) {
5370
- Gn.call(this, e, a || c, l);
5384
+ if (ke(e, r, s), !e.properties.aAnchor) {
5385
+ Bn.call(this, e, a || c, l);
5371
5386
  const {aTextSize: t, aTextDx: n, aTextDy: i, aPitchAlign: r, aRotationAlign: o, aRotation: s, aOverlap: h, aAltitude: u} = e.data;
5372
5387
  if (t) {
5373
- const n = (be + "aTextSize").trim();
5388
+ const n = (we + "aTextSize").trim();
5374
5389
  e.properties.aTextSize = e.properties[n] || new t.constructor(t);
5375
5390
  }
5376
5391
  if (n) {
5377
- const t = (be + "aTextDx").trim();
5392
+ const t = (we + "aTextDx").trim();
5378
5393
  e.properties.aTextDx = e.properties[t] || new n.constructor(n);
5379
5394
  }
5380
5395
  if (i) {
5381
- const t = (be + "aTextDy").trim();
5396
+ const t = (we + "aTextDy").trim();
5382
5397
  e.properties.aTextDy = e.properties[t] || new i.constructor(i);
5383
5398
  }
5384
5399
  if (r) {
5385
- const t = (be + "aPitchAlign").trim();
5400
+ const t = (we + "aPitchAlign").trim();
5386
5401
  e.properties.aPitchAlign = e.properties[t] || new r.constructor(r);
5387
5402
  }
5388
5403
  if (o) {
5389
- const t = (be + "aRotationAlign").trim();
5404
+ const t = (we + "aRotationAlign").trim();
5390
5405
  e.properties.aRotationAlign = e.properties[t] || new o.constructor(o);
5391
5406
  }
5392
5407
  if (s) {
5393
- const t = (be + "aRotation").trim();
5408
+ const t = (we + "aRotation").trim();
5394
5409
  e.properties.aRotation = e.properties[t] || new s.constructor(s);
5395
5410
  }
5396
5411
  if (h) {
5397
- const t = (be + "aOverlap").trim();
5412
+ const t = (we + "aOverlap").trim();
5398
5413
  e.properties.aOverlap = e.properties[t] || new h.constructor(h);
5399
5414
  }
5400
5415
  if (u) {
5401
- const t = (be + "aAltitude").trim();
5416
+ const t = (we + "aAltitude").trim();
5402
5417
  e.properties.aAltitude = e.properties[t] || new u.constructor(u);
5403
5418
  }
5404
5419
  }
5405
- const d = Ge(t, u, !1), f = {
5420
+ const d = Be(t, u, !1), f = {
5406
5421
  flipY: 0,
5407
5422
  tileResolution: e.properties.tileResolution,
5408
5423
  tileRatio: e.properties.tileRatio,
5409
5424
  texture: d,
5410
5425
  texSize: [ u.width, u.height ]
5411
5426
  };
5412
- Wn(e, f, o);
5427
+ Xn(e, f, o);
5413
5428
  let p = !1;
5414
5429
  o.textOpacity < 1 && (p = !0), e.properties.memorySize = e.getMemorySize(), e.generateBuffers(t, {
5415
5430
  excludeElementsInVAO: !0
5416
5431
  });
5417
- const m = new n.Material(f, Un), y = new n.Mesh(e, m, {
5432
+ const m = new n.Material(f, Gn), y = new n.Mesh(e, m, {
5418
5433
  disableVAO: !0,
5419
5434
  transparent: p,
5420
5435
  castShadow: !1,
@@ -5431,8 +5446,8 @@ function qn(t, e, i, r, o, s, a, l, c) {
5431
5446
  texSize: [ u.width, u.height ],
5432
5447
  isHalo: 0
5433
5448
  };
5434
- Wn(e, t, o);
5435
- const r = new n.Material(t, Un), s = new n.Mesh(e, r, {
5449
+ Xn(e, t, o);
5450
+ const r = new n.Material(t, Gn), s = new n.Mesh(e, r, {
5436
5451
  disableVAO: !0,
5437
5452
  transparent: p,
5438
5453
  castShadow: !1,
@@ -5460,8 +5475,8 @@ function qn(t, e, i, r, o, s, a, l, c) {
5460
5475
  }), h;
5461
5476
  }
5462
5477
 
5463
- function Gn(t, e, n) {
5464
- const i = this.getSymbol(t.properties.symbolIndex), r = "line" === i.textPlacement && !ye(i), {aPosition: o, aShape: s} = t.data, a = o.length / t.desc.positionSize;
5478
+ function Bn(t, e, n) {
5479
+ const i = this.getSymbol(t.properties.symbolIndex), r = "line" === i.textPlacement && !ve(i), {aPosition: o, aShape: s} = t.data, a = o.length / t.desc.positionSize;
5465
5480
  if (t.properties.aPickingId = t.data.aPickingId, t.properties.aCount = t.data.aCount,
5466
5481
  delete t.data.aCount, (e || r) && (t.properties.aAnchor = o, t.properties.aShape = s),
5467
5482
  t.properties.visElemts || (t.properties.elements = t.elements, t.properties.visElemts = new t.elements.constructor(t.elements.length)),
@@ -5484,24 +5499,24 @@ function Gn(t, e, n) {
5484
5499
  t.data.aOpacity.data.fill(255, 0));
5485
5500
  const {aTextHaloRadius: e} = t.data;
5486
5501
  if (e && !t.properties.aTextHaloRadius) {
5487
- const n = (be + "aTextHaloRadius").trim();
5502
+ const n = (we + "aTextHaloRadius").trim();
5488
5503
  t.properties.aTextHaloRadius = t.properties[n] || new e.constructor(e);
5489
5504
  }
5490
5505
  }
5491
5506
  }
5492
5507
 
5493
- function Wn(t, e, n) {
5494
- void 0 === e.isHalo && (e.isHalo = 1), ce(e, "textOpacity", n, "textOpacity", Un.textOpacity),
5495
- ce(e, "textFill", n, "textFill", Un.textFill, de()), ce(e, "textHaloFill", n, "textHaloFill", Un.textHaloFill, de()),
5496
- ce(e, "textHaloBlur", n, "textHaloBlur", Un.textHaloBlur), ce(e, "textHaloRadius", n, "textHaloRadius", Un.textHaloRadius),
5497
- ce(e, "textHaloOpacity", n, "textHaloOpacity", Un.textHaloOpacity), ce(e, "textPerspectiveRatio", n, "textPerspectiveRatio", Un.textPerspectiveRatio, t => "line" === n.textPlacement ? 1 : t),
5498
- ce(e, "rotateWithMap", n, "textRotationAlignment", Un.textRotationAlignment, t => +("map" === t)),
5499
- ce(e, "pitchWithMap", n, "textPitchAlignment", Un.textPitchAlignment, t => +("map" === t)),
5500
- ce(e, "textSize", n, "textSize", Un.textSize), ce(e, "textDx", n, "textDx", Un.textDx),
5501
- ce(e, "textDy", n, "textDy", Un.textDy), ce(e, "textRotation", n, "textRotation", Un.textRotation, t => t * Math.PI / 180);
5508
+ function Xn(t, e, n) {
5509
+ void 0 === e.isHalo && (e.isHalo = 1), ue(e, "textOpacity", n, "textOpacity", Gn.textOpacity),
5510
+ ue(e, "textFill", n, "textFill", Gn.textFill, pe()), ue(e, "textHaloFill", n, "textHaloFill", Gn.textHaloFill, pe()),
5511
+ ue(e, "textHaloBlur", n, "textHaloBlur", Gn.textHaloBlur), ue(e, "textHaloRadius", n, "textHaloRadius", Gn.textHaloRadius),
5512
+ ue(e, "textHaloOpacity", n, "textHaloOpacity", Gn.textHaloOpacity), ue(e, "textPerspectiveRatio", n, "textPerspectiveRatio", Gn.textPerspectiveRatio, t => "line" === n.textPlacement ? 1 : t),
5513
+ ue(e, "rotateWithMap", n, "textRotationAlignment", Gn.textRotationAlignment, t => +("map" === t)),
5514
+ ue(e, "pitchWithMap", n, "textPitchAlignment", Gn.textPitchAlignment, t => +("map" === t)),
5515
+ ue(e, "textSize", n, "textSize", Gn.textSize), ue(e, "textDx", n, "textDx", Gn.textDx),
5516
+ ue(e, "textDy", n, "textDy", Gn.textDy), ue(e, "textRotation", n, "textRotation", Gn.textRotation, t => t * Math.PI / 180);
5502
5517
  }
5503
5518
 
5504
- function Bn(t, e) {
5519
+ function $n(t, e) {
5505
5520
  const n = t.getRenderer().canvas;
5506
5521
  return {
5507
5522
  uniforms: [ {
@@ -5560,7 +5575,7 @@ function Bn(t, e) {
5560
5575
  };
5561
5576
  }
5562
5577
 
5563
- function Xn(t, e) {
5578
+ function Jn(t, e) {
5564
5579
  const n = m(e.textFill), i = m(e.textSize), r = m(e.textHaloFill), o = m(e.textHaloRadius), s = m(e.textHaloOpacity), a = m(e.textDx), l = m(e.textDy), c = m(e.textOpacity), h = y(e.textPitchAlignment), u = y(e.textRotationAlignment), d = m(e.textRotation), f = y(e.textAllowOverlapFn), g = y(e.textIgnorePlacement), v = {}, b = new Int16Array(1), x = new Uint16Array(1);
5565
5580
  return [ {
5566
5581
  attrName: "aTextFill",
@@ -5571,7 +5586,7 @@ function Xn(t, e) {
5571
5586
  evaluate: (e, i) => {
5572
5587
  let r = n(t.getZoom(), e);
5573
5588
  return p(r) && (r = this.evaluateInFnTypeConfig(r, i, t, e, !0)), Array.isArray(r) || (r = v[r] = v[r] || C(r).unitArray()),
5574
- r = ue(r), r;
5589
+ r = fe(r), r;
5575
5590
  }
5576
5591
  }, {
5577
5592
  attrName: "aTextSize",
@@ -5580,7 +5595,7 @@ function Xn(t, e) {
5580
5595
  type: Uint8Array,
5581
5596
  width: 1,
5582
5597
  evaluate: (e, n) => {
5583
- let r = i(t.getZoom(), e) || Un.textSize;
5598
+ let r = i(t.getZoom(), e) || Gn.textSize;
5584
5599
  return p(r) && (r = this.evaluateInFnTypeConfig(r, n, t, e)), b[0] = r, b[0];
5585
5600
  }
5586
5601
  }, {
@@ -5591,7 +5606,7 @@ function Xn(t, e) {
5591
5606
  width: 4,
5592
5607
  evaluate: e => {
5593
5608
  let n = r(t.getZoom(), e);
5594
- return Array.isArray(n) || (n = v[n] = v[n] || C(n).array()), n = ue(n), n;
5609
+ return Array.isArray(n) || (n = v[n] = v[n] || C(n).array()), n = fe(n), n;
5595
5610
  }
5596
5611
  }, {
5597
5612
  attrName: "aTextHaloRadius",
@@ -5664,7 +5679,7 @@ function Xn(t, e) {
5664
5679
  width: 1,
5665
5680
  define: "HAS_ROTATION",
5666
5681
  evaluate: e => {
5667
- const n = se(d(t.getZoom(), e), 0, 360) * Math.PI / 180;
5682
+ const n = le(d(t.getZoom(), e), 0, 360) * Math.PI / 180;
5668
5683
  return x[0] = 9362 * n, x[0];
5669
5684
  }
5670
5685
  }, {
@@ -5688,21 +5703,21 @@ function Xn(t, e) {
5688
5703
  } ];
5689
5704
  }
5690
5705
 
5691
- const $n = [], Jn = [], Yn = [], Zn = [];
5706
+ const Yn = [], Zn = [], Kn = [], Qn = [];
5692
5707
 
5693
- function Kn(t, e, n, i, r, o, s) {
5708
+ function ti(t, e, n, i, r, o, s) {
5694
5709
  t = 1 === t ? 1 : 0;
5695
- const a = this.getMap(), l = e.geometry.properties, c = this.getSymbol(l.symbolIndex), h = "line" === c.textPlacement && !ye(c), {aTextSize: u, aTextHaloRadius: d, aShape: f} = l;
5710
+ const a = this.getMap(), l = e.geometry.properties, c = this.getSymbol(l.symbolIndex), h = "line" === c.textPlacement && !ve(c), {aTextSize: u, aTextHaloRadius: d, aShape: f} = l;
5696
5711
  let p = u ? u[n[r]] : e.properties.textSize;
5697
- null == p && (p = Un.textSize);
5698
- const m = d ? d[n[r]] : e.properties.textHaloRadius, y = Vn(Yn, e, n[r]), g = dn(Zn, y, s, a.width, a.height), v = i, {boxes: b, collision: x} = this.ir(e, r);
5712
+ null == p && (p = Gn.textSize);
5713
+ const m = d ? d[n[r]] : e.properties.textHaloRadius, y = qn(Kn, e, n[r]), g = pn(Qn, y, s, a.width, a.height), v = i, {boxes: b, collision: x} = this.ir(e, r);
5699
5714
  let w = 0;
5700
5715
  if (h || 1 === e.material.uniforms.rotateWithMap || c.textRotation) {
5701
5716
  let i = 0;
5702
5717
  for (let o = r; o < r + 6 * v; o += 6) {
5703
5718
  const r = b[w] = b[w] || [];
5704
5719
  w++;
5705
- const l = Hn.call(this, r, y, g, e, p, m, n[o], s, a);
5720
+ const l = Un.call(this, r, y, g, e, p, m, n[o], s, a);
5706
5721
  if (!t) {
5707
5722
  const e = this.isCollides(l);
5708
5723
  1 === e ? t = 1 : -1 === e && i++;
@@ -5714,7 +5729,7 @@ function Kn(t, e, n, i, r, o, s) {
5714
5729
  for (let c = r; c < o; c += 6) {
5715
5730
  const r = f[2 * n[c] + 1];
5716
5731
  if (l !== r || c === o - 6) {
5717
- const h = n[c === o - 6 ? c : c - 6], u = Hn.call(this, $n, y, g, e, p, m, i, s, a), d = Hn.call(this, Jn, y, g, e, p, m, h, s, a), f = b[w] = b[w] || [];
5732
+ const h = n[c === o - 6 ? c : c - 6], u = Un.call(this, Yn, y, g, e, p, m, i, s, a), d = Un.call(this, Zn, y, g, e, p, m, h, s, a), f = b[w] = b[w] || [];
5718
5733
  w++, f[0] = Math.min(u[0], d[0]), f[1] = Math.min(u[1], d[1]), f[2] = Math.max(u[2], d[2]),
5719
5734
  f[3] = Math.max(u[3], d[3]), i = n[c], l = r, !t && this.isCollides(f) && (t = 1);
5720
5735
  }
@@ -5723,67 +5738,67 @@ function Kn(t, e, n, i, r, o, s) {
5723
5738
  return x.collides = t, x;
5724
5739
  }
5725
5740
 
5726
- function Qn(t, e) {
5741
+ function ei(t, e) {
5727
5742
  const n = function(t, e) {
5728
5743
  const {aPickingId: n, features: i} = t.geometry.properties, r = n[e];
5729
5744
  return (i && i[r] && i[r].feature).label;
5730
5745
  }(t, e);
5731
5746
  return n ? function(t, e, n) {
5732
5747
  if (!n) return null;
5733
- const i = t.localTransform, r = Vn(ti, t, e);
5734
- a.set(ei, r[0], r[1], r[2], 1);
5735
- const o = a.transformMat4(ei, ei, i);
5748
+ const i = t.localTransform, r = qn(ni, t, e);
5749
+ a.set(ii, r[0], r[1], r[2], 1);
5750
+ const o = a.transformMat4(ii, ii, i);
5736
5751
  let s = 0;
5737
5752
  for (let t = 0; t < n.length; t++) s += n.charCodeAt(t);
5738
5753
  return [ Math.floor(o[0]), Math.floor(o[1]), Math.floor(o[2]), s ];
5739
5754
  }(t, e, n) : null;
5740
5755
  }
5741
5756
 
5742
- const ti = [], ei = [];
5757
+ const ni = [], ii = [];
5743
5758
 
5744
- var ni = "#define SHADER_NAME TEXT\n#define RAD 0.0174532925\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec2 aShape;\nattribute vec2 aTexCoord;\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute float aColorOpacity;\n#endif\n#ifdef HAS_TEXT_SIZE\nattribute float aTextSize;\n#else\nuniform float textSize;\n#endif\n#ifdef HAS_TEXT_DX\nattribute float aTextDx;\n#else\nuniform float textDx;\n#endif\n#ifdef HAS_TEXT_DY\nattribute float aTextDy;\n#else\nuniform float textDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nattribute float aPitchAlign;\n#else\nuniform float pitchWithMap;\n#endif\n#if defined(HAS_ROTATION_ALIGN)\nattribute float aRotationAlign;\n#else\nuniform float rotateWithMap;\n#endif\nuniform float flipY;\n#if defined(HAS_ROTATION)\nattribute float aRotation;\n#else\nuniform float textRotation;\n#endif\nuniform float cameraToCenterDistance;\nuniform mat4 projViewModelMatrix;\nuniform float textPerspectiveRatio;\nuniform vec2 texSize;\nuniform vec2 canvasSize;\nuniform float glyphSize;\nuniform float mapPitch;\nuniform float mapRotation;\nuniform float zoomScale;\nuniform float tileRatio;\nuniform float layerScale;\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vGammaScale;\nvarying float vSize;\nvarying float vOpacity;\n#ifdef HAS_TEXT_FILL\nattribute vec4 aTextFill;\nvarying vec4 vTextFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nattribute vec4 aTextHaloFill;\nvarying vec4 vTextHaloFill;\n#endif\n#ifdef HAS_TEXT_HALO_RADIUS\nattribute float aTextHaloRadius;\nvarying float vTextHaloRadius;\n#endif\n#ifdef HAS_TEXT_HALO_OPACITY\nattribute float aTextHaloOpacity;\nvarying float vTextHaloOpacity;\n#endif\n#else\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_TEXT_SIZE\nfloat d = aTextSize * layerScale;\n#else\nfloat d = textSize * layerScale;\n#endif\n#ifdef HAS_TEXT_DX\nfloat e = aTextDx;\n#else\nfloat e = textDx;\n#endif\n#ifdef HAS_TEXT_DY\nfloat f = aTextDy;\n#else\nfloat f = textDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nfloat h = aPitchAlign;\n#else\nfloat h = pitchWithMap;\n#endif\n#if defined(HAS_ROTATION_ALIGN)\nfloat i = aRotationAlign;\n#else\nfloat i = rotateWithMap;\n#endif\nvec2 j = aShape / 10.0;\n if(h == 1. && flipY == .0) {\n j = j * vec2(1., -1.);\n }\n vec2 k = aTexCoord;\n gl_Position = projViewModelMatrix * vec4(c, 1.);\n float l = gl_Position.w;\n float m = (1. - cameraToCenterDistance / l) * textPerspectiveRatio;\n float n = clamp(.5 + .5 * (1. - m), .0, 4.);\n#ifdef HAS_ROTATION\nfloat o = aRotation / 9362. - mapRotation * i;\n#else\nfloat o = textRotation - mapRotation * i;\n#endif\nif(h == 1.) {\n \n#ifdef REVERSE_MAP_ROTATION_ON_PITCH\no += mapRotation;\n#else\no -= mapRotation;\n#endif\n }\n float u = sin(o);\n float v = cos(o);\n mat2 A = mat2(v, -1. * u, u, v);\n j = A * (j / glyphSize * d);\n float B = l / cameraToCenterDistance;\n if(h == .0) {\n vec2 C = j * 2. / canvasSize;\n gl_Position.xy += C * n * l;\n } else {\n vec2 C = j;\n gl_Position = projViewModelMatrix * vec4(c + vec3(C, .0) * tileRatio / zoomScale * B * n, 1.);\n }\n gl_Position.xy += vec2(e, -f) * 2. / canvasSize * l;\n#ifndef PICKING_MODE\nif(h == .0) {\n vGammaScale = mix(1., B, textPerspectiveRatio);\n } else {\n vGammaScale = B + mapPitch / 4.;\n }\n vTexCoord = k / texSize;\n vGammaScale = clamp(vGammaScale, .0, 1.);\n vSize = d;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nvOpacity *= aColorOpacity / 255.;\n#endif\n#ifdef HAS_TEXT_FILL\nvTextFill = aTextFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvTextHaloFill = aTextHaloFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_RADIUS\nvTextHaloRadius = aTextHaloRadius;\n#endif\n#ifdef HAS_TEXT_HALO_OPACITY\nvTextHaloOpacity = aTextHaloOpacity;\n#endif\n#else\n#ifdef ENABLE_COLLISION\nbool D = aOpacity == 255.;\n#else\nbool D = true;\n#endif\nfbo_picking_setData(gl_Position.w, D);\n#endif\n}", ii = "#define SHADER_NAME TEXT\n#define SDF_PX 8.0\n#define DEVICE_PIXEL_RATIO 1.0\n#define EDGE_GAMMA 0.105 / DEVICE_PIXEL_RATIO\nprecision mediump float;\nuniform sampler2D texture;\nuniform float textOpacity;\nuniform highp float gammaScale;\nuniform int isHalo;\nuniform highp float textHaloBlur;\n#ifdef HAS_TEXT_HALO_OPACITY\nvarying float vTextHaloOpacity;\n#else\nuniform float textHaloOpacity;\n#endif\nvarying vec2 vTexCoord;\nvarying float vSize;\nvarying float vGammaScale;\nvarying float vOpacity;\n#ifdef HAS_TEXT_FILL\nvarying vec4 vTextFill;\n#else\nuniform vec4 textFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvarying vec4 vTextHaloFill;\n#else\nuniform vec4 textHaloFill;\n#endif\n#ifdef HAS_TEXT_HALO_RADIUS\nvarying float vTextHaloRadius;\n#else\nuniform highp float textHaloRadius;\n#endif\nvoid main() {\n \n#ifdef HAS_TEXT_FILL\nvec4 c = vTextFill;\n#else\nvec4 c = textFill;\n#endif\nfloat d = vSize / 24.;\n lowp vec4 e = c;\n highp float f = EDGE_GAMMA / (d * gammaScale);\n lowp float h = 185. / 256.;\n if(isHalo == 1) {\n \n#ifdef HAS_TEXT_HALO_FILL\nvec4 i = vTextHaloFill;\n#else\nvec4 i = textHaloFill;\n#endif\n#ifdef HAS_TEXT_HALO_RADIUS\nfloat j = vTextHaloRadius;\n#else\nfloat j = textHaloRadius;\n#endif\ne = i;\n f = (textHaloBlur * 1.19 / SDF_PX + EDGE_GAMMA) / (d * gammaScale);\n h = (6. - j / d) / SDF_PX;\n#ifdef HAS_TEXT_HALO_OPACITY\nfloat k = vTextHaloOpacity / 255.;\n#else\nfloat k = textHaloOpacity;\n#endif\ne *= k * 1.25;\n }\n float l = texture2D(texture, vTexCoord).a;\n highp float m = f * vGammaScale * .7;\n float n = clamp(smoothstep(h - m, h + m, l), .0, 1.);\n gl_FragColor = e * (n * textOpacity * vOpacity);\n}";
5759
+ var ri = "#define SHADER_NAME TEXT\n#define RAD 0.0174532925\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec2 aShape;\nattribute vec2 aTexCoord;\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute float aColorOpacity;\n#endif\n#ifdef HAS_TEXT_SIZE\nattribute float aTextSize;\n#else\nuniform float textSize;\n#endif\n#ifdef HAS_TEXT_DX\nattribute float aTextDx;\n#else\nuniform float textDx;\n#endif\n#ifdef HAS_TEXT_DY\nattribute float aTextDy;\n#else\nuniform float textDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nattribute float aPitchAlign;\n#else\nuniform float pitchWithMap;\n#endif\n#if defined(HAS_ROTATION_ALIGN)\nattribute float aRotationAlign;\n#else\nuniform float rotateWithMap;\n#endif\nuniform float flipY;\n#if defined(HAS_ROTATION)\nattribute float aRotation;\n#else\nuniform float textRotation;\n#endif\nuniform float cameraToCenterDistance;\nuniform mat4 projViewModelMatrix;\nuniform float textPerspectiveRatio;\nuniform vec2 texSize;\nuniform vec2 canvasSize;\nuniform float glyphSize;\nuniform float mapPitch;\nuniform float mapRotation;\nuniform float zoomScale;\nuniform float tileRatio;\nuniform float layerScale;\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vGammaScale;\nvarying float vSize;\nvarying float vOpacity;\n#ifdef HAS_TEXT_FILL\nattribute vec4 aTextFill;\nvarying vec4 vTextFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nattribute vec4 aTextHaloFill;\nvarying vec4 vTextHaloFill;\n#endif\n#ifdef HAS_TEXT_HALO_RADIUS\nattribute float aTextHaloRadius;\nvarying float vTextHaloRadius;\n#endif\n#ifdef HAS_TEXT_HALO_OPACITY\nattribute float aTextHaloOpacity;\nvarying float vTextHaloOpacity;\n#endif\n#else\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_TEXT_SIZE\nfloat d = aTextSize * layerScale;\n#else\nfloat d = textSize * layerScale;\n#endif\n#ifdef HAS_TEXT_DX\nfloat e = aTextDx;\n#else\nfloat e = textDx;\n#endif\n#ifdef HAS_TEXT_DY\nfloat f = aTextDy;\n#else\nfloat f = textDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nfloat h = aPitchAlign;\n#else\nfloat h = pitchWithMap;\n#endif\n#if defined(HAS_ROTATION_ALIGN)\nfloat i = aRotationAlign;\n#else\nfloat i = rotateWithMap;\n#endif\nvec2 j = aShape / 10.0;\n if(h == 1. && flipY == .0) {\n j = j * vec2(1., -1.);\n }\n vec2 k = aTexCoord;\n gl_Position = projViewModelMatrix * vec4(c, 1.);\n float l = gl_Position.w;\n float m = (1. - cameraToCenterDistance / l) * textPerspectiveRatio;\n float n = clamp(.5 + .5 * (1. - m), .0, 4.);\n#ifdef HAS_ROTATION\nfloat o = aRotation / 9362. - mapRotation * i;\n#else\nfloat o = textRotation - mapRotation * i;\n#endif\nif(h == 1.) {\n \n#ifdef REVERSE_MAP_ROTATION_ON_PITCH\no += mapRotation;\n#else\no -= mapRotation;\n#endif\n }\n float u = sin(o);\n float v = cos(o);\n mat2 A = mat2(v, -1. * u, u, v);\n j = A * (j / glyphSize * d);\n float B = l / cameraToCenterDistance;\n if(h == .0) {\n vec2 C = j * 2. / canvasSize;\n gl_Position.xy += C * n * l;\n } else {\n vec2 C = j;\n gl_Position = projViewModelMatrix * vec4(c + vec3(C, .0) * tileRatio / zoomScale * B * n, 1.);\n }\n gl_Position.xy += vec2(e, -f) * 2. / canvasSize * l;\n#ifndef PICKING_MODE\nif(h == .0) {\n vGammaScale = mix(1., B, textPerspectiveRatio);\n } else {\n vGammaScale = B + mapPitch / 4.;\n }\n vTexCoord = k / texSize;\n vGammaScale = clamp(vGammaScale, .0, 1.);\n vSize = d;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nvOpacity *= aColorOpacity / 255.;\n#endif\n#ifdef HAS_TEXT_FILL\nvTextFill = aTextFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvTextHaloFill = aTextHaloFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_RADIUS\nvTextHaloRadius = aTextHaloRadius;\n#endif\n#ifdef HAS_TEXT_HALO_OPACITY\nvTextHaloOpacity = aTextHaloOpacity;\n#endif\n#else\n#ifdef ENABLE_COLLISION\nbool D = aOpacity == 255.;\n#else\nbool D = true;\n#endif\nfbo_picking_setData(gl_Position.w, D);\n#endif\n}", oi = "#define SHADER_NAME TEXT\n#define SDF_PX 8.0\n#define DEVICE_PIXEL_RATIO 1.0\n#define EDGE_GAMMA 0.105 / DEVICE_PIXEL_RATIO\nprecision mediump float;\nuniform sampler2D texture;\nuniform float textOpacity;\nuniform highp float gammaScale;\nuniform int isHalo;\nuniform highp float textHaloBlur;\n#ifdef HAS_TEXT_HALO_OPACITY\nvarying float vTextHaloOpacity;\n#else\nuniform float textHaloOpacity;\n#endif\nvarying vec2 vTexCoord;\nvarying float vSize;\nvarying float vGammaScale;\nvarying float vOpacity;\n#ifdef HAS_TEXT_FILL\nvarying vec4 vTextFill;\n#else\nuniform vec4 textFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvarying vec4 vTextHaloFill;\n#else\nuniform vec4 textHaloFill;\n#endif\n#ifdef HAS_TEXT_HALO_RADIUS\nvarying float vTextHaloRadius;\n#else\nuniform highp float textHaloRadius;\n#endif\nvoid main() {\n \n#ifdef HAS_TEXT_FILL\nvec4 c = vTextFill;\n#else\nvec4 c = textFill;\n#endif\nfloat d = vSize / 24.;\n lowp vec4 e = c;\n highp float f = EDGE_GAMMA / (d * gammaScale);\n lowp float h = 185. / 256.;\n if(isHalo == 1) {\n \n#ifdef HAS_TEXT_HALO_FILL\nvec4 i = vTextHaloFill;\n#else\nvec4 i = textHaloFill;\n#endif\n#ifdef HAS_TEXT_HALO_RADIUS\nfloat j = vTextHaloRadius;\n#else\nfloat j = textHaloRadius;\n#endif\ne = i;\n f = (textHaloBlur * 1.19 / SDF_PX + EDGE_GAMMA) / (d * gammaScale);\n h = (6. - j / d) / SDF_PX;\n#ifdef HAS_TEXT_HALO_OPACITY\nfloat k = vTextHaloOpacity / 255.;\n#else\nfloat k = textHaloOpacity;\n#endif\ne *= k * 1.25;\n }\n float l = texture2D(texture, vTexCoord).a;\n highp float m = f * vGammaScale * .7;\n float n = clamp(smoothstep(h - m, h + m, l), .0, 1.);\n gl_FragColor = e * (n * textOpacity * vOpacity);\n}";
5745
5760
 
5746
- const ri = new Uint16Array(1), oi = new Int8Array(1);
5761
+ const si = new Uint16Array(1), ai = new Int8Array(1);
5747
5762
 
5748
- function si(t, e, n) {
5749
- we(t, e, n), function(t) {
5763
+ function li(t, e, n) {
5764
+ ke(t, e, n), function(t) {
5750
5765
  const {aMarkerWidth: e, aMarkerHeight: n, aMarkerDx: i, aMarkerDy: r, aPitchAlign: o, aRotationAlign: s, aRotation: a, aOverlap: l} = t.data;
5751
5766
  if (e) {
5752
- const n = (be + "aMarkerWidth").trim();
5767
+ const n = (we + "aMarkerWidth").trim();
5753
5768
  t.properties.aMarkerWidth = t.properties[n] || new e.constructor(e);
5754
5769
  }
5755
5770
  if (n) {
5756
- const e = (be + "aMarkerHeight").trim();
5771
+ const e = (we + "aMarkerHeight").trim();
5757
5772
  t.properties.aMarkerHeight = t.properties[e] || new n.constructor(n);
5758
5773
  }
5759
5774
  if (i) {
5760
- const e = (be + "aMarkerDx").trim();
5775
+ const e = (we + "aMarkerDx").trim();
5761
5776
  t.properties.aMarkerDx = t.properties[e] || new i.constructor(i);
5762
5777
  }
5763
5778
  if (r) {
5764
- const e = (be + "aMarkerDy").trim();
5779
+ const e = (we + "aMarkerDy").trim();
5765
5780
  t.properties.aMarkerDy = t.properties[e] || new r.constructor(r);
5766
5781
  }
5767
5782
  if (o) {
5768
- const e = (be + "aPitchAlign").trim();
5783
+ const e = (we + "aPitchAlign").trim();
5769
5784
  t.properties.aPitchAlign = t.properties[e] || new o.constructor(o);
5770
5785
  }
5771
5786
  if (s) {
5772
- const e = (be + "aRotationAlign").trim();
5787
+ const e = (we + "aRotationAlign").trim();
5773
5788
  t.properties.aRotationAlign = t.properties[e] || new s.constructor(s);
5774
5789
  }
5775
5790
  if (a) {
5776
- const e = (be + "aRotation").trim();
5791
+ const e = (we + "aRotation").trim();
5777
5792
  t.properties.aRotation = t.properties[e] || new a.constructor(a);
5778
5793
  }
5779
5794
  if (l) {
5780
- const e = (be + "aOverlap").trim();
5795
+ const e = (we + "aOverlap").trim();
5781
5796
  t.properties.aOverlap = t.properties[e] || new l.constructor(l);
5782
5797
  }
5783
5798
  }(t);
5784
5799
  }
5785
5800
 
5786
- function ai(t, e) {
5801
+ function ci(t, e) {
5787
5802
  const n = m(e.markerWidth), i = m(e.markerHeight), r = m(e.markerDx), o = m(e.markerDy), s = m(e.markerOpacity), a = m(e.markerTextFit), l = y(e.markerPitchAlignment), c = y(e.markerRotationAlignment), h = m(e.markerRotation), u = y(e.markerAllowOverlapFn), d = y(e.markerIgnorePlacement), f = new Int16Array(1), g = new Uint16Array(1);
5788
5803
  return [ {
5789
5804
  attrName: "aMarkerWidth",
@@ -5860,7 +5875,7 @@ function ai(t, e) {
5860
5875
  width: 1,
5861
5876
  define: "HAS_ROTATION",
5862
5877
  evaluate: e => {
5863
- const n = se(h(t.getZoom(), e), 0, 360) * Math.PI / 180;
5878
+ const n = le(h(t.getZoom(), e), 0, 360) * Math.PI / 180;
5864
5879
  return g[0] = 9362 * n, g[0];
5865
5880
  }
5866
5881
  }, {
@@ -5884,7 +5899,7 @@ function ai(t, e) {
5884
5899
  } ];
5885
5900
  }
5886
5901
 
5887
- function li(t, e, n, i) {
5902
+ function hi(t, e, n, i) {
5888
5903
  if (!n || !i || "none" === i) return;
5889
5904
  const r = function(t, e, n) {
5890
5905
  let i = t.properties.textFitFn;
@@ -5956,11 +5971,11 @@ function li(t, e, n, i) {
5956
5971
  if (!o) return [];
5957
5972
  return n;
5958
5973
  }(e, n);
5959
- i.length && (e.properties.labelShape = i, ci.call(this, t, e, n));
5974
+ i.length && (e.properties.labelShape = i, ui.call(this, t, e, n));
5960
5975
  }
5961
5976
  }
5962
5977
 
5963
- function ci(t, e) {
5978
+ function ui(t, e) {
5964
5979
  const n = this.getSymbolDef(e.properties.symbolIndex), i = n.markerTextFit, r = e.properties;
5965
5980
  let o = "both" === i || "width" === i, s = "both" === i || "height" === i;
5966
5981
  if (p(n.markerTextFit)) {
@@ -5986,7 +6001,7 @@ function ci(t, e) {
5986
6001
  if (o) if (a) {
5987
6002
  const t = e.data.aMarkerWidth;
5988
6003
  e.data.aMarkerWidth = new Uint16Array(t), r.aMarkerWidth = new Uint16Array(t);
5989
- const n = (be + "aMarkerWidth").trim();
6004
+ const n = (we + "aMarkerWidth").trim();
5990
6005
  r[n] && (r[n] = r.aMarkerWidth);
5991
6006
  } else {
5992
6007
  const t = this.getSymbol(e.properties.symbolIndex).markerWidth || 0;
@@ -5996,7 +6011,7 @@ function ci(t, e) {
5996
6011
  if (s) if (l) {
5997
6012
  const t = e.data.aMarkerHeight;
5998
6013
  e.data.aMarkerHeight = new Uint16Array(t), r.aMarkerHeight = new Uint16Array(t);
5999
- const n = (be + "aMarkerHeight").trim();
6014
+ const n = (we + "aMarkerHeight").trim();
6000
6015
  r[n] && (r[n] = r.aMarkerHeight);
6001
6016
  } else {
6002
6017
  const t = this.getSymbol(e.properties.symbolIndex).markerHeight || 0;
@@ -6004,10 +6019,10 @@ function ci(t, e) {
6004
6019
  e.data.aMarkerHeight = new Uint16Array(h);
6005
6020
  }
6006
6021
  const u = this.getSymbolDef(e.properties.textGeo.properties.symbolIndex), d = m(u.textSize);
6007
- hi.call(this, t, e), (!p(u.textSize) || d.isZoomConstant && d.isFeatureConstant) && (r.isFitConstant = !0);
6022
+ di.call(this, t, e), (!p(u.textSize) || d.isZoomConstant && d.isFeatureConstant) && (r.isFitConstant = !0);
6008
6023
  }
6009
6024
 
6010
- function hi(t, e) {
6025
+ function di(t, e) {
6011
6026
  const n = e.properties.textGeo;
6012
6027
  if (!n) return;
6013
6028
  const i = n.properties, r = e.properties;
@@ -6036,16 +6051,16 @@ function hi(t, e) {
6036
6051
  M = r.aPadOffsetY = new Int8Array(g.length))), delete _.$layer, delete _.$type,
6037
6052
  g && n) {
6038
6053
  const e = Math.abs((d - o) / 10 * S) + (P[1] + P[3] || 0);
6039
- if (ri[0] = e, g[t] !== ri[0] && (pe(g, ri[0], t, t + 4), g.dirty = !0), T) {
6054
+ if (si[0] = e, g[t] !== si[0] && (ye(g, si[0], t, t + 4), g.dirty = !0), T) {
6040
6055
  const e = (P[1] + P[3]) / 2 - P[3];
6041
- oi[0] = e, T[t] !== oi[0] && (pe(T, e, t, t + 4), T.dirty = !0);
6056
+ ai[0] = e, T[t] !== ai[0] && (ye(T, e, t, t + 4), T.dirty = !0);
6042
6057
  }
6043
6058
  }
6044
6059
  if (v && i) {
6045
6060
  const e = Math.abs((f - u) / 10 * S) + (P[0] + P[2] || 0);
6046
- if (ri[0] = e, v[t] !== ri[0] && (pe(v, ri[0], t, t + 4), v.dirty = !0), M) {
6061
+ if (si[0] = e, v[t] !== si[0] && (ye(v, si[0], t, t + 4), v.dirty = !0), M) {
6047
6062
  const e = P[0] - (P[0] + P[2]) / 2;
6048
- oi[0] = e, M[t] !== oi[0] && (pe(M, e, t, t + 4), M.dirty = !0);
6063
+ ai[0] = e, M[t] !== ai[0] && (ye(M, e, t, t + 4), M.dirty = !0);
6049
6064
  }
6050
6065
  }
6051
6066
  };
@@ -6071,35 +6086,35 @@ function hi(t, e) {
6071
6086
  _ && (e.data.aPadOffsetX = _, e.data.aPadOffsetY = S);
6072
6087
  }
6073
6088
 
6074
- const ui = function(t) {
6089
+ const fi = function(t) {
6075
6090
  const e = this.layer.getRenderer();
6076
6091
  return !this.sr(t) && e.isForeground(t) && !!t.geometry.properties.iconAtlas && !t.geometry.properties.isEmpty;
6077
- }, di = function(t) {
6092
+ }, pi = function(t) {
6078
6093
  const e = this.layer.getRenderer();
6079
6094
  return !(this.sr(t) || e.isForeground(t) || !t.geometry.properties.iconAtlas || t.geometry.properties.isEmpty);
6080
- }, fi = function(t) {
6095
+ }, mi = function(t) {
6081
6096
  const e = this.layer.getRenderer();
6082
6097
  return !this.sr(t) && e.isForeground(t) && !!t.geometry.properties.glyphAtlas;
6083
- }, pi = function(t) {
6098
+ }, yi = function(t) {
6084
6099
  const e = this.layer.getRenderer();
6085
6100
  return !this.sr(t) && !e.isForeground(t) && !!t.geometry.properties.glyphAtlas;
6086
- }, mi = [], yi = {
6101
+ }, gi = [], vi = {
6087
6102
  colliides: -1
6088
6103
  };
6089
6104
 
6090
- class gi extends an {
6105
+ class bi extends cn {
6091
6106
  constructor(t, e, n, i, r) {
6092
6107
  super(t, e, n, i, r), this.propAllowOverlap = "markerAllowOverlap", this.propIgnorePlacement = "markerIgnorePlacement",
6093
- this.Un = {}, this.isLabelCollides = Kn.bind(this), this.cr = ui.bind(this), this.hr = di.bind(this),
6094
- this.ur = fi.bind(this), this.dr = pi.bind(this), this.pr = [];
6108
+ this.Un = {}, this.isLabelCollides = ti.bind(this), this.cr = fi.bind(this), this.hr = pi.bind(this),
6109
+ this.ur = mi.bind(this), this.dr = yi.bind(this), this.pr = [];
6095
6110
  }
6096
6111
  setTextShaderDefines(t) {
6097
6112
  this.mr = t;
6098
6113
  }
6099
6114
  createFnTypeConfig(t, e) {
6100
6115
  return {
6101
- icon: ai.call(this, t, e),
6102
- text: Xn.call(this, t, e)
6116
+ icon: ci.call(this, t, e),
6117
+ text: Jn.call(this, t, e)
6103
6118
  };
6104
6119
  }
6105
6120
  startFrame(...t) {
@@ -6114,13 +6129,13 @@ class gi extends an {
6114
6129
  postCreateGeometry(t, e) {
6115
6130
  const {geometry: n, symbolIndex: i} = t, r = this.getSymbolDef(i), o = this.getFnTypeConfig(i);
6116
6131
  if (this.yr(n)) n.properties.iconAtlas ? this.drawDebugAtlas(n.properties.iconAtlas) : n.properties.isEmpty = !0,
6117
- si(n, r, o.icon); else if (this.gr(n) && ye(r)) {
6132
+ li(n, r, o.icon); else if (this.gr(n) && ve(r)) {
6118
6133
  const t = e[e.length - 1];
6119
6134
  if (t) {
6120
6135
  const {geometry: e, symbolIndex: o} = t;
6121
6136
  if (e && o.index === i.index) {
6122
6137
  const t = this.getMap(), i = r.markerTextFit;
6123
- e.properties.textGeo = n, li.call(this, t, e, n, i);
6138
+ e.properties.textGeo = n, hi.call(this, t, e, n, i);
6124
6139
  }
6125
6140
  }
6126
6141
  }
@@ -6159,11 +6174,11 @@ class gi extends an {
6159
6174
  e.properties.aAnchor = t, e.properties.aShape = n;
6160
6175
  }
6161
6176
  e.properties.visElemts || (e.properties.elements = e.elements, e.properties.visElemts = new e.elements.constructor(e.elements.length)),
6162
- ce(u, "markerOpacity", o, "markerOpacity", 1), ce(u, "markerPerspectiveRatio", o, "markerPerspectiveRatio", o.markerTextFit ? 0 : 1),
6163
- ce(u, "markerWidth", o, "markerWidth", 15), ce(u, "markerHeight", o, "markerHeight", 15),
6164
- ce(u, "markerDx", o, "markerDx", 0), ce(u, "markerDy", o, "markerDy", 0), ce(u, "markerRotation", o, "markerRotation", 0, t => t * Math.PI / 180),
6165
- ce(u, "pitchWithMap", o, "markerPitchAlignment", 0, t => "map" === t ? 1 : 0), ce(u, "rotateWithMap", o, "markerRotationAlignment", 0, t => "map" === t ? 1 : 0),
6166
- u.iconTex = h ? Ge(t, h, !1) : null, u.texSize = h ? [ h.width, h.height ] : [ 0, 0 ],
6177
+ ue(u, "markerOpacity", o, "markerOpacity", 1), ue(u, "markerPerspectiveRatio", o, "markerPerspectiveRatio", o.markerTextFit ? 0 : 1),
6178
+ ue(u, "markerWidth", o, "markerWidth", 15), ue(u, "markerHeight", o, "markerHeight", 15),
6179
+ ue(u, "markerDx", o, "markerDx", 0), ue(u, "markerDy", o, "markerDy", 0), ue(u, "markerRotation", o, "markerRotation", 0, t => t * Math.PI / 180),
6180
+ ue(u, "pitchWithMap", o, "markerPitchAlignment", 0, t => "map" === t ? 1 : 0), ue(u, "rotateWithMap", o, "markerRotationAlignment", 0, t => "map" === t ? 1 : 0),
6181
+ u.iconTex = h ? Be(t, h, !1) : null, u.texSize = h ? [ h.width, h.height ] : [ 0, 0 ],
6167
6182
  e.generateBuffers(t, {
6168
6183
  excludeElementsInVAO: !0
6169
6184
  });
@@ -6183,7 +6198,7 @@ class gi extends an {
6183
6198
  }(this.regl, a, e, 0, h, u.icon, s.options.collision, !o, this.isEnableUniquePlacement());
6184
6199
  t && (delete t.geometry.properties.glyphAtlas, d.push(t));
6185
6200
  } else if (this.gr(a)) {
6186
- const t = qn.call(this, this.regl, a, e, c, h, u.text, s.options.collision, !o, this.isEnableUniquePlacement());
6201
+ const t = Wn.call(this, this.regl, a, e, c, h, u.text, s.options.collision, !o, this.isEnableUniquePlacement());
6187
6202
  t.length && (t.forEach(t => {
6188
6203
  delete t.geometry.properties.iconAtlas;
6189
6204
  }), d.push(...t));
@@ -6196,7 +6211,7 @@ class gi extends an {
6196
6211
  if (this.yr(t)) {
6197
6212
  let r = 0;
6198
6213
  for (let t = 0; t < n.length; t += 4) i.fill(r++, t, t + 4);
6199
- t.properties.collideIds = i, t.properties.uniqueCollideIds = ve(i), e.markerCollideMap = {
6214
+ t.properties.collideIds = i, t.properties.uniqueCollideIds = xe(i), e.markerCollideMap = {
6200
6215
  old: n,
6201
6216
  new: i
6202
6217
  };
@@ -6212,33 +6227,33 @@ class gi extends an {
6212
6227
  const h = -1 === l ? ++o : e.markerCollideMap.new[l + 4 * s], u = t + 4 * c;
6213
6228
  n.fill(h, t, u), t += 4 * c, s++, u < n.length && (c = i[u]);
6214
6229
  }
6215
- t.properties.uniqueCollideIds = ve(n);
6230
+ t.properties.uniqueCollideIds = xe(n);
6216
6231
  } else {
6217
6232
  let e = 0, r = i[0];
6218
6233
  for (let t = 0; t < n.length; ) {
6219
6234
  const o = t + 4 * r;
6220
6235
  n.fill(e++, t, o), t += 4 * r, o < n.length && (r = i[o]);
6221
6236
  }
6222
- t.properties.uniqueCollideIds = ve(n);
6237
+ t.properties.uniqueCollideIds = xe(n);
6223
6238
  }
6224
6239
  }
6225
6240
  }
6226
6241
  addMesh(t) {
6227
6242
  if (this.Ui() && t.length > 0) {
6228
- const e = new Qe(t);
6243
+ const e = new en(t);
6229
6244
  e.properties.uniqueCollideIds = t[0].geometry.properties.uniqueCollideIds, e.properties.meshKey = t[0].properties.meshKey,
6230
6245
  e.properties.level = t[0].properties.level, this.pr.push(e);
6231
6246
  }
6232
6247
  for (let e = 0; e < t.length; e++) {
6233
6248
  if (!this.isMeshIterable(t[e])) continue;
6234
6249
  const n = t[e].geometry, {symbolIndex: i} = n.properties;
6235
- ye(this.getSymbolDef(i)) && hi.call(this, this.getMap(), n);
6250
+ ve(this.getSymbolDef(i)) && di.call(this, this.getMap(), n);
6236
6251
  }
6237
6252
  const e = this.getMap().getZoom();
6238
6253
  for (let n = 0; n < t.length; n++) {
6239
6254
  if (!this.isMeshIterable(t[n])) continue;
6240
6255
  const i = t[n].geometry, {symbolIndex: r} = i.properties, o = this.getSymbolDef(r), s = this.getFnTypeConfig(r);
6241
- Se(this.regl, o, 0 === r.type ? s.icon : s.text, t[n], e);
6256
+ Me(this.regl, o, 0 === r.type ? s.icon : s.text, t[n], e);
6242
6257
  const {aMarkerWidth: a, aMarkerHeight: l, aPadOffsetX: c, aPadOffsetY: h} = i.properties;
6243
6258
  a && a.dirty && (i.updateData("aMarkerWidth", a), a.dirty = !1), l && l.dirty && (i.updateData("aMarkerHeight", l),
6244
6259
  l.dirty = !1), c && c.dirty && (i.updateData("aPadOffsetX", c), c.dirty = !1), h && h.dirty && (i.updateData("aPadOffsetY", h),
@@ -6276,7 +6291,7 @@ class gi extends an {
6276
6291
  }
6277
6292
  Ar(t) {
6278
6293
  const e = this.layer.getRenderer();
6279
- t = t.sort(vi);
6294
+ t = t.sort(xi);
6280
6295
  for (let n = 0; n < t.length; n++) {
6281
6296
  const i = t[n];
6282
6297
  if (!i || !i.meshes.length) continue;
@@ -6309,7 +6324,7 @@ class gi extends an {
6309
6324
  Mr(t, e, n, i) {
6310
6325
  const o = this.getMap(), {collideBoxIndex: s} = t.meshes[0].geometry.properties;
6311
6326
  if (!(s && s[e])) return !1;
6312
- const a = r.multiply(mi, o.projViewMatrix, t.meshes[0].localTransform);
6327
+ const a = r.multiply(gi, o.projViewMatrix, t.meshes[0].localTransform);
6313
6328
  let l, c = !1;
6314
6329
  const h = t.meshes;
6315
6330
  let u = 0;
@@ -6369,14 +6384,14 @@ class gi extends an {
6369
6384
  }
6370
6385
  }
6371
6386
  isBoxCollides(t, e, n, i, r, o) {
6372
- if (this.gr(t.geometry)) return Kn.call(this, 0, t, e, n, i, r, o);
6373
- if (t.geometry.properties.isEmpty) return yi;
6387
+ if (this.gr(t.geometry)) return ti.call(this, 0, t, e, n, i, r, o);
6388
+ if (t.geometry.properties.isEmpty) return vi;
6374
6389
  const s = this.getMap(), {boxes: a, collision: l} = this.ir(t, i);
6375
6390
  let c = 0, h = 0, u = 0;
6376
6391
  for (let n = i; n < r; n += 6) {
6377
6392
  const i = a[u] = a[u] || [];
6378
6393
  u++;
6379
- const r = Fn.call(this, i, t, e[n], o, s);
6394
+ const r = En.call(this, i, t, e[n], o, s);
6380
6395
  if (!c) {
6381
6396
  const t = this.isCollides(r);
6382
6397
  1 === t ? c = 1 : -1 === t && h++;
@@ -6385,12 +6400,12 @@ class gi extends an {
6385
6400
  return h === n && (c = -1), l.collides = c, l;
6386
6401
  }
6387
6402
  deleteMesh(t, e) {
6388
- t && (t instanceof Qe && (t = t.meshes), e && (Array.isArray(t) ? t.forEach(t => {
6403
+ t && (t instanceof en && (t = t.meshes), e && (Array.isArray(t) ? t.forEach(t => {
6389
6404
  t && t.material && delete t.material.uniforms.iconTex;
6390
6405
  }) : t.material && delete t.material.uniforms.iconTex), super.deleteMesh(t, e));
6391
6406
  }
6392
6407
  isBloom(t) {
6393
- const e = t && t.material && !ae(t.material.get("markerOpacity")), n = this.getSymbol(t.properties.symbolIndex);
6408
+ const e = t && t.material && !ce(t.material.get("markerOpacity")), n = this.getSymbol(t.properties.symbolIndex);
6394
6409
  return !!(e ? n.markerBloom : n.textBloom);
6395
6410
  }
6396
6411
  init() {
@@ -6412,7 +6427,7 @@ class gi extends an {
6412
6427
  enable: !0,
6413
6428
  range: () => this.sceneConfig.depthRange || [ 0, 1 ],
6414
6429
  func: () => this.sceneConfig.depthFunc || "always",
6415
- mask: !!ae(this.sceneConfig.depthMask) || this.sceneConfig.depthMask
6430
+ mask: !!ce(this.sceneConfig.depthMask) || this.sceneConfig.depthMask
6416
6431
  },
6417
6432
  polygonOffset: {
6418
6433
  enable: !0,
@@ -6420,7 +6435,7 @@ class gi extends an {
6420
6435
  }
6421
6436
  };
6422
6437
  this.shader = new n.MeshShader({
6423
- vert: hn,
6438
+ vert: dn,
6424
6439
  frag: "#define SHADER_NAME MARKER\nprecision mediump float;\n#include <gl2_frag>\nuniform sampler2D iconTex;\nuniform lowp float markerOpacity;\nuniform lowp float blendSrcIsOne;\nvarying vec2 vTexCoord;\nvarying float vOpacity;\nvoid main() {\n vec4 c = texture2D(iconTex, vTexCoord) * markerOpacity * vOpacity;\n if(blendSrcIsOne == 1.) {\n c *= c.a;\n }\n if(c.a < .05) {\n discard;\n }\n glFragColor = c;\n#if __VERSION__ == 100\ngl_FragColor = glFragColor;\n#endif\n}",
6425
6440
  uniforms: [ {
6426
6441
  name: "projViewModelMatrix",
@@ -6437,16 +6452,16 @@ class gi extends an {
6437
6452
  } ],
6438
6453
  extraCommandProps: i
6439
6454
  }), this.shader.version = 300;
6440
- const {uniforms: o, extraCommandProps: s} = Bn.call(this, this.layer, this.sceneConfig), a = this.mr || {};
6455
+ const {uniforms: o, extraCommandProps: s} = $n.call(this, this.layer, this.sceneConfig), a = this.mr || {};
6441
6456
  if (this.wr = new n.MeshShader({
6442
- vert: ni,
6443
- frag: ii,
6457
+ vert: ri,
6458
+ frag: oi,
6444
6459
  uniforms: o,
6445
6460
  extraCommandProps: s,
6446
6461
  defines: a
6447
6462
  }), this.pickingFBO) {
6448
6463
  const t = new n.FBORayPicking(this.renderer, {
6449
- vert: "#define PICKING_MODE 1\n" + hn,
6464
+ vert: "#define PICKING_MODE 1\n" + dn,
6450
6465
  uniforms: [ {
6451
6466
  name: "projViewModelMatrix",
6452
6467
  type: "function",
@@ -6464,7 +6479,7 @@ class gi extends an {
6464
6479
  }, this.pickingFBO);
6465
6480
  t.filter = t => !!t.geometry.properties.iconAtlas;
6466
6481
  const e = new n.FBORayPicking(this.renderer, {
6467
- vert: "#define PICKING_MODE 1\n" + ni,
6482
+ vert: "#define PICKING_MODE 1\n" + ri,
6468
6483
  uniforms: o,
6469
6484
  extraCommandProps: s
6470
6485
  }, this.pickingFBO);
@@ -6490,7 +6505,7 @@ class gi extends an {
6490
6505
  getUniqueEntryKey(t, e) {
6491
6506
  if (!this.gr(t.geometry)) return null;
6492
6507
  const {elements: n} = t.geometry.properties;
6493
- return Qn(t, n[e]);
6508
+ return ei(t, n[e]);
6494
6509
  }
6495
6510
  yr(t) {
6496
6511
  const {symbolIndex: e} = t.properties;
@@ -6502,19 +6517,19 @@ class gi extends an {
6502
6517
  }
6503
6518
  }
6504
6519
 
6505
- function vi(t, e) {
6520
+ function xi(t, e) {
6506
6521
  return t.properties.level - e.properties.level || t.properties.meshKey - e.properties.meshKey;
6507
6522
  }
6508
6523
 
6509
- var bi = xi;
6524
+ var wi = Ai;
6510
6525
 
6511
- function xi(t, e) {
6526
+ function Ai(t, e) {
6512
6527
  this.x = t, this.y = e;
6513
6528
  }
6514
6529
 
6515
- xi.prototype = {
6530
+ Ai.prototype = {
6516
6531
  clone: function() {
6517
- return new xi(this.x, this.y);
6532
+ return new Ai(this.x, this.y);
6518
6533
  },
6519
6534
  add: function(t) {
6520
6535
  return this.clone().Ir(t);
@@ -6617,20 +6632,20 @@ xi.prototype = {
6617
6632
  Hr: function() {
6618
6633
  return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
6619
6634
  }
6620
- }, xi.convert = function(t) {
6621
- return t instanceof xi ? t : Array.isArray(t) ? new xi(t[0], t[1]) : t;
6635
+ }, Ai.convert = function(t) {
6636
+ return t instanceof Ai ? t : Array.isArray(t) ? new Ai(t[0], t[1]) : t;
6622
6637
  };
6623
6638
 
6624
- const wi = [], Ai = [], ki = [];
6639
+ const ki = [], _i = [], Si = [];
6625
6640
 
6626
- function _i(t, e, n, r, o, s, a, l) {
6627
- const {aGlyphOffset: h, aSegment: u, aTextDx: d, aTextDy: f, symbolIndex: p} = e.geometry.properties, m = this.getSymbol(p), y = d ? d[o] : m.textDx, g = f ? f[o] : m.textDy, v = c.set(ki, y || 0, g || 0), b = c.set(wi, h[2 * o], h[2 * o + 1]), x = i.set(Ai, u[3 * o], u[3 * o + 1], u[3 * o + 2]);
6641
+ function Ti(t, e, n, r, o, s, a, l) {
6642
+ const {aGlyphOffset: h, aSegment: u, aTextDx: d, aTextDy: f, symbolIndex: p} = e.geometry.properties, m = this.getSymbol(p), y = d ? d[o] : m.textDx, g = f ? f[o] : m.textDy, v = c.set(Si, y || 0, g || 0), b = c.set(ki, h[2 * o], h[2 * o + 1]), x = i.set(_i, u[3 * o], u[3 * o + 1], u[3 * o + 2]);
6628
6643
  return function(t, e, n, i, r, o, s, a, l, c, h, u) {
6629
6644
  const d = i[0] * c, f = h ? d - r : d + r;
6630
6645
  let p = f > 0 ? 1 : -1, m = 0;
6631
6646
  h && (p *= -1, m = Math.PI), p < 0 && (m += Math.PI);
6632
6647
  const y = a + l, g = Math.abs(f);
6633
- let v = p > 0 ? s : s + 1, b = bi.convert(n), x = bi.convert(n), w = 0, A = 0;
6648
+ let v = p > 0 ? s : s + 1, b = wi.convert(n), x = wi.convert(n), w = 0, A = 0;
6634
6649
  for (;w + A <= g; ) {
6635
6650
  if (v += p, v < a || v >= y) return null;
6636
6651
  x.x = b.x, x.y = b.y, b.x = e[3 * v], b.y = e[3 * v + 1], w += A, A = x.dist(b) / u;
@@ -6642,42 +6657,42 @@ function _i(t, e, n, r, o, s, a, l) {
6642
6657
  }(t, r, s, b, v[0], v[1], x[0], x[1], x[2], n / 24, l, a);
6643
6658
  }
6644
6659
 
6645
- const Si = [], Ti = [];
6660
+ const Mi = [], Pi = [];
6646
6661
 
6647
- function Mi(t, e, n, r, o, s, a, l, h, u, d) {
6662
+ function Ii(t, e, n, r, o, s, a, l, h, u, d) {
6648
6663
  const {aVertical: f} = n.geometry.properties, p = f[s];
6649
- let m, y, g = _i.call(this, Si, n, r, o, s, l, h, !1);
6664
+ let m, y, g = Ti.call(this, Mi, n, r, o, s, l, h, !1);
6650
6665
  if (!g) return null;
6651
- if (i.copy(t, g), g = _i.call(this, Ti, n, r, o, a, l, h, !1), !g) return null;
6652
- if (i.copy(e, g), d && (c.transformMat2(Si, Si, d), c.transformMat2(Ti, Ti, d)),
6666
+ if (i.copy(t, g), g = Ti.call(this, Pi, n, r, o, a, l, h, !1), !g) return null;
6667
+ if (i.copy(e, g), d && (c.transformMat2(Mi, Mi, d), c.transformMat2(Pi, Pi, d)),
6653
6668
  p) {
6654
- const t = Math.abs(Ti[1] - Si[1]), e = Math.abs(Ti[0] - Si[0]) * u;
6655
- y = Si[0] > Ti[0] ? 1 : 0, t > e ? (m = 1, y = Si[1] < Ti[1] ? 0 : 1) : m = 0;
6656
- } else m = 0, y = Si[0] > Ti[0] ? 1 : 0;
6669
+ const t = Math.abs(Pi[1] - Mi[1]), e = Math.abs(Pi[0] - Mi[0]) * u;
6670
+ y = Mi[0] > Pi[0] ? 1 : 0, t > e ? (m = 1, y = Mi[1] < Pi[1] ? 0 : 1) : m = 0;
6671
+ } else m = 0, y = Mi[0] > Pi[0] ? 1 : 0;
6657
6672
  return 2 * y + m;
6658
6673
  }
6659
6674
 
6660
- var Pi = "#define SHADER_NAME TEXT_LINE\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec2 aTexCoord;\n#ifdef HAS_OFFSET_Z\nattribute vec3 aOffset;\nuniform float altitudeScale;\n#else\nattribute vec2 aOffset;\n#endif\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute float aColorOpacity;\n#endif\n#ifdef HAS_TEXT_SIZE\nattribute float aTextSize;\n#else\nuniform float textSize;\n#endif\n#ifdef HAS_TEXT_DX\nattribute float aTextDx;\n#else\nuniform float textDx;\n#endif\n#ifdef HAS_TEXT_DY\nattribute float aTextDy;\n#else\nuniform float textDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nattribute float aPitchAlign;\n#else\nuniform float pitchWithMap;\n#endif\nuniform float zoomScale;\nuniform float cameraToCenterDistance;\nuniform mat4 projViewModelMatrix;\nuniform float textPerspectiveRatio;\nuniform float mapPitch;\nuniform vec2 texSize;\nuniform vec2 canvasSize;\nuniform float tileRatio;\nuniform float layerScale;\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vGammaScale;\nvarying float vSize;\nvarying float vOpacity;\n#ifdef HAS_TEXT_FILL\nattribute vec4 aTextFill;\nvarying vec4 vTextFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nattribute vec4 aTextHaloFill;\nvarying vec4 vTextHaloFill;\n#endif\n#ifdef HAS_TEXT_HALO_RADIUS\nattribute float aTextHaloRadius;\nvarying float vTextHaloRadius;\n#endif\n#ifdef HAS_TEXT_HALO_OPACITY\nattribute float aTextHaloOpacity;\nvarying float vTextHaloOpacity;\n#endif\n#else\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_TEXT_DX\nfloat d = aTextDx;\n#else\nfloat d = textDx;\n#endif\n#ifdef HAS_TEXT_DY\nfloat e = aTextDy;\n#else\nfloat e = textDy;\n#endif\n#ifdef HAS_TEXT_SIZE\nfloat f = aTextSize * layerScale;\n#else\nfloat f = textSize * layerScale;\n#endif\n#ifdef HAS_PITCH_ALIGN\nfloat h = aPitchAlign;\n#else\nfloat h = pitchWithMap;\n#endif\ngl_Position = projViewModelMatrix * vec4(c, 1.);\n float i = gl_Position.w;\n float j = i / cameraToCenterDistance;\n float k = (1. - cameraToCenterDistance / i) * textPerspectiveRatio;\n float l = clamp(.5 + .5 * (1. - k), .0, 4.);\n#ifdef HAS_OFFSET_Z\nvec3 m = aOffset / 10.0;\n m[2] /= altitudeScale;\n#else\nvec3 m = vec3(aOffset / 10.0, .0);\n#endif\nvec2 n = aTexCoord;\n if(h == 1.) {\n m.xy *= tileRatio / zoomScale * j * l;\n gl_Position = projViewModelMatrix * vec4(c + m, 1.);\n } else {\n gl_Position.xy += m.xy * 2. / canvasSize * l * i;\n }\n gl_Position.xy += vec2(d, -e) * 2. / canvasSize * i;\n#ifndef PICKING_MODE\nif(h == 1.) {\n vGammaScale = j + mapPitch / 4.;\n } else {\n vGammaScale = mix(1., j, textPerspectiveRatio);\n }\n vGammaScale = clamp(vGammaScale, .0, 1.);\n vTexCoord = n / texSize;\n vSize = f;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nvOpacity *= aColorOpacity / 255.;\n#endif\n#ifdef HAS_TEXT_FILL\nvTextFill = aTextFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvTextHaloFill = aTextHaloFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_RADIUS\nvTextHaloRadius = aTextHaloRadius;\n#endif\n#ifdef HAS_TEXT_HALO_OPACITY\nvTextHaloOpacity = aTextHaloOpacity;\n#endif\n#else\n#ifdef ENABLE_COLLISION\nbool o = aOpacity == 255.;\n#else\nbool o = true;\n#endif\nfbo_picking_setData(gl_Position.w, o);\n#endif\n}";
6675
+ var Oi = "#define SHADER_NAME TEXT_LINE\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nattribute vec2 aTexCoord;\n#ifdef HAS_OFFSET_Z\nattribute vec3 aOffset;\nuniform float altitudeScale;\n#else\nattribute vec2 aOffset;\n#endif\n#ifdef ENABLE_COLLISION\nattribute float aOpacity;\n#endif\n#ifdef HAS_OPACITY\nattribute float aColorOpacity;\n#endif\n#ifdef HAS_TEXT_SIZE\nattribute float aTextSize;\n#else\nuniform float textSize;\n#endif\n#ifdef HAS_TEXT_DX\nattribute float aTextDx;\n#else\nuniform float textDx;\n#endif\n#ifdef HAS_TEXT_DY\nattribute float aTextDy;\n#else\nuniform float textDy;\n#endif\n#if defined(HAS_PITCH_ALIGN)\nattribute float aPitchAlign;\n#else\nuniform float pitchWithMap;\n#endif\nuniform float zoomScale;\nuniform float cameraToCenterDistance;\nuniform mat4 projViewModelMatrix;\nuniform float textPerspectiveRatio;\nuniform float mapPitch;\nuniform vec2 texSize;\nuniform vec2 canvasSize;\nuniform float tileRatio;\nuniform float layerScale;\n#ifndef PICKING_MODE\nvarying vec2 vTexCoord;\nvarying float vGammaScale;\nvarying float vSize;\nvarying float vOpacity;\n#ifdef HAS_TEXT_FILL\nattribute vec4 aTextFill;\nvarying vec4 vTextFill;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nattribute vec4 aTextHaloFill;\nvarying vec4 vTextHaloFill;\n#endif\n#ifdef HAS_TEXT_HALO_RADIUS\nattribute float aTextHaloRadius;\nvarying float vTextHaloRadius;\n#endif\n#ifdef HAS_TEXT_HALO_OPACITY\nattribute float aTextHaloOpacity;\nvarying float vTextHaloOpacity;\n#endif\n#else\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n#ifdef HAS_TEXT_DX\nfloat d = aTextDx;\n#else\nfloat d = textDx;\n#endif\n#ifdef HAS_TEXT_DY\nfloat e = aTextDy;\n#else\nfloat e = textDy;\n#endif\n#ifdef HAS_TEXT_SIZE\nfloat f = aTextSize * layerScale;\n#else\nfloat f = textSize * layerScale;\n#endif\n#ifdef HAS_PITCH_ALIGN\nfloat h = aPitchAlign;\n#else\nfloat h = pitchWithMap;\n#endif\ngl_Position = projViewModelMatrix * vec4(c, 1.);\n float i = gl_Position.w;\n float j = i / cameraToCenterDistance;\n float k = (1. - cameraToCenterDistance / i) * textPerspectiveRatio;\n float l = clamp(.5 + .5 * (1. - k), .0, 4.);\n#ifdef HAS_OFFSET_Z\nvec3 m = aOffset / 10.0;\n m[2] /= altitudeScale;\n#else\nvec3 m = vec3(aOffset / 10.0, .0);\n#endif\nvec2 n = aTexCoord;\n if(h == 1.) {\n m.xy *= tileRatio / zoomScale * j * l;\n gl_Position = projViewModelMatrix * vec4(c + m, 1.);\n } else {\n gl_Position.xy += m.xy * 2. / canvasSize * l * i;\n }\n gl_Position.xy += vec2(d, -e) * 2. / canvasSize * i;\n#ifndef PICKING_MODE\nif(h == 1.) {\n vGammaScale = j + mapPitch / 4.;\n } else {\n vGammaScale = mix(1., j, textPerspectiveRatio);\n }\n vGammaScale = clamp(vGammaScale, .0, 1.);\n vTexCoord = n / texSize;\n vSize = f;\n#ifdef ENABLE_COLLISION\nvOpacity = aOpacity / 255.;\n#else\nvOpacity = 1.;\n#endif\n#ifdef HAS_OPACITY\nvOpacity *= aColorOpacity / 255.;\n#endif\n#ifdef HAS_TEXT_FILL\nvTextFill = aTextFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_FILL\nvTextHaloFill = aTextHaloFill / 255.;\n#endif\n#ifdef HAS_TEXT_HALO_RADIUS\nvTextHaloRadius = aTextHaloRadius;\n#endif\n#ifdef HAS_TEXT_HALO_OPACITY\nvTextHaloOpacity = aTextHaloOpacity;\n#endif\n#else\n#ifdef ENABLE_COLLISION\nbool o = aOpacity == 255.;\n#else\nbool o = true;\n#endif\nfbo_picking_setData(gl_Position.w, o);\n#endif\n}";
6661
6676
 
6662
- const Ii = function(t) {
6677
+ const Ci = function(t) {
6663
6678
  const e = this.layer.getRenderer(), n = this.getSymbol(t.properties.symbolIndex);
6664
6679
  return !this.sr(t) && e.isForeground(t) && "line" !== n.textPlacement;
6665
- }, Oi = function(t) {
6680
+ }, Fi = function(t) {
6666
6681
  const e = this.layer.getRenderer(), n = this.getSymbol(t.properties.symbolIndex);
6667
6682
  return !this.sr(t) && !e.isForeground(t) && "line" !== n.textPlacement;
6668
- }, Ci = function(t) {
6683
+ }, zi = function(t) {
6669
6684
  const e = this.layer.getRenderer(), n = this.getSymbol(t.properties.symbolIndex);
6670
6685
  return !this.sr(t) && e.isForeground(t) && "line" === n.textPlacement;
6671
- }, Fi = function(t) {
6686
+ }, Ei = function(t) {
6672
6687
  const e = this.layer.getRenderer(), n = this.getSymbol(t.properties.symbolIndex);
6673
6688
  return !this.sr(t) && !e.isForeground(t) && "line" === n.textPlacement;
6674
- }, zi = [ 0, 0, 3 ], Ei = [], ji = [], Di = [], Ri = [], Ni = [], Li = [], Hi = [], Vi = [], Ui = [], qi = [ 1, -1 ], Gi = new Int16Array(3), Wi = [], Bi = [], Xi = [], $i = [], Ji = [], Yi = [];
6689
+ }, ji = [ 0, 0, 3 ], Di = [], Ri = [], Ni = [], Li = [], Hi = [], Vi = [], Ui = [], qi = [], Gi = [], Wi = [ 1, -1 ], Bi = new Int16Array(3), Xi = [], $i = [], Ji = [], Yi = [], Zi = [], Ki = [];
6675
6690
 
6676
- class Zi extends an {
6691
+ class Qi extends cn {
6677
6692
  constructor(t, e, n, i, r) {
6678
6693
  super(t, e, n, i, r), this.propAllowOverlap = "textAllowOverlap", this.propIgnorePlacement = "textIgnorePlacement",
6679
- this.colorCache = {}, this.Vr = Ii.bind(this), this.Ur = Oi.bind(this), this.qr = Ci.bind(this),
6680
- this.Gr = Fi.bind(this), this.isLabelCollides = Kn.bind(this), this.Wr();
6694
+ this.colorCache = {}, this.Vr = Ci.bind(this), this.Ur = Fi.bind(this), this.qr = zi.bind(this),
6695
+ this.Gr = Ei.bind(this), this.isLabelCollides = ti.bind(this), this.Wr();
6681
6696
  }
6682
6697
  Wr() {
6683
6698
  this.Br = [];
@@ -6696,7 +6711,7 @@ class Zi extends an {
6696
6711
  return !1;
6697
6712
  }
6698
6713
  createFnTypeConfig(t, e) {
6699
- return Xn(t, e);
6714
+ return Jn(t, e);
6700
6715
  }
6701
6716
  isBloom(t) {
6702
6717
  return !!this.getSymbol(t.properties.symbolIndex).textBloom;
@@ -6714,7 +6729,7 @@ class Zi extends an {
6714
6729
  createMesh(t, e) {
6715
6730
  const n = this.isEnableCollision(), i = this.isEnableUniquePlacement(), {geometry: r, symbolIndex: o} = t;
6716
6731
  r.properties.symbolIndex = o;
6717
- const s = this.getSymbol(o), a = this.getSymbolDef(o), l = this.getFnTypeConfig(o), c = qn.call(this, this.regl, r, e, a, s, l, this.layer.options.collision, !n, i);
6732
+ const s = this.getSymbol(o), a = this.getSymbolDef(o), l = this.getFnTypeConfig(o), c = Wn.call(this, this.regl, r, e, a, s, l, this.layer.options.collision, !n, i);
6718
6733
  if (c.length) {
6719
6734
  "line" === s.textPlacement ? this.Xr = !0 : this.$r = !0;
6720
6735
  }
@@ -6736,7 +6751,7 @@ class Zi extends an {
6736
6751
  Yr() {
6737
6752
  let t = this.scene.getMeshes();
6738
6753
  if (!t || !t.length) return;
6739
- const e = -this.getMap().getBearing() * Math.PI / 180, n = l.fromRotation(Di, e), i = (t, e, n, i) => {
6754
+ const e = -this.getMap().getBearing() * Math.PI / 180, n = l.fromRotation(Ni, e), i = (t, e, n, i) => {
6740
6755
  const {start: r, end: o, mesh: s, allElements: a} = e[0];
6741
6756
  if (this.updateBoxCollisionFading(!0, s, e, n, i)) {
6742
6757
  let e = t.count;
@@ -6744,14 +6759,14 @@ class Zi extends an {
6744
6759
  t.count = e;
6745
6760
  }
6746
6761
  }, r = this.Ui(), o = this.layer.getRenderer();
6747
- t = t.sort(Qi);
6762
+ t = t.sort(er);
6748
6763
  for (let e = 0; e < t.length; e++) {
6749
6764
  const s = t[e];
6750
6765
  if (!this.isMeshIterable(s)) continue;
6751
6766
  const a = o.isForeground(s);
6752
6767
  if (this.shouldIgnoreBackground() && !a) continue;
6753
6768
  const l = s.geometry, c = this.getSymbol(s.properties.symbolIndex);
6754
- s.properties.textHaloRadius = ae(c.textHaloRadius) ? Un.textHaloRadius : c.textHaloRadius;
6769
+ s.properties.textHaloRadius = ce(c.textHaloRadius) ? Gn.textHaloRadius : c.textHaloRadius;
6755
6770
  const h = s.properties.meshKey;
6756
6771
  if ("line" === c.textPlacement) {
6757
6772
  if (!l.properties.line) continue;
@@ -6778,7 +6793,7 @@ class Zi extends an {
6778
6793
  return "line" !== this.getSymbol(t.properties.symbolIndex).textPlacement;
6779
6794
  }
6780
6795
  getUniqueEntryKey(t, e) {
6781
- return Qn(t, e);
6796
+ return ei(t, e);
6782
6797
  }
6783
6798
  Kr(t, e) {
6784
6799
  const n = this.getMap(), i = t.geometry, o = i.properties, s = this.layer.getRenderer().isForeground(t);
@@ -6787,7 +6802,7 @@ class Zi extends an {
6787
6802
  if (!a) return;
6788
6803
  const l = 1 === t.material.uniforms.pitchWithMap, c = o.elements;
6789
6804
  if (!l) {
6790
- const e = r.multiply(Ei, n.projViewMatrix, t.localTransform), i = new Array(a.length);
6805
+ const e = r.multiply(Di, n.projViewMatrix, t.localTransform), i = new Array(a.length);
6791
6806
  a = this.Qr(i, a, e, n.width, n.height);
6792
6807
  }
6793
6808
  const h = this.Ui(), u = i.properties.visElemts = i.properties.visElemts || new c.constructor(c.length);
@@ -6806,14 +6821,14 @@ class Zi extends an {
6806
6821
  if (this.Jr[o]) return this.Jr[o];
6807
6822
  const s = function(t, e, n, i, r) {
6808
6823
  const o = [];
6809
- for (let s = 0; s < e.length; s += 3) a.set(o, e[s], e[s + 1], e[s + 2], 1), dn(o, o, n, i, r),
6824
+ for (let s = 0; s < e.length; s += 3) a.set(o, e[s], e[s + 1], e[s + 2], 1), pn(o, o, n, i, r),
6810
6825
  t[s] = o[0], t[s + 1] = o[1], t[s + 2] = e[s + 2];
6811
6826
  return t;
6812
6827
  }(t, e, n, i, r);
6813
6828
  return this.Jr[o] = s, s;
6814
6829
  }
6815
6830
  forEachBox(t, e) {
6816
- const n = this.getMap(), i = r.multiply(Ei, n.projViewMatrix, t.localTransform), {collideIds: o, aCount: s, features: a, elements: l} = t.geometry.properties, c = o, h = this.isEnableUniquePlacement(), u = this.rr(1);
6831
+ const n = this.getMap(), i = r.multiply(Di, n.projViewMatrix, t.localTransform), {collideIds: o, aCount: s, features: a, elements: l} = t.geometry.properties, c = o, h = this.isEnableUniquePlacement(), u = this.rr(1);
6817
6832
  u[0].allElements = l, u[0].mesh = t;
6818
6833
  let d = 0, f = l[0], p = 0, m = c[f];
6819
6834
  for (let n = 0; n <= l.length; n += 6) if (f = l[n], c[f] !== m || n === l.length) {
@@ -6832,52 +6847,52 @@ class Zi extends an {
6832
6847
  }
6833
6848
  to(t, e, n, o, s, l, u) {
6834
6849
  const d = this.Ui(), f = this.getMap(), p = t.geometry, m = p.desc.positionSize, {aShape: y, aOffset: g, aAnchor: v, aAltitude: b, aPitchRotation: x} = p.properties, w = p.properties.aTextSize, A = !u, k = e[n] * m;
6835
- let _ = Ri;
6836
- p.data.aAltitude ? i.set(Ri, v[k], v[k + 1], b[e[n]]) : P.unpackPosition(Ri, v[k], v[k + 1], v[k + 2]);
6837
- const S = dn(Ni, _, l, f.width, f.height);
6838
- if (a.set(Li, S[0], S[1], S[0], S[1]), f.isOffscreen(Li)) return d || Ki(g, e, n, o),
6850
+ let _ = Li;
6851
+ p.data.aAltitude ? i.set(Li, v[k], v[k + 1], b[e[n]]) : P.unpackPosition(Li, v[k], v[k + 1], v[k + 2]);
6852
+ const S = pn(Hi, _, l, f.width, f.height);
6853
+ if (a.set(Vi, S[0], S[1], S[0], S[1]), f.isOffscreen(Vi)) return d || tr(g, e, n, o),
6839
6854
  !1;
6840
6855
  A && (_ = S);
6841
6856
  const T = A ? 1 : p.properties.tileExtent / this.layer.options.tileSize[0];
6842
6857
  let M = !0;
6843
6858
  const I = e[n], O = e[o - 1], C = w ? w[I] : t.properties.textSize, F = this.eo(t, C, s, I, O, _, T, u);
6844
- if (null === F) return Ki(g, e, n, o), !1;
6859
+ if (null === F) return tr(g, e, n, o), !1;
6845
6860
  const z = O - I <= 3, E = t.material.uniforms, j = 1 === E.pitchWithMap, D = Math.floor(F / 2), R = F % 2;
6846
6861
  for (let a = n; a < o; a += 6) {
6847
6862
  const l = e[a];
6848
6863
  let u;
6849
- if (u = D || a !== n || z ? D || a !== o - 6 || z ? _i.call(this, ji, t, C, s, l, _, T, D) : Yi : Ji,
6864
+ if (u = D || a !== n || z ? D || a !== o - 6 || z ? Ti.call(this, Ri, t, C, s, l, _, T, D) : Ki : Zi,
6850
6865
  !u) {
6851
- M = !1, d || Ki(g, e, n, o);
6866
+ M = !1, d || tr(g, e, n, o);
6852
6867
  break;
6853
6868
  }
6854
6869
  let f = u[2];
6855
6870
  R && (f -= Math.PI / 2);
6856
- const p = wn(Hi, f, 0, E.rotateWithMap, E.pitchWithMap), m = g.length > y.length;
6871
+ const p = kn(Ui, f, 0, E.rotateWithMap, E.pitchWithMap), m = g.length > y.length;
6857
6872
  let v;
6858
6873
  if (m) {
6859
- i.set($i, x[3 * l], x[3 * l + 1], 0);
6860
- const t = i.normalize($i, $i), e = -x[3 * l + 2];
6874
+ i.set(Yi, x[3 * l], x[3 * l + 1], 0);
6875
+ const t = i.normalize(Yi, Yi), e = -x[3 * l + 2];
6861
6876
  if (e) {
6862
- const n = h.setAxisAngle(Wi, t, e);
6863
- r.fromTranslation(Bi, zi), r.fromQuat(Xi, n), v = r.multiply(Xi, Xi, Bi);
6877
+ const n = h.setAxisAngle(Xi, t, e);
6878
+ r.fromTranslation($i, ji), r.fromQuat(Ji, n), v = r.multiply(Ji, Ji, $i);
6864
6879
  }
6865
6880
  }
6866
6881
  for (let t = 0; t < 4; t++) {
6867
6882
  const e = 2 * (l + t);
6868
- c.set(Vi, y[e] / 10, y[e + 1] / 10), c.scale(Vi, Vi, C / 24), c.transformMat2(Vi, Vi, p),
6869
- j ? (c.multiply(Vi, Vi, qi), c.add(Ui, Vi, u), m && (Ui[2] = 0, v && i.transformMat4(Ui, Ui, v))) : (c.multiply(Ui, u, qi),
6870
- c.add(Ui, Vi, Ui)), Gi[0] = 10 * Ui[0], Gi[1] = 10 * Ui[1], m && (Gi[2] = 10 * Ui[2]);
6883
+ c.set(qi, y[e] / 10, y[e + 1] / 10), c.scale(qi, qi, C / 24), c.transformMat2(qi, qi, p),
6884
+ j ? (c.multiply(qi, qi, Wi), c.add(Gi, qi, u), m && (Gi[2] = 0, v && i.transformMat4(Gi, Gi, v))) : (c.multiply(Gi, u, Wi),
6885
+ c.add(Gi, qi, Gi)), Bi[0] = 10 * Gi[0], Bi[1] = 10 * Gi[1], m && (Bi[2] = 10 * Gi[2]);
6871
6886
  const n = (m ? 3 : 2) * (l + t);
6872
- (g[n] !== Gi[0] || g[n + 1] !== Gi[1] || m && g[n + 2] !== Gi[2]) && (g.dirty = !0,
6873
- g[n] = Gi[0], g[n + 1] = Gi[1], m && (g[n + 2] = Gi[2]));
6887
+ (g[n] !== Bi[0] || g[n + 1] !== Bi[1] || m && g[n + 2] !== Bi[2]) && (g.dirty = !0,
6888
+ g[n] = Bi[0], g[n + 1] = Bi[1], m && (g[n + 2] = Bi[2]));
6874
6889
  }
6875
6890
  }
6876
6891
  return M;
6877
6892
  }
6878
6893
  eo(t, e, n, i, r, o, s, a) {
6879
6894
  const l = r - i <= 3, c = this.getMap();
6880
- return l ? 0 : Mi.call(this, Ji, Yi, t, e, n, i, r, o, s, c.width / c.height, a);
6895
+ return l ? 0 : Ii.call(this, Zi, Ki, t, e, n, i, r, o, s, c.width / c.height, a);
6881
6896
  }
6882
6897
  isBoxCollides(t, e, n, i, r, o) {
6883
6898
  return this.isLabelCollides(0, t, e, n, i, r, o);
@@ -6896,23 +6911,23 @@ class Zi extends an {
6896
6911
  init() {
6897
6912
  const t = this.regl;
6898
6913
  this.renderer = new n.Renderer(t);
6899
- const {uniforms: e, extraCommandProps: i} = Bn.call(this, this.layer, this.sceneConfig);
6914
+ const {uniforms: e, extraCommandProps: i} = $n.call(this, this.layer, this.sceneConfig);
6900
6915
  this.shader = new n.MeshShader({
6901
- vert: ni,
6902
- frag: ii,
6916
+ vert: ri,
6917
+ frag: oi,
6903
6918
  uniforms: e,
6904
6919
  extraCommandProps: i
6905
6920
  });
6906
6921
  let r = i;
6907
- if (this.layer.getRenderer().isEnableWorkAround("win-intel-gpu-crash") && (r = re({}, i),
6908
- r.stencil = re({}, i.stencil), r.stencil.enable = !0), this.Zr = new n.MeshShader({
6909
- vert: Pi,
6910
- frag: ii,
6922
+ if (this.layer.getRenderer().isEnableWorkAround("win-intel-gpu-crash") && (r = se({}, i),
6923
+ r.stencil = se({}, i.stencil), r.stencil.enable = !0), this.Zr = new n.MeshShader({
6924
+ vert: Oi,
6925
+ frag: oi,
6911
6926
  uniforms: e,
6912
6927
  extraCommandProps: r
6913
6928
  }), this.pickingFBO) {
6914
6929
  const t = new n.FBORayPicking(this.renderer, {
6915
- vert: "#define PICKING_MODE 1\n" + ni,
6930
+ vert: "#define PICKING_MODE 1\n" + ri,
6916
6931
  uniforms: e,
6917
6932
  extraCommandProps: {
6918
6933
  viewport: this.pickingViewport
@@ -6923,7 +6938,7 @@ class Zi extends an {
6923
6938
  return "line" !== this.getSymbol(e).textPlacement;
6924
6939
  };
6925
6940
  const i = new n.FBORayPicking(this.renderer, {
6926
- vert: "#define PICKING_MODE 1\n" + Pi,
6941
+ vert: "#define PICKING_MODE 1\n" + Oi,
6927
6942
  uniforms: e,
6928
6943
  extraCommandProps: {
6929
6944
  viewport: this.pickingViewport
@@ -6953,7 +6968,7 @@ class Zi extends an {
6953
6968
  }
6954
6969
  }
6955
6970
 
6956
- function Ki(t, e, n, i) {
6971
+ function tr(t, e, n, i) {
6957
6972
  for (let r = n; r < i; r += 6) {
6958
6973
  const n = e[r];
6959
6974
  for (let e = 0; e < 4; e++) {
@@ -6963,20 +6978,20 @@ function Ki(t, e, n, i) {
6963
6978
  }
6964
6979
  }
6965
6980
 
6966
- function Qi(t, e) {
6981
+ function er(t, e) {
6967
6982
  const n = t.uniforms.level - e.uniforms.level;
6968
6983
  return 0 === n ? t.properties.meshKey - e.properties.meshKey : n;
6969
6984
  }
6970
6985
 
6971
- var tr = "#define SHADER_NAME NATIVE_POINT\n#include <gl2_vert>\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nuniform mat4 projViewModelMatrix;\nuniform float markerSize;\n#ifdef PICKING_MODE\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n gl_Position = projViewModelMatrix * vec4(c, 1.);\n gl_PointSize = markerSize;\n#ifdef PICKING_MODE\nfbo_picking_setData(gl_Position.w, true);\n#endif\n}";
6986
+ var nr = "#define SHADER_NAME NATIVE_POINT\n#include <gl2_vert>\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nuniform mat4 projViewModelMatrix;\nuniform float markerSize;\n#ifdef PICKING_MODE\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n gl_Position = projViewModelMatrix * vec4(c, 1.);\n gl_PointSize = markerSize;\n#ifdef PICKING_MODE\nfbo_picking_setData(gl_Position.w, true);\n#endif\n}";
6972
6987
 
6973
- const er = {
6988
+ const ir = {
6974
6989
  markerFill: [ 0, 0, 0 ],
6975
6990
  markerOpacity: 1,
6976
6991
  markerSize: 10
6977
6992
  };
6978
6993
 
6979
- class nr extends Ue {
6994
+ class rr extends Ge {
6980
6995
  getPrimitive() {
6981
6996
  return "points";
6982
6997
  }
@@ -6984,9 +6999,9 @@ class nr extends Ue {
6984
6999
  const {geometry: i, symbolIndex: r, ref: o} = t, s = this.getSymbol(r);
6985
7000
  void 0 === o && i.generateBuffers(this.regl);
6986
7001
  const a = {};
6987
- ce(a, "markerOpacity", s, "markerOpacity", 1), ce(a, "markerSize", s, "markerSize", 10),
6988
- ce(a, "markerFill", s, "markerFill", "#000", de(this.colorCache, 3));
6989
- const l = new n.Material(a, er);
7002
+ ue(a, "markerOpacity", s, "markerOpacity", 1), ue(a, "markerSize", s, "markerSize", 10),
7003
+ ue(a, "markerFill", s, "markerFill", "#000", pe(this.colorCache, 3));
7004
+ const l = new n.Material(a, ir);
6990
7005
  l.createDefines = () => "square" !== s.markerType ? {
6991
7006
  USE_CIRCLE: 1
6992
7007
  } : null, l.appendDefines = t => ("square" !== s.markerType && (t.USE_CIRCLE = 1),
@@ -7007,7 +7022,7 @@ class nr extends Ue {
7007
7022
  width: () => this.canvas ? this.canvas.width : 1,
7008
7023
  height: () => this.canvas ? this.canvas.height : 1
7009
7024
  }, i = this.layer.getRenderer().isEnableTileStencil && this.layer.getRenderer().isEnableTileStencil(), o = {
7010
- vert: tr,
7025
+ vert: nr,
7011
7026
  frag: "#define SHADER_NAME NATIVE_POINT\nprecision mediump float;\n#include <gl2_frag>\n#ifdef USE_CIRCLE\n#if __VERSION__ == 100\n#ifdef GL_OES_standard_derivatives\n#define STANDARD_DERIVATIVES_ENABLED 1\n#extension GL_OES_standard_derivatives : enable\n#endif\n#else\n#define STANDARD_DERIVATIVES_ENABLED 1\n#endif\n#endif\nuniform vec3 markerFill;\nuniform float markerOpacity;\nvoid main() {\n float c = 1.;\n#ifdef USE_CIRCLE\nfloat r = .0, d = .0;\n vec2 e = 2. * gl_PointCoord - 1.;\n r = dot(e, e);\n if(r > 1.) {\n discard;\n }\n#ifdef STANDARD_DERIVATIVES_ENABLED\nd = fwidth(r);\n c = 1. - smoothstep(1. - d, 1. + d, r);\n#endif\n#endif\nglFragColor = vec4(markerFill, 1.) * markerOpacity * c;\n#if __VERSION__ == 100\ngl_FragColor = glFragColor;\n#endif\n}",
7012
7027
  uniforms: [ {
7013
7028
  name: "projViewModelMatrix",
@@ -7047,7 +7062,7 @@ class nr extends Ue {
7047
7062
  }
7048
7063
  };
7049
7064
  this.shader = new n.MeshShader(o), this.shader.version = 300, this.pickingFBO && (this.picking = [ new n.FBORayPicking(this.renderer, {
7050
- vert: "#define PICKING_MODE 1\n" + tr,
7065
+ vert: "#define PICKING_MODE 1\n" + nr,
7051
7066
  uniforms: [ {
7052
7067
  name: "projViewModelMatrix",
7053
7068
  type: "function",
@@ -7068,9 +7083,9 @@ class nr extends Ue {
7068
7083
  }
7069
7084
  }
7070
7085
 
7071
- var ir = "#define SHADER_NAME NATIVE_LINE\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nuniform mat4 projViewModelMatrix;\n#ifndef PICKING_MODE\n#if defined(HAS_COLOR)\nattribute vec4 aColor;\nvarying vec4 vColor;\n#endif\n#else\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n gl_Position = projViewModelMatrix * vec4(c, 1.);\n#ifndef PICKING_MODE\n#if defined(HAS_COLOR)\nvColor = aColor / 255.;\n#endif\n#else\nfbo_picking_setData(gl_Position.w, true);\n#endif\n}";
7086
+ var or = "#define SHADER_NAME NATIVE_LINE\n#ifdef HAS_ALTITUDE\nattribute vec2 aPosition;\nattribute float aAltitude;\n#else\nattribute vec3 aPosition;\n#endif\nuniform mat4 projViewModelMatrix;\n#ifndef PICKING_MODE\n#if defined(HAS_COLOR)\nattribute vec4 aColor;\nvarying vec4 vColor;\n#endif\n#else\n#include <fbo_picking_vert>\n#endif\n#include <vt_position_vert>\nvoid main() {\n vec3 c = unpackVTPosition();\n gl_Position = projViewModelMatrix * vec4(c, 1.);\n#ifndef PICKING_MODE\n#if defined(HAS_COLOR)\nvColor = aColor / 255.;\n#endif\n#else\nfbo_picking_setData(gl_Position.w, true);\n#endif\n}";
7072
7087
 
7073
- class rr extends Ue {
7088
+ class sr extends Ge {
7074
7089
  constructor(t, e, n, i, r) {
7075
7090
  if (super(t, e, n, i, r), this.primitive = "lines", p(this.symbolDef.lineColor)) {
7076
7091
  const t = e.getMap(), n = y(this.symbolDef.lineColor);
@@ -7093,7 +7108,7 @@ class rr extends Ue {
7093
7108
  }
7094
7109
  getMeshUniforms(t, e) {
7095
7110
  const n = {};
7096
- return ce(n, "lineColor", e, "lineColor", "#000", de(this.colorCache)), ce(n, "lineOpacity", e, "lineOpacity", 1),
7111
+ return ue(n, "lineColor", e, "lineColor", "#000", pe(this.colorCache)), ue(n, "lineOpacity", e, "lineOpacity", 1),
7097
7112
  n;
7098
7113
  }
7099
7114
  init() {
@@ -7112,7 +7127,7 @@ class rr extends Ue {
7112
7127
  return r.multiply(n, e.projViewMatrix, e.modelMatrix), n;
7113
7128
  }
7114
7129
  } ], s = this.sceneConfig.depthRange, a = {
7115
- vert: ir,
7130
+ vert: or,
7116
7131
  frag: "#define SHADER_NAME NATIVE_LINE\nprecision mediump float;\nuniform float lineOpacity;\nuniform vec4 lineColor;\n#if defined(HAS_COLOR)\nvarying vec4 vColor;\n#endif\nvoid main() {\n gl_FragColor = lineColor * lineOpacity;\n#if defined(HAS_COLOR)\ngl_FragColor *= vColor;\n#endif\n}",
7117
7132
  uniforms: o,
7118
7133
  defines: null,
@@ -7149,7 +7164,7 @@ class rr extends Ue {
7149
7164
  }
7150
7165
  };
7151
7166
  this.shader = new n.MeshShader(a), this.pickingFBO && (this.picking = [ new n.FBORayPicking(this.renderer, {
7152
- vert: "#define PICKING_MODE 1\n" + ir,
7167
+ vert: "#define PICKING_MODE 1\n" + or,
7153
7168
  uniforms: o,
7154
7169
  extraCommandProps: {
7155
7170
  viewport: this.pickingViewport
@@ -7166,9 +7181,9 @@ class rr extends Ue {
7166
7181
  }
7167
7182
  }
7168
7183
 
7169
- const or = [ 1, 1, 1 ], sr = [ 1, 1, 1, 1 ], ar = [ 0, 0 ];
7184
+ const ar = [ 1, 1, 1 ], lr = [ 1, 1, 1, 1 ], cr = [ 0, 0 ];
7170
7185
 
7171
- class lr extends Le {
7186
+ class hr extends Ve {
7172
7187
  supportRenderMode(t) {
7173
7188
  return this.isAnimating() ? "fxaa" === t || "fxaaAfterTaa" === t : "taa" === t || "fxaa" === t;
7174
7189
  }
@@ -7179,12 +7194,12 @@ class lr extends Le {
7179
7194
  if (!this.material) return this.setToRedraw(), null;
7180
7195
  const {geometry: s, symbolIndex: a} = t, l = new n.Mesh(s, this.material);
7181
7196
  if (this.sceneConfig.animation) {
7182
- or[2] = .01;
7197
+ ar[2] = .01;
7183
7198
  const t = [];
7184
- r.fromScaling(t, or), r.multiply(t, e, t), e = t;
7199
+ r.fromScaling(t, ar), r.multiply(t, e, t), e = t;
7185
7200
  }
7186
7201
  const c = this.getSymbolDef(a), h = this.getFnTypeConfig(a);
7187
- we(s, c, h);
7202
+ ke(s, c, h);
7188
7203
  const u = this.getShader(), d = u.getGeometryDefines ? u.getGeometryDefines(s) : {}, f = this.getSymbol(a);
7189
7204
  if (s.data.aExtrude) {
7190
7205
  d.IS_LINE_EXTRUSION = 1;
@@ -7194,16 +7209,16 @@ class lr extends Le {
7194
7209
  get: function() {
7195
7210
  return e * n.getResolution() / t;
7196
7211
  }
7197
- }), ce(l.uniforms, "lineWidth", f, "lineWidth", 4), ce(l.uniforms, "lineOpacity", f, "lineOpacity", 1),
7198
- ce(l.uniforms, "lineColor", f, "lineColor", "#fff", de(this.colorCache)), Object.defineProperty(l.uniforms, "lineHeight", {
7212
+ }), ue(l.uniforms, "lineWidth", f, "lineWidth", 4), ue(l.uniforms, "lineOpacity", f, "lineOpacity", 1),
7213
+ ue(l.uniforms, "lineColor", f, "lineColor", "#fff", pe(this.colorCache)), Object.defineProperty(l.uniforms, "lineHeight", {
7199
7214
  enumerable: !0,
7200
7215
  get: () => {
7201
7216
  const t = this.dataConfig.defaultAltitude * (this.dataConfig.altitudeScale || 1);
7202
- return me(t) ? t : 0;
7217
+ return ge(t) ? t : 0;
7203
7218
  }
7204
7219
  });
7205
- } else ce(l.uniforms, "polygonFill", f, "polygonFill", sr, de(this.colorCache)),
7206
- ce(l.uniforms, "polygonOpacity", f, "polygonOpacity", 1);
7220
+ } else ue(l.uniforms, "polygonFill", f, "polygonFill", lr, pe(this.colorCache)),
7221
+ ue(l.uniforms, "polygonOpacity", f, "polygonOpacity", 1);
7207
7222
  if (s.data.aColor && (d.HAS_COLOR = 1), s.data.aLineWidth && (d.HAS_LINE_WIDTH = 1),
7208
7223
  s.data.aLineHeight && (d.HAS_LINE_HEIGHT = 1), s.data.aOpacity) {
7209
7224
  const t = s.data.aOpacity;
@@ -7240,7 +7255,7 @@ class lr extends Le {
7240
7255
  return t.material && t.material.uvOffsetAnim;
7241
7256
  }
7242
7257
  getUVOffset(t) {
7243
- const e = this.getSymbols()[0], n = e.material && e.material.uvOffset || ar, i = this.layer.getRenderer().getFrameTimestamp(), r = [ n[0], n[1] ], o = !!e.material && e.material.noiseTexture, s = o ? 5e5 : 1e3, a = o ? 256 : 1;
7258
+ const e = this.getSymbols()[0], n = e.material && e.material.uvOffset || cr, i = this.layer.getRenderer().getFrameTimestamp(), r = [ n[0], n[1] ], o = !!e.material && e.material.noiseTexture, s = o ? 5e5 : 1e3, a = o ? 256 : 1;
7244
7259
  return t && t[0] && (r[0] = i * t[0] % s / s * a), t && t[1] && (r[1] = i * t[1] % s / s * a),
7245
7260
  r;
7246
7261
  }
@@ -7258,7 +7273,7 @@ class lr extends Le {
7258
7273
  ri(t, e) {
7259
7274
  if (null !== e) {
7260
7275
  const n = t.localTransform;
7261
- 0 === e && (e = .01), or[2] = e, r.fromScaling(n, or), r.multiply(n, t.properties.tileTransform, n),
7276
+ 0 === e && (e = .01), ar[2] = e, r.fromScaling(n, ar), r.multiply(n, t.properties.tileTransform, n),
7262
7277
  t.setLocalTransform(n);
7263
7278
  } else t.setLocalTransform(t.properties.tileTransform);
7264
7279
  t.material !== this.material && t.setMaterial(this.material), t.geometry.properties.maxAltitude <= 0 && (this.io = !0),
@@ -7282,7 +7297,7 @@ class lr extends Le {
7282
7297
  evaluate: e => {
7283
7298
  let i = n(t.getZoom(), e);
7284
7299
  return Array.isArray(i) || (i = this.colorCache[i] = this.colorCache[i] || C(i).unitArray()),
7285
- i = ue(i), i;
7300
+ i = fe(i), i;
7286
7301
  }
7287
7302
  }, {
7288
7303
  attrName: "aOpacity",
@@ -7316,17 +7331,17 @@ class lr extends Le {
7316
7331
  return t.material && this.ro(t.material), n;
7317
7332
  }
7318
7333
  qn(t, e) {
7319
- return cr(t) !== cr(e);
7334
+ return ur(t) !== ur(e);
7320
7335
  }
7321
7336
  }
7322
7337
 
7323
- function cr(t) {
7338
+ function ur(t) {
7324
7339
  if (!t || !t.material) return !1;
7325
7340
  for (const e in t.material) if (e.indexOf("Texture") > 0 && t.material[e]) return !0;
7326
7341
  return !1;
7327
7342
  }
7328
7343
 
7329
- class hr extends lr {
7344
+ class dr extends hr {
7330
7345
  createGeometry(t) {
7331
7346
  const e = t.data, i = this.getSymbols()[0];
7332
7347
  if (i.material && i.material.extrusionOpacity) {
@@ -7335,7 +7350,7 @@ class hr extends lr {
7335
7350
  e.aExtrusionOpacity = t;
7336
7351
  }
7337
7352
  const r = new n.Geometry(e, t.indices);
7338
- return re(r.properties, t.properties), {
7353
+ return se(r.properties, t.properties), {
7339
7354
  geometry: r,
7340
7355
  symbolIndex: {
7341
7356
  index: 0
@@ -7344,7 +7359,7 @@ class hr extends lr {
7344
7359
  }
7345
7360
  updateSceneConfig(t) {
7346
7361
  let e;
7347
- if (this.sceneConfig.cullFace !== t.cullFace && (e = !0), re(this.sceneConfig, t),
7362
+ if (this.sceneConfig.cullFace !== t.cullFace && (e = !0), se(this.sceneConfig, t),
7348
7363
  e) {
7349
7364
  const t = this.getShaderConfig();
7350
7365
  this.shader.dispose(), this.shader = new n.PhongShader(t);
@@ -7430,11 +7445,11 @@ class hr extends lr {
7430
7445
  ro() {
7431
7446
  this.material && this.material.dispose();
7432
7447
  const t = this.getSymbols()[0].material, e = {};
7433
- for (const n in t) ge(t, n) && (e[n] = t[n]);
7448
+ for (const n in t) be(t, n) && (e[n] = t[n]);
7434
7449
  this.material = new n.PhongMaterial(e);
7435
7450
  }
7436
7451
  getUniformValues(t, e) {
7437
- const n = t.viewMatrix, i = t.projMatrix, r = t.cameraPosition, o = this.so(), s = re({
7452
+ const n = t.viewMatrix, i = t.projMatrix, r = t.cameraPosition, o = this.so(), s = se({
7438
7453
  viewMatrix: n,
7439
7454
  projMatrix: i,
7440
7455
  cameraPosition: r,
@@ -7458,9 +7473,9 @@ class hr extends lr {
7458
7473
  }
7459
7474
  }
7460
7475
 
7461
- const ur = [ 1, 1, 1 ];
7476
+ const fr = [ 1, 1, 1 ];
7462
7477
 
7463
- class dr extends Le {
7478
+ class pr extends Ve {
7464
7479
  constructor(t, e, n, i, r) {
7465
7480
  if (super(t, e, n, i, r), p(this.symbolDef[0].lineColor)) {
7466
7481
  const t = e.getMap(), n = y(this.symbolDef.lineColor);
@@ -7483,9 +7498,9 @@ class dr extends Le {
7483
7498
  createMesh(t, e) {
7484
7499
  const {geometry: i} = t, o = new n.Mesh(i);
7485
7500
  if (o.castShadow = !1, this.sceneConfig.animation) {
7486
- ur[2] = .01;
7501
+ fr[2] = .01;
7487
7502
  const t = [];
7488
- r.fromScaling(t, ur), r.multiply(t, e, t), e = t;
7503
+ r.fromScaling(t, fr), r.multiply(t, e, t), e = t;
7489
7504
  }
7490
7505
  return o.setLocalTransform(e), o.properties.symbolIndex = {
7491
7506
  index: 0
@@ -7494,7 +7509,7 @@ class dr extends Le {
7494
7509
  addMesh(t, e) {
7495
7510
  if (!t.length) return this;
7496
7511
  let n;
7497
- null !== e ? (0 === e && (e = .01), n = t[0].localTransform, ur[2] = e, r.fromScaling(n, ur),
7512
+ null !== e ? (0 === e && (e = .01), n = t[0].localTransform, fr[2] = e, r.fromScaling(n, fr),
7498
7513
  r.multiply(n, t[0].properties.tileTransform, n)) : n = t[0].properties.tileTransform;
7499
7514
  for (let e = 0; e < t.length; e++) t[e].setLocalTransform(n);
7500
7515
  return this.scene.addMesh(t), this;
@@ -7551,9 +7566,9 @@ class dr extends Le {
7551
7566
  }
7552
7567
  }
7553
7568
 
7554
- const {getPBRUniforms: fr} = n.pbr.PBRUtils, pr = [];
7569
+ const {getPBRUniforms: mr} = n.pbr.PBRUtils, yr = [];
7555
7570
 
7556
- class mr extends lr {
7571
+ class gr extends hr {
7557
7572
  constructor(...t) {
7558
7573
  super(...t), this.ao = new n.ResourceLoader, this.scene.sortFunction = this.sortByCommandKey;
7559
7574
  }
@@ -7577,7 +7592,7 @@ class mr extends lr {
7577
7592
  const e = new n.Geometry(t.data, t.indices, 0, {
7578
7593
  uv0Attribute: "aTexCoord0"
7579
7594
  });
7580
- return re(e.properties, t.properties), {
7595
+ return se(e.properties, t.properties), {
7581
7596
  geometry: e,
7582
7597
  symbolIndex: {
7583
7598
  index: 0
@@ -7591,7 +7606,7 @@ class mr extends lr {
7591
7606
  let n = !!t.ssr && this.getSymbols()[0].ssr;
7592
7607
  const i = this.shader, r = i.shaderDefines;
7593
7608
  if (n) {
7594
- const e = re({}, r, t.ssr.defines);
7609
+ const e = se({}, r, t.ssr.defines);
7595
7610
  i.shaderDefines = e;
7596
7611
  }
7597
7612
  if (t.onlyUpdateDepthInTaa && (this.shader = this.co, !n && this.ho && (this.shader = i,
@@ -7608,7 +7623,7 @@ class mr extends lr {
7608
7623
  this.ho = n;
7609
7624
  }
7610
7625
  getShadowMeshes() {
7611
- if (!this.isVisible()) return pr;
7626
+ if (!this.isVisible()) return yr;
7612
7627
  this.shadowCount = this.scene.getMeshes().length;
7613
7628
  const t = this.scene.getMeshes().filter(t => 0 === t.getUniform("level"));
7614
7629
  for (let e = 0; e < t.length; e++) {
@@ -7618,7 +7633,7 @@ class mr extends lr {
7618
7633
  return t;
7619
7634
  }
7620
7635
  updateSceneConfig(t) {
7621
- re(this.sceneConfig, t), this.setToRedraw();
7636
+ se(this.sceneConfig, t), this.setToRedraw();
7622
7637
  }
7623
7638
  delete() {
7624
7639
  super.delete(), this.disposeIBLTextures(), this.material.dispose(), this.uo && this.uo.dispose(),
@@ -7701,7 +7716,7 @@ class mr extends lr {
7701
7716
  ro(t) {
7702
7717
  const e = t || this.getSymbols()[0].material, i = {};
7703
7718
  let r = !1;
7704
- for (const t in e) if (ge(e, t)) if (t.indexOf("Texture") > 0) {
7719
+ for (const t in e) if (be(e, t)) if (t.indexOf("Texture") > 0) {
7705
7720
  let o = e[t];
7706
7721
  if (!o) {
7707
7722
  i[t] = void 0;
@@ -7731,7 +7746,7 @@ class mr extends lr {
7731
7746
  return this.shader;
7732
7747
  }
7733
7748
  getUniformValues(t, e) {
7734
- const {iblTexes: n, dfgLUT: i} = this.getIBLRes(), r = fr(t, n, i, e && e.ssr, e && e.jitter);
7749
+ const {iblTexes: n, dfgLUT: i} = this.getIBLRes(), r = mr(t, n, i, e && e.ssr, e && e.jitter);
7735
7750
  return this.setIncludeUniformValues(r, e), r;
7736
7751
  }
7737
7752
  bo(t) {
@@ -7744,7 +7759,7 @@ class mr extends lr {
7744
7759
  }
7745
7760
  }
7746
7761
 
7747
- const yr = [], gr = [], vr = [ 0, 0, 0 ], br = [ 0, 0, 0 ], xr = [ 1, 1, 1 ], wr = [], Ar = [ 1, 1, 1, 1 ], kr = [], _r = t => class extends t {
7762
+ const vr = [], br = [], xr = [ 0, 0, 0 ], wr = [ 0, 0, 0 ], Ar = [ 1, 1, 1 ], kr = [], _r = [ 1, 1, 1, 1 ], Sr = [], Tr = t => class extends t {
7748
7763
  constructor(t, e, n, i, r) {
7749
7764
  super(t, e, n, i, r), this.xo = !1, this.scene.sortFunction = this.sortByCommandKey,
7750
7765
  this.wo = [];
@@ -7761,7 +7776,7 @@ const yr = [], gr = [], vr = [ 0, 0, 0 ], br = [ 0, 0, 0 ], xr = [ 1, 1, 1 ], wr
7761
7776
  const {data: n, positionSize: i} = t;
7762
7777
  return {
7763
7778
  geometry: {
7764
- properties: re({}, t.properties),
7779
+ properties: se({}, t.properties),
7765
7780
  data: n,
7766
7781
  positionSize: i,
7767
7782
  features: e
@@ -7770,7 +7785,7 @@ const yr = [], gr = [], vr = [ 0, 0, 0 ], br = [ 0, 0, 0 ], xr = [ 1, 1, 1 ], wr
7770
7785
  };
7771
7786
  }
7772
7787
  getFnTypeConfig() {
7773
- return wr;
7788
+ return kr;
7774
7789
  }
7775
7790
  createMesh(t, e, {tileTranslationMatrix: o, tileExtent: s}) {
7776
7791
  const a = this.getMap(), {geometry: l} = t, {positionSize: c, features: h} = l, {aPosition: u} = l.data, d = u.length / c;
@@ -7797,7 +7812,7 @@ const yr = [], gr = [], vr = [ 0, 0, 0 ], br = [ 0, 0, 0 ], xr = [ 1, 1, 1 ], wr
7797
7812
  const {translation: l, rotation: c, scale: u, fixSizeOnZoom: g} = e, v = this.To([], l, c, u);
7798
7813
  let b = 0;
7799
7814
  s.forEach(t => {
7800
- const {geometry: n, nodeMatrix: i} = t, o = r.multiply(kr, v, i), s = n.boundingBox.copy();
7815
+ const {geometry: n, nodeMatrix: i} = t, o = r.multiply(Sr, v, i), s = n.boundingBox.copy();
7801
7816
  s.transform(o);
7802
7817
  const a = this.Mo(s, e);
7803
7818
  a > b && (b = a);
@@ -7810,12 +7825,12 @@ const yr = [], gr = [], vr = [ 0, 0, 0 ], br = [ 0, 0, 0 ], xr = [ 1, 1, 1 ], wr
7810
7825
  m && (k.setUniform("jointTexture", m.jointTexture), k.setUniform("jointTextureSize", m.jointTextureSize),
7811
7826
  k.setUniform("numJoints", m.numJoints), k.setUniform("skinAnimation", 0), A.HAS_SKIN = 1),
7812
7827
  y && (k.setUniform("morphWeights", y), A.HAS_MORPH = 1), k.setUniform("hasAlpha", b.alphaMode && "BLEND" === b.alphaMode.toUpperCase()),
7813
- ce(k.uniforms, "polygonFill", e, "polygonFill", Ar, de(this.colorCache)), ce(k.uniforms, "polygonOpacity", e, "polygonOpacity", 1);
7828
+ ue(k.uniforms, "polygonFill", e, "polygonFill", _r, pe(this.colorCache)), ue(k.uniforms, "polygonOpacity", e, "polygonOpacity", 1);
7814
7829
  const _ = r.multiply([], v, c), S = [];
7815
7830
  return r.fromTranslation(S, x), r.multiply(_, S, _), k.setPositionMatrix(() => {
7816
- if (me(g)) {
7831
+ if (ge(g)) {
7817
7832
  const t = a.getGLScale() / a.getGLScale(g);
7818
- return i.set(yr, t, t, t), r.fromScaling(S, yr), r.multiply(S, S, _);
7833
+ return i.set(vr, t, t, t), r.fromScaling(S, vr), r.multiply(S, S, _);
7819
7834
  }
7820
7835
  return _;
7821
7836
  }), k.setLocalTransform(o), l.generateBuffers(this.regl, {
@@ -7861,13 +7876,13 @@ const yr = [], gr = [], vr = [ 0, 0, 0 ], br = [ 0, 0, 0 ], xr = [ 1, 1, 1 ], wr
7861
7876
  n || (n = !0);
7862
7877
  let e = r.speed;
7863
7878
  const o = !!r.loop;
7864
- ae(e) && (e = 1), this.Ao[i].updateAnimation(t.timestamp, o, e);
7879
+ ce(e) && (e = 1), this.Ao[i].updateAnimation(t.timestamp, o, e);
7865
7880
  }
7866
7881
  }
7867
7882
  n && this.setToRedraw(!0), super.prepareRender(t);
7868
7883
  }
7869
7884
  getShadowMeshes() {
7870
- if (!this.isVisible()) return wr;
7885
+ if (!this.isVisible()) return kr;
7871
7886
  this.shadowCount = this.scene.getMeshes().length;
7872
7887
  return this.scene.getMeshes().filter(t => 0 === t.getUniform("level"));
7873
7888
  }
@@ -7933,31 +7948,31 @@ const yr = [], gr = [], vr = [ 0, 0, 0 ], br = [ 0, 0, 0 ], xr = [ 1, 1, 1 ], wr
7933
7948
  }
7934
7949
  }
7935
7950
  To(t, e, n, o) {
7936
- const s = i.set(yr, ...e || vr), a = n || br, l = o || xr, c = h.fromEuler(gr, a[0], a[1], a[2]);
7951
+ const s = i.set(vr, ...e || xr), a = n || wr, l = o || Ar, c = h.fromEuler(br, a[0], a[1], a[2]);
7937
7952
  return r.fromRotationTranslationScale(t, c, s, l);
7938
7953
  }
7939
7954
  };
7940
7955
 
7941
- class Sr extends(_r(hr)){
7956
+ class Mr extends(Tr(dr)){
7942
7957
  getMaterialClazz(t) {
7943
7958
  return t.diffuseFactor ? n.PhongSpecularGlossinessMaterial : n.PhongMaterial;
7944
7959
  }
7945
7960
  }
7946
7961
 
7947
- class Tr extends(_r(mr)){
7962
+ class Pr extends(Tr(gr)){
7948
7963
  getMaterialClazz(t) {
7949
7964
  return t.specularGlossinessTexture || t.diffuseTexture ? n.pbr.StandardSpecularGlossinessMaterial : n.pbr.StandardMaterial;
7950
7965
  }
7951
7966
  }
7952
7967
 
7953
- const Mr = {
7968
+ const Ir = {
7954
7969
  color: [ 2.0303, 2.028, 2.028 ],
7955
7970
  direction: [ 0, -.2717, -1 ]
7956
- }, Pr = {
7971
+ }, Or = {
7957
7972
  index: 0
7958
- }, Ir = [ 0, 0, 0 ];
7973
+ }, Cr = [ 0, 0, 0 ];
7959
7974
 
7960
- class Or extends Ue {
7975
+ class Fr extends Ge {
7961
7976
  supportRenderMode(t) {
7962
7977
  return "fxaa" === t || "fxaaBeforeTaa" === t;
7963
7978
  }
@@ -7965,7 +7980,7 @@ class Or extends Ue {
7965
7980
  return !0;
7966
7981
  }
7967
7982
  needToRedraw() {
7968
- return this.getSymbol(Pr).animation;
7983
+ return this.getSymbol(Or).animation;
7969
7984
  }
7970
7985
  createMesh(t, e) {
7971
7986
  const {geometry: i} = t;
@@ -7974,7 +7989,7 @@ class Or extends Ue {
7974
7989
  castShadow: !1,
7975
7990
  picking: !0
7976
7991
  });
7977
- return r.properties.symbolIndex = Pr, r.setLocalTransform(e), r;
7992
+ return r.properties.symbolIndex = Or, r.setLocalTransform(e), r;
7978
7993
  }
7979
7994
  callShader(t, e) {
7980
7995
  super.callShader(t, e), this.transformWater();
@@ -7985,15 +8000,15 @@ class Or extends Ue {
7985
8000
  this.ri(t, e), super.addMesh(...arguments);
7986
8001
  }
7987
8002
  ri(t) {
7988
- const e = this.getSymbol(Pr).ssr;
8003
+ const e = this.getSymbol(Or).ssr;
7989
8004
  for (let n = 0; n < t.length; n++) t[n].ssr = e ? 1 : 0;
7990
8005
  }
7991
8006
  paint(t) {
7992
8007
  t.states && t.states.includesChanged && (this.shader.dispose(), this.Oo.dispose(),
7993
8008
  this.ei(t));
7994
- const e = !!t.ssr && this.getSymbol(Pr).ssr, n = this.Oo, i = n.shaderDefines;
8009
+ const e = !!t.ssr && this.getSymbol(Or).ssr, n = this.Oo, i = n.shaderDefines;
7995
8010
  if (e) {
7996
- const e = re({}, i, t.ssr.defines);
8011
+ const e = se({}, i, t.ssr.defines);
7997
8012
  n.shaderDefines = e;
7998
8013
  }
7999
8014
  this.updateIBLDefines(n), this.Fo.ssr = e ? 1 : 0, super.paint(t), e && (n.shaderDefines = i);
@@ -8002,7 +8017,7 @@ class Or extends Ue {
8002
8017
  this.createIBLTextures();
8003
8018
  const e = this.regl;
8004
8019
  this.renderer = new n.Renderer(e), this.createGround(), this.ei(t), this.pickingFBO && (this.picking = [ new n.FBORayPicking(this.renderer, {
8005
- vert: qe,
8020
+ vert: We,
8006
8021
  uniforms: [ {
8007
8022
  name: "projViewModelMatrix",
8008
8023
  type: "function",
@@ -8166,7 +8181,7 @@ class Or extends Ue {
8166
8181
  Io(t, e) {
8167
8182
  const {iblTexes: n} = this.getIBLRes(), i = t.projViewMatrix, r = t.getLightManager();
8168
8183
  let o = r && r.getDirectionalLight() || {};
8169
- const s = r && r.getAmbientLight() || {}, a = this.getSymbol(Pr), l = this.Lo = this.Lo || [], c = {
8184
+ const s = r && r.getAmbientLight() || {}, a = this.getSymbol(Or), l = this.Lo = this.Lo || [], c = {
8170
8185
  hdrHsv: s.hsv || [ 0, 0, 0 ],
8171
8186
  specularPBR: n && n.prefilterMap,
8172
8187
  rgbmRange: n && n.rgbmRange,
@@ -8176,19 +8191,19 @@ class Or extends Ue {
8176
8191
  projViewMatrix: i,
8177
8192
  viewMatrix: t.viewMatrix,
8178
8193
  cameraNearFar: [ t.cameraNear, t.cameraFar ],
8179
- lightDirection: o.direction || Mr.direction,
8180
- lightColor: o.color || Mr.color,
8194
+ lightDirection: o.direction || Ir.direction,
8195
+ lightColor: o.color || Ir.color,
8181
8196
  camPos: t.cameraPosition,
8182
8197
  timeElapsed: a.animation ? (this.layer.getRenderer().getFrameTimestamp() || 0) / (1 / (a.waterSpeed || 1) * 1e4) : 0,
8183
8198
  normalTexture: this.Do || this.Eo,
8184
8199
  heightTexture: this.No || this.Eo,
8185
8200
  waveParams: [ .09, a.uvScale || 3, .03, -.5 ],
8186
- waterDir: Cr(l, a.waterDirection || 0),
8201
+ waterDir: zr(l, a.waterDirection || 0),
8187
8202
  waterBaseColor: a.waterBaseColor || [ .1451, .2588, .4863, 1 ],
8188
8203
  contrast: a.contrast || 1,
8189
- hsv: a.hsv || Ir
8204
+ hsv: a.hsv || Cr
8190
8205
  };
8191
- return this.setIncludeUniformValues(c, e), e && e.ssr && e.ssr.renderUniforms && re(c, e.ssr.renderUniforms),
8206
+ return this.setIncludeUniformValues(c, e), e && e.ssr && e.ssr.renderUniforms && se(c, e.ssr.renderUniforms),
8192
8207
  c;
8193
8208
  }
8194
8209
  delete() {
@@ -8213,58 +8228,58 @@ class Or extends Ue {
8213
8228
  }
8214
8229
  }
8215
8230
 
8216
- function Cr(t, e) {
8231
+ function zr(t, e) {
8217
8232
  var n;
8218
8233
  return n = e, e = Math.PI * n / 180, t[0] = Math.sin(e), t[1] = Math.cos(e), t;
8219
8234
  }
8220
8235
 
8221
- const Fr = ne("fill", Be);
8236
+ const Er = re("fill", $e);
8222
8237
 
8223
- Fr.registerAt(pt);
8238
+ Er.registerAt(yt);
8224
8239
 
8225
- const zr = ne("line", $e);
8240
+ const jr = re("line", Ye);
8226
8241
 
8227
- zr.registerAt(pt);
8242
+ jr.registerAt(yt);
8228
8243
 
8229
- const Er = ne("line-gradient", Je);
8244
+ const Dr = re("line-gradient", Ze);
8230
8245
 
8231
- Er.registerAt(pt);
8246
+ Dr.registerAt(yt);
8232
8247
 
8233
- const jr = ne("icon", gi);
8248
+ const Rr = re("icon", bi);
8234
8249
 
8235
- jr.registerAt(pt);
8250
+ Rr.registerAt(yt);
8236
8251
 
8237
- const Dr = ne("text", Zi);
8252
+ const Nr = re("text", Qi);
8238
8253
 
8239
- Dr.registerAt(pt);
8254
+ Nr.registerAt(yt);
8240
8255
 
8241
- const Rr = ne("native-line", rr);
8256
+ const Lr = re("native-line", sr);
8242
8257
 
8243
- Rr.registerAt(pt);
8258
+ Lr.registerAt(yt);
8244
8259
 
8245
- ne("native-point", nr).registerAt(pt);
8260
+ re("native-point", rr).registerAt(yt);
8246
8261
 
8247
- const Nr = ne("phong", hr);
8262
+ const Hr = re("phong", dr);
8248
8263
 
8249
- Nr.registerAt(pt);
8264
+ Hr.registerAt(yt);
8250
8265
 
8251
- const Lr = ne("wireframe", dr);
8266
+ const Vr = re("wireframe", pr);
8252
8267
 
8253
- Lr.registerAt(pt);
8268
+ Vr.registerAt(yt);
8254
8269
 
8255
- const Hr = ne("lit", mr);
8270
+ const Ur = re("lit", gr);
8256
8271
 
8257
- Hr.registerAt(pt);
8272
+ Ur.registerAt(yt);
8258
8273
 
8259
- const Vr = ne("gltf-phong", Sr);
8274
+ const qr = re("gltf-phong", Mr);
8260
8275
 
8261
- Vr.registerAt(pt);
8276
+ qr.registerAt(yt);
8262
8277
 
8263
- const Ur = ne("gltf-lit", Tr);
8278
+ const Gr = re("gltf-lit", Pr);
8264
8279
 
8265
- Ur.registerAt(pt);
8280
+ Gr.registerAt(yt);
8266
8281
 
8267
- const qr = ne("heatmap", class extends Ue {
8282
+ const Wr = re("heatmap", class extends Ge {
8268
8283
  createFnTypeConfig(t, e) {
8269
8284
  const n = m(e.heatWeight), i = new Int16Array(1);
8270
8285
  return [ {
@@ -8281,14 +8296,14 @@ const qr = ne("heatmap", class extends Ue {
8281
8296
  createMesh(t, e) {
8282
8297
  const {geometry: i, symbolIndex: r, ref: o} = t;
8283
8298
  if (void 0 === o) {
8284
- we(i, this.getSymbolDef(r), this.getFnTypeConfig(r));
8299
+ ke(i, this.getSymbolDef(r), this.getFnTypeConfig(r));
8285
8300
  }
8286
8301
  const s = this.getSymbol(r), a = {
8287
8302
  tileRatio: i.properties.tileRatio,
8288
8303
  dataResolution: i.properties.tileResolution
8289
8304
  };
8290
- ce(a, "heatmapIntensity", s, "heatmapIntensity", 1), ce(a, "heatmapRadius", s, "heatmapRadius", 6),
8291
- ce(a, "heatmapWeight", s, "heatmapWeight", 1), ce(a, "heatmapOpacity", s, "heatmapOpacity", 1),
8305
+ ue(a, "heatmapIntensity", s, "heatmapIntensity", 1), ue(a, "heatmapRadius", s, "heatmapRadius", 6),
8306
+ ue(a, "heatmapWeight", s, "heatmapWeight", 1), ue(a, "heatmapOpacity", s, "heatmapOpacity", 1),
8292
8307
  i.generateBuffers(this.regl);
8293
8308
  const l = new n.Material(a), c = new n.Mesh(i, l, {
8294
8309
  transparent: !0,
@@ -8340,14 +8355,14 @@ const qr = ne("heatmap", class extends Ue {
8340
8355
  }
8341
8356
  });
8342
8357
 
8343
- qr.registerAt(pt);
8358
+ Wr.registerAt(yt);
8344
8359
 
8345
- const Gr = ne("water", Or);
8360
+ const Br = re("water", Fr);
8346
8361
 
8347
- Gr.registerAt(pt), St.registerPainter("lit", mr), St.registerPainter("icon", gi),
8348
- St.registerPainter("fill", Be), St.registerPainter("line", $e), St.registerPainter("line-gradient", Je),
8349
- St.registerPainter("water", Or), n.ShaderLib.register("vt_position_vert", "#ifdef HAS_ALTITUDE\n vec3 unpackVTPosition() {\n return vec3(aPosition, aAltitude);\n }\n#else\n float position_modValue = 16384.0;\n float position_delta = 0.00001;\n vec3 unpackVTPosition() {\n float z = aPosition.z;\n vec2 pos = sign(aPosition.xy + position_delta) * mod(abs(aPosition.xy), position_modValue);\n vec2 highs = floor(abs(aPosition.xy) / position_modValue);\n float altitude = sign(z + position_delta) * (highs.x * 2.0 + highs.y) * pow(2.0, 15.0) + z;\n return vec3(pos, altitude);\n }\n#endif"),
8350
- pt.VERSION = "0.67.1", St.VERSION = "0.67.1";
8362
+ Br.registerAt(yt), Mt.registerPainter("lit", gr), Mt.registerPainter("icon", bi),
8363
+ Mt.registerPainter("fill", $e), Mt.registerPainter("line", Ye), Mt.registerPainter("line-gradient", Ze),
8364
+ Mt.registerPainter("water", Fr), n.ShaderLib.register("vt_position_vert", "#ifdef HAS_ALTITUDE\n vec3 unpackVTPosition() {\n return vec3(aPosition, aAltitude);\n }\n#else\n float position_modValue = 16384.0;\n float position_delta = 0.00001;\n vec3 unpackVTPosition() {\n float z = aPosition.z;\n vec2 pos = sign(aPosition.xy + position_delta) * mod(abs(aPosition.xy), position_modValue);\n vec2 highs = floor(abs(aPosition.xy) / position_modValue);\n float altitude = sign(z + position_delta) * (highs.x * 2.0 + highs.y) * pow(2.0, 15.0) + z;\n return vec3(pos, altitude);\n }\n#endif"),
8365
+ yt.VERSION = "0.67.2", Mt.VERSION = "0.67.2";
8351
8366
 
8352
8367
  if (e.mat4.create(), e.transcoders) {
8353
8368
  const n = t.Map.VERSION;
@@ -8359,6 +8374,6 @@ if (e.mat4.create(), e.transcoders) {
8359
8374
  }));
8360
8375
  } else t.registerWorkerAdapter("@maptalks/vt", j);
8361
8376
 
8362
- export { Be as FillPainter, Fr as FillPlugin, Vr as GLTFPhongPlugin, Ur as GLTFStandardPlugin, At as GeoJSONVectorTileLayer, qr as HeatmapPlugin, gi as IconPainter, jr as IconPlugin, Er as LineGradientPlugin, $e as LinePainter, zr as LinePlugin, Jt as LineStringLayer, Hr as LitPlugin, xt as MapboxVectorTileLayer, rr as NativeLinePainter, Rr as NativeLinePlugin, nr as NativePointPainter, hr as PhongPainter, Nr as PhongPlugin, $t as PointLayer, Zt as PolygonLayer, Zi as TextPainter, Dr as TextPlugin, St as Vector3DLayer, pt as VectorTileLayer, st as VectorTileLayerRenderer, Gr as WaterPlugin, dr as WireframePainter, Lr as WireframePlugin };
8377
+ export { $e as FillPainter, Er as FillPlugin, qr as GLTFPhongPlugin, Gr as GLTFStandardPlugin, _t as GeoJSONVectorTileLayer, Wr as HeatmapPlugin, bi as IconPainter, Rr as IconPlugin, Dr as LineGradientPlugin, Ye as LinePainter, jr as LinePlugin, Zt as LineStringLayer, Ur as LitPlugin, At as MapboxVectorTileLayer, sr as NativeLinePainter, Lr as NativeLinePlugin, rr as NativePointPainter, dr as PhongPainter, Hr as PhongPlugin, Yt as PointLayer, Qt as PolygonLayer, Qi as TextPainter, Nr as TextPlugin, Mt as Vector3DLayer, yt as VectorTileLayer, lt as VectorTileLayerRenderer, Br as WaterPlugin, pr as WireframePainter, Vr as WireframePlugin };
8363
8378
 
8364
- "undefined" != typeof console && console.log("@maptalks/vt v0.67.1");
8379
+ "undefined" != typeof console && console.log("@maptalks/vt v0.67.2");