PageSourceSearch

https://www.nybolig.dk/assets-nyk/vendor.BE3a6uhb.js

js nybolig.dk collected 2026-10-02 06:53:26 UTC 1,770,592 bytes, 38,724 lines download raw bytes

vendor: 104,106 bytes, lines 1-4037
1/**
2* @vue/shared v3.4.29
3* (c) 2018-present Yuxi (Evan) You and Vue contributors
4* @license MIT
5**/
6/*! #__NO_SIDE_EFFECTS__ */
7// @__NO_SIDE_EFFECTS__
8function ro(e, t) {
9  const s = new Set(e.split(","));
10  return t ? (l) => s.has(l.toLowerCase()) : (l) => s.has(l);
11}
12const Kr = {}, th = [], di = () => {
13}, Bp = () => !1, su = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // uppercase letter
14(e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97), rb = (e) => e.startsWith("onUpdate:"), Hr = Object.assign, nb = (e, t) => {
15  const s = e.indexOf(t);
16  s > -1 && e.splice(s, 1);
17}, mD = Object.prototype.hasOwnProperty, Zr = (e, t) => mD.call(e, t), jt = Array.isArray, rh = (e) => Sh(e) === "[object Map]", ou = (e) => Sh(e) === "[object Set]", N1 = (e) => Sh(e) === "[object Date]", gD = (e) => Sh(e) === "[object RegExp]", ar = (e) => typeof e == "function", vr = (e) => typeof e == "string", Eo = (e) => typeof e == "symbol", hn = (e) => e !== null && typeof e == "object", ib = (e) => (hn(e) || ar(e)) && ar(e.then) && ar(e.catch), PE = Object.prototype.toString, Sh = (e) => PE.call(e), yD = (e) => Sh(e).slice(8, -1), ME = (e) => Sh(e) === "[object Object]", sb = (e) => vr(e) && e !== "NaN" && e[0] !== "-" && "" + parseInt(e, 10) === e, Jl = /* @__PURE__ */ ro(
18  // the leading comma is intentional so empty string "" is also included
19  ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
20), _D = /* @__PURE__ */ ro(
21  "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
22), Km = (e) => {
23  const t = /* @__PURE__ */ Object.create(null);
24  return (s) => t[s] || (t[s] = e(s));
25}, vD = /-(\w)/g, Fn = Km((e) => e.replace(vD, (t, s) => s ? s.toUpperCase() : "")), bD = /\B([A-Z])/g, to = Km(
26  (e) => e.replace(bD, "-$1").toLowerCase()
27), ic = Km((e) => e.charAt(0).toUpperCase() + e.slice(1)), Uc = Km((e) => e ? `on${ic(e)}` : ""), Uo = (e, t) => !Object.is(e, t), nh = (e, ...t) => {
28  for (let s = 0; s < e.length; s++)
29    e[s](...t);
30}, kE = (e, t, s, l = !1) => {
31  Object.defineProperty(e, t, {
32    configurable: !0,
33    enumerable: !1,
34    writable: l,
35    value: s
36  });
37}, om = (e) => {
38  const t = parseFloat(e);
39  return isNaN(t) ? e : t;
40}, am = (e) => {
41  const t = vr(e) ? Number(e) : NaN;
42  return isNaN(t) ? e : t;
43};
44let $1;
45const OE = () => $1 || ($1 = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {}), xD = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error", wD = /* @__PURE__ */ ro(xD);
46function Th(e) {
47  if (jt(e)) {
48    const t = {};
49    for (let s = 0; s < e.length; s++) {
50      const l = e[s], h = vr(l) ? DE(l) : Th(l);
51      if (h)
52        for (const g in h)
53          t[g] = h[g];
54    }
55    return t;
56  } else if (vr(e) || hn(e))
57    return e;
58}
59const SD = /;(?![^(]*\))/g, TD = /:([^]+)/, ED = /\/\*[^]*?\*\//g;
60function DE(e) {
61  const t = {};
62  return e.replace(ED, "").split(SD).forEach((s) => {
63    if (s) {
64      const l = s.split(TD);
65      l.length > 1 && (t[l[0].trim()] = l[1].trim());
66    }
67  }), t;
68}
69function Eh(e) {
70  let t = "";
71  if (vr(e))
72    t = e;
73  else if (jt(e))
74    for (let s = 0; s < e.length; s++) {
75      const l = Eh(e[s]);
76      l && (t += l + " ");
77    }
78  else if (hn(e))
79    for (const s in e)
80      e[s] && (t += s + " ");
81  return t.trim();
82}
83function RE(e) {
84  if (!e) return null;
85  let { class: t, style: s } = e;
86  return t && !vr(t) && (e.class = Eh(t)), s && (e.style = Th(s)), e;
87}
88const AD = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot", CD = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view", ID = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics", PD = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr", MD = /* @__PURE__ */ ro(AD), kD = /* @__PURE__ */ ro(CD), OD = /* @__PURE__ */ ro(ID), DD = /* @__PURE__ */ ro(PD), RD = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly", LD = /* @__PURE__ */ ro(RD);
89function LE(e) {
90  return !!e || e === "";
91}
92function FD(e, t) {
93  if (e.length !== t.length) return !1;
94  let s = !0;
95  for (let l = 0; s && l < e.length; l++)
96    s = tc(e[l], t[l]);
97  return s;
98}
99function tc(e, t) {
100  if (e === t) return !0;
101  let s = N1(e), l = N1(t);
102  if (s || l)
103    return s && l ? e.getTime() === t.getTime() : !1;
104  if (s = Eo(e), l = Eo(t), s || l)
105    return e === t;
106  if (s = jt(e), l = jt(t), s || l)
107    return s && l ? FD(e, t) : !1;
108  if (s = hn(e), l = hn(t), s || l) {
109    if (!s || !l)
110      return !1;
111    const h = Object.keys(e).length, g = Object.keys(t).length;
112    if (h !== g)
113      return !1;
114    for (const m in e) {
115      const c = e.hasOwnProperty(m), w = t.hasOwnProperty(m);
116      if (c && !w || !c && w || !tc(e[m], t[m]))
117        return !1;
118    }
119  }
120  return String(e) === String(t);
121}
122function Xm(e, t) {
123  return e.findIndex((s) => tc(s, t));
124}
125const FE = (e) => vr(e) ? e : e == null ? "" : jt(e) || hn(e) && (e.toString === PE || !ar(e.toString)) ? JSON.stringify(e, zE, 2) : String(e), zE = (e, t) => t && t.__v_isRef ? zE(e, t.value) : rh(t) ? {
126  [`Map(${t.size})`]: [...t.entries()].reduce(
127    (s, [l, h], g) => (s[Gy(l, g) + " =>"] = h, s),
128    {}
129  )
130} : ou(t) ? {
131  [`Set(${t.size})`]: [...t.values()].map((s) => Gy(s))
132} : Eo(t) ? Gy(t) : hn(t) && !jt(t) && !ME(t) ? String(t) : t, Gy = (e, t = "") => {
133  var s;
134  return (
135    // Symbol.description in es2019+ so we need to cast here to pass
136    // the lib: es2016 check
137    Eo(e) ? `Symbol(${(s = e.description) != null ? s : t})` : e
138  );
139};
140/**
141* @vue/reactivity v3.4.29
142* (c) 2018-present Yuxi (Evan) You and Vue contributors
143* @license MIT
144**/
145let Ys;
146class Jm {
147  constructor(t = !1) {
148    this.detached = t, this._active = !0, this.effects = [], this.cleanups = [], this.parent = Ys, !t && Ys && (this.index = (Ys.scopes || (Ys.scopes = [])).push(
149      this
150    ) - 1);
151  }
152  get active() {
153    return this._active;
154  }
155  run(t) {
156    if (this._active) {
157      const s = Ys;
158      try {
159        return Ys = this, t();
160      } finally {
161        Ys = s;
162      }
163    }
164  }
165  /**
166   * This should only be called on non-detached scopes
167   * @internal
168   */
169  on() {
170    Ys = this;
171  }
172  /**
173   * This should only be called on non-detached scopes
174   * @internal
175   */
176  off() {
177    Ys = this.parent;
178  }
179  stop(t) {
180    if (this._active) {
181      let s, l;
182      for (s = 0, l = this.effects.length; s < l; s++)
183        this.effects[s].stop();
184      for (s = 0, l = this.cleanups.length; s < l; s++)
185        this.cleanups[s]();
186      if (this.scopes)
187        for (s = 0, l = this.scopes.length; s < l; s++)
188          this.scopes[s].stop(!0);
189      if (!this.detached && this.parent && !t) {
190        const h = this.parent.scopes.pop();
191        h && h !== this && (this.parent.scopes[this.index] = h, h.index = this.index);
192      }
193      this.parent = void 0, this._active = !1;
194    }
195  }
196}
197function BE(e) {
198  return new Jm(e);
199}
200function NE(e, t = Ys) {
201  t && t.active && t.effects.push(e);
202}
203function ob() {
204  return Ys;
205}
206function $E(e) {
207  Ys && Ys.cleanups.push(e);
208}
209let qc;
210class Jc {
211  constructor(t, s, l, h) {
212    this.fn = t, this.trigger = s, this.scheduler = l, this.active = !0, this.deps = [], this._dirtyLevel = 5, this._trackId = 0, this._runnings = 0, this._shouldSchedule = !1, this._depsLength = 0, NE(this, h);
213  }
214  get dirty() {
215    if (this._dirtyLevel === 2)
216      return !1;
217    if (this._dirtyLevel === 3 || this._dirtyLevel === 4) {
218      this._dirtyLevel = 1, sc();
219      for (let t = 0; t < this._depsLength; t++) {
220        const s = this.deps[t];
221        if (s.computed) {
222          if (s.computed.effect._dirtyLevel === 2)
223            return !0;
224          if (zD(s.computed), this._dirtyLevel >= 5)
225            break;
226        }
227      }
228      this._dirtyLevel === 1 && (this._dirtyLevel = 0), oc();
229    }
230    return this._dirtyLevel >= 5;
231  }
232  set dirty(t) {
233    this._dirtyLevel = t ? 5 : 0;
234  }
235  run() {
236    if (this._dirtyLevel = 0, !this.active)
237      return this.fn();
238    let t = Yl, s = qc;
239    try {
240      return Yl = !0, qc = this, this._runnings++, j1(this), this.fn();
241    } finally {
242      V1(this), this._runnings--, qc = s, Yl = t;
243    }
244  }
245  stop() {
246    this.active && (j1(this), V1(this), this.onStop && this.onStop(), this.active = !1);
247  }
248}
249function zD(e) {
250  return e.value;
251}
252function j1(e) {
253  e._trackId++, e._depsLength = 0;
254}
255function V1(e) {
256  if (e.deps.length > e._depsLength) {
257    for (let t = e._depsLength; t < e.deps.length; t++)
258      jE(e.deps[t], e);
259    e.deps.length = e._depsLength;
260  }
261}
262function jE(e, t) {
263  const s = e.get(t);
264  s !== void 0 && t._trackId !== s && (e.delete(t), e.size === 0 && e.cleanup());
265}
266function VE(e, t) {
267  e.effect instanceof Jc && (e = e.effect.fn);
268  const s = new Jc(e, di, () => {
269    s.dirty && s.run();
270  });
271  t && (Hr(s, t), t.scope && NE(s, t.scope)), (!t || !t.lazy) && s.run();
272  const l = s.run.bind(s);
273  return l.effect = s, l;
274}
275function UE(e) {
276  e.effect.stop();
277}
278let Yl = !0, V_ = 0;
279const qE = [];
280function sc() {
281  qE.push(Yl), Yl = !1;
282}
283function oc() {
284  const e = qE.pop();
285  Yl = e === void 0 ? !0 : e;
286}
287function ab() {
288  V_++;
289}
290function lb() {
291  for (V_--; !V_ && U_.length; )
292    U_.shift()();
293}
294function HE(e, t, s) {
295  if (t.get(e) !== e._trackId) {
296    t.set(e, e._trackId);
297    const l = e.deps[e._depsLength];
298    l !== t ? (l && jE(l, e), e.deps[e._depsLength++] = t) : e._depsLength++;
299  }
300}
301const U_ = [];
302function GE(e, t, s) {
303  ab();
304  for (const l of e.keys()) {
305    if (!e.computed && l.computed && e.get(l) === l._trackId && l._runnings > 0) {
306      l._dirtyLevel = 2;
307      continue;
308    }
309    let h;
310    l._dirtyLevel < t && (h ?? (h = e.get(l) === l._trackId)) && (l._shouldSchedule || (l._shouldSchedule = l._dirtyLevel === 0), l.computed && l._dirtyLevel === 2 && (l._shouldSchedule = !0), l._dirtyLevel = t), l._shouldSchedule && (h ?? (h = e.get(l) === l._trackId)) && (l.trigger(), (!l._runnings || l.allowRecurse) && l._dirtyLevel !== 3 && (l._shouldSchedule = !1, l.scheduler && U_.push(l.scheduler)));
311  }
312  lb();
313}
314const ZE = (e, t) => {
315  const s = /* @__PURE__ */ new Map();
316  return s.cleanup = e, s.computed = t, s;
317}, lm = /* @__PURE__ */ new WeakMap(), Hc = Symbol(""), q_ = Symbol("");
318function Ds(e, t, s) {
319  if (Yl && qc) {
320    let l = lm.get(e);
321    l || lm.set(e, l = /* @__PURE__ */ new Map());
322    let h = l.get(s);
323    h || l.set(s, h = ZE(() => l.delete(s))), HE(
324      qc,
325      h
326    );
327  }
328}
329function el(e, t, s, l, h, g) {
330  const m = lm.get(e);
331  if (!m)
332    return;
333  let c = [];
334  if (t === "clear")
335    c = [...m.values()];
336  else if (s === "length" && jt(e)) {
337    const w = Number(l);
338    m.forEach((O, P) => {
339      (P === "length" || !Eo(P) && P >= w) && c.push(O);
340    });
341  } else
342    switch (s !== void 0 && c.push(m.get(s)), t) {
343      case "add":
344        jt(e) ? sb(s) && c.push(m.get("length")) : (c.push(m.get(Hc)), rh(e) && c.push(m.get(q_)));
345        break;
346      case "delete":
347        jt(e) || (c.push(m.get(Hc)), rh(e) && c.push(m.get(q_)));
348        break;
349      case "set":
350        rh(e) && c.push(m.get(Hc));
351        break;
352    }
353  ab();
354  for (const w of c)
355    w && GE(
356      w,
357      5
358    );
359  lb();
360}
361function BD(e, t) {
362  const s = lm.get(e);
363  return s && s.get(t);
364}
365const ND = /* @__PURE__ */ ro("__proto__,__v_isRef,__isVue"), WE = new Set(
366  /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(Eo)
367), U1 = /* @__PURE__ */ $D();
368function $D() {
369  const e = {};
370  return ["includes", "indexOf", "lastIndexOf"].forEach((t) => {
371    e[t] = function(...s) {
372      const l = Nr(this);
373      for (let g = 0, m = this.length; g < m; g++)
374        Ds(l, "get", g + "");
375      const h = l[t](...s);
376      return h === -1 || h === !1 ? l[t](...s.map(Nr)) : h;
377    };
378  }), ["push", "pop", "shift", "unshift", "splice"].forEach((t) => {
379    e[t] = function(...s) {
380      sc(), ab();
381      const l = Nr(this)[t].apply(this, s);
382      return lb(), oc(), l;
383    };
384  }), e;
385}
386function jD(e) {
387  Eo(e) || (e = String(e));
388  const t = Nr(this);
389  return Ds(t, "has", e), t.hasOwnProperty(e);
390}
391class KE {
392  constructor(t = !1, s = !1) {
393    this._isReadonly = t, this._isShallow = s;
394  }
395  get(t, s, l) {
396    const h = this._isReadonly, g = this._isShallow;
397    if (s === "__v_isReactive")
398      return !h;
399    if (s === "__v_isReadonly")
400      return h;
401    if (s === "__v_isShallow")
402      return g;
403    if (s === "__v_raw")
404      return l === (h ? g ? t2 : e2 : g ? QE : YE).get(t) || // receiver is not the reactive proxy, but has the same prototype
405      // this means the reciever is a user proxy of the reactive proxy
406      Object.getPrototypeOf(t) === Object.getPrototypeOf(l) ? t : void 0;
407    const m = jt(t);
408    if (!h) {
409      if (m && Zr(U1, s))
410        return Reflect.get(U1, s, l);
411      if (s === "hasOwnProperty")
412        return jD;
413    }
414    const c = Reflect.get(t, s, l);
415    return (Eo(s) ? WE.has(s) : ND(s)) || (h || Ds(t, "get", s), g) ? c : Ii(c) ? m && sb(s) ? c : c.value : hn(c) ? h ? eg(c) : au(c) : c;
416  }
417}
418class XE extends KE {
419  constructor(t = !1) {
420    super(!1, t);
421  }
422  set(t, s, l, h) {
423    let g = t[s];
424    if (!this._isShallow) {
425      const w = Yc(g);
426      if (!hh(l) && !Yc(l) && (g = Nr(g), l = Nr(l)), !jt(t) && Ii(g) && !Ii(l))
427        return w ? !1 : (g.value = l, !0);
428    }
429    const m = jt(t) && sb(s) ? Number(s) < t.length : Zr(t, s), c = Reflect.set(t, s, l, h);
430    return t === Nr(h) && (m ? Uo(l, g) && el(t, "set", s, l) : el(t, "add", s, l)), c;
431  }
432  deleteProperty(t, s) {
433    const l = Zr(t, s);
434    t[s];
435    const h = Reflect.deleteProperty(t, s);
436    return h && l && el(t, "delete", s, void 0), h;
437  }
438  has(t, s) {
439    const l = Reflect.has(t, s);
440    return (!Eo(s) || !WE.has(s)) && Ds(t, "has", s), l;
441  }
442  ownKeys(t) {
443    return Ds(
444      t,
445      "iterate",
446      jt(t) ? "length" : Hc
447    ), Reflect.ownKeys(t);
448  }
449}
450class JE extends KE {
451  constructor(t = !1) {
452    super(!0, t);
453  }
454  set(t, s) {
455    return !0;
456  }
457  deleteProperty(t, s) {
458    return !0;
459  }
460}
461const VD = /* @__PURE__ */ new XE(), UD = /* @__PURE__ */ new JE(), qD = /* @__PURE__ */ new XE(
462  !0
463), HD = /* @__PURE__ */ new JE(!0), cb = (e) => e, Ym = (e) => Reflect.getPrototypeOf(e);
464function _p(e, t, s = !1, l = !1) {
465  e = e.__v_raw;
466  const h = Nr(e), g = Nr(t);
467  s || (Uo(t, g) && Ds(h, "get", t), Ds(h, "get", g));
468  const { has: m } = Ym(h), c = l ? cb : s ? fb : Kf;
469  if (m.call(h, t))
470    return c(e.get(t));
471  if (m.call(h, g))
472    return c(e.get(g));
473  e !== h && e.get(t);
474}
475function vp(e, t = !1) {
476  const s = this.__v_raw, l = Nr(s), h = Nr(e);
477  return t || (Uo(e, h) && Ds(l, "has", e), Ds(l, "has", h)), e === h ? s.has(e) : s.has(e) || s.has(h);
478}
479function bp(e, t = !1) {
480  return e = e.__v_raw, !t && Ds(Nr(e), "iterate", Hc), Reflect.get(e, "size", e);
481}
482function q1(e) {
483  e = Nr(e);
484  const t = Nr(this);
485  return Ym(t).has.call(t, e) || (t.add(e), el(t, "add", e, e)), this;
486}
487function H1(e, t) {
488  t = Nr(t);
489  const s = Nr(this), { has: l, get: h } = Ym(s);
490  let g = l.call(s, e);
491  g || (e = Nr(e), g = l.call(s, e));
492  const m = h.call(s, e);
493  return s.set(e, t), g ? Uo(t, m) && el(s, "set", e, t) : el(s, "add", e, t), this;
494}
495function G1(e) {
496  const t = Nr(this), { has: s, get: l } = Ym(t);
497  let h = s.call(t, e);
498  h || (e = Nr(e), h = s.call(t, e)), l && l.call(t, e);
499  const g = t.delete(e);
500  return h && el(t, "delete", e, void 0), g;
501}
502function Z1() {
503  const e = Nr(this), t = e.size !== 0, s = e.clear();
504  return t && el(e, "clear", void 0, void 0), s;
505}
506function xp(e, t) {
507  return function(l, h) {
508    const g = this, m = g.__v_raw, c = Nr(m), w = t ? cb : e ? fb : Kf;
509    return !e && Ds(c, "iterate", Hc), m.forEach((O, P) => l.call(h, w(O), w(P), g));
510  };
511}
512function wp(e, t, s) {
513  return function(...l) {
514    const h = this.__v_raw, g = Nr(h), m = rh(g), c = e === "entries" || e === Symbol.iterator && m, w = e === "keys" && m, O = h[e](...l), P = s ? cb : t ? fb : Kf;
515    return !t && Ds(
516      g,
517      "iterate",
518      w ? q_ : Hc
519    ), {
520      // iterator protocol
521      next() {
522        const { value: R, done: z } = O.next();
523        return z ? { value: R, done: z } : {
524          value: c ? [P(R[0]), P(R[1])] : P(R),
525          done: z
526        };
527      },
528      // iterable protocol
529      [Symbol.iterator]() {
530        return this;
531      }
532    };
533  };
534}
535function jl(e) {
536  return function(...t) {
537    return e === "delete" ? !1 : e === "clear" ? void 0 : this;
538  };
539}
540function GD() {
541  const e = {
542    get(g) {
543      return _p(this, g);
544    },
545    get size() {
546      return bp(this);
547    },
548    has: vp,
549    add: q1,
550    set: H1,
551    delete: G1,
552    clear: Z1,
553    forEach: xp(!1, !1)
554  }, t = {
555    get(g) {
556      return _p(this, g, !1, !0);
557    },
558    get size() {
559      return bp(this);
560    },
561    has: vp,
562    add: q1,
563    set: H1,
564    delete: G1,
565    clear: Z1,
566    forEach: xp(!1, !0)
567  }, s = {
568    get(g) {
569      return _p(this, g, !0);
570    },
571    get size() {
572      return bp(this, !0);
573    },
574    has(g) {
575      return vp.call(this, g, !0);
576    },
577    add: jl("add"),
578    set: jl("set"),
579    delete: jl("delete"),
580    clear: jl("clear"),
581    forEach: xp(!0, !1)
582  }, l = {
583    get(g) {
584      return _p(this, g, !0, !0);
585    },
586    get size() {
587      return bp(this, !0);
588    },
589    has(g) {
590      return vp.call(this, g, !0);
591    },
592    add: jl("add"),
593    set: jl("set"),
594    delete: jl("delete"),
595    clear: jl("clear"),
596    forEach: xp(!0, !0)
597  };
598  return [
599    "keys",
600    "values",
601    "entries",
602    Symbol.iterator
603  ].forEach((g) => {
604    e[g] = wp(g, !1, !1), s[g] = wp(g, !0, !1), t[g] = wp(g, !1, !0), l[g] = wp(
605      g,
606      !0,
607      !0
608    );
609  }), [
610    e,
611    s,
612    t,
613    l
614  ];
615}
616const [
617  ZD,
618  WD,
619  KD,
620  XD
621] = /* @__PURE__ */ GD();
622function Qm(e, t) {
623  const s = t ? e ? XD : KD : e ? WD : ZD;
624  return (l, h, g) => h === "__v_isReactive" ? !e : h === "__v_isReadonly" ? e : h === "__v_raw" ? l : Reflect.get(
625    Zr(s, h) && h in l ? s : l,
626    h,
627    g
628  );
629}
630const JD = {
631  get: /* @__PURE__ */ Qm(!1, !1)
632}, YD = {
633  get: /* @__PURE__ */ Qm(!1, !0)
634}, QD = {
635  get: /* @__PURE__ */ Qm(!0, !1)
636}, eR = {
637  get: /* @__PURE__ */ Qm(!0, !0)
638}, YE = /* @__PURE__ */ new WeakMap(), QE = /* @__PURE__ */ new WeakMap(), e2 = /* @__PURE__ */ new WeakMap(), t2 = /* @__PURE__ */ new WeakMap();
639function tR(e) {
640  switch (e) {
641    case "Object":
642    case "Array":
643      return 1;
644    case "Map":
645    case "Set":
646    case "WeakMap":
647    case "WeakSet":
648      return 2;
649    default:
650      return 0;
651  }
652}
653function rR(e) {
654  return e.__v_skip || !Object.isExtensible(e) ? 0 : tR(yD(e));
655}
656function au(e) {
657  return Yc(e) ? e : tg(
658    e,
659    !1,
660    VD,
661    JD,
662    YE
663  );
664}
665function ub(e) {
666  return tg(
667    e,
668    !1,
669    qD,
670    YD,
671    QE
672  );
673}
674function eg(e) {
675  return tg(
676    e,
677    !0,
678    UD,
679    QD,
680    e2
681  );
682}
683function r2(e) {
684  return tg(
685    e,
686    !0,
687    HD,
688    eR,
689    t2
690  );
691}
692function tg(e, t, s, l, h) {
693  if (!hn(e) || e.__v_raw && !(t && e.__v_isReactive))
694    return e;
695  const g = h.get(e);
696  if (g)
697    return g;
698  const m = rR(e);
699  if (m === 0)
700    return e;
701  const c = new Proxy(
702    e,
703    m === 2 ? l : s
704  );
705  return h.set(e, c), c;
706}
707function Gc(e) {
708  return Yc(e) ? Gc(e.__v_raw) : !!(e && e.__v_isReactive);
709}
710function Yc(e) {
711  return !!(e && e.__v_isReadonly);
712}
713function hh(e) {
714  return !!(e && e.__v_isShallow);
715}
716function rg(e) {
717  return e ? !!e.__v_raw : !1;
718}
719function Nr(e) {
720  const t = e && e.__v_raw;
721  return t ? Nr(t) : e;
722}
723function hb(e) {
724  return Object.isExtensible(e) && kE(e, "__v_skip", !0), e;
725}
726const Kf = (e) => hn(e) ? au(e) : e, fb = (e) => hn(e) ? eg(e) : e;
727class n2 {
728  constructor(t, s, l, h) {
729    this.getter = t, this._setter = s, this.dep = void 0, this.__v_isRef = !0, this.__v_isReadonly = !1, this.effect = new Jc(
730      () => t(this._value),
731      () => ih(
732        this,
733        this.effect._dirtyLevel === 3 ? 3 : 4
734      )
735    ), this.effect.computed = this, this.effect.active = this._cacheable = !h, this.__v_isReadonly = l;
736  }
737  get value() {
738    const t = Nr(this);
739    return (!t._cacheable || t.effect.dirty) && Uo(t._value, t._value = t.effect.run()) && ih(t, 5), db(t), t.effect._dirtyLevel >= 2 && ih(t, 3), t._value;
740  }
741  set value(t) {
742    this._setter(t);
743  }
744  // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x
745  get _dirty() {
746    return this.effect.dirty;
747  }
748  set _dirty(t) {
749    this.effect.dirty = t;
750  }
751  // #endregion
752}
753function nR(e, t, s = !1) {
754  let l, h;
755  const g = ar(e);
756  return g ? (l = e, h = di) : (l = e.get, h = e.set), new n2(l, h, g || !h, s);
757}
758function db(e) {
759  var t;
760  Yl && qc && (e = Nr(e), HE(
761    qc,
762    (t = e.dep) != null ? t : e.dep = ZE(
763      () => e.dep = void 0,
764      e instanceof n2 ? e : void 0
765    )
766  ));
767}
768function ih(e, t = 5, s, l) {
769  e = Nr(e);
770  const h = e.dep;
771  h && GE(
772    h,
773    t
774  );
775}
776function Ii(e) {
777  return !!(e && e.__v_isRef === !0);
778}
779function sh(e) {
780  return s2(e, !1);
781}
782function i2(e) {
783  return s2(e, !0);
784}
785function s2(e, t) {
786  return Ii(e) ? e : new iR(e, t);
787}
788class iR {
789  constructor(t, s) {
790    this.__v_isShallow = s, this.dep = void 0, this.__v_isRef = !0, this._rawValue = s ? t : Nr(t), this._value = s ? t : Kf(t);
791  }
792  get value() {
793    return db(this), this._value;
794  }
795  set value(t) {
796    const s = this.__v_isShallow || hh(t) || Yc(t);
797    t = s ? t : Nr(t), Uo(t, this._rawValue) && (this._rawValue, this._rawValue = t, this._value = s ? t : Kf(t), ih(this, 5));
798  }
799}
800function o2(e) {
801  ih(e, 5);
802}
803function ng(e) {
804  return Ii(e) ? e.value : e;
805}
806function a2(e) {
807  return ar(e) ? e() : ng(e);
808}
809const sR = {
810  get: (e, t, s) => ng(Reflect.get(e, t, s)),
811  set: (e, t, s, l) => {
812    const h = e[t];
813    return Ii(h) && !Ii(s) ? (h.value = s, !0) : Reflect.set(e, t, s, l);
814  }
815};
816function ig(e) {
817  return Gc(e) ? e : new Proxy(e, sR);
818}
819class oR {
820  constructor(t) {
821    this.dep = void 0, this.__v_isRef = !0;
822    const { get: s, set: l } = t(
823      () => db(this),
824      () => ih(this)
825    );
826    this._get = s, this._set = l;
827  }
828  get value() {
829    return this._get();
830  }
831  set value(t) {
832    this._set(t);
833  }
834}
835function pb(e) {
836  return new oR(e);
837}
838function mb(e) {
839  const t = jt(e) ? new Array(e.length) : {};
840  for (const s in e)
841    t[s] = c2(e, s);
842  return t;
843}
844class aR {
845  constructor(t, s, l) {
846    this._object = t, this._key = s, this._defaultValue = l, this.__v_isRef = !0;
847  }
848  get value() {
849    const t = this._object[this._key];
850    return t === void 0 ? this._defaultValue : t;
851  }
852  set value(t) {
853    this._object[this._key] = t;
854  }
855  get dep() {
856    return BD(Nr(this._object), this._key);
857  }
858}
859class lR {
860  constructor(t) {
861    this._getter = t, this.__v_isRef = !0, this.__v_isReadonly = !0;
862  }
863  get value() {
864    return this._getter();
865  }
866}
867function l2(e, t, s) {
868  return Ii(e) ? e : ar(e) ? new lR(e) : hn(e) && arguments.length > 1 ? c2(e, t, s) : sh(e);
869}
870function c2(e, t, s) {
871  const l = e[t];
872  return Ii(l) ? l : new aR(e, t, s);
873}
874const u2 = {
875  GET: "get",
876  HAS: "has",
877  ITERATE: "iterate"
878}, h2 = {
879  SET: "set",
880  ADD: "add",
881  DELETE: "delete",
882  CLEAR: "clear"
883};
884/**
885* @vue/runtime-core v3.4.29
886* (c) 2018-present Yuxi (Evan) You and Vue contributors
887* @license MIT
888**/
889function f2(e, t) {
890}
891const d2 = {
892  SETUP_FUNCTION: 0,
893  0: "SETUP_FUNCTION",
894  RENDER_FUNCTION: 1,
895  1: "RENDER_FUNCTION",
896  WATCH_GETTER: 2,
897  2: "WATCH_GETTER",
898  WATCH_CALLBACK: 3,
899  3: "WATCH_CALLBACK",
900  WATCH_CLEANUP: 4,
901  4: "WATCH_CLEANUP",
902  NATIVE_EVENT_HANDLER: 5,
903  5: "NATIVE_EVENT_HANDLER",
904  COMPONENT_EVENT_HANDLER: 6,
905  6: "COMPONENT_EVENT_HANDLER",
906  VNODE_HOOK: 7,
907  7: "VNODE_HOOK",
908  DIRECTIVE_HOOK: 8,
909  8: "DIRECTIVE_HOOK",
910  TRANSITION_HOOK: 9,
911  9: "TRANSITION_HOOK",
912  APP_ERROR_HANDLER: 10,
913  10: "APP_ERROR_HANDLER",
914  APP_WARN_HANDLER: 11,
915  11: "APP_WARN_HANDLER",
916  FUNCTION_REF: 12,
917  12: "FUNCTION_REF",
918  ASYNC_COMPONENT_LOADER: 13,
919  13: "ASYNC_COMPONENT_LOADER",
920  SCHEDULER: 14,
921  14: "SCHEDULER"
922}, cR = {
923  sp: "serverPrefetch hook",
924  bc: "beforeCreate hook",
925  c: "created hook",
926  bm: "beforeMount hook",
927  m: "mounted hook",
928  bu: "beforeUpdate hook",
929  u: "updated",
930  bum: "beforeUnmount hook",
931  um: "unmounted hook",
932  a: "activated hook",
933  da: "deactivated hook",
934  ec: "errorCaptured hook",
935  rtc: "renderTracked hook",
936  rtg: "renderTriggered hook",
937  0: "setup function",
938  1: "render function",
939  2: "watcher getter",
940  3: "watcher callback",
941  4: "watcher cleanup function",
942  5: "native event handler",
943  6: "component event handler",
944  7: "vnode hook",
945  8: "directive hook",
946  9: "transition hook",
947  10: "app errorHandler",
948  11: "app warnHandler",
949  12: "ref function",
950  13: "async component loader",
951  14: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
952};
953function va(e, t, s, l) {
954  try {
955    return l ? e(...l) : e();
956  } catch (h) {
957    ac(h, t, s);
958  }
959}
960function Ms(e, t, s, l) {
961  if (ar(e)) {
962    const h = va(e, t, s, l);
963    return h && ib(h) && h.catch((g) => {
964      ac(g, t, s);
965    }), h;
966  }
967  if (jt(e)) {
968    const h = [];
969    for (let g = 0; g < e.length; g++)
970      h.push(Ms(e[g], t, s, l));
971    return h;
972  }
973}
974function ac(e, t, s, l = !0) {
975  const h = t ? t.vnode : null;
976  if (t) {
977    let g = t.parent;
978    const m = t.proxy, c = `https://vuejs.org/error-reference/#runtime-${s}`;
979    for (; g; ) {
980      const O = g.ec;
981      if (O) {
982        for (let P = 0; P < O.length; P++)
983          if (O[P](e, m, c) === !1)
984            return;
985      }
986      g = g.parent;
987    }
988    const w = t.appContext.config.errorHandler;
989    if (w) {
990      sc(), va(
991        w,
992        null,
993        10,
994        [e, m, c]
995      ), oc();
996      return;
997    }
998  }
999  uR(e, s, h, l);
1000}
1001function uR(e, t, s, l = !0) {
1002  console.error(e);
1003}
1004let Xf = !1, H_ = !1;
1005const Qi = [];
1006let ga = 0;
1007const oh = [];
1008let Hl = null, Bc = 0;
1009const p2 = /* @__PURE__ */ Promise.resolve();
1010let gb = null;
1011function fd(e) {
1012  const t = gb || p2;
1013  return e ? t.then(this ? e.bind(this) : e) : t;
1014}
1015function hR(e) {
1016  let t = ga + 1, s = Qi.length;
1017  for (; t < s; ) {
1018    const l = t + s >>> 1, h = Qi[l], g = Yf(h);
1019    g < e || g === e && h.pre ? t = l + 1 : s = l;
1020  }
1021  return t;
1022}
1023function sg(e) {
1024  (!Qi.length || !Qi.includes(
1025    e,
1026    Xf && e.allowRecurse ? ga + 1 : ga
1027  )) && (e.id == null ? Qi.push(e) : Qi.splice(hR(e.id), 0, e), m2());
1028}
1029function m2() {
1030  !Xf && !H_ && (H_ = !0, gb = p2.then(g2));
1031}
1032function fR(e) {
1033  const t = Qi.indexOf(e);
1034  t > ga && Qi.splice(t, 1);
1035}
1036function Jf(e) {
1037  jt(e) ? oh.push(...e) : (!Hl || !Hl.includes(
1038    e,
1039    e.allowRecurse ? Bc + 1 : Bc
1040  )) && oh.push(e), m2();
1041}
1042function W1(e, t, s = Xf ? ga + 1 : 0) {
1043  for (; s < Qi.length; s++) {
1044    const l = Qi[s];
1045    if (l && l.pre) {
1046      if (e && l.id !== e.uid)
1047        continue;
1048      Qi.splice(s, 1), s--, l();
1049    }
1050  }
1051}
1052function cm(e) {
1053  if (oh.length) {
1054    const t = [...new Set(oh)].sort(
1055      (s, l) => Yf(s) - Yf(l)
1056    );
1057    if (oh.length = 0, Hl) {
1058      Hl.push(...t);
1059      return;
1060    }
1061    for (Hl = t, Bc = 0; Bc < Hl.length; Bc++) {
1062      const s = Hl[Bc];
1063      s.active !== !1 && s();
1064    }
1065    Hl = null, Bc = 0;
1066  }
1067}
1068const Yf = (e) => e.id == null ? 1 / 0 : e.id, dR = (e, t) => {
1069  const s = Yf(e) - Yf(t);
1070  if (s === 0) {
1071    if (e.pre && !t.pre) return -1;
1072    if (t.pre && !e.pre) return 1;
1073  }
1074  return s;
1075};
1076function g2(e) {
1077  H_ = !1, Xf = !0, Qi.sort(dR);
1078  try {
1079    for (ga = 0; ga < Qi.length; ga++) {
1080      const t = Qi[ga];
1081      t && t.active !== !1 && va(t, null, 14);
1082    }
1083  } finally {
1084    ga = 0, Qi.length = 0, cm(), Xf = !1, gb = null, (Qi.length || oh.length) && g2();
1085  }
1086}
1087let Ju, Sp = [];
1088function y2(e, t) {
1089  var s, l;
1090  Ju = e, Ju ? (Ju.enabled = !0, Sp.forEach(({ event: h, args: g }) => Ju.emit(h, ...g)), Sp = []) : /* handle late devtools injection - only do this if we are in an actual */ /* browser environment to avoid the timer handle stalling test runner exit */ /* (#4815) */ typeof window < "u" && // some envs mock window but not fully
1091  window.HTMLElement && // also exclude jsdom
1092  // eslint-disable-next-line no-restricted-syntax
1093  !((l = (s = window.navigator) == null ? void 0 : s.userAgent) != null && l.includes("jsdom")) ? ((t.__VUE_DEVTOOLS_HOOK_REPLAY__ = t.__VUE_DEVTOOLS_HOOK_REPLAY__ || []).push((g) => {
1094    y2(g, t);
1095  }), setTimeout(() => {
1096    Ju || (t.__VUE_DEVTOOLS_HOOK_REPLAY__ = null, Sp = []);
1097  }, 3e3)) : Sp = [];
1098}
1099function pR(e, t, ...s) {
1100  if (e.isUnmounted) return;
1101  const l = e.vnode.props || Kr;
1102  let h = s;
1103  const g = t.startsWith("update:"), m = g && t.slice(7);
1104  if (m && m in l) {
1105    const P = `${m === "modelValue" ? "model" : m}Modifiers`, { number: R, trim: z } = l[P] || Kr;
1106    z && (h = s.map((J) => vr(J) ? J.trim() : J)), R && (h = s.map(om));
1107  }
1108  let c, w = l[c = Uc(t)] || // also try camelCase event handler (#2249)
1109  l[c = Uc(Fn(t))];
1110  !w && g && (w = l[c = Uc(to(t))]), w && Ms(
1111    w,
1112    e,
1113    6,
1114    h
1115  );
1116  const O = l[c + "Once"];
1117  if (O) {
1118    if (!e.emitted)
1119      e.emitted = {};
1120    else if (e.emitted[c])
1121      return;
1122    e.emitted[c] = !0, Ms(
1123      O,
1124      e,
1125      6,
1126      h
1127    );
1128  }
1129}
1130function _2(e, t, s = !1) {
1131  const l = t.emitsCache, h = l.get(e);
1132  if (h !== void 0)
1133    return h;
1134  const g = e.emits;
1135  let m = {}, c = !1;
1136  if (!ar(e)) {
1137    const w = (O) => {
1138      const P = _2(O, t, !0);
1139      P && (c = !0, Hr(m, P));
1140    };
1141    !s && t.mixins.length && t.mixins.forEach(w), e.extends && w(e.extends), e.mixins && e.mixins.forEach(w);
1142  }
1143  return !g && !c ? (hn(e) && l.set(e, null), null) : (jt(g) ? g.forEach((w) => m[w] = null) : Hr(m, g), hn(e) && l.set(e, m), m);
1144}
1145function og(e, t) {
1146  return !e || !su(t) ? !1 : (t = t.slice(2).replace(/Once$/, ""), Zr(e, t[0].toLowerCase() + t.slice(1)) || Zr(e, to(t)) || Zr(e, t));
1147}
1148let pi = null, ag = null;
1149function Qf(e) {
1150  const t = pi;
1151  return pi = e, ag = e && e.type.__scopeId || null, t;
1152}
1153function v2(e) {
1154  ag = e;
1155}
1156function b2() {
1157  ag = null;
1158}
1159const x2 = (e) => lg;
1160function lg(e, t = pi, s) {
1161  if (!t || e._n)
1162    return e;
1163  const l = (...h) => {
1164    l._d && dm(-1);
1165    const g = Qf(t);
1166    let m;
1167    try {
1168      m = e(...h);
1169    } finally {
1170      Qf(g), l._d && dm(1);
1171    }
1172    return m;
1173  };
1174  return l._n = !0, l._c = !0, l._d = !0, l;
1175}
1176function Np(e) {
1177  const {
1178    type: t,
1179    vnode: s,
1180    proxy: l,
1181    withProxy: h,
1182    propsOptions: [g],
1183    slots: m,
1184    attrs: c,
1185    emit: w,
1186    render: O,
1187    renderCache: P,
1188    props: R,
1189    data: z,
1190    setupState: J,
1191    ctx: K,
1192    inheritAttrs: ee
1193  } = e, ue = Qf(e);
1194  let Ce, ge;
1195  try {
1196    if (s.shapeFlag & 4) {
1197      const ye = h || l, Ae = ye;
1198      Ce = eo(
1199        O.call(
1200          Ae,
1201          ye,
1202          P,
1203          R,
1204          J,
1205          z,
1206          K
1207        )
1208      ), ge = c;
1209    } else {
1210      const ye = t;
1211      Ce = eo(
1212        ye.length > 1 ? ye(
1213          R,
1214          { attrs: c, slots: m, emit: w }
1215        ) : ye(
1216          R,
1217          null
1218        )
1219      ), ge = t.props ? c : gR(c);
1220    }
1221  } catch (ye) {
1222    Nf.length = 0, ac(ye, e, 1), Ce = An(hi);
1223  }
1224  let X = Ce;
1225  if (ge && ee !== !1) {
1226    const ye = Object.keys(ge), { shapeFlag: Ae } = X;
1227    ye.length && Ae & 7 && (g && ye.some(rb) && (ge = yR(
1228      ge,
1229      g
1230    )), X = qo(X, ge, !1, !0));
1231  }
1232  return s.dirs && (X = qo(X, null, !1, !0), X.dirs = X.dirs ? X.dirs.concat(s.dirs) : s.dirs), s.transition && (X.transition = s.transition), Ce = X, Qf(ue), Ce;
1233}
1234function mR(e, t = !0) {
1235  let s;
1236  for (let l = 0; l < e.length; l++) {
1237    const h = e[l];
1238    if (sl(h)) {
1239      if (h.type !== hi || h.children === "v-if") {
1240        if (s)
1241          return;
1242        s = h;
1243      }
1244    } else
1245      return;
1246  }
1247  return s;
1248}
1249const gR = (e) => {
1250  let t;
1251  for (const s in e)
1252    (s === "class" || s === "style" || su(s)) && ((t || (t = {}))[s] = e[s]);
1253  return t;
1254}, yR = (e, t) => {
1255  const s = {};
1256  for (const l in e)
1257    (!rb(l) || !(l.slice(9) in t)) && (s[l] = e[l]);
1258  return s;
1259};
1260function _R(e, t, s) {
1261  const { props: l, children: h, component: g } = e, { props: m, children: c, patchFlag: w } = t, O = g.emitsOptions;
1262  if (t.dirs || t.transition)
1263    return !0;
1264  if (s && w >= 0) {
1265    if (w & 1024)
1266      return !0;
1267    if (w & 16)
1268      return l ? K1(l, m, O) : !!m;
1269    if (w & 8) {
1270      const P = t.dynamicProps;
1271      for (let R = 0; R < P.length; R++) {
1272        const z = P[R];
1273        if (m[z] !== l[z] && !og(O, z))
1274          return !0;
1275      }
1276    }
1277  } else
1278    return (h || c) && (!c || !c.$stable) ? !0 : l === m ? !1 : l ? m ? K1(l, m, O) : !0 : !!m;
1279  return !1;
1280}
1281function K1(e, t, s) {
1282  const l = Object.keys(t);
1283  if (l.length !== Object.keys(e).length)
1284    return !0;
1285  for (let h = 0; h < l.length; h++) {
1286    const g = l[h];
1287    if (t[g] !== e[g] && !og(s, g))
1288      return !0;
1289  }
1290  return !1;
1291}
1292function yb({ vnode: e, parent: t }, s) {
1293  for (; t; ) {
1294    const l = t.subTree;
1295    if (l.suspense && l.suspense.activeBranch === e && (l.el = e.el), l === e)
1296      (e = t.vnode).el = s, t = t.parent;
1297    else
1298      break;
1299  }
1300}
1301const _b = "components", vR = "directives";
1302function w2(e, t) {
1303  return vb(_b, e, !0, t) || e;
1304}
1305const S2 = Symbol.for("v-ndc");
1306function T2(e) {
1307  return vr(e) ? vb(_b, e, !1) || e : e || S2;
1308}
1309function E2(e) {
1310  return vb(vR, e);
1311}
1312function vb(e, t, s = !0, l = !1) {
1313  const h = pi || fi;
1314  if (h) {
1315    const g = h.type;
1316    if (e === _b) {
1317      const c = iv(
1318        g,
1319        !1
1320      );
1321      if (c && (c === t || c === Fn(t) || c === ic(Fn(t))))
1322        return g;
1323    }
1324    const m = (
1325      // local registration
1326      // check instance[type] first which is resolved for options API
1327      X1(h[e] || g[e], t) || // global registration
1328      X1(h.appContext[e], t)
1329    );
1330    return !m && l ? g : m;
1331  }
1332}
1333function X1(e, t) {
1334  return e && (e[t] || e[Fn(t)] || e[ic(Fn(t))]);
1335}
1336const G_ = (e) => e.__isSuspense;
1337let Z_ = 0;
1338const bR = {
1339  name: "Suspense",
1340  // In order to make Suspense tree-shakable, we need to avoid importing it
1341  // directly in the renderer. The renderer checks for the __isSuspense flag
1342  // on a vnode's type and calls the `process` method, passing in renderer
1343  // internals.
1344  __isSuspense: !0,
1345  process(e, t, s, l, h, g, m, c, w, O) {
1346    if (e == null)
1347      xR(
1348        t,
1349        s,
1350        l,
1351        h,
1352        g,
1353        m,
1354        c,
1355        w,
1356        O
1357      );
1358    else {
1359      if (g && g.deps > 0 && !e.suspense.isInFallback) {
1360        t.suspense = e.suspense, t.suspense.vnode = t, t.el = e.el;
1361        return;
1362      }
1363      wR(
1364        e,
1365        t,
1366        s,
1367        l,
1368        h,
1369        m,
1370        c,
1371        w,
1372        O
1373      );
1374    }
1375  },
1376  hydrate: SR,
1377  create: bb,
1378  normalize: TR
1379}, A2 = bR;
1380function ed(e, t) {
1381  const s = e.props && e.props[t];
1382  ar(s) && s();
1383}
1384function xR(e, t, s, l, h, g, m, c, w) {
1385  const {
1386    p: O,
1387    o: { createElement: P }
1388  } = w, R = P("div"), z = e.suspense = bb(
1389    e,
1390    h,
1391    l,
1392    t,
1393    R,
1394    s,
1395    g,
1396    m,
1397    c,
1398    w
1399  );
1400  O(
1401    null,
1402    z.pendingBranch = e.ssContent,
1403    R,
1404    null,
1405    l,
1406    z,
1407    g,
1408    m
1409  ), z.deps > 0 ? (ed(e, "onPending"), ed(e, "onFallback"), O(
1410    null,
1411    e.ssFallback,
1412    t,
1413    s,
1414    l,
1415    null,
1416    // fallback tree will not have suspense context
1417    g,
1418    m
1419  ), ah(z, e.ssFallback)) : z.resolve(!1, !0);
1420}
1421function wR(e, t, s, l, h, g, m, c, { p: w, um: O, o: { createElement: P } }) {
1422  const R = t.suspense = e.suspense;
1423  R.vnode = t, t.el = e.el;
1424  const z = t.ssContent, J = t.ssFallback, { activeBranch: K, pendingBranch: ee, isInFallback: ue, isHydrating: Ce } = R;
1425  if (ee)
1426    R.pendingBranch = z, No(z, ee) ? (w(
1427      ee,
1428      z,
1429      R.hiddenContainer,
1430      null,
1431      h,
1432      R,
1433      g,
1434      m,
1435      c
1436    ), R.deps <= 0 ? R.resolve() : ue && (Ce || (w(
1437      K,
1438      J,
1439      s,
1440      l,
1441      h,
1442      null,
1443      // fallback tree will not have suspense context
1444      g,
1445      m,
1446      c
1447    ), ah(R, J)))) : (R.pendingId = Z_++, Ce ? (R.isHydrating = !1, R.activeBranch = ee) : O(ee, h, R), R.deps = 0, R.effects.length = 0, R.hiddenContainer = P("div"), ue ? (w(
1448      null,
1449      z,
1450      R.hiddenContainer,
1451      null,
1452      h,
1453      R,
1454      g,
1455      m,
1456      c
1457    ), R.deps <= 0 ? R.resolve() : (w(
1458      K,
1459      J,
1460      s,
1461      l,
1462      h,
1463      null,
1464      // fallback tree will not have suspense context
1465      g,
1466      m,
1467      c
1468    ), ah(R, J))) : K && No(z, K) ? (w(
1469      K,
1470      z,
1471      s,
1472      l,
1473      h,
1474      R,
1475      g,
1476      m,
1477      c
1478    ), R.resolve(!0)) : (w(
1479      null,
1480      z,
1481      R.hiddenContainer,
1482      null,
1483      h,
1484      R,
1485      g,
1486      m,
1487      c
1488    ), R.deps <= 0 && R.resolve()));
1489  else if (K && No(z, K))
1490    w(
1491      K,
1492      z,
1493      s,
1494      l,
1495      h,
1496      R,
1497      g,
1498      m,
1499      c
1500    ), ah(R, z);
1501  else if (ed(t, "onPending"), R.pendingBranch = z, z.shapeFlag & 512 ? R.pendingId = z.component.suspenseId : R.pendingId = Z_++, w(
1502    null,
1503    z,
1504    R.hiddenContainer,
1505    null,
1506    h,
1507    R,
1508    g,
1509    m,
1510    c
1511  ), R.deps <= 0)
1512    R.resolve();
1513  else {
1514    const { timeout: ge, pendingId: X } = R;
1515    ge > 0 ? setTimeout(() => {
1516      R.pendingId === X && R.fallback(J);
1517    }, ge) : ge === 0 && R.fallback(J);
1518  }
1519}
1520function bb(e, t, s, l, h, g, m, c, w, O, P = !1) {
1521  const {
1522    p: R,
1523    m: z,
1524    um: J,
1525    n: K,
1526    o: { parentNode: ee, remove: ue }
1527  } = O;
1528  let Ce;
1529  const ge = ER(e);
1530  ge && t && t.pendingBranch && (Ce = t.pendingId, t.deps++);
1531  const X = e.props ? am(e.props.timeout) : void 0, ye = g, Ae = {
1532    vnode: e,
1533    parent: t,
1534    parentComponent: s,
1535    namespace: m,
1536    container: l,
1537    hiddenContainer: h,
1538    deps: 0,
1539    pendingId: Z_++,
1540    timeout: typeof X == "number" ? X : -1,
1541    activeBranch: null,
1542    pendingBranch: null,
1543    isInFallback: !P,
1544    isHydrating: P,
1545    isUnmounted: !1,
1546    effects: [],
1547    resolve(Se = !1, je = !1) {
1548      const {
1549        vnode: Ne,
1550        activeBranch: Oe,
1551        pendingBranch: ze,
1552        pendingId: He,
1553        effects: Ie,
1554        parentComponent: $e,
1555        container: Xe
1556      } = Ae;
1557      let st = !1;
1558      Ae.isHydrating ? Ae.isHydrating = !1 : Se || (st = Oe && ze.transition && ze.transition.mode === "out-in", st && (Oe.transition.afterLeave = () => {
1559        He === Ae.pendingId && (z(
1560          ze,
1561          Xe,
1562          g === ye ? K(Oe) : g,
1563          0
1564        ), Jf(Ie));
1565      }), Oe && (ee(Oe.el) !== Ae.hiddenContainer && (g = K(Oe)), J(Oe, $e, Ae, !0)), st || z(ze, Xe, g, 0)), ah(Ae, ze), Ae.pendingBranch = null, Ae.isInFallback = !1;
1566      let Ge = Ae.parent, ct = !1;
1567      for (; Ge; ) {
1568        if (Ge.pendingBranch) {
1569          Ge.effects.push(...Ie), ct = !0;
1570          break;
1571        }
1572        Ge = Ge.parent;
1573      }
1574      !ct && !st && Jf(Ie), Ae.effects = [], ge && t && t.pendingBranch && Ce === t.pendingId && (t.deps--, t.deps === 0 && !je && t.resolve()), ed(Ne, "onResolve");
1575    },
1576    fallback(Se) {
1577      if (!Ae.pendingBranch)
1578        return;
1579      const { vnode: je, activeBranch: Ne, parentComponent: Oe, container: ze, namespace: He } = Ae;
1580      ed(je, "onFallback");
1581      const Ie = K(Ne), $e = () => {
1582        Ae.isInFallback && (R(
1583          null,
1584          Se,
1585          ze,
1586          Ie,
1587          Oe,
1588          null,
1589          // fallback tree will not have suspense context
1590          He,
1591          c,
1592          w
1593        ), ah(Ae, Se));
1594      }, Xe = Se.transition && Se.transition.mode === "out-in";
1595      Xe && (Ne.transition.afterLeave = $e), Ae.isInFallback = !0, J(
1596        Ne,
1597        Oe,
1598        null,
1599        // no suspense so unmount hooks fire now
1600        !0
1601        // shouldRemove
1602      ), Xe || $e();
1603    },
1604    move(Se, je, Ne) {
1605      Ae.activeBranch && z(Ae.activeBranch, Se, je, Ne), Ae.container = Se;
1606    },
1607    next() {
1608      return Ae.activeBranch && K(Ae.activeBranch);
1609    },
1610    registerDep(Se, je, Ne) {
1611      const Oe = !!Ae.pendingBranch;
1612      Oe && Ae.deps++;
1613      const ze = Se.vnode.el;
1614      Se.asyncDep.catch((He) => {
1615        ac(He, Se, 0);
1616      }).then((He) => {
1617        if (Se.isUnmounted || Ae.isUnmounted || Ae.pendingId !== Se.suspenseId)
1618          return;
1619        Se.asyncResolved = !0;
1620        const { vnode: Ie } = Se;
1621        rv(Se, He, !1), ze && (Ie.el = ze);
1622        const $e = !ze && Se.subTree.el;
1623        je(
1624          Se,
1625          Ie,
1626          // component may have been moved before resolve.
1627          // if this is not a hydration, instance.subTree will be the comment
1628          // placeholder.
1629          ee(ze || Se.subTree.el),
1630          // anchor will not be used if this is hydration, so only need to
1631          // consider the comment placeholder case.
1632          ze ? null : K(Se.subTree),
1633          Ae,
1634          m,
1635          Ne
1636        ), $e && ue($e), yb(Se, Ie.el), Oe && --Ae.deps === 0 && Ae.resolve();
1637      });
1638    },
1639    unmount(Se, je) {
1640      Ae.isUnmounted = !0, Ae.activeBranch && J(
1641        Ae.activeBranch,
1642        s,
1643        Se,
1644        je
1645      ), Ae.pendingBranch && J(
1646        Ae.pendingBranch,
1647        s,
1648        Se,
1649        je
1650      );
1651    }
1652  };
1653  return Ae;
1654}
1655function SR(e, t, s, l, h, g, m, c, w) {
1656  const O = t.suspense = bb(
1657    t,
1658    l,
1659    s,
1660    e.parentNode,
1661    // eslint-disable-next-line no-restricted-globals
1662    document.createElement("div"),
1663    null,
1664    h,
1665    g,
1666    m,
1667    c,
1668    !0
1669  ), P = w(
1670    e,
1671    O.pendingBranch = t.ssContent,
1672    s,
1673    O,
1674    g,
1675    m
1676  );
1677  return O.deps === 0 && O.resolve(!1, !0), P;
1678}
1679function TR(e) {
1680  const { shapeFlag: t, children: s } = e, l = t & 32;
1681  e.ssContent = J1(
1682    l ? s.default : s
1683  ), e.ssFallback = l ? J1(s.fallback) : An(hi);
1684}
1685function J1(e) {
1686  let t;
1687  if (ar(e)) {
1688    const s = eu && e._c;
1689    s && (e._d = !1, bd()), e = e(), s && (e._d = !0, t = Is, yA());
1690  }
1691  return jt(e) && (e = mR(e)), e = eo(e), t && !e.dynamicChildren && (e.dynamicChildren = t.filter((s) => s !== e)), e;
1692}
1693function C2(e, t) {
1694  t && t.pendingBranch ? jt(e) ? t.effects.push(...e) : t.effects.push(e) : Jf(e);
1695}
1696function ah(e, t) {
1697  e.activeBranch = t;
1698  const { vnode: s, parentComponent: l } = e;
1699  let h = t.el;
1700  for (; !h && t.component; )
1701    t = t.component.subTree, h = t.el;
1702  s.el = h, l && l.subTree === s && (l.vnode.el = h, yb(l, h));
1703}
1704function ER(e) {
1705  const t = e.props && e.props.suspensible;
1706  return t != null && t !== !1;
1707}
1708function cg(e, t, s = fi, l = !1) {
1709  if (s) {
1710    const h = s[e] || (s[e] = []), g = t.__weh || (t.__weh = (...m) => {
1711      sc();
1712      const c = tu(s), w = Ms(t, s, e, m);
1713      return c(), oc(), w;
1714    });
1715    return l ? h.unshift(g) : h.push(g), g;
1716  }
1717}
1718const ol = (e) => (t, s = fi) => {
1719  (!xd || e === "sp") && cg(e, (...l) => t(...l), s);
1720}, xb = ol("bm"), Ah = ol("m"), wb = ol("bu"), dd = ol("u"), pd = ol("bum"), md = ol("um"), Sb = ol("sp"), Tb = ol(
1721  "rtg"
1722), Eb = ol(
1723  "rtc"
1724);
1725function Ab(e, t = fi) {
1726  cg("ec", e, t);
1727}
1728function I2(e, t) {
1729  if (pi === null)
1730    return e;
1731  const s = wd(pi), l = e.dirs || (e.dirs = []);
1732  for (let h = 0; h < t.length; h++) {
1733    let [g, m, c, w = Kr] = t[h];
1734    g && (ar(g) && (g = {
1735      mounted: g,
1736      updated: g
1737    }), g.deep && Kl(m), l.push({
1738      dir: g,
1739      instance: s,
1740      value: m,
1741      oldValue: void 0,
1742      arg: c,
1743      modifiers: w
1744    }));
1745  }
1746  return e;
1747}
1748function da(e, t, s, l) {
1749  const h = e.dirs, g = t && t.dirs;
1750  for (let m = 0; m < h.length; m++) {
1751    const c = h[m];
1752    g && (c.oldValue = g[m].value);
1753    let w = c.dir[l];
1754    w && (sc(), Ms(w, s, 8, [
1755      e.el,
1756      c,
1757      e,
1758      t
1759    ]), oc());
1760  }
1761}
1762function P2(e, t, s, l) {
1763  let h;
1764  const g = s && s[l];
1765  if (jt(e) || vr(e)) {
1766    h = new Array(e.length);
1767    for (let m = 0, c = e.length; m < c; m++)
1768      h[m] = t(e[m], m, void 0, g && g[m]);
1769  } else if (typeof e == "number") {
1770    h = new Array(e);
1771    for (let m = 0; m < e; m++)
1772      h[m] = t(m + 1, m, void 0, g && g[m]);
1773  } else if (hn(e))
1774    if (e[Symbol.iterator])
1775      h = Array.from(
1776        e,
1777        (m, c) => t(m, c, void 0, g && g[c])
1778      );
1779    else {
1780      const m = Object.keys(e);
1781      h = new Array(m.length);
1782      for (let c = 0, w = m.length; c < w; c++) {
1783        const O = m[c];
1784        h[c] = t(e[O], O, c, g && g[c]);
1785      }
1786    }
1787  else
1788    h = [];
1789  return s && (s[l] = h), h;
1790}
1791function M2(e, t) {
1792  for (let s = 0; s < t.length; s++) {
1793    const l = t[s];
1794    if (jt(l))
1795      for (let h = 0; h < l.length; h++)
1796        e[l[h].name] = l[h].fn;
1797    else l && (e[l.name] = l.key ? (...h) => {
1798      const g = l.fn(...h);
1799      return g && (g.key = l.key), g;
1800    } : l.fn);
1801  }
1802  return e;
1803}
1804/*! #__NO_SIDE_EFFECTS__ */
1805// @__NO_SIDE_EFFECTS__
1806function gd(e, t) {
1807  return ar(e) ? (
1808    // #8326: extend call and options.name access are considered side-effects
1809    // by Rollup, so we have to wrap it in a pure-annotated IIFE.
1810    Hr({ name: e.name }, t, { setup: e })
1811  ) : e;
1812}
1813const Zc = (e) => !!e.type.__asyncLoader;
1814/*! #__NO_SIDE_EFFECTS__ */
1815// @__NO_SIDE_EFFECTS__
1816function k2(e) {
1817  ar(e) && (e = { loader: e });
1818  const {
1819    loader: t,
1820    loadingComponent: s,
1821    errorComponent: l,
1822    delay: h = 200,
1823    timeout: g,
1824    // undefined = never times out
1825    suspensible: m = !0,
1826    onError: c
1827  } = e;
1828  let w = null, O, P = 0;
1829  const R = () => (P++, w = null, z()), z = () => {
1830    let J;
1831    return w || (J = w = t().catch((K) => {
1832      if (K = K instanceof Error ? K : new Error(String(K)), c)
1833        return new Promise((ee, ue) => {
1834          c(K, () => ee(R()), () => ue(K), P + 1);
1835        });
1836      throw K;
1837    }).then((K) => J !== w && w ? w : (K && (K.__esModule || K[Symbol.toStringTag] === "Module") && (K = K.default), O = K, K)));
1838  };
1839  return /* @__PURE__ */ gd({
1840    name: "AsyncComponentWrapper",
1841    __asyncLoader: z,
1842    get __asyncResolved() {
1843      return O;
1844    },
1845    setup() {
1846      const J = fi;
1847      if (O)
1848        return () => Zy(O, J);
1849      const K = (ge) => {
1850        w = null, ac(
1851          ge,
1852          J,
1853          13,
1854          !l
1855        );
1856      };
1857      if (m && J.suspense || xd)
1858        return z().then((ge) => () => Zy(ge, J)).catch((ge) => (K(ge), () => l ? An(l, {
1859          error: ge
1860        }) : null));
1861      const ee = sh(!1), ue = sh(), Ce = sh(!!h);
1862      return h && setTimeout(() => {
1863        Ce.value = !1;
1864      }, h), g != null && setTimeout(() => {
1865        if (!ee.value && !ue.value) {
1866          const ge = new Error(
1867            `Async component timed out after ${g}ms.`
1868          );
1869          K(ge), ue.value = ge;
1870        }
1871      }, g), z().then(() => {
1872        ee.value = !0, J.parent && _d(J.parent.vnode) && (J.parent.effect.dirty = !0, sg(J.parent.update));
1873      }).catch((ge) => {
1874        K(ge), ue.value = ge;
1875      }), () => {
1876        if (ee.value && O)
1877          return Zy(O, J);
1878        if (ue.value && l)
1879          return An(l, {
1880            error: ue.value
1881          });
1882        if (s && !Ce.value)
1883          return An(s);
1884      };
1885    }
1886  });
1887}
1888function Zy(e, t) {
1889  const { ref: s, props: l, children: h, ce: g } = t.vnode, m = An(e, l, h);
1890  return m.ref = s, m.ce = g, delete t.vnode.ce, m;
1891}
1892function O2(e, t, s = {}, l, h) {
1893  if (pi.isCE || pi.parent && Zc(pi.parent) && pi.parent.isCE)
1894    return t !== "default" && (s.name = t), An("slot", s, l && l());
1895  let g = e[t];
1896  g && g._c && (g._d = !1), bd();
1897  const m = g && D2(g(s)), c = fg(
1898    Ci,
1899    {
1900      key: s.key || // slot content array of a dynamic conditional slot may have a branch
1901      // key attached in the `createSlots` helper, respect that
1902      m && m.key || `_${t}`
1903    },
1904    m || (l ? l() : []),
1905    m && e._ === 1 ? 64 : -2
1906  );
1907  return !h && c.scopeId && (c.slotScopeIds = [c.scopeId + "-s"]), g && g._c && (g._d = !0), c;
1908}
1909function D2(e) {
1910  return e.some((t) => sl(t) ? !(t.type === hi || t.type === Ci && !D2(t.children)) : !0) ? e : null;
1911}
1912function R2(e, t) {
1913  const s = {};
1914  for (const l in e)
1915    s[t && /[A-Z]/.test(l) ? `on:${l}` : Uc(l)] = e[l];
1916  return s;
1917}
1918const W_ = (e) => e ? EA(e) ? wd(e) : W_(e.parent) : null, zf = (
1919  // Move PURE marker to new line to workaround compiler discarding it
1920  // due to type annotation
1921  /* @__PURE__ */ Hr(/* @__PURE__ */ Object.create(null), {
1922    $: (e) => e,
1923    $el: (e) => e.vnode.el,
1924    $data: (e) => e.data,
1925    $props: (e) => e.props,
1926    $attrs: (e) => e.attrs,
1927    $slots: (e) => e.slots,
1928    $refs: (e) => e.refs,
1929    $parent: (e) => W_(e.parent),
1930    $root: (e) => W_(e.root),
1931    $emit: (e) => e.emit,
1932    $options: (e) => Cb(e),
1933    $forceUpdate: (e) => e.f || (e.f = () => {
1934      e.effect.dirty = !0, sg(e.update);
1935    }),
1936    $nextTick: (e) => e.n || (e.n = fd.bind(e.proxy)),
1937    $watch: (e) => UR.bind(e)
1938  })
1939), Wy = (e, t) => e !== Kr && !e.__isScriptSetup && Zr(e, t), K_ = {
1940  get({ _: e }, t) {
1941    if (t === "__v_skip")
1942      return !0;
1943    const { ctx: s, setupState: l, data: h, props: g, accessCache: m, type: c, appContext: w } = e;
1944    let O;
1945    if (t[0] !== "$") {
1946      const J = m[t];
1947      if (J !== void 0)
1948        switch (J) {
1949          case 1:
1950            return l[t];
1951          case 2:
1952            return h[t];
1953          case 4:
1954            return s[t];
1955          case 3:
1956            return g[t];
1957        }
1958      else {
1959        if (Wy(l, t))
1960          return m[t] = 1, l[t];
1961        if (h !== Kr && Zr(h, t))
1962          return m[t] = 2, h[t];
1963        if (
1964          // only cache other properties when instance has declared (thus stable)
1965          // props
1966          (O = e.propsOptions[0]) && Zr(O, t)
1967        )
1968          return m[t] = 3, g[t];
1969        if (s !== Kr && Zr(s, t))
1970          return m[t] = 4, s[t];
1971        X_ && (m[t] = 0);
1972      }
1973    }
1974    const P = zf[t];
1975    let R, z;
1976    if (P)
1977      return t === "$attrs" && Ds(e.attrs, "get", ""), P(e);
1978    if (
1979      // css module (injected by vue-loader)
1980      (R = c.__cssModules) && (R = R[t])
1981    )
1982      return R;
1983    if (s !== Kr && Zr(s, t))
1984      return m[t] = 4, s[t];
1985    if (
1986      // global properties
1987      z = w.config.globalProperties, Zr(z, t)
1988    )
1989      return z[t];
1990  },
1991  set({ _: e }, t, s) {
1992    const { data: l, setupState: h, ctx: g } = e;
1993    return Wy(h, t) ? (h[t] = s, !0) : l !== Kr && Zr(l, t) ? (l[t] = s, !0) : Zr(e.props, t) || t[0] === "$" && t.slice(1) in e ? !1 : (g[t] = s, !0);
1994  },
1995  has({
1996    _: { data: e, setupState: t, accessCache: s, ctx: l, appContext: h, propsOptions: g }
1997  }, m) {
1998    let c;
1999    return !!s[m] || e !== Kr && Zr(e, m) || Wy(t, m) || (c = g[0]) && Zr(c, m) || Zr(l, m) || Zr(zf, m) || Zr(h.config.globalProperties, m);
2000  },
2001  defineProperty(e, t, s) {
2002    return s.get != null ? e._.accessCache[t] = 0 : Zr(s, "value") && this.set(e, t, s.value, null), Reflect.defineProperty(e, t, s);
2003  }
2004}, AR = /* @__PURE__ */ Hr(
2005  {},
2006  K_,
2007  {
2008    get(e, t) {
2009      if (t !== Symbol.unscopables)
2010        return K_.get(e, t, e);
2011    },
2012    has(e, t) {
2013      return t[0] !== "_" && !wD(t);
2014    }
2015  }
2016);
2017function L2() {
2018  return null;
2019}
2020function F2() {
2021  return null;
2022}
2023function z2(e) {
2024}
2025function B2(e) {
2026}
2027function N2() {
2028  return null;
2029}
2030function $2() {
2031}
2032function j2(e, t) {
2033  return null;
2034}
2035function V2() {
2036  return q2().slots;
2037}
2038function U2() {
2039  return q2().attrs;
2040}
2041function q2() {
2042  const e = ba();
2043  return e.setupContext || (e.setupContext = PA(e));
2044}
2045function td(e) {
2046  return jt(e) ? e.reduce(
2047    (t, s) => (t[s] = null, t),
2048    {}
2049  ) : e;
2050}
2051function H2(e, t) {
2052  const s = td(e);
2053  for (const l in t) {
2054    if (l.startsWith("__skip")) continue;
2055    let h = s[l];
2056    h ? jt(h) || ar(h) ? h = s[l] = { type: h, default: t[l] } : h.default = t[l] : h === null && (h = s[l] = { default: t[l] }), h && t[`__skip_${l}`] && (h.skipFactory = !0);
2057  }
2058  return s;
2059}
2060function G2(e, t) {
2061  return !e || !t ? e || t : jt(e) && jt(t) ? e.concat(t) : Hr({}, td(e), td(t));
2062}
2063function Z2(e, t) {
2064  const s = {};
2065  for (const l in e)
2066    t.includes(l) || Object.defineProperty(s, l, {
2067      enumerable: !0,
2068      get: () => e[l]
2069    });
2070  return s;
2071}
2072function W2(e) {
2073  const t = ba();
2074  let s = e();
2075  return tv(), ib(s) && (s = s.catch((l) => {
2076    throw tu(t), l;
2077  })), [s, () => tu(t)];
2078}
2079let X_ = !0;
2080function CR(e) {
2081  const t = Cb(e), s = e.proxy, l = e.ctx;
2082  X_ = !1, t.beforeCreate && Y1(t.beforeCreate, e, "bc");
2083  const {
2084    // state
2085    data: h,
2086    computed: g,
2087    methods: m,
2088    watch: c,
2089    provide: w,
2090    inject: O,
2091    // lifecycle
2092    created: P,
2093    beforeMount: R,
2094    mounted: z,
2095    beforeUpdate: J,
2096    updated: K,
2097    activated: ee,
2098    deactivated: ue,
2099    beforeDestroy: Ce,
2100    beforeUnmount: ge,
2101    destroyed: X,
2102    unmounted: ye,
2103    render: Ae,
2104    renderTracked: Se,
2105    renderTriggered: je,
2106    errorCaptured: Ne,
2107    serverPrefetch: Oe,
2108    // public API
2109    expose: ze,
2110    inheritAttrs: He,
2111    // assets
2112    components: Ie,
2113    directives: $e,
2114    filters: Xe
2115  } = t;
2116  if (O && IR(O, l, null), m)
2117    for (const ct in m) {
2118      const ot = m[ct];
2119      ar(ot) && (l[ct] = ot.bind(s));
2120    }
2121  if (h) {
2122    const ct = h.call(s, s);
2123    hn(ct) && (e.data = au(ct));
2124  }
2125  if (X_ = !0, g)
2126    for (const ct in g) {
2127      const ot = g[ct], Ht = ar(ot) ? ot.bind(s, s) : ar(ot.get) ? ot.get.bind(s, s) : di, fr = !ar(ot) && ar(ot.set) ? ot.set.bind(s) : di, Qt = qb({
2128        get: Ht,
2129        set: fr
2130      });
2131      Object.defineProperty(l, ct, {
2132        enumerable: !0,
2133        configurable: !0,
2134        get: () => Qt.value,
2135        set: (ur) => Qt.value = ur
2136      });
2137    }
2138  if (c)
2139    for (const ct in c)
2140      K2(c[ct], l, s, ct);
2141  if (w) {
2142    const ct = ar(w) ? w.call(s) : w;
2143    Reflect.ownKeys(ct).forEach((ot) => {
2144      Ib(ot, ct[ot]);
2145    });
2146  }
2147  P && Y1(P, e, "c");
2148  function Ge(ct, ot) {
2149    jt(ot) ? ot.forEach((Ht) => ct(Ht.bind(s))) : ot && ct(ot.bind(s));
2150  }
2151  if (Ge(xb, R), Ge(Ah, z), Ge(wb, J), Ge(dd, K), Ge(zb, ee), Ge(Bb, ue), Ge(Ab, Ne), Ge(Eb, Se), Ge(Tb, je), Ge(pd, ge), Ge(md, ye), Ge(Sb, Oe), jt(ze))
2152    if (ze.length) {
2153      const ct = e.exposed || (e.exposed = {});
2154      ze.forEach((ot) => {
2155        Object.defineProperty(ct, ot, {
2156          get: () => s[ot],
2157          set: (Ht) => s[ot] = Ht
2158        });
2159      });
2160    } else e.exposed || (e.exposed = {});
2161  Ae && e.render === di && (e.render = Ae), He != null && (e.inheritAttrs = He), Ie && (e.components = Ie), $e && (e.directives = $e);
2162}
2163function IR(e, t, s = di) {
2164  jt(e) && (e = J_(e));
2165  for (const l in e) {
2166    const h = e[l];
2167    let g;
2168    hn(h) ? "default" in h ? g = ch(
2169      h.from || l,
2170      h.default,
2171      !0
2172    ) : g = ch(h.from || l) : g = ch(h), Ii(g) ? Object.defineProperty(t, l, {
2173      enumerable: !0,
2174      configurable: !0,
2175      get: () => g.value,
2176      set: (m) => g.value = m
2177    }) : t[l] = g;
2178  }
2179}
2180function Y1(e, t, s) {
2181  Ms(
2182    jt(e) ? e.map((l) => l.bind(t.proxy)) : e.bind(t.proxy),
2183    t,
2184    s
2185  );
2186}
2187function K2(e, t, s, l) {
2188  const h = l.includes(".") ? uA(s, l) : () => s[l];
2189  if (vr(e)) {
2190    const g = t[e];
2191    ar(g) && tl(h, g);
2192  } else if (ar(e))
2193    tl(h, e.bind(s));
2194  else if (hn(e))
2195    if (jt(e))
2196      e.forEach((g) => K2(g, t, s, l));
2197    else {
2198      const g = ar(e.handler) ? e.handler.bind(s) : t[e.handler];
2199      ar(g) && tl(h, g, e);
2200    }
2201}
2202function Cb(e) {
2203  const t = e.type, { mixins: s, extends: l } = t, {
2204    mixins: h,
2205    optionsCache: g,
2206    config: { optionMergeStrategies: m }
2207  } = e.appContext, c = g.get(t);
2208  let w;
2209  return c ? w = c : !h.length && !s && !l ? w = t : (w = {}, h.length && h.forEach(
2210    (O) => um(w, O, m, !0)
2211  ), um(w, t, m)), hn(t) && g.set(t, w), w;
2212}
2213function um(e, t, s, l = !1) {
2214  const { mixins: h, extends: g } = t;
2215  g && um(e, g, s, !0), h && h.forEach(
2216    (m) => um(e, m, s, !0)
2217  );
2218  for (const m in t)
2219    if (!(l && m === "expose")) {
2220      const c = PR[m] || s && s[m];
2221      e[m] = c ? c(e[m], t[m]) : t[m];
2222    }
2223  return e;
2224}
2225const PR = {
2226  data: Q1,
2227  props: ew,
2228  emits: ew,
2229  // objects
2230  methods: Rf,
2231  computed: Rf,
2232  // lifecycle
2233  beforeCreate: ds,
2234  created: ds,
2235  beforeMount: ds,
2236  mounted: ds,
2237  beforeUpdate: ds,
2238  updated: ds,
2239  beforeDestroy: ds,
2240  beforeUnmount: ds,
2241  destroyed: ds,
2242  unmounted: ds,
2243  activated: ds,
2244  deactivated: ds,
2245  errorCaptured: ds,
2246  serverPrefetch: ds,
2247  // assets
2248  components: Rf,
2249  directives: Rf,
2250  // watch
2251  watch: kR,
2252  // provide / inject
2253  provide: Q1,
2254  inject: MR
2255};
2256function Q1(e, t) {
2257  return t ? e ? function() {
2258    return Hr(
2259      ar(e) ? e.call(this, this) : e,
2260      ar(t) ? t.call(this, this) : t
2261    );
2262  } : t : e;
2263}
2264function MR(e, t) {
2265  return Rf(J_(e), J_(t));
2266}
2267function J_(e) {
2268  if (jt(e)) {
2269    const t = {};
2270    for (let s = 0; s < e.length; s++)
2271      t[e[s]] = e[s];
2272    return t;
2273  }
2274  return e;
2275}
2276function ds(e, t) {
2277  return e ? [...new Set([].concat(e, t))] : t;
2278}
2279function Rf(e, t) {
2280  return e ? Hr(/* @__PURE__ */ Object.create(null), e, t) : t;
2281}
2282function ew(e, t) {
2283  return e ? jt(e) && jt(t) ? [.../* @__PURE__ */ new Set([...e, ...t])] : Hr(
2284    /* @__PURE__ */ Object.create(null),
2285    td(e),
2286    td(t ?? {})
2287  ) : t;
2288}
2289function kR(e, t) {
2290  if (!e) return t;
2291  if (!t) return e;
2292  const s = Hr(/* @__PURE__ */ Object.create(null), e);
2293  for (const l in t)
2294    s[l] = ds(e[l], t[l]);
2295  return s;
2296}
2297function X2() {
2298  return {
2299    app: null,
2300    config: {
2301      isNativeTag: Bp,
2302      performance: !1,
2303      globalProperties: {},
2304      optionMergeStrategies: {},
2305      errorHandler: void 0,
2306      warnHandler: void 0,
2307      compilerOptions: {}
2308    },
2309    mixins: [],
2310    components: {},
2311    directives: {},
2312    provides: /* @__PURE__ */ Object.create(null),
2313    optionsCache: /* @__PURE__ */ new WeakMap(),
2314    propsCache: /* @__PURE__ */ new WeakMap(),
2315    emitsCache: /* @__PURE__ */ new WeakMap()
2316  };
2317}
2318let OR = 0;
2319function DR(e, t) {
2320  return function(l, h = null) {
2321    ar(l) || (l = Hr({}, l)), h != null && !hn(h) && (h = null);
2322    const g = X2(), m = /* @__PURE__ */ new WeakSet();
2323    let c = !1;
2324    const w = g.app = {
2325      _uid: OR++,
2326      _component: l,
2327      _props: h,
2328      _container: null,
2329      _context: g,
2330      _instance: null,
2331      version: Gb,
2332      get config() {
2333        return g.config;
2334      },
2335      set config(O) {
2336      },
2337      use(O, ...P) {
2338        return m.has(O) || (O && ar(O.install) ? (m.add(O), O.install(w, ...P)) : ar(O) && (m.add(O), O(w, ...P))), w;
2339      },
2340      mixin(O) {
2341        return g.mixins.includes(O) || g.mixins.push(O), w;
2342      },
2343      component(O, P) {
2344        return P ? (g.components[O] = P, w) : g.components[O];
2345      },
2346      directive(O, P) {
2347        return P ? (g.directives[O] = P, w) : g.directives[O];
2348      },
2349      mount(O, P, R) {
2350        if (!c) {
2351          const z = An(l, h);
2352          return z.appContext = g, R === !0 ? R = "svg" : R === !1 && (R = void 0), P && t ? t(z, O) : e(z, O, R), c = !0, w._container = O, O.__vue_app__ = w, wd(z.component);
2353        }
2354      },
2355      unmount() {
2356        c && (e(null, w._container), delete w._container.__vue_app__);
2357      },
2358      provide(O, P) {
2359        return g.provides[O] = P, w;
2360      },
2361      runWithContext(O) {
2362        const P = lh;
2363        lh = w;
2364        try {
2365          return O();
2366        } finally {
2367          lh = P;
2368        }
2369      }
2370    };
2371    return w;
2372  };
2373}
2374let lh = null;
2375function Ib(e, t) {
2376  if (fi) {
2377    let s = fi.provides;
2378    const l = fi.parent && fi.parent.provides;
2379    l === s && (s = fi.provides = Object.create(l)), s[e] = t;
2380  }
2381}
2382function ch(e, t, s = !1) {
2383  const l = fi || pi;
2384  if (l || lh) {
2385    const h = l ? l.parent == null ? l.vnode.appContext && l.vnode.appContext.provides : l.parent.provides : lh._context.provides;
2386    if (h && e in h)
2387      return h[e];
2388    if (arguments.length > 1)
2389      return s && ar(t) ? t.call(l && l.proxy) : t;
2390  }
2391}
2392function J2() {
2393  return !!(fi || pi || lh);
2394}
2395const Y2 = {}, Q2 = () => Object.create(Y2), eA = (e) => Object.getPrototypeOf(e) === Y2;
2396function RR(e, t, s, l = !1) {
2397  const h = {}, g = Q2();
2398  e.propsDefaults = /* @__PURE__ */ Object.create(null), tA(e, t, h, g);
2399  for (const m in e.propsOptions[0])
2400    m in h || (h[m] = void 0);
2401  s ? e.props = l ? h : ub(h) : e.type.props ? e.props = h : e.props = g, e.attrs = g;
2402}
2403function LR(e, t, s, l) {
2404  const {
2405    props: h,
2406    attrs: g,
2407    vnode: { patchFlag: m }
2408  } = e, c = Nr(h), [w] = e.propsOptions;
2409  let O = !1;
2410  if (
2411    // always force full diff in dev
2412    // - #1942 if hmr is enabled with sfc component
2413    // - vite#872 non-sfc component used by sfc component
2414    (l || m > 0) && !(m & 16)
2415  ) {
2416    if (m & 8) {
2417      const P = e.vnode.dynamicProps;
2418      for (let R = 0; R < P.length; R++) {
2419        let z = P[R];
2420        if (og(e.emitsOptions, z))
2421          continue;
2422        const J = t[z];
2423        if (w)
2424          if (Zr(g, z))
2425            J !== g[z] && (g[z] = J, O = !0);
2426          else {
2427            const K = Fn(z);
2428            h[K] = Y_(
2429              w,
2430              c,
2431              K,
2432              J,
2433              e,
2434              !1
2435            );
2436          }
2437        else
2438          J !== g[z] && (g[z] = J, O = !0);
2439      }
2440    }
2441  } else {
2442    tA(e, t, h, g) && (O = !0);
2443    let P;
2444    for (const R in c)
2445      (!t || // for camelCase
2446      !Zr(t, R) && // it's possible the original props was passed in as kebab-case
2447      // and converted to camelCase (#955)
2448      ((P = to(R)) === R || !Zr(t, P))) && (w ? s && // for camelCase
2449      (s[R] !== void 0 || // for kebab-case
2450      s[P] !== void 0) && (h[R] = Y_(
2451        w,
2452        c,
2453        R,
2454        void 0,
2455        e,
2456        !0
2457      )) : delete h[R]);
2458    if (g !== c)
2459      for (const R in g)
2460        (!t || !Zr(t, R)) && (delete g[R], O = !0);
2461  }
2462  O && el(e.attrs, "set", "");
2463}
2464function tA(e, t, s, l) {
2465  const [h, g] = e.propsOptions;
2466  let m = !1, c;
2467  if (t)
2468    for (let w in t) {
2469      if (Jl(w))
2470        continue;
2471      const O = t[w];
2472      let P;
2473      h && Zr(h, P = Fn(w)) ? !g || !g.includes(P) ? s[P] = O : (c || (c = {}))[P] = O : og(e.emitsOptions, w) || (!(w in l) || O !== l[w]) && (l[w] = O, m = !0);
2474    }
2475  if (g) {
2476    const w = Nr(s), O = c || Kr;
2477    for (let P = 0; P < g.length; P++) {
2478      const R = g[P];
2479      s[R] = Y_(
2480        h,
2481        w,
2482        R,
2483        O[R],
2484        e,
2485        !Zr(O, R)
2486      );
2487    }
2488  }
2489  return m;
2490}
2491function Y_(e, t, s, l, h, g) {
2492  const m = e[s];
2493  if (m != null) {
2494    const c = Zr(m, "default");
2495    if (c && l === void 0) {
2496      const w = m.default;
2497      if (m.type !== Function && !m.skipFactory && ar(w)) {
2498        const { propsDefaults: O } = h;
2499        if (s in O)
2500          l = O[s];
2501        else {
2502          const P = tu(h);
2503          l = O[s] = w.call(
2504            null,
2505            t
2506          ), P();
2507        }
2508      } else
2509        l = w;
2510    }
2511    m[
2512      0
2513      /* shouldCast */
2514    ] && (g && !c ? l = !1 : m[
2515      1
2516      /* shouldCastTrue */
2517    ] && (l === "" || l === to(s)) && (l = !0));
2518  }
2519  return l;
2520}
2521function rA(e, t, s = !1) {
2522  const l = t.propsCache, h = l.get(e);
2523  if (h)
2524    return h;
2525  const g = e.props, m = {}, c = [];
2526  let w = !1;
2527  if (!ar(e)) {
2528    const P = (R) => {
2529      w = !0;
2530      const [z, J] = rA(R, t, !0);
2531      Hr(m, z), J && c.push(...J);
2532    };
2533    !s && t.mixins.length && t.mixins.forEach(P), e.extends && P(e.extends), e.mixins && e.mixins.forEach(P);
2534  }
2535  if (!g && !w)
2536    return hn(e) && l.set(e, th), th;
2537  if (jt(g))
2538    for (let P = 0; P < g.length; P++) {
2539      const R = Fn(g[P]);
2540      tw(R) && (m[R] = Kr);
2541    }
2542  else if (g)
2543    for (const P in g) {
2544      const R = Fn(P);
2545      if (tw(R)) {
2546        const z = g[P], J = m[R] = jt(z) || ar(z) ? { type: z } : Hr({}, z);
2547        if (J) {
2548          const K = iw(Boolean, J.type), ee = iw(String, J.type);
2549          J[
2550            0
2551            /* shouldCast */
2552          ] = K > -1, J[
2553            1
2554            /* shouldCastTrue */
2555          ] = ee < 0 || K < ee, (K > -1 || Zr(J, "default")) && c.push(R);
2556        }
2557      }
2558    }
2559  const O = [m, c];
2560  return hn(e) && l.set(e, O), O;
2561}
2562function tw(e) {
2563  return e[0] !== "$" && !Jl(e);
2564}
2565function rw(e) {
2566  return e === null ? "null" : typeof e == "function" ? e.name || "" : typeof e == "object" && e.constructor && e.constructor.name || "";
2567}
2568function nw(e, t) {
2569  return rw(e) === rw(t);
2570}
2571function iw(e, t) {
2572  return jt(t) ? t.findIndex((s) => nw(s, e)) : ar(t) && nw(t, e) ? 0 : -1;
2573}
2574const nA = (e) => e[0] === "_" || e === "$stable", Pb = (e) => jt(e) ? e.map(eo) : [eo(e)], FR = (e, t, s) => {
2575  if (t._n)
2576    return t;
2577  const l = lg((...h) => Pb(t(...h)), s);
2578  return l._c = !1, l;
2579}, iA = (e, t, s) => {
2580  const l = e._ctx;
2581  for (const h in e) {
2582    if (nA(h)) continue;
2583    const g = e[h];
2584    if (ar(g))
2585      t[h] = FR(h, g, l);
2586    else if (g != null) {
2587      const m = Pb(g);
2588      t[h] = () => m;
2589    }
2590  }
2591}, sA = (e, t) => {
2592  const s = Pb(t);
2593  e.slots.default = () => s;
2594}, zR = (e, t) => {
2595  const s = e.slots = Q2();
2596  if (e.vnode.shapeFlag & 32) {
2597    const l = t._;
2598    l ? (Hr(s, t), kE(s, "_", l, !0)) : iA(t, s);
2599  } else t && sA(e, t);
2600}, BR = (e, t, s) => {
2601  const { vnode: l, slots: h } = e;
2602  let g = !0, m = Kr;
2603  if (l.shapeFlag & 32) {
2604    const c = t._;
2605    c ? s && c === 1 ? g = !1 : (Hr(h, t), !s && c === 1 && delete h._) : (g = !t.$stable, iA(t, h)), m = t;
2606  } else t && (sA(e, t), m = { default: 1 });
2607  if (g)
2608    for (const c in h)
2609      !nA(c) && m[c] == null && delete h[c];
2610};
2611function hm(e, t, s, l, h = !1) {
2612  if (jt(e)) {
2613    e.forEach(
2614      (z, J) => hm(
2615        z,
2616        t && (jt(t) ? t[J] : t),
2617        s,
2618        l,
2619        h
2620      )
2621    );
2622    return;
2623  }
2624  if (Zc(l) && !h)
2625    return;
2626  const g = l.shapeFlag & 4 ? wd(l.component) : l.el, m = h ? null : g, { i: c, r: w } = e, O = t && t.r, P = c.refs === Kr ? c.refs = {} : c.refs, R = c.setupState;
2627  if (O != null && O !== w && (vr(O) ? (P[O] = null, Zr(R, O) && (R[O] = null)) : Ii(O) && (O.value = null)), ar(w))
2628    va(w, c, 12, [m, P]);
2629  else {
2630    const z = vr(w), J = Ii(w);
2631    if (z || J) {
2632      const K = () => {
2633        if (e.f) {
2634          const ee = z ? Zr(R, w) ? R[w] : P[w] : w.value;
2635          h ? jt(ee) && nb(ee, g) : jt(ee) ? ee.includes(g) || ee.push(g) : z ? (P[w] = [g], Zr(R, w) && (R[w] = P[w])) : (w.value = [g], e.k && (P[e.k] = w.value));
2636        } else z ? (P[w] = m, Zr(R, w) && (R[w] = m)) : J && (w.value = m, e.k && (P[e.k] = m));
2637      };
2638      m ? (K.id = -1, Ei(K, s)) : K();
2639    }
2640  }
2641}
2642let sw = !1;
2643const qu = () => {
2644  sw || (console.error("Hydration completed but contains mismatches."), sw = !0);
2645}, NR = (e) => e.namespaceURI.includes("svg") && e.tagName !== "foreignObject", $R = (e) => e.namespaceURI.includes("MathML"), Tp = (e) => {
2646  if (NR(e)) return "svg";
2647  if ($R(e)) return "mathml";
2648}, Ep = (e) => e.nodeType === 8;
2649function jR(e) {
2650  const {
2651    mt: t,
2652    p: s,
2653    o: {
2654      patchProp: l,
2655      createText: h,
2656      nextSibling: g,
2657      parentNode: m,
2658      remove: c,
2659      insert: w,
2660      createComment: O
2661    }
2662  } = e, P = (X, ye) => {
2663    if (!ye.hasChildNodes()) {
2664      s(null, X, ye), cm(), ye._vnode = X;
2665      return;
2666    }
2667    R(ye.firstChild, X, null, null, null), cm(), ye._vnode = X;
2668  }, R = (X, ye, Ae, Se, je, Ne = !1) => {
2669    Ne = Ne || !!ye.dynamicChildren;
2670    const Oe = Ep(X) && X.data === "[", ze = () => ee(
2671      X,
2672      ye,
2673      Ae,
2674      Se,
2675      je,
2676      Oe
2677    ), { type: He, ref: Ie, shapeFlag: $e, patchFlag: Xe } = ye;
2678    let st = X.nodeType;
2679    ye.el = X, Xe === -2 && (Ne = !1, ye.dynamicChildren = null);
2680    let Ge = null;
2681    switch (He) {
2682      case rc:
2683        st !== 3 ? ye.children === "" ? (w(ye.el = h(""), m(X), X), Ge = X) : Ge = ze() : (X.data !== ye.children && (qu(), X.data = ye.children), Ge = g(X));
2684        break;
2685      case hi:
2686        ge(X) ? (Ge = g(X), Ce(
2687          ye.el = X.content.firstChild,
2688          X,
2689          Ae
2690        )) : st !== 8 || Oe ? Ge = ze() : Ge = g(X);
2691        break;
2692      case Ql:
2693        if (Oe && (X = g(X), st = X.nodeType), st === 1 || st === 3) {
2694          Ge = X;
2695          const ct = !ye.children.length;
2696          for (let ot = 0; ot < ye.staticCount; ot++)
2697            ct && (ye.children += Ge.nodeType === 1 ? Ge.outerHTML : Ge.data), ot === ye.staticCount - 1 && (ye.anchor = Ge), Ge = g(Ge);
2698          return Oe ? g(Ge) : Ge;
2699        } else
2700          ze();
2701        break;
2702      case Ci:
2703        Oe ? Ge = K(
2704          X,
2705          ye,
2706          Ae,
2707          Se,
2708          je,
2709          Ne
2710        ) : Ge = ze();
2711        break;
2712      default:
2713        if ($e & 1)
2714          (st !== 1 || ye.type.toLowerCase() !== X.tagName.toLowerCase()) && !ge(X) ? Ge = ze() : Ge = z(
2715            X,
2716            ye,
2717            Ae,
2718            Se,
2719            je,
2720            Ne
2721          );
2722        else if ($e & 6) {
2723          ye.slotScopeIds = je;
2724          const ct = m(X);
2725          if (Oe ? Ge = ue(X) : Ep(X) && X.data === "teleport start" ? Ge = ue(X, X.data, "teleport end") : Ge = g(X), t(
2726            ye,
2727            ct,
2728            null,
2729            Ae,
2730            Se,
2731            Tp(ct),
2732            Ne
2733          ), Zc(ye)) {
2734            let ot;
2735            Oe ? (ot = An(Ci), ot.anchor = Ge ? Ge.previousSibling : ct.lastChild) : ot = X.nodeType === 3 ? pg("") : An("div"), ot.el = X, ye.component.subTree = ot;
2736          }
2737        } else $e & 64 ? st !== 8 ? Ge = ze() : Ge = ye.type.hydrate(
2738          X,
2739          ye,
2740          Ae,
2741          Se,
2742          je,
2743          Ne,
2744          e,
2745          J
2746        ) : $e & 128 && (Ge = ye.type.hydrate(
2747          X,
2748          ye,
2749          Ae,
2750          Se,
2751          Tp(m(X)),
2752          je,
2753          Ne,
2754          e,
2755          R
2756        ));
2757    }
2758    return Ie != null && hm(Ie, null, Se, ye), Ge;
2759  }, z = (X, ye, Ae, Se, je, Ne) => {
2760    Ne = Ne || !!ye.dynamicChildren;
2761    const { type: Oe, props: ze, patchFlag: He, shapeFlag: Ie, dirs: $e, transition: Xe } = ye, st = Oe === "input" || Oe === "option";
2762    if (st || He !== -1) {
2763      $e && da(ye, null, Ae, "created");
2764      let Ge = !1;
2765      if (ge(X)) {
2766        Ge = aA(Se, Xe) && Ae && Ae.vnode.props && Ae.vnode.props.appear;
2767        const ot = X.content.firstChild;
2768        Ge && Xe.beforeEnter(ot), Ce(ot, X, Ae), ye.el = X = ot;
2769      }
2770      if (Ie & 16 && // skip if element has innerHTML / textContent
2771      !(ze && (ze.innerHTML || ze.textContent))) {
2772        let ot = J(
2773          X.firstChild,
2774          ye,
2775          X,
2776          Ae,
2777          Se,
2778          je,
2779          Ne
2780        );
2781        for (; ot; ) {
2782          qu();
2783          const Ht = ot;
2784          ot = ot.nextSibling, c(Ht);
2785        }
2786      } else Ie & 8 && X.textContent !== ye.children && (qu(), X.textContent = ye.children);
2787      if (ze)
2788        if (st || !Ne || He & 48)
2789          for (const ot in ze)
2790            (st && (ot.endsWith("value") || ot === "indeterminate") || su(ot) && !Jl(ot) || // force hydrate v-bind with .prop modifiers
2791            ot[0] === ".") && l(
2792              X,
2793              ot,
2794              null,
2795              ze[ot],
2796              void 0,
2797              void 0,
2798              Ae
2799            );
2800        else ze.onClick && l(
2801          X,
2802          "onClick",
2803          null,
2804          ze.onClick,
2805          void 0,
2806          void 0,
2807          Ae
2808        );
2809      let ct;
2810      (ct = ze && ze.onVnodeBeforeMount) && Cs(ct, Ae, ye), $e && da(ye, null, Ae, "beforeMount"), ((ct = ze && ze.onVnodeMounted) || $e || Ge) && C2(() => {
2811        ct && Cs(ct, Ae, ye), Ge && Xe.enter(X), $e && da(ye, null, Ae, "mounted");
2812      }, Se);
2813    }
2814    return X.nextSibling;
2815  }, J = (X, ye, Ae, Se, je, Ne, Oe) => {
2816    Oe = Oe || !!ye.dynamicChildren;
2817    const ze = ye.children, He = ze.length;
2818    for (let Ie = 0; Ie < He; Ie++) {
2819      const $e = Oe ? ze[Ie] : ze[Ie] = eo(ze[Ie]);
2820      X ? X = R(
2821        X,
2822        $e,
2823        Se,
2824        je,
2825        Ne,
2826        Oe
2827      ) : $e.type === rc && !$e.children ? w($e.el = h(""), Ae) : (qu(), s(
2828        null,
2829        $e,
2830        Ae,
2831        null,
2832        Se,
2833        je,
2834        Tp(Ae),
2835        Ne
2836      ));
2837    }
2838    return X;
2839  }, K = (X, ye, Ae, Se, je, Ne) => {
2840    const { slotScopeIds: Oe } = ye;
2841    Oe && (je = je ? je.concat(Oe) : Oe);
2842    const ze = m(X), He = J(
2843      g(X),
2844      ye,
2845      ze,
2846      Ae,
2847      Se,
2848      je,
2849      Ne
2850    );
2851    return He && Ep(He) && He.data === "]" ? g(ye.anchor = He) : (qu(), w(ye.anchor = O("]"), ze, He), He);
2852  }, ee = (X, ye, Ae, Se, je, Ne) => {
2853    if (qu(), ye.el = null, Ne) {
2854      const He = ue(X);
2855      for (; ; ) {
2856        const Ie = g(X);
2857        if (Ie && Ie !== He)
2858          c(Ie);
2859        else
2860          break;
2861      }
2862    }
2863    const Oe = g(X), ze = m(X);
2864    return c(X), s(
2865      null,
2866      ye,
2867      ze,
2868      Oe,
2869      Ae,
2870      Se,
2871      Tp(ze),
2872      je
2873    ), Oe;
2874  }, ue = (X, ye = "[", Ae = "]") => {
2875    let Se = 0;
2876    for (; X; )
2877      if (X = g(X), X && Ep(X) && (X.data === ye && Se++, X.data === Ae)) {
2878        if (Se === 0)
2879          return g(X);
2880        Se--;
2881      }
2882    return X;
2883  }, Ce = (X, ye, Ae) => {
2884    const Se = ye.parentNode;
2885    Se && Se.replaceChild(X, ye);
2886    let je = Ae;
2887    for (; je; )
2888      je.vnode.el === ye && (je.vnode.el = je.subTree.el = X), je = je.parent;
2889  }, ge = (X) => X.nodeType === 1 && X.tagName.toLowerCase() === "template";
2890  return [P, R];
2891}
2892const Ei = C2;
2893function Mb(e) {
2894  return oA(e);
2895}
2896function kb(e) {
2897  return oA(e, jR);
2898}
2899function oA(e, t) {
2900  const s = OE();
2901  s.__VUE__ = !0;
2902  const {
2903    insert: l,
2904    remove: h,
2905    patchProp: g,
2906    createElement: m,
2907    createText: c,
2908    createComment: w,
2909    setText: O,
2910    setElementText: P,
2911    parentNode: R,
2912    nextSibling: z,
2913    setScopeId: J = di,
2914    insertStaticContent: K
2915  } = e, ee = (me, Ee, Ze, re = null, et = null, ft = null, rt = void 0, Qe = null, dt = !!Ee.dynamicChildren) => {
2916    if (me === Ee)
2917      return;
2918    me && !No(me, Ee) && (re = dn(me), ur(me, et, ft, !0), me = null), Ee.patchFlag === -2 && (dt = !1, Ee.dynamicChildren = null);
2919    const { type: nt, ref: Tt, shapeFlag: Nt } = Ee;
2920    switch (nt) {
2921      case rc:
2922        ue(me, Ee, Ze, re);
2923        break;
2924      case hi:
2925        Ce(me, Ee, Ze, re);
2926        break;
2927      case Ql:
2928        me == null && ge(Ee, Ze, re, rt);
2929        break;
2930      case Ci:
2931        Ie(
2932          me,
2933          Ee,
2934          Ze,
2935          re,
2936          et,
2937          ft,
2938          rt,
2939          Qe,
2940          dt
2941        );
2942        break;
2943      default:
2944        Nt & 1 ? Ae(
2945          me,
2946          Ee,
2947          Ze,
2948          re,
2949          et,
2950          ft,
2951          rt,
2952          Qe,
2953          dt
2954        ) : Nt & 6 ? $e(
2955          me,
2956          Ee,
2957          Ze,
2958          re,
2959          et,
2960          ft,
2961          rt,
2962          Qe,
2963          dt
2964        ) : (Nt & 64 || Nt & 128) && nt.process(
2965          me,
2966          Ee,
2967          Ze,
2968          re,
2969          et,
2970          ft,
2971          rt,
2972          Qe,
2973          dt,
2974          Jt
2975        );
2976    }
2977    Tt != null && et && hm(Tt, me && me.ref, ft, Ee || me, !Ee);
2978  }, ue = (me, Ee, Ze, re) => {
2979    if (me == null)
2980      l(
2981        Ee.el = c(Ee.children),
2982        Ze,
2983        re
2984      );
2985    else {
2986      const et = Ee.el = me.el;
2987      Ee.children !== me.children && O(et, Ee.children);
2988    }
2989  }, Ce = (me, Ee, Ze, re) => {
2990    me == null ? l(
2991      Ee.el = w(Ee.children || ""),
2992      Ze,
2993      re
2994    ) : Ee.el = me.el;
2995  }, ge = (me, Ee, Ze, re) => {
2996    [me.el, me.anchor] = K(
2997      me.children,
2998      Ee,
2999      Ze,
3000      re,
3001      me.el,
3002      me.anchor
3003    );
3004  }, X = ({ el: me, anchor: Ee }, Ze, re) => {
3005    let et;
3006    for (; me && me !== Ee; )
3007      et = z(me), l(me, Ze, re), me = et;
3008    l(Ee, Ze, re);
3009  }, ye = ({ el: me, anchor: Ee }) => {
3010    let Ze;
3011    for (; me && me !== Ee; )
3012      Ze = z(me), h(me), me = Ze;
3013    h(Ee);
3014  }, Ae = (me, Ee, Ze, re, et, ft, rt, Qe, dt) => {
3015    Ee.type === "svg" ? rt = "svg" : Ee.type === "math" && (rt = "mathml"), me == null ? Se(
3016      Ee,
3017      Ze,
3018      re,
3019      et,
3020      ft,
3021      rt,
3022      Qe,
3023      dt
3024    ) : Oe(
3025      me,
3026      Ee,
3027      et,
3028      ft,
3029      rt,
3030      Qe,
3031      dt
3032    );
3033  }, Se = (me, Ee, Ze, re, et, ft, rt, Qe) => {
3034    let dt, nt;
3035    const { props: Tt, shapeFlag: Nt, transition: Dt, dirs: Gt } = me;
3036    if (dt = me.el = m(
3037      me.type,
3038      ft,
3039      Tt && Tt.is,
3040      Tt
3041    ), Nt & 8 ? P(dt, me.children) : Nt & 16 && Ne(
3042      me.children,
3043      dt,
3044      null,
3045      re,
3046      et,
3047      Ky(me, ft),
3048      rt,
3049      Qe
3050    ), Gt && da(me, null, re, "created"), je(dt, me, me.scopeId, rt, re), Tt) {
3051      for (const We in Tt)
3052        We !== "value" && !Jl(We) && g(
3053          dt,
3054          We,
3055          null,
3056          Tt[We],
3057          ft,
3058          me.children,
3059          re,
3060          et,
3061          Fr
3062        );
3063      "value" in Tt && g(dt, "value", null, Tt.value, ft), (nt = Tt.onVnodeBeforeMount) && Cs(nt, re, me);
3064    }
3065    Gt && da(me, null, re, "beforeMount");
3066    const sr = aA(et, Dt);
3067    sr && Dt.beforeEnter(dt), l(dt, Ee, Ze), ((nt = Tt && Tt.onVnodeMounted) || sr || Gt) && Ei(() => {
3068      nt && Cs(nt, re, me), sr && Dt.enter(dt), Gt && da(me, null, re, "mounted");
3069    }, et);
3070  }, je = (me, Ee, Ze, re, et) => {
3071    if (Ze && J(me, Ze), re)
3072      for (let ft = 0; ft < re.length; ft++)
3073        J(me, re[ft]);
3074    if (et) {
3075      let ft = et.subTree;
3076      if (Ee === ft) {
3077        const rt = et.vnode;
3078        je(
3079          me,
3080          rt,
3081          rt.scopeId,
3082          rt.slotScopeIds,
3083          et.parent
3084        );
3085      }
3086    }
3087  }, Ne = (me, Ee, Ze, re, et, ft, rt, Qe, dt = 0) => {
3088    for (let nt = dt; nt < me.length; nt++) {
3089      const Tt = me[nt] = Qe ? Zl(me[nt]) : eo(me[nt]);
3090      ee(
3091        null,
3092        Tt,
3093        Ee,
3094        Ze,
3095        re,
3096        et,
3097        ft,
3098        rt,
3099        Qe
3100      );
3101    }
3102  }, Oe = (me, Ee, Ze, re, et, ft, rt) => {
3103    const Qe = Ee.el = me.el;
3104    let { patchFlag: dt, dynamicChildren: nt, dirs: Tt } = Ee;
3105    dt |= me.patchFlag & 16;
3106    const Nt = me.props || Kr, Dt = Ee.props || Kr;
3107    let Gt;
3108    if (Ze && Rc(Ze, !1), (Gt = Dt.onVnodeBeforeUpdate) && Cs(Gt, Ze, Ee, me), Tt && da(Ee, me, Ze, "beforeUpdate"), Ze && Rc(Ze, !0), nt ? ze(
3109      me.dynamicChildren,
3110      nt,
3111      Qe,
3112      Ze,
3113      re,
3114      Ky(Ee, et),
3115      ft
3116    ) : rt || ot(
3117      me,
3118      Ee,
3119      Qe,
3120      null,
3121      Ze,
3122      re,
3123      Ky(Ee, et),
3124      ft,
3125      !1
3126    ), dt > 0) {
3127      if (dt & 16)
3128        He(
3129          Qe,
3130          Ee,
3131          Nt,
3132          Dt,
3133          Ze,
3134          re,
3135          et
3136        );
3137      else if (dt & 2 && Nt.class !== Dt.class && g(Qe, "class", null, Dt.class, et), dt & 4 && g(Qe, "style", Nt.style, Dt.style, et), dt & 8) {
3138        const sr = Ee.dynamicProps;
3139        for (let We = 0; We < sr.length; We++) {
3140          const or = sr[We], hr = Nt[or], Cr = Dt[or];
3141          (Cr !== hr || or === "value") && g(
3142            Qe,
3143            or,
3144            hr,
3145            Cr,
3146            et,
3147            me.children,
3148            Ze,
3149            re,
3150            Fr
3151          );
3152        }
3153      }
3154      dt & 1 && me.children !== Ee.children && P(Qe, Ee.children);
3155    } else !rt && nt == null && He(
3156      Qe,
3157      Ee,
3158      Nt,
3159      Dt,
3160      Ze,
3161      re,
3162      et
3163    );
3164    ((Gt = Dt.onVnodeUpdated) || Tt) && Ei(() => {
3165      Gt && Cs(Gt, Ze, Ee, me), Tt && da(Ee, me, Ze, "updated");
3166    }, re);
3167  }, ze = (me, Ee, Ze, re, et, ft, rt) => {
3168    for (let Qe = 0; Qe < Ee.length; Qe++) {
3169      const dt = me[Qe], nt = Ee[Qe], Tt = (
3170        // oldVNode may be an errored async setup() component inside Suspense
3171        // which will not have a mounted element
3172        dt.el && // - In the case of a Fragment, we need to provide the actual parent
3173        // of the Fragment itself so it can move its children.
3174        (dt.type === Ci || // - In the case of different nodes, there is going to be a replacement
3175        // which also requires the correct parent container
3176        !No(dt, nt) || // - In the case of a component, it could contain anything.
3177        dt.shapeFlag & 70) ? R(dt.el) : (
3178          // In other cases, the parent container is not actually used so we
3179          // just pass the block element here to avoid a DOM parentNode call.
3180          Ze
3181        )
3182      );
3183      ee(
3184        dt,
3185        nt,
3186        Tt,
3187        null,
3188        re,
3189        et,
3190        ft,
3191        rt,
3192        !0
3193      );
3194    }
3195  }, He = (me, Ee, Ze, re, et, ft, rt) => {
3196    if (Ze !== re) {
3197      if (Ze !== Kr)
3198        for (const Qe in Ze)
3199          !Jl(Qe) && !(Qe in re) && g(
3200            me,
3201            Qe,
3202            Ze[Qe],
3203            null,
3204            rt,
3205            Ee.children,
3206            et,
3207            ft,
3208            Fr
3209          );
3210      for (const Qe in re) {
3211        if (Jl(Qe)) continue;
3212        const dt = re[Qe], nt = Ze[Qe];
3213        dt !== nt && Qe !== "value" && g(
3214          me,
3215          Qe,
3216          nt,
3217          dt,
3218          rt,
3219          Ee.children,
3220          et,
3221          ft,
3222          Fr
3223        );
3224      }
3225      "value" in re && g(me, "value", Ze.value, re.value, rt);
3226    }
3227  }, Ie = (me, Ee, Ze, re, et, ft, rt, Qe, dt) => {
3228    const nt = Ee.el = me ? me.el : c(""), Tt = Ee.anchor = me ? me.anchor : c("");
3229    let { patchFlag: Nt, dynamicChildren: Dt, slotScopeIds: Gt } = Ee;
3230    Gt && (Qe = Qe ? Qe.concat(Gt) : Gt), me == null ? (l(nt, Ze, re), l(Tt, Ze, re), Ne(
3231      // #10007
3232      // such fragment like `<></>` will be compiled into
3233      // a fragment which doesn't have a children.
3234      // In this case fallback to an empty array
3235      Ee.children || [],
3236      Ze,
3237      Tt,
3238      et,
3239      ft,
3240      rt,
3241      Qe,
3242      dt
3243    )) : Nt > 0 && Nt & 64 && Dt && // #2715 the previous fragment could've been a BAILed one as a result
3244    // of renderSlot() with no valid children
3245    me.dynamicChildren ? (ze(
3246      me.dynamicChildren,
3247      Dt,
3248      Ze,
3249      et,
3250      ft,
3251      rt,
3252      Qe
3253    ), // #2080 if the stable fragment has a key, it's a <template v-for> that may
3254    //  get moved around. Make sure all root level vnodes inherit el.
3255    // #2134 or if it's a component root, it may also get moved around
3256    // as the component is being moved.
3257    (Ee.key != null || et && Ee === et.subTree) && Ob(
3258      me,
3259      Ee,
3260      !0
3261      /* shallow */
3262    )) : ot(
3263      me,
3264      Ee,
3265      Ze,
3266      Tt,
3267      et,
3268      ft,
3269      rt,
3270      Qe,
3271      dt
3272    );
3273  }, $e = (me, Ee, Ze, re, et, ft, rt, Qe, dt) => {
3274    Ee.slotScopeIds = Qe, me == null ? Ee.shapeFlag & 512 ? et.ctx.activate(
3275      Ee,
3276      Ze,
3277      re,
3278      rt,
3279      dt
3280    ) : Xe(
3281      Ee,
3282      Ze,
3283      re,
3284      et,
3285      ft,
3286      rt,
3287      dt
3288    ) : st(me, Ee, dt);
3289  }, Xe = (me, Ee, Ze, re, et, ft, rt) => {
3290    const Qe = me.component = TA(
3291      me,
3292      re,
3293      et
3294    );
3295    if (_d(me) && (Qe.ctx.renderer = Jt), AA(Qe), Qe.asyncDep) {
3296      if (et && et.registerDep(Qe, Ge, rt), !me.el) {
3297        const dt = Qe.subTree = An(hi);
3298        Ce(null, dt, Ee, Ze);
3299      }
3300    } else
3301      Ge(
3302        Qe,
3303        me,
3304        Ee,
3305        Ze,
3306        et,
3307        ft,
3308        rt
3309      );
3310  }, st = (me, Ee, Ze) => {
3311    const re = Ee.component = me.component;
3312    if (_R(me, Ee, Ze))
3313      if (re.asyncDep && !re.asyncResolved) {
3314        ct(re, Ee, Ze);
3315        return;
3316      } else
3317        re.next = Ee, fR(re.update), re.effect.dirty = !0, re.update();
3318    else
3319      Ee.el = me.el, re.vnode = Ee;
3320  }, Ge = (me, Ee, Ze, re, et, ft, rt) => {
3321    const Qe = () => {
3322      if (me.isMounted) {
3323        let { next: Tt, bu: Nt, u: Dt, parent: Gt, vnode: sr } = me;
3324        {
3325          const wn = lA(me);
3326          if (wn) {
3327            Tt && (Tt.el = sr.el, ct(me, Tt, rt)), wn.asyncDep.then(() => {
3328              me.isUnmounted || Qe();
3329            });
3330            return;
3331          }
3332        }
3333        let We = Tt, or;
3334        Rc(me, !1), Tt ? (Tt.el = sr.el, ct(me, Tt, rt)) : Tt = sr, Nt && nh(Nt), (or = Tt.props && Tt.props.onVnodeBeforeUpdate) && Cs(or, Gt, Tt, sr), Rc(me, !0);
3335        const hr = Np(me), Cr = me.subTree;
3336        me.subTree = hr, ee(
3337          Cr,
3338          hr,
3339          // parent may have changed if it's in a teleport
3340          R(Cr.el),
3341          // anchor may have changed if it's in a fragment
3342          dn(Cr),
3343          me,
3344          et,
3345          ft
3346        ), Tt.el = hr.el, We === null && yb(me, hr.el), Dt && Ei(Dt, et), (or = Tt.props && Tt.props.onVnodeUpdated) && Ei(
3347          () => Cs(or, Gt, Tt, sr),
3348          et
3349        );
3350      } else {
3351        let Tt;
3352        const { el: Nt, props: Dt } = Ee, { bm: Gt, m: sr, parent: We } = me, or = Zc(Ee);
3353        if (Rc(me, !1), Gt && nh(Gt), !or && (Tt = Dt && Dt.onVnodeBeforeMount) && Cs(Tt, We, Ee), Rc(me, !0), Nt && Kn) {
3354          const hr = () => {
3355            me.subTree = Np(me), Kn(
3356              Nt,
3357              me.subTree,
3358              me,
3359              et,
3360              null
3361            );
3362          };
3363          or ? Ee.type.__asyncLoader().then(
3364            // note: we are moving the render call into an async callback,
3365            // which means it won't track dependencies - but it's ok because
3366            // a server-rendered async wrapper is already in resolved state
3367            // and it will never need to change.
3368            () => !me.isUnmounted && hr()
3369          ) : hr();
3370        } else {
3371          const hr = me.subTree = Np(me);
3372          ee(
3373            null,
3374            hr,
3375            Ze,
3376            re,
3377            me,
3378            et,
3379            ft
3380          ), Ee.el = hr.el;
3381        }
3382        if (sr && Ei(sr, et), !or && (Tt = Dt && Dt.onVnodeMounted)) {
3383          const hr = Ee;
3384          Ei(
3385            () => Cs(Tt, We, hr),
3386            et
3387          );
3388        }
3389        (Ee.shapeFlag & 256 || We && Zc(We.vnode) && We.vnode.shapeFlag & 256) && me.a && Ei(me.a, et), me.isMounted = !0, Ee = Ze = re = null;
3390      }
3391    }, dt = me.effect = new Jc(
3392      Qe,
3393      di,
3394      () => sg(nt),
3395      me.scope
3396      // track it in component's effect scope
3397    ), nt = me.update = () => {
3398      dt.dirty && dt.run();
3399    };
3400    nt.id = me.uid, Rc(me, !0), nt();
3401  }, ct = (me, Ee, Ze) => {
3402    Ee.component = me;
3403    const re = me.vnode.props;
3404    me.vnode = Ee, me.next = null, LR(me, Ee.props, re, Ze), BR(me, Ee.children, Ze), sc(), W1(me), oc();
3405  }, ot = (me, Ee, Ze, re, et, ft, rt, Qe, dt = !1) => {
3406    const nt = me && me.children, Tt = me ? me.shapeFlag : 0, Nt = Ee.children, { patchFlag: Dt, shapeFlag: Gt } = Ee;
3407    if (Dt > 0) {
3408      if (Dt & 128) {
3409        fr(
3410          nt,
3411          Nt,
3412          Ze,
3413          re,
3414          et,
3415          ft,
3416          rt,
3417          Qe,
3418          dt
3419        );
3420        return;
3421      } else if (Dt & 256) {
3422        Ht(
3423          nt,
3424          Nt,
3425          Ze,
3426          re,
3427          et,
3428          ft,
3429          rt,
3430          Qe,
3431          dt
3432        );
3433        return;
3434      }
3435    }
3436    Gt & 8 ? (Tt & 16 && Fr(nt, et, ft), Nt !== nt && P(Ze, Nt)) : Tt & 16 ? Gt & 16 ? fr(
3437      nt,
3438      Nt,
3439      Ze,
3440      re,
3441      et,
3442      ft,
3443      rt,
3444      Qe,
3445      dt
3446    ) : Fr(nt, et, ft, !0) : (Tt & 8 && P(Ze, ""), Gt & 16 && Ne(
3447      Nt,
3448      Ze,
3449      re,
3450      et,
3451      ft,
3452      rt,
3453      Qe,
3454      dt
3455    ));
3456  }, Ht = (me, Ee, Ze, re, et, ft, rt, Qe, dt) => {
3457    me = me || th, Ee = Ee || th;
3458    const nt = me.length, Tt = Ee.length, Nt = Math.min(nt, Tt);
3459    let Dt;
3460    for (Dt = 0; Dt < Nt; Dt++) {
3461      const Gt = Ee[Dt] = dt ? Zl(Ee[Dt]) : eo(Ee[Dt]);
3462      ee(
3463        me[Dt],
3464        Gt,
3465        Ze,
3466        null,
3467        et,
3468        ft,
3469        rt,
3470        Qe,
3471        dt
3472      );
3473    }
3474    nt > Tt ? Fr(
3475      me,
3476      et,
3477      ft,
3478      !0,
3479      !1,
3480      Nt
3481    ) : Ne(
3482      Ee,
3483      Ze,
3484      re,
3485      et,
3486      ft,
3487      rt,
3488      Qe,
3489      dt,
3490      Nt
3491    );
3492  }, fr = (me, Ee, Ze, re, et, ft, rt, Qe, dt) => {
3493    let nt = 0;
3494    const Tt = Ee.length;
3495    let Nt = me.length - 1, Dt = Tt - 1;
3496    for (; nt <= Nt && nt <= Dt; ) {
3497      const Gt = me[nt], sr = Ee[nt] = dt ? Zl(Ee[nt]) : eo(Ee[nt]);
3498      if (No(Gt, sr))
3499        ee(
3500          Gt,
3501          sr,
3502          Ze,
3503          null,
3504          et,
3505          ft,
3506          rt,
3507          Qe,
3508          dt
3509        );
3510      else
3511        break;
3512      nt++;
3513    }
3514    for (; nt <= Nt && nt <= Dt; ) {
3515      const Gt = me[Nt], sr = Ee[Dt] = dt ? Zl(Ee[Dt]) : eo(Ee[Dt]);
3516      if (No(Gt, sr))
3517        ee(
3518          Gt,
3519          sr,
3520          Ze,
3521          null,
3522          et,
3523          ft,
3524          rt,
3525          Qe,
3526          dt
3527        );
3528      else
3529        break;
3530      Nt--, Dt--;
3531    }
3532    if (nt > Nt) {
3533      if (nt <= Dt) {
3534        const Gt = Dt + 1, sr = Gt < Tt ? Ee[Gt].el : re;
3535        for (; nt <= Dt; )
3536          ee(
3537            null,
3538            Ee[nt] = dt ? Zl(Ee[nt]) : eo(Ee[nt]),
3539            Ze,
3540            sr,
3541            et,
3542            ft,
3543            rt,
3544            Qe,
3545            dt
3546          ), nt++;
3547      }
3548    } else if (nt > Dt)
3549      for (; nt <= Nt; )
3550        ur(me[nt], et, ft, !0), nt++;
3551    else {
3552      const Gt = nt, sr = nt, We = /* @__PURE__ */ new Map();
3553      for (nt = sr; nt <= Dt; nt++) {
3554        const Ir = Ee[nt] = dt ? Zl(Ee[nt]) : eo(Ee[nt]);
3555        Ir.key != null && We.set(Ir.key, nt);
3556      }
3557      let or, hr = 0;
3558      const Cr = Dt - sr + 1;
3559      let wn = !1, ut = 0;
3560      const er = new Array(Cr);
3561      for (nt = 0; nt < Cr; nt++) er[nt] = 0;
3562      for (nt = Gt; nt <= Nt; nt++) {
3563        const Ir = me[nt];
3564        if (hr >= Cr) {
3565          ur(Ir, et, ft, !0);
3566          continue;
3567        }
3568        let pn;
3569        if (Ir.key != null)
3570          pn = We.get(Ir.key);
3571        else
3572          for (or = sr; or <= Dt; or++)
3573            if (er[or - sr] === 0 && No(Ir, Ee[or])) {
3574              pn = or;
3575              break;
3576            }
3577        pn === void 0 ? ur(Ir, et, ft, !0) : (er[pn - sr] = nt + 1, pn >= ut ? ut = pn : wn = !0, ee(
3578          Ir,
3579          Ee[pn],
3580          Ze,
3581          null,
3582          et,
3583          ft,
3584          rt,
3585          Qe,
3586          dt
3587        ), hr++);
3588      }
3589      const Ut = wn ? VR(er) : th;
3590      for (or = Ut.length - 1, nt = Cr - 1; nt >= 0; nt--) {
3591        const Ir = sr + nt, pn = Ee[Ir], kt = Ir + 1 < Tt ? Ee[Ir + 1].el : re;
3592        er[nt] === 0 ? ee(
3593          null,
3594          pn,
3595          Ze,
3596          kt,
3597          et,
3598          ft,
3599          rt,
3600          Qe,
3601          dt
3602        ) : wn && (or < 0 || nt !== Ut[or] ? Qt(pn, Ze, kt, 2) : or--);
3603      }
3604    }
3605  }, Qt = (me, Ee, Ze, re, et = null) => {
3606    const { el: ft, type: rt, transition: Qe, children: dt, shapeFlag: nt } = me;
3607    if (nt & 6) {
3608      Qt(me.component.subTree, Ee, Ze, re);
3609      return;
3610    }
3611    if (nt & 128) {
3612      me.suspense.move(Ee, Ze, re);
3613      return;
3614    }
3615    if (nt & 64) {
3616      rt.move(me, Ee, Ze, Jt);
3617      return;
3618    }
3619    if (rt === Ci) {
3620      l(ft, Ee, Ze);
3621      for (let Nt = 0; Nt < dt.length; Nt++)
3622        Qt(dt[Nt], Ee, Ze, re);
3623      l(me.anchor, Ee, Ze);
3624      return;
3625    }
3626    if (rt === Ql) {
3627      X(me, Ee, Ze);
3628      return;
3629    }
3630    if (re !== 2 && nt & 1 && Qe)
3631      if (re === 0)
3632        Qe.beforeEnter(ft), l(ft, Ee, Ze), Ei(() => Qe.enter(ft), et);
3633      else {
3634        const { leave: Nt, delayLeave: Dt, afterLeave: Gt } = Qe, sr = () => l(ft, Ee, Ze), We = () => {
3635          Nt(ft, () => {
3636            sr(), Gt && Gt();
3637          });
3638        };
3639        Dt ? Dt(ft, sr, We) : We();
3640      }
3641    else
3642      l(ft, Ee, Ze);
3643  }, ur = (me, Ee, Ze, re = !1, et = !1) => {
3644    const {
3645      type: ft,
3646      props: rt,
3647      ref: Qe,
3648      children: dt,
3649      dynamicChildren: nt,
3650      shapeFlag: Tt,
3651      patchFlag: Nt,
3652      dirs: Dt,
3653      memoIndex: Gt
3654    } = me;
3655    if (Qe != null && hm(Qe, null, Ze, me, !0), Gt != null && (Ee.renderCache[Gt] = void 0), Tt & 256) {
3656      Ee.ctx.deactivate(me);
3657      return;
3658    }
3659    const sr = Tt & 1 && Dt, We = !Zc(me);
3660    let or;
3661    if (We && (or = rt && rt.onVnodeBeforeUnmount) && Cs(or, Ee, me), Tt & 6)
3662      $r(me.component, Ze, re);
3663    else {
3664      if (Tt & 128) {
3665        me.suspense.unmount(Ze, re);
3666        return;
3667      }
3668      sr && da(me, null, Ee, "beforeUnmount"), Tt & 64 ? me.type.remove(
3669        me,
3670        Ee,
3671        Ze,
3672        et,
3673        Jt,
3674        re
3675      ) : nt && // #1153: fast path should not be taken for non-stable (v-for) fragments
3676      (ft !== Ci || Nt > 0 && Nt & 64) ? Fr(
3677        nt,
3678        Ee,
3679        Ze,
3680        !1,
3681        !0
3682      ) : (ft === Ci && Nt & 384 || !et && Tt & 16) && Fr(dt, Ee, Ze), re && Ar(me);
3683    }
3684    (We && (or = rt && rt.onVnodeUnmounted) || sr) && Ei(() => {
3685      or && Cs(or, Ee, me), sr && da(me, null, Ee, "unmounted");
3686    }, Ze);
3687  }, Ar = (me) => {
3688    const { type: Ee, el: Ze, anchor: re, transition: et } = me;
3689    if (Ee === Ci) {
3690      en(Ze, re);
3691      return;
3692    }
3693    if (Ee === Ql) {
3694      ye(me);
3695      return;
3696    }
3697    const ft = () => {
3698      h(Ze), et && !et.persisted && et.afterLeave && et.afterLeave();
3699    };
3700    if (me.shapeFlag & 1 && et && !et.persisted) {
3701      const { leave: rt, delayLeave: Qe } = et, dt = () => rt(Ze, ft);
3702      Qe ? Qe(me.el, ft, dt) : dt();
3703    } else
3704      ft();
3705  }, en = (me, Ee) => {
3706    let Ze;
3707    for (; me !== Ee; )
3708      Ze = z(me), h(me), me = Ze;
3709    h(Ee);
3710  }, $r = (me, Ee, Ze) => {
3711    const { bum: re, scope: et, update: ft, subTree: rt, um: Qe, m: dt, a: nt } = me;
3712    fm(dt), fm(nt), re && nh(re), et.stop(), ft && (ft.active = !1, ur(rt, me, Ee, Ze)), Qe && Ei(Qe, Ee), Ei(() => {
3713      me.isUnmounted = !0;
3714    }, Ee), Ee && Ee.pendingBranch && !Ee.isUnmounted && me.asyncDep && !me.asyncResolved && me.suspenseId === Ee.pendingId && (Ee.deps--, Ee.deps === 0 && Ee.resolve());
3715  }, Fr = (me, Ee, Ze, re = !1, et = !1, ft = 0) => {
3716    for (let rt = ft; rt < me.length; rt++)
3717      ur(me[rt], Ee, Ze, re, et);
3718  }, dn = (me) => me.shapeFlag & 6 ? dn(me.component.subTree) : me.shapeFlag & 128 ? me.suspense.next() : z(me.anchor || me.el);
3719  let kn = !1;
3720  const tn = (me, Ee, Ze) => {
3721    me == null ? Ee._vnode && ur(Ee._vnode, null, null, !0) : ee(
3722      Ee._vnode || null,
3723      me,
3724      Ee,
3725      null,
3726      null,
3727      null,
3728      Ze
3729    ), kn || (kn = !0, W1(), cm(), kn = !1), Ee._vnode = me;
3730  }, Jt = {
3731    p: ee,
3732    um: ur,
3733    m: Qt,
3734    r: Ar,
3735    mt: Xe,
3736    mc: Ne,
3737    pc: ot,
3738    pbc: ze,
3739    n: dn,
3740    o: e
3741  };
3742  let Fi, Kn;
3743  return t && ([Fi, Kn] = t(
3744    Jt
3745  )), {
3746    render: tn,
3747    hydrate: Fi,
3748    createApp: DR(tn, Fi)
3749  };
3750}
3751function Ky({ type: e, props: t }, s) {
3752  return s === "svg" && e === "foreignObject" || s === "mathml" && e === "annotation-xml" && t && t.encoding && t.encoding.includes("html") ? void 0 : s;
3753}
3754function Rc({ effect: e, update: t }, s) {
3755  e.allowRecurse = t.allowRecurse = s;
3756}
3757function aA(e, t) {
3758  return (!e || e && !e.pendingBranch) && t && !t.persisted;
3759}
3760function Ob(e, t, s = !1) {
3761  const l = e.children, h = t.children;
3762  if (jt(l) && jt(h))
3763    for (let g = 0; g < l.length; g++) {
3764      const m = l[g];
3765      let c = h[g];
3766      c.shapeFlag & 1 && !c.dynamicChildren && ((c.patchFlag <= 0 || c.patchFlag === 32) && (c = h[g] = Zl(h[g]), c.el = m.el), !s && c.patchFlag !== -2 && Ob(m, c)), c.type === rc && (c.el = m.el);
3767    }
3768}
3769function VR(e) {
3770  const t = e.slice(), s = [0];
3771  let l, h, g, m, c;
3772  const w = e.length;
3773  for (l = 0; l < w; l++) {
3774    const O = e[l];
3775    if (O !== 0) {
3776      if (h = s[s.length - 1], e[h] < O) {
3777        t[l] = h, s.push(l);
3778        continue;
3779      }
3780      for (g = 0, m = s.length - 1; g < m; )
3781        c = g + m >> 1, e[s[c]] < O ? g = c + 1 : m = c;
3782      O < e[s[g]] && (g > 0 && (t[l] = s[g - 1]), s[g] = l);
3783    }
3784  }
3785  for (g = s.length, m = s[g - 1]; g-- > 0; )
3786    s[g] = m, m = t[m];
3787  return s;
3788}
3789function lA(e) {
3790  const t = e.subTree.component;
3791  if (t)
3792    return t.asyncDep && !t.asyncResolved ? t : lA(t);
3793}
3794function fm(e) {
3795  if (e)
3796    for (let t = 0; t < e.length; t++) e[t].active = !1;
3797}
3798const Db = Symbol.for("v-scx"), Rb = () => ch(Db);
3799function cA(e, t) {
3800  return yd(e, null, t);
3801}
3802function Lb(e, t) {
3803  return yd(
3804    e,
3805    null,
3806    { flush: "post" }
3807  );
3808}
3809function Fb(e, t) {
3810  return yd(
3811    e,
3812    null,
3813    { flush: "sync" }
3814  );
3815}
3816const Ap = {};
3817function tl(e, t, s) {
3818  return yd(e, t, s);
3819}
3820function yd(e, t, {
3821  immediate: s,
3822  deep: l,
3823  flush: h,
3824  once: g,
3825  onTrack: m,
3826  onTrigger: c
3827} = Kr) {
3828  if (t && g) {
3829    const Se = t;
3830    t = (...je) => {
3831      Se(...je), Ae();
3832    };
3833  }
3834  const w = fi, O = (Se) => l === !0 ? Se : (
3835    // for deep: false, only traverse root-level properties
3836    Kl(Se, l === !1 ? 1 : void 0)
3837  );
3838  let P, R = !1, z = !1;
3839  if (Ii(e) ? (P = () => e.value, R = hh(e)) : Gc(e) ? (P = () => O(e), R = !0) : jt(e) ? (z = !0, R = e.some((Se) => Gc(Se) || hh(Se)), P = () => e.map((Se) => {
3840    if (Ii(Se))
3841      return Se.value;
3842    if (Gc(Se))
3843      return O(Se);
3844    if (ar(Se))
3845      return va(Se, w, 2);
3846  })) : ar(e) ? t ? P = () => va(e, w, 2) : P = () => (J && J(), Ms(
3847    e,
3848    w,
3849    3,
3850    [K]
3851  )) : P = di, t && l) {
3852    const Se = P;
3853    P = () => Kl(Se());
3854  }
3855  let J, K = (Se) => {
3856    J = X.onStop = () => {
3857      va(Se, w, 4), J = X.onStop = void 0;
3858    };
3859  }, ee;
3860  if (xd)
3861    if (K = di, t ? s && Ms(t, w, 3, [
3862      P(),
3863      z ? [] : void 0,
3864      K
3865    ]) : P(), h === "sync") {
3866      const Se = Rb();
3867      ee = Se.__watcherHandles || (Se.__watcherHandles = []);
3868    } else
3869      return di;
3870  let ue = z ? new Array(e.length).fill(Ap) : Ap;
3871  const Ce = () => {
3872    if (!(!X.active || !X.dirty))
3873      if (t) {
3874        const Se = X.run();
3875        (l || R || (z ? Se.some((je, Ne) => Uo(je, ue[Ne])) : Uo(Se, ue))) && (J && J(), Ms(t, w, 3, [
3876          Se,
3877          // pass undefined as the old value when it's changed for the first time
3878          ue === Ap ? void 0 : z && ue[0] === Ap ? [] : ue,
3879          K
3880        ]), ue = Se);
3881      } else
3882        X.run();
3883  };
3884  Ce.allowRecurse = !!t;
3885  let ge;
3886  h === "sync" ? ge = Ce : h === "post" ? ge = () => Ei(Ce, w && w.suspense) : (Ce.pre = !0, w && (Ce.id = w.uid), ge = () => sg(Ce));
3887  const X = new Jc(P, di, ge), ye = ob(), Ae = () => {
3888    X.stop(), ye && nb(ye.effects, X);
3889  };
3890  return t ? s ? Ce() : ue = X.run() : h === "post" ? Ei(
3891    X.run.bind(X),
3892    w && w.suspense
3893  ) : X.run(), ee && ee.push(Ae), Ae;
3894}
3895function UR(e, t, s) {
3896  const l = this.proxy, h = vr(e) ? e.includes(".") ? uA(l, e) : () => l[e] : e.bind(l, l);
3897  let g;
3898  ar(t) ? g = t : (g = t.handler, s = t);
3899  const m = tu(this), c = yd(h, g.bind(l), s);
3900  return m(), c;
3901}
3902function uA(e, t) {
3903  const s = t.split(".");
3904  return () => {
3905    let l = e;
3906    for (let h = 0; h < s.length && l; h++)
3907      l = l[s[h]];
3908    return l;
3909  };
3910}
3911function Kl(e, t = 1 / 0, s) {
3912  if (t <= 0 || !hn(e) || e.__v_skip || (s = s || /* @__PURE__ */ new Set(), s.has(e)))
3913    return e;
3914  if (s.add(e), t--, Ii(e))
3915    Kl(e.value, t, s);
3916  else if (jt(e))
3917    for (let l = 0; l < e.length; l++)
3918      Kl(e[l], t, s);
3919  else if (ou(e) || rh(e))
3920    e.forEach((l) => {
3921      Kl(l, t, s);
3922    });
3923  else if (ME(e)) {
3924    for (const l in e)
3925      Kl(e[l], t, s);
3926    for (const l of Object.getOwnPropertySymbols(e))
3927      Object.prototype.propertyIsEnumerable.call(e, l) && Kl(e[l], t, s);
3928  }
3929  return e;
3930}
3931const _d = (e) => e.type.__isKeepAlive, qR = {
3932  name: "KeepAlive",
3933  // Marker for special handling inside the renderer. We are not using a ===
3934  // check directly on KeepAlive in the renderer, because importing it directly
3935  // would prevent it from being tree-shaken.
3936  __isKeepAlive: !0,
3937  props: {
3938    include: [String, RegExp, Array],
3939    exclude: [String, RegExp, Array],
3940    max: [String, Number]
3941  },
3942  setup(e, { slots: t }) {
3943    const s = ba(), l = s.ctx;
3944    if (!l.renderer)
3945      return () => {
3946        const ge = t.default && t.default();
3947        return ge && ge.length === 1 ? ge[0] : ge;
3948      };
3949    const h = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Set();
3950    let m = null;
3951    const c = s.suspense, {
3952      renderer: {
3953        p: w,
3954        m: O,
3955        um: P,
3956        o: { createElement: R }
3957      }
3958    } = l, z = R("div");
3959    l.activate = (ge, X, ye, Ae, Se) => {
3960      const je = ge.component;
3961      O(ge, X, ye, 0, c), w(
3962        je.vnode,
3963        ge,
3964        X,
3965        ye,
3966        je,
3967        c,
3968        Ae,
3969        ge.slotScopeIds,
3970        Se
3971      ), Ei(() => {
3972        je.isDeactivated = !1, je.a && nh(je.a);
3973        const Ne = ge.props && ge.props.onVnodeMounted;
3974        Ne && Cs(Ne, je.parent, ge);
3975      }, c);
3976    }, l.deactivate = (ge) => {
3977      const X = ge.component;
3978      fm(X.m), fm(X.a), O(ge, z, null, 1, c), Ei(() => {
3979        X.da && nh(X.da);
3980        const ye = ge.props && ge.props.onVnodeUnmounted;
3981        ye && Cs(ye, X.parent, ge), X.isDeactivated = !0;
3982      }, c);
3983    };
3984    function J(ge) {
3985      Xy(ge), P(ge, s, c, !0);
3986    }
3987    function K(ge) {
3988      h.forEach((X, ye) => {
3989        const Ae = iv(X.type);
3990        Ae && (!ge || !ge(Ae)) && ee(ye);
3991      });
3992    }
3993    function ee(ge) {
3994      const X = h.get(ge);
3995      !m || !No(X, m) ? J(X) : m && Xy(m), h.delete(ge), g.delete(ge);
3996    }
3997    tl(
3998      () => [e.include, e.exclude],
3999      ([ge, X]) => {
4000        ge && K((ye) => Lf(ge, ye)), X && K((ye) => !Lf(X, ye));
4001      },
4002      // prune post-render after `current` has been updated
4003      { flush: "post", deep: !0 }
4004    );
4005    let ue = null;
4006    const Ce = () => {
4007      ue != null && (G_(s.subTree.type) ? Ei(() => {
4008        h.set(ue, Cp(s.subTree));
4009      }, s.subTree.suspense) : h.set(ue, Cp(s.subTree)));
4010    };
4011    return Ah(Ce), dd(Ce), pd(() => {
4012      h.forEach((ge) => {
4013        const { subTree: X, suspense: ye } = s, Ae = Cp(X);
4014        if (ge.type === Ae.type && ge.key === Ae.key) {
4015          Xy(Ae);
4016          const Se = Ae.component.da;
4017          Se && Ei(Se, ye);
4018          return;
4019        }
4020        J(ge);
4021      });
4022    }), () => {
4023      if (ue = null, !t.default)
4024        return null;
4025      const ge = t.default(), X = ge[0];
4026      if (ge.length > 1)
4027        return m = null, ge;
4028      if (!sl(X) || !(X.shapeFlag & 4) && !(X.shapeFlag & 128))
4029        return m = null, X;
4030      let ye = Cp(X);
4031      const Ae = ye.type, Se = iv(
4032        Zc(ye) ? ye.type.__asyncResolved || {} : Ae
4033      ), { include: je, exclude: Ne, max: Oe } = e;
4034      if (je && (!Se || !Lf(je, Se)) || Ne && Se && Lf(Ne, Se))
4035        return m = ye, X;
4036      const ze = ye.key == null ? Ae : ye.key, He = h.get(ze);
4037      return ye.el && (ye = qo(ye), X.shapeFlag & 128 && (X.ssContent = 
vendor: 7,393 bytes, lines 4037-4329
4037ye)), ue = ze, He ? (ye.el = He.el, ye.component = He.component, ye.transition && il(ye, ye.transition), ye.shapeFlag |= 512, g.delete(ze), g.add(ze)) : (g.add(ze), Oe && g.size > parseInt(Oe, 10) && ee(g.values().next().value)), ye.shapeFlag |= 256, m = ye, G_(X.type) ? X : ye;
4038    };
4039  }
4040}, hA = qR;
4041function Lf(e, t) {
4042  return jt(e) ? e.some((s) => Lf(s, t)) : vr(e) ? e.split(",").includes(t) : gD(e) ? e.test(t) : !1;
4043}
4044function zb(e, t) {
4045  fA(e, "a", t);
4046}
4047function Bb(e, t) {
4048  fA(e, "da", t);
4049}
4050function fA(e, t, s = fi) {
4051  const l = e.__wdc || (e.__wdc = () => {
4052    let h = s;
4053    for (; h; ) {
4054      if (h.isDeactivated)
4055        return;
4056      h = h.parent;
4057    }
4058    return e();
4059  });
4060  if (cg(t, l, s), s) {
4061    let h = s.parent;
4062    for (; h && h.parent; )
4063      _d(h.parent.vnode) && HR(l, t, s, h), h = h.parent;
4064  }
4065}
4066function HR(e, t, s, l) {
4067  const h = cg(
4068    t,
4069    e,
4070    l,
4071    !0
4072    /* prepend */
4073  );
4074  md(() => {
4075    nb(l[t], h);
4076  }, s);
4077}
4078function Xy(e) {
4079  e.shapeFlag &= -257, e.shapeFlag &= -513;
4080}
4081function Cp(e) {
4082  return e.shapeFlag & 128 ? e.ssContent : e;
4083}
4084const Gl = Symbol("_leaveCb"), Ip = Symbol("_enterCb");
4085function ug() {
4086  const e = {
4087    isMounted: !1,
4088    isLeaving: !1,
4089    isUnmounting: !1,
4090    leavingVNodes: /* @__PURE__ */ new Map()
4091  };
4092  return Ah(() => {
4093    e.isMounted = !0;
4094  }), pd(() => {
4095    e.isUnmounting = !0;
4096  }), e;
4097}
4098const xo = [Function, Array], hg = {
4099  mode: String,
4100  appear: Boolean,
4101  persisted: Boolean,
4102  // enter
4103  onBeforeEnter: xo,
4104  onEnter: xo,
4105  onAfterEnter: xo,
4106  onEnterCancelled: xo,
4107  // leave
4108  onBeforeLeave: xo,
4109  onLeave: xo,
4110  onAfterLeave: xo,
4111  onLeaveCancelled: xo,
4112  // appear
4113  onBeforeAppear: xo,
4114  onAppear: xo,
4115  onAfterAppear: xo,
4116  onAppearCancelled: xo
4117}, dA = (e) => {
4118  const t = e.subTree;
4119  return t.component ? dA(t.component) : t;
4120}, GR = {
4121  name: "BaseTransition",
4122  props: hg,
4123  setup(e, { slots: t }) {
4124    const s = ba(), l = ug();
4125    return () => {
4126      const h = t.default && vd(t.default(), !0);
4127      if (!h || !h.length)
4128        return;
4129      let g = h[0];
4130      if (h.length > 1) {
4131        for (const z of h)
4132          if (z.type !== hi) {
4133            g = z;
4134            break;
4135          }
4136      }
4137      const m = Nr(e), { mode: c } = m;
4138      if (l.isLeaving)
4139        return Jy(g);
4140      const w = ow(g);
4141      if (!w)
4142        return Jy(g);
4143      let O = Qc(
4144        w,
4145        m,
4146        l,
4147        s,
4148        // #11061, ensure enterHooks is fresh after clone
4149        (z) => O = z
4150      );
4151      il(w, O);
4152      const P = s.subTree, R = P && ow(P);
4153      if (R && R.type !== hi && !No(w, R) && dA(s).type !== hi) {
4154        const z = Qc(
4155          R,
4156          m,
4157          l,
4158          s
4159        );
4160        if (il(R, z), c === "out-in" && w.type !== hi)
4161          return l.isLeaving = !0, z.afterLeave = () => {
4162            l.isLeaving = !1, s.update.active !== !1 && (s.effect.dirty = !0, s.update());
4163          }, Jy(g);
4164        c === "in-out" && w.type !== hi && (z.delayLeave = (J, K, ee) => {
4165          const ue = pA(
4166            l,
4167            R
4168          );
4169          ue[String(R.key)] = R, J[Gl] = () => {
4170            K(), J[Gl] = void 0, delete O.delayedLeave;
4171          }, O.delayedLeave = ee;
4172        });
4173      }
4174      return g;
4175    };
4176  }
4177}, Nb = GR;
4178function pA(e, t) {
4179  const { leavingVNodes: s } = e;
4180  let l = s.get(t.type);
4181  return l || (l = /* @__PURE__ */ Object.create(null), s.set(t.type, l)), l;
4182}
4183function Qc(e, t, s, l, h) {
4184  const {
4185    appear: g,
4186    mode: m,
4187    persisted: c = !1,
4188    onBeforeEnter: w,
4189    onEnter: O,
4190    onAfterEnter: P,
4191    onEnterCancelled: R,
4192    onBeforeLeave: z,
4193    onLeave: J,
4194    onAfterLeave: K,
4195    onLeaveCancelled: ee,
4196    onBeforeAppear: ue,
4197    onAppear: Ce,
4198    onAfterAppear: ge,
4199    onAppearCancelled: X
4200  } = t, ye = String(e.key), Ae = pA(s, e), Se = (Oe, ze) => {
4201    Oe && Ms(
4202      Oe,
4203      l,
4204      9,
4205      ze
4206    );
4207  }, je = (Oe, ze) => {
4208    const He = ze[1];
4209    Se(Oe, ze), jt(Oe) ? Oe.every((Ie) => Ie.length <= 1) && He() : Oe.length <= 1 && He();
4210  }, Ne = {
4211    mode: m,
4212    persisted: c,
4213    beforeEnter(Oe) {
4214      let ze = w;
4215      if (!s.isMounted)
4216        if (g)
4217          ze = ue || w;
4218        else
4219          return;
4220      Oe[Gl] && Oe[Gl](
4221        !0
4222        /* cancelled */
4223      );
4224      const He = Ae[ye];
4225      He && No(e, He) && He.el[Gl] && He.el[Gl](), Se(ze, [Oe]);
4226    },
4227    enter(Oe) {
4228      let ze = O, He = P, Ie = R;
4229      if (!s.isMounted)
4230        if (g)
4231          ze = Ce || O, He = ge || P, Ie = X || R;
4232        else
4233          return;
4234      let $e = !1;
4235      const Xe = Oe[Ip] = (st) => {
4236        $e || ($e = !0, st ? Se(Ie, [Oe]) : Se(He, [Oe]), Ne.delayedLeave && Ne.delayedLeave(), Oe[Ip] = void 0);
4237      };
4238      ze ? je(ze, [Oe, Xe]) : Xe();
4239    },
4240    leave(Oe, ze) {
4241      const He = String(e.key);
4242      if (Oe[Ip] && Oe[Ip](
4243        !0
4244        /* cancelled */
4245      ), s.isUnmounting)
4246        return ze();
4247      Se(z, [Oe]);
4248      let Ie = !1;
4249      const $e = Oe[Gl] = (Xe) => {
4250        Ie || (Ie = !0, ze(), Xe ? Se(ee, [Oe]) : Se(K, [Oe]), Oe[Gl] = void 0, Ae[He] === e && delete Ae[He]);
4251      };
4252      Ae[He] = e, J ? je(J, [Oe, $e]) : $e();
4253    },
4254    clone(Oe) {
4255      const ze = Qc(
4256        Oe,
4257        t,
4258        s,
4259        l,
4260        h
4261      );
4262      return h && h(ze), ze;
4263    }
4264  };
4265  return Ne;
4266}
4267function Jy(e) {
4268  if (_d(e))
4269    return e = qo(e), e.children = null, e;
4270}
4271function ow(e) {
4272  if (!_d(e))
4273    return e;
4274  const { shapeFlag: t, children: s } = e;
4275  if (s) {
4276    if (t & 16)
4277      return s[0];
4278    if (t & 32 && ar(s.default))
4279      return s.default();
4280  }
4281}
4282function il(e, t) {
4283  e.shapeFlag & 6 && e.component ? il(e.component.subTree, t) : e.shapeFlag & 128 ? (e.ssContent.transition = t.clone(e.ssContent), e.ssFallback.transition = t.clone(e.ssFallback)) : e.transition = t;
4284}
4285function vd(e, t = !1, s) {
4286  let l = [], h = 0;
4287  for (let g = 0; g < e.length; g++) {
4288    let m = e[g];
4289    const c = s == null ? m.key : String(s) + String(m.key != null ? m.key : g);
4290    m.type === Ci ? (m.patchFlag & 128 && h++, l = l.concat(
4291      vd(m.children, t, c)
4292    )) : (t || m.type !== hi) && l.push(c != null ? qo(m, { key: c }) : m);
4293  }
4294  if (h > 1)
4295    for (let g = 0; g < l.length; g++)
4296      l[g].patchFlag = -2;
4297  return l;
4298}
4299const ZR = (e) => e.__isTeleport, Bf = (e) => e && (e.disabled || e.disabled === ""), aw = (e) => typeof SVGElement < "u" && e instanceof SVGElement, lw = (e) => typeof MathMLElement == "function" && e instanceof MathMLElement, Q_ = (e, t) => {
4300  const s = e && e.to;
4301  return vr(s) ? t ? t(s) : null : s;
4302}, WR = {
4303  name: "Teleport",
4304  __isTeleport: !0,
4305  process(e, t, s, l, h, g, m, c, w, O) {
4306    const {
4307      mc: P,
4308      pc: R,
4309      pbc: z,
4310      o: { insert: J, querySelector: K, createText: ee, createComment: ue }
4311    } = O, Ce = Bf(t.props);
4312    let { shapeFlag: ge, children: X, dynamicChildren: ye } = t;
4313    if (e == null) {
4314      const Ae = t.el = ee(""), Se = t.anchor = ee("");
4315      J(Ae, s, l), J(Se, s, l);
4316      const je = t.target = Q_(t.props, K), Ne = t.targetAnchor = ee("");
4317      je && (J(Ne, je), m === "svg" || aw(je) ? m = "svg" : (m === "mathml" || lw(je)) && (m = "mathml"));
4318      const Oe = (ze, He) => {
4319        ge & 16 && P(
4320          X,
4321          ze,
4322          He,
4323          h,
4324          g,
4325          m,
4326          c,
4327          w
4328        );
4329      };
vendor: 44,176 bytes, lines 4330-5948
4330      Ce ? Oe(s, Se) : je && Oe(je, Ne);
4331    } else {
4332      t.el = e.el;
4333      const Ae = t.anchor = e.anchor, Se = t.target = e.target, je = t.targetAnchor = e.targetAnchor, Ne = Bf(e.props), Oe = Ne ? s : Se, ze = Ne ? Ae : je;
4334      if (m === "svg" || aw(Se) ? m = "svg" : (m === "mathml" || lw(Se)) && (m = "mathml"), ye ? (z(
4335        e.dynamicChildren,
4336        ye,
4337        Oe,
4338        h,
4339        g,
4340        m,
4341        c
4342      ), Ob(e, t, !0)) : w || R(
4343        e,
4344        t,
4345        Oe,
4346        ze,
4347        h,
4348        g,
4349        m,
4350        c,
4351        !1
4352      ), Ce)
4353        Ne ? t.props && e.props && t.props.to !== e.props.to && (t.props.to = e.props.to) : Pp(
4354          t,
4355          s,
4356          Ae,
4357          O,
4358          1
4359        );
4360      else if ((t.props && t.props.to) !== (e.props && e.props.to)) {
4361        const He = t.target = Q_(
4362          t.props,
4363          K
4364        );
4365        He && Pp(
4366          t,
4367          He,
4368          null,
4369          O,
4370          0
4371        );
4372      } else Ne && Pp(
4373        t,
4374        Se,
4375        je,
4376        O,
4377        1
4378      );
4379    }
4380    gA(t);
4381  },
4382  remove(e, t, s, l, { um: h, o: { remove: g } }, m) {
4383    const { shapeFlag: c, children: w, anchor: O, targetAnchor: P, target: R, props: z } = e;
4384    if (R && g(P), m && g(O), c & 16) {
4385      const J = m || !Bf(z);
4386      for (let K = 0; K < w.length; K++) {
4387        const ee = w[K];
4388        h(
4389          ee,
4390          t,
4391          s,
4392          J,
4393          !!ee.dynamicChildren
4394        );
4395      }
4396    }
4397  },
4398  move: Pp,
4399  hydrate: KR
4400};
4401function Pp(e, t, s, { o: { insert: l }, m: h }, g = 2) {
4402  g === 0 && l(e.targetAnchor, t, s);
4403  const { el: m, anchor: c, shapeFlag: w, children: O, props: P } = e, R = g === 2;
4404  if (R && l(m, t, s), (!R || Bf(P)) && w & 16)
4405    for (let z = 0; z < O.length; z++)
4406      h(
4407        O[z],
4408        t,
4409        s,
4410        2
4411      );
4412  R && l(c, t, s);
4413}
4414function KR(e, t, s, l, h, g, {
4415  o: { nextSibling: m, parentNode: c, querySelector: w }
4416}, O) {
4417  const P = t.target = Q_(
4418    t.props,
4419    w
4420  );
4421  if (P) {
4422    const R = P._lpa || P.firstChild;
4423    if (t.shapeFlag & 16)
4424      if (Bf(t.props))
4425        t.anchor = O(
4426          m(e),
4427          t,
4428          c(e),
4429          s,
4430          l,
4431          h,
4432          g
4433        ), t.targetAnchor = R;
4434      else {
4435        t.anchor = m(e);
4436        let z = R;
4437        for (; z; )
4438          if (z = m(z), z && z.nodeType === 8 && z.data === "teleport anchor") {
4439            t.targetAnchor = z, P._lpa = t.targetAnchor && m(t.targetAnchor);
4440            break;
4441          }
4442        O(
4443          R,
4444          t,
4445          P,
4446          s,
4447          l,
4448          h,
4449          g
4450        );
4451      }
4452    gA(t);
4453  }
4454  return t.anchor && m(t.anchor);
4455}
4456const mA = WR;
4457function gA(e) {
4458  const t = e.ctx;
4459  if (t && t.ut) {
4460    let s = e.children[0].el;
4461    for (; s && s !== e.targetAnchor; )
4462      s.nodeType === 1 && s.setAttribute("data-v-owner", t.uid), s = s.nextSibling;
4463    t.ut();
4464  }
4465}
4466const Ci = Symbol.for("v-fgt"), rc = Symbol.for("v-txt"), hi = Symbol.for("v-cmt"), Ql = Symbol.for("v-stc"), Nf = [];
4467let Is = null;
4468function bd(e = !1) {
4469  Nf.push(Is = e ? null : []);
4470}
4471function yA() {
4472  Nf.pop(), Is = Nf[Nf.length - 1] || null;
4473}
4474let eu = 1;
4475function dm(e) {
4476  eu += e;
4477}
4478function _A(e) {
4479  return e.dynamicChildren = eu > 0 ? Is || th : null, yA(), eu > 0 && Is && Is.push(e), e;
4480}
4481function vA(e, t, s, l, h, g) {
4482  return _A(
4483    dg(
4484      e,
4485      t,
4486      s,
4487      l,
4488      h,
4489      g,
4490      !0
4491    )
4492  );
4493}
4494function fg(e, t, s, l, h) {
4495  return _A(
4496    An(
4497      e,
4498      t,
4499      s,
4500      l,
4501      h,
4502      !0
4503    )
4504  );
4505}
4506function sl(e) {
4507  return e ? e.__v_isVNode === !0 : !1;
4508}
4509function No(e, t) {
4510  return e.type === t.type && e.key === t.key;
4511}
4512function bA(e) {
4513}
4514const xA = ({ key: e }) => e ?? null, $p = ({
4515  ref: e,
4516  ref_key: t,
4517  ref_for: s
4518}) => (typeof e == "number" && (e = "" + e), e != null ? vr(e) || Ii(e) || ar(e) ? { i: pi, r: e, k: t, f: !!s } : e : null);
4519function dg(e, t = null, s = null, l = 0, h = null, g = e === Ci ? 0 : 1, m = !1, c = !1) {
4520  const w = {
4521    __v_isVNode: !0,
4522    __v_skip: !0,
4523    type: e,
4524    props: t,
4525    key: t && xA(t),
4526    ref: t && $p(t),
4527    scopeId: ag,
4528    slotScopeIds: null,
4529    children: s,
4530    component: null,
4531    suspense: null,
4532    ssContent: null,
4533    ssFallback: null,
4534    dirs: null,
4535    transition: null,
4536    el: null,
4537    anchor: null,
4538    target: null,
4539    targetAnchor: null,
4540    staticCount: 0,
4541    shapeFlag: g,
4542    patchFlag: l,
4543    dynamicProps: h,
4544    dynamicChildren: null,
4545    appContext: null,
4546    ctx: pi
4547  };
4548  return c ? (jb(w, s), g & 128 && e.normalize(w)) : s && (w.shapeFlag |= vr(s) ? 8 : 16), eu > 0 && // avoid a block node from tracking itself
4549  !m && // has current parent block
4550  Is && // presence of a patch flag indicates this node needs patching on updates.
4551  // component nodes also should always be patched, because even if the
4552  // component doesn't need to update, it needs to persist the instance on to
4553  // the next vnode so that it can be properly unmounted later.
4554  (w.patchFlag > 0 || g & 6) && // the EVENTS flag is only for hydration and if it is the only flag, the
4555  // vnode should not be considered dynamic due to handler caching.
4556  w.patchFlag !== 32 && Is.push(w), w;
4557}
4558const An = XR;
4559function XR(e, t = null, s = null, l = 0, h = null, g = !1) {
4560  if ((!e || e === S2) && (e = hi), sl(e)) {
4561    const c = qo(
4562      e,
4563      t,
4564      !0
4565      /* mergeRef: true */
4566    );
4567    return s && jb(c, s), eu > 0 && !g && Is && (c.shapeFlag & 6 ? Is[Is.indexOf(e)] = c : Is.push(c)), c.patchFlag = -2, c;
4568  }
4569  if (tL(e) && (e = e.__vccOpts), t) {
4570    t = $b(t);
4571    let { class: c, style: w } = t;
4572    c && !vr(c) && (t.class = Eh(c)), hn(w) && (rg(w) && !jt(w) && (w = Hr({}, w)), t.style = Th(w));
4573  }
4574  const m = vr(e) ? 1 : G_(e) ? 128 : ZR(e) ? 64 : hn(e) ? 4 : ar(e) ? 2 : 0;
4575  return dg(
4576    e,
4577    t,
4578    s,
4579    l,
4580    h,
4581    m,
4582    g,
4583    !0
4584  );
4585}
4586function $b(e) {
4587  return e ? rg(e) || eA(e) ? Hr({}, e) : e : null;
4588}
4589function qo(e, t, s = !1, l = !1) {
4590  const { props: h, ref: g, patchFlag: m, children: c, transition: w } = e, O = t ? Vb(h || {}, t) : h, P = {
4591    __v_isVNode: !0,
4592    __v_skip: !0,
4593    type: e.type,
4594    props: O,
4595    key: O && xA(O),
4596    ref: t && t.ref ? (
4597      // #2078 in the case of <component :is="vnode" ref="extra"/>
4598      // if the vnode itself already has a ref, cloneVNode will need to merge
4599      // the refs so the single vnode can be set on multiple refs
4600      s && g ? jt(g) ? g.concat($p(t)) : [g, $p(t)] : $p(t)
4601    ) : g,
4602    scopeId: e.scopeId,
4603    slotScopeIds: e.slotScopeIds,
4604    children: c,
4605    target: e.target,
4606    targetAnchor: e.targetAnchor,
4607    staticCount: e.staticCount,
4608    shapeFlag: e.shapeFlag,
4609    // if the vnode is cloned with extra props, we can no longer assume its
4610    // existing patch flag to be reliable and need to add the FULL_PROPS flag.
4611    // note: preserve flag for fragments since they use the flag for children
4612    // fast paths only.
4613    patchFlag: t && e.type !== Ci ? m === -1 ? 16 : m | 16 : m,
4614    dynamicProps: e.dynamicProps,
4615    dynamicChildren: e.dynamicChildren,
4616    appContext: e.appContext,
4617    dirs: e.dirs,
4618    transition: w,
4619    // These should technically only be non-null on mounted VNodes. However,
4620    // they *should* be copied for kept-alive vnodes. So we just always copy
4621    // them since them being non-null during a mount doesn't affect the logic as
4622    // they will simply be overwritten.
4623    component: e.component,
4624    suspense: e.suspense,
4625    ssContent: e.ssContent && qo(e.ssContent),
4626    ssFallback: e.ssFallback && qo(e.ssFallback),
4627    el: e.el,
4628    anchor: e.anchor,
4629    ctx: e.ctx,
4630    ce: e.ce
4631  };
4632  return w && l && il(
4633    P,
4634    w.clone(P)
4635  ), P;
4636}
4637function pg(e = " ", t = 0) {
4638  return An(rc, null, e, t);
4639}
4640function wA(e, t) {
4641  const s = An(Ql, null, e);
4642  return s.staticCount = t, s;
4643}
4644function SA(e = "", t = !1) {
4645  return t ? (bd(), fg(hi, null, e)) : An(hi, null, e);
4646}
4647function eo(e) {
4648  return e == null || typeof e == "boolean" ? An(hi) : jt(e) ? An(
4649    Ci,
4650    null,
4651    // #3666, avoid reference pollution when reusing vnode
4652    e.slice()
4653  ) : typeof e == "object" ? Zl(e) : An(rc, null, String(e));
4654}
4655function Zl(e) {
4656  return e.el === null && e.patchFlag !== -1 || e.memo ? e : qo(e);
4657}
4658function jb(e, t) {
4659  let s = 0;
4660  const { shapeFlag: l } = e;
4661  if (t == null)
4662    t = null;
4663  else if (jt(t))
4664    s = 16;
4665  else if (typeof t == "object")
4666    if (l & 65) {
4667      const h = t.default;
4668      h && (h._c && (h._d = !1), jb(e, h()), h._c && (h._d = !0));
4669      return;
4670    } else {
4671      s = 32;
4672      const h = t._;
4673      !h && !eA(t) ? t._ctx = pi : h === 3 && pi && (pi.slots._ === 1 ? t._ = 1 : (t._ = 2, e.patchFlag |= 1024));
4674    }
4675  else ar(t) ? (t = { default: t, _ctx: pi }, s = 32) : (t = String(t), l & 64 ? (s = 16, t = [pg(t)]) : s = 8);
4676  e.children = t, e.shapeFlag |= s;
4677}
4678function Vb(...e) {
4679  const t = {};
4680  for (let s = 0; s < e.length; s++) {
4681    const l = e[s];
4682    for (const h in l)
4683      if (h === "class")
4684        t.class !== l.class && (t.class = Eh([t.class, l.class]));
4685      else if (h === "style")
4686        t.style = Th([t.style, l.style]);
4687      else if (su(h)) {
4688        const g = t[h], m = l[h];
4689        m && g !== m && !(jt(g) && g.includes(m)) && (t[h] = g ? [].concat(g, m) : m);
4690      } else h !== "" && (t[h] = l[h]);
4691  }
4692  return t;
4693}
4694function Cs(e, t, s, l = null) {
4695  Ms(e, t, 7, [
4696    s,
4697    l
4698  ]);
4699}
4700const JR = X2();
4701let YR = 0;
4702function TA(e, t, s) {
4703  const l = e.type, h = (t ? t.appContext : e.appContext) || JR, g = {
4704    uid: YR++,
4705    vnode: e,
4706    type: l,
4707    parent: t,
4708    appContext: h,
4709    root: null,
4710    // to be immediately set
4711    next: null,
4712    subTree: null,
4713    // will be set synchronously right after creation
4714    effect: null,
4715    update: null,
4716    // will be set synchronously right after creation
4717    scope: new Jm(
4718      !0
4719      /* detached */
4720    ),
4721    render: null,
4722    proxy: null,
4723    exposed: null,
4724    exposeProxy: null,
4725    withProxy: null,
4726    provides: t ? t.provides : Object.create(h.provides),
4727    accessCache: null,
4728    renderCache: [],
4729    // local resolved assets
4730    components: null,
4731    directives: null,
4732    // resolved props and emits options
4733    propsOptions: rA(l, h),
4734    emitsOptions: _2(l, h),
4735    // emit
4736    emit: null,
4737    // to be set immediately
4738    emitted: null,
4739    // props default value
4740    propsDefaults: Kr,
4741    // inheritAttrs
4742    inheritAttrs: l.inheritAttrs,
4743    // state
4744    ctx: Kr,
4745    data: Kr,
4746    props: Kr,
4747    attrs: Kr,
4748    slots: Kr,
4749    refs: Kr,
4750    setupState: Kr,
4751    setupContext: null,
4752    attrsProxy: null,
4753    slotsProxy: null,
4754    // suspense related
4755    suspense: s,
4756    suspenseId: s ? s.pendingId : 0,
4757    asyncDep: null,
4758    asyncResolved: !1,
4759    // lifecycle hooks
4760    // not using enums here because it results in computed properties
4761    isMounted: !1,
4762    isUnmounted: !1,
4763    isDeactivated: !1,
4764    bc: null,
4765    c: null,
4766    bm: null,
4767    m: null,
4768    bu: null,
4769    u: null,
4770    um: null,
4771    bum: null,
4772    da: null,
4773    a: null,
4774    rtg: null,
4775    rtc: null,
4776    ec: null,
4777    sp: null
4778  };
4779  return g.ctx = { _: g }, g.root = t ? t.root : g, g.emit = pR.bind(null, g), e.ce && e.ce(g), g;
4780}
4781let fi = null;
4782const ba = () => fi || pi;
4783let pm, ev;
4784{
4785  const e = OE(), t = (s, l) => {
4786    let h;
4787    return (h = e[s]) || (h = e[s] = []), h.push(l), (g) => {
4788      h.length > 1 ? h.forEach((m) => m(g)) : h[0](g);
4789    };
4790  };
4791  pm = t(
4792    "__VUE_INSTANCE_SETTERS__",
4793    (s) => fi = s
4794  ), ev = t(
4795    "__VUE_SSR_SETTERS__",
4796    (s) => xd = s
4797  );
4798}
4799const tu = (e) => {
4800  const t = fi;
4801  return pm(e), e.scope.on(), () => {
4802    e.scope.off(), pm(t);
4803  };
4804}, tv = () => {
4805  fi && fi.scope.off(), pm(null);
4806};
4807function EA(e) {
4808  return e.vnode.shapeFlag & 4;
4809}
4810let xd = !1;
4811function AA(e, t = !1) {
4812  t && ev(t);
4813  const { props: s, children: l } = e.vnode, h = EA(e);
4814  RR(e, s, h, t), zR(e, l);
4815  const g = h ? QR(e, t) : void 0;
4816  return t && ev(!1), g;
4817}
4818function QR(e, t) {
4819  const s = e.type;
4820  e.accessCache = /* @__PURE__ */ Object.create(null), e.proxy = new Proxy(e.ctx, K_);
4821  const { setup: l } = s;
4822  if (l) {
4823    const h = e.setupContext = l.length > 1 ? PA(e) : null, g = tu(e);
4824    sc();
4825    const m = va(
4826      l,
4827      e,
4828      0,
4829      [
4830        e.props,
4831        h
4832      ]
4833    );
4834    if (oc(), g(), ib(m)) {
4835      if (m.then(tv, tv), t)
4836        return m.then((c) => {
4837          rv(e, c, t);
4838        }).catch((c) => {
4839          ac(c, e, 0);
4840        });
4841      e.asyncDep = m;
4842    } else
4843      rv(e, m, t);
4844  } else
4845    IA(e, t);
4846}
4847function rv(e, t, s) {
4848  ar(t) ? e.type.__ssrInlineRender ? e.ssrRender = t : e.render = t : hn(t) && (e.setupState = ig(t)), IA(e, s);
4849}
4850let mm, nv;
4851function Ub(e) {
4852  mm = e, nv = (t) => {
4853    t.render._rc && (t.withProxy = new Proxy(t.ctx, AR));
4854  };
4855}
4856const CA = () => !mm;
4857function IA(e, t, s) {
4858  const l = e.type;
4859  if (!e.render) {
4860    if (!t && mm && !l.render) {
4861      const h = l.template || Cb(e).template;
4862      if (h) {
4863        const { isCustomElement: g, compilerOptions: m } = e.appContext.config, { delimiters: c, compilerOptions: w } = l, O = Hr(
4864          Hr(
4865            {
4866              isCustomElement: g,
4867              delimiters: c
4868            },
4869            m
4870          ),
4871          w
4872        );
4873        l.render = mm(h, O);
4874      }
4875    }
4876    e.render = l.render || di, nv && nv(e);
4877  }
4878  {
4879    const h = tu(e);
4880    sc();
4881    try {
4882      CR(e);
4883    } finally {
4884      oc(), h();
4885    }
4886  }
4887}
4888const eL = {
4889  get(e, t) {
4890    return Ds(e, "get", ""), e[t];
4891  }
4892};
4893function PA(e) {
4894  const t = (s) => {
4895    e.exposed = s || {};
4896  };
4897  return {
4898    attrs: new Proxy(e.attrs, eL),
4899    slots: e.slots,
4900    emit: e.emit,
4901    expose: t
4902  };
4903}
4904function wd(e) {
4905  return e.exposed ? e.exposeProxy || (e.exposeProxy = new Proxy(ig(hb(e.exposed)), {
4906    get(t, s) {
4907      if (s in t)
4908        return t[s];
4909      if (s in zf)
4910        return zf[s](e);
4911    },
4912    has(t, s) {
4913      return s in t || s in zf;
4914    }
4915  })) : e.proxy;
4916}
4917function iv(e, t = !0) {
4918  return ar(e) ? e.displayName || e.name : e.name || t && e.__name;
4919}
4920function tL(e) {
4921  return ar(e) && "__vccOpts" in e;
4922}
4923const qb = (e, t) => nR(e, t, xd);
4924function MA(e, t, s = Kr) {
4925  const l = ba(), h = Fn(t), g = to(t), m = pb((w, O) => {
4926    let P;
4927    return Fb(() => {
4928      const R = e[t];
4929      Uo(P, R) && (P = R, O());
4930    }), {
4931      get() {
4932        return w(), s.get ? s.get(P) : P;
4933      },
4934      set(R) {
4935        const z = l.vnode.props;
4936        !(z && // check if parent has passed v-model
4937        (t in z || h in z || g in z) && (`onUpdate:${t}` in z || `onUpdate:${h}` in z || `onUpdate:${g}` in z)) && Uo(R, P) && (P = R, O()), l.emit(`update:${t}`, s.set ? s.set(R) : R);
4938      }
4939    };
4940  }), c = t === "modelValue" ? "modelModifiers" : `${t}Modifiers`;
4941  return m[Symbol.iterator] = () => {
4942    let w = 0;
4943    return {
4944      next() {
4945        return w < 2 ? { value: w++ ? e[c] || {} : m, done: !1 } : { done: !0 };
4946      }
4947    };
4948  }, m;
4949}
4950function mg(e, t, s) {
4951  const l = arguments.length;
4952  return l === 2 ? hn(t) && !jt(t) ? sl(t) ? An(e, null, [t]) : An(e, t) : An(e, null, t) : (l > 3 ? s = Array.prototype.slice.call(arguments, 2) : l === 3 && sl(s) && (s = [s]), An(e, t, s));
4953}
4954function kA() {
4955}
4956function OA(e, t, s, l) {
4957  const h = s[l];
4958  if (h && Hb(h, e))
4959    return h;
4960  const g = t();
4961  return g.memo = e.slice(), g.memoIndex = l, s[l] = g;
4962}
4963function Hb(e, t) {
4964  const s = e.memo;
4965  if (s.length != t.length)
4966    return !1;
4967  for (let l = 0; l < s.length; l++)
4968    if (Uo(s[l], t[l]))
4969      return !1;
4970  return eu > 0 && Is && Is.push(e), !0;
4971}
4972const Gb = "3.4.29", DA = di, RA = cR, LA = Ju, FA = y2, rL = {
4973  createComponentInstance: TA,
4974  setupComponent: AA,
4975  renderComponentRoot: Np,
4976  setCurrentRenderingInstance: Qf,
4977  isVNode: sl,
4978  normalizeVNode: eo,
4979  getComponentPublicInstance: wd
4980}, zA = rL, BA = null, NA = null, $A = null;
4981/**
4982* @vue/runtime-dom v3.4.29
4983* (c) 2018-present Yuxi (Evan) You and Vue contributors
4984* @license MIT
4985**/
4986const nL = "http://www.w3.org/2000/svg", iL = "http://www.w3.org/1998/Math/MathML", Ka = typeof document < "u" ? document : null, cw = Ka && /* @__PURE__ */ Ka.createElement("template"), sL = {
4987  insert: (e, t, s) => {
4988    t.insertBefore(e, s || null);
4989  },
4990  remove: (e) => {
4991    const t = e.parentNode;
4992    t && t.removeChild(e);
4993  },
4994  createElement: (e, t, s, l) => {
4995    const h = t === "svg" ? Ka.createElementNS(nL, e) : t === "mathml" ? Ka.createElementNS(iL, e) : s ? Ka.createElement(e, { is: s }) : Ka.createElement(e);
4996    return e === "select" && l && l.multiple != null && h.setAttribute("multiple", l.multiple), h;
4997  },
4998  createText: (e) => Ka.createTextNode(e),
4999  createComment: (e) => Ka.createComment(e),
5000  setText: (e, t) => {
5001    e.nodeValue = t;
5002  },
5003  setElementText: (e, t) => {
5004    e.textContent = t;
5005  },
5006  parentNode: (e) => e.parentNode,
5007  nextSibling: (e) => e.nextSibling,
5008  querySelector: (e) => Ka.querySelector(e),
5009  setScopeId(e, t) {
5010    e.setAttribute(t, "");
5011  },
5012  // __UNSAFE__
5013  // Reason: innerHTML.
5014  // Static content here can only come from compiled templates.
5015  // As long as the user only uses trusted templates, this is safe.
5016  insertStaticContent(e, t, s, l, h, g) {
5017    const m = s ? s.previousSibling : t.lastChild;
5018    if (h && (h === g || h.nextSibling))
5019      for (; t.insertBefore(h.cloneNode(!0), s), !(h === g || !(h = h.nextSibling)); )
5020        ;
5021    else {
5022      cw.innerHTML = l === "svg" ? `<svg>${e}</svg>` : l === "mathml" ? `<math>${e}</math>` : e;
5023      const c = cw.content;
5024      if (l === "svg" || l === "mathml") {
5025        const w = c.firstChild;
5026        for (; w.firstChild; )
5027          c.appendChild(w.firstChild);
5028        c.removeChild(w);
5029      }
5030      t.insertBefore(c, s);
5031    }
5032    return [
5033      // first
5034      m ? m.nextSibling : t.firstChild,
5035      // last
5036      s ? s.previousSibling : t.lastChild
5037    ];
5038  }
5039}, Vl = "transition", Cf = "animation", fh = Symbol("_vtc"), gg = (e, { slots: t }) => mg(Nb, VA(e), t);
5040gg.displayName = "Transition";
5041const jA = {
5042  name: String,
5043  type: String,
5044  css: {
5045    type: Boolean,
5046    default: !0
5047  },
5048  duration: [String, Number, Object],
5049  enterFromClass: String,
5050  enterActiveClass: String,
5051  enterToClass: String,
5052  appearFromClass: String,
5053  appearActiveClass: String,
5054  appearToClass: String,
5055  leaveFromClass: String,
5056  leaveActiveClass: String,
5057  leaveToClass: String
5058}, oL = gg.props = /* @__PURE__ */ Hr(
5059  {},
5060  hg,
5061  jA
5062), Lc = (e, t = []) => {
5063  jt(e) ? e.forEach((s) => s(...t)) : e && e(...t);
5064}, uw = (e) => e ? jt(e) ? e.some((t) => t.length > 1) : e.length > 1 : !1;
5065function VA(e) {
5066  const t = {};
5067  for (const Ie in e)
5068    Ie in jA || (t[Ie] = e[Ie]);
5069  if (e.css === !1)
5070    return t;
5071  const {
5072    name: s = "v",
5073    type: l,
5074    duration: h,
5075    enterFromClass: g = `${s}-enter-from`,
5076    enterActiveClass: m = `${s}-enter-active`,
5077    enterToClass: c = `${s}-enter-to`,
5078    appearFromClass: w = g,
5079    appearActiveClass: O = m,
5080    appearToClass: P = c,
5081    leaveFromClass: R = `${s}-leave-from`,
5082    leaveActiveClass: z = `${s}-leave-active`,
5083    leaveToClass: J = `${s}-leave-to`
5084  } = e, K = aL(h), ee = K && K[0], ue = K && K[1], {
5085    onBeforeEnter: Ce,
5086    onEnter: ge,
5087    onEnterCancelled: X,
5088    onLeave: ye,
5089    onLeaveCancelled: Ae,
5090    onBeforeAppear: Se = Ce,
5091    onAppear: je = ge,
5092    onAppearCancelled: Ne = X
5093  } = t, Oe = (Ie, $e, Xe) => {
5094    ql(Ie, $e ? P : c), ql(Ie, $e ? O : m), Xe && Xe();
5095  }, ze = (Ie, $e) => {
5096    Ie._isLeaving = !1, ql(Ie, R), ql(Ie, J), ql(Ie, z), $e && $e();
5097  }, He = (Ie) => ($e, Xe) => {
5098    const st = Ie ? je : ge, Ge = () => Oe($e, Ie, Xe);
5099    Lc(st, [$e, Ge]), hw(() => {
5100      ql($e, Ie ? w : g), Za($e, Ie ? P : c), uw(st) || fw($e, l, ee, Ge);
5101    });
5102  };
5103  return Hr(t, {
5104    onBeforeEnter(Ie) {
5105      Lc(Ce, [Ie]), Za(Ie, g), Za(Ie, m);
5106    },
5107    onBeforeAppear(Ie) {
5108      Lc(Se, [Ie]), Za(Ie, w), Za(Ie, O);
5109    },
5110    onEnter: He(!1),
5111    onAppear: He(!0),
5112    onLeave(Ie, $e) {
5113      Ie._isLeaving = !0;
5114      const Xe = () => ze(Ie, $e);
5115      Za(Ie, R), Za(Ie, z), qA(), hw(() => {
5116        Ie._isLeaving && (ql(Ie, R), Za(Ie, J), uw(ye) || fw(Ie, l, ue, Xe));
5117      }), Lc(ye, [Ie, Xe]);
5118    },
5119    onEnterCancelled(Ie) {
5120      Oe(Ie, !1), Lc(X, [Ie]);
5121    },
5122    onAppearCancelled(Ie) {
5123      Oe(Ie, !0), Lc(Ne, [Ie]);
5124    },
5125    onLeaveCancelled(Ie) {
5126      ze(Ie), Lc(Ae, [Ie]);
5127    }
5128  });
5129}
5130function aL(e) {
5131  if (e == null)
5132    return null;
5133  if (hn(e))
5134    return [Yy(e.enter), Yy(e.leave)];
5135  {
5136    const t = Yy(e);
5137    return [t, t];
5138  }
5139}
5140function Yy(e) {
5141  return am(e);
5142}
5143function Za(e, t) {
5144  t.split(/\s+/).forEach((s) => s && e.classList.add(s)), (e[fh] || (e[fh] = /* @__PURE__ */ new Set())).add(t);
5145}
5146function ql(e, t) {
5147  t.split(/\s+/).forEach((l) => l && e.classList.remove(l));
5148  const s = e[fh];
5149  s && (s.delete(t), s.size || (e[fh] = void 0));
5150}
5151function hw(e) {
5152  requestAnimationFrame(() => {
5153    requestAnimationFrame(e);
5154  });
5155}
5156let lL = 0;
5157function fw(e, t, s, l) {
5158  const h = e._endId = ++lL, g = () => {
5159    h === e._endId && l();
5160  };
5161  if (s)
5162    return setTimeout(g, s);
5163  const { type: m, timeout: c, propCount: w } = UA(e, t);
5164  if (!m)
5165    return l();
5166  const O = m + "end";
5167  let P = 0;
5168  const R = () => {
5169    e.removeEventListener(O, z), g();
5170  }, z = (J) => {
5171    J.target === e && ++P >= w && R();
5172  };
5173  setTimeout(() => {
5174    P < w && R();
5175  }, c + 1), e.addEventListener(O, z);
5176}
5177function UA(e, t) {
5178  const s = window.getComputedStyle(e), l = (K) => (s[K] || "").split(", "), h = l(`${Vl}Delay`), g = l(`${Vl}Duration`), m = dw(h, g), c = l(`${Cf}Delay`), w = l(`${Cf}Duration`), O = dw(c, w);
5179  let P = null, R = 0, z = 0;
5180  t === Vl ? m > 0 && (P = Vl, R = m, z = g.length) : t === Cf ? O > 0 && (P = Cf, R = O, z = w.length) : (R = Math.max(m, O), P = R > 0 ? m > O ? Vl : Cf : null, z = P ? P === Vl ? g.length : w.length : 0);
5181  const J = P === Vl && /\b(transform|all)(,|$)/.test(
5182    l(`${Vl}Property`).toString()
5183  );
5184  return {
5185    type: P,
5186    timeout: R,
5187    propCount: z,
5188    hasTransform: J
5189  };
5190}
5191function dw(e, t) {
5192  for (; e.length < t.length; )
5193    e = e.concat(e);
5194  return Math.max(...t.map((s, l) => pw(s) + pw(e[l])));
5195}
5196function pw(e) {
5197  return e === "auto" ? 0 : Number(e.slice(0, -1).replace(",", ".")) * 1e3;
5198}
5199function qA() {
5200  return document.body.offsetHeight;
5201}
5202function cL(e, t, s) {
5203  const l = e[fh];
5204  l && (t = (t ? [t, ...l] : [...l]).join(" ")), t == null ? e.removeAttribute("class") : s ? e.setAttribute("class", t) : e.className = t;
5205}
5206const gm = Symbol("_vod"), HA = Symbol("_vsh"), Zb = {
5207  beforeMount(e, { value: t }, { transition: s }) {
5208    e[gm] = e.style.display === "none" ? "" : e.style.display, s && t ? s.beforeEnter(e) : If(e, t);
5209  },
5210  mounted(e, { value: t }, { transition: s }) {
5211    s && t && s.enter(e);
5212  },
5213  updated(e, { value: t, oldValue: s }, { transition: l }) {
5214    !t != !s && (l ? t ? (l.beforeEnter(e), If(e, !0), l.enter(e)) : l.leave(e, () => {
5215      If(e, !1);
5216    }) : If(e, t));
5217  },
5218  beforeUnmount(e, { value: t }) {
5219    If(e, t);
5220  }
5221};
5222function If(e, t) {
5223  e.style.display = t ? e[gm] : "none", e[HA] = !t;
5224}
5225function uL() {
5226  Zb.getSSRProps = ({ value: e }) => {
5227    if (!e)
5228      return { style: { display: "none" } };
5229  };
5230}
5231const GA = Symbol("");
5232function ZA(e) {
5233  const t = ba();
5234  if (!t)
5235    return;
5236  const s = t.ut = (h = e(t.proxy)) => {
5237    Array.from(
5238      document.querySelectorAll(`[data-v-owner="${t.uid}"]`)
5239    ).forEach((g) => ov(g, h));
5240  }, l = () => {
5241    const h = e(t.proxy);
5242    sv(t.subTree, h), s(h);
5243  };
5244  Ah(() => {
5245    Lb(l);
5246    const h = new MutationObserver(l);
5247    h.observe(t.subTree.el.parentNode, { childList: !0 }), md(() => h.disconnect());
5248  });
5249}
5250function sv(e, t) {
5251  if (e.shapeFlag & 128) {
5252    const s = e.suspense;
5253    e = s.activeBranch, s.pendingBranch && !s.isHydrating && s.effects.push(() => {
5254      sv(s.activeBranch, t);
5255    });
5256  }
5257  for (; e.component; )
5258    e = e.component.subTree;
5259  if (e.shapeFlag & 1 && e.el)
5260    ov(e.el, t);
5261  else if (e.type === Ci)
5262    e.children.forEach((s) => sv(s, t));
5263  else if (e.type === Ql) {
5264    let { el: s, anchor: l } = e;
5265    for (; s && (ov(s, t), s !== l); )
5266      s = s.nextSibling;
5267  }
5268}
5269function ov(e, t) {
5270  if (e.nodeType === 1) {
5271    const s = e.style;
5272    let l = "";
5273    for (const h in t)
5274      s.setProperty(`--${h}`, t[h]), l += `--${h}: ${t[h]};`;
5275    s[GA] = l;
5276  }
5277}
5278const hL = /(^|;)\s*display\s*:/;
5279function fL(e, t, s) {
5280  const l = e.style, h = vr(s);
5281  let g = !1;
5282  if (s && !h) {
5283    if (t)
5284      if (vr(t))
5285        for (const m of t.split(";")) {
5286          const c = m.slice(0, m.indexOf(":")).trim();
5287          s[c] == null && jp(l, c, "");
5288        }
5289      else
5290        for (const m in t)
5291          s[m] == null && jp(l, m, "");
5292    for (const m in s)
5293      m === "display" && (g = !0), jp(l, m, s[m]);
5294  } else if (h) {
5295    if (t !== s) {
5296      const m = l[GA];
5297      m && (s += ";" + m), l.cssText = s, g = hL.test(s);
5298    }
5299  } else t && e.removeAttribute("style");
5300  gm in e && (e[gm] = g ? l.display : "", e[HA] && (l.display = "none"));
5301}
5302const mw = /\s*!important$/;
5303function jp(e, t, s) {
5304  if (jt(s))
5305    s.forEach((l) => jp(e, t, l));
5306  else if (s == null && (s = ""), t.startsWith("--"))
5307    e.setProperty(t, s);
5308  else {
5309    const l = dL(e, t);
5310    mw.test(s) ? e.setProperty(
5311      to(l),
5312      s.replace(mw, ""),
5313      "important"
5314    ) : e[l] = s;
5315  }
5316}
5317const gw = ["Webkit", "Moz", "ms"], Qy = {};
5318function dL(e, t) {
5319  const s = Qy[t];
5320  if (s)
5321    return s;
5322  let l = Fn(t);
5323  if (l !== "filter" && l in e)
5324    return Qy[t] = l;
5325  l = ic(l);
5326  for (let h = 0; h < gw.length; h++) {
5327    const g = gw[h] + l;
5328    if (g in e)
5329      return Qy[t] = g;
5330  }
5331  return t;
5332}
5333const yw = "http://www.w3.org/1999/xlink";
5334function _w(e, t, s, l, h, g = LD(t)) {
5335  l && t.startsWith("xlink:") ? s == null ? e.removeAttributeNS(yw, t.slice(6, t.length)) : e.setAttributeNS(yw, t, s) : s == null || g && !LE(s) ? e.removeAttribute(t) : e.setAttribute(t, g ? "" : String(s));
5336}
5337function pL(e, t, s, l, h, g, m) {
5338  if (t === "innerHTML" || t === "textContent") {
5339    l && m(l, h, g), e[t] = s ?? "";
5340    return;
5341  }
5342  const c = e.tagName;
5343  if (t === "value" && c !== "PROGRESS" && // custom elements may use _value internally
5344  !c.includes("-")) {
5345    const O = c === "OPTION" ? e.getAttribute("value") || "" : e.value, P = s == null ? "" : String(s);
5346    (O !== P || !("_value" in e)) && (e.value = P), s == null && e.removeAttribute(t), e._value = s;
5347    return;
5348  }
5349  let w = !1;
5350  if (s === "" || s == null) {
5351    const O = typeof e[t];
5352    O === "boolean" ? s = LE(s) : s == null && O === "string" ? (s = "", w = !0) : O === "number" && (s = 0, w = !0);
5353  }
5354  try {
5355    e[t] = s;
5356  } catch {
5357  }
5358  w && e.removeAttribute(t);
5359}
5360function Ya(e, t, s, l) {
5361  e.addEventListener(t, s, l);
5362}
5363function mL(e, t, s, l) {
5364  e.removeEventListener(t, s, l);
5365}
5366const vw = Symbol("_vei");
5367function gL(e, t, s, l, h = null) {
5368  const g = e[vw] || (e[vw] = {}), m = g[t];
5369  if (l && m)
5370    m.value = l;
5371  else {
5372    const [c, w] = yL(t);
5373    if (l) {
5374      const O = g[t] = bL(
5375        l,
5376        h
5377      );
5378      Ya(e, c, O, w);
5379    } else m && (mL(e, c, m, w), g[t] = void 0);
5380  }
5381}
5382const bw = /(?:Once|Passive|Capture)$/;
5383function yL(e) {
5384  let t;
5385  if (bw.test(e)) {
5386    t = {};
5387    let l;
5388    for (; l = e.match(bw); )
5389      e = e.slice(0, e.length - l[0].length), t[l[0].toLowerCase()] = !0;
5390  }
5391  return [e[2] === ":" ? e.slice(3) : to(e.slice(2)), t];
5392}
5393let e_ = 0;
5394const _L = /* @__PURE__ */ Promise.resolve(), vL = () => e_ || (_L.then(() => e_ = 0), e_ = Date.now());
5395function bL(e, t) {
5396  const s = (l) => {
5397    if (!l._vts)
5398      l._vts = Date.now();
5399    else if (l._vts <= s.attached)
5400      return;
5401    Ms(
5402      xL(l, s.value),
5403      t,
5404      5,
5405      [l]
5406    );
5407  };
5408  return s.value = e, s.attached = vL(), s;
5409}
5410function xL(e, t) {
5411  if (jt(t)) {
5412    const s = e.stopImmediatePropagation;
5413    return e.stopImmediatePropagation = () => {
5414      s.call(e), e._stopped = !0;
5415    }, t.map(
5416      (l) => (h) => !h._stopped && l && l(h)
5417    );
5418  } else
5419    return t;
5420}
5421const xw = (e) => e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && // lowercase letter
5422e.charCodeAt(2) > 96 && e.charCodeAt(2) < 123, wL = (e, t, s, l, h, g, m, c, w) => {
5423  const O = h === "svg";
5424  t === "class" ? cL(e, l, O) : t === "style" ? fL(e, s, l) : su(t) ? rb(t) || gL(e, t, s, l, m) : (t[0] === "." ? (t = t.slice(1), !0) : t[0] === "^" ? (t = t.slice(1), !1) : SL(e, t, l, O)) ? (pL(
5425    e,
5426    t,
5427    l,
5428    g,
5429    m,
5430    c,
5431    w
5432  ), (t === "value" || t === "checked" || t === "selected") && _w(e, t, l, O, m, t !== "value")) : (t === "true-value" ? e._trueValue = l : t === "false-value" && (e._falseValue = l), _w(e, t, l, O));
5433};
5434function SL(e, t, s, l) {
5435  if (l)
5436    return !!(t === "innerHTML" || t === "textContent" || t in e && xw(t) && ar(s));
5437  if (t === "spellcheck" || t === "draggable" || t === "translate" || t === "form" || t === "list" && e.tagName === "INPUT" || t === "type" && e.tagName === "TEXTAREA")
5438    return !1;
5439  if (t === "width" || t === "height") {
5440    const h = e.tagName;
5441    if (h === "IMG" || h === "VIDEO" || h === "CANVAS" || h === "SOURCE")
5442      return !1;
5443  }
5444  return xw(t) && vr(s) ? !1 : t in e;
5445}
5446/*! #__NO_SIDE_EFFECTS__ */
5447// @__NO_SIDE_EFFECTS__
5448function Wb(e, t, s) {
5449  const l = /* @__PURE__ */ gd(e, t);
5450  class h extends Sd {
5451    constructor(m) {
5452      super(l, m, s);
5453    }
5454  }
5455  return h.def = l, h;
5456}
5457/*! #__NO_SIDE_EFFECTS__ */
5458const WA = /* @__NO_SIDE_EFFECTS__ */ (e, t) => /* @__PURE__ */ Wb(e, t, Jb), TL = typeof HTMLElement < "u" ? HTMLElement : class {
5459};
5460class Sd extends TL {
5461  constructor(t, s = {}, l) {
5462    super(), this._def = t, this._props = s, this._instance = null, this._connected = !1, this._resolved = !1, this._numberProps = null, this._ob = null, this.shadowRoot && l ? l(this._createVNode(), this.shadowRoot) : (this.attachShadow({ mode: "open" }), this._def.__asyncLoader || this._resolveProps(this._def));
5463  }
5464  connectedCallback() {
5465    this._connected = !0, this._instance || (this._resolved ? this._update() : this._resolveDef());
5466  }
5467  disconnectedCallback() {
5468    this._connected = !1, fd(() => {
5469      this._connected || (this._ob && (this._ob.disconnect(), this._ob = null), _m(null, this.shadowRoot), this._instance = null);
5470    });
5471  }
5472  /**
5473   * resolve inner component definition (handle possible async component)
5474   */
5475  _resolveDef() {
5476    this._resolved = !0;
5477    for (let l = 0; l < this.attributes.length; l++)
5478      this._setAttr(this.attributes[l].name);
5479    this._ob = new MutationObserver((l) => {
5480      for (const h of l)
5481        this._setAttr(h.attributeName);
5482    }), this._ob.observe(this, { attributes: !0 });
5483    const t = (l, h = !1) => {
5484      const { props: g, styles: m } = l;
5485      let c;
5486      if (g && !jt(g))
5487        for (const w in g) {
5488          const O = g[w];
5489          (O === Number || O && O.type === Number) && (w in this._props && (this._props[w] = am(this._props[w])), (c || (c = /* @__PURE__ */ Object.create(null)))[Fn(w)] = !0);
5490        }
5491      this._numberProps = c, h && this._resolveProps(l), this._applyStyles(m), this._update();
5492    }, s = this._def.__asyncLoader;
5493    s ? s().then((l) => t(l, !0)) : t(this._def);
5494  }
5495  _resolveProps(t) {
5496    const { props: s } = t, l = jt(s) ? s : Object.keys(s || {});
5497    for (const h of Object.keys(this))
5498      h[0] !== "_" && l.includes(h) && this._setProp(h, this[h], !0, !1);
5499    for (const h of l.map(Fn))
5500      Object.defineProperty(this, h, {
5501        get() {
5502          return this._getProp(h);
5503        },
5504        set(g) {
5505          this._setProp(h, g);
5506        }
5507      });
5508  }
5509  _setAttr(t) {
5510    let s = this.hasAttribute(t) ? this.getAttribute(t) : void 0;
5511    const l = Fn(t);
5512    this._numberProps && this._numberProps[l] && (s = am(s)), this._setProp(l, s, !1);
5513  }
5514  /**
5515   * @internal
5516   */
5517  _getProp(t) {
5518    return this._props[t];
5519  }
5520  /**
5521   * @internal
5522   */
5523  _setProp(t, s, l = !0, h = !0) {
5524    s !== this._props[t] && (this._props[t] = s, h && this._instance && this._update(), l && (s === !0 ? this.setAttribute(to(t), "") : typeof s == "string" || typeof s == "number" ? this.setAttribute(to(t), s + "") : s || this.removeAttribute(to(t))));
5525  }
5526  _update() {
5527    _m(this._createVNode(), this.shadowRoot);
5528  }
5529  _createVNode() {
5530    const t = An(this._def, Hr({}, this._props));
5531    return this._instance || (t.ce = (s) => {
5532      this._instance = s, s.isCE = !0;
5533      const l = (g, m) => {
5534        this.dispatchEvent(
5535          new CustomEvent(g, {
5536            detail: m
5537          })
5538        );
5539      };
5540      s.emit = (g, ...m) => {
5541        l(g, m), to(g) !== g && l(to(g), m);
5542      };
5543      let h = this;
5544      for (; h = h && (h.parentNode || h.host); )
5545        if (h instanceof Sd) {
5546          s.parent = h._instance, s.provides = h._instance.provides;
5547          break;
5548        }
5549    }), t;
5550  }
5551  _applyStyles(t) {
5552    t && t.forEach((s) => {
5553      const l = document.createElement("style");
5554      l.textContent = s, this.shadowRoot.appendChild(l);
5555    });
5556  }
5557}
5558function KA(e = "$style") {
5559  {
5560    const t = ba();
5561    if (!t)
5562      return Kr;
5563    const s = t.type.__cssModules;
5564    if (!s)
5565      return Kr;
5566    const l = s[e];
5567    return l || Kr;
5568  }
5569}
5570const XA = /* @__PURE__ */ new WeakMap(), JA = /* @__PURE__ */ new WeakMap(), ym = Symbol("_moveCb"), ww = Symbol("_enterCb"), YA = {
5571  name: "TransitionGroup",
5572  props: /* @__PURE__ */ Hr({}, oL, {
5573    tag: String,
5574    moveClass: String
5575  }),
5576  setup(e, { slots: t }) {
5577    const s = ba(), l = ug();
5578    let h, g;
5579    return dd(() => {
5580      if (!h.length)
5581        return;
5582      const m = e.moveClass || `${e.name || "v"}-move`;
5583      if (!PL(
5584        h[0].el,
5585        s.vnode.el,
5586        m
5587      ))
5588        return;
5589      h.forEach(AL), h.forEach(CL);
5590      const c = h.filter(IL);
5591      qA(), c.forEach((w) => {
5592        const O = w.el, P = O.style;
5593        Za(O, m), P.transform = P.webkitTransform = P.transitionDuration = "";
5594        const R = O[ym] = (z) => {
5595          z && z.target !== O || (!z || /transform$/.test(z.propertyName)) && (O.removeEventListener("transitionend", R), O[ym] = null, ql(O, m));
5596        };
5597        O.addEventListener("transitionend", R);
5598      });
5599    }), () => {
5600      const m = Nr(e), c = VA(m);
5601      let w = m.tag || Ci;
5602      if (h = [], g)
5603        for (let O = 0; O < g.length; O++) {
5604          const P = g[O];
5605          P.el && P.el instanceof Element && (h.push(P), il(
5606            P,
5607            Qc(
5608              P,
5609              c,
5610              l,
5611              s
5612            )
5613          ), XA.set(
5614            P,
5615            P.el.getBoundingClientRect()
5616          ));
5617        }
5618      g = t.default ? vd(t.default()) : [];
5619      for (let O = 0; O < g.length; O++) {
5620        const P = g[O];
5621        P.key != null && il(
5622          P,
5623          Qc(P, c, l, s)
5624        );
5625      }
5626      return An(w, null, g);
5627    };
5628  }
5629}, EL = (e) => delete e.mode;
5630YA.props;
5631const QA = YA;
5632function AL(e) {
5633  const t = e.el;
5634  t[ym] && t[ym](), t[ww] && t[ww]();
5635}
5636function CL(e) {
5637  JA.set(e, e.el.getBoundingClientRect());
5638}
5639function IL(e) {
5640  const t = XA.get(e), s = JA.get(e), l = t.left - s.left, h = t.top - s.top;
5641  if (l || h) {
5642    const g = e.el.style;
5643    return g.transform = g.webkitTransform = `translate(${l}px,${h}px)`, g.transitionDuration = "0s", e;
5644  }
5645}
5646function PL(e, t, s) {
5647  const l = e.cloneNode(), h = e[fh];
5648  h && h.forEach((c) => {
5649    c.split(/\s+/).forEach((w) => w && l.classList.remove(w));
5650  }), s.split(/\s+/).forEach((c) => c && l.classList.add(c)), l.style.display = "none";
5651  const g = t.nodeType === 1 ? t : t.parentNode;
5652  g.appendChild(l);
5653  const { hasTransform: m } = UA(l);
5654  return g.removeChild(l), m;
5655}
5656const nc = (e) => {
5657  const t = e.props["onUpdate:modelValue"] || !1;
5658  return jt(t) ? (s) => nh(t, s) : t;
5659};
5660function ML(e) {
5661  e.target.composing = !0;
5662}
5663function Sw(e) {
5664  const t = e.target;
5665  t.composing && (t.composing = !1, t.dispatchEvent(new Event("input")));
5666}
5667const To = Symbol("_assign"), rd = {
5668  created(e, { modifiers: { lazy: t, trim: s, number: l } }, h) {
5669    e[To] = nc(h);
5670    const g = l || h.props && h.props.type === "number";
5671    Ya(e, t ? "change" : "input", (m) => {
5672      if (m.target.composing) return;
5673      let c = e.value;
5674      s && (c = c.trim()), g && (c = om(c)), e[To](c);
5675    }), s && Ya(e, "change", () => {
5676      e.value = e.value.trim();
5677    }), t || (Ya(e, "compositionstart", ML), Ya(e, "compositionend", Sw), Ya(e, "change", Sw));
5678  },
5679  // set value on mounted so it's after min/max for type="range"
5680  mounted(e, { value: t }) {
5681    e.value = t ?? "";
5682  },
5683  beforeUpdate(e, { value: t, oldValue: s, modifiers: { lazy: l, trim: h, number: g } }, m) {
5684    if (e[To] = nc(m), e.composing) return;
5685    const c = (g || e.type === "number") && !/^0\d/.test(e.value) ? om(e.value) : e.value, w = t ?? "";
5686    c !== w && (document.activeElement === e && e.type !== "range" && (l && t === s || h && e.value.trim() === w) || (e.value = w));
5687  }
5688}, yg = {
5689  // #4096 array checkboxes need to be deep traversed
5690  deep: !0,
5691  created(e, t, s) {
5692    e[To] = nc(s), Ya(e, "change", () => {
5693      const l = e._modelValue, h = dh(e), g = e.checked, m = e[To];
5694      if (jt(l)) {
5695        const c = Xm(l, h), w = c !== -1;
5696        if (g && !w)
5697          m(l.concat(h));
5698        else if (!g && w) {
5699          const O = [...l];
5700          O.splice(c, 1), m(O);
5701        }
5702      } else if (ou(l)) {
5703        const c = new Set(l);
5704        g ? c.add(h) : c.delete(h), m(c);
5705      } else
5706        m(eC(e, g));
5707    });
5708  },
5709  // set initial checked on mount to wait for true-value/false-value
5710  mounted: Tw,
5711  beforeUpdate(e, t, s) {
5712    e[To] = nc(s), Tw(e, t, s);
5713  }
5714};
5715function Tw(e, { value: t, oldValue: s }, l) {
5716  e._modelValue = t, jt(t) ? e.checked = Xm(t, l.props.value) > -1 : ou(t) ? e.checked = t.has(l.props.value) : t !== s && (e.checked = tc(t, eC(e, !0)));
5717}
5718const _g = {
5719  created(e, { value: t }, s) {
5720    e.checked = tc(t, s.props.value), e[To] = nc(s), Ya(e, "change", () => {
5721      e[To](dh(e));
5722    });
5723  },
5724  beforeUpdate(e, { value: t, oldValue: s }, l) {
5725    e[To] = nc(l), t !== s && (e.checked = tc(t, l.props.value));
5726  }
5727}, Kb = {
5728  // <select multiple> value need to be deep traversed
5729  deep: !0,
5730  created(e, { value: t, modifiers: { number: s } }, l) {
5731    const h = ou(t);
5732    Ya(e, "change", () => {
5733      const g = Array.prototype.filter.call(e.options, (m) => m.selected).map(
5734        (m) => s ? om(dh(m)) : dh(m)
5735      );
5736      e[To](
5737        e.multiple ? h ? new Set(g) : g : g[0]
5738      ), e._assigning = !0, fd(() => {
5739        e._assigning = !1;
5740      });
5741    }), e[To] = nc(l);
5742  },
5743  // set value in mounted & updated because <select> relies on its children
5744  // <option>s.
5745  mounted(e, { value: t, modifiers: { number: s } }) {
5746    Ew(e, t);
5747  },
5748  beforeUpdate(e, t, s) {
5749    e[To] = nc(s);
5750  },
5751  updated(e, { value: t, modifiers: { number: s } }) {
5752    e._assigning || Ew(e, t);
5753  }
5754};
5755function Ew(e, t, s) {
5756  const l = e.multiple, h = jt(t);
5757  if (!(l && !h && !ou(t))) {
5758    for (let g = 0, m = e.options.length; g < m; g++) {
5759      const c = e.options[g], w = dh(c);
5760      if (l)
5761        if (h) {
5762          const O = typeof w;
5763          O === "string" || O === "number" ? c.selected = t.some((P) => String(P) === String(w)) : c.selected = Xm(t, w) > -1;
5764        } else
5765          c.selected = t.has(w);
5766      else if (tc(dh(c), t)) {
5767        e.selectedIndex !== g && (e.selectedIndex = g);
5768        return;
5769      }
5770    }
5771    !l && e.selectedIndex !== -1 && (e.selectedIndex = -1);
5772  }
5773}
5774function dh(e) {
5775  return "_value" in e ? e._value : e.value;
5776}
5777function eC(e, t) {
5778  const s = t ? "_trueValue" : "_falseValue";
5779  return s in e ? e[s] : t;
5780}
5781const Xb = {
5782  created(e, t, s) {
5783    Mp(e, t, s, null, "created");
5784  },
5785  mounted(e, t, s) {
5786    Mp(e, t, s, null, "mounted");
5787  },
5788  beforeUpdate(e, t, s, l) {
5789    Mp(e, t, s, l, "beforeUpdate");
5790  },
5791  updated(e, t, s, l) {
5792    Mp(e, t, s, l, "updated");
5793  }
5794};
5795function tC(e, t) {
5796  switch (e) {
5797    case "SELECT":
5798      return Kb;
5799    case "TEXTAREA":
5800      return rd;
5801    default:
5802      switch (t) {
5803        case "checkbox":
5804          return yg;
5805        case "radio":
5806          return _g;
5807        default:
5808          return rd;
5809      }
5810  }
5811}
5812function Mp(e, t, s, l, h) {
5813  const m = tC(
5814    e.tagName,
5815    s.props && s.props.type
5816  )[h];
5817  m && m(e, t, s, l);
5818}
5819function kL() {
5820  rd.getSSRProps = ({ value: e }) => ({ value: e }), _g.getSSRProps = ({ value: e }, t) => {
5821    if (t.props && tc(t.props.value, e))
5822      return { checked: !0 };
5823  }, yg.getSSRProps = ({ value: e }, t) => {
5824    if (jt(e)) {
5825      if (t.props && Xm(e, t.props.value) > -1)
5826        return { checked: !0 };
5827    } else if (ou(e)) {
5828      if (t.props && e.has(t.props.value))
5829        return { checked: !0 };
5830    } else if (e)
5831      return { checked: !0 };
5832  }, Xb.getSSRProps = (e, t) => {
5833    if (typeof t.type != "string")
5834      return;
5835    const s = tC(
5836      // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase
5837      t.type.toUpperCase(),
5838      t.props && t.props.type
5839    );
5840    if (s.getSSRProps)
5841      return s.getSSRProps(e, t);
5842  };
5843}
5844const OL = ["ctrl", "shift", "alt", "meta"], DL = {
5845  stop: (e) => e.stopPropagation(),
5846  prevent: (e) => e.preventDefault(),
5847  self: (e) => e.target !== e.currentTarget,
5848  ctrl: (e) => !e.ctrlKey,
5849  shift: (e) => !e.shiftKey,
5850  alt: (e) => !e.altKey,
5851  meta: (e) => !e.metaKey,
5852  left: (e) => "button" in e && e.button !== 0,
5853  middle: (e) => "button" in e && e.button !== 1,
5854  right: (e) => "button" in e && e.button !== 2,
5855  exact: (e, t) => OL.some((s) => e[`${s}Key`] && !t.includes(s))
5856}, rC = (e, t) => {
5857  const s = e._withMods || (e._withMods = {}), l = t.join(".");
5858  return s[l] || (s[l] = (h, ...g) => {
5859    for (let m = 0; m < t.length; m++) {
5860      const c = DL[t[m]];
5861      if (c && c(h, t)) return;
5862    }
5863    return e(h, ...g);
5864  });
5865}, RL = {
5866  esc: "escape",
5867  space: " ",
5868  up: "arrow-up",
5869  left: "arrow-left",
5870  right: "arrow-right",
5871  down: "arrow-down",
5872  delete: "backspace"
5873}, nC = (e, t) => {
5874  const s = e._withKeys || (e._withKeys = {}), l = t.join(".");
5875  return s[l] || (s[l] = (h) => {
5876    if (!("key" in h))
5877      return;
5878    const g = to(h.key);
5879    if (t.some((m) => m === g || RL[m] === g))
5880      return e(h);
5881  });
5882}, iC = /* @__PURE__ */ Hr({ patchProp: wL }, sL);
5883let $f, Aw = !1;
5884function sC() {
5885  return $f || ($f = Mb(iC));
5886}
5887function oC() {
5888  return $f = Aw ? $f : kb(iC), Aw = !0, $f;
5889}
5890const _m = (...e) => {
5891  sC().render(...e);
5892}, Jb = (...e) => {
5893  oC().hydrate(...e);
5894}, aC = (...e) => {
5895  const t = sC().createApp(...e), { mount: s } = t;
5896  return t.mount = (l) => {
5897    const h = uC(l);
5898    if (!h) return;
5899    const g = t._component;
5900    !ar(g) && !g.render && !g.template && (g.template = h.innerHTML), h.innerHTML = "";
5901    const m = s(h, !1, cC(h));
5902    return h instanceof Element && (h.removeAttribute("v-cloak"), h.setAttribute("data-v-app", "")), m;
5903  }, t;
5904}, lC = (...e) => {
5905  const t = oC().createApp(...e), { mount: s } = t;
5906  return t.mount = (l) => {
5907    const h = uC(l);
5908    if (h)
5909      return s(h, !0, cC(h));
5910  }, t;
5911};
5912function cC(e) {
5913  if (e instanceof SVGElement)
5914    return "svg";
5915  if (typeof MathMLElement == "function" && e instanceof MathMLElement)
5916    return "mathml";
5917}
5918function uC(e) {
5919  return vr(e) ? document.querySelector(e) : e;
5920}
5921let Cw = !1;
5922const hC = () => {
5923  Cw || (Cw = !0, kL(), uL());
5924}, LL = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5925  __proto__: null,
5926  BaseTransition: Nb,
5927  BaseTransitionPropsValidators: hg,
5928  Comment: hi,
5929  DeprecationTypes: $A,
5930  EffectScope: Jm,
5931  ErrorCodes: d2,
5932  ErrorTypeStrings: RA,
5933  Fragment: Ci,
5934  KeepAlive: hA,
5935  ReactiveEffect: Jc,
5936  Static: Ql,
5937  Suspense: A2,
5938  Teleport: mA,
5939  Text: rc,
5940  TrackOpTypes: u2,
5941  Transition: gg,
5942  TransitionGroup: QA,
5943  TriggerOpTypes: h2,
5944  VueElement: Sd,
5945  assertNumber: f2,
5946  callWithAsyncErrorHandling: Ms,
5947  callWithErrorHandling: va,
5948  camelize: Fn,
5949  capitalize: ic,
5950  cloneVNode: qo,
5951  compatUtils: NA,
5952  computed: qb,
5953  createApp: aC,
5954  createBlock: fg,
5955  createCommentVNode: SA,
5956  createElementBlock: vA,
5957  createElementVNode: dg,
5958  createHydrationRenderer: kb,
5959  createPropsRestProxy: Z2,
5960  createRenderer: Mb,
5961  createSSRApp: lC,
5962  createSlots: M2,
5963  createStaticVNode: wA,
5964  createTextVNode: pg,
5965  createVNode: An,
5966  customRef: pb,
5967  defineAsyncComponent: k2,
5968  defineComponent: gd,
5969  defineCustomElement: Wb,
5970  defineEmits: F2,
5971  defineExpose: z2,
5972  defineModel: $2,
5973  defineOptions: B2,
5974  defineProps: L2,
5975  defineSSRCustomElement: WA,
5976  defineSlots: N2,
5977  devtools: LA,
5978  effect: VE,
5979  effectScope: BE,
5980  getCurrentInstance: ba,
5981  getCurrentScope: ob,
5982  getTransitionRawChildren: vd,
5983  guardReactiveProps: $b,
5984  h: mg,
5985  handleError: ac,
5986  hasInjectionContext: J2,
5987  hydrate: Jb,
5988  initCustomFormatter: kA,
5989  initDirectivesForSSR: hC,
5990  inject: ch,
5991  isMemoSame: Hb,
5992  isProxy: rg,
5993  isReactive: Gc,
5994  isReadonly: Yc,
5995  isRef: Ii,
5996  isRuntimeOnly: CA,
5997  isShallow: hh,
5998  isVNode: sl,
5999  markRaw: hb,
6000  mergeDefaults: H2,
6001  mergeModels: G2,
6002  mergeProps: Vb,
6003  nextTick: fd,
6004  normalizeClass: Eh,
6005  normalizeProps: RE,
6006  normalizeStyle: Th,
6007  onActivated: zb,
6008  onBeforeMount: xb,
6009  onBeforeUnmount: pd,
6010  onBeforeUpdate: wb,
6011  onDeactivated: Bb,
6012  onErrorCaptured: Ab,
6013  onMounted: Ah,
6014  onRenderTracked: Eb,
6015  onRenderTriggered: Tb,
6016  onScopeDispose: $E,
6017  onServerPrefetch: Sb,
6018  onUnmounted: md,
6019  onUpdated: dd,
6020  openBlock: bd,
6021  popScopeId: b2,
6022  provide: Ib,
6023  proxyRefs: ig,
6024  pushScopeId: v2,
6025  queuePostFlushCb: Jf,
6026  reactive: au,
6027  readonly: eg,
6028  ref: sh,
6029  registerRuntimeCompiler: Ub,
6030  render: _m,
6031  renderList: P2,
6032  renderSlot: O2,
6033  resolveComponent: w2,
6034  resolveDirective: E2,
6035  resolveDynamicComponent: T2,
6036  resolveFilter: BA,
6037  resolveTransitionHooks: Qc,
6038  setBlockTracking: dm,
6039  setDevtoolsHook: FA,
6040  setTransitionHooks: il,
6041  shallowReactive: ub,
6042  shallowReadonly: r2,
6043  shallowRef: i2,
6044  ssrContextKey: Db,
6045  ssrUtils: zA,
6046  stop: UE,
6047  toDisplayString: FE,
6048  toHandlerKey: Uc,
6049  toHandlers: R2,
6050  toRaw: Nr,
6051  toRef: l2,
6052  toRefs: mb,
6053  toValue: a2,
6054  transformVNodeArgs: bA,
6055  triggerRef: o2,
6056  unref: ng,
6057  useAttrs: U2,
6058  useCssModule: KA,
6059  useCssVars: ZA,
6060  useModel: MA,
6061  useSSRContext: Rb,
6062  useSlots: V2,
6063  useTransitionState: ug,
6064  vModelCheckbox: yg,
6065  vModelDynamic: Xb,
6066  vModelRadio: _g,
6067  vModelSelect: Kb,
6068  vModelText: rd,
6069  vShow: Zb,
6070  version: Gb,
6071  warn: DA,
6072  watch: tl,
6073  watchEffect: cA,
6074  watchPostEffect: Lb,
6075  watchSyncEffect: Fb,
6076  withAsyncContext: W2,
6077  withCtx: lg,
6078  withDefaults: j2,
6079  withDirectives: I2,
6080  withKeys: nC,
6081  withMemo: OA,
6082  withModifiers: rC,
6083  withScopeId: x2
6084}, Symbol.toStringTag, { value: "Module" }));
6085/**
6086* @vue/compiler-core v3.4.29
6087* (c) 2018-present Yuxi (Evan) You and Vue contributors
6088* @license MIT
vendor: 37,968 bytes, lines 6089-7316
6089**/
6090const nd = Symbol(""), jf = Symbol(""), Yb = Symbol(""), vm = Symbol(""), fC = Symbol(""), ru = Symbol(""), dC = Symbol(""), pC = Symbol(""), Qb = Symbol(""), ex = Symbol(""), Td = Symbol(""), tx = Symbol(""), mC = Symbol(""), rx = Symbol(""), nx = Symbol(
6091  ""
6092), ix = Symbol(""), sx = Symbol(""), ox = Symbol(""), ax = Symbol(""), gC = Symbol(""), yC = Symbol(""), vg = Symbol(""), bm = Symbol(""), lx = Symbol(""), cx = Symbol(""), id = Symbol(""), Ed = Symbol(""), ux = Symbol(""), av = Symbol(""), FL = Symbol(""), lv = Symbol(""), xm = Symbol(""), zL = Symbol(""), BL = Symbol(""), hx = Symbol(""), NL = Symbol(""), $L = Symbol(""), fx = Symbol(""), _C = Symbol(""), ph = {
6093  [nd]: "Fragment",
6094  [jf]: "Teleport",
6095  [Yb]: "Suspense",
6096  [vm]: "KeepAlive",
6097  [fC]: "BaseTransition",
6098  [ru]: "openBlock",
6099  [dC]: "createBlock",
6100  [pC]: "createElementBlock",
6101  [Qb]: "createVNode",
6102  [ex]: "createElementVNode",
6103  [Td]: "createCommentVNode",
6104  [tx]: "createTextVNode",
6105  [mC]: "createStaticVNode",
6106  [rx]: "resolveComponent",
6107  [nx]: "resolveDynamicComponent",
6108  [ix]: "resolveDirective",
6109  [sx]: "resolveFilter",
6110  [ox]: "withDirectives",
6111  [ax]: "renderList",
6112  [gC]: "renderSlot",
6113  [yC]: "createSlots",
6114  [vg]: "toDisplayString",
6115  [bm]: "mergeProps",
6116  [lx]: "normalizeClass",
6117  [cx]: "normalizeStyle",
6118  [id]: "normalizeProps",
6119  [Ed]: "guardReactiveProps",
6120  [ux]: "toHandlers",
6121  [av]: "camelize",
6122  [FL]: "capitalize",
6123  [lv]: "toHandlerKey",
6124  [xm]: "setBlockTracking",
6125  [zL]: "pushScopeId",
6126  [BL]: "popScopeId",
6127  [hx]: "withCtx",
6128  [NL]: "unref",
6129  [$L]: "isRef",
6130  [fx]: "withMemo",
6131  [_C]: "isMemoSame"
6132};
6133function jL(e) {
6134  Object.getOwnPropertySymbols(e).forEach((t) => {
6135    ph[t] = e[t];
6136  });
6137}
6138const no = {
6139  start: { line: 1, column: 1, offset: 0 },
6140  end: { line: 1, column: 1, offset: 0 },
6141  source: ""
6142};
6143function VL(e, t = "") {
6144  return {
6145    type: 0,
6146    source: t,
6147    children: e,
6148    helpers: /* @__PURE__ */ new Set(),
6149    components: [],
6150    directives: [],
6151    hoists: [],
6152    imports: [],
6153    cached: 0,
6154    temps: 0,
6155    codegenNode: void 0,
6156    loc: no
6157  };
6158}
6159function sd(e, t, s, l, h, g, m, c = !1, w = !1, O = !1, P = no) {
6160  return e && (c ? (e.helper(ru), e.helper(yh(e.inSSR, O))) : e.helper(gh(e.inSSR, O)), m && e.helper(ox)), {
6161    type: 13,
6162    tag: t,
6163    props: s,
6164    children: l,
6165    patchFlag: h,
6166    dynamicProps: g,
6167    directives: m,
6168    isBlock: c,
6169    disableTracking: w,
6170    isComponent: O,
6171    loc: P
6172  };
6173}
6174function Ad(e, t = no) {
6175  return {
6176    type: 17,
6177    loc: t,
6178    elements: e
6179  };
6180}
6181function wo(e, t = no) {
6182  return {
6183    type: 15,
6184    loc: t,
6185    properties: e
6186  };
6187}
6188function Qn(e, t) {
6189  return {
6190    type: 16,
6191    loc: no,
6192    key: vr(e) ? Er(e, !0) : e,
6193    value: t
6194  };
6195}
6196function Er(e, t = !1, s = no, l = 0) {
6197  return {
6198    type: 4,
6199    loc: s,
6200    content: e,
6201    isStatic: t,
6202    constType: t ? 3 : l
6203  };
6204}
6205function jo(e, t = no) {
6206  return {
6207    type: 8,
6208    loc: t,
6209    children: e
6210  };
6211}
6212function ui(e, t = [], s = no) {
6213  return {
6214    type: 14,
6215    loc: s,
6216    callee: e,
6217    arguments: t
6218  };
6219}
6220function mh(e, t = void 0, s = !1, l = !1, h = no) {
6221  return {
6222    type: 18,
6223    params: e,
6224    returns: t,
6225    newline: s,
6226    isSlot: l,
6227    loc: h
6228  };
6229}
6230function cv(e, t, s, l = !0) {
6231  return {
6232    type: 19,
6233    test: e,
6234    consequent: t,
6235    alternate: s,
6236    newline: l,
6237    loc: no
6238  };
6239}
6240function UL(e, t, s = !1) {
6241  return {
6242    type: 20,
6243    index: e,
6244    value: t,
6245    isVNode: s,
6246    loc: no
6247  };
6248}
6249function qL(e) {
6250  return {
6251    type: 21,
6252    body: e,
6253    loc: no
6254  };
6255}
6256function gh(e, t) {
6257  return e || t ? Qb : ex;
6258}
6259function yh(e, t) {
6260  return e || t ? dC : pC;
6261}
6262function dx(e, { helper: t, removeHelper: s, inSSR: l }) {
6263  e.isBlock || (e.isBlock = !0, s(gh(l, e.isComponent)), t(ru), t(yh(l, e.isComponent)));
6264}
6265const Iw = new Uint8Array([123, 123]), Pw = new Uint8Array([125, 125]);
6266function Mw(e) {
6267  return e >= 97 && e <= 122 || e >= 65 && e <= 90;
6268}
6269function Qs(e) {
6270  return e === 32 || e === 10 || e === 9 || e === 12 || e === 13;
6271}
6272function Ul(e) {
6273  return e === 47 || e === 62 || Qs(e);
6274}
6275function wm(e) {
6276  const t = new Uint8Array(e.length);
6277  for (let s = 0; s < e.length; s++)
6278    t[s] = e.charCodeAt(s);
6279  return t;
6280}
6281const Ji = {
6282  Cdata: new Uint8Array([67, 68, 65, 84, 65, 91]),
6283  // CDATA[
6284  CdataEnd: new Uint8Array([93, 93, 62]),
6285  // ]]>
6286  CommentEnd: new Uint8Array([45, 45, 62]),
6287  // `-->`
6288  ScriptEnd: new Uint8Array([60, 47, 115, 99, 114, 105, 112, 116]),
6289  // `<\/script`
6290  StyleEnd: new Uint8Array([60, 47, 115, 116, 121, 108, 101]),
6291  // `</style`
6292  TitleEnd: new Uint8Array([60, 47, 116, 105, 116, 108, 101]),
6293  // `</title`
6294  TextareaEnd: new Uint8Array([
6295    60,
6296    47,
6297    116,
6298    101,
6299    120,
6300    116,
6301    97,
6302    114,
6303    101,
6304    97
6305  ])
6306  // `</textarea
6307};
6308class HL {
6309  constructor(t, s) {
6310    this.stack = t, this.cbs = s, this.state = 1, this.buffer = "", this.sectionStart = 0, this.index = 0, this.entityStart = 0, this.baseState = 1, this.inRCDATA = !1, this.inXML = !1, this.inVPre = !1, this.newlines = [], this.mode = 0, this.delimiterOpen = Iw, this.delimiterClose = Pw, this.delimiterIndex = -1, this.currentSequence = void 0, this.sequenceIndex = 0;
6311  }
6312  get inSFCRoot() {
6313    return this.mode === 2 && this.stack.length === 0;
6314  }
6315  reset() {
6316    this.state = 1, this.mode = 0, this.buffer = "", this.sectionStart = 0, this.index = 0, this.baseState = 1, this.inRCDATA = !1, this.currentSequence = void 0, this.newlines.length = 0, this.delimiterOpen = Iw, this.delimiterClose = Pw;
6317  }
6318  /**
6319   * Generate Position object with line / column information using recorded
6320   * newline positions. We know the index is always going to be an already
6321   * processed index, so all the newlines up to this index should have been
6322   * recorded.
6323   */
6324  getPos(t) {
6325    let s = 1, l = t + 1;
6326    for (let h = this.newlines.length - 1; h >= 0; h--) {
6327      const g = this.newlines[h];
6328      if (t > g) {
6329        s = h + 2, l = t - g;
6330        break;
6331      }
6332    }
6333    return {
6334      column: l,
6335      line: s,
6336      offset: t
6337    };
6338  }
6339  peek() {
6340    return this.buffer.charCodeAt(this.index + 1);
6341  }
6342  stateText(t) {
6343    t === 60 ? (this.index > this.sectionStart && this.cbs.ontext(this.sectionStart, this.index), this.state = 5, this.sectionStart = this.index) : !this.inVPre && t === this.delimiterOpen[0] && (this.state = 2, this.delimiterIndex = 0, this.stateInterpolationOpen(t));
6344  }
6345  stateInterpolationOpen(t) {
6346    if (t === this.delimiterOpen[this.delimiterIndex])
6347      if (this.delimiterIndex === this.delimiterOpen.length - 1) {
6348        const s = this.index + 1 - this.delimiterOpen.length;
6349        s > this.sectionStart && this.cbs.ontext(this.sectionStart, s), this.state = 3, this.sectionStart = s;
6350      } else
6351        this.delimiterIndex++;
6352    else this.inRCDATA ? (this.state = 32, this.stateInRCDATA(t)) : (this.state = 1, this.stateText(t));
6353  }
6354  stateInterpolation(t) {
6355    t === this.delimiterClose[0] && (this.state = 4, this.delimiterIndex = 0, this.stateInterpolationClose(t));
6356  }
6357  stateInterpolationClose(t) {
6358    t === this.delimiterClose[this.delimiterIndex] ? this.delimiterIndex === this.delimiterClose.length - 1 ? (this.cbs.oninterpolation(this.sectionStart, this.index + 1), this.inRCDATA ? this.state = 32 : this.state = 1, this.sectionStart = this.index + 1) : this.delimiterIndex++ : (this.state = 3, this.stateInterpolation(t));
6359  }
6360  stateSpecialStartSequence(t) {
6361    const s = this.sequenceIndex === this.currentSequence.length;
6362    if (!(s ? (
6363      // If we are at the end of the sequence, make sure the tag name has ended
6364      Ul(t)
6365    ) : (
6366      // Otherwise, do a case-insensitive comparison
6367      (t | 32) === this.currentSequence[this.sequenceIndex]
6368    )))
6369      this.inRCDATA = !1;
6370    else if (!s) {
6371      this.sequenceIndex++;
6372      return;
6373    }
6374    this.sequenceIndex = 0, this.state = 6, this.stateInTagName(t);
6375  }
6376  /** Look for an end tag. For <title> and <textarea>, also decode entities. */
6377  stateInRCDATA(t) {
6378    if (this.sequenceIndex === this.currentSequence.length) {
6379      if (t === 62 || Qs(t)) {
6380        const s = this.index - this.currentSequence.length;
6381        if (this.sectionStart < s) {
6382          const l = this.index;
6383          this.index = s, this.cbs.ontext(this.sectionStart, s), this.index = l;
6384        }
6385        this.sectionStart = s + 2, this.stateInClosingTagName(t), this.inRCDATA = !1;
6386        return;
6387      }
6388      this.sequenceIndex = 0;
6389    }
6390    (t | 32) === this.currentSequence[this.sequenceIndex] ? this.sequenceIndex += 1 : this.sequenceIndex === 0 ? this.currentSequence === Ji.TitleEnd || this.currentSequence === Ji.TextareaEnd && !this.inSFCRoot ? t === this.delimiterOpen[0] && (this.state = 2, this.delimiterIndex = 0, this.stateInterpolationOpen(t)) : this.fastForwardTo(60) && (this.sequenceIndex = 1) : this.sequenceIndex = +(t === 60);
6391  }
6392  stateCDATASequence(t) {
6393    t === Ji.Cdata[this.sequenceIndex] ? ++this.sequenceIndex === Ji.Cdata.length && (this.state = 28, this.currentSequence = Ji.CdataEnd, this.sequenceIndex = 0, this.sectionStart = this.index + 1) : (this.sequenceIndex = 0, this.state = 23, this.stateInDeclaration(t));
6394  }
6395  /**
6396   * When we wait for one specific character, we can speed things up
6397   * by skipping through the buffer until we find it.
6398   *
6399   * @returns Whether the character was found.
6400   */
6401  fastForwardTo(t) {
6402    for (; ++this.index < this.buffer.length; ) {
6403      const s = this.buffer.charCodeAt(this.index);
6404      if (s === 10 && this.newlines.push(this.index), s === t)
6405        return !0;
6406    }
6407    return this.index = this.buffer.length - 1, !1;
6408  }
6409  /**
6410   * Comments and CDATA end with `-->` and `]]>`.
6411   *
6412   * Their common qualities are:
6413   * - Their end sequences have a distinct character they start with.
6414   * - That character is then repeated, so we have to check multiple repeats.
6415   * - All characters but the start character of the sequence can be skipped.
6416   */
6417  stateInCommentLike(t) {
6418    t === this.currentSequence[this.sequenceIndex] ? ++this.sequenceIndex === this.currentSequence.length && (this.currentSequence === Ji.CdataEnd ? this.cbs.oncdata(this.sectionStart, this.index - 2) : this.cbs.oncomment(this.sectionStart, this.index - 2), this.sequenceIndex = 0, this.sectionStart = this.index + 1, this.state = 1) : this.sequenceIndex === 0 ? this.fastForwardTo(this.currentSequence[0]) && (this.sequenceIndex = 1) : t !== this.currentSequence[this.sequenceIndex - 1] && (this.sequenceIndex = 0);
6419  }
6420  startSpecial(t, s) {
6421    this.enterRCDATA(t, s), this.state = 31;
6422  }
6423  enterRCDATA(t, s) {
6424    this.inRCDATA = !0, this.currentSequence = t, this.sequenceIndex = s;
6425  }
6426  stateBeforeTagName(t) {
6427    t === 33 ? (this.state = 22, this.sectionStart = this.index + 1) : t === 63 ? (this.state = 24, this.sectionStart = this.index + 1) : Mw(t) ? (this.sectionStart = this.index, this.mode === 0 ? this.state = 6 : this.inSFCRoot ? this.state = 34 : this.inXML ? this.state = 6 : t === 116 ? this.state = 30 : this.state = t === 115 ? 29 : 6) : t === 47 ? this.state = 8 : (this.state = 1, this.stateText(t));
6428  }
6429  stateInTagName(t) {
6430    Ul(t) && this.handleTagName(t);
6431  }
6432  stateInSFCRootTagName(t) {
6433    if (Ul(t)) {
6434      const s = this.buffer.slice(this.sectionStart, this.index);
6435      s !== "template" && this.enterRCDATA(wm("</" + s), 0), this.handleTagName(t);
6436    }
6437  }
6438  handleTagName(t) {
6439    this.cbs.onopentagname(this.sectionStart, this.index), this.sectionStart = -1, this.state = 11, this.stateBeforeAttrName(t);
6440  }
6441  stateBeforeClosingTagName(t) {
6442    Qs(t) || (t === 62 ? (this.state = 1, this.sectionStart = this.index + 1) : (this.state = Mw(t) ? 9 : 27, this.sectionStart = this.index));
6443  }
6444  stateInClosingTagName(t) {
6445    (t === 62 || Qs(t)) && (this.cbs.onclosetag(this.sectionStart, this.index), this.sectionStart = -1, this.state = 10, this.stateAfterClosingTagName(t));
6446  }
6447  stateAfterClosingTagName(t) {
6448    t === 62 && (this.state = 1, this.sectionStart = this.index + 1);
6449  }
6450  stateBeforeAttrName(t) {
6451    t === 62 ? (this.cbs.onopentagend(this.index), this.inRCDATA ? this.state = 32 : this.state = 1, this.sectionStart = this.index + 1) : t === 47 ? this.state = 7 : t === 60 && this.peek() === 47 ? (this.cbs.onopentagend(this.index), this.state = 5, this.sectionStart = this.index) : Qs(t) || this.handleAttrStart(t);
6452  }
6453  handleAttrStart(t) {
6454    t === 118 && this.peek() === 45 ? (this.state = 13, this.sectionStart = this.index) : t === 46 || t === 58 || t === 64 || t === 35 ? (this.cbs.ondirname(this.index, this.index + 1), this.state = 14, this.sectionStart = this.index + 1) : (this.state = 12, this.sectionStart = this.index);
6455  }
6456  stateInSelfClosingTag(t) {
6457    t === 62 ? (this.cbs.onselfclosingtag(this.index), this.state = 1, this.sectionStart = this.index + 1, this.inRCDATA = !1) : Qs(t) || (this.state = 11, this.stateBeforeAttrName(t));
6458  }
6459  stateInAttrName(t) {
6460    (t === 61 || Ul(t)) && (this.cbs.onattribname(this.sectionStart, this.index), this.handleAttrNameEnd(t));
6461  }
6462  stateInDirName(t) {
6463    t === 61 || Ul(t) ? (this.cbs.ondirname(this.sectionStart, this.index), this.handleAttrNameEnd(t)) : t === 58 ? (this.cbs.ondirname(this.sectionStart, this.index), this.state = 14, this.sectionStart = this.index + 1) : t === 46 && (this.cbs.ondirname(this.sectionStart, this.index), this.state = 16, this.sectionStart = this.index + 1);
6464  }
6465  stateInDirArg(t) {
6466    t === 61 || Ul(t) ? (this.cbs.ondirarg(this.sectionStart, this.index), this.handleAttrNameEnd(t)) : t === 91 ? this.state = 15 : t === 46 && (this.cbs.ondirarg(this.sectionStart, this.index), this.state = 16, this.sectionStart = this.index + 1);
6467  }
6468  stateInDynamicDirArg(t) {
6469    t === 93 ? this.state = 14 : (t === 61 || Ul(t)) && (this.cbs.ondirarg(this.sectionStart, this.index + 1), this.handleAttrNameEnd(t));
6470  }
6471  stateInDirModifier(t) {
6472    t === 61 || Ul(t) ? (this.cbs.ondirmodifier(this.sectionStart, this.index), this.handleAttrNameEnd(t)) : t === 46 && (this.cbs.ondirmodifier(this.sectionStart, this.index), this.sectionStart = this.index + 1);
6473  }
6474  handleAttrNameEnd(t) {
6475    this.sectionStart = this.index, this.state = 17, this.cbs.onattribnameend(this.index), this.stateAfterAttrName(t);
6476  }
6477  stateAfterAttrName(t) {
6478    t === 61 ? this.state = 18 : t === 47 || t === 62 ? (this.cbs.onattribend(0, this.sectionStart), this.sectionStart = -1, this.state = 11, this.stateBeforeAttrName(t)) : Qs(t) || (this.cbs.onattribend(0, this.sectionStart), this.handleAttrStart(t));
6479  }
6480  stateBeforeAttrValue(t) {
6481    t === 34 ? (this.state = 19, this.sectionStart = this.index + 1) : t === 39 ? (this.state = 20, this.sectionStart = this.index + 1) : Qs(t) || (this.sectionStart = this.index, this.state = 21, this.stateInAttrValueNoQuotes(t));
6482  }
6483  handleInAttrValue(t, s) {
6484    (t === s || this.fastForwardTo(s)) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(
6485      s === 34 ? 3 : 2,
6486      this.index + 1
6487    ), this.state = 11);
6488  }
6489  stateInAttrValueDoubleQuotes(t) {
6490    this.handleInAttrValue(t, 34);
6491  }
6492  stateInAttrValueSingleQuotes(t) {
6493    this.handleInAttrValue(t, 39);
6494  }
6495  stateInAttrValueNoQuotes(t) {
6496    Qs(t) || t === 62 ? (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = -1, this.cbs.onattribend(1, this.index), this.state = 11, this.stateBeforeAttrName(t)) : (t === 39 || t === 60 || t === 61 || t === 96) && this.cbs.onerr(
6497      18,
6498      this.index
6499    );
6500  }
6501  stateBeforeDeclaration(t) {
6502    t === 91 ? (this.state = 26, this.sequenceIndex = 0) : this.state = t === 45 ? 25 : 23;
6503  }
6504  stateInDeclaration(t) {
6505    (t === 62 || this.fastForwardTo(62)) && (this.state = 1, this.sectionStart = this.index + 1);
6506  }
6507  stateInProcessingInstruction(t) {
6508    (t === 62 || this.fastForwardTo(62)) && (this.cbs.onprocessinginstruction(this.sectionStart, this.index), this.state = 1, this.sectionStart = this.index + 1);
6509  }
6510  stateBeforeComment(t) {
6511    t === 45 ? (this.state = 28, this.currentSequence = Ji.CommentEnd, this.sequenceIndex = 2, this.sectionStart = this.index + 1) : this.state = 23;
6512  }
6513  stateInSpecialComment(t) {
6514    (t === 62 || this.fastForwardTo(62)) && (this.cbs.oncomment(this.sectionStart, this.index), this.state = 1, this.sectionStart = this.index + 1);
6515  }
6516  stateBeforeSpecialS(t) {
6517    t === Ji.ScriptEnd[3] ? this.startSpecial(Ji.ScriptEnd, 4) : t === Ji.StyleEnd[3] ? this.startSpecial(Ji.StyleEnd, 4) : (this.state = 6, this.stateInTagName(t));
6518  }
6519  stateBeforeSpecialT(t) {
6520    t === Ji.TitleEnd[3] ? this.startSpecial(Ji.TitleEnd, 4) : t === Ji.TextareaEnd[3] ? this.startSpecial(Ji.TextareaEnd, 4) : (this.state = 6, this.stateInTagName(t));
6521  }
6522  startEntity() {
6523  }
6524  stateInEntity() {
6525  }
6526  /**
6527   * Iterates through the buffer, calling the function corresponding to the current state.
6528   *
6529   * States that are more likely to be hit are higher up, as a performance improvement.
6530   */
6531  parse(t) {
6532    for (this.buffer = t; this.index < this.buffer.length; ) {
6533      const s = this.buffer.charCodeAt(this.index);
6534      switch (s === 10 && this.newlines.push(this.index), this.state) {
6535        case 1: {
6536          this.stateText(s);
6537          break;
6538        }
6539        case 2: {
6540          this.stateInterpolationOpen(s);
6541          break;
6542        }
6543        case 3: {
6544          this.stateInterpolation(s);
6545          break;
6546        }
6547        case 4: {
6548          this.stateInterpolationClose(s);
6549          break;
6550        }
6551        case 31: {
6552          this.stateSpecialStartSequence(s);
6553          break;
6554        }
6555        case 32: {
6556          this.stateInRCDATA(s);
6557          break;
6558        }
6559        case 26: {
6560          this.stateCDATASequence(s);
6561          break;
6562        }
6563        case 19: {
6564          this.stateInAttrValueDoubleQuotes(s);
6565          break;
6566        }
6567        case 12: {
6568          this.stateInAttrName(s);
6569          break;
6570        }
6571        case 13: {
6572          this.stateInDirName(s);
6573          break;
6574        }
6575        case 14: {
6576          this.stateInDirArg(s);
6577          break;
6578        }
6579        case 15: {
6580          this.stateInDynamicDirArg(s);
6581          break;
6582        }
6583        case 16: {
6584          this.stateInDirModifier(s);
6585          break;
6586        }
6587        case 28: {
6588          this.stateInCommentLike(s);
6589          break;
6590        }
6591        case 27: {
6592          this.stateInSpecialComment(s);
6593          break;
6594        }
6595        case 11: {
6596          this.stateBeforeAttrName(s);
6597          break;
6598        }
6599        case 6: {
6600          this.stateInTagName(s);
6601          break;
6602        }
6603        case 34: {
6604          this.stateInSFCRootTagName(s);
6605          break;
6606        }
6607        case 9: {
6608          this.stateInClosingTagName(s);
6609          break;
6610        }
6611        case 5: {
6612          this.stateBeforeTagName(s);
6613          break;
6614        }
6615        case 17: {
6616          this.stateAfterAttrName(s);
6617          break;
6618        }
6619        case 20: {
6620          this.stateInAttrValueSingleQuotes(s);
6621          break;
6622        }
6623        case 18: {
6624          this.stateBeforeAttrValue(s);
6625          break;
6626        }
6627        case 8: {
6628          this.stateBeforeClosingTagName(s);
6629          break;
6630        }
6631        case 10: {
6632          this.stateAfterClosingTagName(s);
6633          break;
6634        }
6635        case 29: {
6636          this.stateBeforeSpecialS(s);
6637          break;
6638        }
6639        case 30: {
6640          this.stateBeforeSpecialT(s);
6641          break;
6642        }
6643        case 21: {
6644          this.stateInAttrValueNoQuotes(s);
6645          break;
6646        }
6647        case 7: {
6648          this.stateInSelfClosingTag(s);
6649          break;
6650        }
6651        case 23: {
6652          this.stateInDeclaration(s);
6653          break;
6654        }
6655        case 22: {
6656          this.stateBeforeDeclaration(s);
6657          break;
6658        }
6659        case 25: {
6660          this.stateBeforeComment(s);
6661          break;
6662        }
6663        case 24: {
6664          this.stateInProcessingInstruction(s);
6665          break;
6666        }
6667        case 33: {
6668          this.stateInEntity();
6669          break;
6670        }
6671      }
6672      this.index++;
6673    }
6674    this.cleanup(), this.finish();
6675  }
6676  /**
6677   * Remove data that has already been consumed from the buffer.
6678   */
6679  cleanup() {
6680    this.sectionStart !== this.index && (this.state === 1 || this.state === 32 && this.sequenceIndex === 0 ? (this.cbs.ontext(this.sectionStart, this.index), this.sectionStart = this.index) : (this.state === 19 || this.state === 20 || this.state === 21) && (this.cbs.onattribdata(this.sectionStart, this.index), this.sectionStart = this.index));
6681  }
6682  finish() {
6683    this.handleTrailingData(), this.cbs.onend();
6684  }
6685  /** Handle any trailing data. */
6686  handleTrailingData() {
6687    const t = this.buffer.length;
6688    this.sectionStart >= t || (this.state === 28 ? this.currentSequence === Ji.CdataEnd ? this.cbs.oncdata(this.sectionStart, t) : this.cbs.oncomment(this.sectionStart, t) : this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9 || this.cbs.ontext(this.sectionStart, t));
6689  }
6690  emitCodePoint(t, s) {
6691  }
6692}
6693function kw(e, { compatConfig: t }) {
6694  const s = t && t[e];
6695  return e === "MODE" ? s || 3 : s;
6696}
6697function Wc(e, t) {
6698  const s = kw("MODE", t), l = kw(e, t);
6699  return s === 3 ? l === !0 : l !== !1;
6700}
6701function od(e, t, s, ...l) {
6702  return Wc(e, t);
6703}
6704function px(e) {
6705  throw e;
6706}
6707function vC(e) {
6708}
6709function Ln(e, t, s, l) {
6710  const h = `https://vuejs.org/error-reference/#compiler-${e}`, g = new SyntaxError(String(h));
6711  return g.code = e, g.loc = t, g;
6712}
6713const Ps = (e) => e.type === 4 && e.isStatic;
6714function bC(e) {
6715  switch (e) {
6716    case "Teleport":
6717    case "teleport":
6718      return jf;
6719    case "Suspense":
6720    case "suspense":
6721      return Yb;
6722    case "KeepAlive":
6723    case "keep-alive":
6724      return vm;
6725    case "BaseTransition":
6726    case "base-transition":
6727      return fC;
6728  }
6729}
6730const GL = /^\d|[^\$\w\xA0-\uFFFF]/, mx = (e) => !GL.test(e), ZL = /[A-Za-z_$\xA0-\uFFFF]/, WL = /[\.\?\w$\xA0-\uFFFF]/, KL = /\s+[.[]\s*|\s*[.[]\s+/g, XL = (e) => {
6731  e = e.trim().replace(KL, (m) => m.trim());
6732  let t = 0, s = [], l = 0, h = 0, g = null;
6733  for (let m = 0; m < e.length; m++) {
6734    const c = e.charAt(m);
6735    switch (t) {
6736      case 0:
6737        if (c === "[")
6738          s.push(t), t = 1, l++;
6739        else if (c === "(")
6740          s.push(t), t = 2, h++;
6741        else if (!(m === 0 ? ZL : WL).test(c))
6742          return !1;
6743        break;
6744      case 1:
6745        c === "'" || c === '"' || c === "`" ? (s.push(t), t = 3, g = c) : c === "[" ? l++ : c === "]" && (--l || (t = s.pop()));
6746        break;
6747      case 2:
6748        if (c === "'" || c === '"' || c === "`")
6749          s.push(t), t = 3, g = c;
6750        else if (c === "(")
6751          h++;
6752        else if (c === ")") {
6753          if (m === e.length - 1)
6754            return !1;
6755          --h || (t = s.pop());
6756        }
6757        break;
6758      case 3:
6759        c === g && (t = s.pop(), g = null);
6760        break;
6761    }
6762  }
6763  return !l && !h;
6764}, xC = XL;
6765function Bo(e, t, s = !1) {
6766  for (let l = 0; l < e.props.length; l++) {
6767    const h = e.props[l];
6768    if (h.type === 7 && (s || h.exp) && (vr(t) ? h.name === t : t.test(h.name)))
6769      return h;
6770  }
6771}
6772function bg(e, t, s = !1, l = !1) {
6773  for (let h = 0; h < e.props.length; h++) {
6774    const g = e.props[h];
6775    if (g.type === 6) {
6776      if (s) continue;
6777      if (g.name === t && (g.value || l))
6778        return g;
6779    } else if (g.name === "bind" && (g.exp || l) && $c(g.arg, t))
6780      return g;
6781  }
6782}
6783function $c(e, t) {
6784  return !!(e && Ps(e) && e.content === t);
6785}
6786function JL(e) {
6787  return e.props.some(
6788    (t) => t.type === 7 && t.name === "bind" && (!t.arg || // v-bind="obj"
6789    t.arg.type !== 4 || // v-bind:[_ctx.foo]
6790    !t.arg.isStatic)
6791    // v-bind:[foo]
6792  );
6793}
6794function t_(e) {
6795  return e.type === 5 || e.type === 2;
6796}
6797function YL(e) {
6798  return e.type === 7 && e.name === "slot";
6799}
6800function Sm(e) {
6801  return e.type === 1 && e.tagType === 3;
6802}
6803function Tm(e) {
6804  return e.type === 1 && e.tagType === 2;
6805}
6806const QL = /* @__PURE__ */ new Set([id, Ed]);
6807function wC(e, t = []) {
6808  if (e && !vr(e) && e.type === 14) {
6809    const s = e.callee;
6810    if (!vr(s) && QL.has(s))
6811      return wC(
6812        e.arguments[0],
6813        t.concat(e)
6814      );
6815  }
6816  return [e, t];
6817}
6818function Em(e, t, s) {
6819  let l, h = e.type === 13 ? e.props : e.arguments[2], g = [], m;
6820  if (h && !vr(h) && h.type === 14) {
6821    const c = wC(h);
6822    h = c[0], g = c[1], m = g[g.length - 1];
6823  }
6824  if (h == null || vr(h))
6825    l = wo([t]);
6826  else if (h.type === 14) {
6827    const c = h.arguments[0];
6828    !vr(c) && c.type === 15 ? Ow(t, c) || c.properties.unshift(t) : h.callee === ux ? l = ui(s.helper(bm), [
6829      wo([t]),
6830      h
6831    ]) : h.arguments.unshift(wo([t])), !l && (l = h);
6832  } else h.type === 15 ? (Ow(t, h) || h.properties.unshift(t), l = h) : (l = ui(s.helper(bm), [
6833    wo([t]),
6834    h
6835  ]), m && m.callee === Ed && (m = g[g.length - 2]));
6836  e.type === 13 ? m ? m.arguments[0] = l : e.props = l : m ? m.arguments[0] = l : e.arguments[2] = l;
6837}
6838function Ow(e, t) {
6839  let s = !1;
6840  if (e.key.type === 4) {
6841    const l = e.key.content;
6842    s = t.properties.some(
6843      (h) => h.key.type === 4 && h.key.content === l
6844    );
6845  }
6846  return s;
6847}
6848function ad(e, t) {
6849  return `_${t}_${e.replace(/[^\w]/g, (s, l) => s === "-" ? "_" : e.charCodeAt(l).toString())}`;
6850}
6851function eF(e) {
6852  return e.type === 14 && e.callee === fx ? e.arguments[1].returns : e;
6853}
6854const tF = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/, SC = {
6855  parseMode: "base",
6856  ns: 0,
6857  delimiters: ["{{", "}}"],
6858  getNamespace: () => 0,
6859  isVoidTag: Bp,
6860  isPreTag: Bp,
6861  isCustomElement: Bp,
6862  onError: px,
6863  onWarn: vC,
6864  comments: !1,
6865  prefixIdentifiers: !1
6866};
6867let Qr = SC, ld = null, rl = "", Yi = null, qr = null, As = "", Wa = -1, Fc = -1, Am = 0, Wl = !1, uv = null;
6868const Rn = [], Zn = new HL(Rn, {
6869  onerr: Ha,
6870  ontext(e, t) {
6871    kp(Ri(e, t), e, t);
6872  },
6873  ontextentity(e, t, s) {
6874    kp(e, t, s);
6875  },
6876  oninterpolation(e, t) {
6877    if (Wl)
6878      return kp(Ri(e, t), e, t);
6879    let s = e + Zn.delimiterOpen.length, l = t - Zn.delimiterClose.length;
6880    for (; Qs(rl.charCodeAt(s)); )
6881      s++;
6882    for (; Qs(rl.charCodeAt(l - 1)); )
6883      l--;
6884    let h = Ri(s, l);
6885    h.includes("&") && (h = Qr.decodeEntities(h, !1)), hv({
6886      type: 5,
6887      content: Up(h, !1, ci(s, l)),
6888      loc: ci(e, t)
6889    });
6890  },
6891  onopentagname(e, t) {
6892    const s = Ri(e, t);
6893    Yi = {
6894      type: 1,
6895      tag: s,
6896      ns: Qr.getNamespace(s, Rn[0], Qr.ns),
6897      tagType: 0,
6898      // will be refined on tag close
6899      props: [],
6900      children: [],
6901      loc: ci(e - 1, t),
6902      codegenNode: void 0
6903    };
6904  },
6905  onopentagend(e) {
6906    Rw(e);
6907  },
6908  onclosetag(e, t) {
6909    const s = Ri(e, t);
6910    if (!Qr.isVoidTag(s)) {
6911      let l = !1;
6912      for (let h = 0; h < Rn.length; h++)
6913        if (Rn[h].tag.toLowerCase() === s.toLowerCase()) {
6914          l = !0, h > 0 && Ha(24, Rn[0].loc.start.offset);
6915          for (let m = 0; m <= h; m++) {
6916            const c = Rn.shift();
6917            Vp(c, t, m < h);
6918          }
6919          break;
6920        }
6921      l || Ha(23, TC(e, 60));
6922    }
6923  },
6924  onselfclosingtag(e) {
6925    const t = Yi.tag;
6926    Yi.isSelfClosing = !0, Rw(e), Rn[0] && Rn[0].tag === t && Vp(Rn.shift(), e);
6927  },
6928  onattribname(e, t) {
6929    qr = {
6930      type: 6,
6931      name: Ri(e, t),
6932      nameLoc: ci(e, t),
6933      value: void 0,
6934      loc: ci(e)
6935    };
6936  },
6937  ondirname(e, t) {
6938    const s = Ri(e, t), l = s === "." || s === ":" ? "bind" : s === "@" ? "on" : s === "#" ? "slot" : s.slice(2);
6939    if (!Wl && l === "" && Ha(26, e), Wl || l === "")
6940      qr = {
6941        type: 6,
6942        name: s,
6943        nameLoc: ci(e, t),
6944        value: void 0,
6945        loc: ci(e)
6946      };
6947    else if (qr = {
6948      type: 7,
6949      name: l,
6950      rawName: s,
6951      exp: void 0,
6952      arg: void 0,
6953      modifiers: s === "." ? ["prop"] : [],
6954      loc: ci(e)
6955    }, l === "pre") {
6956      Wl = Zn.inVPre = !0, uv = Yi;
6957      const h = Yi.props;
6958      for (let g = 0; g < h.length; g++)
6959        h[g].type === 7 && (h[g] = hF(h[g]));
6960    }
6961  },
6962  ondirarg(e, t) {
6963    if (e === t) return;
6964    const s = Ri(e, t);
6965    if (Wl)
6966      qr.name += s, jc(qr.nameLoc, t);
6967    else {
6968      const l = s[0] !== "[";
6969      qr.arg = Up(
6970        l ? s : s.slice(1, -1),
6971        l,
6972        ci(e, t),
6973        l ? 3 : 0
6974      );
6975    }
6976  },
6977  ondirmodifier(e, t) {
6978    const s = Ri(e, t);
6979    if (Wl)
6980      qr.name += "." + s, jc(qr.nameLoc, t);
6981    else if (qr.name === "slot") {
6982      const l = qr.arg;
6983      l && (l.content += "." + s, jc(l.loc, t));
6984    } else
6985      qr.modifiers.push(s);
6986  },
6987  onattribdata(e, t) {
6988    As += Ri(e, t), Wa < 0 && (Wa = e), Fc = t;
6989  },
6990  onattribentity(e, t, s) {
6991    As += e, Wa < 0 && (Wa = t), Fc = s;
6992  },
6993  onattribnameend(e) {
6994    const t = qr.loc.start.offset, s = Ri(t, e);
6995    qr.type === 7 && (qr.rawName = s), Yi.props.some(
6996      (l) => (l.type === 7 ? l.rawName : l.name) === s
6997    ) && Ha(2, t);
6998  },
6999  onattribend(e, t) {
7000    if (Yi && qr) {
7001      if (jc(qr.loc, t), e !== 0)
7002        if (As.includes("&") && (As = Qr.decodeEntities(
7003          As,
7004          !0
7005        )), qr.type === 6)
7006          qr.name === "class" && (As = AC(As).trim()), e === 1 && !As && Ha(13, t), qr.value = {
7007            type: 2,
7008            content: As,
7009            loc: e === 1 ? ci(Wa, Fc) : ci(Wa - 1, Fc + 1)
7010          }, Zn.inSFCRoot && Yi.tag === "template" && qr.name === "lang" && As && As !== "html" && Zn.enterRCDATA(wm("</template"), 0);
7011        else {
7012          let s = 0;
7013          qr.exp = Up(
7014            As,
7015            !1,
7016            ci(Wa, Fc),
7017            0,
7018            s
7019          ), qr.name === "for" && (qr.forParseResult = nF(qr.exp));
7020          let l = -1;
7021          qr.name === "bind" && (l = qr.modifiers.indexOf("sync")) > -1 && od(
7022            "COMPILER_V_BIND_SYNC",
7023            Qr,
7024            qr.loc,
7025            qr.rawName
7026          ) && (qr.name = "model", qr.modifiers.splice(l, 1));
7027        }
7028      (qr.type !== 7 || qr.name !== "pre") && Yi.props.push(qr);
7029    }
7030    As = "", Wa = Fc = -1;
7031  },
7032  oncomment(e, t) {
7033    Qr.comments && hv({
7034      type: 3,
7035      content: Ri(e, t),
7036      loc: ci(e - 4, t + 3)
7037    });
7038  },
7039  onend() {
7040    const e = rl.length;
7041    for (let t = 0; t < Rn.length; t++)
7042      Vp(Rn[t], e - 1), Ha(24, Rn[t].loc.start.offset);
7043  },
7044  oncdata(e, t) {
7045    Rn[0].ns !== 0 ? kp(Ri(e, t), e, t) : Ha(1, e - 9);
7046  },
7047  onprocessinginstruction(e) {
7048    (Rn[0] ? Rn[0].ns : Qr.ns) === 0 && Ha(
7049      21,
7050      e - 1
7051    );
7052  }
7053}), Dw = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/, rF = /^\(|\)$/g;
7054function nF(e) {
7055  const t = e.loc, s = e.content, l = s.match(tF);
7056  if (!l) return;
7057  const [, h, g] = l, m = (R, z, J = !1) => {
7058    const K = t.start.offset + z, ee = K + R.length;
7059    return Up(
7060      R,
7061      !1,
7062      ci(K, ee),
7063      0,
7064      J ? 1 : 0
7065      /* Normal */
7066    );
7067  }, c = {
7068    source: m(g.trim(), s.indexOf(g, h.length)),
7069    value: void 0,
7070    key: void 0,
7071    index: void 0,
7072    finalized: !1
7073  };
7074  let w = h.trim().replace(rF, "").trim();
7075  const O = h.indexOf(w), P = w.match(Dw);
7076  if (P) {
7077    w = w.replace(Dw, "").trim();
7078    const R = P[1].trim();
7079    let z;
7080    if (R && (z = s.indexOf(R, O + w.length), c.key = m(R, z, !0)), P[2]) {
7081      const J = P[2].trim();
7082      J && (c.index = m(
7083        J,
7084        s.indexOf(
7085          J,
7086          c.key ? z + R.length : O + w.length
7087        ),
7088        !0
7089      ));
7090    }
7091  }
7092  return w && (c.value = m(w, O, !0)), c;
7093}
7094function Ri(e, t) {
7095  return rl.slice(e, t);
7096}
7097function Rw(e) {
7098  Zn.inSFCRoot && (Yi.innerLoc = ci(e + 1, e + 1)), hv(Yi);
7099  const { tag: t, ns: s } = Yi;
7100  s === 0 && Qr.isPreTag(t) && Am++, Qr.isVoidTag(t) ? Vp(Yi, e) : (Rn.unshift(Yi), (s === 1 || s === 2) && (Zn.inXML = !0)), Yi = null;
7101}
7102function kp(e, t, s) {
7103  {
7104    const g = Rn[0] && Rn[0].tag;
7105    g !== "script" && g !== "style" && e.includes("&") && (e = Qr.decodeEntities(e, !1));
7106  }
7107  const l = Rn[0] || ld, h = l.children[l.children.length - 1];
7108  h && h.type === 2 ? (h.content += e, jc(h.loc, s)) : l.children.push({
7109    type: 2,
7110    content: e,
7111    loc: ci(t, s)
7112  });
7113}
7114function Vp(e, t, s = !1) {
7115  s ? jc(e.loc, TC(t, 60)) : jc(e.loc, iF(t, 62) + 1), Zn.inSFCRoot && (e.children.length ? e.innerLoc.end = Hr({}, e.children[e.children.length - 1].loc.end) : e.innerLoc.end = Hr({}, e.innerLoc.start), e.innerLoc.source = Ri(
7116    e.innerLoc.start.offset,
7117    e.innerLoc.end.offset
7118  ));
7119  const { tag: l, ns: h } = e;
7120  Wl || (l === "slot" ? e.tagType = 2 : Lw(e) ? e.tagType = 3 : oF(e) && (e.tagType = 1)), Zn.inRCDATA || (e.children = EC(e.children, e.tag)), h === 0 && Qr.isPreTag(l) && Am--, uv === e && (Wl = Zn.inVPre = !1, uv = null), Zn.inXML && (Rn[0] ? Rn[0].ns : Qr.ns) === 0 && (Zn.inXML = !1);
7121  {
7122    const g = e.props;
7123    if (!Zn.inSFCRoot && Wc(
7124      "COMPILER_NATIVE_TEMPLATE",
7125      Qr
7126    ) && e.tag === "template" && !Lw(e)) {
7127      const c = Rn[0] || ld, w = c.children.indexOf(e);
7128      c.children.splice(w, 1, ...e.children);
7129    }
7130    const m = g.find(
7131      (c) => c.type === 6 && c.name === "inline-template"
7132    );
7133    m && od(
7134      "COMPILER_INLINE_TEMPLATE",
7135      Qr,
7136      m.loc
7137    ) && e.children.length && (m.value = {
7138      type: 2,
7139      content: Ri(
7140        e.children[0].loc.start.offset,
7141        e.children[e.children.length - 1].loc.end.offset
7142      ),
7143      loc: m.loc
7144    });
7145  }
7146}
7147function iF(e, t) {
7148  let s = e;
7149  for (; rl.charCodeAt(s) !== t && s < rl.length - 1; ) s++;
7150  return s;
7151}
7152function TC(e, t) {
7153  let s = e;
7154  for (; rl.charCodeAt(s) !== t && s >= 0; ) s--;
7155  return s;
7156}
7157const sF = /* @__PURE__ */ new Set(["if", "else", "else-if", "for", "slot"]);
7158function Lw({ tag: e, props: t }) {
7159  if (e === "template") {
7160    for (let s = 0; s < t.length; s++)
7161      if (t[s].type === 7 && sF.has(t[s].name))
7162        return !0;
7163  }
7164  return !1;
7165}
7166function oF({ tag: e, props: t }) {
7167  if (Qr.isCustomElement(e))
7168    return !1;
7169  if (e === "component" || aF(e.charCodeAt(0)) || bC(e) || Qr.isBuiltInComponent && Qr.isBuiltInComponent(e) || Qr.isNativeTag && !Qr.isNativeTag(e))
7170    return !0;
7171  for (let s = 0; s < t.length; s++) {
7172    const l = t[s];
7173    if (l.type === 6) {
7174      if (l.name === "is" && l.value) {
7175        if (l.value.content.startsWith("vue:"))
7176          return !0;
7177        if (od(
7178          "COMPILER_IS_ON_ELEMENT",
7179          Qr,
7180          l.loc
7181        ))
7182          return !0;
7183      }
7184    } else if (
7185      // :is on plain element - only treat as component in compat mode
7186      l.name === "bind" && $c(l.arg, "is") && od(
7187        "COMPILER_IS_ON_ELEMENT",
7188        Qr,
7189        l.loc
7190      )
7191    )
7192      return !0;
7193  }
7194  return !1;
7195}
7196function aF(e) {
7197  return e > 64 && e < 91;
7198}
7199const lF = /\r\n/g;
7200function EC(e, t) {
7201  const s = Qr.whitespace !== "preserve";
7202  let l = !1;
7203  for (let h = 0; h < e.length; h++) {
7204    const g = e[h];
7205    if (g.type === 2)
7206      if (Am)
7207        g.content = g.content.replace(lF, `
7208`);
7209      else if (cF(g.content)) {
7210        const m = e[h - 1] && e[h - 1].type, c = e[h + 1] && e[h + 1].type;
7211        !m || !c || s && (m === 3 && (c === 3 || c === 1) || m === 1 && (c === 3 || c === 1 && uF(g.content))) ? (l = !0, e[h] = null) : g.content = " ";
7212      } else s && (g.content = AC(g.content));
7213  }
7214  if (Am && t && Qr.isPreTag(t)) {
7215    const h = e[0];
7216    h && h.type === 2 && (h.content = h.content.replace(/^\r?\n/, ""));
7217  }
7218  return l ? e.filter(Boolean) : e;
7219}
7220function cF(e) {
7221  for (let t = 0; t < e.length; t++)
7222    if (!Qs(e.charCodeAt(t)))
7223      return !1;
7224  return !0;
7225}
7226function uF(e) {
7227  for (let t = 0; t < e.length; t++) {
7228    const s = e.charCodeAt(t);
7229    if (s === 10 || s === 13)
7230      return !0;
7231  }
7232  return !1;
7233}
7234function AC(e) {
7235  let t = "", s = !1;
7236  for (let l = 0; l < e.length; l++)
7237    Qs(e.charCodeAt(l)) ? s || (t += " ", s = !0) : (t += e[l], s = !1);
7238  return t;
7239}
7240function hv(e) {
7241  (Rn[0] || ld).children.push(e);
7242}
7243function ci(e, t) {
7244  return {
7245    start: Zn.getPos(e),
7246    // @ts-expect-error allow late attachment
7247    end: t == null ? t : Zn.getPos(t),
7248    // @ts-expect-error allow late attachment
7249    source: t == null ? t : Ri(e, t)
7250  };
7251}
7252function jc(e, t) {
7253  e.end = Zn.getPos(t), e.source = Ri(e.start.offset, t);
7254}
7255function hF(e) {
7256  const t = {
7257    type: 6,
7258    name: e.rawName,
7259    nameLoc: ci(
7260      e.loc.start.offset,
7261      e.loc.start.offset + e.rawName.length
7262    ),
7263    value: void 0,
7264    loc: e.loc
7265  };
7266  if (e.exp) {
7267    const s = e.exp.loc;
7268    s.end.offset < e.loc.end.offset && (s.start.offset--, s.start.column--, s.end.offset++, s.end.column++), t.value = {
7269      type: 2,
7270      content: e.exp.content,
7271      loc: s
7272    };
7273  }
7274  return t;
7275}
7276function Up(e, t = !1, s, l = 0, h = 0) {
7277  return Er(e, t, s, l);
7278}
7279function Ha(e, t, s) {
7280  Qr.onError(
7281    Ln(e, ci(t, t))
7282  );
7283}
7284function fF() {
7285  Zn.reset(), Yi = null, qr = null, As = "", Wa = -1, Fc = -1, Rn.length = 0;
7286}
7287function dF(e, t) {
7288  if (fF(), rl = e, Qr = Hr({}, SC), t) {
7289    let h;
7290    for (h in t)
7291      t[h] != null && (Qr[h] = t[h]);
7292  }
7293  Zn.mode = Qr.parseMode === "html" ? 1 : Qr.parseMode === "sfc" ? 2 : 0, Zn.inXML = Qr.ns === 1 || Qr.ns === 2;
7294  const s = t && t.delimiters;
7295  s && (Zn.delimiterOpen = wm(s[0]), Zn.delimiterClose = wm(s[1]));
7296  const l = ld = VL([], e);
7297  return Zn.parse(rl), l.loc = ci(0, e.length), l.children = EC(l.children), ld = null, l;
7298}
7299function pF(e, t) {
7300  qp(
7301    e,
7302    t,
7303    // Root node is unfortunately non-hoistable due to potential parent
7304    // fallthrough attributes.
7305    CC(e, e.children[0])
7306  );
7307}
7308function CC(e, t) {
7309  const { children: s } = e;
7310  return s.length === 1 && t.type === 1 && !Tm(t);
7311}
7312function qp(e, t, s = !1) {
7313  const { children: l } = e, h = l.length;
7314  let g = 0;
7315  for (let m = 0; m < l.length; m++) {
7316    const c = l[m];
7317    if (c.type === 1 && c.tagType === 0) {
7318      const w = s ? 0 : So(c, t);
7319      if (w > 0) {
7320        if (w >= 2) {
7321          c.codegenNode.patchFlag = "-1", c.codegenNode = t.hoist(c.codegenNode), g++;
7322          continue;
7323        }
7324      } else {
7325        const O = c.codegenNode;
7326        if (O.type === 13) {
7327          const P = kC(O);
7328          if ((!P || P === 512 || P === 1) && PC(c, t) >= 2) {
7329            const R = MC(c);
7330            R && (O.props = t.hoist(R));
7331          }
7332          O.dynamicProps && (O.dynamicProps = t.hoist(O.dynamicProps));
7333        }
7334      }
7335    }
7336    if (c.type === 1) {
7337      const w = c.tagType === 1;
7338      w && t.scopes.vSlot++, qp(c, t), w && t.scopes.vSlot--;
7339    } else if (c.type === 11)
7340      qp(c, t, c.children.length === 1);
7341    else if (c.type === 9)
7342      for (let w = 0; w < c.branches.length; w++)
7343        qp(
7344          c.branches[w],
7345          t,
7346          c.branches[w].children.length === 1
7347        );
7348  }
7349  if (g && t.transformHoist && t.transformHoist(l, t, e), g && g === h && e.type === 1 && e.tagType === 0 && e.codegenNode && e.codegenNode.type === 13 && jt(e.codegenNode.children)) {
7350    const m = t.hoist(
7351      Ad(e.codegenNode.children)
7352    );
7353    t.hmr && (m.content = `[...${m.content}]`), e.codegenNode.children = m;
7354  }
7355}
7356function So(e, t) {
7357  const { constantCache: s } = t;
7358  switch (e.type) {
7359    case 1:
7360      if (e.tagType !== 0)
7361        return 0;
7362      const l = s.get(e);
7363      if (l !== void 0)
7364        return l;
7365      const h = e.codegenNode;
7366      if (h.type !== 13 || h.isBlock && e.tag !== "svg" && e.tag !== "foreignObject" && e.tag !== "math")
7367        return 0;
7368      if (kC(h))
7369        return s.set(e, 0), 0;
7370      {
7371        let c = 3;
7372        const w = PC(e, t);
7373        if (w === 0)
7374          return s.set(e, 0), 0;
7375        w < c && (c = w);
7376        for (let O = 0; O < e.children.length; O++) {
7377          const P = So(e.children[O], t);
7378          if (P === 0)
7379            return s.set(e, 0), 0;
7380          P < c && (c = P);
7381        }
7382        if (c > 1)
7383          for (let O = 0; O < e.props.length; O++) {
7384            const P = e.props[O];
7385            if (P.type === 7 && P.name === "bind" && P.exp) {
7386              const R = So(P.exp, t);
7387              if (R === 0)
7388                return s.set(e, 0), 0;
7389              R < c && (c = R);
7390            }
7391          }
7392        if (h.isBlock) {
7393          for (let O = 0; O < e.props.length; O++)
7394            if (e.props[O].type === 7)
7395              return s.set(e, 0), 0;
7396          t.removeHelper(ru), t.removeHelper(
7397            yh(t.inSSR, h.isComponent)
7398          ), h.isBlock = !1, t.helper(gh(t.inSSR, h.isComponent));
7399        }
7400        return s.set(e, c), c;
7401      }
7402    case 2:
7403    case 3:
7404      return 3;
7405    case 9:
7406    case 11:
7407    case 10:
7408      return 0;
7409    case 5:
7410    case 12:
7411      return So(e.content, t);
7412    case 4:
7413      return e.constType;
7414    case 8:
7415      let m = 3;
7416      for (let c = 0; c < e.children.length; c++) {
7417        const w = e.children[c];
7418        if (vr(w) || Eo(w))
7419          continue;
7420        const O = So(w, t);
7421        if (O === 0)
7422          return 0;
7423        O < m && (m = O);
7424      }
7425      return m;
7426    default:
7427      return 0;
7428  }
7429}
7430const mF = /* @__PURE__ */ new Set([
7431  lx,
7432  cx,
7433  id,
7434  Ed
7435]);
7436function IC(e, t) {
7437  if (e.type === 14 && !vr(e.callee) && mF.has(e.callee)) {
7438    const s = e.arguments[0];
7439    if (s.type === 4)
7440      return So(s, t);
7441    if (s.type === 14)
7442      return IC(s, t);
7443  }
7444  return 0;
7445}
7446function PC(e, t) {
7447  let s = 3;
7448  const l = MC(e);
7449  if (l && l.type === 15) {
7450    const { properties: h } = l;
7451    for (let g = 0; g < h.length; g++) {
7452      const { key: m, value: c } = h[g], w = So(m, t);
7453      if (w === 0)
7454        return w;
7455      w < s && (s = w);
7456      let O;
7457      if (c.type === 4 ? O = So(c, t) : c.type === 14 ? O = IC(c, t) : O = 0, O === 0)
7458        return O;
7459      O < s && (s = O);
7460    }
7461  }
7462  return s;
7463}
7464function MC(e) {
7465  const t = e.codegenNode;
7466  if (t.type === 13)
7467    return t.props;
7468}
7469function kC(e) {
7470  const t = e.patchFlag;
7471  return t ? parseInt(t, 10) : void 0;
7472}
7473function gF(e, {
7474  filename: t = "",
7475  prefixIdentifiers: s = !1,
7476  hoistStatic: l = !1,
7477  hmr: h = !1,
7478  cacheHandlers: g = !1,
7479  nodeTransforms: m = [],
7480  directiveTransforms: c = {},
7481  transformHoist: w = null,
7482  isBuiltInComponent: O = di,
7483  isCustomElement: P = di,
7484  expressionPlugins: R = [],
7485  scopeId: z = null,
7486  slotted: J = !0,
7487  ssr: K = !1,
7488  inSSR: ee = !1,
7489  ssrCssVars: ue = "",
7490  bindingMetadata: Ce = Kr,
vendor: 11,925 bytes, lines 7491-8005
7491  inline: ge = !1,
7492  isTS: X = !1,
7493  onError: ye = px,
7494  onWarn: Ae = vC,
7495  compatConfig: Se
7496}) {
7497  const je = t.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/), Ne = {
7498    // options
7499    filename: t,
7500    selfName: je && ic(Fn(je[1])),
7501    prefixIdentifiers: s,
7502    hoistStatic: l,
7503    hmr: h,
7504    cacheHandlers: g,
7505    nodeTransforms: m,
7506    directiveTransforms: c,
7507    transformHoist: w,
7508    isBuiltInComponent: O,
7509    isCustomElement: P,
7510    expressionPlugins: R,
7511    scopeId: z,
7512    slotted: J,
7513    ssr: K,
7514    inSSR: ee,
7515    ssrCssVars: ue,
7516    bindingMetadata: Ce,
7517    inline: ge,
7518    isTS: X,
7519    onError: ye,
7520    onWarn: Ae,
7521    compatConfig: Se,
7522    // state
7523    root: e,
7524    helpers: /* @__PURE__ */ new Map(),
7525    components: /* @__PURE__ */ new Set(),
7526    directives: /* @__PURE__ */ new Set(),
7527    hoists: [],
7528    imports: [],
7529    constantCache: /* @__PURE__ */ new WeakMap(),
7530    temps: 0,
7531    cached: 0,
7532    identifiers: /* @__PURE__ */ Object.create(null),
7533    scopes: {
7534      vFor: 0,
7535      vSlot: 0,
7536      vPre: 0,
7537      vOnce: 0
7538    },
7539    parent: null,
7540    grandParent: null,
7541    currentNode: e,
7542    childIndex: 0,
7543    inVOnce: !1,
7544    // methods
7545    helper(Oe) {
7546      const ze = Ne.helpers.get(Oe) || 0;
7547      return Ne.helpers.set(Oe, ze + 1), Oe;
7548    },
7549    removeHelper(Oe) {
7550      const ze = Ne.helpers.get(Oe);
7551      if (ze) {
7552        const He = ze - 1;
7553        He ? Ne.helpers.set(Oe, He) : Ne.helpers.delete(Oe);
7554      }
7555    },
7556    helperString(Oe) {
7557      return `_${ph[Ne.helper(Oe)]}`;
7558    },
7559    replaceNode(Oe) {
7560      Ne.parent.children[Ne.childIndex] = Ne.currentNode = Oe;
7561    },
7562    removeNode(Oe) {
7563      const ze = Ne.parent.children, He = Oe ? ze.indexOf(Oe) : Ne.currentNode ? Ne.childIndex : -1;
7564      !Oe || Oe === Ne.currentNode ? (Ne.currentNode = null, Ne.onNodeRemoved()) : Ne.childIndex > He && (Ne.childIndex--, Ne.onNodeRemoved()), Ne.parent.children.splice(He, 1);
7565    },
7566    onNodeRemoved: di,
7567    addIdentifiers(Oe) {
7568    },
7569    removeIdentifiers(Oe) {
7570    },
7571    hoist(Oe) {
7572      vr(Oe) && (Oe = Er(Oe)), Ne.hoists.push(Oe);
7573      const ze = Er(
7574        `_hoisted_${Ne.hoists.length}`,
7575        !1,
7576        Oe.loc,
7577        2
7578      );
7579      return ze.hoisted = Oe, ze;
7580    },
7581    cache(Oe, ze = !1) {
7582      return UL(Ne.cached++, Oe, ze);
7583    }
7584  };
7585  return Ne.filters = /* @__PURE__ */ new Set(), Ne;
7586}
7587function yF(e, t) {
7588  const s = gF(e, t);
7589  xg(e, s), t.hoistStatic && pF(e, s), t.ssr || _F(e, s), e.helpers = /* @__PURE__ */ new Set([...s.helpers.keys()]), e.components = [...s.components], e.directives = [...s.directives], e.imports = s.imports, e.hoists = s.hoists, e.temps = s.temps, e.cached = s.cached, e.transformed = !0, e.filters = [...s.filters];
7590}
7591function _F(e, t) {
7592  const { helper: s } = t, { children: l } = e;
7593  if (l.length === 1) {
7594    const h = l[0];
7595    if (CC(e, h) && h.codegenNode) {
7596      const g = h.codegenNode;
7597      g.type === 13 && dx(g, t), e.codegenNode = g;
7598    } else
7599      e.codegenNode = h;
7600  } else if (l.length > 1) {
7601    let h = 64;
7602    e.codegenNode = sd(
7603      t,
7604      s(nd),
7605      void 0,
7606      e.children,
7607      h + "",
7608      void 0,
7609      void 0,
7610      !0,
7611      void 0,
7612      !1
7613    );
7614  }
7615}
7616function vF(e, t) {
7617  let s = 0;
7618  const l = () => {
7619    s--;
7620  };
7621  for (; s < e.children.length; s++) {
7622    const h = e.children[s];
7623    vr(h) || (t.grandParent = t.parent, t.parent = e, t.childIndex = s, t.onNodeRemoved = l, xg(h, t));
7624  }
7625}
7626function xg(e, t) {
7627  t.currentNode = e;
7628  const { nodeTransforms: s } = t, l = [];
7629  for (let g = 0; g < s.length; g++) {
7630    const m = s[g](e, t);
7631    if (m && (jt(m) ? l.push(...m) : l.push(m)), t.currentNode)
7632      e = t.currentNode;
7633    else
7634      return;
7635  }
7636  switch (e.type) {
7637    case 3:
7638      t.ssr || t.helper(Td);
7639      break;
7640    case 5:
7641      t.ssr || t.helper(vg);
7642      break;
7643    case 9:
7644      for (let g = 0; g < e.branches.length; g++)
7645        xg(e.branches[g], t);
7646      break;
7647    case 10:
7648    case 11:
7649    case 1:
7650    case 0:
7651      vF(e, t);
7652      break;
7653  }
7654  t.currentNode = e;
7655  let h = l.length;
7656  for (; h--; )
7657    l[h]();
7658}
7659function OC(e, t) {
7660  const s = vr(e) ? (l) => l === e : (l) => e.test(l);
7661  return (l, h) => {
7662    if (l.type === 1) {
7663      const { props: g } = l;
7664      if (l.tagType === 3 && g.some(YL))
7665        return;
7666      const m = [];
7667      for (let c = 0; c < g.length; c++) {
7668        const w = g[c];
7669        if (w.type === 7 && s(w.name)) {
7670          g.splice(c, 1), c--;
7671          const O = t(l, w, h);
7672          O && m.push(O);
7673        }
7674      }
7675      return m;
7676    }
7677  };
7678}
7679const wg = "/*#__PURE__*/", DC = (e) => `${ph[e]}: _${ph[e]}`;
7680function bF(e, {
7681  mode: t = "function",
7682  prefixIdentifiers: s = t === "module",
7683  sourceMap: l = !1,
7684  filename: h = "template.vue.html",
7685  scopeId: g = null,
7686  optimizeImports: m = !1,
7687  runtimeGlobalName: c = "Vue",
7688  runtimeModuleName: w = "vue",
7689  ssrRuntimeModuleName: O = "vue/server-renderer",
7690  ssr: P = !1,
7691  isTS: R = !1,
7692  inSSR: z = !1
7693}) {
7694  const J = {
7695    mode: t,
7696    prefixIdentifiers: s,
7697    sourceMap: l,
7698    filename: h,
7699    scopeId: g,
7700    optimizeImports: m,
7701    runtimeGlobalName: c,
7702    runtimeModuleName: w,
7703    ssrRuntimeModuleName: O,
7704    ssr: P,
7705    isTS: R,
7706    inSSR: z,
7707    source: e.source,
7708    code: "",
7709    column: 1,
7710    line: 1,
7711    offset: 0,
7712    indentLevel: 0,
7713    pure: !1,
7714    map: void 0,
7715    helper(ee) {
7716      return `_${ph[ee]}`;
7717    },
7718    push(ee, ue = -2, Ce) {
7719      J.code += ee;
7720    },
7721    indent() {
7722      K(++J.indentLevel);
7723    },
7724    deindent(ee = !1) {
7725      ee ? --J.indentLevel : K(--J.indentLevel);
7726    },
7727    newline() {
7728      K(J.indentLevel);
7729    }
7730  };
7731  function K(ee) {
7732    J.push(
7733      `
7734` + "  ".repeat(ee),
7735      0
7736      /* Start */
7737    );
7738  }
7739  return J;
7740}
7741function xF(e, t = {}) {
7742  const s = bF(e, t);
7743  t.onContextCreated && t.onContextCreated(s);
7744  const {
7745    mode: l,
7746    push: h,
7747    prefixIdentifiers: g,
7748    indent: m,
7749    deindent: c,
7750    newline: w,
7751    scopeId: O,
7752    ssr: P
7753  } = s, R = Array.from(e.helpers), z = R.length > 0, J = !g && l !== "module";
7754  wF(e, s);
7755  const ee = P ? "ssrRender" : "render", Ce = (P ? ["_ctx", "_push", "_parent", "_attrs"] : ["_ctx", "_cache"]).join(", ");
7756  if (h(`function ${ee}(${Ce}) {`), m(), J && (h("with (_ctx) {"), m(), z && (h(
7757    `const { ${R.map(DC).join(", ")} } = _Vue
7758`,
7759    -1
7760    /* End */
7761  ), w())), e.components.length && (r_(e.components, "component", s), (e.directives.length || e.temps > 0) && w()), e.directives.length && (r_(e.directives, "directive", s), e.temps > 0 && w()), e.filters && e.filters.length && (w(), r_(e.filters, "filter", s), w()), e.temps > 0) {
7762    h("let ");
7763    for (let ge = 0; ge < e.temps; ge++)
7764      h(`${ge > 0 ? ", " : ""}_temp${ge}`);
7765  }
7766  return (e.components.length || e.directives.length || e.temps) && (h(
7767    `
7768`,
7769    0
7770    /* Start */
7771  ), w()), P || h("return "), e.codegenNode ? ts(e.codegenNode, s) : h("null"), J && (c(), h("}")), c(), h("}"), {
7772    ast: e,
7773    code: s.code,
7774    preamble: "",
7775    map: s.map ? s.map.toJSON() : void 0
7776  };
7777}
7778function wF(e, t) {
7779  const {
7780    ssr: s,
7781    prefixIdentifiers: l,
7782    push: h,
7783    newline: g,
7784    runtimeModuleName: m,
7785    runtimeGlobalName: c,
7786    ssrRuntimeModuleName: w
7787  } = t, O = c, P = Array.from(e.helpers);
7788  if (P.length > 0 && (h(
7789    `const _Vue = ${O}
7790`,
7791    -1
7792    /* End */
7793  ), e.hoists.length)) {
7794    const R = [
7795      Qb,
7796      ex,
7797      Td,
7798      tx,
7799      mC
7800    ].filter((z) => P.includes(z)).map(DC).join(", ");
7801    h(
7802      `const { ${R} } = _Vue
7803`,
7804      -1
7805      /* End */
7806    );
7807  }
7808  SF(e.hoists, t), g(), h("return ");
7809}
7810function r_(e, t, { helper: s, push: l, newline: h, isTS: g }) {
7811  const m = s(
7812    t === "filter" ? sx : t === "component" ? rx : ix
7813  );
7814  for (let c = 0; c < e.length; c++) {
7815    let w = e[c];
7816    const O = w.endsWith("__self");
7817    O && (w = w.slice(0, -6)), l(
7818      `const ${ad(w, t)} = ${m}(${JSON.stringify(w)}${O ? ", true" : ""})${g ? "!" : ""}`
7819    ), c < e.length - 1 && h();
7820  }
7821}
7822function SF(e, t) {
7823  if (!e.length)
7824    return;
7825  t.pure = !0;
7826  const { push: s, newline: l, helper: h, scopeId: g, mode: m } = t;
7827  l();
7828  for (let c = 0; c < e.length; c++) {
7829    const w = e[c];
7830    w && (s(
7831      `const _hoisted_${c + 1} = `
7832    ), ts(w, t), l());
7833  }
7834  t.pure = !1;
7835}
7836function gx(e, t) {
7837  const s = e.length > 3 || !1;
7838  t.push("["), s && t.indent(), Cd(e, t, s), s && t.deindent(), t.push("]");
7839}
7840function Cd(e, t, s = !1, l = !0) {
7841  const { push: h, newline: g } = t;
7842  for (let m = 0; m < e.length; m++) {
7843    const c = e[m];
7844    vr(c) ? h(
7845      c,
7846      -3
7847      /* Unknown */
7848    ) : jt(c) ? gx(c, t) : ts(c, t), m < e.length - 1 && (s ? (l && h(","), g()) : l && h(", "));
7849  }
7850}
7851function ts(e, t) {
7852  if (vr(e)) {
7853    t.push(
7854      e,
7855      -3
7856      /* Unknown */
7857    );
7858    return;
7859  }
7860  if (Eo(e)) {
7861    t.push(t.helper(e));
7862    return;
7863  }
7864  switch (e.type) {
7865    case 1:
7866    case 9:
7867    case 11:
7868      ts(e.codegenNode, t);
7869      break;
7870    case 2:
7871      TF(e, t);
7872      break;
7873    case 4:
7874      RC(e, t);
7875      break;
7876    case 5:
7877      EF(e, t);
7878      break;
7879    case 12:
7880      ts(e.codegenNode, t);
7881      break;
7882    case 8:
7883      LC(e, t);
7884      break;
7885    case 3:
7886      CF(e, t);
7887      break;
7888    case 13:
7889      IF(e, t);
7890      break;
7891    case 14:
7892      MF(e, t);
7893      break;
7894    case 15:
7895      kF(e, t);
7896      break;
7897    case 17:
7898      OF(e, t);
7899      break;
7900    case 18:
7901      DF(e, t);
7902      break;
7903    case 19:
7904      RF(e, t);
7905      break;
7906    case 20:
7907      LF(e, t);
7908      break;
7909    case 21:
7910      Cd(e.body, t, !0, !1);
7911      break;
7912  }
7913}
7914function TF(e, t) {
7915  t.push(JSON.stringify(e.content), -3, e);
7916}
7917function RC(e, t) {
7918  const { content: s, isStatic: l } = e;
7919  t.push(
7920    l ? JSON.stringify(s) : s,
7921    -3,
7922    e
7923  );
7924}
7925function EF(e, t) {
7926  const { push: s, helper: l, pure: h } = t;
7927  h && s(wg), s(`${l(vg)}(`), ts(e.content, t), s(")");
7928}
7929function LC(e, t) {
7930  for (let s = 0; s < e.children.length; s++) {
7931    const l = e.children[s];
7932    vr(l) ? t.push(
7933      l,
7934      -3
7935      /* Unknown */
7936    ) : ts(l, t);
7937  }
7938}
7939function AF(e, t) {
7940  const { push: s } = t;
7941  if (e.type === 8)
7942    s("["), LC(e, t), s("]");
7943  else if (e.isStatic) {
7944    const l = mx(e.content) ? e.content : JSON.stringify(e.content);
7945    s(l, -2, e);
7946  } else
7947    s(`[${e.content}]`, -3, e);
7948}
7949function CF(e, t) {
7950  const { push: s, helper: l, pure: h } = t;
7951  h && s(wg), s(
7952    `${l(Td)}(${JSON.stringify(e.content)})`,
7953    -3,
7954    e
7955  );
7956}
7957function IF(e, t) {
7958  const { push: s, helper: l, pure: h } = t, {
7959    tag: g,
7960    props: m,
7961    children: c,
7962    patchFlag: w,
7963    dynamicProps: O,
7964    directives: P,
7965    isBlock: R,
7966    disableTracking: z,
7967    isComponent: J
7968  } = e;
7969  P && s(l(ox) + "("), R && s(`(${l(ru)}(${z ? "true" : ""}), `), h && s(wg);
7970  const K = R ? yh(t.inSSR, J) : gh(t.inSSR, J);
7971  s(l(K) + "(", -2, e), Cd(
7972    PF([g, m, c, w, O]),
7973    t
7974  ), s(")"), R && s(")"), P && (s(", "), ts(P, t), s(")"));
7975}
7976function PF(e) {
7977  let t = e.length;
7978  for (; t-- && e[t] == null; )
7979    ;
7980  return e.slice(0, t + 1).map((s) => s || "null");
7981}
7982function MF(e, t) {
7983  const { push: s, helper: l, pure: h } = t, g = vr(e.callee) ? e.callee : l(e.callee);
7984  h && s(wg), s(g + "(", -2, e), Cd(e.arguments, t), s(")");
7985}
7986function kF(e, t) {
7987  const { push: s, indent: l, deindent: h, newline: g } = t, { properties: m } = e;
7988  if (!m.length) {
7989    s("{}", -2, e);
7990    return;
7991  }
7992  const c = m.length > 1 || !1;
7993  s(c ? "{" : "{ "), c && l();
7994  for (let w = 0; w < m.length; w++) {
7995    const { key: O, value: P } = m[w];
7996    AF(O, t), s(": "), ts(P, t), w < m.length - 1 && (s(","), g());
7997  }
7998  c && h(), s(c ? "}" : " }");
7999}
8000function OF(e, t) {
8001  gx(e.elements, t);
8002}
8003function DF(e, t) {
8004  const { push: s, indent: l, deindent: h } = t, { params: g, returns: m, body: c, newline: w, isSlot: O } = e;
8005  O && s(`_${ph[hx]}(`), s("(", -2, e), jt(g) ? Cd(g, t) : g && ts(g, t), s(") =>
8005 "), (w || c) && (s("{"), l()), m ? (w && s("return "), jt(m) ? gx(m, t) : ts(m, t)) : c && ts(c, t), (w || c) && (h(), s("}")), O && (e.isNonScopedSlot && s(", undefined, true"), s(")"));
8006}
8007function RF(e, t) {
8008  const { test: s, consequent: l, alternate: h, newline: g } = e, { push: m, indent: c, deindent: w, newline: O } = t;
8009  if (s.type === 4) {
8010    const R = !mx(s.content);
8011    R && m("("), RC(s, t), R && m(")");
8012  } else
8013    m("("), ts(s, t), m(")");
8014  g && c(), t.indentLevel++, g || m(" "), m("? "), ts(l, t), t.indentLevel--, g && O(), g || m(" "), m(": ");
8015  const P = h.type === 19;
8016  P || t.indentLevel++, ts(h, t), P || t.indentLevel--, g && w(
8017    !0
8018    /* without newline */
8019  );
8020}
8021function LF(e, t) {
8022  const { push: s, helper: l, indent: h, deindent: g, newline: m } = t;
8023  s(`_cache[${e.index}] || (`), e.isVNode && (h(), s(`${l(xm)}(-1),`), m()), s(`_cache[${e.index}] = `), ts(e.value, t), e.isVNode && (s(","), m(), s(`${l(xm)}(1),`), m(), s(`_cache[${e.index}]`), g()), s(")");
8024}
8025new RegExp(
8026  "\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b"
8027);
8028const FF = OC(
8029  /^(if|else|else-if)$/,
8030  (e, t, s) => zF(e, t, s, (l, h, g) => {
8031    const m = s.parent.children;
8032    let c = m.indexOf(l), w = 0;
8033    for (; c-- >= 0; ) {
8034      const O = m[c];
8035      O && O.type === 9 && (w += O.branches.length);
8036    }
8037    return () => {
8038      if (g)
8039        l.codegenNode = zw(
8040          h,
8041          w,
8042          s
8043        );
8044      else {
8045        const O = BF(l.codegenNode);
8046        O.alternate = zw(
8047          h,
8048          w + l.branches.length - 1,
8049          s
8050        );
8051      }
8052    };
8053  })
8054);
8055function zF(e, t, s, l) {
8056  if (t.name !== "else" && (!t.exp || !t.exp.content.trim())) {
8057    const h = t.exp ? t.exp.loc : e.loc;
8058    s.onError(
8059      Ln(28, t.loc)
8060    ), t.exp = Er("true", !1, h);
8061  }
8062  if (t.name === "if") {
8063    const h = Fw(e, t), g = {
8064      type: 9,
8065      loc: e.loc,
8066      branches: [h]
8067    };
8068    if (s.replaceNode(g), l)
8069      return l(g, h, !0);
8070  } else {
8071    const h = s.parent.children;
8072    let g = h.indexOf(e);
8073    for (; g-- >= -1; ) {
8074      const m = h[g];
8075      if (m && m.type === 3) {
8076        s.removeNode(m);
8077        continue;
8078      }
8079      if (m && m.type === 2 && !m.content.trim().length) {
8080        s.removeNode(m);
8081        continue;
8082      }
8083      if (m && m.type === 9) {
8084        t.name === "else-if" && m.branches[m.branches.length - 1].condition === void 0 && s.onError(
8085          Ln(30, e.loc)
8086        ), s.removeNode();
8087        const c = Fw(e, t);
8088        m.branches.push(c);
8089        const w = l && l(m, c, !1);
8090        xg(c, s), w && w(), s.currentNode = null;
8091      } else
8092        s.onError(
8093          Ln(30, e.loc)
8094        );
8095      break;
8096    }
8097  }
8098}
8099function Fw(e, t) {
8100  const s = e.tagType === 3;
8101  return {
8102    type: 10,
8103    loc: e.loc,
8104    condition: t.name === "else" ? void 0 : t.exp,
8105    children: s && !Bo(e, "for") ? e.children : [e],
8106    userKey: bg(e, "key"),
8107    isTemplateIf: s
8108  };
8109}
8110function zw(e, t, s) {
8111  return e.condition ? cv(
8112    e.condition,
8113    Bw(e, t, s),
8114    // make sure to pass in asBlock: true so that the comment node call
8115    // closes the current block.
8116    ui(s.helper(Td), [
8117      '""',
8118      "true"
8119    ])
8120  ) : Bw(e, t, s);
8121}
8122function Bw(e, t, s) {
8123  const { helper: l } = s, h = Qn(
8124    "key",
8125    Er(
8126      `${t}`,
8127      !1,
8128      no,
8129      2
8130    )
8131  ), { children: g } = e, m = g[0];
8132  if (g.length !== 1 || m.type !== 1)
8133    if (g.length === 1 && m.type === 11) {
8134      const w = m.codegenNode;
8135      return Em(w, h, s), w;
8136    } else
8137      return sd(
8138        s,
8139        l(nd),
8140        wo([h]),
8141        g,
8142        64 + "",
8143        void 0,
8144        void 0,
8145        !0,
8146        !1,
8147        !1,
8148        e.loc
8149      );
8150  else {
8151    const w = m.codegenNode, O = eF(w);
8152    return O.type === 13 && dx(O, s), Em(O, h, s), w;
8153  }
8154}
8155function BF(e) {
8156  for (; ; )
8157    if (e.type === 19)
8158      if (e.alternate.type === 19)
8159        e = e.alternate;
8160      else
8161        return e;
8162    else e.type === 20 && (e = e.value);
8163}
8164const NF = (e, t, s) => {
8165  const { modifiers: l, loc: h } = e, g = e.arg;
8166  let { exp: m } = e;
8167  if (m && m.type === 4 && !m.content.trim() && (m = void 0), !m) {
8168    if (g.type !== 4 || !g.isStatic)
8169      return s.onError(
8170        Ln(
8171          52,
8172          g.loc
8173        )
8174      ), {
8175        props: [
8176          Qn(g, Er("", !0, h))
8177        ]
8178      };
8179    FC(e), m = e.exp;
8180  }
8181  return g.type !== 4 ? (g.children.unshift("("), g.children.push(') || ""')) : g.isStatic || (g.content = `${g.content} || ""`), l.includes("camel") && (g.type === 4 ? g.isStatic ? g.content = Fn(g.content) : g.content = `${s.helperString(av)}(${g.content})` : (g.children.unshift(`${s.helperString(av)}(`), g.children.push(")"))), s.inSSR || (l.includes("prop") && Nw(g, "."), l.includes("attr") && Nw(g, "^")), {
8182    props: [Qn(g, m)]
8183  };
8184}, FC = (e, t) => {
8185  const s = e.arg, l = Fn(s.content);
8186  e.exp = Er(l, !1, s.loc);
8187}, Nw = (e, t) => {
8188  e.type === 4 ? e.isStatic ? e.content = t + e.content : e.content = `\`${t}\${${e.content}}\`` : (e.children.unshift(`'${t}' + (`), e.children.push(")"));
8189}, $F = OC(
8190  "for",
8191  (e, t, s) => {
8192    const { helper: l, removeHelper: h } = s;
8193    return jF(e, t, s, (g) => {
8194      const m = ui(l(ax), [
8195        g.source
8196      ]), c = Sm(e), w = Bo(e, "memo"), O = bg(e, "key", !1, !0);
8197      O && O.type === 7 && !O.exp && FC(O);
8198      const P = O && (O.type === 6 ? O.value ? Er(O.value.content, !0) : void 0 : O.exp), R = O && P ? Qn("key", P) : null, z = g.source.type === 4 && g.source.constType > 0, J = z ? 64 : O ? 128 : 256;
8199      return g.codegenNode = sd(
8200        s,
8201        l(nd),
8202        void 0,
8203        m,
8204        J + "",
8205        void 0,
8206        void 0,
8207        !0,
8208        !z,
8209        !1,
8210        e.loc
8211      ), () => {
8212        let K;
8213        const { children: ee } = g, ue = ee.length !== 1 || ee[0].type !== 1, Ce = Tm(e) ? e : c && e.children.length === 1 && Tm(e.children[0]) ? e.children[0] : null;
8214        if (Ce ? (K = Ce.codegenNode, c && R && Em(K, R, s)) : ue ? K = sd(
8215          s,
8216          l(nd),
8217          R ? wo([R]) : void 0,
8218          e.children,
8219          "64",
8220          void 0,
8221          void 0,
8222          !0,
8223          void 0,
8224          !1
8225        ) : (K = ee[0].codegenNode, c && R && Em(K, R, s), K.isBlock !== !z && (K.isBlock ? (h(ru), h(
8226          yh(s.inSSR, K.isComponent)
8227        )) : h(
8228          gh(s.inSSR, K.isComponent)
8229        )), K.isBlock = !z, K.isBlock ? (l(ru), l(yh(s.inSSR, K.isComponent))) : l(gh(s.inSSR, K.isComponent))), w) {
8230          const ge = mh(
8231            fv(g.parseResult, [
8232              Er("_cached")
8233            ])
8234          );
8235          ge.body = qL([
8236            jo(["const _memo = (", w.exp, ")"]),
8237            jo([
8238              "if (_cached",
8239              ...P ? [" && _cached.key === ", P] : [],
8240              ` && ${s.helperString(
8241                _C
8242              )}(_cached, _memo)) return _cached`
8243            ]),
8244            jo(["const _item = ", K]),
8245            Er("_item.memo = _memo"),
8246            Er("return _item")
8247          ]), m.arguments.push(
8248            ge,
8249            Er("_cache"),
8250            Er(String(s.cached++))
8251          );
8252        } else
8253          m.arguments.push(
8254            mh(
8255              fv(g.parseResult),
8256              K,
8257              !0
8258            )
8259          );
8260      };
8261    });
8262  }
8263);
8264function jF(e, t, s, l) {
8265  if (!t.exp) {
8266    s.onError(
8267      Ln(31, t.loc)
8268    );
8269    return;
8270  }
8271  const h = t.forParseResult;
8272  if (!h) {
8273    s.onError(
8274      Ln(32, t.loc)
8275    );
8276    return;
8277  }
8278  zC(h);
8279  const { addIdentifiers: g, removeIdentifiers: m, scopes: c } = s, { source: w, value: O, key: P, index: R } = h, z = {
8280    type: 11,
8281    loc: t.loc,
8282    source: w,
8283    valueAlias: O,
8284    keyAlias: P,
8285    objectIndexAlias: R,
8286    parseResult: h,
8287    children: Sm(e) ? e.children : [e]
8288  };
8289  s.replaceNode(z), c.vFor++;
8290  const J = l && l(z);
8291  return () => {
8292    c.vFor--, J && J();
8293  };
8294}
8295function zC(e, t) {
8296  e.finalized || (e.finalized = !0);
8297}
8298function fv({ value: e, key: t, index: s }, l = []) {
8299  return VF([e, t, s, ...l]);
8300}
8301function VF(e) {
8302  let t = e.length;
8303  for (; t-- && !e[t]; )
8304    ;
8305  return e.slice(0, t + 1).map((s, l) => s || Er("_".repeat(l + 1), !1));
8306}
8307const $w = Er("undefined", !1), UF = (e, t) => {
8308  if (e.type === 1 && (e.tagType === 1 || e.tagType === 3)) {
8309    const s = Bo(e, "slot");
8310    if (s)
8311      return s.exp, t.scopes.vSlot++, () => {
8312        t.scopes.vSlot--;
8313      };
8314  }
8315}, qF = (e, t, s, l) => mh(
8316  e,
8317  s,
8318  !1,
8319  !0,
8320  s.length ? s[0].loc : l
8321);
8322function HF(e, t, s = qF) {
8323  t.helper(hx);
8324  const { children: l, loc: h } = e, g = [], m = [];
8325  let c = t.scopes.vSlot > 0 || t.scopes.vFor > 0;
8326  const w = Bo(e, "slot", !0);
8327  if (w) {
8328    const { arg: ue, exp: Ce } = w;
8329    ue && !Ps(ue) && (c = !0), g.push(
8330      Qn(
8331        ue || Er("default", !0),
8332        s(Ce, void 0, l, h)
8333      )
8334    );
8335  }
8336  let O = !1, P = !1;
8337  const R = [], z = /* @__PURE__ */ new Set();
8338  let J = 0;
8339  for (let ue = 0; ue < l.length; ue++) {
8340    const Ce = l[ue];
8341    let ge;
8342    if (!Sm(Ce) || !(ge = Bo(Ce, "slot", !0))) {
8343      Ce.type !== 3 && R.push(Ce);
8344      continue;
8345    }
8346    if (w) {
8347      t.onError(
8348        Ln(37, ge.loc)
8349      );
8350      break;
8351    }
8352    O = !0;
8353    const { children: X, loc: ye } = Ce, {
8354      arg: Ae = Er("default", !0),
8355      exp: Se,
8356      loc: je
8357    } = ge;
8358    let Ne;
8359    Ps(Ae) ? Ne = Ae ? Ae.content : "default" : c = !0;
8360    const Oe = Bo(Ce, "for"), ze = s(Se, Oe, X, ye);
8361    let He, Ie;
8362    if (He = Bo(Ce, "if"))
8363      c = !0, m.push(
8364        cv(
8365          He.exp,
8366          Op(Ae, ze, J++),
8367          $w
8368        )
8369      );
8370    else if (Ie = Bo(
8371      Ce,
8372      /^else(-if)?$/,
8373      !0
8374      /* allowEmpty */
8375    )) {
8376      let $e = ue, Xe;
8377      for (; $e-- && (Xe = l[$e], Xe.type === 3); )
8378        ;
8379      if (Xe && Sm(Xe) && Bo(Xe, "if")) {
8380        l.splice(ue, 1), ue--;
8381        let st = m[m.length - 1];
8382        for (; st.alternate.type === 19; )
8383          st = st.alternate;
8384        st.alternate = Ie.exp ? cv(
8385          Ie.exp,
8386          Op(
8387            Ae,
8388            ze,
8389            J++
8390          ),
8391          $w
8392        ) : Op(Ae, ze, J++);
8393      } else
8394        t.onError(
8395          Ln(30, Ie.loc)
8396        );
8397    } else if (Oe) {
8398      c = !0;
8399      const $e = Oe.forParseResult;
8400      $e ? (zC($e), m.push(
8401        ui(t.helper(ax), [
8402          $e.source,
8403          mh(
8404            fv($e),
vendor: 16,384 bytes, lines 8405-8958
8405            Op(Ae, ze),
8406            !0
8407          )
8408        ])
8409      )) : t.onError(
8410        Ln(
8411          32,
8412          Oe.loc
8413        )
8414      );
8415    } else {
8416      if (Ne) {
8417        if (z.has(Ne)) {
8418          t.onError(
8419            Ln(
8420              38,
8421              je
8422            )
8423          );
8424          continue;
8425        }
8426        z.add(Ne), Ne === "default" && (P = !0);
8427      }
8428      g.push(Qn(Ae, ze));
8429    }
8430  }
8431  if (!w) {
8432    const ue = (Ce, ge) => {
8433      const X = s(Ce, void 0, ge, h);
8434      return t.compatConfig && (X.isNonScopedSlot = !0), Qn("default", X);
8435    };
8436    O ? R.length && // #3766
8437    // with whitespace: 'preserve', whitespaces between slots will end up in
8438    // implicitDefaultChildren. Ignore if all implicit children are whitespaces.
8439    R.some((Ce) => BC(Ce)) && (P ? t.onError(
8440      Ln(
8441        39,
8442        R[0].loc
8443      )
8444    ) : g.push(
8445      ue(void 0, R)
8446    )) : g.push(ue(void 0, l));
8447  }
8448  const K = c ? 2 : Hp(e.children) ? 3 : 1;
8449  let ee = wo(
8450    g.concat(
8451      Qn(
8452        "_",
8453        // 2 = compiled but dynamic = can skip normalization, but must run diff
8454        // 1 = compiled and static = can skip normalization AND diff as optimized
8455        Er(
8456          K + "",
8457          !1
8458        )
8459      )
8460    ),
8461    h
8462  );
8463  return m.length && (ee = ui(t.helper(yC), [
8464    ee,
8465    Ad(m)
8466  ])), {
8467    slots: ee,
8468    hasDynamicSlots: c
8469  };
8470}
8471function Op(e, t, s) {
8472  const l = [
8473    Qn("name", e),
8474    Qn("fn", t)
8475  ];
8476  return s != null && l.push(
8477    Qn("key", Er(String(s), !0))
8478  ), wo(l);
8479}
8480function Hp(e) {
8481  for (let t = 0; t < e.length; t++) {
8482    const s = e[t];
8483    switch (s.type) {
8484      case 1:
8485        if (s.tagType === 2 || Hp(s.children))
8486          return !0;
8487        break;
8488      case 9:
8489        if (Hp(s.branches)) return !0;
8490        break;
8491      case 10:
8492      case 11:
8493        if (Hp(s.children)) return !0;
8494        break;
8495    }
8496  }
8497  return !1;
8498}
8499function BC(e) {
8500  return e.type !== 2 && e.type !== 12 ? !0 : e.type === 2 ? !!e.content.trim() : BC(e.content);
8501}
8502const NC = /* @__PURE__ */ new WeakMap(), GF = (e, t) => function() {
8503  if (e = t.currentNode, !(e.type === 1 && (e.tagType === 0 || e.tagType === 1)))
8504    return;
8505  const { tag: l, props: h } = e, g = e.tagType === 1;
8506  let m = g ? ZF(e, t) : `"${l}"`;
8507  const c = hn(m) && m.callee === nx;
8508  let w, O, P, R = 0, z, J, K, ee = (
8509    // dynamic component may resolve to plain elements
8510    c || m === jf || m === Yb || !g && // <svg> and <foreignObject> must be forced into blocks so that block
8511    // updates inside get proper isSVG flag at runtime. (#639, #643)
8512    // This is technically web-specific, but splitting the logic out of core
8513    // leads to too much unnecessary complexity.
8514    (l === "svg" || l === "foreignObject" || l === "math")
8515  );
8516  if (h.length > 0) {
8517    const ue = $C(
8518      e,
8519      t,
8520      void 0,
8521      g,
8522      c
8523    );
8524    w = ue.props, R = ue.patchFlag, J = ue.dynamicPropNames;
8525    const Ce = ue.directives;
8526    K = Ce && Ce.length ? Ad(
8527      Ce.map((ge) => KF(ge, t))
8528    ) : void 0, ue.shouldUseBlock && (ee = !0);
8529  }
8530  if (e.children.length > 0)
8531    if (m === vm && (ee = !0, R |= 1024), g && // Teleport is not a real component and has dedicated runtime handling
8532    m !== jf && // explained above.
8533    m !== vm) {
8534      const { slots: Ce, hasDynamicSlots: ge } = HF(e, t);
8535      O = Ce, ge && (R |= 1024);
8536    } else if (e.children.length === 1 && m !== jf) {
8537      const Ce = e.children[0], ge = Ce.type, X = ge === 5 || ge === 8;
8538      X && So(Ce, t) === 0 && (R |= 1), X || ge === 2 ? O = Ce : O = e.children;
8539    } else
8540      O = e.children;
8541  R !== 0 && (P = String(R), J && J.length && (z = XF(J))), e.codegenNode = sd(
8542    t,
8543    m,
8544    w,
8545    O,
8546    P,
8547    z,
8548    K,
8549    !!ee,
8550    !1,
8551    g,
8552    e.loc
8553  );
8554};
8555function ZF(e, t, s = !1) {
8556  let { tag: l } = e;
8557  const h = dv(l), g = bg(
8558    e,
8559    "is",
8560    !1,
8561    !0
8562    /* allow empty */
8563  );
8564  if (g)
8565    if (h || Wc(
8566      "COMPILER_IS_ON_ELEMENT",
8567      t
8568    )) {
8569      let c;
8570      if (g.type === 6 ? c = g.value && Er(g.value.content, !0) : (c = g.exp, c || (c = Er("is", !1, g.loc))), c)
8571        return ui(t.helper(nx), [
8572          c
8573        ]);
8574    } else g.type === 6 && g.value.content.startsWith("vue:") && (l = g.value.content.slice(4));
8575  const m = bC(l) || t.isBuiltInComponent(l);
8576  return m ? (s || t.helper(m), m) : (t.helper(rx), t.components.add(l), ad(l, "component"));
8577}
8578function $C(e, t, s = e.props, l, h, g = !1) {
8579  const { tag: m, loc: c, children: w } = e;
8580  let O = [];
8581  const P = [], R = [], z = w.length > 0;
8582  let J = !1, K = 0, ee = !1, ue = !1, Ce = !1, ge = !1, X = !1, ye = !1;
8583  const Ae = [], Se = (ze) => {
8584    O.length && (P.push(
8585      wo(jw(O), c)
8586    ), O = []), ze && P.push(ze);
8587  }, je = () => {
8588    t.scopes.vFor > 0 && O.push(
8589      Qn(
8590        Er("ref_for", !0),
8591        Er("true")
8592      )
8593    );
8594  }, Ne = ({ key: ze, value: He }) => {
8595    if (Ps(ze)) {
8596      const Ie = ze.content, $e = su(Ie);
8597      if ($e && (!l || h) && // omit the flag for click handlers because hydration gives click
8598      // dedicated fast path.
8599      Ie.toLowerCase() !== "onclick" && // omit v-model handlers
8600      Ie !== "onUpdate:modelValue" && // omit onVnodeXXX hooks
8601      !Jl(Ie) && (ge = !0), $e && Jl(Ie) && (ye = !0), $e && He.type === 14 && (He = He.arguments[0]), He.type === 20 || (He.type === 4 || He.type === 8) && So(He, t) > 0)
8602        return;
8603      Ie === "ref" ? ee = !0 : Ie === "class" ? ue = !0 : Ie === "style" ? Ce = !0 : Ie !== "key" && !Ae.includes(Ie) && Ae.push(Ie), l && (Ie === "class" || Ie === "style") && !Ae.includes(Ie) && Ae.push(Ie);
8604    } else
8605      X = !0;
8606  };
8607  for (let ze = 0; ze < s.length; ze++) {
8608    const He = s[ze];
8609    if (He.type === 6) {
8610      const { loc: Ie, name: $e, nameLoc: Xe, value: st } = He;
8611      let Ge = !0;
8612      if ($e === "ref" && (ee = !0, je()), $e === "is" && (dv(m) || st && st.content.startsWith("vue:") || Wc(
8613        "COMPILER_IS_ON_ELEMENT",
8614        t
8615      )))
8616        continue;
8617      O.push(
8618        Qn(
8619          Er($e, !0, Xe),
8620          Er(
8621            st ? st.content : "",
8622            Ge,
8623            st ? st.loc : Ie
8624          )
8625        )
8626      );
8627    } else {
8628      const { name: Ie, arg: $e, exp: Xe, loc: st, modifiers: Ge } = He, ct = Ie === "bind", ot = Ie === "on";
8629      if (Ie === "slot") {
8630        l || t.onError(
8631          Ln(40, st)
8632        );
8633        continue;
8634      }
8635      if (Ie === "once" || Ie === "memo" || Ie === "is" || ct && $c($e, "is") && (dv(m) || Wc(
8636        "COMPILER_IS_ON_ELEMENT",
8637        t
8638      )) || ot && g)
8639        continue;
8640      if (
8641        // #938: elements with dynamic keys should be forced into blocks
8642        (ct && $c($e, "key") || // inline before-update hooks need to force block so that it is invoked
8643        // before children
8644        ot && z && $c($e, "vue:before-update")) && (J = !0), ct && $c($e, "ref") && je(), !$e && (ct || ot)
8645      ) {
8646        if (X = !0, Xe)
8647          if (ct) {
8648            if (je(), Se(), Wc(
8649              "COMPILER_V_BIND_OBJECT_ORDER",
8650              t
8651            )) {
8652              P.unshift(Xe);
8653              continue;
8654            }
8655            P.push(Xe);
8656          } else
8657            Se({
8658              type: 14,
8659              loc: st,
8660              callee: t.helper(ux),
8661              arguments: l ? [Xe] : [Xe, "true"]
8662            });
8663        else
8664          t.onError(
8665            Ln(
8666              ct ? 34 : 35,
8667              st
8668            )
8669          );
8670        continue;
8671      }
8672      ct && Ge.includes("prop") && (K |= 32);
8673      const Ht = t.directiveTransforms[Ie];
8674      if (Ht) {
8675        const { props: fr, needRuntime: Qt } = Ht(He, e, t);
8676        !g && fr.forEach(Ne), ot && $e && !Ps($e) ? Se(wo(fr, c)) : O.push(...fr), Qt && (R.push(He), Eo(Qt) && NC.set(He, Qt));
8677      } else _D(Ie) || (R.push(He), z && (J = !0));
8678    }
8679  }
8680  let Oe;
8681  if (P.length ? (Se(), P.length > 1 ? Oe = ui(
8682    t.helper(bm),
8683    P,
8684    c
8685  ) : Oe = P[0]) : O.length && (Oe = wo(
8686    jw(O),
8687    c
8688  )), X ? K |= 16 : (ue && !l && (K |= 2), Ce && !l && (K |= 4), Ae.length && (K |= 8), ge && (K |= 32)), !J && (K === 0 || K === 32) && (ee || ye || R.length > 0) && (K |= 512), !t.inSSR && Oe)
8689    switch (Oe.type) {
8690      case 15:
8691        let ze = -1, He = -1, Ie = !1;
8692        for (let st = 0; st < Oe.properties.length; st++) {
8693          const Ge = Oe.properties[st].key;
8694          Ps(Ge) ? Ge.content === "class" ? ze = st : Ge.content === "style" && (He = st) : Ge.isHandlerKey || (Ie = !0);
8695        }
8696        const $e = Oe.properties[ze], Xe = Oe.properties[He];
8697        Ie ? Oe = ui(
8698          t.helper(id),
8699          [Oe]
8700        ) : ($e && !Ps($e.value) && ($e.value = ui(
8701          t.helper(lx),
8702          [$e.value]
8703        )), Xe && // the static style is compiled into an object,
8704        // so use `hasStyleBinding` to ensure that it is a dynamic style binding
8705        (Ce || Xe.value.type === 4 && Xe.value.content.trim()[0] === "[" || // v-bind:style and style both exist,
8706        // v-bind:style with static literal object
8707        Xe.value.type === 17) && (Xe.value = ui(
8708          t.helper(cx),
8709          [Xe.value]
8710        )));
8711        break;
8712      case 14:
8713        break;
8714      default:
8715        Oe = ui(
8716          t.helper(id),
8717          [
8718            ui(t.helper(Ed), [
8719              Oe
8720            ])
8721          ]
8722        );
8723        break;
8724    }
8725  return {
8726    props: Oe,
8727    directives: R,
8728    patchFlag: K,
8729    dynamicPropNames: Ae,
8730    shouldUseBlock: J
8731  };
8732}
8733function jw(e) {
8734  const t = /* @__PURE__ */ new Map(), s = [];
8735  for (let l = 0; l < e.length; l++) {
8736    const h = e[l];
8737    if (h.key.type === 8 || !h.key.isStatic) {
8738      s.push(h);
8739      continue;
8740    }
8741    const g = h.key.content, m = t.get(g);
8742    m ? (g === "style" || g === "class" || su(g)) && WF(m, h) : (t.set(g, h), s.push(h));
8743  }
8744  return s;
8745}
8746function WF(e, t) {
8747  e.value.type === 17 ? e.value.elements.push(t.value) : e.value = Ad(
8748    [e.value, t.value],
8749    e.loc
8750  );
8751}
8752function KF(e, t) {
8753  const s = [], l = NC.get(e);
8754  l ? s.push(t.helperString(l)) : (t.helper(ix), t.directives.add(e.name), s.push(ad(e.name, "directive")));
8755  const { loc: h } = e;
8756  if (e.exp && s.push(e.exp), e.arg && (e.exp || s.push("void 0"), s.push(e.arg)), Object.keys(e.modifiers).length) {
8757    e.arg || (e.exp || s.push("void 0"), s.push("void 0"));
8758    const g = Er("true", !1, h);
8759    s.push(
8760      wo(
8761        e.modifiers.map(
8762          (m) => Qn(m, g)
8763        ),
8764        h
8765      )
8766    );
8767  }
8768  return Ad(s, e.loc);
8769}
8770function XF(e) {
8771  let t = "[";
8772  for (let s = 0, l = e.length; s < l; s++)
8773    t += JSON.stringify(e[s]), s < l - 1 && (t += ", ");
8774  return t + "]";
8775}
8776function dv(e) {
8777  return e === "component" || e === "Component";
8778}
8779const JF = (e, t) => {
8780  if (Tm(e)) {
8781    const { children: s, loc: l } = e, { slotName: h, slotProps: g } = YF(e, t), m = [
8782      t.prefixIdentifiers ? "_ctx.$slots" : "$slots",
8783      h,
8784      "{}",
8785      "undefined",
8786      "true"
8787    ];
8788    let c = 2;
8789    g && (m[2] = g, c = 3), s.length && (m[3] = mh([], s, !1, !1, l), c = 4), t.scopeId && !t.slotted && (c = 5), m.splice(c), e.codegenNode = ui(
8790      t.helper(gC),
8791      m,
8792      l
8793    );
8794  }
8795};
8796function YF(e, t) {
8797  let s = '"default"', l;
8798  const h = [];
8799  for (let g = 0; g < e.props.length; g++) {
8800    const m = e.props[g];
8801    if (m.type === 6)
8802      m.value && (m.name === "name" ? s = JSON.stringify(m.value.content) : (m.name = Fn(m.name), h.push(m)));
8803    else if (m.name === "bind" && $c(m.arg, "name")) {
8804      if (m.exp)
8805        s = m.exp;
8806      else if (m.arg && m.arg.type === 4) {
8807        const c = Fn(m.arg.content);
8808        s = m.exp = Er(c, !1, m.arg.loc);
8809      }
8810    } else
8811      m.name === "bind" && m.arg && Ps(m.arg) && (m.arg.content = Fn(m.arg.content)), h.push(m);
8812  }
8813  if (h.length > 0) {
8814    const { props: g, directives: m } = $C(
8815      e,
8816      t,
8817      h,
8818      !1,
8819      !1
8820    );
8821    l = g, m.length && t.onError(
8822      Ln(
8823        36,
8824        m[0].loc
8825      )
8826    );
8827  }
8828  return {
8829    slotName: s,
8830    slotProps: l
8831  };
8832}
8833const QF = /^\s*(async\s*)?(\([^)]*?\)|[\w$_]+)\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/, jC = (e, t, s, l) => {
8834  const { loc: h, modifiers: g, arg: m } = e;
8835  !e.exp && !g.length && s.onError(Ln(35, h));
8836  let c;
8837  if (m.type === 4)
8838    if (m.isStatic) {
8839      let R = m.content;
8840      R.startsWith("vue:") && (R = `vnode-${R.slice(4)}`);
8841      const z = t.tagType !== 0 || R.startsWith("vnode") || !/[A-Z]/.test(R) ? (
8842        // for non-element and vnode lifecycle event listeners, auto convert
8843        // it to camelCase. See issue #2249
8844        Uc(Fn(R))
8845      ) : (
8846        // preserve case for plain element listeners that have uppercase
8847        // letters, as these may be custom elements' custom events
8848        `on:${R}`
8849      );
8850      c = Er(z, !0, m.loc);
8851    } else
8852      c = jo([
8853        `${s.helperString(lv)}(`,
8854        m,
8855        ")"
8856      ]);
8857  else
8858    c = m, c.children.unshift(`${s.helperString(lv)}(`), c.children.push(")");
8859  let w = e.exp;
8860  w && !w.content.trim() && (w = void 0);
8861  let O = s.cacheHandlers && !w && !s.inVOnce;
8862  if (w) {
8863    const R = xC(w.content), z = !(R || QF.test(w.content)), J = w.content.includes(";");
8864    (z || O && R) && (w = jo([
8865      `${z ? "$event" : "(...args)"} => ${J ? "{" : "("}`,
8866      w,
8867      J ? "}" : ")"
8868    ]));
8869  }
8870  let P = {
8871    props: [
8872      Qn(
8873        c,
8874        w || Er("() => {}", !1, h)
8875      )
8876    ]
8877  };
8878  return l && (P = l(P)), O && (P.props[0].value = s.cache(P.props[0].value)), P.props.forEach((R) => R.key.isHandlerKey = !0), P;
8879}, ez = (e, t) => {
8880  if (e.type === 0 || e.type === 1 || e.type === 11 || e.type === 10)
8881    return () => {
8882      const s = e.children;
8883      let l, h = !1;
8884      for (let g = 0; g < s.length; g++) {
8885        const m = s[g];
8886        if (t_(m)) {
8887          h = !0;
8888          for (let c = g + 1; c < s.length; c++) {
8889            const w = s[c];
8890            if (t_(w))
8891              l || (l = s[g] = jo(
8892                [m],
8893                m.loc
8894              )), l.children.push(" + ", w), s.splice(c, 1), c--;
8895            else {
8896              l = void 0;
8897              break;
8898            }
8899          }
8900        }
8901      }
8902      if (!(!h || // if this is a plain element with a single text child, leave it
8903      // as-is since the runtime has dedicated fast path for this by directly
8904      // setting textContent of the element.
8905      // for component root it's always normalized anyway.
8906      s.length === 1 && (e.type === 0 || e.type === 1 && e.tagType === 0 && // #3756
8907      // custom directives can potentially add DOM elements arbitrarily,
8908      // we need to avoid setting textContent of the element at runtime
8909      // to avoid accidentally overwriting the DOM elements added
8910      // by the user through custom directives.
8911      !e.props.find(
8912        (g) => g.type === 7 && !t.directiveTransforms[g.name]
8913      ) && e.tag !== "template")))
8914        for (let g = 0; g < s.length; g++) {
8915          const m = s[g];
8916          if (t_(m) || m.type === 8) {
8917            const c = [];
8918            (m.type !== 2 || m.content !== " ") && c.push(m), !t.ssr && So(m, t) === 0 && c.push(
8919              "1"
8920            ), s[g] = {
8921              type: 12,
8922              content: m,
8923              loc: m.loc,
8924              codegenNode: ui(
8925                t.helper(tx),
8926                c
8927              )
8928            };
8929          }
8930        }
8931    };
8932}, Vw = /* @__PURE__ */ new WeakSet(), tz = (e, t) => {
8933  if (e.type === 1 && Bo(e, "once", !0))
8934    return Vw.has(e) || t.inVOnce || t.inSSR ? void 0 : (Vw.add(e), t.inVOnce = !0, t.helper(xm), () => {
8935      t.inVOnce = !1;
8936      const s = t.currentNode;
8937      s.codegenNode && (s.codegenNode = t.cache(
8938        s.codegenNode,
8939        !0
8940        /* isVNode */
8941      ));
8942    });
8943}, VC = (e, t, s) => {
8944  const { exp: l, arg: h } = e;
8945  if (!l)
8946    return s.onError(
8947      Ln(41, e.loc)
8948    ), Dp();
8949  const g = l.loc.source, m = l.type === 4 ? l.content : g, c = s.bindingMetadata[g];
8950  if (c === "props" || c === "props-aliased")
8951    return s.onError(Ln(44, l.loc)), Dp();
8952  if (!m.trim() || !xC(m))
8953    return s.onError(
8954      Ln(42, l.loc)
8955    ), Dp();
8956  const w = h || Er("modelValue", !0), O = h ? Ps(h) ? `onUpdate:${Fn(h.content)}` : jo(['"onUpdate:" + ', h]) : "onUpdate:modelValue";
8957  let P;
8958  const R = s.isTS ? "($event: any)" : "$event";
8959  P = jo([
8960    `${R} => ((`,
8961    l,
8962    ") = $event)"
8963  ]);
8964  const z = [
8965    // modelValue: foo
8966    Qn(w, e.exp),
8967    // "onUpdate:modelValue": $event => (foo = $event)
8968    Qn(O, P)
8969  ];
8970  if (e.modifiers.length && t.tagType === 1) {
8971    const J = e.modifiers.map((ee) => (mx(ee) ? ee : JSON.stringify(ee)) + ": true").join(", "), K = h ? Ps(h) ? `${h.content}Modifiers` : jo([h, ' + "Modifiers"']) : "modelModifiers";
8972    z.push(
8973      Qn(
8974        K,
8975        Er(
8976          `{ ${J} }`,
8977          !1,
8978          e.loc,
8979          2
8980        )
8981      )
8982    );
8983  }
8984  return Dp(z);
8985};
8986function Dp(e = []) {
8987  return { props: e };
8988}
8989const rz = /[\w).+\-_$\]]/, nz = (e, t) => {
8990  Wc("COMPILER_FILTERS", t) && (e.type === 5 && Cm(e.content, t), e.type === 1 && e.props.forEach((s) => {
8991    s.type === 7 && s.name !== "for" && s.exp && Cm(s.exp, t);
8992  }));
8993};
8994function Cm(e, t) {
8995  if (e.type === 4)
8996    Uw(e, t);
8997  else
8998    for (let s = 0; s < e.children.length; s++) {
8999      const l = e.children[s];
9000      typeof l == "object" && (l.type === 4 ? Uw(l, t) : l.type === 8 ? Cm(e, t) : l.type === 5 && Cm(l.content, t));
9001    }
9002}
9003function Uw(e, t) {
9004  const s = e.content;
9005  let l = !1, h = !1, g = !1, m = !1, c = 0, w = 0, O = 0, P = 0, R, z, J, K, ee = [];
9006  for (J = 0; J < s.length; J++)
9007    if (z = R, R = s.charCodeAt(J), l)
9008      R === 39 && z !== 92 && (l = !1);
9009    else if (h)
9010      R === 34 && z !== 92 && (h = !1);
9011    else if (g)
9012      R === 96 && z !== 92 && (g = !1);
9013    else if (m)
9014      R === 47 && z !== 92 && (m = !1);
9015    else if (R === 124 && // pipe
9016    s.charCodeAt(J + 1) !== 124 && s.charCodeAt(J - 1) !== 124 && !c && !w && !O)
9017      K === void 0 ? (P = J + 1, K = s.slice(0, J).trim()) : ue();
9018    else {
9019      switch (R) {
9020        case 34:
9021          h = !0;
9022          break;
9023        case 39:
9024          l = !0;
9025          break;
9026        case 96:
9027          g = !0;
9028          break;
9029        case 40:
9030          O++;
9031          break;
9032        case 41:
9033          O--;
9034          break;
9035        case 91:
9036          w++;
9037          break;
9038        case 93:
9039          w--;
9040          break;
9041        case 123:
9042          c++;
9043          break;
9044        case 125:
9045          c--;
9046          break;
9047      }
9048      if (R === 47) {
9049        let Ce = J - 1, ge;
9050        for (; Ce >= 0 && (ge = s.charAt(Ce), ge === " "); Ce--)
9051          ;
9052        (!ge || !rz.test(ge)) && (m = !0);
9053      }
9054    }
9055  K === void 0 ? K = s.slice(0, J).trim() : P !== 0 && ue();
9056  function ue() {
9057    ee.push(s.slice(P, J).trim()), P = J + 1;
9058  }
9059  if (ee.length) {
9060    for (J = 0; J < ee.length; J++)
9061      K = iz(K, ee[J], t);
9062    e.content = K, e.ast = void 0;
9063  }
9064}
9065function iz(e, t, s) {
9066  s.helper(sx);
9067  const l = t.indexOf("(");
9068  if (l < 0)
9069    return s.filters.add(t), `${ad(t, "filter")}(${e})`;
9070  {
9071    const h = t.slice(0, l), g = t.slice(l + 1);
9072    return s.filters.add(h), `${ad(h, "filter")}(${e}${g !== ")" ? "," + g : g}`;
9073  }
9074}
9075const qw = /* @__PURE__ */ new WeakSet(), sz = (e, t) => {
9076  if (e.type === 1) {
9077    const s = Bo(e, "memo");
9078    return !s || qw.has(e) ? void 0 : (qw.add(e), () => {
9079      const l = e.codegenNode || t.currentNode.codegenNode;
9080      l && l.type === 13 && (e.tagType !== 1 && dx(l, t), e.codegenNode = ui(t.helper(fx), [
9081        s.exp,
9082        mh(void 0, l),
9083        "_cache",
9084        String(t.cached++)
9085      ]));
9086    });
9087  }
9088};
9089function oz(e) {
9090  return [
9091    [
9092      tz,
9093      FF,
9094      sz,
9095      $F,
9096      nz,
9097      JF,
9098      GF,
9099      UF,
9100      ez
9101    ],
9102    {
9103      on: jC,
9104      bind: NF,
9105      model: VC
9106    }
9107  ];
9108}
9109function az(e, t = {}) {
9110  const s = t.onError || px, l = t.mode === "module";
9111  t.prefixIdentifiers === !0 ? s(Ln(47)) : l && s(Ln(48));
9112  const h = !1;
9113  t.cacheHandlers && s(Ln(49)), t.scopeId && !l && s(Ln(50));
9114  const g = Hr({}, t, {
9115    prefixIdentifiers: h
9116  }), m = vr(e) ? dF(e, g) : e, [c, w] = oz();
9117  return yF(
9118    m,
9119    Hr({}, g, {
9120      nodeTransforms: [
9121        ...c,
9122        ...t.nodeTransforms || []
9123        // user transforms
9124      ],
9125      directiveTransforms: Hr(
9126        {},
9127        w,
9128        t.directiveTransforms || {}
9129        // user transforms
9130      )
9131    })
9132  ), xF(m, g);
9133}
9134const lz = () => ({ props: [] });
9135/**
9136* @vue/compiler-dom v3.4.29
9137* (c) 2018-present Yuxi (Evan) You and Vue contributors
9138* @license MIT
9139**/
9140const UC = Symbol(""), qC = Symbol(""), HC = Symbol(""), GC = Symbol(""), pv = Symbol(""), ZC = Symbol(""), WC = Symbol(""), KC = Symbol(""), XC = Symbol(""), JC = Symbol("");
9141jL({
9142  [UC]: "vModelRadio",
9143  [qC]: "vModelCheckbox",
9144  [HC]: "vModelText",
9145  [GC]: "vModelSelect",
9146  [pv]: "vModelDynamic",
9147  [ZC]: "withModifiers",
9148  [WC]: "withKeys",
9149  [KC]: "vShow",
9150  [XC]: "Transition",
9151  [JC]: "TransitionGroup"
9152});
9153let Hu;
9154function cz(e, t = !1) {
9155  return Hu || (Hu = document.createElement("div")), t ? (Hu.innerHTML = `<div foo="${e.replace(/"/g, "&quot;")}">`, Hu.children[0].getAttribute("foo")) : (Hu.innerHTML = e, Hu.textContent);
9156}
9157const uz = {
9158  parseMode: "html",
9159  isVoidTag: DD,
9160  isNativeTag: (e) => MD(e) || kD(e) || OD(e),
9161  isPreTag: (e) => e === "pre",
9162  decodeEntities: cz,
9163  isBuiltInComponent: (e) => {
9164    if (e === "Transition" || e === "transition")
9165      return XC;
9166    if (e === "TransitionGroup" || e === "transition-group")
9167      return JC;
9168  },
9169  // https://html.spec.whatwg.org/multipage/parsing.html#tree-construction-dispatcher
9170  getNamespace(e, t, s) {
9171    let l = t ? t.ns : s;
9172    if (t && l === 2)
9173      if (t.tag === "annotation-xml") {
9174        if (e === "svg")
9175          return 1;
9176        t.props.some(
9177          (h) => h.type === 6 && h.name === "encoding" && h.value != null && (h.value.content === "text/html" || h.value.content === "application/xhtml+xml")
9178        ) && (l = 0);
9179      } else /^m(?:[ions]|text)$/.test(t.tag) && e !== "mglyph" && e !== "malignmark" && (l = 0);
9180    else t && l === 1 && (t.tag === "foreignObject" || t.tag === "desc" || t.tag === "title") && (l = 0);
9181    if (l === 0) {
9182      if (e === "svg")
9183        return 1;
9184      if (e === "math")
9185        return 2;
9186    }
9187    return l;
9188  }
9189}, hz = (e) => {
9190  e.type === 1 && e.props.forEach((t, s) => {
9191    t.type === 6 && t.name === "style" && t.value && (e.props[s] = {
9192      type: 7,
9193      name: "bind",
9194      arg: Er("style", !0, t.loc),
9195      exp: fz(t.value.content, t.loc),
9196      modifiers: [],
9197      loc: t.loc
9198    });
9199  });
9200}, fz = (e, t) => {
9201  const s = DE(e);
9202  return Er(
9203    JSON.stringify(s),
9204    !1,
9205    t,
9206    3
9207  );
9208};
9209function ec(e, t) {
9210  return Ln(
9211    e,
9212    t
9213  );
9214}
9215const dz = (e, t, s) => {
9216  const { exp: l, loc: h } = e;
9217  return l || s.onError(
9218    ec(53, h)
9219  ), t.children.length && (s.onError(
9220    ec(54, h)
9221  ), t.children.length = 0), {
9222    props: [
9223      Qn(
9224        Er("innerHTML", !0, h),
9225        l || Er("", !0)
9226      )
9227    ]
9228  };
9229}, pz = (e, t, s) => {
9230  const { exp: l, loc: h } = e;
9231  return l || s.onError(
9232    ec(55, h)
9233  ), t.children.length && (s.onError(
9234    ec(56, h)
9235  ), t.children.length = 0), {
9236    props: [
9237      Qn(
9238        Er("textContent", !0),
9239        l ? So(l, s) > 0 ? l : ui(
9240          s.helperString(vg),
9241          [l],
9242          h
9243        ) : Er("", !0)
9244      )
9245    ]
9246  };
9247}, mz = (e, t, s) => {
9248  const l = VC(e, t, s);
9249  if (!l.props.length || t.tagType === 1)
9250    return l;
9251  e.arg && s.onError(
9252    ec(
9253      58,
9254      e.arg.loc
9255    )
9256  );
9257  const { tag: h } = t, g = s.isCustomElement(h);
9258  if (h === "input" || h === "textarea" || h === "select" || g) {
9259    let m = HC, c = !1;
9260    if (h === "input" || g) {
9261      const w = bg(t, "type");
9262      if (w) {
9263        if (w.type === 7)
9264          m = pv;
9265        else if (w.value)
9266          switch (w.value.content) {
9267            case "radio":
9268              m = UC;
9269              break;
9270            case "checkbox":
9271              m = qC;
9272              break;
9273            case "file":
9274              c = !0, s.onError(
9275                ec(
9276                  59,
9277                  e.loc
9278                )
9279              );
9280              break;
9281          }
9282      } else JL(t) && (m = pv);
9283    } else h === "select" && (m = GC);
9284    c || (l.needRuntime = s.helper(m));
9285  } else
9286    s.onError(
9287      ec(
9288        57,
9289        e.loc
9290      )
9291    );
9292  return l.props = l.props.filter(
9293    (m) => !(m.key.type === 4 && m.key.content === "modelValue")
9294  ), l;
9295}, gz = /* @__PURE__ */ ro("passive,once,capture"), yz = /* @__PURE__ */ ro(
9296  // event propagation management
9297  "stop,prevent,self,ctrl,shift,alt,meta,exact,middle"
9298), _z = /* @__PURE__ */ ro("left,right"), YC = /* @__PURE__ */ ro(
9299  "onkeyup,onkeydown,onkeypress",
9300  !0
9301), vz = (e, t, s, l) => {
9302  const h = [], g = [], m = [];
9303  for (let c = 0; c < t.length; c++) {
9304    const w = t[c];
9305    w === "native" && od(
9306      "COMPILER_V_ON_NATIVE",
9307      s
9308    ) || gz(w) ? m.push(w) : _z(w) ? Ps(e) ? YC(e.content) ? h.push(w) : g.push(w) : (h.push(w), g.push(w)) : yz(w) ? g.push(w) : h.push(w);
9309  }
9310  return {
9311    keyModifiers: h,
9312    nonKeyModifiers: g,
9313    eventOptionModifiers: m
9314  };
9315}, Hw = (e, t) => Ps(e) && e.content.toLowerCase() === "onclick" ? Er(t, !0) : e.type !== 4 ? jo([
9316  "(",
9317  e,
9318  `) === "onClick" ? "${t}" : (`,
9319  e,
9320  ")"
9321]) : e, bz = (e, t, s) => jC(e, t, s, (l) => {
9322  const { modifiers: h } = e;
9323  if (!h.length) return l;
9324  let { key: g, value: m } = l.props[0];
9325  const { keyModifiers: c, nonKeyModifiers: w, eventOptionModifiers: O } = vz(g, h, s, e.loc);
9326  if (w.includes("right") && (g = Hw(g, "onContextmenu")), w.includes("middle") && (g = Hw(g, "onMouseup")), w.length && (m = ui(s.helper(ZC), [
9327    m,
9328    JSON.stringify(w)
9329  ])), c.length && // if event name is dynamic, always wrap with keys guard
9330  (!Ps(g) || YC(g.content)) && (m = ui(s.helper(WC), [
9331    m,
9332    JSON.stringify(c)
9333  ])), O.length) {
9334    const P = O.map(ic).join("");
9335    g = Ps(g) ? Er(`${g.content}${P}`, !0) : jo(["(", g, `) + "${P}"`]);
9336  }
9337  return {
9338    props: [Qn(g, m)]
9339  };
9340}), xz = (e, t, s) => {
9341  const { exp: l, loc: h } = e;
9342  return l || s.onError(
9343    ec(61, h)
9344  ), {
9345    props: [],
9346    needRuntime: s.helper(KC)
9347  };
9348}, wz = (e, t) => {
9349  e.type === 1 && e.tagType === 0 && (e.tag === "script" || e.tag === "style") && t.removeNode();
9350}, Sz = [
9351  hz
9352], Tz = {
9353  cloak: lz,
9354  html: dz,
9355  text: pz,
9356  model: mz,
9357  // override compiler-core
9358  on: bz,
9359  // override compiler-core
9360  show: xz
9361};
9362function Ez(e, t = {}) {
9363  return az(
9364    e,
9365    Hr({}, uz, t, {
9366      nodeTransforms: [
9367        // ignore <script> and <tag>
9368        // this is not put inside DOMNodeTransforms because that list is used
9369        // by compiler-ssr to generate vnode fallback branches
9370        wz,
9371        ...Sz,
9372        ...t.nodeTransforms || []
9373      ],
9374      directiveTransforms: Hr(
9375        {},
9376        Tz,
9377        t.directiveTransforms || {}
9378      ),
9379      transformHoist: null
9380    })
9381  );
9382}
9383/**
9384* vue v3.4.29
9385* (c) 2018-present Yuxi (Evan) You and Vue contributors
9386* @license MIT
9387**/
9388const Gw = /* @__PURE__ */ new WeakMap();
9389function Az(e) {
9390  let t = Gw.get(e ?? Kr);
9391  return t || (t = /* @__PURE__ */ Object.create(null), Gw.set(e ?? Kr, t)), t;
9392}
9393function QC(e, t) {
9394  if (!vr(e))
9395    if (e.nodeType)
9396      e = e.innerHTML;
9397    else
9398      return di;
9399  const s = e, l = Az(t), h = l[s];
9400  if (h)
9401    return h;
9402  if (e[0] === "#") {
9403    const w = document.querySelector(e);
9404    e = w ? w.innerHTML : "";
9405  }
9406  const g = Hr(
9407    {
9408      hoistStatic: !0,
9409      onError: void 0,
9410      onWarn: di
9411    },
9412    t
9413  );
9414  !g.isCustomElement && typeof customElements < "u" && (g.isCustomElement = (w) => !!customElements.get(w));
9415  const { code: m } = Ez(e, g), c = new Function("Vue", m)(LL);
9416  return c._rc = !0, l[s] = c;
9417}
9418Ub(QC);
9419const Cz = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9420  __proto__: null,
9421  BaseTransition: Nb,
9422  BaseTransitionPropsValidators: hg,
9423  Comment: hi,
9424  DeprecationTypes: $A,
9425  EffectScope: Jm,
9426  ErrorCodes: d2,
9427  ErrorTypeStrings: RA,
9428  Fragment: Ci,
9429  KeepAlive: hA,
9430  ReactiveEffect: Jc,
9431  Static: Ql,
9432  Suspense: A2,
9433  Teleport: mA,
9434  Text: rc,
9435  TrackOpTypes: u2,
9436  Transition: gg,
9437  TransitionGroup: QA,
9438  TriggerOpTypes: h2,
9439  VueElement: Sd,
9440  assertNumber: f2,
9441  callWithAsyncErrorHandling: Ms,
9442  callWithErrorHandling: va,
9443  camelize: Fn,
9444  capitalize: ic,
9445  cloneVNode: qo,
9446  compatUtils: NA,
9447  compile: QC,
9448  computed: qb,
9449  createApp: aC,
9450  createBlock: fg,
9451  createCommentVNode: SA,
9452  createElementBlock: vA,
9453  createElementVNode: dg,
9454  createHydrationRenderer: kb,
9455  createPropsRestProxy: Z2,
9456  createRenderer: Mb,
9457  createSSRApp: lC,
9458  createSlots: M2,
9459  createStaticVNode: wA,
9460  createTextVNode: pg,
9461  createVNode: An,
9462  customRef: pb,
9463  defineAsyncComponent: k2,
9464  defineComponent: gd,
9465  defineCustomElement: Wb,
9466  defineEmits: F2,
9467  defineExpose: z2,
9468  defineModel: $2,
9469  defineOptions: B2,
9470  defineProps: L2,
9471  defineSSRCustomElement: WA,
9472  defineSlots: N2,
9473  devtools: LA,
9474  effect: VE,
9475  effectScope: BE,
9476  getCurrentInstance: ba,
9477  getCurrentScope: ob,
9478  getTransitionRawChildren: vd,
9479  guardReactiveProps: $b,
9480  h: mg,
9481  handleError: ac,
9482  hasInjectionContext: J2,
9483  hydrate: Jb,
9484  initCustomFormatter: kA,
9485  initDirectivesForSSR: hC,
9486  inject: ch,
9487  isMemoSame: Hb,
9488  isProxy: rg,
9489  isReactive: Gc,
9490  isReadonly: Yc,
9491  isRef: Ii,
9492  isRuntimeOnly: CA,
9493  isShallow: hh,
9494  isVNode: sl,
9495  markRaw: hb,
9496  mergeDefaults: H2,
9497  mergeModels: G2,
9498  mergeProps: Vb,
9499  nextTick: fd,
9500  normalizeClass: Eh,
9501  normalizeProps: RE,
9502  normalizeStyle: Th,
9503  onActivated: zb,
9504  onBeforeMount: xb,
9505  onBeforeUnmount: pd,
9506  onBeforeUpdate: wb,
9507  onDeactivated: Bb,
9508  onErrorCaptured: Ab,
9509  onMounted: Ah,
9510  onRenderTracked: Eb,
9511  onRenderTriggered: Tb,
9512  onScopeDispose: $E,
9513  onServerPrefetch: Sb,
9514  onUnmounted: md,
9515  onUpdated: dd,
9516  openBlock: bd,
9517  popScopeId: b2,
9518  provide: Ib,
9519  proxyRefs: ig,
9520  pushScopeId: v2,
9521  queuePostFlushCb: Jf,
9522  reactive: au,
9523  readonly: eg,
9524  ref: sh,
9525  registerRuntimeCompiler: Ub,
9526  render: _m,
9527  renderList: P2,
9528  renderSlot: O2,
9529  resolveComponent: w2,
9530  resolveDirective: E2,
9531  resolveDynamicComponent: T2,
9532  resolveFilter: BA,
9533  resolveTransitionHooks: Qc,
9534  setBlockTracking: dm,
9535  setDevtoolsHook: FA,
9536  setTransitionHooks: il,
9537  shallowReactive: ub,
9538  shallowReadonly: r2,
9539  shallowRef: i2,
9540  ssrContextKey: Db,
9541  ssrUtils: zA,
9542  stop: UE,
9543  toDisplayString: FE,
9544  toHandlerKey: Uc,
9545  toHandlers: R2,
9546  toRaw: Nr,
9547  toRef: l2,
9548  toRefs: mb,
9549  toValue: a2,
9550  transformVNodeArgs: bA,
9551  triggerRef: o2,
9552  unref: ng,
9553  useAttrs: U2,
9554  useCssModule: KA,
9555  useCssVars: ZA,
9556  useModel: MA,
9557  useSSRContext: Rb,
9558  useSlots: V2,
9559  useTransitionState: ug,
9560  vModelCheckbox: yg,
9561  vModelDynamic: Xb,
9562  vModelRadio: _g,
9563  vModelSelect: Kb,
9564  vModelText: rd,
9565  vShow: Zb,
9566  version: Gb,
9567  warn: DA,
9568  watch: tl,
9569  watchEffect: cA,
9570  watchPostEffect: Lb,
9571  watchSyncEffect: Fb,
9572  withAsyncContext: W2,
9573  withCtx: lg,
9574  withDefaults: j2,
9575  withDirectives: I2,
9576  withKeys: nC,
9577  withMemo: OA,
9578  withModifiers: rC,
9579  withScopeId: x2
9580}, Symbol.toStringTag, { value: "Module" }));
9581function Iz() {
9582  return eI().__VUE_DEVTOOLS_GLOBAL_HOOK__;
9583}
9584function eI() {
9585  return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
9586}
9587const Pz = typeof Proxy == "function", Mz = "devtools-plugin:setup", kz = "plugin:settings:set";
9588let Gu, mv;
9589function Oz() {
9590  var e;
9591  return Gu !== void 0 || (typeof window < "u" && window.performance ? (Gu = !0, mv = window.performance) : typeof globalThis < "u" && (!((e = globalThis.perf_hooks) === null || e === void 0) && e.performance) ? (Gu = !0, mv = globalThis.perf_hooks.performance) : Gu = !1), Gu;
9592}
9593function Dz() {
9594  return Oz() ? mv.now() : Date.now();
9595}
9596class Rz {
9597  constructor(t, s) {
9598    this.target = null, this.targetQueue = [], this.onQueue = [], this.plugin = t, this.hook = s;
9599    const l = {};
9600    if (t.settings)
9601      for (const m in t.settings) {
9602        const c = t.settings[m];
9603        l[m] = c.defaultValue;
9604      }
9605    const h = `__vue-devtools-plugin-settings__${t.id}`;
9606    let g = Object.assign({}, l);
9607    try {
9608      const m = localStorage.getItem(h), c = JSON.parse(m);
9609      Object.assign(g, c);
9610    } catch {
9611    }
9612    this.fallbacks = {
9613      getSettings() {
9614        return g;
9615      },
9616      setSettings(m) {
9617        try {
9618          localStorage.setItem(h, JSON.stringify(m));
9619        } catch {
9620        }
9621        g = m;
9622      },
9623      now() {
9624        return Dz();
9625      }
9626    }, s && s.on(kz, (m, c) => {
9627      m === this.plugin.id && this.fallbacks.setSettings(c);
9628    }), this.proxiedOn = new Proxy({}, {
9629      get: (m, c) => this.target ? this.target.on[c] : (...w) => {
9630        this.onQueue.push({
9631          method: c,
9632          args: w
9633        });
9634      }
9635    }), this.proxiedTarget = new Proxy({}, {
9636      get: (m, c) => this.target ? this.target[c] : c === "on" ? this.proxiedOn : Object.keys(this.fallbacks).includes(c) ? (...w) => (this.targetQueue.push({
9637        method: c,
9638        args: w,
9639        resolve: () => {
9640        }
9641      }), this.fallbacks[c](...w)) : (...w) => new Promise((O) => {
9642        this.targetQueue.push({
9643          method: c,
9644          args: w,
9645          resolve: O
9646        });
9647      })
9648    });
9649  }
9650  async setRealTarget(t) {
9651    this.target = t;
9652    for (const s of this.onQueue)
9653      this.target.on[s.method](...s.args);
9654    for (const s of this.targetQueue)
9655      s.resolve(await this.target[s.method](...s.args));
9656  }
9657}
9658function Lz(e, t) {
9659  const s = e, l = eI(), h = Iz(), g = Pz && s.enableEarlyProxy;
9660  if (h && (l.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__ || !g))
9661    h.emit(Mz, e, t);
9662  else {
9663    const m = g ? new Rz(s, h) : null;
9664    (l.__VUE_DEVTOOLS_PLUGINS__ = l.__VUE_DEVTOOLS_PLUGINS__ || []).push({
9665      pluginDescriptor: s,
9666      setupFn: t,
9667      proxy: m
9668    }), m && t(m.proxiedTarget);
9669  }
9670}
9671/*!
9672 * vuex v4.0.2
9673 * (c) 2021 Evan You
9674 * @license MIT
9675 */
9676var Fz = "store";
9677function Ch(e, t) {
9678  Object.keys(e).forEach(function(s) {
9679    return t(e[s], s);
9680  });
9681}
9682function tI(e) {
9683  return e !== null && typeof e == "object";
9684}
9685function zz(e) {
9686  return e && typeof e.then == "function";
9687}
9688function Bz(e, t) {
9689  return function() {
9690    return e(t);
9691  };
9692}
9693function rI(e, t, s) {
9694  return t.indexOf(e) < 0 && (s && s.prepend ? t.unshift(e) : t.push(e)), function() {
9695    var l = t.indexOf(e);
9696    l > -1 && t.splice(l, 1);
9697  };
9698}
9699function nI(e, t) {
9700  e._actions = /* @__PURE__ */ Object.create(null), e._mutations = /* @__PURE__ */ Object.create(null), e._wrappedGetters = /* @__PURE__ */ Object.create(null), e._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
9701  var s = e.state;
9702  Sg(e, s, [], e._modules.root, !0), yx(e, s, t);
9703}
9704function yx(e, t, s) {
9705  var l = e._state;
9706  e.getters = {}, e._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
9707  var h = e._wrappedGetters, g = {};
9708  Ch(h, function(m, c) {
9709    g[c] = Bz(m, e), Object.defineProperty(e.getters, c, {
9710      // TODO: use `computed` when it's possible. at the moment we can't due to
9711      // https://github.com/vuejs/vuex/pull/1883
9712      get: function() {
9713        return g[c]();
9714      },
9715      enumerable: !0
9716      // for local getters
9717    });
9718  }), e._state = au({
9719    data: t
9720  }), e.strict && Uz(e), l && s && e._withCommit(function() {
9721    l.data = null;
9722  });
9723}
9724function Sg(e, t, s, l, h) {
9725  var g = !s.length, m = e._modules.getNamespace(s);
9726  if (l.namespaced && (e._modulesNamespaceMap[m], e._modulesNamespaceMap[m] = l), !g && !h) {
9727    var c = _x(t, s.slice(0, -1)), w = s[s.length - 1];
9728    e._withCommit(function() {
9729      c[w] = l.state;
9730    });
9731  }
9732  var O = l.context = Nz(e, m, s);
9733  l.forEachMutation(function(P, R) {
9734    var z = m + R;
9735    $z(e, z, P, O);
9736  }), l.forEachAction(function(P, R) {
9737    var z = P.root ? R : m + R, J = P.handler || P;
9738    jz(e, z, J, O);
9739  }), l.forEachGetter(function(P, R) {
9740    var z = m + R;
9741    Vz(e, z, P, O);
9742  }), l.forEachChild(function(P, R) {
9743    Sg(e, t, s.concat(R), P, h);
9744  });
9745}
9746function Nz(e, t, s) {
9747  var l = t === "", h = {
9748    dispatch: l ? e.dispatch : function(g, m, c) {
9749      var w = Im(g, m, c), O = w.payload, P = w.options, R = w.type;
9750      return (!P || !P.root) && (R = t + R), e.dispatch(R, O);
9751    },
9752    commit: l ? e.commit : function(g, m, c) {
9753      var w = Im(g, m, c), O = w.payload, P = w.options, R = w.type;
9754      (!P || !P.root) && (R = t + R), e.commit(R, O, P);
9755    }
9756  };
9757  return Object.defineProperties(h, {
9758    getters: {
9759      get: l ? function() {
9760        return e.getters;
9761      } : function() {
9762        return iI(e, t);
9763      }
9764    },
9765    state: {
9766      get: function() {
9767        return _x(e.state, s);
9768      }
9769    }
9770  }), h;
9771}
9772function iI(e, t) {
9773  if (!e._makeLocalGettersCache[t]) {
9774    var s = {}, l = t.length;
9775    Object.keys(e.getters).forEach(function(h) {
9776      if (h.slice(0, l) === t) {
9777        var g = h.slice(l);
9778        Object.defineProperty(s, g, {
9779          get: function() {
9780            return e.getters[h];
9781          },
9782          enumerable: !0
9783        });
9784      }
9785    }), e._makeLocalGettersCache[t] = s;
9786  }
9787  return e._makeLocalGettersCache[t];
9788}
9789function $z(e, t, s, l) {
9790  var h = e._mutations[t] || (e._mutations[t] = []);
9791  h.push(function(m) {
9792    s.call(e, l.state, m);
9793  });
9794}
9795function jz(e, t, s, l) {
9796  var h = e._actions[t] || (e._actions[t] = []);
9797  h.push(function(m) {
9798    var c = s.call(e, {
9799      dispatch: l.dispatch,
9800      commit: l.commit,
9801      getters: l.getters,
9802      state: l.state,
9803      rootGetters: e.getters,
9804      rootState: e.state
9805    }, m);
9806    return zz(c) || (c = Promise.resolve(c)), e._devtoolHook ? c.catch(function(w) {
9807      throw e._devtoolHook.emit("vuex:error", w), w;
9808    }) : c;
9809  });
9810}
9811function Vz(e, t, s, l) {
9812  e._wrappedGetters[t] || (e._wrappedGetters[t] = function(g) {
9813    return s(
9814      l.state,
9815      // local state
9816      l.getters,
9817      // local getters
9818      g.state,
9819      // root state
9820      g.getters
9821      // root getters
9822    );
9823  });
9824}
9825function Uz(e) {
9826  tl(function() {
9827    return e._state.data;
9828  }, function() {
9829  }, { deep: !0, flush: "sync" });
9830}
9831function _x(e, t) {
9832  return t.reduce(function(s, l) {
9833    return s[l];
9834  }, e);
9835}
9836function Im(e, t, s) {
9837  return tI(e) && e.type && (s = t, t = e, e = e.type), { type: e, payload: t, options: s };
9838}
9839var qz = "vuex bindings", Zw = "vuex:mutations", n_ = "vuex:actions", Zu = "vuex", Hz = 0;
9840function Gz(e, t) {
9841  Lz(
9842    {
9843      id: "org.vuejs.vuex",
9844      app: e,
9845      label: "Vuex",
9846      homepage: "https://next.vuex.vuejs.org/",
9847      logo: "https://vuejs.org/images/icons/favicon-96x96.png",
9848      packageName: "vuex",
9849      componentStateTypes: [qz]
9850    },
9851    function(s) {
9852      s.addTimelineLayer({
9853        id: Zw,
9854        label: "Vuex Mutations",
9855        color: Ww
9856      }), s.addTimelineLayer({
9857        id: n_,
9858        label: "Vuex Actions",
9859        color: Ww
9860      }), s.addInspector({
9861        id: Zu,
9862        label: "Vuex",
9863        icon: "storage",
9864        treeFilterPlaceholder: "Filter stores..."
9865      }), s.on.getInspectorTree(function(l) {
9866        if (l.app === e && l.inspectorId === Zu)
9867          if (l.filter) {
9868            var h = [];
9869            lI(h, t._modules.root, l.filter, ""), l.rootNodes = h;
9870          } else
9871            l.rootNodes = [
9872              aI(t._modules.root, "")
9873            ];
9874      }), s.on.getInspectorState(function(l) {
9875        if (l.app === e && l.inspectorId === Zu) {
9876          var h = l.nodeId;
9877          iI(t, h), l.state = Kz(
9878            Jz(t._modules, h),
9879            h === "root" ? t.getters : t._makeLocalGettersCache,
9880            h
9881          );
9882        }
9883      }), s.on.editInspectorState(function(l) {
9884        if (l.app === e && l.inspectorId === Zu) {
9885          var h = l.nodeId, g = l.path;
9886          h !== "root" && (g = h.split("/").filter(Boolean).concat(g)), t._withCommit(function() {
9887            l.set(t._state.data, g, l.state.value);
9888          });
9889        }
9890      }), t.subscribe(function(l, h) {
9891        var g = {};
9892        l.payload && (g.payload = l.payload), g.state = h, s.notifyComponentUpdate(), s.sendInspectorTree(Zu), s.sendInspectorState(Zu), s.addTimelineEvent({
9893          layerId: Zw,
9894          event: {
9895            time: Date.now(),
9896            title: l.type,
9897            data: g
9898          }
9899        });
9900      }), t.subscribeAction({
9901        before: function(l, h) {
9902          var g = {};
9903          l.payload && (g.payload = l.payload), l._id = Hz++, l._time = Date.now(), g.state = h, s.addTimelineEvent({
9904            layerId: n_,
9905            event: {
9906              time: l._time,
9907              title: l.type,
9908              groupId: l._id,
9909              subtitle: "start",
9910              data: g
9911            }
9912          });
9913        },
9914        after: function(l, h) {
9915          var g = {}, m = Date.now() - l._time;
9916          g.duration = {
9917            _custom: {
9918              type: "duration",
9919              display: m + "ms",
9920              tooltip: "Action duration",
9921              value: m
9922            }
9923          }, l.payload && (g.payload = l.payload), g.state = h, s.addTimelineEvent({
9924            layerId: n_,
9925            event: {
9926              time: Date.now(),
9927              title: l.type,
9928              groupId: l._id,
9929              subtitle: "end",
9930              data: g
9931            }
9932          });
9933        }
9934      });
9935    }
9936  );
9937}
9938var Ww = 8702998, Zz = 6710886, Wz = 16777215, sI = {
9939  label: "namespaced",
9940  textColor: Wz,
9941  backgroundColor: Zz
9942};
9943function oI(e) {
9944  return e && e !== "root" ? e.split("/").slice(-2, -1)[0] : "Root";
9945}
9946function aI(e, t) {
9947  return {
9948    id: t || "root",
9949    // all modules end with a `/`, we want the last segment only
9950    // cart/ -> cart
9951    // nested/cart/ -> cart
9952    label: oI(t),
9953    tags: e.namespaced ? [sI] : [],
9954    children: Object.keys(e._children).map(
9955      function(s) {
9956        return aI(
9957          e._children[s],
9958          t + s + "/"
9959        );
9960      }
9961    )
9962  };
9963}
9964function lI(e, t, s, l) {
9965  l.includes(s) && e.push({
9966    id: l || "root",
9967    label: l.endsWith("/") ? l.slice(0, l.length - 1) : l || "Root",
9968    tags: t.namespaced ? [sI] : []
9969  }), Object.keys(t._children).forEach(function(h) {
9970    lI(e, t._children[h], s, l + h + "/");
9971  });
9972}
9973function Kz(e, t, s) {
9974  t = s === "root" ? t : t[s];
9975  var l = Object.keys(t), h = {
9976    state: Object.keys(e.state).map(function(m) {
9977      return {
9978        key: m,
9979        editable: !0,
9980        value: e.state[m]
9981      };
9982    })
9983  };
9984  if (l.length) {
9985    var g = Xz(t);
9986    h.getters = Object.keys(g).map(function(m) {
9987      return {
9988        key: m.endsWith("/") ? oI(m) : m,
9989        editable: !1,
9990        value: gv(function() {
9991          return g[m];
9992        })
9993      };
9994    });
9995  }
9996  return h;
9997}
9998function Xz(e) {
9999  var t = {};
10000  return Object.keys(e).forEach(function(s) {
10001    var l = s.split("/");
10002    if (l.length > 1) {
10003      var h = t, g = l.pop();
10004      l.forEach(function(m) {
10005        h[m] || (h[m] = {
10006          _custom: {
10007            value: {},
10008            display: m,
10009            tooltip: "Module",
10010            abstract: !0
10011          }
10012        }), h = h[m]._custom.value;
10013      }), h[g] = gv(function() {
10014        return e[s];
10015      });
10016    } else
10017      t[s] = gv(function() {
10018        return e[s];
10019      });
10020  }), t;
10021}
10022function Jz(e, t) {
10023  var s = t.split("/").filter(function(l) {
10024    return l;
10025  });
10026  return s.reduce(
10027    function(l, h, g) {
10028      var m = l[h];
10029      if (!m)
10030        throw new Error('Missing module "' + h + '" for path "' + t + '".');
10031      return g === s.length - 1 ? m : m._children;
10032    },
10033    t === "root" ? e : e.root._children
10034  );
10035}
10036function gv(e) {
10037  try {
10038    return e();
10039  } catch (t) {
10040    return t;
10041  }
10042}
10043var Go = function(t, s) {
10044  this.runtime = s, this._children = /* @__PURE__ */ Object.create(null), this._rawModule = t;
10045  var l = t.state;
10046  this.state = (typeof l == "function" ? l() : l) || {};
10047}, cI = { namespaced: { configurable: !0 } };
10048cI.namespaced.get = function() {
10049  return !!this._rawModule.namespaced;
10050};
10051Go.prototype.addChild = function(t, s) {
10052  this._children[t] = s;
10053};
10054Go.prototype.removeChild = function(t) {
10055  delete this._children[t];
10056};
10057Go.prototype.getChild = function(t) {
10058  return this._children[t];
10059};
10060Go.prototype.hasChild = function(t) {
10061  return t in this._children;
10062};
10063Go.prototype.update = function(t) {
10064  this._rawModule.namespaced = t.namespaced, t.actions && (this._rawModule.actions = t.actions), t.mutations && (this._rawModule.mutations = t.mutations), t.getters && (this._rawModule.getters = t.getters);
10065};
10066Go.prototype.forEachChild = function(t) {
10067  Ch(this._children, t);
10068};
10069Go.prototype.forEachGetter = function(t) {
10070  this._rawModule.getters && Ch(this._rawModule.getters, t);
10071};
10072Go.prototype.forEachAction = function(t) {
10073  this._rawModule.actions && Ch(this._rawModule.actions, t);
10074};
10075Go.prototype.forEachMutation = function(t) {
10076  this._rawModule.mutations && Ch(this._rawModule.mutations, t);
10077};
10078Object.defineProperties(Go.prototype, cI);
10079var lu = function(t) {
10080  this.register([], t, !1);
10081};
10082lu.prototype.get = function(t) {
10083  return t.reduce(function(s, l) {
10084    return s.getChild(l);
10085  }, this.root);
10086};
10087lu.prototype.getNamespace = function(t) {
10088  var s = this.root;
10089  return t.reduce(function(l, h) {
10090    return s = s.getChild(h), l + (s.namespaced ? h + "/" : "");
10091  }, "");
10092};
10093lu.prototype.update = function(t) {
10094  uI([], this.root, t);
10095};
10096lu.prototype.register = function(t, s, l) {
10097  var h = this;
10098  l === void 0 && (l = !0);
10099  var g = new Go(s, l);
10100  if (t.length === 0)
10101    this.root = g;
10102  else {
10103    var m = this.get(t.slice(0, -1));
10104    m.addChild(t[t.length - 1], g);
10105  }
10106  s.modules && Ch(s.modules, function(c, w) {
10107    h.register(t.concat(w), c, l);
10108  });
10109};
10110lu.prototype.unregister = function(t) {
10111  var s = this.get(t.slice(0, -1)), l = t[t.length - 1], h = s.getChild(l);
10112  h && h.runtime && s.removeChild(l);
10113};
10114lu.prototype.isRegistered = function(t) {
10115  var s = this.get(t.slice(0, -1)), l = t[t.length - 1];
10116  return s ? s.hasChild(l) : !1;
10117};
10118function uI(e, t, s) {
10119  if (t.update(s), s.modules)
10120    for (var l in s.modules) {
10121      if (!t.getChild(l))
10122        return;
10123      uI(
10124        e.concat(l),
10125        t.getChild(l),
10126        s.modules[l]
10127      );
10128    }
10129}
10130function YK(e) {
10131  return new Rs(e);
10132}
10133var Rs = function(t) {
10134  var s = this;
10135  t === void 0 && (t = {});
10136  var l = t.plugins;
10137  l === void 0 && (l = []);
10138  var h = t.strict;
10139  h === void 0 && (h = !1);
10140  var g = t.devtools;
10141  this._committing = !1, this._actions = /* @__PURE__ */ Object.create(null), this._actionSubscribers = [], this._mutations = /* @__PURE__ */ Object.create(null), this._wrappedGetters = /* @__PURE__ */ Object.create(null), this._modules = new lu(t), this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null), this._subscribers = [], this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null), this._devtools = g;
10142  var m = this, c = this, w = c.dispatch, O = c.commit;
10143  this.dispatch = function(z, J) {
10144    return w.call(m, z, J);
10145  }, this.commit = function(z, J, K) {
10146    return O.call(m, z, J, K);
10147  }, this.strict = h;
10148  var P = this._modules.root.state;
10149  Sg(this, P, [], this._modules.root), yx(this, P), l.forEach(function(R) {
10150    return R(s);
10151  });
10152}, vx = { state: { configurable: !0 } };
10153Rs.prototype.install = function(t, s) {
10154  t.provide(s || Fz, this), t.config.globalProperties.$store = this;
10155  var l = this._devtools !== void 0 ? this._devtools : !1;
10156  l && Gz(t, this);
10157};
10158vx.state.get = function() {
10159  return this._state.data;
10160};
10161vx.state.set = function(e) {
10162};
10163Rs.prototype.commit = function(t, s, l) {
10164  var h = this, g = Im(t, s, l), m = g.type, c = g.payload, w = { type: m, payload: c }, O = this._mutations[m];
10165  O && (this._withCommit(function() {
10166    O.forEach(function(R) {
10167      R(c);
10168    });
10169  }), this._subscribers.slice().forEach(function(P) {
10170    return P(w, h.state);
10171  }));
10172};
10173Rs.prototype.dispatch = function(t, s) {
10174  var l = this, h = Im(t, s), g = h.type, m = h.payload, c = { type: g, payload: m }, w = this._actions[g];
10175  if (w) {
10176    try {
10177      this._actionSubscribers.slice().filter(function(P) {
10178        return P.before;
10179      }
10179).forEach(function(P) {
10180        return P.before(c, l.state);
10181      });
10182    } catch {
10183    }
10184    var O = w.length > 1 ? Promise.all(w.map(function(P) {
10185      return P(m);
10186    })) : w[0](m);
10187    return new Promise(function(P, R) {
10188      O.then(function(z) {
10189        try {
10190          l._actionSubscribers.filter(function(J) {
10191            return J.after;
10192          }).forEach(function(J) {
10193            return J.after(c, l.state);
10194          });
10195        } catch {
10196        }
10197        P(z);
10198      }, function(z) {
10199        try {
10200          l._actionSubscribers.filter(function(J) {
10201            return J.error;
10202          }).forEach(function(J) {
10203            return J.error(c, l.state, z);
10204          });
10205        } catch {
10206        }
10207        R(z);
10208      });
10209    });
10210  }
10211};
10212Rs.prototype.subscribe = function(t, s) {
10213  return rI(t, this._subscribers, s);
10214};
10215Rs.prototype.subscribeAction = function(t, s) {
10216  var l = typeof t == "function" ? { before: t } : t;
10217  return rI(l, this._actionSubscribers, s);
10218};
10219Rs.prototype.watch = function(t, s, l) {
10220  var h = this;
10221  return tl(function() {
10222    return t(h.state, h.getters);
10223  }, s, Object.assign({}, l));
10224};
10225Rs.prototype.replaceState = function(t) {
10226  var s = this;
10227  this._withCommit(function() {
10228    s._state.data = t;
10229  });
10230};
10231Rs.prototype.registerModule = function(t, s, l) {
10232  l === void 0 && (l = {}), typeof t == "string" && (t = [t]), this._modules.register(t, s), Sg(this, this.state, t, this._modules.get(t), l.preserveState), yx(this, this.state);
10233};
10234Rs.prototype.unregisterModule = function(t) {
10235  var s = this;
10236  typeof t == "string" && (t = [t]), this._modules.unregister(t), this._withCommit(function() {
10237    var l = _x(s.state, t.slice(0, -1));
10238    delete l[t[t.length - 1]];
10239  }), nI(this);
10240};
10241Rs.prototype.hasModule = function(t) {
10242  return typeof t == "string" && (t = [t]), this._modules.isRegistered(t);
10243};
10244Rs.prototype.hotUpdate = function(t) {
10245  this._modules.update(t), nI(this, !0);
10246};
10247Rs.prototype._withCommit = function(t) {
10248  var s = this._committing;
10249  this._committing = !0, t(), this._committing = s;
10250};
10251Object.defineProperties(Rs.prototype, vx);
10252var QK = fI(function(e, t) {
10253  var s = {};
10254  return hI(t).forEach(function(l) {
10255    var h = l.key, g = l.val;
10256    s[h] = function() {
10257      var c = this.$store.state, w = this.$store.getters;
10258      if (e) {
10259        var O = dI(this.$store, "mapState", e);
10260        if (!O)
10261          return;
10262        c = O.context.state, w = O.context.getters;
10263      }
10264      return typeof g == "function" ? g.call(this, c, w) : c[g];
10265    }, s[h].vuex = !0;
10266  }), s;
10267}), eX = fI(function(e, t) {
10268  var s = {};
10269  return hI(t).forEach(function(l) {
10270    var h = l.key, g = l.val;
10271    g = e + g, s[h] = function() {
10272      if (!(e && !dI(this.$store, "mapGetters", e)))
10273        return this.$store.getters[g];
10274    }, s[h].vuex = !0;
10275  }), s;
10276});
10277function hI(e) {
10278  return Yz(e) ? Array.isArray(e) ? e.map(function(t) {
10279    return { key: t, val: t };
10280  }) : Object.keys(e).map(function(t) {
10281    return { key: t, val: e[t] };
10282  }) : [];
10283}
10284function Yz(e) {
10285  return Array.isArray(e) || tI(e);
10286}
10287function fI(e) {
10288  return function(t, s) {
10289    return typeof t != "string" ? (s = t, t = "") : t.charAt(t.length - 1) !== "/" && (t += "/"), e(t, s);
10290  };
10291}
10292function dI(e, t, s) {
10293  var l = e._modulesNamespaceMap[s];
10294  return l;
10295}
10296var ps = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
10297function xa(e) {
10298  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
10299}
10300function pI(e) {
10301  if (e.__esModule) return e;
10302  var t = e.default;
10303  if (typeof t == "function") {
10304    var s = function l() {
10305      return this instanceof l ? Reflect.construct(t, arguments, this.constructor) : t.apply(this, arguments);
10306    };
10307    s.prototype = t.prototype;
10308  } else s = {};
10309  return Object.defineProperty(s, "__esModule", { value: !0 }), Object.keys(e).forEach(function(l) {
10310    var h = Object.getOwnPropertyDescriptor(e, l);
10311    Object.defineProperty(s, l, h.get ? h : {
10312      enumerable: !0,
10313      get: function() {
10314        return e[l];
10315      }
10316    });
10317  }), s;
10318}
10319function Qz(e) {
10320  var t = typeof e;
10321  return e != null && (t == "object" || t == "function");
10322}
10323var Id = Qz, eB = typeof ps == "object" && ps && ps.Object === Object && ps, mI = eB, tB = mI, rB = typeof self == "object" && self && self.Object === Object && self, nB = tB || rB || Function("return this")(), wa = nB, iB = wa, sB = function() {
10324  return iB.Date.now();
10325}, oB = sB, aB = /\s/;
10326function lB(e) {
10327  for (var t = e.length; t-- && aB.test(e.charAt(t)); )
10328    ;
10329  return t;
10330}
10331var cB = lB, uB = cB, hB = /^\s+/;
10332function fB(e) {
10333  return e && e.slice(0, uB(e) + 1).replace(hB, "");
10334}
10335var dB = fB, pB = wa, mB = pB.Symbol, Tg = mB, Kw = Tg, gI = Object.prototype, gB = gI.hasOwnProperty, yB = gI.toString, Pf = Kw ? Kw.toStringTag : void 0;
10336function _B(e) {
10337  var t = gB.call(e, Pf), s = e[Pf];
10338  try {
10339    e[Pf] = void 0;
10340    var l = !0;
10341  } catch {
10342  }
10343  var h = yB.call(e);
10344  return l && (t ? e[Pf] = s : delete e[Pf]), h;
10345}
10346var vB = _B, bB = Object.prototype, xB = bB.toString;
10347function wB(e) {
10348  return xB.call(e);
10349}
10350var SB = wB, Xw = Tg, TB = vB, EB = SB, AB = "[object Null]", CB = "[object Undefined]", Jw = Xw ? Xw.toStringTag : void 0;
10351function IB(e) {
10352  return e == null ? e === void 0 ? CB : AB : Jw && Jw in Object(e) ? TB(e) : EB(e);
10353}
10354var Pd = IB;
10355function PB(e) {
10356  return e != null && typeof e == "object";
10357}
10358var Md = PB, MB = Pd, kB = Md, OB = "[object Symbol]";
10359function DB(e) {
10360  return typeof e == "symbol" || kB(e) && MB(e) == OB;
10361}
10362var Eg = DB, RB = dB, Yw = Id, LB = Eg, Qw = NaN, FB = /^[-+]0x[0-9a-f]+$/i, zB = /^0b[01
vendor: 15,288 bytes, lines 10362-10870
10362]+$/i, BB = /^0o[0-7]+$/i, NB = parseInt;
10363function $B(e) {
10364  if (typeof e == "number")
10365    return e;
10366  if (LB(e))
10367    return Qw;
10368  if (Yw(e)) {
10369    var t = typeof e.valueOf == "function" ? e.valueOf() : e;
10370    e = Yw(t) ? t + "" : t;
10371  }
10372  if (typeof e != "string")
10373    return e === 0 ? e : +e;
10374  e = RB(e);
10375  var s = zB.test(e);
10376  return s || BB.test(e) ? NB(e.slice(2), s ? 2 : 8) : FB.test(e) ? Qw : +e;
10377}
10378var jB = $B, VB = Id, i_ = oB, eS = jB, UB = "Expected a function", qB = Math.max, HB = Math.min;
10379function GB(e, t, s) {
10380  var l, h, g, m, c, w, O = 0, P = !1, R = !1, z = !0;
10381  if (typeof e != "function")
10382    throw new TypeError(UB);
10383  t = eS(t) || 0, VB(s) && (P = !!s.leading, R = "maxWait" in s, g = R ? qB(eS(s.maxWait) || 0, t) : g, z = "trailing" in s ? !!s.trailing : z);
10384  function J(Se) {
10385    var je = l, Ne = h;
10386    return l = h = void 0, O = Se, m = e.apply(Ne, je), m;
10387  }
10388  function K(Se) {
10389    return O = Se, c = setTimeout(Ce, t), P ? J(Se) : m;
10390  }
10391  function ee(Se) {
10392    var je = Se - w, Ne = Se - O, Oe = t - je;
10393    return R ? HB(Oe, g - Ne) : Oe;
10394  }
10395  function ue(Se) {
10396    var je = Se - w, Ne = Se - O;
10397    return w === void 0 || je >= t || je < 0 || R && Ne >= g;
10398  }
10399  function Ce() {
10400    var Se = i_();
10401    if (ue(Se))
10402      return ge(Se);
10403    c = setTimeout(Ce, ee(Se));
10404  }
10405  function ge(Se) {
10406    return c = void 0, z && l ? J(Se) : (l = h = void 0, m);
10407  }
10408  function X() {
10409    c !== void 0 && clearTimeout(c), O = 0, l = w = h = c = void 0;
10410  }
10411  function ye() {
10412    return c === void 0 ? m : ge(i_());
10413  }
10414  function Ae() {
10415    var Se = i_(), je = ue(Se);
10416    if (l = arguments, h = this, w = Se, je) {
10417      if (c === void 0)
10418        return K(w);
10419      if (R)
10420        return clearTimeout(c), c = setTimeout(Ce, t), J(w);
10421    }
10422    return c === void 0 && (c = setTimeout(Ce, t)), m;
10423  }
10424  return Ae.cancel = X, Ae.flush = ye, Ae;
10425}
10426var yI = GB;
10427const tX = /* @__PURE__ */ xa(yI);
10428function ZB() {
10429  this.__data__ = [], this.size = 0;
10430}
10431var WB = ZB;
10432function KB(e, t) {
10433  return e === t || e !== e && t !== t;
10434}
10435var _I = KB, XB = _I;
10436function JB(e, t) {
10437  for (var s = e.length; s--; )
10438    if (XB(e[s][0], t))
10439      return s;
10440  return -1;
10441}
10442var Ag = JB, YB = Ag, QB = Array.prototype, eN = QB.splice;
10443function tN(e) {
10444  var t = this.__data__, s = YB(t, e);
10445  if (s < 0)
10446    return !1;
10447  var l = t.length - 1;
10448  return s == l ? t.pop() : eN.call(t, s, 1), --this.size, !0;
10449}
10450var rN = tN, nN = Ag;
10451function iN(e) {
10452  var t = this.__data__, s = nN(t, e);
10453  return s < 0 ? void 0 : t[s][1];
10454}
10455var sN = iN, oN = Ag;
10456function aN(e) {
10457  return oN(this.__data__, e) > -1;
10458}
10459var lN = aN, cN = Ag;
10460function uN(e, t) {
10461  var s = this.__data__, l = cN(s, e);
10462  return l < 0 ? (++this.size, s.push([e, t])) : s[l][1] = t, this;
10463}
10464var hN = uN, fN = WB, dN = rN, pN = sN, mN = lN, gN = hN;
10465function Ih(e) {
10466  var t = -1, s = e == null ? 0 : e.length;
10467  for (this.clear(); ++t < s; ) {
10468    var l = e[t];
10469    this.set(l[0], l[1]);
10470  }
10471}
10472Ih.prototype.clear = fN;
10473Ih.prototype.delete = dN;
10474Ih.prototype.get = pN;
10475Ih.prototype.has = mN;
10476Ih.prototype.set = gN;
10477var Cg = Ih, yN = Cg;
10478function _N() {
10479  this.__data__ = new yN(), this.size = 0;
10480}
10481var vN = _N;
10482function bN(e) {
10483  var t = this.__data__, s = t.delete(e);
10484  return this.size = t.size, s;
10485}
10486var xN = bN;
10487function wN(e) {
10488  return this.__data__.get(e);
10489}
10490var SN = wN;
10491function TN(e) {
10492  return this.__data__.has(e);
10493}
10494var EN = TN, AN = Pd, CN = Id, IN = "[object AsyncFunction]", PN = "[object Function]", MN = "[object GeneratorFunction]", kN = "[object Proxy]";
10495function ON(e) {
10496  if (!CN(e))
10497    return !1;
10498  var t = AN(e);
10499  return t == PN || t == MN || t == IN || t == kN;
10500}
10501var vI = ON, DN = wa, RN = DN["__core-js_shared__"], LN = RN, s_ = LN, tS = function() {
10502  var e = /[^.]+$/.exec(s_ && s_.keys && s_.keys.IE_PROTO || "");
10503  return e ? "Symbol(src)_1." + e : "";
10504}();
10505function FN(e) {
10506  return !!tS && tS in e;
10507}
10508var zN = FN, BN = Function.prototype, NN = BN.toString;
10509function $N(e) {
10510  if (e != null) {
10511    try {
10512      return NN.call(e);
10513    } catch {
10514    }
10515    try {
10516      return e + "";
10517    } catch {
10518    }
10519  }
10520  return "";
10521}
10522var bI = $N, jN = vI, VN = zN, UN = Id, qN = bI, HN = /[\\^$.*+?()[\]{}|]/g, GN = /^\[object .+?Constructor\]$/, ZN = Function.prototype, WN = Object.prototype, KN = ZN.toString, XN = WN.hasOwnProperty, JN = RegExp(
10523  "^" + KN.call(XN).replace(HN, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
10524);
10525function YN(e) {
10526  if (!UN(e) || VN(e))
10527    return !1;
10528  var t = jN(e) ? JN : GN;
10529  return t.test(qN(e));
10530}
10531var QN = YN;
10532function e3(e, t) {
10533  return e == null ? void 0 : e[t];
10534}
10535var t3 = e3, r3 = QN, n3 = t3;
10536function i3(e, t) {
10537  var s = n3(e, t);
10538  return r3(s) ? s : void 0;
10539}
10540var Ph = i3, s3 = Ph, o3 = wa, a3 = s3(o3, "Map"), bx = a3, l3 = Ph, c3 = l3(Object, "create"), Ig = c3, rS = Ig;
10541function u3() {
10542  this.__data__ = rS ? rS(null) : {}, this.size = 0;
10543}
10544var h3 = u3;
10545function f3(e) {
10546  var t = this.has(e) && delete this.__data__[e];
10547  return this.size -= t ? 1 : 0, t;
10548}
10549var d3 = f3, p3 = Ig, m3 = "__lodash_hash_undefined__", g3 = Object.prototype, y3 = g3.hasOwnProperty;
10550function _3(e) {
10551  var t = this.__data__;
10552  if (p3) {
10553    var s = t[e];
10554    return s === m3 ? void 0 : s;
10555  }
10556  return y3.call(t, e) ? t[e] : void 0;
10557}
10558var v3 = _3, b3 = Ig, x3 = Object.prototype, w3 = x3.hasOwnProperty;
10559function S3(e) {
10560  var t = this.__data__;
10561  return b3 ? t[e] !== void 0 : w3.call(t, e);
10562}
10563var T3 = S3, E3 = Ig, A3 = "__lodash_hash_undefined__";
10564function C3(e, t) {
10565  var s = this.__data__;
10566  return this.size += this.has(e) ? 0 : 1, s[e] = E3 && t === void 0 ? A3 : t, this;
10567}
10568var I3 = C3, P3 = h3, M3 = d3, k3 = v3, O3 = T3, D3 = I3;
10569function Mh(e) {
10570  var t = -1, s = e == null ? 0 : e.length;
10571  for (this.clear(); ++t < s; ) {
10572    var l = e[t];
10573    this.set(l[0], l[1]);
10574  }
10575}
10576Mh.prototype.clear = P3;
10577Mh.prototype.delete = M3;
10578Mh.prototype.get = k3;
10579Mh.prototype.has = O3;
10580Mh.prototype.set = D3;
10581var R3 = Mh, nS = R3, L3 = Cg, F3 = bx;
10582function z3() {
10583  this.size = 0, this.__data__ = {
10584    hash: new nS(),
10585    map: new (F3 || L3)(),
10586    string: new nS()
10587  };
10588}
10589var B3 = z3;
10590function N3(e) {
10591  var t = typeof e;
10592  return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
10593}
10594var $3 = N3, j3 = $3;
10595function V3(e, t) {
10596  var s = e.__data__;
10597  return j3(t) ? s[typeof t == "string" ? "string" : "hash"] : s.map;
10598}
10599var Pg = V3, U3 = Pg;
10600function q3(e) {
10601  var t = U3(this, e).delete(e);
10602  return this.size -= t ? 1 : 0, t;
10603}
10604var H3 = q3, G3 = Pg;
10605function Z3(e) {
10606  return G3(this, e).get(e);
10607}
10608var W3 = Z3, K3 = Pg;
10609function X3(e) {
10610  return K3(this, e).has(e);
10611}
10612var J3 = X3, Y3 = Pg;
10613function Q3(e, t) {
10614  var s = Y3(this, e), l = s.size;
10615  return s.set(e, t), this.size += s.size == l ? 0 : 1, this;
10616}
10617var e$ = Q3, t$ = B3, r$ = H3, n$ = W3, i$ = J3, s$ = e$;
10618function kh(e) {
10619  var t = -1, s = e == null ? 0 : e.length;
10620  for (this.clear(); ++t < s; ) {
10621    var l = e[t];
10622    this.set(l[0], l[1]);
10623  }
10624}
10625kh.prototype.clear = t$;
10626kh.prototype.delete = r$;
10627kh.prototype.get = n$;
10628kh.prototype.has = i$;
10629kh.prototype.set = s$;
10630var xx = kh, o$ = Cg, a$ = bx, l$ = xx, c$ = 200;
10631function u$(e, t) {
10632  var s = this.__data__;
10633  if (s instanceof o$) {
10634    var l = s.__data__;
10635    if (!a$ || l.length < c$ - 1)
10636      return l.push([e, t]), this.size = ++s.size, this;
10637    s = this.__data__ = new l$(l);
10638  }
10639  return s.set(e, t), this.size = s.size, this;
10640}
10641var h$ = u$, f$ = Cg, d$ = vN, p$ = xN, m$ = SN, g$ = EN, y$ = h$;
10642function Oh(e) {
10643  var t = this.__data__ = new f$(e);
10644  this.size = t.size;
10645}
10646Oh.prototype.clear = d$;
10647Oh.prototype.delete = p$;
10648Oh.prototype.get = m$;
10649Oh.prototype.has = g$;
10650Oh.prototype.set = y$;
10651var _$ = Oh, v$ = "__lodash_hash_undefined__";
10652function b$(e) {
10653  return this.__data__.set(e, v$), this;
10654}
10655var x$ = b$;
10656function w$(e) {
10657  return this.__data__.has(e);
10658}
10659var S$ = w$, T$ = xx, E$ = x$, A$ = S$;
10660function Pm(e) {
10661  var t = -1, s = e == null ? 0 : e.length;
10662  for (this.__data__ = new T$(); ++t < s; )
10663    this.add(e[t]);
10664}
10665Pm.prototype.add = Pm.prototype.push = E$;
10666Pm.prototype.has = A$;
10667var C$ = Pm;
10668function I$(e, t) {
10669  for (var s = -1, l = e == null ? 0 : e.length; ++s < l; )
10670    if (t(e[s], s, e))
10671      return !0;
10672  return !1;
10673}
10674var P$ = I$;
10675function M$(e, t) {
10676  return e.has(t);
10677}
10678var k$ = M$, O$ = C$, D$ = P$, R$ = k$, L$ = 1, F$ = 2;
10679function z$(e, t, s, l, h, g) {
10680  var m = s & L$, c = e.length, w = t.length;
10681  if (c != w && !(m && w > c))
10682    return !1;
10683  var O = g.get(e), P = g.get(t);
10684  if (O && P)
10685    return O == t && P == e;
10686  var R = -1, z = !0, J = s & F$ ? new O$() : void 0;
10687  for (g.set(e, t), g.set(t, e); ++R < c; ) {
10688    var K = e[R], ee = t[R];
10689    if (l)
10690      var ue = m ? l(ee, K, R, t, e, g) : l(K, ee, R, e, t, g);
10691    if (ue !== void 0) {
10692      if (ue)
10693        continue;
10694      z = !1;
10695      break;
10696    }
10697    if (J) {
10698      if (!D$(t, function(Ce, ge) {
10699        if (!R$(J, ge) && (K === Ce || h(K, Ce, s, l, g)))
10700          return J.push(ge);
10701      })) {
10702        z = !1;
10703        break;
10704      }
10705    } else if (!(K === ee || h(K, ee, s, l, g))) {
10706      z = !1;
10707      break;
10708    }
10709  }
10710  return g.delete(e), g.delete(t), z;
10711}
10712var xI = z$, B$ = wa, N$ = B$.Uint8Array, $$ = N$;
10713function j$(e) {
10714  var t = -1, s = Array(e.size);
10715  return e.forEach(function(l, h) {
10716    s[++t] = [h, l];
10717  }), s;
10718}
10719var V$ = j$;
10720function U$(e) {
10721  var t = -1, s = Array(e.size);
10722  return e.forEach(function(l) {
10723    s[++t] = l;
10724  }), s;
10725}
10726var q$ = U$, iS = Tg, sS = $$, H$ = _I, G$ = xI, Z$ = V$, W$ = q$, K$ = 1, X$ = 2, J$ = "[object Boolean]", Y$ = "[object Date]", Q$ = "[object Error]", e5 = "[object Map]", t5 = "[object Number]", r5 = "[object RegExp]", n5 = "[object Set]", i5 = "[object String]", s5 = "[object Symbol]", o5 = "[object ArrayBuffer]", a5 = "[object DataView]", oS = iS ? iS.prototype : void 0, o_ = oS ? oS.valueOf : void 0;
10727function l5(e, t, s, l, h, g, m) {
10728  switch (s) {
10729    case a5:
10730      if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
10731        return !1;
10732      e = e.buffer, t = t.buffer;
10733    case o5:
10734      return !(e.byteLength != t.byteLength || !g(new sS(e), new sS(t)));
10735    case J$:
10736    case Y$:
10737    case t5:
10738      return H$(+e, +t);
10739    case Q$:
10740      return e.name == t.name && e.message == t.message;
10741    case r5:
10742    case i5:
10743      return e == t + "";
10744    case e5:
10745      var c = Z$;
10746    case n5:
10747      var w = l & K$;
10748      if (c || (c = W$), e.size != t.size && !w)
10749        return !1;
10750      var O = m.get(e);
10751      if (O)
10752        return O == t;
10753      l |= X$, m.set(e, t);
10754      var P = G$(c(e), c(t), l, h, g, m);
10755      return m.delete(e), P;
10756    case s5:
10757      if (o_)
10758        return o_.call(e) == o_.call(t);
10759  }
10760  return !1;
10761}
10762var c5 = l5;
10763function u5(e, t) {
10764  for (var s = -1, l = t.length, h = e.length; ++s < l; )
10765    e[h + s] = t[s];
10766  return e;
10767}
10768var h5 = u5, f5 = Array.isArray, Dh = f5, d5 = h5, p5 = Dh;
10769function m5(e, t, s) {
10770  var l = t(e);
10771  return p5(e) ? l : d5(l, s(e));
10772}
10773var g5 = m5;
10774function y5(e, t) {
10775  for (var s = -1, l = e == null ? 0 : e.length, h = 0, g = []; ++s < l; ) {
10776    var m = e[s];
10777    t(m, s, e) && (g[h++] = m);
10778  }
10779  return g;
10780}
10781var _5 = y5;
10782function v5() {
10783  return [];
10784}
10785var b5 = v5, x5 = _5, w5 = b5, S5 = Object.prototype, T5 = S5.propertyIsEnumerable, aS = Object.getOwnPropertySymbols, E5 = aS ? function(e) {
10786  return e == null ? [] : (e = Object(e), x5(aS(e), function(t) {
10787    return T5.call(e, t);
10788  }));
10789} : w5, A5 = E5;
10790function C5(e, t) {
10791  for (var s = -1, l = Array(e); ++s < e; )
10792    l[s] = t(s);
10793  return l;
10794}
10795var I5 = C5, P5 = Pd, M5 = Md, k5 = "[object Arguments]";
10796function O5(e) {
10797  return M5(e) && P5(e) == k5;
10798}
10799var D5 = O5, lS = D5, R5 = Md, wI = Object.prototype, L5 = wI.hasOwnProperty, F5 = wI.propertyIsEnumerable, z5 = lS(/* @__PURE__ */ function() {
10800  return arguments;
10801}()) ? lS : function(e) {
10802  return R5(e) && L5.call(e, "callee") && !F5.call(e, "callee");
10803}, B5 = z5, Mm = { exports: {} };
10804function N5() {
10805  return !1;
10806}
10807var $5 = N5;
10808Mm.exports;
10809(function(e, t) {
10810  var s = wa, l = $5, h = t && !t.nodeType && t, g = h && !0 && e && !e.nodeType && e, m = g && g.exports === h, c = m ? s.Buffer : void 0, w = c ? c.isBuffer : void 0, O = w || l;
10811  e.exports = O;
10812})(Mm, Mm.exports);
10813var SI = Mm.exports, j5 = 9007199254740991, V5 = /^(?:0|[1-9]\d*)$/;
10814function U5(e, t) {
10815  var s = typeof e;
10816  return t = t ?? j5, !!t && (s == "number" || s != "symbol" && V5.test(e)) && e > -1 && e % 1 == 0 && e < t;
10817}
10818var q5 = U5, H5 = 9007199254740991;
10819function G5(e) {
10820  return typeof e == "number" && e > -1 && e % 1 == 0 && e <= H5;
10821}
10822var TI = G5, Z5 = Pd, W5 = TI, K5 = Md, X5 = "[object Arguments]", J5 = "[object Array]", Y5 = "[object Boolean]", Q5 = "[object Date]", e4 = "[object Error]", t4 = "[object Function]", r4 = "[object Map]", n4 = "[object Number]", i4 = "[object Object]", s4 = "[object RegExp]", o4 = "[object Set]", a4 = "[object String]", l4 = "[object WeakMap]", c4 = "[object ArrayBuffer]", u4 = "[object DataView]", h4 = "[object Float32Array]", f4 = "[object Float64Array]", d4 = "[object Int8Array]", p4 = "[object Int16Array]", m4 = "[object Int32Array]", g4 = "[object Uint8Array]", y4 = "[object Uint8ClampedArray]", _4 = "[object Uint16Array]", v4 = "[object Uint32Array]", Mn = {};
10823Mn[h4] = Mn[f4] = Mn[d4] = Mn[p4] = Mn[m4] = Mn[g4] = Mn[y4] = Mn[_4] = Mn[v4] = !0;
10824Mn[X5] = Mn[J5] = Mn[c4] = Mn[Y5] = Mn[u4] = Mn[Q5] = Mn[e4] = Mn[t4] = Mn[r4] = Mn[n4] = Mn[i4] = Mn[s4] = Mn[o4] = Mn[a4] = Mn[l4] = !1;
10825function b4(e) {
10826  return K5(e) && W5(e.length) && !!Mn[Z5(e)];
10827}
10828var x4 = b4;
10829function w4(e) {
10830  return function(t) {
10831    return e(t);
10832  };
10833}
10834var S4 = w4, km = { exports: {} };
10835km.exports;
10836(function(e, t) {
10837  var s = mI, l = t && !t.nodeType && t, h = l && !0 && e && !e.nodeType && e, g = h && h.exports === l, m = g && s.process, c = function() {
10838    try {
10839      var w = h && h.require && h.require("util").types;
10840      return w || m && m.binding && m.binding("util");
10841    } catch {
10842    }
10843  }();
10844  e.exports = c;
10845})(km, km.exports);
10846var T4 = km.exports, E4 = x4, A4 = S4, cS = T4, uS = cS && cS.isTypedArray, C4 = uS ? A4(uS) : E4, EI = C4, I4 = I5, P4 = B5, M4 = Dh, k4 = SI, O4 = q5, D4 = EI, R4 = Object.prototype, L4 = R4.hasOwnProperty;
10847function F4(e, t) {
10848  var s = M4(e), l = !s && P4(e), h = !s && !l && k4(e), g = !s && !l && !h && D4(e), m = s || l || h || g, c = m ? I4(e.length, String) : [], w = c.length;
10849  for (var O in e)
10850    (t || L4.call(e, O)) && !(m && // Safari 9 has enumerable `arguments.length` in strict mode.
10851    (O == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
10852    h && (O == "offset" || O == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
10853    g && (O == "buffer" || O == "byteLength" || O == "byteOffset") || // Skip index properties.
10854    O4(O, w))) && c.push(O);
10855  return c;
10856}
10857var z4 = F4, B4 = Object.prototype;
10858function N4(e) {
10859  var t = e && e.constructor, s = typeof t == "function" && t.prototype || B4;
10860  return e === s;
10861}
10862var $4 = N4;
10863function j4(e, t) {
10864  return function(s) {
10865    return e(t(s));
10866  };
10867}
10868var V4 = j4, U4 = V4, q4 = U4(Object.keys, Object), H4 = q4, G4 = $4, Z4 = H4, W4 = Object.prototype, K4 = W4.hasOwnProperty;
10869function X4(e) {
10870  if (!G4(e))
vendor: 5,735 bytes, lines 10871-11014
10871    return Z4(e);
10872  var t = [];
10873  for (var s in Object(e))
10874    K4.call(e, s) && s != "constructor" && t.push(s);
10875  return t;
10876}
10877var J4 = X4, Y4 = vI, Q4 = TI;
10878function e6(e) {
10879  return e != null && Q4(e.length) && !Y4(e);
10880}
10881var t6 = e6, r6 = z4, n6 = J4, i6 = t6;
10882function s6(e) {
10883  return i6(e) ? r6(e) : n6(e);
10884}
10885var o6 = s6, a6 = g5, l6 = A5, c6 = o6;
10886function u6(e) {
10887  return a6(e, c6, l6);
10888}
10889var h6 = u6, hS = h6, f6 = 1, d6 = Object.prototype, p6 = d6.hasOwnProperty;
10890function m6(e, t, s, l, h, g) {
10891  var m = s & f6, c = hS(e), w = c.length, O = hS(t), P = O.length;
10892  if (w != P && !m)
10893    return !1;
10894  for (var R = w; R--; ) {
10895    var z = c[R];
10896    if (!(m ? z in t : p6.call(t, z)))
10897      return !1;
10898  }
10899  var J = g.get(e), K = g.get(t);
10900  if (J && K)
10901    return J == t && K == e;
10902  var ee = !0;
10903  g.set(e, t), g.set(t, e);
10904  for (var ue = m; ++R < w; ) {
10905    z = c[R];
10906    var Ce = e[z], ge = t[z];
10907    if (l)
10908      var X = m ? l(ge, Ce, z, t, e, g) : l(Ce, ge, z, e, t, g);
10909    if (!(X === void 0 ? Ce === ge || h(Ce, ge, s, l, g) : X)) {
10910      ee = !1;
10911      break;
10912    }
10913    ue || (ue = z == "constructor");
10914  }
10915  if (ee && !ue) {
10916    var ye = e.constructor, Ae = t.constructor;
10917    ye != Ae && "constructor" in e && "constructor" in t && !(typeof ye == "function" && ye instanceof ye && typeof Ae == "function" && Ae instanceof Ae) && (ee = !1);
10918  }
10919  return g.delete(e), g.delete(t), ee;
10920}
10921var g6 = m6, y6 = Ph, _6 = wa, v6 = y6(_6, "DataView"), b6 = v6, x6 = Ph, w6 = wa, S6 = x6(w6, "Promise"), T6 = S6, E6 = Ph, A6 = wa, C6 = E6(A6, "Set"), I6 = C6, P6 = Ph, M6 = wa, k6 = P6(M6, "WeakMap"), O6 = k6, yv = b6, _v = bx, vv = T6, bv = I6, xv = O6, AI = Pd, Rh = bI, fS = "[object Map]", D6 = "[object Object]", dS = "[object Promise]", pS = "[object Set]", mS = "[object WeakMap]", gS = "[object DataView]", R6 = Rh(yv), L6 = Rh(_v), F6 = Rh(vv), z6 = Rh(bv), B6 = Rh(xv), zc = AI;
10922(yv && zc(new yv(new ArrayBuffer(1))) != gS || _v && zc(new _v()) != fS || vv && zc(vv.resolve()) != dS || bv && zc(new bv()) != pS || xv && zc(new xv()) != mS) && (zc = function(e) {
10923  var t = AI(e), s = t == D6 ? e.constructor : void 0, l = s ? Rh(s) : "";
10924  if (l)
10925    switch (l) {
10926      case R6:
10927        return gS;
10928      case L6:
10929        return fS;
10930      case F6:
10931        return dS;
10932      case z6:
10933        return pS;
10934      case B6:
10935        return mS;
10936    }
10937  return t;
10938});
10939var N6 = zc, a_ = _$, $6 = xI, j6 = c5, V6 = g6, yS = N6, _S = Dh, vS = SI, U6 = EI, q6 = 1, bS = "[object Arguments]", xS = "[object Array]", Rp = "[object Object]", H6 = Object.prototype, wS = H6.hasOwnProperty;
10940function G6(e, t, s, l, h, g) {
10941  var m = _S(e), c = _S(t), w = m ? xS : yS(e), O = c ? xS : yS(t);
10942  w = w == bS ? Rp : w, O = O == bS ? Rp : O;
10943  var P = w == Rp, R = O == Rp, z = w == O;
10944  if (z && vS(e)) {
10945    if (!vS(t))
10946      return !1;
10947    m = !0, P = !1;
10948  }
10949  if (z && !P)
10950    return g || (g = new a_()), m || U6(e) ? $6(e, t, s, l, h, g) : j6(e, t, w, s, l, h, g);
10951  if (!(s & q6)) {
10952    var J = P && wS.call(e, "__wrapped__"), K = R && wS.call(t, "__wrapped__");
10953    if (J || K) {
10954      var ee = J ? e.value() : e, ue = K ? t.value() : t;
10955      return g || (g = new a_()), h(ee, ue, s, l, g);
10956    }
10957  }
10958  return z ? (g || (g = new a_()), V6(e, t, s, l, h, g)) : !1;
10959}
10960var Z6 = G6, W6 = Z6, SS = Md;
10961function CI(e, t, s, l, h) {
10962  return e === t ? !0 : e == null || t == null || !SS(e) && !SS(t) ? e !== e && t !== t : W6(e, t, s, l, CI, h);
10963}
10964var K6 = CI, X6 = K6;
10965function J6(e, t) {
10966  return X6(e, t);
10967}
10968var Y6 = J6;
10969const rX = /* @__PURE__ */ xa(Y6);
10970function II(e, t) {
10971  return function() {
10972    return e.apply(t, arguments);
10973  };
10974}
10975const { toString: Q6 } = Object.prototype, { getPrototypeOf: wx } = Object, { iterator: Mg, toStringTag: PI } = Symbol, kg = /* @__PURE__ */ ((e) => (t) => {
10976  const s = Q6.call(t);
10977  return e[s] || (e[s] = s.slice(8, -1).toLowerCase());
10978})(/* @__PURE__ */ Object.create(null)), Zo = (e) => (e = e.toLowerCase(), (t) => kg(t) === e), Og = (e) => (t) => typeof t === e, { isArray: Lh } = Array, _h = Og("undefined");
10979function kd(e) {
10980  return e !== null && !_h(e) && e.constructor !== null && !_h(e.constructor) && ks(e.constructor.isBuffer) && e.constructor.isBuffer(e);
10981}
10982const MI = Zo("ArrayBuffer");
10983function ej(e) {
10984  let t;
10985  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && MI(e.buffer), t;
10986}
10987const tj = Og("string"), ks = Og("function"), kI = Og("number"), Od = (e) => e !== null && typeof e == "object", rj = (e) => e === !0 || e === !1, Gp = (e) => {
10988  if (kg(e) !== "object")
10989    return !1;
10990  const t = wx(e);
10991  return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(PI in e) && !(Mg in e);
10992}, nj = (e) => {
10993  if (!Od(e) || kd(e))
10994    return !1;
10995  try {
10996    return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
10997  } catch {
10998    return !1;
10999  }
11000}, ij = Zo("Date"), sj = Zo("File"), oj = Zo("Blob"), aj = Zo("FileList"), lj = (e) => Od(e) && ks(e.pipe), cj = (e) => {
11001  let t;
11002  return e && (typeof FormData == "function" && e instanceof FormData || ks(e.append) && ((t = kg(e)) === "formdata" || // detect form-data instance
11003  t === "object" && ks(e.toString) && e.toString() === "[object FormData]"));
11004}, uj = Zo("URLSearchParams"), [hj, fj, dj, pj] = ["ReadableStream", "Request", "Response", "Headers"].map(Zo), mj = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
11005function Dd(e, t, { allOwnKeys: s = !1 } = {}) {
11006  if (e === null || typeof e > "u")
11007    return;
11008  let l, h;
11009  if (typeof e != "object" && (e = [e]), Lh(e))
11010    for (l = 0, h = e.length; l < h; l++)
11011      t.call(null, e[l], l, e);
11012  else {
11013    if (kd(e))
11014      return;
vendor: 4,364 bytes, lines 11015-11147
11015    const g = s ? Object.getOwnPropertyNames(e) : Object.keys(e), m = g.length;
11016    let c;
11017    for (l = 0; l < m; l++)
11018      c = g[l], t.call(null, e[c], c, e);
11019  }
11020}
11021function OI(e, t) {
11022  if (kd(e))
11023    return null;
11024  t = t.toLowerCase();
11025  const s = Object.keys(e);
11026  let l = s.length, h;
11027  for (; l-- > 0; )
11028    if (h = s[l], t === h.toLowerCase())
11029      return h;
11030  return null;
11031}
11032const Vc = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, DI = (e) => !_h(e) && e !== Vc;
11033function wv() {
11034  const { caseless: e, skipUndefined: t } = DI(this) && this || {}, s = {}, l = (h, g) => {
11035    const m = e && OI(s, g) || g;
11036    Gp(s[m]) && Gp(h) ? s[m] = wv(s[m], h) : Gp(h) ? s[m] = wv({}, h) : Lh(h) ? s[m] = h.slice() : (!t || !_h(h)) && (s[m] = h);
11037  };
11038  for (let h = 0, g = arguments.length; h < g; h++)
11039    arguments[h] && Dd(arguments[h], l);
11040  return s;
11041}
11042const gj = (e, t, s, { allOwnKeys: l } = {}) => (Dd(t, (h, g) => {
11043  s && ks(h) ? e[g] = II(h, s) : e[g] = h;
11044}, { allOwnKeys: l }), e), yj = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), _j = (e, t, s, l) => {
11045  e.prototype = Object.create(t.prototype, l), e.prototype.constructor = e, Object.defineProperty(e, "super", {
11046    value: t.prototype
11047  }), s && Object.assign(e.prototype, s);
11048}, vj = (e, t, s, l) => {
11049  let h, g, m;
11050  const c = {};
11051  if (t = t || {}, e == null) return t;
11052  do {
11053    for (h = Object.getOwnPropertyNames(e), g = h.length; g-- > 0; )
11054      m = h[g], (!l || l(m, e, t)) && !c[m] && (t[m] = e[m], c[m] = !0);
11055    e = s !== !1 && wx(e);
11056  } while (e && (!s || s(e, t)) && e !== Object.prototype);
11057  return t;
11058}, bj = (e, t, s) => {
11059  e = String(e), (s === void 0 || s > e.length) && (s = e.length), s -= t.length;
11060  const l = e.indexOf(t, s);
11061  return l !== -1 && l === s;
11062}, xj = (e) => {
11063  if (!e) return null;
11064  if (Lh(e)) return e;
11065  let t = e.length;
11066  if (!kI(t)) return null;
11067  const s = new Array(t);
11068  for (; t-- > 0; )
11069    s[t] = e[t];
11070  return s;
11071}, wj = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && wx(Uint8Array)), Sj = (e, t) => {
11072  const l = (e && e[Mg]).call(e);
11073  let h;
11074  for (; (h = l.next()) && !h.done; ) {
11075    const g = h.value;
11076    t.call(e, g[0], g[1]);
11077  }
11078}, Tj = (e, t) => {
11079  let s;
11080  const l = [];
11081  for (; (s = e.exec(t)) !== null; )
11082    l.push(s);
11083  return l;
11084}, Ej = Zo("HTMLFormElement"), Aj = (e) => e.toLowerCase().replace(
11085  /[-_\s]([a-z\d])(\w*)/g,
11086  function(s, l, h) {
11087    return l.toUpperCase() + h;
11088  }
11089), TS = (({ hasOwnProperty: e }) => (t, s) => e.call(t, s))(Object.prototype), Cj = Zo("RegExp"), RI = (e, t) => {
11090  const s = Object.getOwnPropertyDescriptors(e), l = {};
11091  Dd(s, (h, g) => {
11092    let m;
11093    (m = t(h, g, e)) !== !1 && (l[g] = m || h);
11094  }), Object.defineProperties(e, l);
11095}, Ij = (e) => {
11096  RI(e, (t, s) => {
11097    if (ks(e) && ["arguments", "caller", "callee"].indexOf(s) !== -1)
11098      return !1;
11099    const l = e[s];
11100    if (ks(l)) {
11101      if (t.enumerable = !1, "writable" in t) {
11102        t.writable = !1;
11103        return;
11104      }
11105      t.set || (t.set = () => {
11106        throw Error("Can not rewrite read-only method '" + s + "'");
11107      });
11108    }
11109  });
11110}, Pj = (e, t) => {
11111  const s = {}, l = (h) => {
11112    h.forEach((g) => {
11113      s[g] = !0;
11114    });
11115  };
11116  return Lh(e) ? l(e) : l(String(e).split(t)), s;
11117}, Mj = () => {
11118}, kj = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
11119function Oj(e) {
11120  return !!(e && ks(e.append) && e[PI] === "FormData" && e[Mg]);
11121}
11122const Dj = (e) => {
11123  const t = new Array(10), s = (l, h) => {
11124    if (Od(l)) {
11125      if (t.indexOf(l) >= 0)
11126        return;
11127      if (kd(l))
11128        return l;
11129      if (!("toJSON" in l)) {
11130        t[h] = l;
11131        const g = Lh(l) ? [] : {};
11132        return Dd(l, (m, c) => {
11133          const w = s(m, h + 1);
11134          !_h(w) && (g[c] = w);
11135        }), t[h] = void 0, g;
11136      }
11137    }
11138    return l;
11139  };
11140  return s(e, 0);
11141}, Rj = Zo("AsyncFunction"), Lj = (e) => e && (Od(e) || ks(e)) && ks(e.then) && ks(e.catch), LI = ((e, t) => e ? setImmediate : t ? ((s, l) => (Vc.addEventListener("message", ({ source: h, data: g }) => {
11142  h === Vc && g === s && l.length && l.shift()();
11143}, !1), (h) => {
11144  l.push(h), Vc.postMessage(s, "*");
11145}))(`axios@${Math.random()}`, []) : (s) => setTimeout(s))(
11146  typeof setImmediate == "function",
11147  ks(Vc.postMessage)
vendor: 8,308 bytes, lines 11148-11446
11148), Fj = typeof queueMicrotask < "u" ? queueMicrotask.bind(Vc) : typeof process < "u" && process.nextTick || LI, zj = (e) => e != null && ks(e[Mg]), qe = {
11149  isArray: Lh,
11150  isArrayBuffer: MI,
11151  isBuffer: kd,
11152  isFormData: cj,
11153  isArrayBufferView: ej,
11154  isString: tj,
11155  isNumber: kI,
11156  isBoolean: rj,
11157  isObject: Od,
11158  isPlainObject: Gp,
11159  isEmptyObject: nj,
11160  isReadableStream: hj,
11161  isRequest: fj,
11162  isResponse: dj,
11163  isHeaders: pj,
11164  isUndefined: _h,
11165  isDate: ij,
11166  isFile: sj,
11167  isBlob: oj,
11168  isRegExp: Cj,
11169  isFunction: ks,
11170  isStream: lj,
11171  isURLSearchParams: uj,
11172  isTypedArray: wj,
11173  isFileList: aj,
11174  forEach: Dd,
11175  merge: wv,
11176  extend: gj,
11177  trim: mj,
11178  stripBOM: yj,
11179  inherits: _j,
11180  toFlatObject: vj,
11181  kindOf: kg,
11182  kindOfTest: Zo,
11183  endsWith: bj,
11184  toArray: xj,
11185  forEachEntry: Sj,
11186  matchAll: Tj,
11187  isHTMLForm: Ej,
11188  hasOwnProperty: TS,
11189  hasOwnProp: TS,
11190  // an alias to avoid ESLint no-prototype-builtins detection
11191  reduceDescriptors: RI,
11192  freezeMethods: Ij,
11193  toObjectSet: Pj,
11194  toCamelCase: Aj,
11195  noop: Mj,
11196  toFiniteNumber: kj,
11197  findKey: OI,
11198  global: Vc,
11199  isContextDefined: DI,
11200  isSpecCompliantForm: Oj,
11201  toJSONObject: Dj,
11202  isAsyncFn: Rj,
11203  isThenable: Lj,
11204  setImmediate: LI,
11205  asap: Fj,
11206  isIterable: zj
11207};
11208function _r(e, t, s, l, h) {
11209  Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), s && (this.config = s), l && (this.request = l), h && (this.response = h, this.status = h.status ? h.status : null);
11210}
11211qe.inherits(_r, Error, {
11212  toJSON: function() {
11213    return {
11214      // Standard
11215      message: this.message,
11216      name: this.name,
11217      // Microsoft
11218      description: this.description,
11219      number: this.number,
11220      // Mozilla
11221      fileName: this.fileName,
11222      lineNumber: this.lineNumber,
11223      columnNumber: this.columnNumber,
11224      stack: this.stack,
11225      // Axios
11226      config: qe.toJSONObject(this.config),
11227      code: this.code,
11228      status: this.status
11229    };
11230  }
11231});
11232const FI = _r.prototype, zI = {};
11233[
11234  "ERR_BAD_OPTION_VALUE",
11235  "ERR_BAD_OPTION",
11236  "ECONNABORTED",
11237  "ETIMEDOUT",
11238  "ERR_NETWORK",
11239  "ERR_FR_TOO_MANY_REDIRECTS",
11240  "ERR_DEPRECATED",
11241  "ERR_BAD_RESPONSE",
11242  "ERR_BAD_REQUEST",
11243  "ERR_CANCELED",
11244  "ERR_NOT_SUPPORT",
11245  "ERR_INVALID_URL"
11246  // eslint-disable-next-line func-names
11247].forEach((e) => {
11248  zI[e] = { value: e };
11249});
11250Object.defineProperties(_r, zI);
11251Object.defineProperty(FI, "isAxiosError", { value: !0 });
11252_r.from = (e, t, s, l, h, g) => {
11253  const m = Object.create(FI);
11254  qe.toFlatObject(e, m, function(P) {
11255    return P !== Error.prototype;
11256  }, (O) => O !== "isAxiosError");
11257  const c = e && e.message ? e.message : "Error", w = t == null && e ? e.code : t;
11258  return _r.call(m, c, w, s, l, h), e && m.cause == null && Object.defineProperty(m, "cause", { value: e, configurable: !0 }), m.name = e && e.name || "Error", g && Object.assign(m, g), m;
11259};
11260const Bj = null;
11261function Sv(e) {
11262  return qe.isPlainObject(e) || qe.isArray(e);
11263}
11264function BI(e) {
11265  return qe.endsWith(e, "[]") ? e.slice(0, -2) : e;
11266}
11267function ES(e, t, s) {
11268  return e ? e.concat(t).map(function(h, g) {
11269    return h = BI(h), !s && g ? "[" + h + "]" : h;
11270  }).join(s ? "." : "") : t;
11271}
11272function Nj(e) {
11273  return qe.isArray(e) && !e.some(Sv);
11274}
11275const $j = qe.toFlatObject(qe, {}, null, function(t) {
11276  return /^is[A-Z]/.test(t);
11277});
11278function Dg(e, t, s) {
11279  if (!qe.isObject(e))
11280    throw new TypeError("target must be an object");
11281  t = t || new FormData(), s = qe.toFlatObject(s, {
11282    metaTokens: !0,
11283    dots: !1,
11284    indexes: !1
11285  }, !1, function(ee, ue) {
11286    return !qe.isUndefined(ue[ee]);
11287  });
11288  const l = s.metaTokens, h = s.visitor || P, g = s.dots, m = s.indexes, w = (s.Blob || typeof Blob < "u" && Blob) && qe.isSpecCompliantForm(t);
11289  if (!qe.isFunction(h))
11290    throw new TypeError("visitor must be a function");
11291  function O(K) {
11292    if (K === null) return "";
11293    if (qe.isDate(K))
11294      return K.toISOString();
11295    if (qe.isBoolean(K))
11296      return K.toString();
11297    if (!w && qe.isBlob(K))
11298      throw new _r("Blob is not supported. Use a Buffer instead.");
11299    return qe.isArrayBuffer(K) || qe.isTypedArray(K) ? w && typeof Blob == "function" ? new Blob([K]) : Buffer.from(K) : K;
11300  }
11301  function P(K, ee, ue) {
11302    let Ce = K;
11303    if (K && !ue && typeof K == "object") {
11304      if (qe.endsWith(ee, "{}"))
11305        ee = l ? ee : ee.slice(0, -2), K = JSON.stringify(K);
11306      else if (qe.isArray(K) && Nj(K) || (qe.isFileList(K) || qe.endsWith(ee, "[]")) && (Ce = qe.toArray(K)))
11307        return ee = BI(ee), Ce.forEach(function(X, ye) {
11308          !(qe.isUndefined(X) || X === null) && t.append(
11309            // eslint-disable-next-line no-nested-ternary
11310            m === !0 ? ES([ee], ye, g) : m === null ? ee : ee + "[]",
11311            O(X)
11312          );
11313        }), !1;
11314    }
11315    return Sv(K) ? !0 : (t.append(ES(ue, ee, g), O(K)), !1);
11316  }
11317  const R = [], z = Object.assign($j, {
11318    defaultVisitor: P,
11319    convertValue: O,
11320    isVisitable: Sv
11321  });
11322  function J(K, ee) {
11323    if (!qe.isUndefined(K)) {
11324      if (R.indexOf(K) !== -1)
11325        throw Error("Circular reference detected in " + ee.join("."));
11326      R.push(K), qe.forEach(K, function(Ce, ge) {
11327        (!(qe.isUndefined(Ce) || Ce === null) && h.call(
11328          t,
11329          Ce,
11330          qe.isString(ge) ? ge.trim() : ge,
11331          ee,
11332          z
11333        )) === !0 && J(Ce, ee ? ee.concat(ge) : [ge]);
11334      }), R.pop();
11335    }
11336  }
11337  if (!qe.isObject(e))
11338    throw new TypeError("data must be an object");
11339  return J(e), t;
11340}
11341function AS(e) {
11342  const t = {
11343    "!": "%21",
11344    "'": "%27",
11345    "(": "%28",
11346    ")": "%29",
11347    "~": "%7E",
11348    "%20": "+",
11349    "%00": "\0"
11350  };
11351  return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(l) {
11352    return t[l];
11353  });
11354}
11355function Sx(e, t) {
11356  this._pairs = [], e && Dg(e, this, t);
11357}
11358const NI = Sx.prototype;
11359NI.append = function(t, s) {
11360  this._pairs.push([t, s]);
11361};
11362NI.toString = function(t) {
11363  const s = t ? function(l) {
11364    return t.call(this, l, AS);
11365  } : AS;
11366  return this._pairs.map(function(h) {
11367    return s(h[0]) + "=" + s(h[1]);
11368  }, "").join("&");
11369};
11370function jj(e) {
11371  return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
11372}
11373function $I(e, t, s) {
11374  if (!t)
11375    return e;
11376  const l = s && s.encode || jj;
11377  qe.isFunction(s) && (s = {
11378    serialize: s
11379  });
11380  const h = s && s.serialize;
11381  let g;
11382  if (h ? g = h(t, s) : g = qe.isURLSearchParams(t) ? t.toString() : new Sx(t, s).toString(l), g) {
11383    const m = e.indexOf("#");
11384    m !== -1 && (e = e.slice(0, m)), e += (e.indexOf("?") === -1 ? "?" : "&") + g;
11385  }
11386  return e;
11387}
11388class CS {
11389  constructor() {
11390    this.handlers = [];
11391  }
11392  /**
11393   * Add a new interceptor to the stack
11394   *
11395   * @param {Function} fulfilled The function to handle `then` for a `Promise`
11396   * @param {Function} rejected The function to handle `reject` for a `Promise`
11397   *
11398   * @return {Number} An ID used to remove interceptor later
11399   */
11400  use(t, s, l) {
11401    return this.handlers.push({
11402      fulfilled: t,
11403      rejected: s,
11404      synchronous: l ? l.synchronous : !1,
11405      runWhen: l ? l.runWhen : null
11406    }), this.handlers.length - 1;
11407  }
11408  /**
11409   * Remove an interceptor from the stack
11410   *
11411   * @param {Number} id The ID that was returned by `use`
11412   *
11413   * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
11414   */
11415  eject(t) {
11416    this.handlers[t] && (this.handlers[t] = null);
11417  }
11418  /**
11419   * Clear all interceptors from the stack
11420   *
11421   * @returns {void}
11422   */
11423  clear() {
11424    this.handlers && (this.handlers = []);
11425  }
11426  /**
11427   * Iterate over all the registered interceptors
11428   *
11429   * This method is particularly useful for skipping over any
11430   * interceptors that may have become `null` calling `eject`.
11431   *
11432   * @param {Function} fn The function to call for each interceptor
11433   *
11434   * @returns {void}
11435   */
11436  forEach(t) {
11437    qe.forEach(this.handlers, function(l) {
11438      l !== null && t(l);
11439    });
11440  }
11441}
11442const jI = {
11443  silentJSONParsing: !0,
11444  forcedJSONParsing: !0,
11445  clarifyTimeoutError: !1
11446}, Vj = typeof URLSearchParams < "u" ? URLSearchParams : Sx, Uj = typeof FormData < "u" ? FormData : null, qj = typeof Blob < "u" ? Blob : null, Hj 
vendor: 2,352 bytes, lines 11446-11515
11446= {
11447  isBrowser: !0,
11448  classes: {
11449    URLSearchParams: Vj,
11450    FormData: Uj,
11451    Blob: qj
11452  },
11453  protocols: ["http", "https", "file", "blob", "url", "data"]
11454}, Tx = typeof window < "u" && typeof document < "u", Tv = typeof navigator == "object" && navigator || void 0, Gj = Tx && (!Tv || ["ReactNative", "NativeScript", "NS"].indexOf(Tv.product) < 0), Zj = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
11455self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Wj = Tx && window.location.href || "http://localhost", Kj = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11456  __proto__: null,
11457  hasBrowserEnv: Tx,
11458  hasStandardBrowserEnv: Gj,
11459  hasStandardBrowserWebWorkerEnv: Zj,
11460  navigator: Tv,
11461  origin: Wj
11462}, Symbol.toStringTag, { value: "Module" })), es = {
11463  ...Kj,
11464  ...Hj
11465};
11466function Xj(e, t) {
11467  return Dg(e, new es.classes.URLSearchParams(), {
11468    visitor: function(s, l, h, g) {
11469      return es.isNode && qe.isBuffer(s) ? (this.append(l, s.toString("base64")), !1) : g.defaultVisitor.apply(this, arguments);
11470    },
11471    ...t
11472  });
11473}
11474function Jj(e) {
11475  return qe.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
11476}
11477function Yj(e) {
11478  const t = {}, s = Object.keys(e);
11479  let l;
11480  const h = s.length;
11481  let g;
11482  for (l = 0; l < h; l++)
11483    g = s[l], t[g] = e[g];
11484  return t;
11485}
11486function VI(e) {
11487  function t(s, l, h, g) {
11488    let m = s[g++];
11489    if (m === "__proto__") return !0;
11490    const c = Number.isFinite(+m), w = g >= s.length;
11491    return m = !m && qe.isArray(h) ? h.length : m, w ? (qe.hasOwnProp(h, m) ? h[m] = [h[m], l] : h[m] = l, !c) : ((!h[m] || !qe.isObject(h[m])) && (h[m] = []), t(s, l, h[m], g) && qe.isArray(h[m]) && (h[m] = Yj(h[m])), !c);
11492  }
11493  if (qe.isFormData(e) && qe.isFunction(e.entries)) {
11494    const s = {};
11495    return qe.forEachEntry(e, (l, h) => {
11496      t(Jj(l), h, s, 0);
11497    }), s;
11498  }
11499  return null;
11500}
11501function Qj(e, t, s) {
11502  if (qe.isString(e))
11503    try {
11504      return (t || JSON.parse)(e), qe.trim(e);
11505    } catch (l) {
11506      if (l.name !== "SyntaxError")
11507        throw l;
11508    }
11509  return (s || JSON.stringify)(e);
11510}
11511const Rd = {
11512  transitional: jI,
11513  adapter: ["xhr", "http", "fetch"],
11514  transformRequest: [function(t, s) {
11515    const l = s.getContentType() || "", h = l.indexOf("application/json") > -1, g = qe.isObject(t);
vendor: 9,718 bytes, lines 11516-11865
11516    if (g && qe.isHTMLForm(t) && (t = new FormData(t)), qe.isFormData(t))
11517      return h ? JSON.stringify(VI(t)) : t;
11518    if (qe.isArrayBuffer(t) || qe.isBuffer(t) || qe.isStream(t) || qe.isFile(t) || qe.isBlob(t) || qe.isReadableStream(t))
11519      return t;
11520    if (qe.isArrayBufferView(t))
11521      return t.buffer;
11522    if (qe.isURLSearchParams(t))
11523      return s.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
11524    let c;
11525    if (g) {
11526      if (l.indexOf("application/x-www-form-urlencoded") > -1)
11527        return Xj(t, this.formSerializer).toString();
11528      if ((c = qe.isFileList(t)) || l.indexOf("multipart/form-data") > -1) {
11529        const w = this.env && this.env.FormData;
11530        return Dg(
11531          c ? { "files[]": t } : t,
11532          w && new w(),
11533          this.formSerializer
11534        );
11535      }
11536    }
11537    return g || h ? (s.setContentType("application/json", !1), Qj(t)) : t;
11538  }],
11539  transformResponse: [function(t) {
11540    const s = this.transitional || Rd.transitional, l = s && s.forcedJSONParsing, h = this.responseType === "json";
11541    if (qe.isResponse(t) || qe.isReadableStream(t))
11542      return t;
11543    if (t && qe.isString(t) && (l && !this.responseType || h)) {
11544      const m = !(s && s.silentJSONParsing) && h;
11545      try {
11546        return JSON.parse(t, this.parseReviver);
11547      } catch (c) {
11548        if (m)
11549          throw c.name === "SyntaxError" ? _r.from(c, _r.ERR_BAD_RESPONSE, this, null, this.response) : c;
11550      }
11551    }
11552    return t;
11553  }],
11554  /**
11555   * A timeout in milliseconds to abort a request. If set to 0 (default) a
11556   * timeout is not created.
11557   */
11558  timeout: 0,
11559  xsrfCookieName: "XSRF-TOKEN",
11560  xsrfHeaderName: "X-XSRF-TOKEN",
11561  maxContentLength: -1,
11562  maxBodyLength: -1,
11563  env: {
11564    FormData: es.classes.FormData,
11565    Blob: es.classes.Blob
11566  },
11567  validateStatus: function(t) {
11568    return t >= 200 && t < 300;
11569  },
11570  headers: {
11571    common: {
11572      Accept: "application/json, text/plain, */*",
11573      "Content-Type": void 0
11574    }
11575  }
11576};
11577qe.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
11578  Rd.headers[e] = {};
11579});
11580const eV = qe.toObjectSet([
11581  "age",
11582  "authorization",
11583  "content-length",
11584  "content-type",
11585  "etag",
11586  "expires",
11587  "from",
11588  "host",
11589  "if-modified-since",
11590  "if-unmodified-since",
11591  "last-modified",
11592  "location",
11593  "max-forwards",
11594  "proxy-authorization",
11595  "referer",
11596  "retry-after",
11597  "user-agent"
11598]), tV = (e) => {
11599  const t = {};
11600  let s, l, h;
11601  return e && e.split(`
11602`).forEach(function(m) {
11603    h = m.indexOf(":"), s = m.substring(0, h).trim().toLowerCase(), l = m.substring(h + 1).trim(), !(!s || t[s] && eV[s]) && (s === "set-cookie" ? t[s] ? t[s].push(l) : t[s] = [l] : t[s] = t[s] ? t[s] + ", " + l : l);
11604  }), t;
11605}, IS = Symbol("internals");
11606function Mf(e) {
11607  return e && String(e).trim().toLowerCase();
11608}
11609function Zp(e) {
11610  return e === !1 || e == null ? e : qe.isArray(e) ? e.map(Zp) : String(e);
11611}
11612function rV(e) {
11613  const t = /* @__PURE__ */ Object.create(null), s = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
11614  let l;
11615  for (; l = s.exec(e); )
11616    t[l[1]] = l[2];
11617  return t;
11618}
11619const nV = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
11620function l_(e, t, s, l, h) {
11621  if (qe.isFunction(l))
11622    return l.call(this, t, s);
11623  if (h && (t = s), !!qe.isString(t)) {
11624    if (qe.isString(l))
11625      return t.indexOf(l) !== -1;
11626    if (qe.isRegExp(l))
11627      return l.test(t);
11628  }
11629}
11630function iV(e) {
11631  return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, s, l) => s.toUpperCase() + l);
11632}
11633function sV(e, t) {
11634  const s = qe.toCamelCase(" " + t);
11635  ["get", "set", "has"].forEach((l) => {
11636    Object.defineProperty(e, l + s, {
11637      value: function(h, g, m) {
11638        return this[l].call(this, t, h, g, m);
11639      },
11640      configurable: !0
11641    });
11642  });
11643}
11644let Os = class {
11645  constructor(t) {
11646    t && this.set(t);
11647  }
11648  set(t, s, l) {
11649    const h = this;
11650    function g(c, w, O) {
11651      const P = Mf(w);
11652      if (!P)
11653        throw new Error("header name must be a non-empty string");
11654      const R = qe.findKey(h, P);
11655      (!R || h[R] === void 0 || O === !0 || O === void 0 && h[R] !== !1) && (h[R || w] = Zp(c));
11656    }
11657    const m = (c, w) => qe.forEach(c, (O, P) => g(O, P, w));
11658    if (qe.isPlainObject(t) || t instanceof this.constructor)
11659      m(t, s);
11660    else if (qe.isString(t) && (t = t.trim()) && !nV(t))
11661      m(tV(t), s);
11662    else if (qe.isObject(t) && qe.isIterable(t)) {
11663      let c = {}, w, O;
11664      for (const P of t) {
11665        if (!qe.isArray(P))
11666          throw TypeError("Object iterator must return a key-value pair");
11667        c[O = P[0]] = (w = c[O]) ? qe.isArray(w) ? [...w, P[1]] : [w, P[1]] : P[1];
11668      }
11669      m(c, s);
11670    } else
11671      t != null && g(s, t, l);
11672    return this;
11673  }
11674  get(t, s) {
11675    if (t = Mf(t), t) {
11676      const l = qe.findKey(this, t);
11677      if (l) {
11678        const h = this[l];
11679        if (!s)
11680          return h;
11681        if (s === !0)
11682          return rV(h);
11683        if (qe.isFunction(s))
11684          return s.call(this, h, l);
11685        if (qe.isRegExp(s))
11686          return s.exec(h);
11687        throw new TypeError("parser must be boolean|regexp|function");
11688      }
11689    }
11690  }
11691  has(t, s) {
11692    if (t = Mf(t), t) {
11693      const l = qe.findKey(this, t);
11694      return !!(l && this[l] !== void 0 && (!s || l_(this, this[l], l, s)));
11695    }
11696    return !1;
11697  }
11698  delete(t, s) {
11699    const l = this;
11700    let h = !1;
11701    function g(m) {
11702      if (m = Mf(m), m) {
11703        const c = qe.findKey(l, m);
11704        c && (!s || l_(l, l[c], c, s)) && (delete l[c], h = !0);
11705      }
11706    }
11707    return qe.isArray(t) ? t.forEach(g) : g(t), h;
11708  }
11709  clear(t) {
11710    const s = Object.keys(this);
11711    let l = s.length, h = !1;
11712    for (; l--; ) {
11713      const g = s[l];
11714      (!t || l_(this, this[g], g, t, !0)) && (delete this[g], h = !0);
11715    }
11716    return h;
11717  }
11718  normalize(t) {
11719    const s = this, l = {};
11720    return qe.forEach(this, (h, g) => {
11721      const m = qe.findKey(l, g);
11722      if (m) {
11723        s[m] = Zp(h), delete s[g];
11724        return;
11725      }
11726      const c = t ? iV(g) : String(g).trim();
11727      c !== g && delete s[g], s[c] = Zp(h), l[c] = !0;
11728    }), this;
11729  }
11730  concat(...t) {
11731    return this.constructor.concat(this, ...t);
11732  }
11733  toJSON(t) {
11734    const s = /* @__PURE__ */ Object.create(null);
11735    return qe.forEach(this, (l, h) => {
11736      l != null && l !== !1 && (s[h] = t && qe.isArray(l) ? l.join(", ") : l);
11737    }), s;
11738  }
11739  [Symbol.iterator]() {
11740    return Object.entries(this.toJSON())[Symbol.iterator]();
11741  }
11742  toString() {
11743    return Object.entries(this.toJSON()).map(([t, s]) => t + ": " + s).join(`
11744`);
11745  }
11746  getSetCookie() {
11747    return this.get("set-cookie") || [];
11748  }
11749  get [Symbol.toStringTag]() {
11750    return "AxiosHeaders";
11751  }
11752  static from(t) {
11753    return t instanceof this ? t : new this(t);
11754  }
11755  static concat(t, ...s) {
11756    const l = new this(t);
11757    return s.forEach((h) => l.set(h)), l;
11758  }
11759  static accessor(t) {
11760    const l = (this[IS] = this[IS] = {
11761      accessors: {}
11762    }).accessors, h = this.prototype;
11763    function g(m) {
11764      const c = Mf(m);
11765      l[c] || (sV(h, m), l[c] = !0);
11766    }
11767    return qe.isArray(t) ? t.forEach(g) : g(t), this;
11768  }
11769};
11770Os.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
11771qe.reduceDescriptors(Os.prototype, ({ value: e }, t) => {
11772  let s = t[0].toUpperCase() + t.slice(1);
11773  return {
11774    get: () => e,
11775    set(l) {
11776      this[s] = l;
11777    }
11778  };
11779});
11780qe.freezeMethods(Os);
11781function c_(e, t) {
11782  const s = this || Rd, l = t || s, h = Os.from(l.headers);
11783  let g = l.data;
11784  return qe.forEach(e, function(c) {
11785    g = c.call(s, g, h.normalize(), t ? t.status : void 0);
11786  }), h.normalize(), g;
11787}
11788function UI(e) {
11789  return !!(e && e.__CANCEL__);
11790}
11791function Fh(e, t, s) {
11792  _r.call(this, e ?? "canceled", _r.ERR_CANCELED, t, s), this.name = "CanceledError";
11793}
11794qe.inherits(Fh, _r, {
11795  __CANCEL__: !0
11796});
11797function qI(e, t, s) {
11798  const l = s.config.validateStatus;
11799  !s.status || !l || l(s.status) ? e(s) : t(new _r(
11800    "Request failed with status code " + s.status,
11801    [_r.ERR_BAD_REQUEST, _r.ERR_BAD_RESPONSE][Math.floor(s.status / 100) - 4],
11802    s.config,
11803    s.request,
11804    s
11805  ));
11806}
11807function oV(e) {
11808  const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
11809  return t && t[1] || "";
11810}
11811function aV(e, t) {
11812  e = e || 10;
11813  const s = new Array(e), l = new Array(e);
11814  let h = 0, g = 0, m;
11815  return t = t !== void 0 ? t : 1e3, function(w) {
11816    const O = Date.now(), P = l[g];
11817    m || (m = O), s[h] = w, l[h] = O;
11818    let R = g, z = 0;
11819    for (; R !== h; )
11820      z += s[R++], R = R % e;
11821    if (h = (h + 1) % e, h === g && (g = (g + 1) % e), O - m < t)
11822      return;
11823    const J = P && O - P;
11824    return J ? Math.round(z * 1e3 / J) : void 0;
11825  };
11826}
11827function lV(e, t) {
11828  let s = 0, l = 1e3 / t, h, g;
11829  const m = (O, P = Date.now()) => {
11830    s = P, h = null, g && (clearTimeout(g), g = null), e(...O);
11831  };
11832  return [(...O) => {
11833    const P = Date.now(), R = P - s;
11834    R >= l ? m(O, P) : (h = O, g || (g = setTimeout(() => {
11835      g = null, m(h);
11836    }, l - R)));
11837  }, () => h && m(h)];
11838}
11839const Om = (e, t, s = 3) => {
11840  let l = 0;
11841  const h = aV(50, 250);
11842  return lV((g) => {
11843    const m = g.loaded, c = g.lengthComputable ? g.total : void 0, w = m - l, O = h(w), P = m <= c;
11844    l = m;
11845    const R = {
11846      loaded: m,
11847      total: c,
11848      progress: c ? m / c : void 0,
11849      bytes: w,
11850      rate: O || void 0,
11851      estimated: O && c && P ? (c - m) / O : void 0,
11852      event: g,
11853      lengthComputable: c != null,
11854      [t ? "download" : "upload"]: !0
11855    };
11856    e(R);
11857  }, s);
11858}, PS = (e, t) => {
11859  const s = e != null;
11860  return [(l) => t[0]({
11861    lengthComputable: s,
11862    total: e,
11863    loaded: l
11864  }), t[1]];
11865}, MS = (e) => (...t) => qe.asap(() =>
vendor: 4,178 bytes, lines 11865-11997
11865 e(...t)), cV = es.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (s) => (s = new URL(s, es.origin), e.protocol === s.protocol && e.host === s.host && (t || e.port === s.port)))(
11866  new URL(es.origin),
11867  es.navigator && /(msie|trident)/i.test(es.navigator.userAgent)
11868) : () => !0, uV = es.hasStandardBrowserEnv ? (
11869  // Standard browser envs support document.cookie
11870  {
11871    write(e, t, s, l, h, g) {
11872      const m = [e + "=" + encodeURIComponent(t)];
11873      qe.isNumber(s) && m.push("expires=" + new Date(s).toGMTString()), qe.isString(l) && m.push("path=" + l), qe.isString(h) && m.push("domain=" + h), g === !0 && m.push("secure"), document.cookie = m.join("; ");
11874    },
11875    read(e) {
11876      const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
11877      return t ? decodeURIComponent(t[3]) : null;
11878    },
11879    remove(e) {
11880      this.write(e, "", Date.now() - 864e5);
11881    }
11882  }
11883) : (
11884  // Non-standard browser env (web workers, react-native) lack needed support.
11885  {
11886    write() {
11887    },
11888    read() {
11889      return null;
11890    },
11891    remove() {
11892    }
11893  }
11894);
11895function hV(e) {
11896  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
11897}
11898function fV(e, t) {
11899  return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
11900}
11901function HI(e, t, s) {
11902  let l = !hV(t);
11903  return e && (l || s == !1) ? fV(e, t) : t;
11904}
11905const kS = (e) => e instanceof Os ? { ...e } : e;
11906function nu(e, t) {
11907  t = t || {};
11908  const s = {};
11909  function l(O, P, R, z) {
11910    return qe.isPlainObject(O) && qe.isPlainObject(P) ? qe.merge.call({ caseless: z }, O, P) : qe.isPlainObject(P) ? qe.merge({}, P) : qe.isArray(P) ? P.slice() : P;
11911  }
11912  function h(O, P, R, z) {
11913    if (qe.isUndefined(P)) {
11914      if (!qe.isUndefined(O))
11915        return l(void 0, O, R, z);
11916    } else return l(O, P, R, z);
11917  }
11918  function g(O, P) {
11919    if (!qe.isUndefined(P))
11920      return l(void 0, P);
11921  }
11922  function m(O, P) {
11923    if (qe.isUndefined(P)) {
11924      if (!qe.isUndefined(O))
11925        return l(void 0, O);
11926    } else return l(void 0, P);
11927  }
11928  function c(O, P, R) {
11929    if (R in t)
11930      return l(O, P);
11931    if (R in e)
11932      return l(void 0, O);
11933  }
11934  const w = {
11935    url: g,
11936    method: g,
11937    data: g,
11938    baseURL: m,
11939    transformRequest: m,
11940    transformResponse: m,
11941    paramsSerializer: m,
11942    timeout: m,
11943    timeoutMessage: m,
11944    withCredentials: m,
11945    withXSRFToken: m,
11946    adapter: m,
11947    responseType: m,
11948    xsrfCookieName: m,
11949    xsrfHeaderName: m,
11950    onUploadProgress: m,
11951    onDownloadProgress: m,
11952    decompress: m,
11953    maxContentLength: m,
11954    maxBodyLength: m,
11955    beforeRedirect: m,
11956    transport: m,
11957    httpAgent: m,
11958    httpsAgent: m,
11959    cancelToken: m,
11960    socketPath: m,
11961    responseEncoding: m,
11962    validateStatus: c,
11963    headers: (O, P, R) => h(kS(O), kS(P), R, !0)
11964  };
11965  return qe.forEach(Object.keys({ ...e, ...t }), function(P) {
11966    const R = w[P] || h, z = R(e[P], t[P], P);
11967    qe.isUndefined(z) && R !== c || (s[P] = z);
11968  }), s;
11969}
11970const GI = (e) => {
11971  const t = nu({}, e);
11972  let { data: s, withXSRFToken: l, xsrfHeaderName: h, xsrfCookieName: g, headers: m, auth: c } = t;
11973  if (t.headers = m = Os.from(m), t.url = $I(HI(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && m.set(
11974    "Authorization",
11975    "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
11976  ), qe.isFormData(s)) {
11977    if (es.hasStandardBrowserEnv || es.hasStandardBrowserWebWorkerEnv)
11978      m.setContentType(void 0);
11979    else if (qe.isFunction(s.getHeaders)) {
11980      const w = s.getHeaders(), O = ["content-type", "content-length"];
11981      Object.entries(w).forEach(([P, R]) => {
11982        O.includes(P.toLowerCase()) && m.set(P, R);
11983      });
11984    }
11985  }
11986  if (es.hasStandardBrowserEnv && (l && qe.isFunction(l) && (l = l(t)), l || l !== !1 && cV(t.url))) {
11987    const w = h && g && uV.read(g);
11988    w && m.set(h, w);
11989  }
11990  return t;
11991}, dV = typeof XMLHttpRequest < "u", pV = dV && function(e) {
11992  return new Promise(function(s, l) {
11993    const h = GI(e);
11994    let g = h.data;
11995    const m = Os.from(h.headers).normalize();
11996    let { responseType: c, onUploadProgress: w, onDownloadProgress: O } = h, P, R, z, J, K;
11997    function ee() {
vendor: 5,012 bytes, lines 11998-12148
11998      J && J(), K && K(), h.cancelToken && h.cancelToken.unsubscribe(P), h.signal && h.signal.removeEventListener("abort", P);
11999    }
12000    let ue = new XMLHttpRequest();
12001    ue.open(h.method.toUpperCase(), h.url, !0), ue.timeout = h.timeout;
12002    function Ce() {
12003      if (!ue)
12004        return;
12005      const X = Os.from(
12006        "getAllResponseHeaders" in ue && ue.getAllResponseHeaders()
12007      ), Ae = {
12008        data: !c || c === "text" || c === "json" ? ue.responseText : ue.response,
12009        status: ue.status,
12010        statusText: ue.statusText,
12011        headers: X,
12012        config: e,
12013        request: ue
12014      };
12015      qI(function(je) {
12016        s(je), ee();
12017      }, function(je) {
12018        l(je), ee();
12019      }, Ae), ue = null;
12020    }
12021    "onloadend" in ue ? ue.onloadend = Ce : ue.onreadystatechange = function() {
12022      !ue || ue.readyState !== 4 || ue.status === 0 && !(ue.responseURL && ue.responseURL.indexOf("file:") === 0) || setTimeout(Ce);
12023    }, ue.onabort = function() {
12024      ue && (l(new _r("Request aborted", _r.ECONNABORTED, e, ue)), ue = null);
12025    }, ue.onerror = function(ye) {
12026      const Ae = ye && ye.message ? ye.message : "Network Error", Se = new _r(Ae, _r.ERR_NETWORK, e, ue);
12027      Se.event = ye || null, l(Se), ue = null;
12028    }, ue.ontimeout = function() {
12029      let ye = h.timeout ? "timeout of " + h.timeout + "ms exceeded" : "timeout exceeded";
12030      const Ae = h.transitional || jI;
12031      h.timeoutErrorMessage && (ye = h.timeoutErrorMessage), l(new _r(
12032        ye,
12033        Ae.clarifyTimeoutError ? _r.ETIMEDOUT : _r.ECONNABORTED,
12034        e,
12035        ue
12036      )), ue = null;
12037    }, g === void 0 && m.setContentType(null), "setRequestHeader" in ue && qe.forEach(m.toJSON(), function(ye, Ae) {
12038      ue.setRequestHeader(Ae, ye);
12039    }), qe.isUndefined(h.withCredentials) || (ue.withCredentials = !!h.withCredentials), c && c !== "json" && (ue.responseType = h.responseType), O && ([z, K] = Om(O, !0), ue.addEventListener("progress", z)), w && ue.upload && ([R, J] = Om(w), ue.upload.addEventListener("progress", R), ue.upload.addEventListener("loadend", J)), (h.cancelToken || h.signal) && (P = (X) => {
12040      ue && (l(!X || X.type ? new Fh(null, e, ue) : X), ue.abort(), ue = null);
12041    }, h.cancelToken && h.cancelToken.subscribe(P), h.signal && (h.signal.aborted ? P() : h.signal.addEventListener("abort", P)));
12042    const ge = oV(h.url);
12043    if (ge && es.protocols.indexOf(ge) === -1) {
12044      l(new _r("Unsupported protocol " + ge + ":", _r.ERR_BAD_REQUEST, e));
12045      return;
12046    }
12047    ue.send(g || null);
12048  });
12049}, mV = (e, t) => {
12050  const { length: s } = e = e ? e.filter(Boolean) : [];
12051  if (t || s) {
12052    let l = new AbortController(), h;
12053    const g = function(O) {
12054      if (!h) {
12055        h = !0, c();
12056        const P = O instanceof Error ? O : this.reason;
12057        l.abort(P instanceof _r ? P : new Fh(P instanceof Error ? P.message : P));
12058      }
12059    };
12060    let m = t && setTimeout(() => {
12061      m = null, g(new _r(`timeout ${t} of ms exceeded`, _r.ETIMEDOUT));
12062    }, t);
12063    const c = () => {
12064      e && (m && clearTimeout(m), m = null, e.forEach((O) => {
12065        O.unsubscribe ? O.unsubscribe(g) : O.removeEventListener("abort", g);
12066      }), e = null);
12067    };
12068    e.forEach((O) => O.addEventListener("abort", g));
12069    const { signal: w } = l;
12070    return w.unsubscribe = () => qe.asap(c), w;
12071  }
12072}, gV = function* (e, t) {
12073  let s = e.byteLength;
12074  if (s < t) {
12075    yield e;
12076    return;
12077  }
12078  let l = 0, h;
12079  for (; l < s; )
12080    h = l + t, yield e.slice(l, h), l = h;
12081}, yV = async function* (e, t) {
12082  for await (const s of _V(e))
12083    yield* gV(s, t);
12084}, _V = async function* (e) {
12085  if (e[Symbol.asyncIterator]) {
12086    yield* e;
12087    return;
12088  }
12089  const t = e.getReader();
12090  try {
12091    for (; ; ) {
12092      const { done: s, value: l } = await t.read();
12093      if (s)
12094        break;
12095      yield l;
12096    }
12097  } finally {
12098    await t.cancel();
12099  }
12100}, OS = (e, t, s, l) => {
12101  const h = yV(e, t);
12102  let g = 0, m, c = (w) => {
12103    m || (m = !0, l && l(w));
12104  };
12105  return new ReadableStream({
12106    async pull(w) {
12107      try {
12108        const { done: O, value: P } = await h.next();
12109        if (O) {
12110          c(), w.close();
12111          return;
12112        }
12113        let R = P.byteLength;
12114        if (s) {
12115          let z = g += R;
12116          s(z);
12117        }
12118        w.enqueue(new Uint8Array(P));
12119      } catch (O) {
12120        throw c(O), O;
12121      }
12122    },
12123    cancel(w) {
12124      return c(w), h.return();
12125    }
12126  }, {
12127    highWaterMark: 2
12128  });
12129}, DS = 64 * 1024, { isFunction: Lp } = qe, vV = (({ Request: e, Response: t }) => ({
12130  Request: e,
12131  Response: t
12132}))(qe.global), {
12133  ReadableStream: RS,
12134  TextEncoder: LS
12135} = qe.global, FS = (e, ...t) => {
12136  try {
12137    return !!e(...t);
12138  } catch {
12139    return !1;
12140  }
12141}, bV = (e) => {
12142  e = qe.merge.call({
12143    skipUndefined: !0
12144  }, vV, e);
12145  const { fetch: t, Request: s, Response: l } = e, h = t ? Lp(t) : typeof fetch == "function", g = Lp(s), m = Lp(l);
12146  if (!h)
12147    return !1;
12148  const c = h && Lp(RS), w = h && (typeof LS == "function" ? /* @__P
vendor: 4,145 bytes, lines 12148-12282
12148URE__ */ ((K) => (ee) => K.encode(ee))(new LS()) : async (K) => new Uint8Array(await new s(K).arrayBuffer())), O = g && c && FS(() => {
12149    let K = !1;
12150    const ee = new s(es.origin, {
12151      body: new RS(),
12152      method: "POST",
12153      get duplex() {
12154        return K = !0, "half";
12155      }
12156    }).headers.has("Content-Type");
12157    return K && !ee;
12158  }), P = m && c && FS(() => qe.isReadableStream(new l("").body)), R = {
12159    stream: P && ((K) => K.body)
12160  };
12161  h && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((K) => {
12162    !R[K] && (R[K] = (ee, ue) => {
12163      let Ce = ee && ee[K];
12164      if (Ce)
12165        return Ce.call(ee);
12166      throw new _r(`Response type '${K}' is not supported`, _r.ERR_NOT_SUPPORT, ue);
12167    });
12168  });
12169  const z = async (K) => {
12170    if (K == null)
12171      return 0;
12172    if (qe.isBlob(K))
12173      return K.size;
12174    if (qe.isSpecCompliantForm(K))
12175      return (await new s(es.origin, {
12176        method: "POST",
12177        body: K
12178      }).arrayBuffer()).byteLength;
12179    if (qe.isArrayBufferView(K) || qe.isArrayBuffer(K))
12180      return K.byteLength;
12181    if (qe.isURLSearchParams(K) && (K = K + ""), qe.isString(K))
12182      return (await w(K)).byteLength;
12183  }, J = async (K, ee) => {
12184    const ue = qe.toFiniteNumber(K.getContentLength());
12185    return ue ?? z(ee);
12186  };
12187  return async (K) => {
12188    let {
12189      url: ee,
12190      method: ue,
12191      data: Ce,
12192      signal: ge,
12193      cancelToken: X,
12194      timeout: ye,
12195      onDownloadProgress: Ae,
12196      onUploadProgress: Se,
12197      responseType: je,
12198      headers: Ne,
12199      withCredentials: Oe = "same-origin",
12200      fetchOptions: ze
12201    } = GI(K), He = t || fetch;
12202    je = je ? (je + "").toLowerCase() : "text";
12203    let Ie = mV([ge, X && X.toAbortSignal()], ye), $e = null;
12204    const Xe = Ie && Ie.unsubscribe && (() => {
12205      Ie.unsubscribe();
12206    });
12207    let st;
12208    try {
12209      if (Se && O && ue !== "get" && ue !== "head" && (st = await J(Ne, Ce)) !== 0) {
12210        let Qt = new s(ee, {
12211          method: "POST",
12212          body: Ce,
12213          duplex: "half"
12214        }), ur;
12215        if (qe.isFormData(Ce) && (ur = Qt.headers.get("content-type")) && Ne.setContentType(ur), Qt.body) {
12216          const [Ar, en] = PS(
12217            st,
12218            Om(MS(Se))
12219          );
12220          Ce = OS(Qt.body, DS, Ar, en);
12221        }
12222      }
12223      qe.isString(Oe) || (Oe = Oe ? "include" : "omit");
12224      const Ge = g && "credentials" in s.prototype, ct = {
12225        ...ze,
12226        signal: Ie,
12227        method: ue.toUpperCase(),
12228        headers: Ne.normalize().toJSON(),
12229        body: Ce,
12230        duplex: "half",
12231        credentials: Ge ? Oe : void 0
12232      };
12233      $e = g && new s(ee, ct);
12234      let ot = await (g ? He($e, ze) : He(ee, ct));
12235      const Ht = P && (je === "stream" || je === "response");
12236      if (P && (Ae || Ht && Xe)) {
12237        const Qt = {};
12238        ["status", "statusText", "headers"].forEach(($r) => {
12239          Qt[$r] = ot[$r];
12240        });
12241        const ur = qe.toFiniteNumber(ot.headers.get("content-length")), [Ar, en] = Ae && PS(
12242          ur,
12243          Om(MS(Ae), !0)
12244        ) || [];
12245        ot = new l(
12246          OS(ot.body, DS, Ar, () => {
12247            en && en(), Xe && Xe();
12248          }),
12249          Qt
12250        );
12251      }
12252      je = je || "text";
12253      let fr = await R[qe.findKey(R, je) || "text"](ot, K);
12254      return !Ht && Xe && Xe(), await new Promise((Qt, ur) => {
12255        qI(Qt, ur, {
12256          data: fr,
12257          headers: Os.from(ot.headers),
12258          status: ot.status,
12259          statusText: ot.statusText,
12260          config: K,
12261          request: $e
12262        });
12263      });
12264    } catch (Ge) {
12265      throw Xe && Xe(), Ge && Ge.name === "TypeError" && /Load failed|fetch/i.test(Ge.message) ? Object.assign(
12266        new _r("Network Error", _r.ERR_NETWORK, K, $e),
12267        {
12268          cause: Ge.cause || Ge
12269        }
12270      ) : _r.from(Ge, Ge && Ge.code, K, $e);
12271    }
12272  };
12273}, xV = /* @__PURE__ */ new Map(), ZI = (e) => {
12274  let t = e ? e.env : {};
12275  const { fetch: s, Request: l, Response: h } = t, g = [
12276    l,
12277    h,
12278    s
12279  ];
12280  let m = g.length, c = m, w, O, P = xV;
12281  for (; c--; )
12282    w = g[c], O = P.get(w), O === void 0 && P.set(w, O = c ? /* @__P
vendor: 5,108 bytes, lines 12282-12448
12282URE__ */ new Map() : bV(t)), P = O;
12283  return O;
12284};
12285ZI();
12286const Ev = {
12287  http: Bj,
12288  xhr: pV,
12289  fetch: {
12290    get: ZI
12291  }
12292};
12293qe.forEach(Ev, (e, t) => {
12294  if (e) {
12295    try {
12296      Object.defineProperty(e, "name", { value: t });
12297    } catch {
12298    }
12299    Object.defineProperty(e, "adapterName", { value: t });
12300  }
12301});
12302const zS = (e) => `- ${e}`, wV = (e) => qe.isFunction(e) || e === null || e === !1, WI = {
12303  getAdapter: (e, t) => {
12304    e = qe.isArray(e) ? e : [e];
12305    const { length: s } = e;
12306    let l, h;
12307    const g = {};
12308    for (let m = 0; m < s; m++) {
12309      l = e[m];
12310      let c;
12311      if (h = l, !wV(l) && (h = Ev[(c = String(l)).toLowerCase()], h === void 0))
12312        throw new _r(`Unknown adapter '${c}'`);
12313      if (h && (qe.isFunction(h) || (h = h.get(t))))
12314        break;
12315      g[c || "#" + m] = h;
12316    }
12317    if (!h) {
12318      const m = Object.entries(g).map(
12319        ([w, O]) => `adapter ${w} ` + (O === !1 ? "is not supported by the environment" : "is not available in the build")
12320      );
12321      let c = s ? m.length > 1 ? `since :
12322` + m.map(zS).join(`
12323`) : " " + zS(m[0]) : "as no adapter specified";
12324      throw new _r(
12325        "There is no suitable adapter to dispatch the request " + c,
12326        "ERR_NOT_SUPPORT"
12327      );
12328    }
12329    return h;
12330  },
12331  adapters: Ev
12332};
12333function u_(e) {
12334  if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
12335    throw new Fh(null, e);
12336}
12337function BS(e) {
12338  return u_(e), e.headers = Os.from(e.headers), e.data = c_.call(
12339    e,
12340    e.transformRequest
12341  ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), WI.getAdapter(e.adapter || Rd.adapter, e)(e).then(function(l) {
12342    return u_(e), l.data = c_.call(
12343      e,
12344      e.transformResponse,
12345      l
12346    ), l.headers = Os.from(l.headers), l;
12347  }, function(l) {
12348    return UI(l) || (u_(e), l && l.response && (l.response.data = c_.call(
12349      e,
12350      e.transformResponse,
12351      l.response
12352    ), l.response.headers = Os.from(l.response.headers))), Promise.reject(l);
12353  });
12354}
12355const KI = "1.12.2", Rg = {};
12356["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
12357  Rg[e] = function(l) {
12358    return typeof l === e || "a" + (t < 1 ? "n " : " ") + e;
12359  };
12360});
12361const NS = {};
12362Rg.transitional = function(t, s, l) {
12363  function h(g, m) {
12364    return "[Axios v" + KI + "] Transitional option '" + g + "'" + m + (l ? ". " + l : "");
12365  }
12366  return (g, m, c) => {
12367    if (t === !1)
12368      throw new _r(
12369        h(m, " has been removed" + (s ? " in " + s : "")),
12370        _r.ERR_DEPRECATED
12371      );
12372    return s && !NS[m] && (NS[m] = !0, console.warn(
12373      h(
12374        m,
12375        " has been deprecated since v" + s + " and will be removed in the near future"
12376      )
12377    )), t ? t(g, m, c) : !0;
12378  };
12379};
12380Rg.spelling = function(t) {
12381  return (s, l) => (console.warn(`${l} is likely a misspelling of ${t}`), !0);
12382};
12383function SV(e, t, s) {
12384  if (typeof e != "object")
12385    throw new _r("options must be an object", _r.ERR_BAD_OPTION_VALUE);
12386  const l = Object.keys(e);
12387  let h = l.length;
12388  for (; h-- > 0; ) {
12389    const g = l[h], m = t[g];
12390    if (m) {
12391      const c = e[g], w = c === void 0 || m(c, g, e);
12392      if (w !== !0)
12393        throw new _r("option " + g + " must be " + w, _r.ERR_BAD_OPTION_VALUE);
12394      continue;
12395    }
12396    if (s !== !0)
12397      throw new _r("Unknown option " + g, _r.ERR_BAD_OPTION);
12398  }
12399}
12400const Wp = {
12401  assertOptions: SV,
12402  validators: Rg
12403}, ha = Wp.validators;
12404let Kc = class {
12405  constructor(t) {
12406    this.defaults = t || {}, this.interceptors = {
12407      request: new CS(),
12408      response: new CS()
12409    };
12410  }
12411  /**
12412   * Dispatch a request
12413   *
12414   * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
12415   * @param {?Object} config
12416   *
12417   * @returns {Promise} The Promise to be fulfilled
12418   */
12419  async request(t, s) {
12420    try {
12421      return await this._request(t, s);
12422    } catch (l) {
12423      if (l instanceof Error) {
12424        let h = {};
12425        Error.captureStackTrace ? Error.captureStackTrace(h) : h = new Error();
12426        const g = h.stack ? h.stack.replace(/^.+\n/, "") : "";
12427        try {
12428          l.stack ? g && !String(l.stack).endsWith(g.replace(/^.+\n.+\n/, "")) && (l.stack += `
12429` + g) : l.stack = g;
12430        } catch {
12431        }
12432      }
12433      throw l;
12434    }
12435  }
12436  _request(t, s) {
12437    typeof t == "string" ? (s = s || {}, s.url = t) : s = t || {}, s = nu(this.defaults, s);
12438    const { transitional: l, paramsSerializer: h, headers: g } = s;
12439    l !== void 0 && Wp.assertOptions(l, {
12440      silentJSONParsing: ha.transitional(ha.boolean),
12441      forcedJSONParsing: ha.transitional(ha.boolean),
12442      clarifyTimeoutError: ha.transitional(ha.boolean)
12443    }, !1), h != null && (qe.isFunction(h) ? s.paramsSerializer = {
12444      serialize: h
12445    } : Wp.assertOptions(h, {
12446      encode: ha.function,
12447      serialize: ha.function
12448    }, !0)), s.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? s.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : s.allowAbsoluteUrls = !0), Wp.assertOptions(s, {
vendor: 6,063 bytes, lines 12449-12699
12449      baseUrl: ha.spelling("baseURL"),
12450      withXsrfToken: ha.spelling("withXSRFToken")
12451    }, !0), s.method = (s.method || this.defaults.method || "get").toLowerCase();
12452    let m = g && qe.merge(
12453      g.common,
12454      g[s.method]
12455    );
12456    g && qe.forEach(
12457      ["delete", "get", "head", "post", "put", "patch", "common"],
12458      (K) => {
12459        delete g[K];
12460      }
12461    ), s.headers = Os.concat(m, g);
12462    const c = [];
12463    let w = !0;
12464    this.interceptors.request.forEach(function(ee) {
12465      typeof ee.runWhen == "function" && ee.runWhen(s) === !1 || (w = w && ee.synchronous, c.unshift(ee.fulfilled, ee.rejected));
12466    });
12467    const O = [];
12468    this.interceptors.response.forEach(function(ee) {
12469      O.push(ee.fulfilled, ee.rejected);
12470    });
12471    let P, R = 0, z;
12472    if (!w) {
12473      const K = [BS.bind(this), void 0];
12474      for (K.unshift(...c), K.push(...O), z = K.length, P = Promise.resolve(s); R < z; )
12475        P = P.then(K[R++], K[R++]);
12476      return P;
12477    }
12478    z = c.length;
12479    let J = s;
12480    for (; R < z; ) {
12481      const K = c[R++], ee = c[R++];
12482      try {
12483        J = K(J);
12484      } catch (ue) {
12485        ee.call(this, ue);
12486        break;
12487      }
12488    }
12489    try {
12490      P = BS.call(this, J);
12491    } catch (K) {
12492      return Promise.reject(K);
12493    }
12494    for (R = 0, z = O.length; R < z; )
12495      P = P.then(O[R++], O[R++]);
12496    return P;
12497  }
12498  getUri(t) {
12499    t = nu(this.defaults, t);
12500    const s = HI(t.baseURL, t.url, t.allowAbsoluteUrls);
12501    return $I(s, t.params, t.paramsSerializer);
12502  }
12503};
12504qe.forEach(["delete", "get", "head", "options"], function(t) {
12505  Kc.prototype[t] = function(s, l) {
12506    return this.request(nu(l || {}, {
12507      method: t,
12508      url: s,
12509      data: (l || {}).data
12510    }));
12511  };
12512});
12513qe.forEach(["post", "put", "patch"], function(t) {
12514  function s(l) {
12515    return function(g, m, c) {
12516      return this.request(nu(c || {}, {
12517        method: t,
12518        headers: l ? {
12519          "Content-Type": "multipart/form-data"
12520        } : {},
12521        url: g,
12522        data: m
12523      }));
12524    };
12525  }
12526  Kc.prototype[t] = s(), Kc.prototype[t + "Form"] = s(!0);
12527});
12528let TV = class XI {
12529  constructor(t) {
12530    if (typeof t != "function")
12531      throw new TypeError("executor must be a function.");
12532    let s;
12533    this.promise = new Promise(function(g) {
12534      s = g;
12535    });
12536    const l = this;
12537    this.promise.then((h) => {
12538      if (!l._listeners) return;
12539      let g = l._listeners.length;
12540      for (; g-- > 0; )
12541        l._listeners[g](h);
12542      l._listeners = null;
12543    }), this.promise.then = (h) => {
12544      let g;
12545      const m = new Promise((c) => {
12546        l.subscribe(c), g = c;
12547      }).then(h);
12548      return m.cancel = function() {
12549        l.unsubscribe(g);
12550      }, m;
12551    }, t(function(g, m, c) {
12552      l.reason || (l.reason = new Fh(g, m, c), s(l.reason));
12553    });
12554  }
12555  /**
12556   * Throws a `CanceledError` if cancellation has been requested.
12557   */
12558  throwIfRequested() {
12559    if (this.reason)
12560      throw this.reason;
12561  }
12562  /**
12563   * Subscribe to the cancel signal
12564   */
12565  subscribe(t) {
12566    if (this.reason) {
12567      t(this.reason);
12568      return;
12569    }
12570    this._listeners ? this._listeners.push(t) : this._listeners = [t];
12571  }
12572  /**
12573   * Unsubscribe from the cancel signal
12574   */
12575  unsubscribe(t) {
12576    if (!this._listeners)
12577      return;
12578    const s = this._listeners.indexOf(t);
12579    s !== -1 && this._listeners.splice(s, 1);
12580  }
12581  toAbortSignal() {
12582    const t = new AbortController(), s = (l) => {
12583      t.abort(l);
12584    };
12585    return this.subscribe(s), t.signal.unsubscribe = () => this.unsubscribe(s), t.signal;
12586  }
12587  /**
12588   * Returns an object that contains a new `CancelToken` and a function that, when called,
12589   * cancels the `CancelToken`.
12590   */
12591  static source() {
12592    let t;
12593    return {
12594      token: new XI(function(h) {
12595        t = h;
12596      }),
12597      cancel: t
12598    };
12599  }
12600};
12601function EV(e) {
12602  return function(s) {
12603    return e.apply(null, s);
12604  };
12605}
12606function AV(e) {
12607  return qe.isObject(e) && e.isAxiosError === !0;
12608}
12609const Av = {
12610  Continue: 100,
12611  SwitchingProtocols: 101,
12612  Processing: 102,
12613  EarlyHints: 103,
12614  Ok: 200,
12615  Created: 201,
12616  Accepted: 202,
12617  NonAuthoritativeInformation: 203,
12618  NoContent: 204,
12619  ResetContent: 205,
12620  PartialContent: 206,
12621  MultiStatus: 207,
12622  AlreadyReported: 208,
12623  ImUsed: 226,
12624  MultipleChoices: 300,
12625  MovedPermanently: 301,
12626  Found: 302,
12627  SeeOther: 303,
12628  NotModified: 304,
12629  UseProxy: 305,
12630  Unused: 306,
12631  TemporaryRedirect: 307,
12632  PermanentRedirect: 308,
12633  BadRequest: 400,
12634  Unauthorized: 401,
12635  PaymentRequired: 402,
12636  Forbidden: 403,
12637  NotFound: 404,
12638  MethodNotAllowed: 405,
12639  NotAcceptable: 406,
12640  ProxyAuthenticationRequired: 407,
12641  RequestTimeout: 408,
12642  Conflict: 409,
12643  Gone: 410,
12644  LengthRequired: 411,
12645  PreconditionFailed: 412,
12646  PayloadTooLarge: 413,
12647  UriTooLong: 414,
12648  UnsupportedMediaType: 415,
12649  RangeNotSatisfiable: 416,
12650  ExpectationFailed: 417,
12651  ImATeapot: 418,
12652  MisdirectedRequest: 421,
12653  UnprocessableEntity: 422,
12654  Locked: 423,
12655  FailedDependency: 424,
12656  TooEarly: 425,
12657  UpgradeRequired: 426,
12658  PreconditionRequired: 428,
12659  TooManyRequests: 429,
12660  RequestHeaderFieldsTooLarge: 431,
12661  UnavailableForLegalReasons: 451,
12662  InternalServerError: 500,
12663  NotImplemented: 501,
12664  BadGateway: 502,
12665  ServiceUnavailable: 503,
12666  GatewayTimeout: 504,
12667  HttpVersionNotSupported: 505,
12668  VariantAlsoNegotiates: 506,
12669  InsufficientStorage: 507,
12670  LoopDetected: 508,
12671  NotExtended: 510,
12672  NetworkAuthenticationRequired: 511
12673};
12674Object.entries(Av).forEach(([e, t]) => {
12675  Av[t] = e;
12676});
12677function JI(e) {
12678  const t = new Kc(e), s = II(Kc.prototype.request, t);
12679  return qe.extend(s, Kc.prototype, t, { allOwnKeys: !0 }), qe.extend(s, t, null, { allOwnKeys: !0 }), s.create = function(h) {
12680    return JI(nu(e, h));
12681  }, s;
12682}
12683const ni = JI(Rd);
12684ni.Axios = Kc;
12685ni.CanceledError = Fh;
12686ni.CancelToken = TV;
12687ni.isCancel = UI;
12688ni.VERSION = KI;
12689ni.toFormData = Dg;
12690ni.AxiosError = _r;
12691ni.Cancel = ni.CanceledError;
12692ni.all = function(t) {
12693  return Promise.all(t);
12694};
12695ni.spread = EV;
12696ni.isAxiosError = AV;
12697ni.mergeConfig = nu;
12698ni.AxiosHeaders = Os;
12699ni.formToJSON = (e) =>
vendor: 9,100 bytes, lines 12699-12915
12699 VI(qe.isHTMLForm(e) ? new FormData(e) : e);
12700ni.getAdapter = WI.getAdapter;
12701ni.HttpStatusCode = Av;
12702ni.default = ni;
12703const {
12704  Axios: sX,
12705  AxiosError: oX,
12706  CanceledError: aX,
12707  isCancel: lX,
12708  CancelToken: cX,
12709  VERSION: uX,
12710  all: hX,
12711  Cancel: fX,
12712  isAxiosError: dX,
12713  spread: pX,
12714  toFormData: mX,
12715  AxiosHeaders: gX,
12716  HttpStatusCode: yX,
12717  formToJSON: _X,
12718  getAdapter: vX,
12719  mergeConfig: bX
12720} = ni;
12721var CV = Dh, IV = Eg, PV = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, MV = /^\w*$/;
12722function kV(e, t) {
12723  if (CV(e))
12724    return !1;
12725  var s = typeof e;
12726  return s == "number" || s == "symbol" || s == "boolean" || e == null || IV(e) ? !0 : MV.test(e) || !PV.test(e) || t != null && e in Object(t);
12727}
12728var OV = kV, YI = xx, DV = "Expected a function";
12729function Ex(e, t) {
12730  if (typeof e != "function" || t != null && typeof t != "function")
12731    throw new TypeError(DV);
12732  var s = function() {
12733    var l = arguments, h = t ? t.apply(this, l) : l[0], g = s.cache;
12734    if (g.has(h))
12735      return g.get(h);
12736    var m = e.apply(this, l);
12737    return s.cache = g.set(h, m) || g, m;
12738  };
12739  return s.cache = new (Ex.Cache || YI)(), s;
12740}
12741Ex.Cache = YI;
12742var RV = Ex, LV = RV, FV = 500;
12743function zV(e) {
12744  var t = LV(e, function(l) {
12745    return s.size === FV && s.clear(), l;
12746  }), s = t.cache;
12747  return t;
12748}
12749var BV = zV, NV = BV, $V = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, jV = /\\(\\)?/g, VV = NV(function(e) {
12750  var t = [];
12751  return e.charCodeAt(0) === 46 && t.push(""), e.replace($V, function(s, l, h, g) {
12752    t.push(h ? g.replace(jV, "$1") : l || s);
12753  }), t;
12754}), UV = VV;
12755function qV(e, t) {
12756  for (var s = -1, l = e == null ? 0 : e.length, h = Array(l); ++s < l; )
12757    h[s] = t(e[s], s, e);
12758  return h;
12759}
12760var HV = qV, $S = Tg, GV = HV, ZV = Dh, WV = Eg, jS = $S ? $S.prototype : void 0, VS = jS ? jS.toString : void 0;
12761function QI(e) {
12762  if (typeof e == "string")
12763    return e;
12764  if (ZV(e))
12765    return GV(e, QI) + "";
12766  if (WV(e))
12767    return VS ? VS.call(e) : "";
12768  var t = e + "";
12769  return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
12770}
12771var KV = QI, XV = KV;
12772function JV(e) {
12773  return e == null ? "" : XV(e);
12774}
12775var Ld = JV, YV = Dh, QV = OV, eU = UV, tU = Ld;
12776function rU(e, t) {
12777  return YV(e) ? e : QV(e, t) ? [e] : eU(tU(e));
12778}
12779var nU = rU, iU = Eg;
12780function sU(e) {
12781  if (typeof e == "string" || iU(e))
12782    return e;
12783  var t = e + "";
12784  return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
12785}
12786var oU = sU, aU = nU, lU = oU;
12787function cU(e, t) {
12788  t = aU(t, e);
12789  for (var s = 0, l = t.length; e != null && s < l; )
12790    e = e[lU(t[s++])];
12791  return s && s == l ? e : void 0;
12792}
12793var uU = cU, hU = uU;
12794function fU(e, t, s) {
12795  var l = e == null ? void 0 : hU(e, t);
12796  return l === void 0 ? s : l;
12797}
12798var dU = fU;
12799const xX = /* @__PURE__ */ xa(dU);
12800var Ao = TypeError;
12801const pU = {}, mU = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12802  __proto__: null,
12803  default: pU
12804}, Symbol.toStringTag, { value: "Module" })), gU = /* @__PURE__ */ pI(mU);
12805var Ax = typeof Map == "function" && Map.prototype, h_ = Object.getOwnPropertyDescriptor && Ax ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, Dm = Ax && h_ && typeof h_.get == "function" ? h_.get : null, US = Ax && Map.prototype.forEach, Cx = typeof Set == "function" && Set.prototype, f_ = Object.getOwnPropertyDescriptor && Cx ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Rm = Cx && f_ && typeof f_.get == "function" ? f_.get : null, qS = Cx && Set.prototype.forEach, yU = typeof WeakMap == "function" && WeakMap.prototype, Vf = yU ? WeakMap.prototype.has : null, _U = typeof WeakSet == "function" && WeakSet.prototype, Uf = _U ? WeakSet.prototype.has : null, vU = typeof WeakRef == "function" && WeakRef.prototype, HS = vU ? WeakRef.prototype.deref : null, bU = Boolean.prototype.valueOf, xU = Object.prototype.toString, wU = Function.prototype.toString, SU = String.prototype.match, Ix = String.prototype.slice, Xl = String.prototype.replace, TU = String.prototype.toUpperCase, GS = String.prototype.toLowerCase, eP = RegExp.prototype.test, ZS = Array.prototype.concat, ma = Array.prototype.join, EU = Array.prototype.slice, WS = Math.floor, Cv = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, d_ = Object.getOwnPropertySymbols, Iv = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, vh = typeof Symbol == "function" && typeof Symbol.iterator == "object", qf = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === vh || !0) ? Symbol.toStringTag : null, tP = Object.prototype.propertyIsEnumerable, KS = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(e) {
12806  return e.__proto__;
12807} : null);
12808function XS(e, t) {
12809  if (e === 1 / 0 || e === -1 / 0 || e !== e || e && e > -1e3 && e < 1e3 || eP.call(/e/, t))
12810    return t;
12811  var s = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
12812  if (typeof e == "number") {
12813    var l = e < 0 ? -WS(-e) : WS(e);
12814    if (l !== e) {
12815      var h = String(l), g = Ix.call(t, h.length + 1);
12816      return Xl.call(h, s, "$&_") + "." + Xl.call(Xl.call(g, /([0-9]{3})/g, "$&_"), /_$/, "");
12817    }
12818  }
12819  return Xl.call(t, s, "$&_");
12820}
12821var Pv = gU, JS = Pv.custom, YS = iP(JS) ? JS : null, rP = {
12822  __proto__: null,
12823  double: '"',
12824  single: "'"
12825}, AU = {
12826  __proto__: null,
12827  double: /(["\\])/g,
12828  single: /(['\\])/g
12829}, Lg = function e(t, s, l, h) {
12830  var g = s || {};
12831  if (Xa(g, "quoteStyle") && !Xa(rP, g.quoteStyle))
12832    throw new TypeError('option "quoteStyle" must be "single" or "double"');
12833  if (Xa(g, "maxStringLength") && (typeof g.maxStringLength == "number" ? g.maxStringLength < 0 && g.maxStringLength !== 1 / 0 : g.maxStringLength !== null))
12834    throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
12835  var m = Xa(g, "customInspect") ? g.customInspect : !0;
12836  if (typeof m != "boolean" && m !== "symbol")
12837    throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
12838  if (Xa(g, "indent") && g.indent !== null && g.indent !== "	" && !(parseInt(g.indent, 10) === g.indent && g.indent > 0))
12839    throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
12840  if (Xa(g, "numericSeparator") && typeof g.numericSeparator != "boolean")
12841    throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
12842  var c = g.numericSeparator;
12843  if (typeof t > "u")
12844    return "undefined";
12845  if (t === null)
12846    return "null";
12847  if (typeof t == "boolean")
12848    return t ? "true" : "false";
12849  if (typeof t == "string")
12850    return oP(t, g);
12851  if (typeof t == "number") {
12852    if (t === 0)
12853      return 1 / 0 / t > 0 ? "0" : "-0";
12854    var w = String(t);
12855    return c ? XS(t, w) : w;
12856  }
12857  if (typeof t == "bigint") {
12858    var O = String(t) + "n";
12859    return c ? XS(t, O) : O;
12860  }
12861  var P = typeof g.depth > "u" ? 5 : g.depth;
12862  if (typeof l > "u" && (l = 0), l >= P && P > 0 && typeof t == "object")
12863    return Mv(t) ? "[Array]" : "[Object]";
12864  var R = qU(g, l);
12865  if (typeof h > "u")
12866    h = [];
12867  else if (sP(h, t) >= 0)
12868    return "[Circular]";
12869  function z($e, Xe, st) {
12870    if (Xe && (h = EU.call(h), h.push(Xe)), st) {
12871      var Ge = {
12872        depth: g.depth
12873      };
12874      return Xa(g, "quoteStyle") && (Ge.quoteStyle = g.quoteStyle), e($e, Ge, l + 1, h);
12875    }
12876    return e($e, g, l + 1, h);
12877  }
12878  if (typeof t == "function" && !QS(t)) {
12879    var J = LU(t), K = Fp(t, z);
12880    return "[Function" + (J ? ": " + J : " (anonymous)") + "]" + (K.length > 0 ? " { " + ma.call(K, ", ") + " }" : "");
12881  }
12882  if (iP(t)) {
12883    var ee = vh ? Xl.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : Iv.call(t);
12884    return typeof t == "object" && !vh ? kf(ee) : ee;
12885  }
12886  if (jU(t)) {
12887    for (var ue = "<" + GS.call(String(t.nodeName)), Ce = t.attributes || [], ge = 0; ge < Ce.length; ge++)
12888      ue += " " + Ce[ge].name + "=" + nP(CU(Ce[ge].value), "double", g);
12889    return ue += ">", t.childNodes && t.childNodes.length && (ue += "..."), ue += "</" + GS.call(String(t.nodeName)) + ">", ue;
12890  }
12891  if (Mv(t)) {
12892    if (t.length === 0)
12893      return "[]";
12894    var X = Fp(t, z);
12895    return R && !UU(X) ? "[" + kv(X, R) + "]" : "[ " + ma.call(X, ", ") + " ]";
12896  }
12897  if (PU(t)) {
12898    var ye = Fp(t, z);
12899    return !("cause" in Error.prototype) && "cause" in t && !tP.call(t, "cause") ? "{ [" + String(t) + "] " + ma.call(ZS.call("[cause]: " + z(t.cause), ye), ", ") + " }" : ye.length === 0 ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + ma.call(ye, ", ") + " }";
12900  }
12901  if (typeof t == "object" && m) {
12902    if (YS && typeof t[YS] == "function" && Pv)
12903      return Pv(t, { depth: P - l });
12904    if (m !== "symbol" && typeof t.inspect == "function")
12905      return t.inspect();
12906  }
12907  if (FU(t)) {
12908    var Ae = [];
12909    return US && US.call(t, function($e, Xe) {
12910      Ae.push(z(Xe, t, !0) + " => " + z($e, t));
12911    }), eT("Map", Dm.call(t), Ae, R);
12912  }
12913  if (NU(t)) {
12914    var Se = [];
12915    return qS && qS.call(t, function($e) {
vendor: 8,262 bytes, lines 12916-13249
12916      Se.push(z($e, t));
12917    }), eT("Set", Rm.call(t), Se, R);
12918  }
12919  if (zU(t))
12920    return p_("WeakMap");
12921  if ($U(t))
12922    return p_("WeakSet");
12923  if (BU(t))
12924    return p_("WeakRef");
12925  if (kU(t))
12926    return kf(z(Number(t)));
12927  if (DU(t))
12928    return kf(z(Cv.call(t)));
12929  if (OU(t))
12930    return kf(bU.call(t));
12931  if (MU(t))
12932    return kf(z(String(t)));
12933  if (typeof window < "u" && t === window)
12934    return "{ [object Window] }";
12935  if (typeof globalThis < "u" && t === globalThis || typeof ps < "u" && t === ps)
12936    return "{ [object globalThis] }";
12937  if (!IU(t) && !QS(t)) {
12938    var je = Fp(t, z), Ne = KS ? KS(t) === Object.prototype : t instanceof Object || t.constructor === Object, Oe = t instanceof Object ? "" : "null prototype", ze = !Ne && qf && Object(t) === t && qf in t ? Ix.call(lc(t), 8, -1) : Oe ? "Object" : "", He = Ne || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "", Ie = He + (ze || Oe ? "[" + ma.call(ZS.call([], ze || [], Oe || []), ": ") + "] " : "");
12939    return je.length === 0 ? Ie + "{}" : R ? Ie + "{" + kv(je, R) + "}" : Ie + "{ " + ma.call(je, ", ") + " }";
12940  }
12941  return String(t);
12942};
12943function nP(e, t, s) {
12944  var l = s.quoteStyle || t, h = rP[l];
12945  return h + e + h;
12946}
12947function CU(e) {
12948  return Xl.call(String(e), /"/g, "&quot;");
12949}
12950function cu(e) {
12951  return !qf || !(typeof e == "object" && (qf in e || typeof e[qf] < "u"));
12952}
12953function Mv(e) {
12954  return lc(e) === "[object Array]" && cu(e);
12955}
12956function IU(e) {
12957  return lc(e) === "[object Date]" && cu(e);
12958}
12959function QS(e) {
12960  return lc(e) === "[object RegExp]" && cu(e);
12961}
12962function PU(e) {
12963  return lc(e) === "[object Error]" && cu(e);
12964}
12965function MU(e) {
12966  return lc(e) === "[object String]" && cu(e);
12967}
12968function kU(e) {
12969  return lc(e) === "[object Number]" && cu(e);
12970}
12971function OU(e) {
12972  return lc(e) === "[object Boolean]" && cu(e);
12973}
12974function iP(e) {
12975  if (vh)
12976    return e && typeof e == "object" && e instanceof Symbol;
12977  if (typeof e == "symbol")
12978    return !0;
12979  if (!e || typeof e != "object" || !Iv)
12980    return !1;
12981  try {
12982    return Iv.call(e), !0;
12983  } catch {
12984  }
12985  return !1;
12986}
12987function DU(e) {
12988  if (!e || typeof e != "object" || !Cv)
12989    return !1;
12990  try {
12991    return Cv.call(e), !0;
12992  } catch {
12993  }
12994  return !1;
12995}
12996var RU = Object.prototype.hasOwnProperty || function(e) {
12997  return e in this;
12998};
12999function Xa(e, t) {
13000  return RU.call(e, t);
13001}
13002function lc(e) {
13003  return xU.call(e);
13004}
13005function LU(e) {
13006  if (e.name)
13007    return e.name;
13008  var t = SU.call(wU.call(e), /^function\s*([\w$]+)/);
13009  return t ? t[1] : null;
13010}
13011function sP(e, t) {
13012  if (e.indexOf)
13013    return e.indexOf(t);
13014  for (var s = 0, l = e.length; s < l; s++)
13015    if (e[s] === t)
13016      return s;
13017  return -1;
13018}
13019function FU(e) {
13020  if (!Dm || !e || typeof e != "object")
13021    return !1;
13022  try {
13023    Dm.call(e);
13024    try {
13025      Rm.call(e);
13026    } catch {
13027      return !0;
13028    }
13029    return e instanceof Map;
13030  } catch {
13031  }
13032  return !1;
13033}
13034function zU(e) {
13035  if (!Vf || !e || typeof e != "object")
13036    return !1;
13037  try {
13038    Vf.call(e, Vf);
13039    try {
13040      Uf.call(e, Uf);
13041    } catch {
13042      return !0;
13043    }
13044    return e instanceof WeakMap;
13045  } catch {
13046  }
13047  return !1;
13048}
13049function BU(e) {
13050  if (!HS || !e || typeof e != "object")
13051    return !1;
13052  try {
13053    return HS.call(e), !0;
13054  } catch {
13055  }
13056  return !1;
13057}
13058function NU(e) {
13059  if (!Rm || !e || typeof e != "object")
13060    return !1;
13061  try {
13062    Rm.call(e);
13063    try {
13064      Dm.call(e);
13065    } catch {
13066      return !0;
13067    }
13068    return e instanceof Set;
13069  } catch {
13070  }
13071  return !1;
13072}
13073function $U(e) {
13074  if (!Uf || !e || typeof e != "object")
13075    return !1;
13076  try {
13077    Uf.call(e, Uf);
13078    try {
13079      Vf.call(e, Vf);
13080    } catch {
13081      return !0;
13082    }
13083    return e instanceof WeakSet;
13084  } catch {
13085  }
13086  return !1;
13087}
13088function jU(e) {
13089  return !e || typeof e != "object" ? !1 : typeof HTMLElement < "u" && e instanceof HTMLElement ? !0 : typeof e.nodeName == "string" && typeof e.getAttribute == "function";
13090}
13091function oP(e, t) {
13092  if (e.length > t.maxStringLength) {
13093    var s = e.length - t.maxStringLength, l = "... " + s + " more character" + (s > 1 ? "s" : "");
13094    return oP(Ix.call(e, 0, t.maxStringLength), t) + l;
13095  }
13096  var h = AU[t.quoteStyle || "single"];
13097  h.lastIndex = 0;
13098  var g = Xl.call(Xl.call(e, h, "\\$1"), /[\x00-\x1f]/g, VU);
13099  return nP(g, "single", t);
13100}
13101function VU(e) {
13102  var t = e.charCodeAt(0), s = {
13103    8: "b",
13104    9: "t",
13105    10: "n",
13106    12: "f",
13107    13: "r"
13108  }[t];
13109  return s ? "\\" + s : "\\x" + (t < 16 ? "0" : "") + TU.call(t.toString(16));
13110}
13111function kf(e) {
13112  return "Object(" + e + ")";
13113}
13114function p_(e) {
13115  return e + " { ? }";
13116}
13117function eT(e, t, s, l) {
13118  var h = l ? kv(s, l) : ma.call(s, ", ");
13119  return e + " (" + t + ") {" + h + "}";
13120}
13121function UU(e) {
13122  for (var t = 0; t < e.length; t++)
13123    if (sP(e[t], `
13124`) >= 0)
13125      return !1;
13126  return !0;
13127}
13128function qU(e, t) {
13129  var s;
13130  if (e.indent === "	")
13131    s = "	";
13132  else if (typeof e.indent == "number" && e.indent > 0)
13133    s = ma.call(Array(e.indent + 1), " ");
13134  else
13135    return null;
13136  return {
13137    base: s,
13138    prev: ma.call(Array(t + 1), s)
13139  };
13140}
13141function kv(e, t) {
13142  if (e.length === 0)
13143    return "";
13144  var s = `
13145` + t.prev + t.base;
13146  return s + ma.call(e, "," + s) + `
13147` + t.prev;
13148}
13149function Fp(e, t) {
13150  var s = Mv(e), l = [];
13151  if (s) {
13152    l.length = e.length;
13153    for (var h = 0; h < e.length; h++)
13154      l[h] = Xa(e, h) ? t(e[h], e) : "";
13155  }
13156  var g = typeof d_ == "function" ? d_(e) : [], m;
13157  if (vh) {
13158    m = {};
13159    for (var c = 0; c < g.length; c++)
13160      m["$" + g[c]] = g[c];
13161  }
13162  for (var w in e)
13163    Xa(e, w) && (s && String(Number(w)) === w && w < e.length || vh && m["$" + w] instanceof Symbol || (eP.call(/[^\w$]/, w) ? l.push(t(w, e) + ": " + t(e[w], e)) : l.push(w + ": " + t(e[w], e))));
13164  if (typeof d_ == "function")
13165    for (var O = 0; O < g.length; O++)
13166      tP.call(e, g[O]) && l.push("[" + t(g[O]) + "]: " + t(e[g[O]], e));
13167  return l;
13168}
13169var HU = Lg, GU = Ao, Fg = function(e, t, s) {
13170  for (var l = e, h; (h = l.next) != null; l = h)
13171    if (h.key === t)
13172      return l.next = h.next, s || (h.next = /** @type {NonNullable<typeof list.next>} */
13173      e.next, e.next = h), h;
13174}, ZU = function(e, t) {
13175  if (e) {
13176    var s = Fg(e, t);
13177    return s && s.value;
13178  }
13179}, WU = function(e, t, s) {
13180  var l = Fg(e, t);
13181  l ? l.value = s : e.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
13182  {
13183    // eslint-disable-line no-param-reassign, no-extra-parens
13184    key: t,
13185    next: e.next,
13186    value: s
13187  };
13188}, KU = function(e, t) {
13189  return e ? !!Fg(e, t) : !1;
13190}, XU = function(e, t) {
13191  if (e)
13192    return Fg(e, t, !0);
13193}, JU = function() {
13194  var t, s = {
13195    assert: function(l) {
13196      if (!s.has(l))
13197        throw new GU("Side channel does not contain " + HU(l));
13198    },
13199    delete: function(l) {
13200      var h = t && t.next, g = XU(t, l);
13201      return g && h && h === g && (t = void 0), !!g;
13202    },
13203    get: function(l) {
13204      return ZU(t, l);
13205    },
13206    has: function(l) {
13207      return KU(t, l);
13208    },
13209    set: function(l, h) {
13210      t || (t = {
13211        next: void 0
13212      }), WU(
13213        /** @type {NonNullable<typeof $o>} */
13214        t,
13215        l,
13216        h
13217      );
13218    }
13219  };
13220  return s;
13221}, aP = Object, YU = Error, QU = EvalError, e8 = RangeError, t8 = ReferenceError, lP = SyntaxError, r8 = URIError, n8 = Math.abs, i8 = Math.floor, s8 = Math.max, o8 = Math.min, a8 = Math.pow, l8 = Math.round, c8 = Number.isNaN || function(t) {
13222  return t !== t;
13223}, u8 = c8, h8 = function(t) {
13224  return u8(t) || t === 0 ? t : t < 0 ? -1 : 1;
13225}, f8 = Object.getOwnPropertyDescriptor, Kp = f8;
13226if (Kp)
13227  try {
13228    Kp([], "length");
13229  } catch {
13230    Kp = null;
13231  }
13232var Fd = Kp, Xp = Object.defineProperty || !1;
13233if (Xp)
13234  try {
13235    Xp({}, "a", { value: 1 });
13236  } catch {
13237    Xp = !1;
13238  }
13239var zg = Xp, m_, tT;
13240function Bg() {
13241  return tT || (tT = 1, m_ = function() {
13242    if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
13243      return !1;
13244    if (typeof Symbol.iterator == "symbol")
13245      return !0;
13246    var t = {}, s = Symbol("test"), l = Object(s);
13247    if (typeof s == "string" || Object.prototype.toString.call(s) !== "[object Symbol]" || Object.prototype.toString.call(l) !== "[object Symbol]")
13248      return !1;
13249    var h = 42;
vendor: 10,652 bytes, lines 13250-13539
13250    t[s] = h;
13251    for (var g in t)
13252      return !1;
13253    if (typeof Object.keys == "function" && Object.keys(t).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(t).length !== 0)
13254      return !1;
13255    var m = Object.getOwnPropertySymbols(t);
13256    if (m.length !== 1 || m[0] !== s || !Object.prototype.propertyIsEnumerable.call(t, s))
13257      return !1;
13258    if (typeof Object.getOwnPropertyDescriptor == "function") {
13259      var c = (
13260        /** @type {PropertyDescriptor} */
13261        Object.getOwnPropertyDescriptor(t, s)
13262      );
13263      if (c.value !== h || c.enumerable !== !0)
13264        return !1;
13265    }
13266    return !0;
13267  }), m_;
13268}
13269var g_, rT;
13270function Px() {
13271  if (rT) return g_;
13272  rT = 1;
13273  var e = typeof Symbol < "u" && Symbol, t = Bg();
13274  return g_ = function() {
13275    return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : t();
13276  }, g_;
13277}
13278var y_, nT;
13279function cP() {
13280  return nT || (nT = 1, y_ = typeof Reflect < "u" && Reflect.getPrototypeOf || null), y_;
13281}
13282var __, iT;
13283function uP() {
13284  if (iT) return __;
13285  iT = 1;
13286  var e = aP;
13287  return __ = e.getPrototypeOf || null, __;
13288}
13289var d8 = "Function.prototype.bind called on incompatible ", p8 = Object.prototype.toString, m8 = Math.max, g8 = "[object Function]", sT = function(t, s) {
13290  for (var l = [], h = 0; h < t.length; h += 1)
13291    l[h] = t[h];
13292  for (var g = 0; g < s.length; g += 1)
13293    l[g + t.length] = s[g];
13294  return l;
13295}, y8 = function(t, s) {
13296  for (var l = [], h = s, g = 0; h < t.length; h += 1, g += 1)
13297    l[g] = t[h];
13298  return l;
13299}, _8 = function(e, t) {
13300  for (var s = "", l = 0; l < e.length; l += 1)
13301    s += e[l], l + 1 < e.length && (s += t);
13302  return s;
13303}, v8 = function(t) {
13304  var s = this;
13305  if (typeof s != "function" || p8.apply(s) !== g8)
13306    throw new TypeError(d8 + s);
13307  for (var l = y8(arguments, 1), h, g = function() {
13308    if (this instanceof h) {
13309      var P = s.apply(
13310        this,
13311        sT(l, arguments)
13312      );
13313      return Object(P) === P ? P : this;
13314    }
13315    return s.apply(
13316      t,
13317      sT(l, arguments)
13318    );
13319  }, m = m8(0, s.length - l.length), c = [], w = 0; w < m; w++)
13320    c[w] = "$" + w;
13321  if (h = Function("binder", "return function (" + _8(c, ",") + "){ return binder.apply(this,arguments); }")(g), s.prototype) {
13322    var O = function() {
13323    };
13324    O.prototype = s.prototype, h.prototype = new O(), O.prototype = null;
13325  }
13326  return h;
13327}, b8 = v8, zd = Function.prototype.bind || b8, Mx = Function.prototype.call, v_, oT;
13328function hP() {
13329  return oT || (oT = 1, v_ = Function.prototype.apply), v_;
13330}
13331var x8 = typeof Reflect < "u" && Reflect && Reflect.apply, w8 = zd, S8 = hP(), T8 = Mx, E8 = x8, A8 = E8 || w8.call(T8, S8), C8 = zd, I8 = Ao, P8 = Mx, M8 = A8, fP = function(t) {
13332  if (t.length < 1 || typeof t[0] != "function")
13333    throw new I8("a function is required");
13334  return M8(C8, P8, t);
13335}, b_, aT;
13336function k8() {
13337  if (aT) return b_;
13338  aT = 1;
13339  var e = fP, t = Fd, s;
13340  try {
13341    s = /** @type {{ __proto__?: typeof Array.prototype }} */
13342    [].__proto__ === Array.prototype;
13343  } catch (m) {
13344    if (!m || typeof m != "object" || !("code" in m) || m.code !== "ERR_PROTO_ACCESS")
13345      throw m;
13346  }
13347  var l = !!s && t && t(
13348    Object.prototype,
13349    /** @type {keyof typeof Object.prototype} */
13350    "__proto__"
13351  ), h = Object, g = h.getPrototypeOf;
13352  return b_ = l && typeof l.get == "function" ? e([l.get]) : typeof g == "function" ? (
13353    /** @type {import('./get')} */
13354    function(c) {
13355      return g(c == null ? c : h(c));
13356    }
13357  ) : !1, b_;
13358}
13359var x_, lT;
13360function O8() {
13361  if (lT) return x_;
13362  lT = 1;
13363  var e = cP(), t = uP(), s = k8();
13364  return x_ = e ? function(h) {
13365    return e(h);
13366  } : t ? function(h) {
13367    if (!h || typeof h != "object" && typeof h != "function")
13368      throw new TypeError("getProto: not an object");
13369    return t(h);
13370  } : s ? function(h) {
13371    return s(h);
13372  } : null, x_;
13373}
13374var w_, cT;
13375function dP() {
13376  if (cT) return w_;
13377  cT = 1;
13378  var e = Function.prototype.call, t = Object.prototype.hasOwnProperty, s = zd;
13379  return w_ = s.call(e, t), w_;
13380}
13381var Dr, D8 = aP, R8 = YU, L8 = QU, F8 = e8, z8 = t8, bh = lP, uh = Ao, B8 = r8, N8 = n8, $8 = i8, j8 = s8, V8 = o8, U8 = a8, q8 = l8, H8 = h8, pP = Function, S_ = function(e) {
13382  try {
13383    return pP('"use strict"; return (' + e + ").constructor;")();
13384  } catch {
13385  }
13386}, cd = Fd, G8 = zg, T_ = function() {
13387  throw new uh();
13388}, Z8 = cd ? function() {
13389  try {
13390    return arguments.callee, T_;
13391  } catch {
13392    try {
13393      return cd(arguments, "callee").get;
13394    } catch {
13395      return T_;
13396    }
13397  }
13398}() : T_, Wu = Px()(), Ai = O8(), W8 = uP(), K8 = cP(), mP = hP(), Bd = Mx, Yu = {}, X8 = typeof Uint8Array > "u" || !Ai ? Dr : Ai(Uint8Array), Xc = {
13399  __proto__: null,
13400  "%AggregateError%": typeof AggregateError > "u" ? Dr : AggregateError,
13401  "%Array%": Array,
13402  "%ArrayBuffer%": typeof ArrayBuffer > "u" ? Dr : ArrayBuffer,
13403  "%ArrayIteratorPrototype%": Wu && Ai ? Ai([][Symbol.iterator]()) : Dr,
13404  "%AsyncFromSyncIteratorPrototype%": Dr,
13405  "%AsyncFunction%": Yu,
13406  "%AsyncGenerator%": Yu,
13407  "%AsyncGeneratorFunction%": Yu,
13408  "%AsyncIteratorPrototype%": Yu,
13409  "%Atomics%": typeof Atomics > "u" ? Dr : Atomics,
13410  "%BigInt%": typeof BigInt > "u" ? Dr : BigInt,
13411  "%BigInt64Array%": typeof BigInt64Array > "u" ? Dr : BigInt64Array,
13412  "%BigUint64Array%": typeof BigUint64Array > "u" ? Dr : BigUint64Array,
13413  "%Boolean%": Boolean,
13414  "%DataView%": typeof DataView > "u" ? Dr : DataView,
13415  "%Date%": Date,
13416  "%decodeURI%": decodeURI,
13417  "%decodeURIComponent%": decodeURIComponent,
13418  "%encodeURI%": encodeURI,
13419  "%encodeURIComponent%": encodeURIComponent,
13420  "%Error%": R8,
13421  "%eval%": eval,
13422  // eslint-disable-line no-eval
13423  "%EvalError%": L8,
13424  "%Float16Array%": typeof Float16Array > "u" ? Dr : Float16Array,
13425  "%Float32Array%": typeof Float32Array > "u" ? Dr : Float32Array,
13426  "%Float64Array%": typeof Float64Array > "u" ? Dr : Float64Array,
13427  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? Dr : FinalizationRegistry,
13428  "%Function%": pP,
13429  "%GeneratorFunction%": Yu,
13430  "%Int8Array%": typeof Int8Array > "u" ? Dr : Int8Array,
13431  "%Int16Array%": typeof Int16Array > "u" ? Dr : Int16Array,
13432  "%Int32Array%": typeof Int32Array > "u" ? Dr : Int32Array,
13433  "%isFinite%": isFinite,
13434  "%isNaN%": isNaN,
13435  "%IteratorPrototype%": Wu && Ai ? Ai(Ai([][Symbol.iterator]())) : Dr,
13436  "%JSON%": typeof JSON == "object" ? JSON : Dr,
13437  "%Map%": typeof Map > "u" ? Dr : Map,
13438  "%MapIteratorPrototype%": typeof Map > "u" || !Wu || !Ai ? Dr : Ai((/* @__PURE__ */ new Map())[Symbol.iterator]()),
13439  "%Math%": Math,
13440  "%Number%": Number,
13441  "%Object%": D8,
13442  "%Object.getOwnPropertyDescriptor%": cd,
13443  "%parseFloat%": parseFloat,
13444  "%parseInt%": parseInt,
13445  "%Promise%": typeof Promise > "u" ? Dr : Promise,
13446  "%Proxy%": typeof Proxy > "u" ? Dr : Proxy,
13447  "%RangeError%": F8,
13448  "%ReferenceError%": z8,
13449  "%Reflect%": typeof Reflect > "u" ? Dr : Reflect,
13450  "%RegExp%": RegExp,
13451  "%Set%": typeof Set > "u" ? Dr : Set,
13452  "%SetIteratorPrototype%": typeof Set > "u" || !Wu || !Ai ? Dr : Ai((/* @__PURE__ */ new Set())[Symbol.iterator]()),
13453  "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? Dr : SharedArrayBuffer,
13454  "%String%": String,
13455  "%StringIteratorPrototype%": Wu && Ai ? Ai(""[Symbol.iterator]()) : Dr,
13456  "%Symbol%": Wu ? Symbol : Dr,
13457  "%SyntaxError%": bh,
13458  "%ThrowTypeError%": Z8,
13459  "%TypedArray%": X8,
13460  "%TypeError%": uh,
13461  "%Uint8Array%": typeof Uint8Array > "u" ? Dr : Uint8Array,
13462  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? Dr : Uint8ClampedArray,
13463  "%Uint16Array%": typeof Uint16Array > "u" ? Dr : Uint16Array,
13464  "%Uint32Array%": typeof Uint32Array > "u" ? Dr : Uint32Array,
13465  "%URIError%": B8,
13466  "%WeakMap%": typeof WeakMap > "u" ? Dr : WeakMap,
13467  "%WeakRef%": typeof WeakRef > "u" ? Dr : WeakRef,
13468  "%WeakSet%": typeof WeakSet > "u" ? Dr : WeakSet,
13469  "%Function.prototype.call%": Bd,
13470  "%Function.prototype.apply%": mP,
13471  "%Object.defineProperty%": G8,
13472  "%Object.getPrototypeOf%": W8,
13473  "%Math.abs%": N8,
13474  "%Math.floor%": $8,
13475  "%Math.max%": j8,
13476  "%Math.min%": V8,
13477  "%Math.pow%": U8,
13478  "%Math.round%": q8,
13479  "%Math.sign%": H8,
13480  "%Reflect.getPrototypeOf%": K8
13481};
13482if (Ai)
13483  try {
13484    null.error;
13485  } catch (e) {
13486    var J8 = Ai(Ai(e));
13487    Xc["%Error.prototype%"] = J8;
13488  }
13489var Y8 = function e(t) {
13490  var s;
13491  if (t === "%AsyncFunction%")
13492    s = S_("async function () {}");
13493  else if (t === "%GeneratorFunction%")
13494    s = S_("function* () {}");
13495  else if (t === "%AsyncGeneratorFunction%")
13496    s = S_("async function* () {}");
13497  else if (t === "%AsyncGenerator%") {
13498    var l = e("%AsyncGeneratorFunction%");
13499    l && (s = l.prototype);
13500  } else if (t === "%AsyncIteratorPrototype%") {
13501    var h = e("%AsyncGenerator%");
13502    h && Ai && (s = Ai(h.prototype));
13503  }
13504  return Xc[t] = s, s;
13505}, uT = {
13506  __proto__: null,
13507  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
13508  "%ArrayPrototype%": ["Array", "prototype"],
13509  "%ArrayProto_entries%": ["Array", "prototype", "entries"],
13510  "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
13511  "%ArrayProto_keys%": ["Array", "prototype", "keys"],
13512  "%ArrayProto_values%": ["Array", "prototype", "values"],
13513  "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
13514  "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
13515  "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
13516  "%BooleanPrototype%": ["Boolean", "prototype"],
13517  "%DataViewPrototype%": ["DataView", "prototype"],
13518  "%DatePrototype%": ["Date", "prototype"],
13519  "%ErrorPrototype%": ["Error", "prototype"],
13520  "%EvalErrorPrototype%": ["EvalError", "prototype"],
13521  "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
13522  "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
13523  "%FunctionPrototype%": ["Function", "prototype"],
13524  "%Generator%": ["GeneratorFunction", "prototype"],
13525  "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
13526  "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
13527  "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
13528  "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
13529  "%JSONParse%": ["JSON", "parse"],
13530  "%JSONStringify%": ["JSON", "stringify"],
13531  "%MapPrototype%": ["Map", "prototype"],
13532  "%NumberPrototype%": ["Number", "prototype"],
13533  "%ObjectPrototype%": ["Object", "prototype"],
13534  "%ObjProto_toString%": ["Object", "prototype", "toString"],
13535  "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
13536  "%PromisePrototype%": ["Promise", "prototype"],
13537  "%PromiseProto_then%": ["Promise", "prototype", "then"],
13538  "%Promise_all%": ["Promise", "all"],
13539  "%Promise_reject%": ["Promise", "reject"],
13540  "%Promise_resolve%": ["Promise", "resolve"],
13541  "%RangeErrorPrototype%": ["RangeError", "prototype"],
13542  "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
13543  "%RegExpPrototype%": ["RegExp", "prototype"],
13544  "%SetPrototype%": ["Set", "prototype"],
13545  "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
13546  "%StringPrototype%": ["String", "prototype"],
13547  "%SymbolPrototype%": ["Symbol", "prototype"],
13548  "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
13549  "%TypedArrayPrototype%": ["TypedArray", "prototype"],
13550  "%TypeErrorPrototype%": ["TypeError", "prototype"],
13551  "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
13552  "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
13553  "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
13554  "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
13555  "%URIErrorPrototype%": ["URIError", "prototype"],
13556  "%WeakMapPrototype%": ["WeakMap", "prototype"],
13557  "%WeakSetPrototype%": ["WeakSet", "prototype"]
13558}, Nd = zd, Lm = dP(), Q8 = Nd.call(Bd, Array.prototype.concat), eq = Nd.call(mP, Array.prototype.splice), hT = Nd.call(Bd, String.prototype.replace), Fm = Nd.call(Bd, String.prototype.slice), tq = Nd.call(Bd, RegExp.prototype.exec), rq = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, nq = /\\(\\)?/g, iq = function(t) {
13559  var s = Fm(t, 0, 1), l = Fm(t, -1);
13560  if (s === "%" && l !== "%")
13561    throw new bh("invalid intrinsic syntax, expected closing `%`");
13562  if (l === "%" && s !== "%")
13563    throw new bh("invalid intrinsic syntax, expected opening `%`");
13564  var h = [];
13565  return hT(t, rq, function(g, m, c, w) {
13566    h[h.length] = c ? hT(w, nq, "$1") : m || g;
13567  }), h;
13568}, sq = function(t, s) {
13569  var l = t, h;
13570  if (Lm(uT, l) && (h = uT[l], l = "%" + h[0] + "%"), Lm(Xc, l)) {
13571    var g = Xc[l];
13572    if (g === Yu && (g = Y8(l)), typeof g > "u" && !s)
13573      throw new uh("intrinsic " + t + " exists, but is not available. Please file an issue!");
13574    return {
13575      alias: h,
13576      name: l,
13577      value: g
13578    };
13579  }
13580  throw new bh("intrinsic " + t + " does not exist!");
13581}, Sa = function(t, s) {
13582  if (typeof t != "string" || t.length === 0)
13583    throw new uh("intrinsic name must be a non-empty string");
13584  if (arguments.length > 1 && typeof s != "boolean")
13585    throw new uh('"allowMissing" argument must be a boolean');
13586  if (tq(/^%?[^%]*%?$/, t) === null)
13587    throw new bh("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
13588  var l = iq(t), h = l.length > 0 ? l[0] : "", g = sq("%" + h + "%", s), m = g.name, c = g.value, w = !1, O = g.alias;
13589  O && (h = O[0], eq(l, Q8([0, 1], O)));
13590  for (var P = 1, R = !0; P < l.length; P += 1) {
13591    var z = l[P], J = Fm(z, 0, 1), K = Fm(z, -1);
13592    if ((J === '"' || J === "'" || J === "`" || K === '"' || K === "'" || K === "`") && J !== K)
13593      throw new bh("property names with quotes must have matching quotes");
13594    if ((z === "constructor" || !R) && (w = !0), h += "." + z, m = "%" + h + "%", Lm(Xc, m))
13595      c = Xc[m];
13596    else if (c != null) {
13597      if (!(z in c)) {
13598        if (!s)
13599          throw new uh("base intrinsic for " + t + " exists, but the property is not available.");
13600        return;
13601      }
13602      if (cd && P + 1 >= l.length) {
13603        var ee = cd(c, z);
13604        R = !!ee, R && "get" in ee && !("originalValue" in ee.get) ? c = ee.get : c = c[z];
13605      } else
13606        R = Lm(c, z), c = c[z];
13607      R && !w && (Xc[m] = c);
13608    }
13609  }
13610  return c;
13611}, gP = Sa, yP = fP, oq = yP([gP("%String.prototype.indexOf%")]), _P = function(t, s) {
13612  var l = (
13613    /** @type {(this: unknown, ...args: unknown[]) => unknown} */
13614    gP(t, !!s)
13615  );
13616  return typeof l == "function" && oq(t, ".prototype.") > -1 ? yP(
13617    /** @type {const} */
13618    [l]
13619  ) : l;
13620}, aq = Sa, $d = _P, lq = Lg, cq = Ao, fT = aq("%Map%", !0), uq = $d("Map.prototype.get", !0), hq = $d("Map.prototype.set", !0), fq = $d("Map.prototype.has", !0), dq = $d("Map.prototype.delete", !0), pq = $d("Map.prototype.size", !0), vP = !!fT && /** @type {Exclude<import('.'), false>} */
13621function() {
13622  var t, s = {
13623    assert: function(l) {
13624      if (!s.has(l))
13625        throw new cq("Side channel does not contain " + lq(l));
13626    },
13627    delete: function(l) {
13628      if (t) {
13629        var h = dq(t, l);
13630        return pq(t) === 0 && (t = void 0), h;
13631      }
13632      return !1;
13633    },
13634    get: function(l) {
13635      if (t)
13636        return uq(t, l);
13637    },
13638    has: function(l) {
13639      return t ? fq(t, l) : !1;
13640    },
13641    set: function(l, h) {
13642      t || (t = new fT()), hq(t, l, h);
13643    }
13644  };
13645  return s;
13646}, mq = Sa, Ng = _P, gq = Lg, zp = vP, yq = Ao, Ku = mq("%WeakMap%", !0), _q = Ng("WeakMap.prototype.get", !0), vq = Ng("WeakMap.prototype.set", !0), bq = Ng("WeakMap.prototype.has", !0), xq = Ng("WeakMap.prototype.delete", !0), wq = Ku ? (
13647  /** @type {Exclude<import('.'), false>} */
13648  function() {
13649    var t, s, l = {
13650      assert: function(h) {
13651        if (!l.has(h))
13652          throw new yq("Side channel does not contain " + gq(h));
13653      },
13654      delete: function(h) {
13655        if (Ku && h && (typeof h == "object" || typeof h == "function")) {
13656          if (t)
13657            return xq(t, h);
13658        } else if (zp && s)
13659          return s.delete(h);
13660        return !1;
13661      },
13662      get: function(h) {
13663        return Ku && h && (typeof h == "object" || typeof h == "function") && t ? _q(t, h) : s && s.get(h);
13664      },
13665      has: function(h) {
13666        return Ku && h && (typeof h == "object" || typeof h == "function") && t ? bq(t, h) : !!s && s.has(h);
13667      },
13668      set: function(h, g) {
13669        Ku && h && (typeof h == "object" || typeof h == "function") ? (t || (t = new Ku()), vq(t, h, g)) : zp && (s || (s = zp()), s.set(h, g));
13670      }
13671    };
13672    return l;
13673  }
13674) : zp, Sq = Ao, Tq = Lg, Eq = JU, Aq = vP, Cq = wq, Iq = Cq || Aq || Eq, kx = function() {
13675  var t, s = {
13676    assert: function(l) {
13677      if (!s.has(l))
13678        throw new Sq("Side channel does not contain " + Tq(l));
13679    },
13680    delete: function(l) {
13681      return !!t && t.delete(l);
13682    },
13683    get: function(l) {
13684      return t && t.get(l);
13685    },
13686    has: function(l) {
13687      return !!t && t.has(l);
13688    },
13689    set: function(l, h) {
13690      t || (t = Iq()), t.set(l, h);
13691    }
13692  };
13693  return s;
13694}, Pq = String.prototype.replace, Mq = /%20/g, E_ = {
13695  RFC1738: "RFC1738",
13696  RFC3986: "RFC3986"
13697}, Ox = {
13698  default: E_.RFC3986,
13699  formatters: {
13700    RFC1738: function(e) {
13701      return Pq.call(e, Mq, "+");
13702    },
13703    RFC3986: function(e) {
13704      return String(e);
13705    }
13706  },
13707  RFC1738: E_.RFC1738,
13708  RFC3986: E_.RFC3986
13709}, kq = Ox, A_ = Object.prototype.hasOwnProperty, Nc = Array.isArray, fa = function() {
13710  for (var e = [], t = 0; t < 256; ++t)
13711    e.push("%" + ((t < 16 ? "0" : "") + t.toString(16)).toUpperCase());
13712  return e;
13713}(), Oq = function(t) {
13714  for (; t.length > 1; ) {
13715    var s = t.pop(), l = s.obj[s.prop];
13716    if (Nc(l)) {
13717      for (var h = [], g = 0; g < l.length; ++g)
13718        typeof l[g] < "u" && h.push(l[g]);
13719      s.obj[s.prop] = h;
13720    }
13721  }
13722}, bP = function(t, s) {
13723  for (var l = s && s.plainObjects ? { __proto__: null } : {}, h = 0; h < t.length; ++h)
13724    typeof t[h] < "u" && (l[h] = t[h]);
13725  return l;
13726}, Dq = function e(t, s, l) {
13727  if (!s)
13728    return t;
13729  if (typeof s != "object" && typeof s != "function") {
13730    if (Nc(t))
13731      t.push(s);
13732    else if (t && typeof t == "object")
13733      (l && (l.plainObjects || l.allowPrototypes) || !A_.call(Object.prototype, s)) && (t[s] = !0);
13734    else
13735      return [t, s];
13736    return t;
13737  }
13738  if (!t || typeof t != "object")
13739    return [t].concat(s);
13740  var h = t;
13741  return Nc(t) && !Nc(s) && (h = bP(t, l)), Nc(t) && Nc(s) ? (s.forEach(function(g, m) {
13742    if (A_.call(t, m)) {
13743      var c = t[m];
13744      c && typeof c == "object" && g && typeof g == "object" ? t[m] = e(c, g, l) : t.push(g);
13745    } else
13746      t[m] = g;
13747  }), t) : Object.keys(s).reduce(function(g, m) {
13748    var c = s[m];
13749    return A_.call(g, m) ? g[m] = e(g[m], c, l) : g[m] = c, g;
13750  }, h);
13751}, Rq = function(t, s) {
13752  return Object.keys(s).reduce(function(l, h) {
13753    return l[h] = s[h], l;
13754  }, t);
13755}, Lq = function(e, t, s) {
13756  var l = e.replace(/\+/g, " ");
13757  if (s === "iso-8859-1")
13758    return l.replace(/%[0-9a-f]{2}/gi, unescape);
13759  try {
13760    return decodeURIComponent(l);
13761  } catch {
13762    return l;
13763  }
13764}, C_ = 1024, Fq = function(t, s, l, h, g) {
13765  if (t.length === 0)
13766    return t;
13767  var m = t;
13768  if (typeof t == "symbol" ? m = Symbol.prototype.toString.call(t) : typeof t != "string" && (m = String(t)), l === "iso-8859-1")
13769    return escape(m).replace(/%u[0-9a-f]{4}/gi, function(J) {
13770      return "%26%23" + parseInt(J.slice(2), 16) + "%3B";
13771    });
13772  for (var c = "", w = 0; w < m.length; w += C_) {
13773    for (var O = m.length >= C_ ? m.slice(w, w + C_) : m, P = [], R = 0; R < O.length; ++R) {
13774      var z = O.charCodeAt(R);
13775      if (z === 45 || z === 46 || z === 95 || z === 126 || z >= 48 && z <= 57 || z >= 65 && z <= 90 || z >= 97 && z <= 122 || g === kq.RFC1738 && (z === 40 || z === 41)) {
13776        P[P.length] = O.charAt(R);
13777        continue;
13778      }
13779      if (z < 128) {
13780        P[P.length] = fa[z];
13781        continue;
13782      }
13783      if (z < 2048) {
13784        P[P.length] = fa[192 | z >> 6] + fa[128 | z & 63];
13785        continue;
13786      }
13787      if (z < 55296 || z >= 57344) {
13788        P[P.length] = fa[224 | z >> 12] + fa[128 | z >> 6 & 63] + fa[128 | z & 63];
13789        continue;
13790      }
13791      R += 1, z = 65536 + ((z & 1023) << 10 | O.charCodeAt(R) & 1023), P[P.length] = fa[240 | z >> 18] + fa[128 | z >> 12 & 63] + fa[128 | z >> 6 & 63] + fa[128 | z & 63];
13792    }
13793    c += P.join("");
13794  }
13795  return c;
13796}, zq = function(t) {
13797  for (var s = [{ obj: { o: t }, prop: "o" }], l = [], h = 0; h < s.length; ++h)
13798    for (var g = s[h], m = g.obj[g.prop], c = Object.keys(m), w = 0; w < c.length; ++w) {
13799      var O = c[w], P = m[O];
13800      typeof P == "object" && P !== null && l.indexOf(P) === -1 && (s.push({ obj: m, prop: O }), l.push(P));
13801    }
13802  return Oq(s), t;
13803}, Bq = function(t) {
13804  return Object.prototype.toString.call(t) === "[object RegExp]";
13805}, Nq = function(t) {
13806  return !t || typeof t != "object" ? !1 : !!(t.constructor && t.constructor.isBuffer && t.constructor.isBuffer(t));
13807}, $q = function(t, s) {
13808  return [].concat(t, s);
13809}, jq = function(t, s) {
13810  if (Nc(t)) {
13811    for (var l = [], h = 0; h < t.length; h += 1)
13812      l.push(s(t[h]));
13813    return l;
13814  }
13815  return s(t);
13816}, xP = {
13817  arrayToObject: bP,
13818  assign: Rq,
13819  combine: $q,
13820  compact: zq,
13821  decode: Lq,
13822  encode: Fq,
13823  isBuffer: Nq,
13824  isRegExp: Bq,
13825  maybeMap: jq,
13826  merge: Dq
13827}, wP = kx, Jp = xP, Hf = Ox, Vq = Object.prototype.hasOwnProperty, SP = {
13828  brackets: function(t) {
13829    return t + "[]";
13830  },
13831  comma: "comma",
13832  indices: function(t, s) {
13833    return t + "[" + s + "]";
13834  },
13835  repeat: function(t) {
13836    return t;
13837  }
13838}, pa = Array.isArray, Uq = Array.prototype.push, TP = function(e, t) {
13839  Uq.apply(e, pa(t) ? t : [t]);
13840}, qq = Date.prototype.toISOString, dT = Hf.default, li = {
13841  addQueryPrefix: !1,
13842  allowDots: !1,
13843  allowEmptyArrays: !1,
13844  arrayFormat: "indices",
13845  charset: "utf-8",
13846  charsetSentinel: !1,
13847  commaRoundTrip: !1,
13848  delimiter: "&",
13849  encode: !0,
13850  encodeDotInKeys: !1,
13851  encoder: Jp.encode,
13852  encodeValuesOnly: !1,
13853  filter: void 0,
13854  format: dT,
13855  formatter: Hf.formatters[dT],
13856  // deprecated
13857  indices: !1,
13858  serializeDate: function(t) {
13859    return qq.call(t);
13860  },
13861  skipNulls: !1,
13862  strictNullHandling: !1
13863}, Hq = function(t) {
13864  return typeof t == "string" || typeof t == "number" || typeof t == "boolean" || typeof t == "symbol" || typeof t == "bigint";
13865}, I_ = {}, Gq = function e(t, s, l, h, g, m, c, w, O, P, R, z, J, K, ee, ue, Ce, ge) {
13866  for (var X = t, ye = ge, Ae = 0, Se = !1; (ye = ye.get(I_)) !== void 0 && !Se; ) {
13867    var je = ye.get(t);
13868    if (Ae += 1, typeof je < "u") {
13869      if (je === Ae)
13870        throw new RangeError("Cyclic object value");
13871      Se = !0;
13872    }
13873    typeof ye.get(I_) > "u" && (Ae = 0);
13874  }
13875  if (typeof P == "function" ? X = P(s, X) : X instanceof Date ? X = J(X) : l === "comma" && pa(X) && (X = Jp.maybeMap(X, function(fr) {
13876    return fr instanceof Date ? J(fr) : fr;
13877  })), X === null) {
13878    if (m)
13879      return O && !ue ? O(s, li.encoder, Ce, "key", K) : s;
13880    X = "";
13881  }
13882  if (Hq(X) || Jp.isBuffer(X)) {
13883    if (O) {
13884      var Ne = ue ? s : O(s, li.encoder, Ce, "key", K);
13885      return [ee(Ne) + "=" + ee(O(X, li.encoder, Ce, "value", K))];
13886    }
13887    return [ee(s) + "=" + ee(String(X))];
13888  }
13889  var Oe = [];
13890  if (typeof X > "u")
13891    return Oe;
13892  var ze;
13893  if (l === "comma" && pa(X))
13894    ue && O && (X = Jp.maybeMap(X, O)), ze = [{ value: X.length > 0 ? X.join(",") || null : void 0 }];
13895  else if (pa(P))
13896    ze = P;
13897  else {
13898    var He = Object.keys(X);
vendor: 6,222 bytes, lines 13899-14055
13899    ze = R ? He.sort(R) : He;
13900  }
13901  var Ie = w ? String(s).replace(/\./g, "%2E") : String(s), $e = h && pa(X) && X.length === 1 ? Ie + "[]" : Ie;
13902  if (g && pa(X) && X.length === 0)
13903    return $e + "[]";
13904  for (var Xe = 0; Xe < ze.length; ++Xe) {
13905    var st = ze[Xe], Ge = typeof st == "object" && st && typeof st.value < "u" ? st.value : X[st];
13906    if (!(c && Ge === null)) {
13907      var ct = z && w ? String(st).replace(/\./g, "%2E") : String(st), ot = pa(X) ? typeof l == "function" ? l($e, ct) : $e : $e + (z ? "." + ct : "[" + ct + "]");
13908      ge.set(t, Ae);
13909      var Ht = wP();
13910      Ht.set(I_, ge), TP(Oe, e(
13911        Ge,
13912        ot,
13913        l,
13914        h,
13915        g,
13916        m,
13917        c,
13918        w,
13919        l === "comma" && ue && pa(X) ? null : O,
13920        P,
13921        R,
13922        z,
13923        J,
13924        K,
13925        ee,
13926        ue,
13927        Ce,
13928        Ht
13929      ));
13930    }
13931  }
13932  return Oe;
13933}, Zq = function(t) {
13934  if (!t)
13935    return li;
13936  if (typeof t.allowEmptyArrays < "u" && typeof t.allowEmptyArrays != "boolean")
13937    throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
13938  if (typeof t.encodeDotInKeys < "u" && typeof t.encodeDotInKeys != "boolean")
13939    throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
13940  if (t.encoder !== null && typeof t.encoder < "u" && typeof t.encoder != "function")
13941    throw new TypeError("Encoder has to be a function.");
13942  var s = t.charset || li.charset;
13943  if (typeof t.charset < "u" && t.charset !== "utf-8" && t.charset !== "iso-8859-1")
13944    throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
13945  var l = Hf.default;
13946  if (typeof t.format < "u") {
13947    if (!Vq.call(Hf.formatters, t.format))
13948      throw new TypeError("Unknown format option provided.");
13949    l = t.format;
13950  }
13951  var h = Hf.formatters[l], g = li.filter;
13952  (typeof t.filter == "function" || pa(t.filter)) && (g = t.filter);
13953  var m;
13954  if (t.arrayFormat in SP ? m = t.arrayFormat : "indices" in t ? m = t.indices ? "indices" : "repeat" : m = li.arrayFormat, "commaRoundTrip" in t && typeof t.commaRoundTrip != "boolean")
13955    throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
13956  var c = typeof t.allowDots > "u" ? t.encodeDotInKeys === !0 ? !0 : li.allowDots : !!t.allowDots;
13957  return {
13958    addQueryPrefix: typeof t.addQueryPrefix == "boolean" ? t.addQueryPrefix : li.addQueryPrefix,
13959    allowDots: c,
13960    allowEmptyArrays: typeof t.allowEmptyArrays == "boolean" ? !!t.allowEmptyArrays : li.allowEmptyArrays,
13961    arrayFormat: m,
13962    charset: s,
13963    charsetSentinel: typeof t.charsetSentinel == "boolean" ? t.charsetSentinel : li.charsetSentinel,
13964    commaRoundTrip: !!t.commaRoundTrip,
13965    delimiter: typeof t.delimiter > "u" ? li.delimiter : t.delimiter,
13966    encode: typeof t.encode == "boolean" ? t.encode : li.encode,
13967    encodeDotInKeys: typeof t.encodeDotInKeys == "boolean" ? t.encodeDotInKeys : li.encodeDotInKeys,
13968    encoder: typeof t.encoder == "function" ? t.encoder : li.encoder,
13969    encodeValuesOnly: typeof t.encodeValuesOnly == "boolean" ? t.encodeValuesOnly : li.encodeValuesOnly,
13970    filter: g,
13971    format: l,
13972    formatter: h,
13973    serializeDate: typeof t.serializeDate == "function" ? t.serializeDate : li.serializeDate,
13974    skipNulls: typeof t.skipNulls == "boolean" ? t.skipNulls : li.skipNulls,
13975    sort: typeof t.sort == "function" ? t.sort : null,
13976    strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling : li.strictNullHandling
13977  };
13978}, Wq = function(e, t) {
13979  var s = e, l = Zq(t), h, g;
13980  typeof l.filter == "function" ? (g = l.filter, s = g("", s)) : pa(l.filter) && (g = l.filter, h = g);
13981  var m = [];
13982  if (typeof s != "object" || s === null)
13983    return "";
13984  var c = SP[l.arrayFormat], w = c === "comma" && l.commaRoundTrip;
13985  h || (h = Object.keys(s)), l.sort && h.sort(l.sort);
13986  for (var O = wP(), P = 0; P < h.length; ++P) {
13987    var R = h[P], z = s[R];
13988    l.skipNulls && z === null || TP(m, Gq(
13989      z,
13990      R,
13991      c,
13992      w,
13993      l.allowEmptyArrays,
13994      l.strictNullHandling,
13995      l.skipNulls,
13996      l.encodeDotInKeys,
13997      l.encode ? l.encoder : null,
13998      l.filter,
13999      l.sort,
14000      l.allowDots,
14001      l.serializeDate,
14002      l.format,
14003      l.formatter,
14004      l.encodeValuesOnly,
14005      l.charset,
14006      O
14007    ));
14008  }
14009  var J = m.join(l.delimiter), K = l.addQueryPrefix === !0 ? "?" : "";
14010  return l.charsetSentinel && (l.charset === "iso-8859-1" ? K += "utf8=%26%2310003%3B&" : K += "utf8=%E2%9C%93&"), J.length > 0 ? K + J : "";
14011}, iu = xP, Ov = Object.prototype.hasOwnProperty, pT = Array.isArray, Gn = {
14012  allowDots: !1,
14013  allowEmptyArrays: !1,
14014  allowPrototypes: !1,
14015  allowSparse: !1,
14016  arrayLimit: 20,
14017  charset: "utf-8",
14018  charsetSentinel: !1,
14019  comma: !1,
14020  decodeDotInKeys: !1,
14021  decoder: iu.decode,
14022  delimiter: "&",
14023  depth: 5,
14024  duplicates: "combine",
14025  ignoreQueryPrefix: !1,
14026  interpretNumericEntities: !1,
14027  parameterLimit: 1e3,
14028  parseArrays: !0,
14029  plainObjects: !1,
14030  strictDepth: !1,
14031  strictNullHandling: !1,
14032  throwOnLimitExceeded: !1
14033}, Kq = function(e) {
14034  return e.replace(/&#(\d+);/g, function(t, s) {
14035    return String.fromCharCode(parseInt(s, 10));
14036  });
14037}, EP = function(e, t, s) {
14038  if (e && typeof e == "string" && t.comma && e.indexOf(",") > -1)
14039    return e.split(",");
14040  if (t.throwOnLimitExceeded && s >= t.arrayLimit)
14041    throw new RangeError("Array limit exceeded. Only " + t.arrayLimit + " element" + (t.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
14042  return e;
14043}, Xq = "utf8=%26%2310003%3B", Jq = "utf8=%E2%9C%93", Yq = function(t, s) {
14044  var l = { __proto__: null }, h = s.ignoreQueryPrefix ? t.replace(/^\?/, "") : t;
14045  h = h.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
14046  var g = s.parameterLimit === 1 / 0 ? void 0 : s.parameterLimit, m = h.split(
14047    s.delimiter,
14048    s.throwOnLimitExceeded ? g + 1 : g
14049  );
14050  if (s.throwOnLimitExceeded && m.length > g)
14051    throw new RangeError("Parameter limit exceeded. Only " + g + " parameter" + (g === 1 ? "" : "s") + " allowed.");
14052  var c = -1, w, O = s.charset;
14053  if (s.charsetSentinel)
14054    for (w = 0; w < m.length; ++w)
14055      m[w].indexOf("utf8=") === 0 && (m[w] === Jq ? O = "utf-8" : m[w] === Xq && (O = "
14055iso-8859-1"), c = w, w = m.length);
14056  for (w = 0; w < m.length; ++w)
14057    if (w !== c) {
14058      var P = m[w], R = P.indexOf("]="), z = R === -1 ? P.indexOf("=") : R + 1, J, K;
14059      z === -1 ? (J = s.decoder(P, Gn.decoder, O, "key"), K = s.strictNullHandling ? null : "") : (J = s.decoder(P.slice(0, z), Gn.decoder, O, "key"), K = iu.maybeMap(
14060        EP(
14061          P.slice(z + 1),
14062          s,
14063          pT(l[J]) ? l[J].length : 0
14064        ),
14065        function(ue) {
14066          return s.decoder(ue, Gn.decoder, O, "value");
14067        }
14068      )), K && s.interpretNumericEntities && O === "iso-8859-1" && (K = Kq(String(K))), P.indexOf("[]=") > -1 && (K = pT(K) ? [K] : K);
14069      var ee = Ov.call(l, J);
14070      ee && s.duplicates === "combine" ? l[J] = iu.combine(l[J], K) : (!ee || s.duplicates === "last") && (l[J] = K);
14071    }
14072  return l;
14073}, Qq = function(e, t, s, l) {
14074  var h = 0;
14075  if (e.length > 0 && e[e.length - 1] === "[]") {
14076    var g = e.slice(0, -1).join("");
14077    h = Array.isArray(t) && t[g] ? t[g].length : 0;
14078  }
14079  for (var m = l ? t : EP(t, s, h), c = e.length - 1; c >= 0; --c) {
14080    var w, O = e[c];
14081    if (O === "[]" && s.parseArrays)
14082      w = s.allowEmptyArrays && (m === "" || s.strictNullHandling && m === null) ? [] : iu.combine([], m);
14083    else {
14084      w = s.plainObjects ? { __proto__: null } : {};
14085      var P = O.charAt(0) === "[" && O.charAt(O.length - 1) === "]" ? O.slice(1, -1) : O, R = s.decodeDotInKeys ? P.replace(/%2E/g, ".") : P, z = parseInt(R, 10);
14086      !s.parseArrays && R === "" ? w = { 0: m } : !isNaN(z) && O !== R && String(z) === R && z >= 0 && s.parseArrays && z <= s.arrayLimit ? (w = [], w[z] = m) : R !== "__proto__" && (w[R] = m);
14087    }
14088    m = w;
14089  }
14090  return m;
14091}, eH = function(t, s, l, h) {
14092  if (t) {
14093    var g = l.allowDots ? t.replace(/\.([^.[]+)/g, "[$1]") : t, m = /(\[[^[\]]*])/, c = /(\[[^[\]]*])/g, w = l.depth > 0 && m.exec(g), O = w ? g.slice(0, w.index) : g, P = [];
14094    if (O) {
14095      if (!l.plainObjects && Ov.call(Object.prototype, O) && !l.allowPrototypes)
14096        return;
14097      P.push(O);
14098    }
14099    for (var R = 0; l.depth > 0 && (w = c.exec(g)) !== null && R < l.depth; ) {
14100      if (R += 1, !l.plainObjects && Ov.call(Object.prototype, w[1].slice(1, -1)) && !l.allowPrototypes)
14101        return;
14102      P.push(w[1]);
14103    }
14104    if (w) {
14105      if (l.strictDepth === !0)
14106        throw new RangeError("Input depth exceeded depth option of " + l.depth + " and strictDepth is true");
14107      P.push("[" + g.slice(w.index) + "]");
14108    }
14109    return Qq(P, s, l, h);
14110  }
14111}, tH = function(t) {
14112  if (!t)
14113    return Gn;
14114  if (typeof t.allowEmptyArrays < "u" && typeof t.allowEmptyArrays != "boolean")
14115    throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
14116  if (typeof t.decodeDotInKeys < "u" && typeof t.decodeDotInKeys != "boolean")
14117    throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
14118  if (t.decoder !== null && typeof t.decoder < "u" && typeof t.decoder != "function")
14119    throw new TypeError("Decoder has to be a function.");
14120  if (typeof t.charset < "u" && t.charset !== "utf-8" && t.charset !== "iso-8859-1")
14121    throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
14122  if (typeof t.throwOnLimitExceeded < "u" && typeof t.throwOnLimitExceeded != "boolean")
14123    throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
14124  var s = typeof t.charset > "u" ? Gn.charset : t.charset, l = typeof t.duplicates > "u" ? Gn.duplicates : t.duplicates;
14125  if (l !== "combine" && l !== "first" && l !== "last")
14126    throw new TypeError("The duplicates option must be either combine, first, or last");
14127  var h = typeof t.allowDots > "u" ? t.decodeDotInKeys === !0 ? !0 : Gn.allowDots : !!t.allowDots;
14128  return {
14129    allowDots: h,
14130    allowEmptyArrays: typeof t.allowEmptyArrays == "boolean" ? !!t.allowEmptyArrays : Gn.allowEmptyArrays,
14131    allowPrototypes: typeof t.allowPrototypes == "boolean" ? t.allowPrototypes : Gn.allowPrototypes,
14132    allowSparse: typeof t.allowSparse == "boolean" ? t.allowSparse : Gn.allowSparse,
14133    arrayLimit: typeof t.arrayLimit == "number" ? t.arrayLimit : Gn.arrayLimit,
14134    charset: s,
14135    charsetSentinel: typeof t.charsetSentinel == "boolean" ? t.charsetSentinel : Gn.charsetSentinel,
14136    comma: typeof t.comma == "boolean" ? t.comma : Gn.comma,
14137    decodeDotInKeys: typeof t.decodeDotInKeys == "boolean" ? t.decodeDotInKeys : Gn.decodeDotInKeys,
14138    decoder: typeof t.decoder == "function" ? t.decoder : Gn.decoder,
14139    delimiter: typeof t.delimiter == "string" || iu.isRegExp(t.delimiter) ? t.delimiter : G
14139n.delimiter,
14140    // eslint-disable-next-line no-implicit-coercion, no-extra-parens
14141    depth: typeof t.depth == "number" || t.depth === !1 ? +t.depth : Gn.depth,
14142    duplicates: l,
14143    ignoreQueryPrefix: t.ignoreQueryPrefix === !0,
14144    interpretNumericEntities: typeof t.interpretNumericEntities == "boolean" ? t.interpretNumericEntities : Gn.interpretNumericEntities,
14145    parameterLimit: typeof t.parameterLimit == "number" ? t.parameterLimit : Gn.parameterLimit,
14146    parseArrays: t.parseArrays !== !1,
14147    plainObjects: typeof t.plainObjects == "boolean" ? t.plainObjects : Gn.plainObjects,
14148    strictDepth: typeof t.strictDepth == "boolean" ? !!t.strictDepth : Gn.strictDepth,
14149    strictNullHandling: typeof t.strictNullHandling == "boolean" ? t.strictNullHandling : Gn.strictNullHandling,
14150    throwOnLimitExceeded: typeof t.throwOnLimitExceeded == "boolean" ? t.throwOnLimitExceeded : !1
14151  };
14152}, rH = function(e, t) {
14153  var s = tH(t);
14154  if (e === "" || e === null || typeof e > "u")
14155    return s.plainObjects ? { __proto__: null } : {};
14156  for (var l = typeof e == "string" ? Yq(e, s) : e, h = s.plainObjects ? { __proto__: null } : {}, g = Object.keys(l), m = 0; m < g.length; ++m) {
14157    var c = g[m], w = eH(c, l[c], s, typeof e == "string");
14158    h = iu.merge(h, w, s);
14159  }
14160  return s.allowSparse === !0 ? h : iu.compact(h);
14161}, nH = Wq, iH = rH, sH = Ox, oH = {
14162  formats: sH,
14163  parse: iH,
14164  stringify: nH
14165};
14166const wX = /* @__PURE__ */ xa(oH), aH = (e) => e.replace(/[^.]/g, "").length;
14167var AP = {
14168  update: null,
14169  begin: null,
14170  loopBegin: null,
14171  changeBegin: null,
14172  change: null,
14173  changeComplete: null,
14174  loopComplete: null,
14175  complete: null,
14176  loop: 1,
14177  direction: "normal",
14178  autoplay: !0,
14179  timelineOffset: 0
14180}, Dx = {
14181  duration: 1e3,
14182  delay: 0,
14183  endDelay: 0,
14184  easing: "easeOutElastic(1, .5)",
14185  round: 0
14186}, lH = ["translateX", "translateY", "translateZ", "rotate", "rotateX", "rotateY", "rotateZ", "scale", "scaleX", "scaleY", "scaleZ", "skew", "skewX", "skewY", "perspective", "matrix", "matrix3d"], zm = {
14187  CSS: {},
14188  springs: {}
14189};
14190function ya(e, t, s) {
14191  return Math.min(Math.max(e, t), s);
14192}
14193function Gf(e, t) {
14194  return e.indexOf(t) > -1;
14195}
14196function P_(e, t) {
14197  return e.apply(null, t);
14198}
14199var tr = {
14200  arr: function(e) {
14201    return Array.isArray(e);
14202  },
14203  obj: function(e) {
14204    return Gf(Object.prototype.toString.call(e), "Object");
14205  },
14206  pth: function(e) {
14207    return tr.obj(e) && e.hasOwnProperty("totalLength");
14208  },
14209  svg: function(e) {
14210    return e instanceof SVGElement;
14211  },
14212  inp: function(e) {
14213    return e instanceof HTMLInputElement;
14214  },
14215  dom: function(e) {
14216    return e.nodeType || tr.svg(e);
14217  },
14218  str: function(e) {
14219    return typeof e == "string";
14220  },
14221  fnc: function(e) {
14222    return typeof e == "function";
14223  },
14224  und: function(e) {
14225    return typeof e > "u";
14226  },
14227  nil: function(e) {
14228    return tr.und(e) || e === null;
14229  },
14230  hex: function(e) {
14231    return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e);
14232  },
14233  rgb: function(e) {
14234    return /^rgb/.test(e);
14235  },
14236  hsl: function(e) {
14237    return /^hsl/.test(e);
14238  },
14239  col: function(e) {
14240    return tr.hex(e) || tr.rgb(e) || tr.hsl(e);
14241  },
14242  key: function(e) {
14243    return !AP.hasOwnProperty(e) && !Dx.hasOwnProperty(e) && e !== "targets" && e !== "keyframes";
14244  }
14245};
14246function CP(e) {
14247  var t = /\(([^)]+)\)/.exec(e);
14248  return t ? t[1].split(",").map(function(s) {
14249    return parseFloat(s);
14250  }) : [];
14251}
14252function IP(e, t) {
14253  var s = CP(e), l = ya(tr.und(s[0]) ? 1 : s[0], 0.1, 100), h = ya(tr.und(s[1]) ? 100 : s[1], 0.1, 100), g = ya(tr.und(s[2]) ? 10 : s[2], 0.1, 100), m = ya(tr.und(s[3]) ? 0 : s[3], 0.1, 100), c = Math.sqrt(h / l), w = g / (2 * Math.sqrt(h * l)), O = w < 1 ? c * Math.sqrt(1 - w * w) : 0, P = 1, R = w < 1 ? (w * c + -m) / O : -m + c;
14254  function z(K) {
14255    var ee = t ? t * K / 1e3 : K;
14256    return w < 1 ? ee = Math.exp(-ee * w * c) * (P * Math.cos(O * ee) + R * Math.sin(O * ee)) : ee = (P + R * ee) * Math.exp(-ee * c), K === 0 || K === 1 ? K : 1 - ee;
14257  }
14258  function J() {
14259    var K = zm.springs[e];
14260    if (K)
14261      return K;
14262    for (var ee = 1 / 6, ue = 0, Ce = 0; ; )
14263      if (ue += ee, z(ue) === 1) {
14264        if (Ce++, Ce >= 16)
14265          break;
14266      } else
14267        Ce = 0;
14268    var ge = ue * ee * 1e3;
14269    return zm.springs[e] = ge, ge;
14270  }
14271  return t ? z : J;
14272}
14273function cH(e) {
14274  return e === void 0 && (e = 10), function(t) {
14275    return Math.ceil(ya(t, 1e-6, 1) * e) * (1 / e);
14276  };
14277}
14278var uH = function() {
14279  var e = 11, t = 1 / (e - 1);
14280  function s(P, R) {
14281    return 1 - 3 * R + 3 * P;
14282  }
14283  function l(P, R) {
14284    return 3 * R - 6 * P;
14285  }
14286  function h(P) {
14287    return 3 * P;
14288  }
14289  function g(P, R, z) {
14290    return ((s(R, z) * P + l(R, z)) * P + h(R)) * P;
14291  }
14292  function m(P, R, z) {
14293    return 3 * s(R, z) * P * P + 2 * l(R, z) * P + h(R);
14294  }
14295  function c(P, R, z, J, K) {
14296    var ee, ue, Ce = 0;
14297    do
14298      ue = R + (z - R) / 2, ee = g(ue, J, K) - P, ee > 0 ? z = ue : R = ue;
14299    while (Math.abs(ee) > 1e-7 && ++Ce < 10);
14300    return ue;
14301  }
14302  function w(P, R, z, J) {
14303    for (var K = 0; K < 4; ++K) {
14304      var ee = m(R, z, J);
14305      if (ee === 0)
14306        return R;
14307      var ue = g(R, z, J) - P;
14308      R -= ue / ee;
14309    }
14310    return R;
14311  }
14312  function O(P, R, z, J) {
14313    if (!(0 <= P && P <= 1 && 0 <= z && z <= 1))
14314      return;
14315    var K = new Float32Array(e);
14316    if (P !== R || z !== J)
14317      for (var ee = 0; ee < e; ++ee)
14318        K[ee] = g(ee * t, P, z);
14319    function ue(Ce) {
14320      for (var ge = 0, X = 1, ye = e - 1; X !== ye && K[X] <= Ce; ++X)
14321        ge += t;
14322      --X;
14323      var Ae = (Ce - K[X]) / (K[X + 1] - K[X]), Se = ge + Ae * t, je = m(Se, P, z);
14324      return je >= 1e-3 ? w(Ce, Se, P, z) : je === 0 ? Se : c(Ce, ge, ge + t, P, z);
14325    }
14326    return function(Ce) {
14327      return P === R && z === J || Ce === 0 || Ce === 1 ? Ce : g(ue(Ce), R, J);
14328    };
14329  }
14330  return O;
14331}(), PP = function() {
14332  var e = { linear: function() {
14333    return function(l) {
14334      return l;
14335    };
14336  } }, t = {
14337    Sine: function() {
14338      return function(l) {
14339        return 1 - Math.cos(l * Math.PI / 2);
14340      };
14341    },
14342    Expo: function() {
14343      return function(l) {
14344        return l ? Math.pow(2, 10 * l - 10) : 0;
14345      };
14346    },
14347    Circ: function() {
14348      return function(l) {
14349        return 1 - Math.sqrt(1 - l * l);
14350      };
14351    },
14352    Back: function() {
14353      return function(l) {
14354        return l * l * (3 * l - 2);
14355      };
14356    },
14357    Bounce: function() {
14358      return function(l) {
14359        for (var h, g = 4; l < ((h = Math.pow(2, --g)) - 1) / 11; )
14360          ;
14361        return 1 / Math.pow(4, 3 - g) - 7.5625 * Math.pow((h * 3 - 2) / 22 - l, 2);
14362      };
14363    },
14364    Elastic: function(l, h) {
14365      l === void 0 && (l = 1), h === void 0 && (h = 0.5);
14366      var g = ya(l, 1, 10), m = ya(h, 0.1, 2);
14367      return function(c) {
14368        return c === 0 || c === 1 ? c : -g * Math.pow(2, 10 * (c - 1)) * Math.sin((c - 1 - m / (Math.PI * 2) * Math.asin(1 / g)) * (Math.PI * 2) / m);
14369      };
14370    }
14371  }, s = ["Quad", "Cubic", "Quart", "Quint"];
14372  return s.forEach(function(l, h) {
14373    t[l] = function() {
14374      return function(g) {
14375        return Math.pow(g, h + 2);
14376      };
14377    };
14378  }), Object.keys(t).forEach(function(l) {
14379    var h = t[l];
14380    e["easeIn" + l] = h, e["easeOut" + l] = function(g, m) {
14381      return function(c) {
14382        return 1 - h(g, m)(1 - c);
14383      };
14384    }, e["easeInOut" + l] = function(g, m) {
14385      return function(c) {
14386        return c < 0.5 ? h(g, m)(c * 2) / 2 : 1 - h(g, m)(c * -2 + 2) / 2;
14387      };
14388    }, e["easeOutIn" + l] = function(g, m) {
14389      return function(c) {
14390        return c < 0.5 ? (1 - h(g, m)(1 - c * 2)) / 2 : (h(g, m)(c * 2 - 1) + 1) / 2;
14391      };
14392    };
14393  }), e;
14394}();
14395function Rx(e, t) {
14396  if (tr.fnc(e))
14397    return e;
14398  var s = e.split("(")[0], l = PP[s], h = CP(e);
14399  switch (s) {
14400    case "spring":
14401      return IP(e, t);
14402    case "cubicBezier":
14403      return P_(uH, h);
14404    case "steps":
14405      return P_(cH, h);
14406    default:
14407      return P_(l, h);
14408  }
14409}
14410function MP(e) {
14411  try {
14412    var t = document.querySelectorAll(e);
14413    return t;
14414  } catch {
14415    return;
14416  }
14417}
14418function $g(e, t) {
14419  for (var s = e.length, l = arguments.length >= 2 ? arguments[1] : void 0, h = [], g = 0; g < s; g++)
14420    if (g in e) {
14421      var m = e[g];
14422      t.call(l, m, g, e) && h.push(m);
14423    }
14424  return h;
14425}
14426function jg(e) {
14427  return e.reduce(function(t, s) {
14428    return t.concat(tr.arr(s) ? jg(s) : s);
14429  }, []);
14430}
14431function mT(e) {
14432  return tr.arr(e) ? e : (tr.str(e) && (e = MP(e) || e), e instanceof NodeList || e instanceof HTMLCollection ? [].slice.call(e) : [e]);
14433}
14434function Lx(e, t) {
14435  return e.some(function(s) {
14436    return s === t;
14437  });
14438}
14439function Fx(e) {
14440  var t = {};
14441  for (var s in e)
14442    t[s] = e[s];
14443  return t;
14444}
14445function Dv(e, t) {
14446  var s = Fx(e);
14447  for (var l in e)
14448    s[l] = t.hasOwnProperty(l) ? t[l] : e[l];
14449  return s;
14450}
14451function Vg(e, t) {
14452  var s = Fx(e);
14453  for (var l in t)
14454    s[l] = tr.und(e[l]) ? t[l] : e[l];
14455  return s;
14456}
14457function hH(e) {
14458  var t = /rgb\((\d+,\s*[\d]+,\s*[\d]+)\)/g.exec(e);
14459  return t ? "rgba(" + t[1] + ",1)" : e;
14460}
14461function fH(e) {
14462  var t = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, s = e.replace(t, function(c, w, O, P) {
14463    return w + w + O + O + P + P;
14464  }), l = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(s), h = parseInt(l[1], 16), g = parseInt(l[2], 16), m = parseInt(l[3], 16);
14465  return "rgba(" + h + "," + g + "," + m + ",1)";
14466}
14467function dH(e) {
14468  var t = /hsl\((\d+),\s*([\d.]+)%,\s*([\d.]+)%\)/g.exec(e) || /hsla\((\d+),\s*([\d.]+)%,\s*([\d.]+)%,\s*([\d.]+)\)/g.exec(e), s = parseInt(t[1], 10) / 360, l = parseInt(t[2], 10) / 100, h = parseInt(t[3], 10) / 100, g = t[4] || 1;
14469  function m(z, J, K) {
14470    return K < 0 && (K += 1), K > 1 && (K -= 1), K < 1 / 6 ? z + (J - z) * 6 * K : K < 1 / 2 ? J : K < 2 / 3 ? z + (J - z) * (2 / 3 - K) * 6 : z;
14471  }
14472  var c, w, O;
14473  if (l == 0)
14474    c = w = O = h;
14475  else {
14476    var P = h < 0.5 ? h * (1 + l) : h + l - h * l, R = 2 * h - P;
14477    c = m(R, P, s + 1 / 3), w = m(R, P, s), O = m(R, P, s - 1 / 3);
14478  }
14479  return "rgba(" + c * 255 + "," + w * 255 + "," + O * 255 + "," + g + ")";
14480}
14481function pH(e) {
14482  if (tr.rgb(e))
14483    return hH(e);
14484  if (tr.hex(e))
14485    return fH(e);
14486  if (tr.hsl(e))
14487    return dH(e);
14488}
14489function nl(e) {
14490  var t = /[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?(%|px|pt|em|rem|in|cm|mm|ex|ch|pc|vw|vh|vmin|vmax|deg|rad|turn)?$/.exec(e);
14491  if (t)
14492    return t[1];
14493}
14494function mH(e) {
14495  if (Gf(e, "translate") || e === "perspective")
14496    return "px";
14497  if (Gf(e, "rotate") || Gf(e, "skew"))
14498    return "deg";
14499}
14500function Rv(e, t) {
14501  return tr.fnc(e) ? e(t.target, t.id, t.total) : e;
14502}
14503function _a(e, t) {
14504  return e.getAttribute(t);
14505}
14506function zx(e, t, s) {
14507  var l = nl(t);
14508  if (Lx([s, "deg", "rad", "turn"], l))
14509    return t;
14510  var h = zm.CSS[t + s];
14511  if (!tr.und(h))
14512    return h;
14513  var g = 100, m = document.createElement(e.tagName), c = e.parentNode && e.parentNode !== document ? e.parentNode : document.body;
14514  c.appendChild(m), m.style.position = "absolute", m.style.width = g + s;
14515  var w = g / m.offsetWidth;
14516  c.removeChild(m);
14517  var O = w * parseFloat(t);
14518  return zm.CSS[t + s] = O, O;
14519}
14520function kP(e, t, s) {
14521  if (t in e.style) {
14522    var l = t.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase(), h = e.style[t] || getComputedStyle(e).getPropertyValue(l) || "0";
14523    return s ? zx(e, h, s) : h;
14524  }
14525}
14526function Bx(e, t) {
14527  if (tr.dom(e) && !tr.inp(e) && (!tr.nil(_a(e, t)) || tr.svg(e) && e[t]))
14528    return "attribute";
14529  if (tr.dom(e) && Lx(lH, t))
14530    return "transform";
14531  if (tr.dom(e) && t !== "transform" && kP(e, t))
14532    return "css";
14533  if (e[t] != null)
14534    return "object";
14535}
14536function OP(e) {
14537  if (tr.dom(e)) {
14538    for (var t = e.style.transform || "", s = /(\w+)\(([^)]*)\)/g, l = /* @__PURE__ */ new Map(), h; h = s.exec(t); )
14539      l.set(h[1], h[2]);
14540    return l;
14541  }
14542}
14543function gH(e, t, s, l) {
14544  var h = Gf(t, "scale") ? 1 : 0 + mH(t), g = OP(e).get(t) || h;
14545  return s && (s.transforms.list.set(t, g), s.transforms.last = t), l ? zx(e, g, l) : g;
14546}
14547function Nx(e, t, s, l) {
14548  switch (Bx(e, t)) {
14549    case "transform":
14550      return gH(e, t, l, s);
14551    case "css":
14552      return kP(e, t, s);
14553    case "attribute":
14554      return _a(e, t);
14555    default:
14556      return e[t] || 0;
14557  }
14558}
14559function $x(e, t) {
14560  var s = /^(\*=|\+=|-=)/.exec(e);
14561  if (!s)
14562    return e;
14563  var l = nl(e) || 0, h = parseFloat(t), g = parseFloat(e.replace(s[0], ""));
14564  switch (s[0][0]) {
14565    case "+":
14566      return h + g + l;
14567    case "-":
14568      return h - g + l;
14569    case "*":
14570      return h * g + l;
14571  }
14572}
14573function DP(e, t) {
14574  if (tr.col(e))
14575    return pH(e);
14576  if (/\s/g.test(e))
14577    return e;
14578  var s = nl(e), l = s ? e.substr(0, e.length - s.length) : e;
14579  return t ? l + t : l;
14580}
14581function jx(e, t) {
14582  return Math.sqrt(Math.pow(t.x - e.x, 2) + Math.pow(t.y - e.y, 2));
14583}
14584function yH(e) {
14585  return Math.PI * 2 * _a(e, "r");
14586}
14587function _H(e) {
14588  return _a(e, "width") * 2 + _a(e, "height") * 2;
14589}
14590function vH(e) {
14591  return jx(
14592    { x: _a(e, "x1"), y: _a(e, "y1") },
14593    { x: _a(e, "x2"), y: _a(e, "y2") }
14594  );
14595}
14596function RP(e) {
14597  for (var t = e.points, s = 0, l, h = 0; h < t.numberOfItems; h++) {
14598    var g = t.getItem(h);
14599    h > 0 && (s += jx(l, g)), l = g;
14600  }
14601  return s;
14602}
14603function bH(e) {
14604  var t = e.points;
14605  return RP(e) + jx(t.getItem(t.numberOfItems - 1), t.getItem(0));
14606}
14607function LP(e) {
14608  if (e.getTotalLength)
14609    return e.getTotalLength();
14610  switch (e.tagName.toLowerCase()) {
14611    case "circle":
14612      return yH(e);
14613    case "rect":
14614      return _H(e);
14615    case "line":
14616      return vH(e);
14617    case "polyline":
14618      return RP(e);
14619    case "polygon":
14620      return bH(e);
14621  }
14622}
14623function xH(e) {
14624  var t = LP(e);
14625  return e.setAttribute("stroke-dasharray", t), t;
14626}
14627function wH(e) {
14628  for (var t = e.parentNode; tr.svg(t) && tr.svg(t.parentNode); )
14629    t = t.parentNode;
14630  return t;
14631}
14632function FP(e, t) {
14633  var s = t || {}, l = s.el || wH(e), h = l.getBoundingClientRect(), g = _a(l, "viewBox"), m = h.width, c = h.height, w = s.viewBox || (g ? g.split(" ") : [0, 0, m, c]);
14634  return {
14635    el: l,
14636    viewBox: w,
14637    x: w[0] / 1,
14638    y: w[1] / 1,
14639    w: m,
14640    h: c,
14641    vW: w[2],
14642    vH: w[3]
14643  };
14644}
14645function SH(e, t) {
14646  var s = tr.str(e) ? MP(e)[0] : e, l = t || 100;
14647  return function(h) {
14648    return {
14649      property: h,
14650      el: s,
14651      svg: FP(s),
14652      totalLength: LP(s) * (l / 100)
14653    };
14654  };
14655}
14656function TH(e, t, s) {
14657  function l(P) {
14658    P === void 0 && (P = 0);
14659    var R = t + P >= 1 ? t + P : 0;
14660    return e.el.getPointAtLength(R);
14661  }
14662  var h = FP(e.el, e.svg), g = l(), m = l(-1), c = l(1), w = s ? 1 : h.w / h.vW, O = s ? 1 : h.h / h.vH;
14663  switch (e.property) {
14664    case "x":
14665      return (g.x - h.x) * w;
14666    case "y":
14667      return (g.y - h.y) * O;
14668    case "angle":
14669      return Math.atan2(c.y - m.y, c.x - m.x) * 180 / Math.PI;
14670  }
14671}
14672function gT(e, t) {
14673  var s = /[+-]?\d*\.?\d+(?:\.\d+)?(?:[eE][+-]?\d+)?/g, l = DP(tr.pth(e) ? e.totalLength : e, t) + "";
14674  return {
14675    original: l,
14676    numbers: l.match(s) ? l.match(s).map(Number) : [0],
14677    strings: tr.str(e) || t ? l.split(s) : []
14678  };
14679}
14680function Vx(e) {
14681  var t = e ? jg(tr.arr(e) ? e.map(mT) : mT(e)) : [];
14682  return $g(t, function(s, l, h) {
14683    return h.indexOf(s) === l;
14684  });
14685}
14686function zP(e) {
14687  var t = Vx(e);
14688  return t.map(function(s, l) {
14689    return { target: s, id: l, total: t.length, transforms: { list: OP(s) } };
14690  });
14691}
14692function EH(e, t) {
14693  var s = Fx(t);
14694  if (/^spring/.test(s.easing) && (s.duration = IP(s.easing)), tr.arr(e)) {
14695    var l = e.length, h = l === 2 && !tr.obj(e[0]);
14696    h ? e = { value: e } : tr.fnc(t.duration) || (s.duration = t.duration / l);
14697  }
14698  var g = tr.arr(e) ? e : [e];
14699  return g.map(function(m, c) {
14700    var w = tr.obj(m) && !tr.pth(m) ? m : { value: m };
14701    return tr.und(w.delay) && (w.delay = c ? 0 : t.delay), tr.und(w.endDelay) && (w.endDelay = c === g.length - 1 ? t.endDelay : 0), w;
14702  }).map(function(m) {
14703    return Vg(m, s);
14704  });
14705}
14706function AH(e) {
14707  for (var t = $g(jg(e.map(function(g) {
14708    return Object.keys(g);
14709  })), function(g) {
14710    return tr.key(g);
14711  }).reduce(function(g, m) {
14712    return g.indexOf(m) < 0 && g.push(m), g;
14713  }, []), s = {}, l = function(g) {
14714    var m = t[g];
14715    s[m] = e.map(function(c) {
14716      var w = {};
14717      for (var O in c)
14718        tr.key(O) ? O == m && (w.value = c[O]) : w[O] = c[O];
14719      return w;
14720    });
14721  }, h = 0; h < t.length; h++)
14722    l(h);
14723  return s;
14724}
14725function CH(e, t) {
14726  var s = [], l = t.keyframes;
14727  l && (t = Vg(AH(l), t));
14728  for (var h in t)
14729    tr.key(h) && s.push({
14730      name: h,
14731      tweens: EH(t[h], e)
14732    });
14733  return s;
14734}
14735function IH(e, t) {
14736  var s = {};
14737  for (var l in e) {
14738    var h = Rv(e[l], t);
14739    tr.arr(h) && (h = h.map(function(g) {
14740      return Rv(g, t);
14741    }), h.length === 1 && (h = h[0])), s[l] = h;
14742  }
14743  return s.duration = parseFloat(s.duration), s.delay = parseFloat(s.delay), s;
14744}
14745function PH(e, t) {
14746  var s;
14747  return e.tweens.map(function(l) {
14748    var h = IH(l, t), g = h.value, m = tr.arr(g) ? g[1] : g, c = nl(m), w = Nx(t.target, e.name, c, t), O = s ? s.to.original : w, P = tr.arr(g) ? g[0] : O, R = nl(P) || nl(w), z = c || R;
14749    return tr.und(m) && (m = O), h.from = gT(P, z), h.to = gT($x(m, P), z), h.start = s ? s.end : 0, h.end = h.start + h.delay + h.duration + h.endDelay, h.easing = Rx(h.easing, h.duration), h.isPath = tr.pth(g), h.isPathTargetInsideSVG = h.isPath && tr.svg(t.target), h.isColor = tr.col(h.from.original), h.isColor && (h.round = 1), s = h, h;
14750  });
14751}
14752var BP = {
14753  css: function(e, t, s) {
14754    return e.style[t] = s;
14755  },
14756  attribute: function(e, t, s) {
14757    return e.setAttribute(t, s);
14758  },
14759  object: function(e, t, s) {
14760    return e[t] = s;
14761  },
14762  transform: function(e, t, s, l, h) {
14763    if (l.list.set(t, s), t === l.last || h) {
14764      var g = "";
14765      l.list.forEach(function(m, c) {
14766        g += c + "(" + m + ") ";
14767      }), e.style.transform = g;
14768    }
14769  }
14770};
14771function NP(e, t) {
14772  var s = zP(e);
14773  s.forEach(function(l) {
14774    for (var h in t) {
14775      var g = Rv(t[h], l), m = l.target, c = nl(g), w = Nx(m, h, c, l), O = c || nl(w), P = $x(DP(g, O), w), R = Bx(m, h);
14776      BP[R](m, h, P, l.transforms, !0);
14777    }
14778  });
14779}
14780function MH(e, t) {
14781  var s = Bx(e.target, t.name);
14782  if (s) {
14783    var l = PH(t, e), h = l[l.length - 1];
14784    return {
14785      type: s,
14786      property: t.name,
14787      animatable: e,
14788      tweens: l,
14789      duration: h.end,
14790      delay: l[0].delay,
14791      endDelay: h.endDelay
14792    };
14793  }
14794}
14795function kH(e, t) {
14796  return $g(jg(e.map(function(s) {
14797    return t.map(function(l) {
14798      return MH(s, l);
14799    });
14800  })), function(s) {
14801    return !tr.und(s);
14802  });
14803}
14804function $P(e, t) {
14805  var s = e.length, l = function(g) {
14806    return g.timelineOffset ? g.timelineOffset : 0;
14807  }, h = {};
14808  return h.duration = s ? Math.max.apply(Math, e.map(function(g) {
14809    return l(g) + g.duration;
14810  })) : t.duration, h.delay = s ? Math.min.apply(Math, e.map(function(g) {
14811    return l(g) + g.delay;
14812  })) : t.delay, h.endDelay = s ? h.duration - Math.max.apply(Math, e.map(function(g) {
14813    return l(g) + g.duration - g.endDelay;
14814  })) : t.endDelay, h;
14815}
14816var yT = 0;
14817function OH(e) {
14818  var t = Dv(AP, e), s = Dv(Dx, e), l = CH(s, e), h = zP(e.targets), g = kH(h, l), m = $P(g, s), c = yT;
14819  return yT++, Vg(t, {
14820    id: c,
14821    children: [],
14822    animatables: h,
14823    animations: g,
14824    duration: m.duration,
14825    delay: m.delay,
14826    endDelay: m.endDelay
14827  });
14828}
14829var $o = [], jP = function() {
14830  var e;
14831  function t() {
14832    !e && (!_T() || !Wn.suspendWhenDocumentHidden) && $o.length > 0 && (e = requestAnimationFrame(s));
14833  }
14834  function s(h) {
14835    for (var g = $o.length, m = 0; m < g; ) {
14836      var c = $o[m];
14837      c.paused ? ($o.splice(m, 1), g--) : (c.tick(h), m++);
14838    }
14839    e = m > 0 ? requestAnimationFrame(s) : void 0;
14840  }
14841  function l() {
14842    Wn.suspendWhenDocumentHidden && (_T() ? e = cancelAnimationFrame(e) : ($o.forEach(
14843      function(h) {
14844        return h._onDocumentVisibility();
14845      }
14846    ), jP()));
14847  }
14848  return typeof document < "u" && document.addEventListener("visibilitychange", l), t;
14849}();
14850function _T() {
14851  return !!document && document.hidden;
14852}
14853function Wn(e) {
14854  e === void 0 && (e = {});
14855  var t = 0, s = 0, l = 0, h, g = 0, m = null;
14856  function c(ge) {
14857    var X = window.Promise && new Promise(function(ye) {
14858      return m = ye;
14859    });
14860    return ge.finished = X, X;
14861  }
14862  var w = OH(e);
14863  c(w);
14864  function O() {
14865    var ge = w.direction;
14866    ge !== "alternate" && (w.direction = ge !== "normal" ? "normal" : "reverse"), w.reversed = !w.reversed, h.forEach(function(X) {
14867      return X.reversed = w.reversed;
14868    });
14869  }
14870  function P(ge) {
14871    return w.reversed ? w.duration - ge : ge;
14872  }
14873  function R() {
14874    t = 0, s = P(w.currentTime) * (1 / Wn.speed);
14875  }
14876  function z(ge, X) {
14877    X && X.seek(ge - X.timelineOffset);
14878  }
14879  function J(ge) {
14880    if (w.reversePlayback)
14881      for (var ye = g; ye--; )
14882        z(ge, h[ye]);
14883    else
14884      for (var X = 0; X < g; X++)
14885        z(ge, h[X]);
14886  }
14887  function K(ge) {
14888    for (var X = 0, ye = w.animations, Ae = ye.length; X < Ae; ) {
14889      var Se = ye[X], je = Se.animatable, Ne = Se.tweens, Oe = Ne.length - 1, ze = Ne[Oe];
14890      Oe && (ze = $g(Ne, function(Fr) {
14891        return ge < Fr.end;
14892      })[0] || ze);
14893      for (var He = ya(ge - ze.start - ze.delay, 0, ze.duration) / ze.duration, Ie = isNaN(He) ? 1 : ze.easing(He), $e = ze.to.strings, Xe = ze.round, st = [], Ge = ze.to.numbers.length, ct = void 0, ot = 0; ot < Ge; ot++) {
14894        var Ht = void 0, fr = ze.to.numbers[ot], Qt = ze.from.numbers[ot] || 0;
14895        ze.isPath ? Ht = TH(ze.value, Ie * fr, ze.isPathTargetInsideSVG) : Ht = Qt + Ie * (fr - Qt), Xe && (ze.isColor && ot > 2 || (Ht = Math.round(Ht * Xe) / Xe)), st.push(Ht);
14896      }
14897      var ur = $e.length;
14898      if (!ur)
14899        ct = st[0];
14900      else {
14901        ct = $e[0];
14902        for (var Ar = 0; Ar < ur; Ar++) {
14903          $e[Ar];
14904          var en = $e[Ar + 1], $r = st[Ar];
14905          isNaN($r) || (en ? ct += $r + en : ct += $r + " ");
14906        }
14907      }
14908      BP[Se.type](je.target, Se.property, ct, je.transforms), Se.currentValue = ct, X++;
14909    }
14910  }
14911  function ee(ge) {
14912    w[ge] && !w.passThrough && w[ge](w);
14913  }
14914  function ue() {
14915    w.remaining && w.remaining !== !0 && w.remaining--;
14916  }
14917  function Ce(ge) {
14918    var X = w.duration, ye = w.delay, Ae = X - w.endDelay, Se = P(ge);
14919    w.progress = ya(Se / X * 100, 0, 100), w.reversePlayback = Se < w.currentTime, h && J(Se), !w.began && w.currentTime > 0 && (w.began = !0, ee("begin")), !w.loopBegan && w.currentTime > 0 && (w.loopBegan = !0, ee("loopBegin")), Se <= ye && w.currentTime !== 0 && K(0), (Se >= Ae && w.currentTime !== X || !X) && K(X), Se > ye && Se < Ae ? (w.changeBegan || (w.changeBegan = !0, w.changeCompleted = !1, ee("changeBegin")), ee("change"), K(Se)) : w.changeBegan && (w.changeCompleted = !0, w.changeBegan = !1, ee("changeComplete")), w.currentTime = ya(Se, 0, X
14919), w.began && ee("update"), ge >= X && (s = 0, ue(), w.remaining ? (t = l, ee("loopComplete"), w.loopBegan = !1, w.direction === "alternate" && O()) : (w.paused = !0, w.completed || (w.completed = !0, ee("loopComplete"), ee("complete"), !w.passThrough && "Promise" in window && (m(), c(w)))));
14920  }
14921  return w.reset = function() {
14922    var ge = w.direction;
14923    w.passThrough = !1, w.currentTime = 0, w.progress = 0, w.paused = !0, w.began = !1, w.loopBegan = !1, w.changeBegan = !1, w.completed = !1, w.changeCompleted = !1, w.reversePlayback = !1, w.reversed = ge === "reverse", w.remaining = w.loop, h = w.children, g = h.length;
14924    for (var X = g; X--; )
14925      w.children[X].reset();
14926    (w.reversed && w.loop !== !0 || ge === "alternate" && w.loop === 1) && w.remaining++, K(w.reversed ? w.duration : 0);
14927  }, w._onDocumentVisibility = R, w.set = function(ge, X) {
14928    return NP(ge, X), w;
14929  }, w.tick = function(ge) {
14930    l = ge, t || (t = l), Ce((l + (s - t)) * Wn.speed);
14931  }, w.seek = function(ge) {
14932    Ce(P(ge));
14933  }, w.pause = function() {
14934    w.paused = !0, R();
14935  }, w.play = function() {
14936    w.paused && (w.completed && w.reset(), w.paused = !1, $o.push(w), R(), jP());
14937  }, w.reverse = function() {
14938    O(), w.completed = !w.reversed, R();
14939  }, w.restart = function() {
14940    w.reset(), w.play();
14941  }, w.remove = function(ge) {
14942    var X = Vx(ge);
14943    VP(X, w);
14944  }, w.reset(), w.autoplay && w.play(), w;
14945}
14946function vT(e, t) {
14947  for (var s = t.length; s--; )
14948    Lx(e, t[s].animatable.target) && t.splice(s, 1);
14949}
14950function VP(e, t) {
14951  var s = t.animations, l = t.children;
14952  vT(e, s);
14953  for (var h = l.length; h--; ) {
14954    var g = l[h], m = g.animations;
14955    vT(e, m), !m.length && !g.children.length && l.splice(h, 1);
14956  }
14957  !s.length && !l.length && t.pause();
14958}
14959function DH(e) {
14960  for (var t = Vx(e), s = $o.length; s--; ) {
14961    var l = $o[s];
14962    VP(t, l);
14963  }
14964}
14965function RH(e, t) {
14966  t === void 0 && (t = {});
14967  var s = t.direction || "normal", l = t.easing ? Rx(t.easing) : null, h = t.grid, g = t.axis, m = t.from || 0, c = m === "first", w = m === "center", O = m === "last", P = tr.arr(e), R = parseFloat(P ? e[0] : e), z = P ? parseFloat(e[1]) : 0, J = nl(P ? e[1] : e) || 0, K = t.start || 0 + (P ? R : 0), ee = [], ue = 0;
14968  return function(Ce, ge, X) {
14969    if (c && (m = 0), w && (m = (X - 1) / 2), O && (m = X - 1), !ee.length) {
14970      for (var ye = 0; ye < X; ye++) {
14971        if (!h)
14972          ee.push(Math.abs(m - ye));
14973        else {
14974          var Ae = w ? (h[0] - 1) / 2 : m % h[0], Se = w ? (h[1] - 1) / 2 : Math.floor(m / h[0]), je = ye % h[0], Ne = Math.floor(ye / h[0]), Oe = Ae - je, ze = Se - Ne, He = Math.sqrt(Oe * Oe + ze * ze);
14975          g === "x" && (He = -Oe), g === "y" && (He = -ze), ee.push(He);
14976        }
14977        ue = Math.max.apply(Math, ee);
14978      }
14979      l && (ee = ee.map(function($e) {
14980        return l($e / ue) * ue;
14981      })), s === "reverse" && (ee = ee.map(function($e) {
14982        return g ? $e < 0 ? $e * -1 : -$e : Math.abs(ue - $e);
14983      }));
14984    }
14985    var Ie = P ? (z - R) / ue : R;
14986    return K + Ie * (Math.round(ee[ge] * 100) / 100) + J;
14987  };
14988}
14989function LH(e) {
14990  e === void 0 && (e = {});
14991  var t = Wn(e);
14992  return t.duration = 0, t.add = function(s, l) {
14993    var h = $o.indexOf(t), g = t.children;
14994    h > -1 && $o.splice(h, 1);
14995    function m(z) {
14996      z.passThrough = !0;
14997    }
14998    for (var c = 0; c < g.length; c++)
14999      m(g[c]);
15000    var w = Vg(s, Dv(Dx, e));
15001    w.targets = w.targets || e.targets;
15002    var O = t.duration;
15003    w.autoplay = !1, w.direction = t.direction, w.timelineOffset = tr.und(l) ? O : $x(l, O), m(t), t.seek(w.timelineOffset);
15004    var P = Wn(w);
15005    m(P), g.push(P);
15006    var R = $P(g, e);
15007    return t.delay = R.delay, t.endDelay = R.endDelay, t.duration = R.duration, t.seek(0), t.reset(), t.autoplay && t.play(), t;
15008  }, t;
15009}
15010Wn.version = "3.2.1";
15011Wn.speed = 1;
15012Wn.suspendWhenDocumentHidden = !0;
15013Wn.running = $o;
15014Wn.remove = DH;
15015Wn.get = Nx;
15016Wn.set = NP;
15017Wn.convertPx = zx;
15018Wn.path = SH;
15019Wn.setDashoffset = xH;
15020Wn.stagger = RH;
15021Wn.timeline = LH;
15022Wn.easing = Rx;
15023Wn.penner = PP;
15024Wn.random = function(e, t) {
15025  return Math.floor(Math.random() * (t - e + 1)) + e;
15026};
15027function FH(e) {
15028  return aH(e) > 0 ? (console.error("Invalid ease type. Please use anime.js ease types."), "linear") : e;
15029}
15030function zH(e, t, s = "tweenedNumber") {
15031  return Wn({
15032    targets: e,
15033    [s]: t[s],
15034    easing: FH(t.easing),
15035    update: t.onUpdate,
15036    complete: t.onComplete,
15037    begin: t.onStart,
15038    ...t
15039  });
15040}
15041const SX = /* @__PURE__ */ gd({
15042  props: {
15043    from: {
15044      type: [String, Number],
15045      default: 0
15046    },
15047    to: {
15048      type: [String, Number],
15049      default: 100
15050    },
15051    format: {
15052      type: Function,
15053      default: (e) => e
15054    },
15055    duration: {
15056      type: Number,
15057      default: 1
15058    },
15059    easing: {
15060      type: String,
15061      default: "linear"
15062    },
15063    delay: {
15064      type: Number,
15065      default: 0
15066    },
15067    tag: {
15068      type: String,
15069      default: "span"
15070    },
15071    autoplay: {
15072      type: Boolean,
15073      default: !0
15074    }
15075  },
15076  emits: ["start", "complete", "update"],
15077  setup(e, { emit: t, expose: s }) {
15078    const l = au({
15079      tweenedNumber: e.from,
15080      displayNumber: e.format(e.from)
15081    });
15082    function h(O = e.to) {
15083      return zH(l, {
15084        tweenedNumber: O,
15085        duration: e.duration * 1e3,
15086        easing: e.easing,
15087        delay: e.delay,
15088        autoplay: e.autoplay,
15089        onUpdate: () => {
15090          l.displayNumber = e.format(l.tweenedNumber), t("update");
15091        },
15092        onStart: () => t("start"),
15093        onComplete: () => t("complete", l.displayNumber)
15094      });
15095    }
15096    let g = h();
15097    function m() {
15098      g.play();
15099    }
15100    function c() {
15101      g.pause();
15102    }
15103    function w() {
15104      g.restart();
15105    }
15106    return tl(
15107      () => e.to,
15108      (O) => {
15109        g.remove(l), g = h(O);
15110      }
15111    ), s({
15112      ...mb(l),
15113      play: m,
15114      pause: c,
15115      restart: w
15116    }), () => mg(e.tag, l.displayNumber);
15117  }
15118});
15119var UP = { exports: {} };
15120const BH = /* @__PURE__ */ pI(Cz);
15121(function(e, t) {
15122  (function(s, l) {
15123    e.exports = l(BH);
15124  })(typeof self < "u" ? self : ps, function(s) {
15125    return function() {
15126      var l = { 388: function(c, w) {
15127        var O, P, R;
15128        (function(z, J) {
15129          P = [], O = J, R = typeof O == "function" ? O.apply(w, P) : O, R === void 0 || (c.exports = R);
15130        })(typeof self < "u" && self, function() {
15131          function z() {
15132            var J = Object.getOwnPropertyDescriptor(document, "currentScript");
15133            if (!J && "currentScript" in document && document.currentScript || J && J.get !== z && document.currentScript) return document.currentScript;
15134            try {
15135              throw new Error();
15136            } catch (Oe) {
15137              var K, ee, ue, Ce = /.*at [^(]*\((.*):(.+):(.+)\)$/gi, ge = /@([^@]*):(\d+):(\d+)\s*$/gi, X = Ce.exec(Oe.stack) || ge.exec(Oe.stack), ye = X && X[1] || !1, Ae = X && X[2] || !1, Se = document.location.href.replace(document.location.hash, ""), je = document.getElementsByTagName("script");
15138              ye === Se && (K = document.documentElement.outerHTML, ee = new RegExp("(?:[^\\n]+?\\n){0," + (Ae - 2) + "}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*", "i"), ue = K.replace(ee, "$1").trim());
15139              for (var Ne = 0; Ne < je.length; Ne++)
15140                if (je[Ne].readyState === "interactive" || je[Ne].src === ye || ye === Se && je[Ne].innerHTML && je[Ne].innerHTML.trim() === ue) return je[Ne];
15141              return null;
15142            }
15143          }
15144          return z;
15145        });
15146      }, 905: function(c, w, O) {
15147        O.r(w);
15148        var P = O(117), R = O.n(P), z = O(488), J = O.n(z), K = J()(R());
15149        K.push([c.id, ".vue-slider-dot{position:absolute;-webkit-transition:all 0s;transition:all 0s;z-index:5}.vue-slider-dot:focus{outline:none}.vue-slider-dot-tooltip{position:absolute;visibility:hidden}.vue-slider-dot-hover:hover .vue-slider-dot-tooltip,.vue-slider-dot-tooltip-show{visibility:visible}.vue-slider-dot-tooltip-top{top:-10px;left:50%;-webkit-transform:translate(-50%,-100%);transform:translate(-50%,-100%)}.vue-slider-dot-tooltip-bottom{bottom:-10px;left:50%;-webkit-transform:translate(-50%,100%);transform:translate(-50%,100%)}.vue-slider-dot-tooltip-left{left:-10px;top:50%;-webkit-transform:translate(-100%,-50%);transform:translate(-100%,-50%)}.vue-slider-dot-tooltip-right{right:-10px;top:50%;-webkit-transform:translate(100%,-50%);transform:translate(100%,-50%)}", ""]), w.default = K;
15150      }, 121: function(c, w, O) {
15151        O.r(w);
15152        var P = O(117), R = O.n(P), z = O(488), J = O.n(z), K = J()(R());
15153        K.push([c.id, ".vue-slider-marks{position:relative;width:100%;height:100%}.vue-slider-mark{position:absolute;z-index:1}.vue-slider-ltr .vue-slider-mark,.vue-slider-rtl .vue-slider-mark{width:0;height:100%;top:50%}.vue-slider-ltr .vue-slider-mark-step,.vue-slider-rtl .vue-slider-mark-step{top:0}.vue-slider-ltr .vue-slider-mark-label,.vue-slider-rtl .vue-slider-mark-label{top:100%;margin-top:10px}.vue-slider-ltr .vue-slider-mark{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.vue-slider-ltr .vue-slider-mark-step{left:0}.vue-slider-ltr .vue-slider-mark-label{left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.vue-slider-rtl .vue-slider-mark{-webkit-transform:translate(50%,-50%);transform:translate(50%,-50%)}.vue-slider-rtl .vue-slider-mark-step{right:0}.vue-slider-rtl .vue-slider-mark-label{right:50%;-webkit-transform:translateX(50%);transform:translateX(50%)}.vue-slider-btt .vue-slider-mark,.vue-slider-ttb .vue-slider-mark{width:100%;height:0;left:50%}.vue-slider-btt .vue-slider-mark-step,.vue-slider-ttb .vue-slider-mark-step{left:0}.vue-slider-btt .vue-slider-mark-label,.vue-slider-ttb .vue-slider-mark-label{left:100%;margin-left:10px}.vue-slider-btt .vue-slider-mark{-webkit-transform:translate(-50%,50%);transform:translate(-50%,50%)}.vue-slider-btt .vue-slider-mark-step{top:0}.vue-slider-btt .vue-slider-mark-label{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.vue-slider-ttb .vue-slider-mark{-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.vue-slider-ttb .vue-slider-mark-step{bottom:0}.vue-slider-ttb .vue-slider-mark-label{bottom:50%;-webkit-transform:translateY(50%);transform:translateY(50%)}.vue-slider-mark-label,.vue-slider-mark-step{position:absolute}", ""]), w.default = K;
15154      }, 207: function(c, w, O) {
15155        O.r(w);
15156        var P = O(117), R = O.n(P), z = O(488), J = O.n(z), K = J()(R());
15157        K.push([c.id, ".vue-slider{position:relative;-webkit-box-sizing:content-box;box-sizing:content-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:block;-webkit-tap-highlight-color:rgba(0,0,0,0)}.vue-slider-rail{position:relative;width:100%;height:100%;-webkit-transition-property:width,height,left,right,top,bottom;transition-property:width,height,left,right,top,bottom}.vue-slider-process{position:absolute;z-index:1}", ""]), w.default = K;
15158      }, 488: function(c) {
15159        c.exports = function(w) {
15160          var O = [];
15161          return O.toString = function() {
15162            return this.map(function(P) {
15163              var R = "", z = typeof P[5] < "u";
15164              return P[4] && (R += "@supports (".concat(P[4], ") {")), P[2] && (R += "@media ".concat(P[2], " {")), z && (R += "@layer".concat(P[5].length > 0 ? " ".concat(P[5]) : "", " {")), R += w(P), z && (R += "}"), P[2] && (R += "}"), P[4] && (R += "}"), R;
15165            }).join("");
15166          }, O.i = function(P, R, z, J, K) {
15167            typeof P == "string" && (P = [[null, P, void 0]]);
15168            var ee = {};
15169            if (z) for (var ue = 0; ue < this.length; ue++) {
15170              var Ce = this[ue][0];
15171              Ce != null && (ee[Ce] = !0);
15172            }
15173            for (var ge = 0; ge < P.length; ge++) {
15174              var X = [].concat(P[ge]);
15175              z && ee[X[0]] || (typeof K < "u" && (typeof X[5] >
15175 "u" || (X[1] = "@layer".concat(X[5].length > 0 ? " ".concat(X[5]) : "", " {").concat(X[1], "}")), X[5] = K), R && (X[2] && (X[1] = "@media ".concat(X[2], " {").concat(X[1], "}")), X[2] = R), J && (X[4] ? (X[1] = "@supports (".concat(X[4], ") {").concat(X[1], "}"), X[4] = J) : X[4] = "".concat(J)), O.push(X));
15176            }
15177          }, O;
15178        };
15179      }, 117: function(c) {
15180        c.exports = function(w) {
15181          return w[1];
15182        };
15183      }, 831: function(c, w) {
15184        w.Z = (O, P) => {
15185          const R = O.__vccOpts || O;
15186          for (const [z, J] of P) R[z] = J;
15187          return R;
15188        };
15189      }, 466: function(c, w, O) {
15190        var P = O(905);
15191        P.__esModule && (P = P.default), typeof P == "string" && (P = [[c.id, P, ""]]), P.locals && (c.exports = P.locals);
15192        var R = O(959).Z;
15193        R("50bc1720", P, !0, { sourceMap: !1, shadowMode: !1 });
15194      }, 18: function(c, w, O) {
15195        var P = O(121);
15196        P.__esModule && (P = P.default), typeof P == "string" && (P = [[c.id, P, ""]]), P.locals && (c.exports = P.locals);
15197        var R = O(959).Z;
15198        R("10aa5f36", P, !0, { sourceMap: !1, shadowMode: !1 });
15199      }, 631: function(c, w, O) {
15200        var P = O(207);
15201        P.__esModule && (P = P.default), typeof P == "string" && (P = [[c.id, P, ""]]), P.locals && (c.exports = P.locals);
15202        var R = O(959).Z;
15203        R("1772934e", P, !0, { sourceMap: !1, shadowMode: !1 });
15204      }, 959: function(c, w, O) {
15205        function P(Ie, $e) {
15206          for (var Xe = [], st = {}, Ge = 0; Ge < $e.length; Ge++) {
15207            var ct = $e[Ge], ot = ct[0], Ht = ct[1], fr = ct[2], Qt = ct[3], ur = { id: Ie + ":" + Ge, css: Ht, media: fr, sourceMap: Qt };
15208            st[ot] ? st[ot].parts.push(ur) : Xe.push(st[ot] = { id: ot, parts: [ur] });
15209          }
15210          return Xe;
15211        }
15212        O.d(w, { Z: function() {
15213          return Ae;
15214        } });
15215        var R = typeof document < "u";
15216        if (typeof DEBUG < "u" && DEBUG && !R) throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");
15217        var z = {}, J = R && (document.head || document.getElementsByTagName("head")[0]), K = null, ee = 0, ue = !1, Ce = function() {
15218        }, ge = null, X = "data-vue-ssr-id", ye = typeof navigator < "u" && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase());
15219        function Ae(Ie, $e, Xe, st) {
15220          ue = Xe, ge = st || {};
15221          var Ge = P(Ie, $e);
15222          return Se(Ge), function(ct) {
15223            for (var ot = [], Ht = 0; Ht < Ge.length; Ht++) {
15224              var fr = Ge[Ht], Qt = z[fr.id];
15225              Qt.refs--, ot.push(Qt);
15226            }
15227            for (ct ? (Ge = P(Ie, ct), Se(Ge)) : Ge = [], Ht = 0; Ht < ot.length; Ht++)
15228              if (Qt = ot[Ht], Qt.refs === 0) {
15229                for (var ur = 0; ur < Qt.parts.length; ur++) Qt.parts[ur]();
15230                delete z[Qt.id];
15231              }
15232          };
15233        }
15234        function Se(Ie) {
15235          for (var $e = 0; $e < Ie.length; $e++) {
15236            var Xe = Ie[$e], st = z[Xe.id];
15237            if (st) {
15238              st.refs++;
15239              for (var Ge = 0; Ge < st.parts.length; Ge++) st.parts[Ge](Xe.parts[Ge]);
15240              for (; Ge < Xe.parts.length; Ge++) st.parts.push(Ne(Xe.parts[Ge]));
15241              st.parts.length > Xe.parts.length && (st.parts.length = Xe.parts.length);
15242            } else {
15243              var ct = [];
15244              for (Ge = 0; Ge < Xe.parts.length; Ge++) ct.push(Ne(Xe.parts[Ge]));
15245              z[Xe.id] = { id: Xe.id, refs: 1, parts: ct };
15246            }
15247          }
15248        }
15249        function je() {
15250          var Ie = document.createElement("style");
15251          return Ie.type = "text/css", J.appendChild(Ie), Ie;
15252        }
15253        function Ne(Ie) {
15254          var $e, Xe, st = document.querySelector("style[" + X + '~="' + Ie.id + '"]');
15255          if (st) {
15256            if (ue) return Ce;
15257            st.parentNode.removeChild(st);
15258          }
15259          if (ye) {
15260            var Ge = ee++;
15261            st = K || (K = je()), $e = ze.bind(null, st, Ge, !1), Xe = ze.bind(null, st, Ge, !0);
15262          } else st = je(), $e = He.bind(null, st), Xe = function() {
15263            st.parentNode.removeChild(st);
15264          };
15265          return $e(Ie), function(ct) {
15266            if (ct) {
15267              if (ct.css === Ie.css && ct.media === Ie.media && ct.sourceMap === Ie.sourceMap) return;
15268              $e(Ie = ct);
15269            } else Xe();
15270          };
15271        }
15272        var Oe = /* @__PURE__ */ function() {
15273          var Ie = [];
15274          return function($e, Xe) {
15275            return Ie[$e] = Xe, Ie.filter(Boolean).join(`
15276`);
15277          };
15278        }();
15279        function ze(Ie, $e, Xe, st) {
15280          var Ge = Xe ? "" : st.css;
15281          if (Ie.styleSheet) Ie.styleSheet.cssText = Oe($e, Ge);
15282          else {
15283            var ct = document.createTextNode(Ge), ot = Ie.childNodes;
15284            ot[$e] && Ie.removeChild(ot[$e]), ot.length ? Ie.insertBefore(ct, ot[$e]) : Ie.appendChild(ct);
15285          }
15286        }
15287        function He(Ie, $e) {
15288          var Xe = $e.css, st = $e.media, Ge = $e.sourceMap;
15289          if (st && Ie.setAttribute("media", st), ge.ssrId && Ie.setAttribute(X, $e.id), Ge && (Xe += `
15290/*# sourceURL=` + Ge.sources[0] + " */", Xe += `
15291/*# sourceMappingURL=data:application/json;base64,` + btoa(unescape(encodeURIComponent(JSON.stringify(Ge)))) + " */"), Ie.styleSheet) Ie.styleSheet.cssText = Xe;
15292          else {
15293            for (; Ie.firstChild; ) Ie.removeChild(Ie.firstChild);
15294            Ie.appendChild(document.createTextNode(Xe));
15295          }
15296        }
15297      }, 927: function(c) {
15298        c.exports = s;
15299      } }
15299, h = {};
15300      function g(c) {
15301        var w = h[c];
15302        if (w !== void 0) return w.exports;
15303        var O = h[c] = { id: c, exports: {} };
15304        return l[c].call(O.exports, O, O.exports, g), O.exports;
15305      }
15306      (function() {
15307        g.n = function(c) {
15308          var w = c && c.__esModule ? function() {
15309            return c.default;
15310          } : function() {
15311            return c;
15312          };
15313          return g.d(w, { a: w }), w;
15314        };
15315      })(), function() {
15316        g.d = function(c, w) {
15317          for (var O in w) g.o(w, O) && !g.o(c, O) && Object.defineProperty(c, O, { enumerable: !0, get: w[O] });
15318        };
15319      }(), function() {
15320        g.o = function(c, w) {
15321          return Object.prototype.hasOwnProperty.call(c, w);
15322        };
15323      }(), function() {
15324        g.r = function(c) {
15325          typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(c, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(c, "__esModule", { value: !0 });
15326        };
15327      }(), function() {
15328        g.p = "";
15329      }();
15330      var m = {};
15331      return function() {
15332        if (g.d(m, { default: function() {
15333          return U;
15334        } }), typeof window < "u") {
15335          var c = window.document.currentScript, w = g(388);
15336          c = w(), "currentScript" in document || Object.defineProperty(document, "currentScript", { get: w });
15337          var O = c && c.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);
15338          O && (g.p = O[1]);
15339        }
15340        var P = g(927);
15341        function R(A, M, j) {
15342          return M in A ? Object.defineProperty(A, M, { value: j, enumerable: !0, configurable: !0, writable: !0 }) : A[M] = j, A;
15343        }
15344        var z = { key: 0, class: "vue-slider-marks" };
15345        function J(A, M, j, H, ne, de) {
15346          var ie = (0, P.resolveComponent)("vue-slider-mark"), Be = (0, P.resolveComponent)("vue-slider-dot");
15347          return (0, P.openBlock)(), (0, P.createElementBlock)("div", (0, P.mergeProps)({ ref: "container", class: A.containerClasses, style: A.containerStyles, onClick: M[2] || (M[2] = function() {
15348            return A.clickHandle && A.clickHandle.apply(A, arguments);
15349          }), onTouchstartPassive: M[3] || (M[3] = function() {
15350            return A.dragStartOnProcess && A.dragStartOnProcess.apply(A, arguments);
15351          }), onMousedownPassive: M[4] || (M[4] = function() {
15352            return A.dragStartOnProcess && A.dragStartOnProcess.apply(A, arguments);
15353          }) }, A.$attrs), [(0, P.createElementVNode)("div", { class: "vue-slider-rail", style: (0, P.normalizeStyle)(A.railStyle) }, [((0, P.openBlock)(!0), (0, P.createElementBlock)(P.Fragment, null, (0, P.renderList)(A.processArray, function(Le, Re) {
15354            return (0, P.renderSlot)(A.$slots, "process", (0, P.normalizeProps)((0, P.guardReactiveProps)(Le)), function() {
15355              return [((0, P.openBlock)(), (0, P.createElementBlock)("div", { class: "vue-slider-process", key: "process-".concat(Re), style: (0, P.normalizeStyle)(Le.style) }, null, 4))];
15356            });
15357          }), 256)), A.sliderMarks && A.control ? ((0, P.openBlock)(), (0, P.createElementBlock)("div", z, [((0, P.openBlock)(!0), (0, P.createElementBlock)(P.Fragment, null, (0, P.renderList)(A.control.markList, function(Le, Re) {
15358            return (0, P.renderSlot)(A.$slots, "mark", (0, P.normalizeProps)((0, P.guardReactiveProps)(Le)), function() {
15359              var it;
15360              return [((0, P.openBlock)(), (0, P.createBlock)(ie, { key: "mark-".concat(Re), mark: Le, hideLabel: A.hideLabel, style: (0, P.normalizeStyle)((it = {}, R(it, A.isHorizontal ? "height" : "width", "100%"), R(it, A.isHorizontal ? "width" : "height", A.tailSize), R(it, A.mainDirection, "".concat(Le.pos, "%")), it)), stepStyle: A.stepStyle, stepActiveStyle: A.stepActiveStyle, labelStyle: A.labelStyle, labelActiveStyle: A.labelActiveStyle, onPressLabel: M[0] || (M[0] = function(Pt) {
15361                return A.clickable && A.setValueByPos(Pt);
15362              }) }, { step: (0, P.withCtx)(function() {
15363                return [(0, P.renderSlot)(A.$slots, "step", (0, P.normalizeProps)((0, P.guardReactiveProps)(Le)))];
15364              }), label: (0, P.withCtx)(function() {
15365                return [(0, P.renderSlot)(A.$slots, "label", (0, P.normalizeProps)((0, P.guardReactiveProps)(Le)))];
15366              }), _: 2 }, 1032, ["mark", "hideLabel", "style", "stepStyle", "stepActiveStyle", "labelStyle", "labelActiveStyle"]))];
15367            });
15368          }), 256))])) : (0, P.createCommentVNode)("", !0), ((0, P.openBlock)(!0), (0, P.createElementBlock)(P.Fragment, null, (0, P.renderList)(A.dots, function(Le, Re) {
15369            var it;
15370            return (0, P.openBlock)(), (0, P.createBlock)(Be, (0, P.mergeProps)({ ref_for: !0, ref: "dot-".concat(Re), key: "dot-".concat(Re), value: Le.value, disabled: Le.disabled, focus: Le.focus, "dot-style": [Le.style, Le.disabled ? Le.disabledStyle : null, Le.focus ? Le.focusStyle : null], tooltip: Le.tooltip || A.tooltip, "tooltip-style": [A.tooltipStyle, Le.tooltipStyle, Le.disabled ? Le.tooltipDisabledStyle : null, Le.focus ? Le.tooltipFocusStyle : null], "tooltip-formatter": Array.isArray(A.sliderTooltipFormatter) ? A.sliderTooltipFormatter[Re] : A.sliderTooltipFormatter, "tooltip-placement": A.tooltipDirections[Re], style: [A.dotBaseStyle, (it = {}, R(it, A.mainDirection, "".concat(Le.pos, "%")), R(it, "transition", "".concat(A.mainDirection, " ").concat(A.animateTime, "s")), it)], onDragStart: function() {
15371              return A.dragStart(Re);
15372            }, role: "slider", "aria-valuenow": Le.value, "aria-valuemin": A.min, "aria-valuemax": A.max, "aria-orientation": A.isHorizontal ? "horizontal" : "vertical", tabindex: "0", onFocus: function() {
15373              return A.focus(Le, Re);
15374            }, onBlur: M[1] || (M[1] = function() {
15375              return A.blur();
15376            }) }, A.dotAttrs), { dot: (0, P.withCtx)(function() {
15377              return [(0, P.renderSlot)(A.$slots, "dot", (0, P.normalizeProps)((0, P.guardReactiveProps)(Le)))];
15378            }), tooltip: (0, P.withCtx)(function() {
15379              return [(0, P.renderSlot)(A.$slots, "tooltip", (0, P.normalizeProps)((0, P.guardReactiveProps)(Le)))];
15380            }), _: 2 }, 1040, ["value", "disabled", "focus", "dot-style", "tooltip", "tooltip-style", "tooltip-formatter", "tooltip-placement", "style", "onDragStart", "aria-valuenow", "aria-valuemin", "aria-valuemax", "aria-orientation", "onFocus"]);
15381          }), 128))], 4), (0, P.renderSlot)(A.$slots, "default", { value: A.getValue() })], 16);
15382        }
15383        var K = ["aria-valuetext"], ee = { class: "vue-slider-dot-tooltip-text" };
15384        function ue(A, M, j, H, ne, de) {
15385          var ie;
15386          return (0, P.openBlock)(), (0, P.createElementBlock)("div", { ref: "dot", class: (0, P.normalizeClass)(A.dotClasses), "aria-valuetext": (ie = A.tooltipValue) === null || ie === void 0 ? void 0 : ie.toString(), onMousedownPassive: M[0] || (M[0] = function() {
15387            return A.dragStart && A.dragStart.apply(A, arguments);
15388          }), onTouchstartPassive: M[1] || (M[1] = function() {
15389            return A.dragStart && A.dragStart.apply(A, arguments);
15390          }) }, [(0, P.renderSlot)(A.$slots, "dot", {}, function() {
15391            return [(0, P.createElementVNode)("div", { class: (0, P.normalizeClass)(A.handleClasses), style: (0, P.normalizeStyle)(A.dotStyle) }, null, 6)];
15392          }), A.tooltip !== "none" ? ((0, P.openBlock)(), (0, P.createElementBlock)("div", { key: 0, class: (0, P.normalizeClass)(A.tooltipClasses) }, [(0, P.renderSlot)(A.$slots, "tooltip", {}, function() {
15393            return [(0, P.createElementVNode)("div", { class: (0, P.normalizeClass)(A.tooltipInnerClasses), style: (0, P.normalizeStyle)(A.tooltipStyle) }, [(0, P.createElementVNode)("span", ee, (0, P.toDisplayString)(A.tooltipValue), 1)], 6)];
15394          })], 2)) : (0, P.createCommentVNode)("", !0)], 42, K);
15395        }
15396        g(466);
15397        var Ce = (0, P.defineComponent)({ name: "VueSliderDot", emits: ["drag-start"], props: { value: { type: [String, Number], default: 0 }, tooltip: { type: String, required: !0 }, tooltipPlacement: { type: String, validator: function(A) {
15398          return ["top", "right", "bottom", "left"].indexOf(A) > -1;
15399        }, required: !0 }, tooltipFormatter: { type: [String, Function] }, focus: { type: Boolean, default: !1 }, disabled: { type: Boolean, default: !1 }, dotStyle: { type: Object }, tooltipStyle: { type: Object } }, computed: { dotClasses: function() {
15400          return ["vue-slider-dot", { "vue-slider-dot-hover": this.tooltip === "hover" || this.tooltip === "active", "vue-slider-dot-disabled": this.disabled, "vue-slider-dot-focus": this.focus }];
15401        }, handleClasses: function() {
15402          return ["vue-slider-dot-handle", { "vue-slider-dot-handle-disabled": this.disabled, "vue-slider-dot-handle-focus": this.focus }];
15403        }, tooltipClasses: function() {
15404          return ["vue-slider-dot-tooltip", ["vue-slider-dot-tooltip-".concat(this.tooltipPlacement)], { "vue-slider-dot-tooltip-show": this.showTooltip }];
15405        }, tooltipInnerClasses: function() {
15406          return ["vue-slider-dot-tooltip-inner", ["vue-slider-dot-tooltip-inner-".concat(this.tooltipPlacement)], { "vue-slider-dot-tooltip-inner-disabled": this.disabled, "vue-slider-dot-tooltip-inner-focus": this.focus }];
15407        }, showTooltip: function() {
15408          switch (this.tooltip) {
15409            case "always":
15410              return !0;
15411            case "none":
15412              return !1;
15413            case "focus":
15414            case "active":
15415              return !!this.focus;
15416            default:
15417              return !1;
15418          }
15419        }, tooltipValue: function() {
15420          return this.tooltipFormatter ? typeof this.tooltipFormatter == "string" ? this.tooltipFormatter.replace(/\{value\}/, String(this.value)) : this.tooltipFormatter(this.value) : this.value;
15421        } }, methods: { dragStart: function() {
15422          if (this.disabled) return !1;
15423          this.$emit("drag-start");
15424        } } }), ge = g(831), ye = (0, ge.Z)(Ce, [["render", ue]]);
15425        function Ae(A, M, j, H, ne, de) {
15426          return (0, P.openBlock)(), (0, P.createElementBlock)("div", { class: (0, P.normalizeClass)(A.marksClasses) }
15426, [(0, P.renderSlot)(A.$slots, "step", {}, function() {
15427            return [(0, P.createElementVNode)("div", { class: (0, P.normalizeClass)(A.stepClasses), style: (0, P.normalizeStyle)([A.stepStyle, A.mark.style || {}, A.mark.active && A.stepActiveStyle ? A.stepActiveStyle : {}, A.mark.active && A.mark.activeStyle ? A.mark.activeStyle : {}]) }, null, 6)];
15428          }), A.hideLabel ? (0, P.createCommentVNode)("", !0) : (0, P.renderSlot)(A.$slots, "label", { key: 0 }, function() {
15429            return [(0, P.createElementVNode)("div", { class: (0, P.normalizeClass)(A.labelClasses), style: (0, P.normalizeStyle)([A.labelStyle, A.mark.labelStyle || {}, A.mark.active && A.labelActiveStyle ? A.labelActiveStyle : {}, A.mark.active && A.mark.labelActiveStyle ? A.mark.labelActiveStyle : {}]), onClick: M[0] || (M[0] = function() {
15430              return A.labelClickHandle && A.labelClickHandle.apply(A, arguments);
15431            }) }, (0, P.toDisplayString)(A.mark.label), 7)];
15432          })], 2);
15433        }
15434        g(18);
15435        var Se = (0, P.defineComponent)({ name: "VueSliderMark", emits: ["press-label"], props: { mark: { type: Object, required: !0 }, hideLabel: { type: Boolean }, stepStyle: { type: Object, default: function() {
15436          return {};
15437        } }, stepActiveStyle: { type: Object, default: function() {
15438          return {};
15439        } }, labelStyle: { type: Object, default: function() {
15440          return {};
15441        } }, labelActiveStyle: { type: Object, default: function() {
15442          return {};
15443        } } }, computed: { marksClasses: function() {
15444          return ["vue-slider-mark", { "vue-slider-mark-active": this.mark.active }];
15445        }, stepClasses: function() {
15446          return ["vue-slider-mark-step", { "vue-slider-mark-step-active": this.mark.active }];
15447        }, labelClasses: function() {
15448          return ["vue-slider-mark-label", { "vue-slider-mark-label-active": this.mark.active }];
15449        } }, methods: { labelClickHandle: function(A) {
15450          A.stopPropagation(), this.$emit("press-label", this.mark.pos);
15451        } } });
15452        const je = (0, ge.Z)(Se, [["render", Ae]]);
15453        var Ne, Oe = je, ze = function(A) {
15454          return typeof A == "number" ? "".concat(A, "px") : A;
15455        }, He = function(A) {
15456          var M = document.documentElement, j = document.body, H = A.getBoundingClientRect(), ne = { y: H.top + (window.pageYOffset || M.scrollTop) - (M.clientTop || j.clientTop || 0), x: H.left + (window.pageXOffset || M.scrollLeft) - (M.clientLeft || j.clientLeft || 0) };
15457          return ne;
15458        }, Ie = function(A, M, j) {
15459          var H = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1, ne = "targetTouches" in A ? A.targetTouches[0] : A, de = He(M), ie = { x: ne.pageX - de.x, y: ne.pageY - de.y };
15460          return { x: j ? M.offsetWidth * H - ie.x : ie.x, y: j ? M.offsetHeight * H - ie.y : ie.y };
15461        };
15462        (function(A) {
15463          A[A.PAGE_UP = 33] = "PAGE_UP", A[A.PAGE_DOWN = 34] = "PAGE_DOWN", A[A.END = 35] = "END", A[A.HOME = 36] = "HOME", A[A.LEFT = 37] = "LEFT", A[A.UP = 38] = "UP", A[A.RIGHT = 39] = "RIGHT", A[A.DOWN = 40] = "DOWN";
15464        })(Ne || (Ne = {}));
15465        var $e = function(A, M) {
15466          if (M.hook) {
15467            var j = M.hook(A);
15468            if (typeof j == "function") return j;
15469            if (!j) return null;
15470          }
15471          switch (A.keyCode) {
15472            case Ne.UP:
15473              return function(H) {
15474                return M.direction === "ttb" ? H - 1 : H + 1;
15475              };
15476            case Ne.RIGHT:
15477              return function(H) {
15478                return M.direction === "rtl" ? H - 1 : H + 1;
15479              };
15480            case Ne.DOWN:
15481              return function(H) {
15482                return M.direction === "ttb" ? H + 1 : H - 1;
15483              };
15484            case Ne.LEFT:
15485              return function(H) {
15486                return M.direction === "rtl" ? H + 1 : H - 1;
15487              };
15488            case Ne.END:
15489              return function() {
15490                return M.max;
15491              };
15492            case Ne.HOME:
15493              return function() {
15494                return M.min;
15495              };
15496            case Ne.PAGE_UP:
15497              return function(H) {
15498                return H + 10;
15499              };
15500            case Ne.PAGE_DOWN:
15501              return function(H) {
15502                return H - 10;
15503              };
15504            default:
15505              return null;
15506          }
15507        };
15508        function Xe(A, M) {
15509          if (!(A instanceof M)) throw new TypeError("Cannot call a class as a function");
15510        }
15511        function st(A, M) {
15512          for (var j = 0; j < M.length; j++) {
15513            var H = M[j];
15514            H.enumerable = H.enumerable || !1, H.configurable = !0, "value" in H && (H.writable = !0), Object.defineProperty(A, H.key, H);
15515          }
15516        }
15517        function Ge(A, M, j) {
15518          return M && st(A.prototype, M), Object.defineProperty(A, "prototype", { writable: !1 }), A;
15519        }
15520        function ct(A, M, j) {
15521          return M in A ? Object.defineProperty(A, M, { value: j, enumerable: !0, configurable: !0, writable: !0 }) : A[M] = j, A;
15522        }
15523        var ot, Ht, fr = function() {
15524          function A(M) {
15525            Xe(this, A), ct(this, "num", void 0), this.num = M;
15526          }
15527          return Ge(A, [{ key: "decimal", value: function(M, j) {
15528            var H = this.num, ne = this.getDecimalLen(H), de = this.getDecimalLen(M), ie = 0;
15529            switch (j) {
15530              case "+":
15531                ie = this.getExponent(ne, de), this.num = (this.safeRoundUp(H, ie) + this.safeRoundUp(M, ie)) / ie;
15532                break;
15533              case "-":
15534                ie = this.getExponent(ne, de), this.num = (this.safeRoundUp(H, ie) - this.safeRoundUp(M, ie)) / ie;
15535                break;
15536              case "*":
15537                this.num = this.safeRoundUp(this.safeRoundUp(H, this.getExponent(ne)), this.safeRoundUp(M, this.getExponent(de))) / this.getExponent(ne + de);
15538                break;
15539              case "/":
15540                ie = this.getExponent(ne, de), this.num = this.safeRoundUp(H, ie) / this.safeRoundUp(M, ie);
15541                break;
15542              case "%":
15543                ie = this.getExponent(ne, de), this.num = this.safeRoundUp(H, ie) % this.safeRoundUp(M, ie) / ie;
15544                break;
15545            }
15546            return this;
15547          } }, { key: "plus", value: function(M) {
15548            return this.decimal(M, "+");
15549          } }, { key: "minus", value: function(M) {
15550            return this.decimal(M, "-");
15551          } }, { key: "multiply", value: function(M) {
15552            return this.decimal(M, "*");
15553          } }, { key: "divide", value: function(M) {
15554            return this.decimal(M, "/");
15555          } }, { key: "remainder", value: function(M) {
15556            return this.decimal(M, "%");
15557          } }, { key: "toNumber", value: function() {
15558            return this.num;
15559          } }, { key: "getDecimalLen", value: function(M) {
15560            var j = "".concat(M).split("e");
15561            return ("".concat(j[0]).split(".")[1] || "").length - (j[1] ? +j[1] : 0);
15562          } }, { key: "getExponent", value: function(M, j) {
15563            return Math.pow(10, j !== void 0 ? Math.max(M, j) : M);
15564          } }, { key: "safeRoundUp", value: function(M, j) {
15565            return Math.round(M * j);
15566          } }]), A;
15567        }();
15568        function Qt(A, M) {
15569          return en(A) || Ar(A, M) || tn(A, M) || ur();
15570        }
15571        function ur() {
15572          throw new TypeError(`Invalid attempt to destructure non-iterable instance.
15573In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
15574        }
15575        function Ar(A, M) {
15576          var j = A == null ? null : typeof Symbol < "u" && A[Symbol.iterator] || A["@@iterator"];
15577          if (j != null) {
15578            var H, ne, de = [], ie = !0, Be = !1;
15579            try {
15580              for (j = j.call(A); !(ie = (H = j.next()).done) && (de.push(H.value), !(M && de.length === M)); ie = !0) ;
15581            } catch (Le) {
15582              Be = !0, ne = Le;
15583            } finally {
15584              try {
15585                ie || j.return == null || j.return();
15586              } finally {
15587                if (Be) throw ne;
15588              }
15589            }
15590            return de;
15591          }
15592        }
15593        function en(A) {
15594          if (Array.isArray(A)) return A;
15595        }
15596        function $r(A, M) {
15597          var j = Object.keys(A);
15598          if (Object.getOwnPropertySymbols) {
15599            var H = Object.getOwnPropertySymbols(A);
15600            M && (H = H.filter(function(ne) {
15601              return Object.getOwnPropertyDescriptor(A, ne).enumerable;
15602            })), j.push.apply(j, H);
15603          }
15604          return j;
15605        }
15606        function Fr(A) {
15607          for (var M = 1; M < arguments.length; M++) {
15608            var j = arguments[M] != null ? arguments[M] : {};
15609            M % 2 ? $r(Object(j), !0).forEach(function(H) {
15610              re(A, H, j[H]);
15611            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(A, Object.getOwnPropertyDescriptors(j)) : $r(Object(j)).forEach(function(H) {
15612              Object.defineProperty(A, H, Object.getOwnPropertyDescriptor(j, H));
15613            });
15614          }
15615          return A;
15616        }
15617        function dn(A) {
15618          return Fi(A) || Jt(A) || tn(A) || kn();
15619        }
15620        function kn() {
15621          throw new TypeError(`Invalid attempt to spread non-iterable instance.
15622In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
15623        }
15624        function tn(A, M) {
15625          if (A) {
15626            if (typeof A == "string") return Kn(A, M);
15627            var j = Object.prototype.toString.call(A).slice(8, -1);
15628            return j === "Object" && A.constructor && (j = A.constructor.name), j === "Map" || j === "Set" ? Array.from(A) : j === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j) ? Kn(A, M) : void 0;
15629          }
15630        }
15631        function Jt(A) {
15632          if (typeof Symbol < "u" && A[Symbol.iterator] != null || A["@@iterator"] != null) return Array.from(A);
15633        }
15634        function Fi(A) {
15635          if (Array.isArray(A)) return Kn(A);
15636        }
15637        function Kn(A, M) {
15638          (M == null || M > A.length) && (M = A.length);
15639          for (var j = 0, H = new Array(M); j < M; j++) H[j] = A[j];
15640          return H;
15641        }
15642        function me(A, M) {
15643          if (!(A instanceof M)) throw new TypeError("Cannot call a class as a function");
15644        }
15645        function Ee(A, M) {
15646          for (var j = 0; j < M.length; j++) {
15647            var H = M[j];
15648            H.enumerable = H.enumerable || !1, H.configurable = !0, "value" in H && (H.writable = !0), Object.defineProperty(A, H.key, H);
15649          }
15650        }
15651        function Ze(A, M, j) {
15652          return M && Ee(A.prototype, M), Object.defineProperty(A, "prototype", { writable: !1 }), A;
15653        }
15654        function re(A, M, j) {
15655          return M in A ? Object.defineProperty(A, M, { value: j, enumerable: !0, configurable: !0, writable: !0 }) : A[M] = j, A;
15656        }
15657        (function(A) {
15658          A[A.VALUE = 1] = "VALUE", A[A.INTERVAL = 2] = "INTERVAL", A[A.MIN = 3] = "MIN", A[A.MAX = 4] = "MAX", A[A.ORDER = 5] = "ORDER";
15659        })(Ht || (Ht = {}));
15660        var et = (ot = {}, re(ot, Ht.VALUE, 'The type of the "value" is illegal'), re(ot, Ht.INTERVAL, 'The prop "interval" is invalid, "(max - min)" must be divisible by "interval"'), re(ot, Ht.MIN, 'The "value" must be greater than or equal to the "min".'), re(ot, Ht.MAX, 'The "value" must be less than or equal to the "max".'), re(ot, Ht.ORDER, 'When "order" is false, the parameters "minRange", "maxRange", "fixed", "enabled" are invalid.'), ot), ft = function() {
15661          function A(M) {
15662            me(this, A), re(this, "dotsPos", []), re(this, "dotsValue", []), re(this, "data", void 0), re(this, "enableCross", void 0), re(this, "fixed", void 0), re(this, "max", void 0), re(this, "min", void 0), re(this, "interval", void 0), re(this, "minRange", void 0), re(this, "maxRange", void 0), re(this, "order", void 0), re(this, "marks", void 0), re(this, "included", void 0), re(this, "process", void 0), re(this, "adsorb", void 0), re(this, "dotOptions", void 0), re(this, "onError", void 0), re(this, "cacheRangeDir", {}), this.data = M.data, this.max = M.max, this.min = M.min, this.interval = M.interval, this.order = M.order, this.marks = M.marks, this.included = M.included, this.process = M.process, this.adsorb = M.adsorb, this.dotOptions = M.dotOptions, this.onError = M.onError, this.order ? (this.minRange = M.minRange || 0, this.maxRange = M.maxRange || 0, this.enableCross = M.enableCross, this.fixed = M.fixed) : ((M.minRange || M.maxRange || !M.enableCross || M.fixed) && this.emitError(Ht.ORDER), this.minRange = 0, this.maxRange = 0, this.enableCross = !0, this.fixed = !1), this.setValue(M.value);
15663          }
15664          return Ze(A, [{ key: "setValue", value: function(M) {
15665            this.setDotsValue(Array.isArray(M) ? dn(M) : [M], !0);
15666          } }, { key: "setDotsValue", value: function(M, j) {
15667            this.dotsValue = M, j && this.syncDotsPos();
15668          } }, { key: "setDotsPos", value: function(M) {
15669            var j = this, H = this.order ? dn(M).sort(function(ne, de) {
15670              return ne - de;
15671            }) : M;
15672            this.dotsPos = H, this.setDotsValue(H.map(function(ne) {
15673              return j.getValueByPos(ne);
15674            }), this.adsorb);
15675          } }, { key: "getValueByPos", value: function(M) {
15676            var j = this.parsePos(M);
15677            if (this.included) {
15678              var H = 100;
15679              this.markList.forEach(function(ne) {
15680                var de = Math.abs(ne.pos - M);
15681                de < H && (H = de, j = ne.value);
15682              });
15683            }
15684            return j;
15685          } }, { key: "syncDotsPos", value: function() {
15686            var M = this;
15687            this.dotsPos = this.dotsValue.map(function(j) {
15688              return M.parseValue(j);
15689            });
15690          } }, { key: "markList", get: function() {
15691            var M = this;
15692            if (!this.marks) return [];
15693            var j = function(H, ne) {
15694              var de = M.parseValue(H);
15695              return Fr({ pos: de, value: H, label: H, active: M.isActiveByPos(de) }, ne);
15696            };
15697            return this.marks === !0 ? this.getValues().map(function(H) {
15698              return j(H);
15699            }) : Object.prototype.toString.call(this.marks) === "[object Object]" ? Object.keys(this.marks).sort(function(H, ne) {
15700              return +H - +ne;
15701            }).map(function(H) {
15702              var ne = M.marks[H];
15703              return j(H, typeof ne != "string" ? ne : { label: ne });
15704            }) : Array.isArray(this.marks) ? this.marks.map(function(H) {
15705              return j(H);
15706            }) : typeof this.marks == "function" ? this.getValues().map(function(H) {
15707              return { value: H, result: M.marks(H) };
15708            }).filter(function(H) {
15709              var ne = H.result;
15710              return !!ne;
15711            }).map(function(H) {
15712              var ne = H.value, de = H.result;
15713              return j(ne, de);
15714            }) : [];
15715          } }, { key: "getRecentDot", value: function(M) {
15716            var j = this.dotsPos.map(function(H) {
15717              return Math.abs(H - M);
15718            });
15719            return j.indexOf(Math.min.apply(Math, dn(j)));
15720          } }, { key: "getIndexByValue", value: function(M) {
15721            return this.data ? this.data.indexOf(M) : new fr(+M).minus(this.min).divide(this.interval).toNumber();
15722          } }, { key: "getValueByIndex", value: function(M) {
15723            return M < 0 ? M = 0 : M > this.total && (M = this.total), this.data ? this.data[M] : new fr(M).multiply(this.interval).plus(this.min).toNumber();
15724          } }, { key: "setDotPos", value: function(M, j) {
15725            M = this.getValidPos(M, j).pos;
15726            var H = M - this.dotsPos[j];
15727            if (H) {
15728              var ne = new Array(this.dotsPos.length);
15729              this.fixed ? ne = this.getFixedChangePosArr(H, j) : this.minRange || this.maxRange ? ne = this.getLimitRangeChangePosArr(M, H, j) : ne[j] = H, this.setDotsPos(this.dotsPos.map(function(de, ie) {
15730                return de + (ne[ie] || 0);
15731              }));
15732            }
15733          } }, { key: "getFixedChangePosArr", value: function(M, j) {
15734            var H = this;
15735            return this.dotsPos.forEach(function(ne, de) {
15736              if (de !== j) {
15737                var ie = H.getValidPos(ne + M, de), Be = ie.pos, Le = ie.inRange;
15738                Le || (M = Math.min(Math.abs(Be - ne), Math.abs(M)) * (M < 0 ? -1 : 1));
15739              }
15740            }), this.dotsPos.map(function(ne) {
15741              return M;
15742            });
15743          } }, { key: "getLimitRangeChangePosArr", value: function(M, j, H) {
15744            var ne = this, de = [{ index: H, changePos: j }], ie = j;
15745            return [this.minRange, this.maxRange].forEach(function(Be, Le) {
15746              if (!Be) return !1;
15747              var Re = Le === 0, it = j > 0, Pt = 0;
15748              Pt = Re ? it ? 1 : -1 : it ? -1 : 1;
15749              for (var zt = function(yr, lr) {
15750                var Pr = Math.abs(yr - lr);
15751                return Re ? Pr < ne.minRangeDir : Pr > ne.maxRangeDir;
15752              }, dr = H + Pt, Wt = ne.dotsPos[dr], mr = M; ne.isPos(Wt) && zt(Wt, mr); ) {
15753                var gr = ne.getValidPos(Wt + ie, dr), xn = gr.pos;
15754                de.push({ index: dr, changePos: xn - Wt }), dr += Pt, mr = xn, Wt = ne.dotsPos[dr];
15755              }
15756            }), this.dotsPos.map(function(Be, Le) {
15757              var Re = de.filter(function(it) {
15758                return it.index === Le;
15759              });
15760              return Re.length ? Re[0].changePos : 0;
15761            });
15762          } }, { key: "isPos", value: function(M) {
15763            return typeof M == "number";
15764          } }, { key: "getValidPos", value: function(M, j) {
15765            var H = this.valuePosRange[j], ne = !0;
15766            return M < H[0] ? (M = H[0], ne = !1) : M > H[1] && (M = H[1], ne = !1), { pos: M, inRange: ne };
15767          } }, { key: "parseValue", value: function(M) {
15768            if (this.data) M = this.data.indexOf(M);
15769            else if (typeof M == "number" || typeof M == "string") {
15770              if (M = +M, M < this.min) return this.emitError(Ht.MIN), 0;
15771              if (M > this.max) return this.emitError(Ht.MAX), 0;
15772              if (typeof M != "number" || M !== M) return this.emitError(Ht.VALUE), 0;
15773              M = new fr(M).minus(this.min).divide(this.interval).toNumber();
15774            }
15775            var j = new fr(M).multiply(this.gap).toNumber();
15776            return j < 0 ? 0 : j > 100 ? 100 : j;
15777          } }, { key: "parsePos", value: function(M) {
15778            var j = Math.round(M / this.gap);
15779            return this.getValueByIndex(j);
15780          } }, { key: "isActiveByPos", value: function(M) {
15781            return this.processArray.some(function(j) {
15782              var H = Qt(j, 2), ne = H[0], de = H[1];
15783              return M >= ne && M <= de;
15784            });
15785          } }, { key: "getValues", value: function() {
15786            if (this.data) return this.data;
15787            for (var M = [], j = 0; j <= this.total; j++) M.push(new fr(j).multiply(this.interval).plus(this.min).toNumber());
15788            return M;
15789          } }, { key: "getRangeDir", value: function(M) {
15790            return M ? new fr(M).divide(new fr(this.data ? this.data.length - 1 : this.max).minus(this.data ? 0 : this.min).toNumber()).multiply(100).toNumber() : 100;
15791          } }, { key: "emitError", value: function(M) {
15792            this.onError && this.onError(M, et[M]);
15793          } }, { key: "processArray", get: function() {
15794            if (this.process) {
15795              if (typeof this.process == "function") return this.process(this.dotsPos);
15796              if (this.dotsPos.length === 1) return [[0, this.dotsPos[0]]];
15797              if (this.dotsPos.length > 1) return [[Math.min.apply(Math, dn(this.dotsPos)), Math.max.apply(Math, dn(this.dotsPos))]];
15798            }
15799            return [];
15800          } }, { key: "total", get: function() {
15801            var M = 0;
15802            return M = this.data ? this.data.length - 1 : new fr(this.max).minus(this.min).divide(this.interval).toNumber(), M - Math.floor(M) !== 0 ? (this.emitError(Ht.INTERVAL), 0
15802) : M;
15803          } }, { key: "gap", get: function() {
15804            return 100 / this.total;
15805          } }, { key: "minRangeDir", get: function() {
15806            return this.cacheRangeDir[this.minRange] ? this.cacheRangeDir[this.minRange] : this.cacheRangeDir[this.minRange] = this.getRangeDir(this.minRange);
15807          } }, { key: "maxRangeDir", get: function() {
15808            return this.cacheRangeDir[this.maxRange] ? this.cacheRangeDir[this.maxRange] : this.cacheRangeDir[this.maxRange] = this.getRangeDir(this.maxRange);
15809          } }, { key: "getDotRange", value: function(M, j, H) {
15810            if (!this.dotOptions) return H;
15811            var ne = Array.isArray(this.dotOptions) ? this.dotOptions[M] : this.dotOptions;
15812            return ne && ne[j] !== void 0 ? this.parseValue(ne[j]) : H;
15813          } }, { key: "valuePosRange", get: function() {
15814            var M = this, j = this.dotsPos, H = [];
15815            return j.forEach(function(ne, de) {
15816              H.push([Math.max(M.minRange ? M.minRangeDir * de : 0, M.enableCross ? 0 : j[de - 1] || 0, M.getDotRange(de, "min", 0)), Math.min(M.minRange ? 100 - M.minRangeDir * (j.length - 1 - de) : 100, M.enableCross ? 100 : j[de + 1] || 100, M.getDotRange(de, "max", 100))]);
15817            }), H;
15818          } }, { key: "dotsIndex", get: function() {
15819            var M = this;
15820            return this.dotsValue.map(function(j) {
15821              return M.getIndexByValue(j);
15822            });
15823          } }]), A;
15824        }();
15825        function rt(A, M) {
15826          if (!(A instanceof M)) throw new TypeError("Cannot call a class as a function");
15827        }
15828        function Qe(A, M) {
15829          for (var j = 0; j < M.length; j++) {
15830            var H = M[j];
15831            H.enumerable = H.enumerable || !1, H.configurable = !0, "value" in H && (H.writable = !0), Object.defineProperty(A, H.key, H);
15832          }
15833        }
15834        function dt(A, M, j) {
15835          return M && Qe(A.prototype, M), Object.defineProperty(A, "prototype", { writable: !1 }), A;
15836        }
15837        function nt(A, M, j) {
15838          return M in A ? Object.defineProperty(A, M, { value: j, enumerable: !0, configurable: !0, writable: !0 }) : A[M] = j, A;
15839        }
15840        var Tt = function() {
15841          function A(M) {
15842            rt(this, A), nt(this, "map", void 0), nt(this, "states", 0), this.map = M;
15843          }
15844          return dt(A, [{ key: "add", value: function(M) {
15845            this.states |= M;
15846          } }, { key: "delete", value: function(M) {
15847            this.states &= ~M;
15848          } }, { key: "toggle", value: function(M) {
15849            this.has(M) ? this.delete(M) : this.add(M);
15850          } }, { key: "has", value: function(M) {
15851            return !!(this.states & M);
15852          } }]), A;
15853        }();
15854        g(631);
15855        function Nt(A) {
15856          return sr(A) || Gt(A) || er(A) || Dt();
15857        }
15858        function Dt() {
15859          throw new TypeError(`Invalid attempt to spread non-iterable instance.
15860In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
15861        }
15862        function Gt(A) {
15863          if (typeof Symbol < "u" && A[Symbol.iterator] != null || A["@@iterator"] != null) return Array.from(A);
15864        }
15865        function sr(A) {
15866          if (Array.isArray(A)) return Ut(A);
15867        }
15868        function We(A) {
15869          return We = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(M) {
15870            return typeof M;
15871          } : function(M) {
15872            return M && typeof Symbol == "function" && M.constructor === Symbol && M !== Symbol.prototype ? "symbol" : typeof M;
15873          }, We(A);
15874        }
15875        function or(A, M) {
15876          var j = Object.keys(A);
15877          if (Object.getOwnPropertySymbols) {
15878            var H = Object.getOwnPropertySymbols(A);
15879            M && (H = H.filter(function(ne) {
15880              return Object.getOwnPropertyDescriptor(A, ne).enumerable;
15881            })), j.push.apply(j, H);
15882          }
15883          return j;
15884        }
15885        function hr(A) {
15886          for (var M = 1; M < arguments.length; M++) {
15887            var j = arguments[M] != null ? arguments[M] : {};
15888            M % 2 ? or(Object(j), !0).forEach(function(H) {
15889              Cr(A, H, j[H]);
15890            }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(A, Object.getOwnPropertyDescriptors(j)) : or(Object(j)).forEach(function(H) {
15891              Object.defineProperty(A, H, Object.getOwnPropertyDescriptor(j, H));
15892            });
15893          }
15894          return A;
15895        }
15896        function Cr(A, M, j) {
15897          return M in A ? Object.defineProperty(A, M, { value: j, enumerable: !0, configurable: !0, writable: !0 }) : A[M] = j, A;
15898        }
15899        function wn(A, M) {
15900          return pn(A) || Ir(A, M) || er(A, M) || ut();
15901        }
15902        function ut() {
15903          throw new TypeError(`Invalid attempt to destructure non-iterable instance.
15904In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
15905        }
15906        function er(A, M) {
15907          if (A) {
15908            if (typeof A == "string") return Ut(A, M);
15909            var j = Object.prototype.toString.call(A).slice(8, -1);
15910            return j === "Object" && A.constructor && (j = A.constructor.name), j === "Map" || j === "Set" ? Array.from(A) : j === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(j) ? Ut(A, M) : void 0;
15911          }
15912        }
15913        function Ut(A, M) {
15914          (M == null || M > A.length) && (M = A.length);
15915          for (var j = 0, H = new Array(M); j < M; j++) H[j] = A[j];
15916          return H;
15917        }
15918        function Ir(A, M) {
15919          var j = A == null ? null : typeof Symbol < "u" && A[Symbol.iterator] || A["@@iterator"];
15920          if (j != null) {
15921            var H, ne, de = [], ie = !0, Be = !1;
15922            try {
15923              for (j = j.call(A); !(ie = (H = j.next()).done) && (de.push(H.value), !(M && de.length === M)); ie = !0) ;
15924            } catch (Le) {
15925              Be = !0, ne = Le;
15926            } finally {
15927              try {
15928                ie || j.return == null || j.return();
15929              } finally {
15930                if (Be) throw ne;
15931              }
15932            }
15933            return de;
15934          }
15935        }
15936        function pn(A) {
15937          if (Array.isArray(A)) return A;
15938        }
15939        var kt = { None: 0, Drag: 2, Focus: 4 }, zn = 4, zi = (0, P.defineComponent)({ name: "VueSlider", components: { VueSliderDot: ye, VueSliderMark: Oe }, emits: ["change", "drag-start", "dragging", "drag-end", "error", "update:modelValue"], data: function() {
15940          return { control: null, states: new Tt(kt), scale: 1, focusDotIndex: 0 };
15941        }, props: { modelValue: { type: [Number, String, Array], default: 0 }, silent: { type: Boolean, default: !1 }, direction: { type: String, default: "ltr", validator: function(A) {
15942          return ["ltr", "rtl", "ttb", "btt"].indexOf(A) > -1;
15943        } }, width: { type: [Number, String] }, height: { type: [Number, String] }, dotSize: { type: [Number, Array], default: 14 }, contained: { type: Boolean, default: !1 }, min: { type: Number, default: 0 }, max: { type: Number, default: 100 }, interval: { type: Number, default: 1 }, disabled: { type: Boolean, default: !1 }, clickable: { type: Boolean, default: !0 }, dragOnClick: { type: Boolean, default: !1 }, duration: { type: Number, default: 0.5 }, data: { type: [Object, Array] }, dataValue: { type: String, default: "value" }, dataLabel: { type: String, default: "label" }, lazy: { type: Boolean, default: !1 }, tooltip: { type: String, default: "active", validator: function(A) {
15944          return ["none", "always", "focus", "hover", "active"].indexOf(A) > -1;
15945        } }, tooltipPlacement: { type: [String, Array], validator: function(A) {
15946          return (Array.isArray(A) ? A : [A]).every(function(M) {
15947            return ["top", "right", "bottom", "left"].indexOf(M) > -1;
15948          });
15949        } }, tooltipFormatter: { type: [String, Array, Function] }, useKeyboard: { type: Boolean, default: !0 }, keydownHook: { type: Function }, enableCross: { type: Boolean, default: !0 }, fixed: { type: Boolean, default: !1 }, order: { type: Boolean, default: !0 }, minRange: { type: Number }, maxRange: { type: Number }, marks: { type: [Boolean, Object, Array, Function], default: !1 }, process: { type: [Boolean, Function], default: !0 }, zoom: { type: Number }, included: { type: Boolean }, adsorb: { type: Boolean }, hideLabel: { type: Boolean }, dotOptions: { type: [Object, Array] }, dotAttrs: { type: Object }, railStyle: { type: Object }, processStyle: { type: Object }, dotStyle: { type: Object }, tooltipStyle: { type: Object }, stepStyle: { type: Object }, stepActiveStyle: { type: Object }, labelStyle: { type: Object }, labelActiveStyle: { type: Object } }, computed: { isHorizontal: function() {
15950          return this.direction === "ltr" || this.direction === "rtl";
15951        }, isReverse: function() {
15952          return this.direction === "rtl" || this.direction === "btt";
15953        }, tailSize: function() {
15954          return ze((this.isHorizontal ? this.height : this.width) || zn);
15955        }, containerClasses: function() {
15956          return ["vue-slider", ["vue-slider-".concat(this.direction)], { "vue-slider-disabled": this.disabled }];
15957        }, containerStyles: function() {
15958          var A = Array.isArray(this.dotSize) ? this.dotSize : [this.dotSize, this.dotSize], M = wn(A, 2), j = M[0], H = M[1], ne = this.width ? ze(this.width) : this.isHorizontal ? "auto" : ze(zn), de = this.height ? ze(this.height) : this.isHorizontal ? ze(zn) : "auto";
15959          return { padding: this.contained ? "".concat(H / 2, "px ").concat(j / 2, "px") : this.isHorizontal ? "".concat(H / 2, "px 0") : "0 ".concat(j / 2, "px"), width: ne, height: de };
15960        }, processArray: function() {
15961          var A = this;
15962          return this.control.processArray.map(function(M, j) {
15963            var H, ne = wn(M, 3), de = ne[0], ie = ne[1], Be = ne[2];
15964            if (de > ie) {
15965              var Le = [ie, de];
15966              de = Le[0], ie = Le[1];
15967            }
15968            var Re = A.isHorizontal ? "width" : "height";
15969            return { start: de, end: ie, index: j, style: hr(hr((H = {}, Cr(H, A.isHorizontal ? "height" : "width", "100%"), Cr(H, A.isHorizontal ? "top" : "left", 0), Cr(H, A.mainDirection, "".concat(de, "%")), Cr(H, Re, "".concat(ie - de, "%")), Cr(H, "transitionProperty", "".concat(Re, ",").concat(A.mainDirection)), Cr(H, "transitionDuration", "".concat(A.animateTime, "s")), H), A.processStyle), Be) };
15970          });
15971        }, dotBaseStyle: function() {
15972          var A, M = Array.isArray(this.dotSize) ? this.dotSize : [this.dotSize, this.dotSize], j = wn(M, 2), H = j[0], ne = j[1];
15973          return A = this.isHorizontal ? Cr({ transform: "translate(".concat(this.isReverse ? "50%" : "-50%", ", -50%)"), WebkitTransform: "translate(".concat(this.isReverse ? "50%" : "-50%", ", -50%)"), top: "50%" }, this.direction === "ltr" ? "left" : "right", "0") : Cr({ transform: "translate(-50%, ".concat(this.isReverse ? "50%" : "-50%", ")"), WebkitTransform: "translate(-50%, ".concat(this.isReverse ? "50%" : "-50%", ")"), left
15973: "50%" }, this.direction === "btt" ? "bottom" : "top", "0"), hr({ width: "".concat(H, "px"), height: "".concat(ne, "px") }, A);
15974        }, mainDirection: function() {
15975          switch (this.direction) {
15976            case "ltr":
15977              return "left";
15978            case "rtl":
15979              return "right";
15980            case "btt":
15981              return "bottom";
15982            case "ttb":
15983              return "top";
15984            default:
15985              return "left";
15986          }
15987        }, tooltipDirections: function() {
15988          var A = this.tooltipPlacement || (this.isHorizontal ? "top" : "left");
15989          return Array.isArray(A) ? A : this.dots.map(function() {
15990            return A;
15991          });
15992        }, dots: function() {
15993          var A = this;
15994          return this.control.dotsPos.map(function(M, j) {
15995            return hr({ pos: M, index: j, value: A.control.dotsValue[j], focus: A.states.has(kt.Focus) && A.focusDotIndex === j, disabled: A.disabled, style: A.dotStyle }, (Array.isArray(A.dotOptions) ? A.dotOptions[j] : A.dotOptions) || {});
15996          });
15997        }, animateTime: function() {
15998          return this.states.has(kt.Drag) ? 0 : this.duration;
15999        }, canSort: function() {
16000          return this.order && !this.minRange && !this.maxRange && !this.fixed && this.enableCross;
16001        }, sliderData: function() {
16002          var A = this;
16003          return this.isObjectArrayData(this.data) ? this.data.map(function(M) {
16004            return M[A.dataValue];
16005          }) : this.isObjectData(this.data) ? Object.keys(this.data) : this.data;
16006        }, sliderMarks: function() {
16007          var A = this;
16008          return this.marks ? this.marks : this.isObjectArrayData(this.data) ? function(M) {
16009            var j = { label: M };
16010            return A.data.some(function(H) {
16011              return H[A.dataValue] === M && (j.label = H[A.dataLabel], !0);
16012            }), j;
16013          } : this.isObjectData(this.data) ? this.data : void 0;
16014        }, sliderTooltipFormatter: function() {
16015          var A = this;
16016          if (this.tooltipFormatter) return this.tooltipFormatter;
16017          if (this.isObjectArrayData(this.data)) return function(j) {
16018            var H = "" + j;
16019            return A.data.some(function(ne) {
16020              return ne[A.dataValue] === j && (H = ne[A.dataLabel], !0);
16021            }), H;
16022          };
16023          if (this.isObjectData(this.data)) {
16024            var M = this.data;
16025            return function(j) {
16026              return M[j];
16027            };
16028          }
16029        }, isNotSync: function() {
16030          var A = this.control.dotsValue;
16031          return Array.isArray(this.modelValue) ? this.modelValue.length !== A.length || this.modelValue.some(function(M, j) {
16032            return M !== A[j];
16033          }) : this.modelValue !== A[0];
16034        }, dragRange: function() {
16035          var A = this.dots[this.focusDotIndex - 1], M = this.dots[this.focusDotIndex + 1];
16036          return [A ? A.pos : -1 / 0, M ? M.pos : 1 / 0];
16037        } }, watch: { modelValue: function() {
16038          this.control && !this.states.has(kt.Drag) && this.isNotSync && this.control.setValue(this.modelValue);
16039        } }, methods: { isObjectData: function(A) {
16040          return !!A && Object.prototype.toString.call(A) === "[object Object]";
16041        }, isObjectArrayData: function(A) {
16042          return !!A && Array.isArray(A) && A.length > 0 && We(A[0]) === "object";
16043        }, bindEvent: function() {
16044          document.addEventListener("touchmove", this.dragMove, { passive: !1 }), document.addEventListener("touchend", this.dragEnd, { passive: !1 }), document.addEventListener("mousedown", this.blurHandle), document.addEventListener("mousemove", this.dragMove), document.addEventListener("mouseup", this.dragEnd), document.addEventListener("mouseleave", this.dragEnd), document.addEventListener("keydown", this.keydownHandle);
16045        }, unbindEvent: function() {
16046          document.removeEventListener("touchmove", this.dragMove), document.removeEventListener("touchend", this.dragEnd), document.removeEventListener("mousedown", this.blurHandle), document.removeEventListener("mousemove", this.dragMove), document.removeEventListener("mouseup", this.dragEnd), document.removeEventListener("mouseleave", this.dragEnd), document.removeEventListener("keydown", this.keydownHandle);
16047        }, setScale: function() {
16048          this.scale = new fr(Math.floor(this.isHorizontal ? this.$el.offsetWidth : this.$el.offsetHeight)).multiply(this.zoom || 1).divide(100).toNumber();
16049        }, initControl: function() {
16050          var A = this;
16051          this.control = new ft({ value: this.modelValue, data: this.sliderData, enableCross: this.enableCross, fixed: this.fixed, max: this.max, min: this.min, interval: this.interval, minRange: this.minRange, maxRange: this.maxRange, order: this.order, marks: this.sliderMarks, included: this.included, process: this.process, adsorb: this.adsorb, dotOptions: this.dotOptions, onError: this.emitError }), ["data", "enableCross", "fixed", "max", "min", "interval", "minRange", "maxRange", "order", "marks", "process", "adsorb", "included", "dotOptions"].forEach(function(M) {
16052            A.$watch(M, function(j) {
16053              if (M === "data" && Array.isArray(A.control.data) && Array.isArray(j) && A.control.data.length === j.length && j.every(function(H, ne) {
16054                return H === A.control.data[ne];
16055              })) return !1;
16056              switch (M) {
16057                case "data":
16058                case "dataLabel":
16059                case "dataValue":
16060                  A.control.data = A.sliderData;
16061                  break;
16062                case "mark":
16063                  A.control.marks = A.sliderMarks;
16064                  break;
16065                default:
16066                  A.control[M] = j;
16067              }
16068              ["data", "max", "min", "interval"].indexOf(M) > -1 && A.control.syncDotsPos();
16069            });
16070          });
16071        }, syncValueByPos: function() {
16072          var A = this.control.dotsValue;
16073          if (this.isDiff(A, Array.isArray(this.modelValue) ? this.modelValue : [this.modelValue])) {
16074            var M = A.length === 1 ? A[0] : Nt(A);
16075            this.$emit("change", M, this.focusDotIndex), this.$emit("update:modelValue", M);
16076          }
16077        }, isDiff: function(A, M) {
16078          return A.length !== M.length || A.some(function(j, H) {
16079            return j !== M[H];
16080          });
16081        }, emitError: function(A, M) {
16082          this.silent || console.error("[VueSlider error]: ".concat(M)), this.$emit("error", A, M);
16083        }, dragStartOnProcess: function(A) {
16084          if (this.dragOnClick) {
16085            this.setScale();
16086            var M = this.getPosByEvent(A), j = this.control.getRecentDot(M);
16087            if (this.dots[j].disabled) return;
16088            this.dragStart(j), this.control.setDotPos(M, this.focusDotIndex), this.lazy || this.syncValueByPos();
16089          }
16090        }, dragStart: function(A) {
16091          this.focusDotIndex = A, this.setScale(), this.states.add(kt.Drag), this.states.add(kt.Focus), this.$emit("drag-start", this.focusDotIndex);
16092        }, dragMove: function(A) {
16093          if (!this.states.has(kt.Drag)) return !1;
16094          A.preventDefault();
16095          var M = this.getPosByEvent(A);
16096          this.isCrossDot(M), this.control.setDotPos(M, this.focusDotIndex), this.lazy || this.syncValueByPos();
16097          var j = this.control.dotsValue;
16098          this.$emit("dragging", j.length === 1 ? j[0] : Nt(j), this.focusDotIndex);
16099        }, isCrossDot: function(A) {
16100          if (this.canSort) {
16101            var M = this.focusDotIndex, j = A;
16102            if (j > this.dragRange[1] ? (j = this.dragRange[1], this.focusDotIndex++) : j < this.dragRange[0] && (j = this.dragRange[0], this.focusDotIndex--), M !== this.focusDotIndex) {
16103              var H = this.$refs["dot-".concat(this.focusDotIndex)];
16104              H && H.$el && H.$el.focus(), this.control.setDotPos(j, M);
16105            }
16106          }
16107        }, dragEnd: function(A) {
16108          var M = this;
16109          if (!this.states.has(kt.Drag)) return !1;
16110          setTimeout(function() {
16111            M.lazy && M.syncValueByPos(), M.included && M.isNotSync ? M.control.setValue(M.modelValue) : M.control.syncDotsPos(), M.states.delete(kt.Drag), M.useKeyboard && !("targetTouches" in A) || M.states.delete(kt.Focus), M.$emit("drag-end", M.focusDotIndex);
16112          });
16113        }, blurHandle: function(A) {
16114          if (!this.states.has(kt.Focus) || !this.$refs.container || this.$refs.container.contains(A.target)) return !1;
16115          this.states.delete(kt.Focus);
16116        }, clickHandle: function(A) {
16117          if (!this.clickable || this.disabled) return !1;
16118          if (!this.states.has(kt.Drag)) {
16119            this.setScale();
16120            var M = this.getPosByEvent(A);
16121            this.setValueByPos(M);
16122          }
16123        }, focus: function(A) {
16124          var M = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
16125          A.disabled || (this.states.add(kt.Focus), this.focusDotIndex = M);
16126        }, blur: function() {
16127          this.states.delete(kt.Focus);
16128        }, getValue: function() {
16129          var A = this.control.dotsValue;
16130          return A.length === 1 ? A[0] : A;
16131        }, getIndex: function() {
16132          var A = this.control.dotsIndex;
16133          return A.length === 1 ? A[0] : A;
16134        }, setValue: function(A) {
16135          this.control.setValue(Array.isArray(A) ? Nt(A) : [A]), this.syncValueByPos();
16136        }, setIndex: function(A) {
16137          var M = this, j = Array.isArray(A) ? A.map(function(H) {
16138            return M.control.getValueByIndex(H);
16139          }) : this.control.getValueByIndex(A);
16140          this.setValue(j);
16141        }, setValueByPos: function(A) {
16142          var M = this, j = this.control.getRecentDot(A);
16143          if (this.disabled || this.dots[j].disabled) return !1;
16144          this.focusDotIndex = j, this.control.setDotPos(A, j), this.syncValueByPos(), this.useKeyboard && this.states.add(kt.Focus), setTimeout(function() {
16145            M.included && M.isNotSync ? M.control.setValue(M.modelValue) : M.control.syncDotsPos();
16146          });
16147        }, keydownHandle: function(A) {
16148          var M = this;
16149          if (!this.useKeyboard || !this.states.has(kt.Focus)) return !1;
16150          var j = this.included && this.marks, H = $e(A, { direction: this.direction, max: j ? this.control.markList.length - 1 : this.control.total, min: 0, hook: this.keydownHook });
16151          if (H) {
16152            A.preventDefault();
16153            var ne = -1, de = 0;
16154            j ? (this.control.markList.some(function(ie, Be) {
16155              return ie.value === M.control.dotsValue[M.focusDotIndex] && (ne = H(Be), !0);
16156            }), ne < 0 ? ne = 0 : ne > this.control.markList.length - 1 && (ne = this.control.markList.length - 1), de = this.control.markList[ne].pos) : (ne = H(this.control.getIndexByValue(this.control.dotsValue[this.focusDotIndex])), de = this.control.parseValue(this.control.getValueByIndex(ne))), this.isCrossDot(de), this.control.setDotPos(de, this.focusDotIndex), this.syncValueByPos();
16157          }
16158        }, getPosByEvent: function(A) {
16159          return Ie(A, this.$el, this.isReverse, this.zoom)[this.isHorizontal ? "x" : "y"] / this.scale;
16160        }, renderSlot: function(A, M, j) {
16161          var H = this.$slots[A];
16162          return H ? H(M) : j;
16163        } }, created: function() {
16164          this.initControl();
16165        }
16165, mounted: function() {
16166          this.bindEvent();
16167        }, beforeUnmount: function() {
16168          this.unbindEvent();
16169        } }), mn = (0, ge.Z)(zi, [["render", J]]);
16170        mn.VueSliderMark = Oe, mn.VueSliderDot = ye;
16171        var le = mn, U = le;
16172      }(), m = m.default, m;
16173    }();
16174  });
16175})(UP);
16176var NH = UP.exports;
16177const TX = /* @__PURE__ */ xa(NH);
16178var $H = yI, jH = Id, VH = "Expected a function";
16179function UH(e, t, s) {
16180  var l = !0, h = !0;
16181  if (typeof e != "function")
16182    throw new TypeError(VH);
16183  return jH(s) && (l = "leading" in s ? !!s.leading : l, h = "trailing" in s ? !!s.trailing : h), $H(e, t, {
16184    leading: l,
16185    maxWait: t,
16186    trailing: h
16187  });
16188}
16189var qH = UH;
16190const EX = /* @__PURE__ */ xa(qH);
16191var qP = { exports: {} };
16192(function(e, t) {
16193  (function(s, l) {
16194    e.exports = l();
16195  })(ps, function() {
16196    var s = function(T, D) {
16197      var Z = { drag: [], click: [], mousemove: [], mousedown: [], mouseup: [], mouseout: [], keydown: [], keyup: [], touchstart: [], touchmove: [], touchend: [], tap: [] }, ce = { on: function(we, Pe, tt) {
16198        if (Z[we] === void 0) throw new Error("Invalid event type: " + we);
16199        Z[we].push({ selector: Pe, fn: tt });
16200      }, render: function(we) {
16201        D.store.featureChanged(we);
16202      } }, ve = function(we, Pe) {
16203        for (var tt = Z[we], ht = tt.length; ht--; ) {
16204          var wt = tt[ht];
16205          if (wt.selector(Pe)) {
16206            wt.fn.call(ce, Pe) || D.store.render(), D.ui.updateMapClasses();
16207            break;
16208          }
16209        }
16210      };
16211      return T.start.call(ce), { render: T.render, stop: function() {
16212        T.stop && T.stop();
16213      }, trash: function() {
16214        T.trash && (T.trash(), D.store.render());
16215      }, combineFeatures: function() {
16216        T.combineFeatures && T.combineFeatures();
16217      }, uncombineFeatures: function() {
16218        T.uncombineFeatures && T.uncombineFeatures();
16219      }, drag: function(we) {
16220        ve("drag", we);
16221      }, click: function(we) {
16222        ve("click", we);
16223      }, mousemove: function(we) {
16224        ve("mousemove", we);
16225      }, mousedown: function(we) {
16226        ve("mousedown", we);
16227      }, mouseup: function(we) {
16228        ve("mouseup", we);
16229      }, mouseout: function(we) {
16230        ve("mouseout", we);
16231      }, keydown: function(we) {
16232        ve("keydown", we);
16233      }, keyup: function(we) {
16234        ve("keyup", we);
16235      }, touchstart: function(we) {
16236        ve("touchstart", we);
16237      }, touchmove: function(we) {
16238        ve("touchmove", we);
16239      }, touchend: function(we) {
16240        ve("touchend", we);
16241      }, tap: function(we) {
16242        ve("tap", we);
16243      } };
16244    };
16245    function l(T) {
16246      return T && T.__esModule && Object.prototype.hasOwnProperty.call(T, "default") ? T.default : T;
16247    }
16248    function h(T) {
16249      if (T.__esModule) return T;
16250      var D = T.default;
16251      if (typeof D == "function") {
16252        var Z = function ce() {
16253          if (this instanceof ce) {
16254            var ve = [null];
16255            ve.push.apply(ve, arguments);
16256            var we = Function.bind.apply(D, ve);
16257            return new we();
16258          }
16259          return D.apply(this, arguments);
16260        };
16261        Z.prototype = D.prototype;
16262      } else Z = {};
16263      return Object.defineProperty(Z, "__esModule", { value: !0 }), Object.keys(T).forEach(function(ce) {
16264        var ve = Object.getOwnPropertyDescriptor(T, ce);
16265        Object.defineProperty(Z, ce, ve.get ? ve : { enumerable: !0, get: function() {
16266          return T[ce];
16267        } });
16268      }), Z;
16269    }
16270    var g = {}, m = { RADIUS: 6378137 }, c = m;
16271    function w(T) {
16272      var D = 0;
16273      if (T && T.length > 0) {
16274        D += Math.abs(O(T[0]));
16275        for (var Z = 1; Z < T.length; Z++) D -= Math.abs(O(T[Z]));
16276      }
16277      return D;
16278    }
16279    function O(T) {
16280      var D, Z, ce, ve, we, Pe, tt = 0, ht = T.length;
16281      if (ht > 2) {
16282        for (Pe = 0; Pe < ht; Pe++) Pe === ht - 2 ? (ce = ht - 2, ve = ht - 1, we = 0) : Pe === ht - 1 ? (ce = ht - 1, ve = 0, we = 1) : (ce = Pe, ve = Pe + 1, we = Pe + 2), D = T[ce], Z = T[ve], tt += (P(T[we][0]) - P(D[0])) * Math.sin(P(Z[1]));
16283        tt = tt * c.RADIUS * c.RADIUS / 2;
16284      }
16285      return tt;
16286    }
16287    function P(T) {
16288      return T * Math.PI / 180;
16289    }
16290    g.geometry = function T(D) {
16291      var Z, ce = 0;
16292      switch (D.type) {
16293        case "Polygon":
16294          return w(D.coordinates);
16295        case "MultiPolygon":
16296          for (Z = 0; Z < D.coordinates.length;
16296 Z++) ce += w(D.coordinates[Z]);
16297          return ce;
16298        case "Point":
16299        case "MultiPoint":
16300        case "LineString":
16301        case "MultiLineString":
16302          return 0;
16303        case "GeometryCollection":
16304          for (Z = 0; Z < D.geometries.length; Z++) ce += T(D.geometries[Z]);
16305          return ce;
16306      }
16307    }, g.ring = O;
16308    var R = { CONTROL_BASE: "mapboxgl-ctrl", CONTROL_PREFIX: "mapboxgl-ctrl-", CONTROL_BUTTON: "mapbox-gl-draw_ctrl-draw-btn", CONTROL_BUTTON_LINE: "mapbox-gl-draw_line", CONTROL_BUTTON_POLYGON: "mapbox-gl-draw_polygon", CONTROL_BUTTON_POINT: "mapbox-gl-draw_point", CONTROL_BUTTON_TRASH: "mapbox-gl-draw_trash", CONTROL_BUTTON_COMBINE_FEATURES: "mapbox-gl-draw_combine", CONTROL_BUTTON_UNCOMBINE_FEATURES: "mapbox-gl-draw_uncombine", CONTROL_GROUP: "mapboxgl-ctrl-group", ATTRIBUTION: "mapboxgl-ctrl-attrib", ACTIVE_BUTTON: "active", BOX_SELECT: "mapbox-gl-draw_boxselect" }, z = { HOT: "mapbox-gl-draw-hot", COLD: "mapbox-gl-draw-cold" }, J = { ADD: "add", MOVE: "move", DRAG: "drag", POINTER: "pointer", NONE: "none" }, K = { POLYGON: "polygon", LINE: "line_string", POINT: "point" }, ee = { FEATURE: "Feature", POLYGON: "Polygon", LINE_STRING: "LineString", POINT: "Point", FEATURE_COLLECTION: "FeatureCollection", MULTI_PREFIX: "Multi", MULTI_POINT: "MultiPoint", MULTI_LINE_STRING: "MultiLineString", MULTI_POLYGON: "MultiPolygon" }, ue = { DRAW_LINE_STRING: "draw_line_string", DRAW_POLYGON: "draw_polygon", DRAW_POINT: "draw_point", SIMPLE_SELECT: "simple_select", DIRECT_SELECT: "direct_select", STATIC: "static" }, Ce = { CREATE: "draw.create", DELETE: "draw.delete", UPDATE: "draw.update", SELECTION_CHANGE: "draw.selectionchange", MODE_CHANGE: "draw.modechange", ACTIONABLE: "draw.actionable", RENDER: "draw.render", COMBINE_FEATURES: "draw.combine", UNCOMBINE_FEATURES: "draw.uncombine" }, ge = { MOVE: "move", CHANGE_COORDINATES: "change_coordinates" }, X = { FEATURE: "feature", MIDPOINT: "midpoint", VERTEX: "vertex" }, ye = { ACTIVE: "true", INACTIVE: "false" }, Ae = ["scrollZoom", "boxZoom", "dragRotate", "dragPan", "keyboard", "doubleClickZoom", "touchZoomRotate"], Se = -85, je = Object.freeze({ __proto__: null, classes: R, sources: z, cursors: J, types: K, geojsonTypes: ee, modes: ue, events: Ce, updateActions: ge, meta: X, activeStates: ye, interactions: Ae, LAT_MIN: -90, LAT_RENDERED_MIN: Se, LAT_MAX: 90, LAT_RENDERED_MAX: 85, LNG_MIN: -270, LNG_MAX: 270 }), Ne = { Point: 0, LineString: 1, MultiLineString: 1, Polygon: 2 };
16309    function Oe(T, D) {
16310      var Z = Ne[T.geometry.type] - Ne[D.geometry.type];
16311      return Z === 0 && T.geometry.type === ee.POLYGON ? T.area - D.area : Z;
16312    }
16313    function ze(T) {
16314      return T.map(function(D) {
16315        return D.geometry.type === ee.POLYGON && (D.area = g.geometry({ type: ee.FEATURE, property: {}, geometry: D.geometry })), D;
16316      }).sort(Oe).map(function(D) {
16317        return delete D.area, D;
16318      });
16319    }
16320    function He(T, D) {
16321      return D === void 0 && (D = 0), [[T.point.x - D, T.point.y - D], [T.point.x + D, T.point.y + D]];
16322    }
16323    function Ie(T) {
16324      if (this._items = {}, this._nums = {}, this._length = T ? T.length : 0, T) for (var D = 0, Z = T.length; D < Z; D++) this.add(T[D]), T[D] !== void 0 && (typeof T[D] == "string" ? this._items[T[D]] = D : this._nums[T[D]] = D);
16325    }
16326    Ie.prototype.add = function(T) {
16327      return this.has(T) || (this._length++, typeof T == "string" ? this._items[T] 
16327= this._length : this._nums[T] = this._length), this;
16328    }, Ie.prototype.delete = function(T) {
16329      return this.has(T) === !1 || (this._length--, delete this._items[T], delete this._nums[T]), this;
16330    }, Ie.prototype.has = function(T) {
16331      return (typeof T == "string" || typeof T == "number") && (this._items[T] !== void 0 || this._nums[T] !== void 0);
16332    }, Ie.prototype.values = function() {
16333      var T = this, D = [];
16334      return Object.keys(this._items).forEach(function(Z) {
16335        D.push({ k: Z, v: T._items[Z] });
16336      }), Object.keys(this._nums).forEach(function(Z) {
16337        D.push({ k: JSON.parse(Z), v: T._nums[Z] });
16338      }), D.sort(function(Z, ce) {
16339        return Z.v - ce.v;
16340      }).map(function(Z) {
16341        return Z.k;
16342      });
16343    }, Ie.prototype.clear = function() {
16344      return this._length = 0, this._items = {}, this._nums = {}, this;
16345    };
16346    var $e = [X.FEATURE, X.MIDPOINT, X.VERTEX], Xe = { click: function(T, D, Z) {
16347      return st(T, D, Z, Z.options.clickBuffer);
16348    }, touch: function(T, D, Z) {
16349      return st(T, D, Z, Z.options.touchBuffer);
16350    } };
16351    function st(T, D, Z, ce) {
16352      if (Z.map === null) return [];
16353      var ve = T ? He(T, ce) : D, we = {};
16354      Z.options.styles && (we.layers = Z.options.styles.map(function(wt) {
16355        return wt.id;
16356      }).filter(function(wt) {
16357        return Z.map.getLayer(wt) != null;
16358      }));
16359      var Pe = Z.map.queryRenderedFeatures(ve, we).filter(function(wt) {
16360        return $e.indexOf(wt.properties.meta) !== -1;
16361      }), tt = new Ie(), ht = [];
16362      return Pe.forEach(function(wt) {
16363        var xt = wt.properties.id;
16364        tt.has(xt) || (tt.add(xt), ht.push(wt));
16365      }), ze(ht);
16366    }
16367    function Ge(T, D) {
16368      var Z = Xe.click(T, null, D), ce = { mouse: J.NONE };
16369      return Z[0] && (ce.mouse = Z[0].properties.active === ye.ACTIVE ? J.MOVE : J.POINTER, ce.feature = Z[0].properties.meta), D.events.currentModeName().indexOf("draw") !== -1 && (ce.mouse = J.ADD), D.ui.queueMapClasses(ce), D.ui.updateMapClasses(), Z[0];
16370    }
16371    function ct(T, D) {
16372      var Z = T.x - D.x, ce = T.y - D.y;
16373      return Math.sqrt(Z * Z + ce * ce);
16374    }
16375    function ot(T, D, Z) {
16376      Z === void 0 && (Z = {});
16377      var ce = Z.fineTolerance != null ? Z.fineTolerance : 4, ve = Z.grossTolerance != null ? Z.grossTolerance : 12, we = Z.interval != null ? Z.interval : 500;
16378      T.point = T.point || D.point, T.time = T.time || D.time;
16379      var Pe = ct(T.point, D.point);
16380      return Pe < ce || Pe < ve && D.time - T.time < we;
16381    }
16382    function Ht(T, D, Z) {
16383      Z === void 0 && (Z = {});
16384      var ce = Z.tolerance != null ? Z.tolerance : 25, ve = Z.interval != null ? Z.interval : 250;
16385      return T.point = T.point || D.point, T.time = T.time || D.time, ct(T.point, D.point) < ce && D.time - T.time < ve;
16386    }
16387    var fr = { exports: {} }, Qt = fr.exports = function(T, D) {
16388      if (D || (D = 16), T === void 0 && (T = 128), T <= 0) return "0";
16389      for (var Z = Math.log(Math.pow(2, T)) / Math.log(D), ce = 2; Z === 1 / 0; ce *= 2) Z = Math.log(Math.pow(2, T / ce)) / Math.log(D) * ce;
16390      var ve = Z - Math.floor(Z), we = "";
16391      for (ce = 0; ce < Math.floor(Z); ce++)
16392        we = Math.floor(Math.random() * D).toString(D) + we;
16393      if (ve) {
16394        var Pe = Math.pow(D, ve);
16395        we = Math.floor(Math.random() * Pe).toString(D) + we;
16396      }
16397      var tt = parseInt(we, D);
16398      return tt !== 1 / 0 && tt >= Math.pow(2, T) ? Qt(T, D) : we;
16399    };
16400    Qt.rack = function(T, D, Z) {
16401      var ce = function(we) {
16402        var Pe = 0;
16403        do {
16404          if (Pe++ > 10) {
16405            if (!Z) throw new Error("too many ID collisions, use more bits");
16406            T += Z;
16407          }
16408          var tt = Qt(T, D);
16409        } while (Object.hasOwnProperty.call(ve, tt));
16410        return ve[tt] = we, tt;
16411      }, ve = ce.hats = {};
16412      return ce.get = function(we) {
16413        return ce.hats[we];
16414      }, ce.set = function(we, Pe) {
16415        return ce.hats[we] = Pe, ce;
16416      }, ce.bits = T || 128, ce.base = D || 16, ce;
16417    };
16418    var ur = l(fr.exports), Ar = function(T, D) {
16419      this.ctx = T, this.properties = D.properties || {}, this.coordinates = D.geometry.coordinates, this.id = D.id || ur(), this.type = D.geometry.type;
16420    };
16421    Ar.prototype.changed = function() {
16422      this.ctx.store.featureChanged(this.id);
16423    }, Ar.prototype.incomingCoords = function(T) {
16424      this.setCoordinates(T);
16425    }, Ar.prototype.setCoordinates = function(T) {
16426      this.coordinates = T, this.changed();
16427    }, Ar.prototype.getCoordinates = function() {
16428      return JSON.parse(JSON.stringify(this.coordinates));
16429    }, Ar.prototype.setProperty = function(T, D) {
16430      this.properties[T] = D;
16431    }, Ar.prototype.toGeoJSON = function() {
16432      return JSON.parse(JSON.stringify({ id: this.id, type: ee.FEATURE, properties: this.properties, geometry: { coordinates: this.getCoordinates(), type: this.type } }));
16433    }, Ar.prototype.internal = function(T) {
16434      var D = { id: this.id, meta: X.FEATURE, "meta:type": this.type, active: ye.INACTIVE, mode: T };
16435      if (this.ctx.options.userProperties) for (var Z in this.properties) D["user_" + Z] = this.properties[Z];
16436      return { type: ee.FEATURE, properties: D, geometry: { coordinates: this.getCoordinates(), type: this.type } };
16437    };
16438    var en = function(T, D) {
16439      Ar.call(this, T, D);
16440    };
16441    (en.prototype = Object.create(Ar.prototype)).isValid = function() {
16442      return typeof this.coordinates[0] == "number" && typeof this.coordinates[1] == "number";
16443    }, en.prototype.updateCoordinate = function(T, D, Z) {
16444      this.coordinates = arguments.length === 3 ? [D, Z] : [T, D], this.changed();
16445    }, en.prototype.getCoordinate = function() {
16446      return this.getCoordinates();
16447    };
16448    var $r = function(T, D) {
16449      Ar.call(this, T, D);
16450    };
16451    ($r.prototype = Object.create(Ar.prototype)).isValid = function() {
16452      return this.coordinates.length > 1;
16453    }, $r.prototype.addCoordinate = function(T, D, Z) {
16454      this.changed();
16455      var ce = parseInt(T, 10);
16456      this.coordinates.splice(ce, 0, [D, Z]);
16457    }, $r.prototype.getCoordinate = function(T) {
16458      var D = parseInt(T, 10);
16459      return JSON.parse(JSON.stringify(this.coordinates[D]));
16460    }, $r.prototype.removeCoordinate = function(T) {
16461      this.changed(), this.coordinates.splice(parseInt(T, 10), 1);
16462    }, $r.prototype.updateCoordinate = function(T, D, Z) {
16463      var ce = parseInt(T, 10);
16464      this.coordinates[ce] = [D, Z], this.changed();
16465    };
16466    var Fr = function(T, D) {
16467      Ar.call(this, T, D), this.coordinates = this.coordinates.map(function(Z) {
16468        return Z.slice(0, -1);
16469      });
16470    };
16471    (Fr.prototype = Object.create(Ar.prototype)).isValid = function() {
16472      return this.coordinates.length !== 0 && this.coordinates.every(function(T) {
16473        return T.length > 2;
16474      });
16475    }, Fr.prototype.incomingCoords = function(T) {
16476      this.coordinates = T.map(function(D) {
16477        return D.slice(0, -1);
16478      }), this.changed();
16479    }, Fr.prototype.setCoordinates = function(T) {
16480      this.coordinates = T, this.changed();
16481    }, Fr.prototype.addCoordinate = function(T, D, Z) {
16482      this.changed();
16483      var ce = T.split(".").map(function(ve) {
16484        return parseInt(ve, 10);
16485      });
16486      this.coordinates[ce[0]].splice(ce[1], 0, [D, Z]);
16487    }, Fr.prototype.removeCoordinate = function(T) {
16488      this.changed();
16489      var D = T.split(".").map(function(ce) {
16490        return parseInt(ce, 10);
16491      }), Z = this.coordinates[D[0]];
16492      Z && (Z.splice(D[1], 1), Z.length < 3 && this.coordinates.splice(D[0], 1));
16493    }, Fr.prototype.getCoordinate = function(T) {
16494      var D = T.split(".").map(function(ce) {
16495        return parseInt(ce, 10);
16496      }), Z = this.coordinates[D[0]];
16497      return JSON.parse(JSON.stringify(Z[D[1]]));
16498    }, Fr.prototype.getCoordinates = function() {
16499      return this.coordinates.map(function(T) {
16500        return T.concat([T[0]]);
16501      });
16502    }, Fr.prototype.updateCoordinate = function(T, D, Z) {
16503      this.changed();
16504      var ce = T.split("."), ve = parseInt(ce[0], 10), we = parseInt(ce[1], 10);
16505      this.coordinates[ve] === void 0 && (this.coordinates[ve] = []), this.coordinates[ve][we] = [D, Z];
16506    };
16507    var dn = { MultiPoint: en, MultiLineString: $r, MultiPolygon: Fr }, kn = function(T, D, Z, ce, ve) {
16508      var we = Z.split("."), Pe = parseInt(we[0], 10), tt = we[1] ? we.slice(1).join(".") : null;
16509      return T[Pe][D](tt, ce, ve);
16510    }, tn = function(T, D) {
16511      if (Ar.call(this, T, D), delete this.coordinates, this.model = dn[D.geometry.type], this.model === void 0) throw new TypeError(D.geometry.type + " is not a valid type");
16512      this.features = this._coordinatesToFeatures(D.geometry.coordinates);
16513    };
16514    function Jt(T) {
16515      this.map = T.map, this.drawConfig = JSON.parse(JSON.stringify(T.options || {})), this._ctx = T;
16516    }
16517    (tn.prototype = Object.create(Ar.prototype))._coordinatesToFeatures = function(T) {
16518      var D = this, Z = this.model.bind(this);
16519      return T.map(function(ce) {
16520        return new Z(D.ctx, { id: ur(), type: ee.FEATURE, properties: {}, geometry: { coordinates: ce, type: D.type.replace("Multi", "") } });
16521      });
16522    }, tn.prototype.isValid = function() {
16523      return this.features.every(function(T) {
16524        return T.isValid();
16525      });
16526    }, tn.prototype.setCoordinates = function(T) {
16527      this.features = this._coordinatesToFeatures(T), this.changed();
16528    }, tn.prototype.getCoordinate = function(T) {
16529      return kn(this.features, "getCoordinate", T);
16530    }, tn.prototype.getCoordinates = function() {
16531      return JSON.parse(JSON.stringify(this.features.map(function(T) {
16532        return T.type === ee.POLYGON ? T.getCoordinates() : T.coordinates;
16533      })));
16534    }, tn.prototype.updateCoordinate = function(T, D, Z) {
16535      kn(this.features, "updateCoordinate", T, D, Z), this.changed();
16536    }, tn.prototype.addCoordinate = function(T, D, Z) {
16537      kn(this.features, "addCoordinate", T, D, Z), this.changed();
16538    }, tn.prototype.removeCoordinate = function(T) {
16539      kn(this.features, "removeCoordinate", T), this.changed();
16540    }, tn.prototype.getFeatures = function() {
16541      return this.features;
16542    }, Jt.prototype.setSelected = function(T) {
16543      return this._ctx.store.setSelected(T);
16544    }, Jt.prototype.setSelectedCoordinates = function(T) {
16545      var D = this;
16546      this._ctx.store.setSelectedCoordinates(T), T.reduce(function(Z, ce) {
16547        return Z[ce.feature_id] === void 0 && (Z[ce.feature_id] = !0, D._ctx.store.get(ce.feature_id).changed()), Z;
16548      }, {});
16549    }, Jt.prototype.getSelected = function() {
16550      return this._ctx.store.getSelected();
16551    }, Jt.prototype.getSelectedIds = function() {
16552      return this._ctx.store.getSelectedIds();
16553    }, Jt.prototype.isSelected = function(T) {
16554      return this._ctx.store.isSelected(T);
16555    }, Jt.prototype.getFeature = function(T) {
16556      return this._ctx.store.get(T);
16557    }, Jt.prototype.select = function(T) {
16558      return this._ctx.store.select(T);
16559    }, Jt.prototype.deselect = function(T) {
16560      return this._ctx.store.deselect(T);
16561    }, Jt.prototype.deleteFeature = function(T, D) {
16562      return D === void 0 && (D = {}), this._ctx.store.delete(T, D);
16563    }, Jt.prototype.addFeature = function(T) {
16564      return this._ctx.store.add(T);
16565    }, Jt.prototype.clearSelectedFeatures = function() {
16566      return this._ctx.store.clearSelected();
16567    }, Jt.prototype.clearSelectedCoordinates = function() {
16568      return this._ctx.store.clearSelectedCoordinates();
16569    }, Jt.prototype.setActionableState = function(T) {
16570      T === void 0 && (T = {});
16571      var D = { trash: T.trash || !1, combineFeatures: T.combineFeatures || !1, uncombineFeatures: T.uncombineFeatures || !1 };
16572      return this._ctx.events.actionable(D);
16573    }, Jt.prototype.changeMode = function(T, D, Z) {
16574      return D === void 0 && (D = {}), Z === void 0 && (Z = {}), this._ctx.events.changeMode(T, D, Z);
16575    }, Jt.prototype.updateUIClasses = function(T) {
16576      return this._ctx.ui.queueMapClasses(T);
16577    }, Jt.prototype.activateUIButton = function(T) {
16578      return this._ctx.ui.setActiveButton(T);
16579    }, Jt.prototype.featuresAt = function(T, D, Z) {
16580      if (Z === void 0 && (Z = "click"), Z !== "click" && Z !== "touch") throw new Error("invalid buffer type");
16581      return Xe[Z](T, D, this._ctx);
16582    }, Jt.prototype.newFeature = function(T) {
16583      var D = T.geometry.type;
16584      return D === ee.POINT ? new en(this._ctx, T) : D === ee.LINE_STRING ? new $r(this._ctx, T) : D === ee.POLYGON ? new Fr(this._ctx, T) : new tn(this._ctx, T);
16585    }, Jt.prototype.isInstanceOf = function(T, D) {
16586      if (T === ee.POINT) return D instanceof en;
16587      if (T === ee.LINE_STRING) return D instanceof $r;
16588      if (T === ee.POLYGON) return D instanceof Fr;
16589      if (T === "MultiFeature") return D instanceof tn;
16590      throw new Error("Unknown feature class: " + T);
16591    }, Jt.prototype.doRender = function(T) {
16592      return this._ctx.store.featureChanged(T);
16593    }, Jt.prototype.onSetup = function() {
16594    }, Jt.prototype.onDrag = function() {
16595    }, Jt.prototype.onClick = function() {
16596    }, Jt.prototype.onMouseMove = function() {
16597    }, Jt.prototype.onMouseDown = function() {
16598    }, Jt.prototype.onMouseUp = function() {
16599    }, Jt.prototype.onMouseOut = function() {
16600    }, Jt.prototype.onKeyUp = function() {
16601    }, Jt.prototype.onKeyDown = function() {
16602    }, Jt.prototype.onTouchStart = function() {
16603    }, Jt.prototype.onTouchMove = function() {
16604    }, Jt.prototype.onTouchEnd = function() {
16605    }, Jt.prototype.onTap = function() {
16606    }, Jt.prototype.onStop = function() {
16607    }, Jt.prototype.onTrash = function() {
16608    }, Jt.prototype.onCombineFeature = function() {
16609    }, Jt.prototype.onUncombineFeature = function() {
16610    }, Jt.prototype.toDisplayFeatures = function() {
16611      throw new Error("You must overwrite toDisplayFeatures");
16612    };
16613    var Fi = { drag: "onDrag", click: "onClick", mousemove: "onMouseMove", mousedown: "onMouseDown", mouseup: "onMouseUp", mouseout: "onMouseOut", keyup: "onKeyUp", keydown: "onKeyDown", touchstart: "onTouchStart", touchmove: "onTouchMove", touchend: "onTouchEnd", tap: "onTap" }, Kn = Object.keys(Fi);
16614    function me(T) {
16615      var D = Object.keys(T);
16616      return function(Z, ce) {
16617        ce === void 0 && (ce = {});
16618        var ve = {}, we = D.reduce(function(Pe, tt) {
16619          return Pe[tt] = T[tt], Pe;
16620        }, new Jt(Z));
16621        return { start: function() {
16622          var Pe = this;
16623          ve = we.onSetup(ce), Kn.forEach(function(tt) {
16624            var ht, wt = Fi[tt], xt = function() {
16625              return !1;
16626            };
16627            T[wt] && (xt = function() {
16628              return !0;
16629            }), Pe.on(tt, xt, (ht = wt, function(mt) {
16630              return we[ht](ve, mt);
16631            }));
16632          });
16633        }, stop: function() {
16634          we.onStop(ve);
16635        }, trash: function() {
16636          we.onTrash(ve);
16637        }, combineFeatures: function() {
16638          we.onCombineFeatures(ve);
16639        }, uncombineFeatures: function() {
16640          we.onUncombineFeatures(ve);
16641        }, render: function(Pe, tt) {
16642          we.toDisplayFeatures(ve, Pe, tt);
16643        } };
16644      };
16645    }
16646    function Ee(T) {
16647      return [].concat(T).filter(function(D) {
16648        return D !== void 0;
16649      });
16650    }
16651    function Ze() {
16652      var T = this;
16653      if (!(T.ctx.map && T.ctx.map.getSource(z.HOT) !== void 0)) return ht();
16654      var D = T.ctx.events.currentModeName();
16655      T.ctx.ui.queueMapClasses({ mode: D });
16656      var Z = [], ce = [];
16657      T.isDirty ? ce = T.getAllIds() : (Z = T.getChangedIds().filter(function(wt) {
16658        return T.get(wt) !== void 0;
16659      }), ce = T.sources.hot.filter(function(wt) {
16660        return wt.properties.id && Z.indexOf(wt.properties.id) === -1 && T.get(wt.properties.id) !== void 0;
16661      }).map(function(wt) {
16662        return wt.properties.id;
16663      })), T.sources.hot = [];
16664      var ve = T.sources.cold.length;
16665      T.sources.cold = T.isDirty ? [] : T.sources.cold.filter(function(wt) {
16666        var xt = wt.properties.id || wt.properties.parent;
16667        return Z.indexOf(xt) === -1;
16668      });
16669      var we = ve !== T.sources.cold.length || ce.length > 0;
16670      function Pe(wt, xt) {
16671        var mt = T.get(wt).internal(D);
16672        T.ctx.events.currentModeRender(mt, function(Yt) {
16673          T.sources[xt].push(Yt);
16674        });
16675      }
16676      if (Z.forEach(function(wt) {
16677        return Pe(wt, "hot");
16678      }), ce.forEach(function(wt) {
16679        return Pe(wt, "cold");
16680      }), we && T.ctx.map.getSource(z.COLD).setData({ type: ee.FEATURE_COLLECTION, features: T.sources.cold }), T.ctx.map.getSource(z.HOT).setData({ type: ee.FEATURE_COLLECTION, features: T.sources.hot }), T._emitSelectionChange && (T.ctx.map.fire(Ce.SELECTION_CHANGE, { features: T.getSelected().map(function(wt) {
16681        return wt.toGeoJSON();
16682      }), points: T.getSelectedCoordinates().map(function(wt) {
16683        return { type: ee.FEATURE, properties: {}, geometry: { type: ee.POINT, coordinates: wt.coordinates } };
16684      }) }), T._emitSelectionChange = !1), T._deletedFeaturesToEmit.length) {
16685        var tt = T._deletedFeaturesToEmit.map(function(wt) {
16686          return wt.toGeoJSON();
16687        });
16688        T._deletedFeaturesToEmit = [], T.ctx.map.fire(Ce.DELETE, { features: tt });
16689      }
16690      function ht() {
16691        T.isDirty = !1, T.clearChangedIds();
16692      }
16693      ht(), T.ctx.map.fire(Ce.RENDER, {});
16694    }
16695    function re(T) {
16696      var D, Z = this;
16697      this._features = {}, this._featureIds = new Ie(), this._selectedFeatureIds = new Ie(), this._selectedCoordinates = [], this._changedFeatureIds = new Ie(), this._deletedFeaturesToEmit = [], this._emitSelectionChange = !1, this._mapInitialConfig = {}, this.ctx = T, this.sources = { hot: [], cold: [] }, this.render = function() {
16698        D || (D = requestAnimationFrame(function() {
16699          D = null, Ze.call(Z);
16700        }));
16701      }, this.isDirty = !1;
16702    }
16703    function et(T, D) {
16704      var Z = T._selectedCoordinates.filter(function(ce) {
16705        return T._selectedFeatureIds.has(ce.feature_id);
16706      });
16707      T._selectedCoordinates.length === Z.length || D.silent || (T._emitSelectionChange = !0), T._selectedCoordinates = Z;
16708    }
16709    re.prototype.createRenderBatch = function() {
16710      var T = this, D = this.render, Z = 0;
16711      return this.render = function() {
16712        Z++;
16713      }, function() {
16714        T.render = D, Z > 0 && T.render();
16715      };
16716    }, re.prototype.setDirty = function() {
16717      return this.isDirty = !0, this;
16718    }, re.prototype.featureChanged = function(T) {
16719      return this._changedFeatureIds.add(T), this;
16720    }, re.prototype.getChangedIds = function() {
16721      return this._changedFeatureIds.values();
16722    }, re.prototype.clearChangedIds = function() {
16723      return this._changedFeatureIds.clear(), this;
16724    }, re.prototype.getAllIds = function() {
16725      return this._featureIds.values();
16726    }, re.prototype.add = function(T) {
16727      return this.featureChanged(T.id), this._features[T.id] = T, this._featureIds.add(T.id), this;
16728    }, re.prototype.delete = function(T, D) {
16729      var Z = this;
16730      return D === void 0 && (D = {}), Ee(T).forEach(function(ce) {
16731        Z._featureIds.has(ce) && (Z._featureIds.delete(ce), Z._selectedFeatureIds.delete(ce), D.silent || Z._deletedFeaturesToEmit.indexOf(Z._features[ce]) === -1 && Z._deletedFeaturesToEmit.push(Z._features[ce]), delete Z._features[ce], Z.isDirty = !0);
16732      }), et(this, D), this;
16733    }, re.prototype.get = function(T) {
16734      return this._features[T];
16735    }, re.prototype.getAll = function() {
16736      var T = this;
16737      return Object.keys(this._features).map(function(D) {
16738        return T._features[D];
16739      });
16740    }, re.prototype.select = function(T, D) {
16741      var Z = this;
16742      return D === void 0 && (D = {}), Ee(T).forEach(function(ce) {
16743        Z._selectedFeatureIds.has(ce) || (Z._selectedFeatureIds.add(ce), Z._changedFeatureIds.add(ce), D.silent || (Z._emitSelectionChange = !0));
16744      }), this;
16745    }, re.prototype.deselect = function(T, D) {
16746      var Z = this;
16747      return D === void 0 && (D = {}), Ee(T).forEach(function(ce) {
16748        Z._selectedFeatureIds.has(ce) && (Z._selectedFeatureIds.delete(ce), Z._changedFeatureIds.add(ce), D.silent || (Z._emitSelectionChange = !0));
16749      }), et(this, D), this;
16750    }, re.prototype.clearSelected = function(T) {
16751      return T === void 0 && (T = {}), this.deselect(this._selectedFeatureIds.values(), { silent: T.silent }), this;
16752    }, re.prototype.setSelected = function(T, D) {
16753      var Z = this;
16754      return D === void 0 && (D = {}), T = Ee(T), this.deselect(this._selectedFeatureIds.values().filter(function(ce) {
16755        return T.indexOf(ce) === -1;
16756      }), { silent: D.silent }), this.select(T.filter(function(ce) {
16757        return !Z._selectedFeatureIds.has(ce);
16758      }), { silent: D.silent }), this;
16759    }, re.prototype.setSelectedCoordinates = function(T) {
16760      return this._selectedCoordinates = T, this._emitSelectionChange = !0, this;
16761    }, re.prototype.clearSelectedCoordinates = function() {
16762      return this._selectedCoordinates = [], this._emitSelectionChange = !0, this;
16763    }, re.prototype.getSelectedIds = function() {
16764      return this._selectedFeatureIds.values();
16765    }, re.prototype.getSelected = function() {
16766      var T = this;
16767      return this._selectedFeatureIds.values().map(function(D) {
16768        return T.get(D);
16769      });
16770    }, re.prototype.getSelectedCoordinates = function() {
16771      var T = this;
16772      return this._selectedCoordinates.map(function(D) {
16773        return { coordinates: T.get(D.feature_id).getCoordinate(D.coord_path) };
16774      });
16775    }, re.prototype.isSelected = function(T) {
16776      return this._selectedFeatureIds.has(T);
16777    }, re.prototype.setFeatureProperty = function(T, D, Z) {
16778      this.get(T).setProperty(D, Z), this.featureChanged(T);
16779    }, re.prototype.storeMapConfig = function() {
16780      var T = this;
16781      Ae.forEach(function(D) {
16782        T.ctx.map[D] && (T._mapInitialConfig[D] = T.ctx.map[D].isEnabled());
16783      });
16784    }, re.prototype.restoreMapConfig = function() {
16785      var T = this;
16786      Object.keys(this._mapInitialConfig).forEach(function(D) {
16787        T._mapInitialConfig[D] ? T.ctx.map[D].enable() : T.ctx.map[D].disable();
16788      });
16789    }, re.prototype.getInitialConfigValue = function(T) {
16790      return this._mapInitialConfig[T] === void 0 || this._mapInitialConfig[T];
16791    };
16792    var ft = function() {
16793      for (var T = arguments, D = {}, Z = 0; Z < arguments.length; Z++) {
16794        var ce = T[Z];
16795        for (var ve in ce) rt.call(ce, ve) && (D[ve] = ce[ve]);
16796      }
16797      return D;
16798    }, rt = Object.prototype.hasOwnProperty, Qe = l(ft), dt = ["mode", "feature", "mouse"];
16799    function nt(T) {
16800      var D = null, Z = null, ce = { onRemove: function() {
16801        return T.map.off("load", ce.connect), clearInterval(Z), ce.removeLayers(), T.store.restoreMapConfig(), T.ui.removeButtons(), T.events.removeEventListeners(), T.ui.clearMapClasses(), T.boxZoomInitial && T.map.boxZoom.enable(), T.map = null, T.container = null, T.store = null, D && D.parentNode && D.parentNode.removeChild(D), D = null, this;
16802      }, connect: function() {
16803        T.map.off("load", ce.connect), clearInterval(Z), ce.addLayers(), T.store.storeMapConfig(), T.events.addEventListeners();
16804      }, onAdd: function(ve) {
16805        var we = ve.fire;
16806        return ve.fire = function(Pe, tt) {
16807          var ht = arguments;
16808          return we.length === 1 && arguments.length !== 1 && (ht = [Qe({}, { type: Pe }, tt)]), we.apply(ve, ht);
16809        }, T.map = ve, T.events = function(Pe) {
16810          var tt = Object.keys(Pe.options.modes).reduce(function(Ye, Rt) {
16811            return Ye[Rt] = me(Pe.options.modes[Rt]), Ye;
16812          }, {}), ht = {}, wt = {}, xt = {}, mt = null, Yt = null;
16813          xt.drag = function(Ye, Rt) {
16814            Rt({ point: Ye.point, time: (/* @__PURE__ */ new Date()).getTime() }) ? (Pe.ui.queueMapClasses({ mouse: J.DRAG }), Yt.drag(Ye)) : Ye.originalEvent.stopPropagation();
16815          }, xt.mousedrag = function(Ye) {
16816            xt.drag(Ye, function(Rt) {
16817              return !ot(ht, Rt);
16818            });
16819          }, xt.touchdrag = function(Ye) {
16820            xt.drag(Ye, function(Rt) {
16821              return !Ht(wt, Rt);
16822            });
16823          }, xt.mousemove = function(Ye) {
16824            if ((Ye.originalEvent.buttons !== void 0 ? Ye.originalEvent.buttons : Ye.originalEvent.which) === 1) return xt.mousedrag(Ye);
16825            var Rt = Ge(Ye, Pe);
16826            Ye.featureTarget = Rt, Yt.mousemove(Ye);
16827          }, xt.mousedown = function(Ye) {
16828            ht = { time: (/* @__PURE__ */ new Date()).getTime(), point: Ye.point };
16829            var Rt = Ge(Ye, Pe);
16830            Ye.featureTarget = Rt, Yt.mousedown(Ye);
16831          }, xt.mouseup = function(Ye) {
16832            var Rt = Ge(Ye, Pe);
16833            Ye.featureTarget = Rt, ot(ht, { point: Ye.point, time: (/* @__PURE__ */ new Date()).getTime() }) ? Yt.click(Ye) : Yt.mouseup(Ye);
16834          }, xt.mouseout = function(Ye) {
16835            Yt.mouseout(Ye);
16836          }, xt.touchstart = function(Ye) {
16837            if (Pe.options.touchEnabled) {
16838              wt = { time: (/* @__PURE__ */ new Date()).getTime(), point: Ye.point };
16839              var Rt = Xe.touch(Ye, null, Pe)[0];
16840              Ye.featureTarget = Rt, Yt.touchstart(Ye);
16841            }
16842          }, xt.touchmove = function(Ye) {
16843            if (Pe.options.touchEnabled) return Yt.touchmove(Ye), xt.touchdrag(Ye);
16844          }, xt.touchend = function(Ye) {
16845            if (Ye.originalEvent.preventDefault(), Pe.options.touchEnabled) {
16846              var Rt = Xe.touch(Ye, null, Pe)[0];
16847              Ye.featureTarget = Rt, Ht(wt, { time: (/* @__PURE__ */ new Date()).getTime(), point: Ye.point }) ? Yt.tap(Ye) : Yt.touchend(Ye);
16848            }
16849          };
16850          var Xr = function(Ye) {
16851            return !(Ye === 8 || Ye === 46 || Ye >= 48 && Ye <= 57);
16852          };
16853          function Zt(Ye, Rt, Rr) {
16854            Rr === void 0 && (Rr = {}), Yt.stop();
16855            var $n = tt[Ye];
16856            if ($n === void 0) throw new Error(Ye + " is not val
16856id");
16857            mt = Ye;
16858            var ln = $n(Pe, Rt);
16859            Yt = s(ln, Pe), Rr.silent || Pe.map.fire(Ce.MODE_CHANGE, { mode: Ye }), Pe.store.setDirty(), Pe.store.render();
16860          }
16861          xt.keydown = function(Ye) {
16862            (Ye.srcElement || Ye.target).classList.contains("mapboxgl-canvas") && (Ye.keyCode !== 8 && Ye.keyCode !== 46 || !Pe.options.controls.trash ? Xr(Ye.keyCode) ? Yt.keydown(Ye) : Ye.keyCode === 49 && Pe.options.controls.point ? Zt(ue.DRAW_POINT) : Ye.keyCode === 50 && Pe.options.controls.line_string ? Zt(ue.DRAW_LINE_STRING) : Ye.keyCode === 51 && Pe.options.controls.polygon && Zt(ue.DRAW_POLYGON) : (Ye.preventDefault(), Yt.trash()));
16863          }, xt.keyup = function(Ye) {
16864            Xr(Ye.keyCode) && Yt.keyup(Ye);
16865          }, xt.zoomend = function() {
16866            Pe.store.changeZoom();
16867          }, xt.data = function(Ye) {
16868            if (Ye.dataType === "style") {
16869              var Rt = Pe.setup, Rr = Pe.map, $n = Pe.options, ln = Pe.store;
16870              $n.styles.some(function(uc) {
16871                return Rr.getLayer(uc.id);
16872              }) || (Rt.addLayers(), ln.setDirty(), ln.render());
16873            }
16874          };
16875          var kr = { trash: !1, combineFeatures: !1, uncombineFeatures: !1 };
16876          return { start: function() {
16877            mt = Pe.options.defaultMode, Yt = s(tt[mt](Pe), Pe);
16878          }, changeMode: Zt, actionable: function(Ye) {
16879            var Rt = !1;
16880            Object.keys(Ye).forEach(function(Rr) {
16881              if (kr[Rr] === void 0) throw new Error("Invalid action type");
16882              kr[Rr] !== Ye[Rr] && (Rt = !0), kr[Rr] = Ye[Rr];
16883            }), Rt && Pe.map.fire(Ce.ACTIONABLE, { actions: kr });
16884          }, currentModeName: function() {
16885            return mt;
16886          }, currentModeRender: function(Ye, Rt) {
16887            return Yt.render(Ye, Rt);
16888          }, fire: function(Ye, Rt) {
16889            xt[Ye] && xt[Ye](Rt);
16890          }, addEventListeners: function() {
16891            Pe.map.on("mousemove", xt.mousemove), Pe.map.on("mousedown", xt.mousedown), Pe.map.on("mouseup", xt.mouseup), Pe.map.on("data", xt.data), Pe.map.on("touchmove", xt.touchmove), Pe.map.on("touchstart", xt.touchstart), Pe.map.on("touchend", xt.touchend), Pe.container.addEventListener("mouseout", xt.mouseout), Pe.options.keybindings && (Pe.container.addEventListener("keydown", xt.keydown), Pe.container.addEventListener("keyup", xt.keyup));
16892          }, removeEventListeners: function() {
16893            Pe.map.off("mousemove", xt.mousemove), Pe.map.off("mousedown", xt.mousedown), Pe.map.off("mouseup", xt.mouseup), Pe.map.off("data", xt.data), Pe.map.off("touchmove", xt.touchmove), Pe.map.off("touchstart", xt.touchstart), Pe.map.off("touchend", xt.touchend), Pe.container.removeEventListener("mouseout", xt.mouseout), Pe.options.keybindings && (Pe.container.removeEventListener("keydown", xt.keydown), Pe.container.removeEventListener("keyup", xt.keyup));
16894          }, trash: function(Ye) {
16895            Yt.trash(Ye);
16896          }, combineFeatures: function() {
16897            Yt.combineFeatures();
16898          }, uncombineFeatures: function() {
16899            Yt.uncombineFeatures();
16900          }, getMode: function() {
16901            return mt;
16902          } };
16903        }(T), T.ui = /* @__PURE__ */ function(Pe) {
16904          var tt = {}, ht = null, wt = { mode: null, feature: null, mouse: null }, xt = { mode: null, feature: null, mouse: null };
16905          function mt(Ye) {
16906            xt = Qe(xt, Ye);
16907          }
16908          function Yt() {
16909            var Ye, Rt;
16910            if (Pe.container) {
16911              var Rr = [], $n = [];
16912              dt.forEach(function(ln) {
16913                xt[ln] !== wt[ln] && (Rr.push(ln + "-" + wt[ln]), xt[ln] !== null && $n.push(ln + "-" + xt[ln]));
16914              }), Rr.length > 0 && (Ye = Pe.container.classList).remove.apply(Ye, Rr), $n.length > 0 && (Rt = Pe.container.classList).add.apply(Rt, $n), wt = Qe(wt, xt);
16915            }
16916          }
16917          function Xr(Ye, Rt) {
16918            Rt === void 0 && (Rt = {});
16919            var Rr = document.createElement("button");
16920            return Rr.className = R.CONTROL_BUTTON + " " + Rt.className, Rr.setAttribute("title", Rt.title), Rt.container.appendChild(Rr), Rr.addEventListener("click", function($n) {
16921              if ($n.preventDefault(), $n.stopPropagation(), $n.target === ht) return Zt(), void Rt.onDeactivate();
16922              kr(Ye), Rt.onActivate();
16923            }, !0), Rr;
16924          }
16925          function Zt() {
16926            ht && (ht.classList.remove(R.ACTIVE_BUTTON), ht = null);
16927          }
16928          function kr(Ye) {
16929            Zt();
16930            var Rt = tt[Ye];
16931            Rt && Rt && Ye !== "trash" && (Rt.classList.add(R.ACTIVE_BUTTON), ht = Rt);
16932          }
16933          return { setActiveButton: kr, queueMapClasses: mt, updateMapClasses: Yt, clearMapClasses: function() {
16934            mt({ mode: null, feature: null, mouse: null }), Yt();
16935          }, addButtons: function() {
16936            var Ye = Pe.options.controls, Rt = document.createElement("div");
16937            return Rt.className = R.CONTROL_GROUP + " " + R.CONTROL_BASE, Ye && (Ye[K.LINE] && (tt[K.LINE] = Xr(K.LINE, { container: Rt, className: R.CONTROL_BUTTON_LINE, title: "LineString tool " + (Pe.options.keybindings ? "(l)" : ""), onActivate: function() {
16938              return Pe.events.changeMode(ue.DRAW_LINE_STRING);
16939            }, onDeactivate: function() {
16940              return Pe.events.trash();
16941            } })), Ye[K.POLYGON] && (tt[K.POLYGON] = Xr(K.POLYGON, { container: Rt, className: R.CONTROL_BUTTON_POLYGON, title: "Polygon tool " + (Pe.options.keybindings ? "(p)" : ""), onActivate: function() {
16942              return Pe.events.changeMode(ue.DRAW_POLYGON);
16943            }, onDeactivate: function() {
16944              return Pe.events.trash();
16945            } })), Ye[K.POINT] && (tt[K.POINT] = Xr(K.POINT, { container: Rt, className: R.CONTROL_BUTTON_POINT, title: "Marker tool " + (Pe.options.keybindings ? "(m)" : ""), onActivate: function() {
16946              return Pe.events.changeMode(ue.DRAW_POINT);
16947            }, onDeactivate: function() {
16948              return Pe.events.trash();
16949            } })), Ye.trash && (tt.trash = Xr("trash", { container: Rt, className: R.CONTROL_BUTTON_TRASH, title: "Delete", onActivate: function() {
16950              Pe.events.trash();
16951            } })), Ye.combine_features && (tt.combine_features = Xr("combineFeatures", { container: Rt, className: R.CONTROL_BUTTON_COMB
16951INE_FEATURES, title: "Combine", onActivate: function() {
16952              Pe.events.combineFeatures();
16953            } })), Ye.uncombine_features && (tt.uncombine_features = Xr("uncombineFeatures", { container: Rt, className: R.CONTROL_BUTTON_UNCOMBINE_FEATURES, title: "Uncombine", onActivate: function() {
16954              Pe.events.uncombineFeatures();
16955            } }))), Rt;
16956          }, removeButtons: function() {
16957            Object.keys(tt).forEach(function(Ye) {
16958              var Rt = tt[Ye];
16959              Rt.parentNode && Rt.parentNode.removeChild(Rt), delete tt[Ye];
16960            });
16961          } };
16962        }(T), T.container = ve.getContainer(), T.store = new re(T), D = T.ui.addButtons(), T.options.boxSelect && (T.boxZoomInitial = ve.boxZoom.isEnabled(), ve.boxZoom.disable(), ve.dragPan.disable(), ve.dragPan.enable()), ve.loaded() ? ce.connect() : (ve.on("load", ce.connect), Z = setInterval(function() {
16963          ve.loaded() && ce.connect();
16964        }, 16)), T.events.start(), D;
16965      }, addLayers: function() {
16966        T.map.addSource(z.COLD, { data: { type: ee.FEATURE_COLLECTION, features: [] }, type: "geojson" }), T.map.addSource(z.HOT, { data: { type: ee.FEATURE_COLLECTION, features: [] }, type: "geojson" }), T.options.styles.forEach(function(ve) {
16967          T.map.addLayer(ve);
16968        }), T.store.setDirty(!0), T.store.render();
16969      }, removeLayers: function() {
16970        T.options.styles.forEach(function(ve) {
16971          T.map.getLayer(ve.id) && T.map.removeLayer(ve.id);
16972        }), T.map.getSource(z.COLD) && T.map.removeSource(z.COLD), T.map.getSource(z.HOT) && T.map.removeSource(z.HOT);
16973      } };
16974      return T.setup = ce, ce;
16975    }
16976    var Tt = [{ id: "gl-draw-polygon-fill-inactive", type: "fill", filter: ["all", ["==", "active", "false"], ["==", "$type", "Polygon"], ["!=", "mode", "static"]], paint: { "fill-color": "#3bb2d0", "fill-outline-color": "#3bb2d0", "fill-opacity": 0.1 } }, { id: "gl-draw-polygon-fill-active", type: "fill", filter: ["all", ["==", "active", "true"], ["==", "$type", "Polygon"]], paint: { "fill-color": "#fbb03b", "fill-outline-color": "#fbb03b", "fill-opacity": 0.1 } }, { id: "gl-draw-polygon-midpoint", type: "circle", filter: ["all", ["==", "$type", "Point"], ["==", "meta", "midpoint"]], paint: { "circle-radius": 3, "circle-color": "#fbb03b" } }, { id: "gl-draw-polygon-stroke-inactive", type: "line", filter: ["all", ["==", "active", "false"], ["==", "$type", "Polygon"], ["!=", "mode", "static"]], layout: { "line-cap": "round", "line-join": "round" }, paint: { "line-color": "#3bb2d0", "line-width": 2 } }, { id: "gl-draw-polygon-stroke-active", type: "line", filter: ["all", ["==", "active", "true"], ["==", "$type", "Polygon"]], layout: { "line-cap": "round", "line-join": "round" }, paint: { "line-color": "#fbb03b", "line-dasharray": [0.2, 2], "line-width": 2 } }, { id: "gl-draw-line-inactive", type: "line", filter: ["all", ["==", "active", "false"], ["==", "$type", "LineString"], ["!=", "mode", "static"]], layout: { "line-cap": "round", "line-join": "round" }, paint: { "line-color": "#3bb2d0", "line-width": 2 } }, { id: "gl-draw-line-active", type: "line", filter: ["all", ["==", "$type", "LineString"], ["==", "active", "true"]], layout: { "line-cap": "round", "line-join": "round" }, paint: { "line-color": "#fbb03b", "line-dasharray": [0.2, 2], "line-width": 2 } }, { id: "gl-draw-polygon-and-line-vertex-stroke-inactive", type: "circle", filter: ["all", ["==", "meta", "vertex"], ["==", "$type", "Point"], ["!=", "mode", "static"]], paint: { "circle-radius": 5, "circle-color": "#fff" } }, { id: "gl-draw-polygon-and-line-vertex-inactive", type: "circle", filter: ["all", ["==", "meta", "vertex"], ["==", "$type", "Point"], ["!=", "mode", "static"]], paint: { "circle-radius": 3, "circle-color": "#fbb03b" } }, { id: "gl-draw-point-point-stroke-inactive", type: "circle", filter: ["all", ["==", "active", "false"], ["==", "$type", "Point"], ["==", "meta", "feature"], ["!=", "mode", "static"]], paint: { "circle-radius": 5, "circle-opacity": 1, "circle-color": "#fff" } }, { id: "gl-draw-point-inactive", type: "circle", filter: ["all", ["==", "active", "false"], ["==", "$type", "Point"], ["==", "meta", "feature"], ["!=", "mode", "static"]], paint: { "circle-radius": 3, "circle-color": "#3bb2d0" } }, { id: "gl-draw-point-stroke-active", type: "circle", filter: ["all", ["==", "$type", "Point"], ["==", "active", "true"], ["!=", "meta", "midpoint"]], paint: { "circle-radius": 7, "circle-color": "#fff" } }, { id: "gl-draw-point-active", type: "circle", filter: ["all", ["==", "$type", "Point"], ["!=", "meta", "midpoint"], ["==", "active", "true"]], paint: { "circle-radius": 5, "circle-color": "#fbb03b" } }, { id: "gl-draw-polygon-fill-static", type: "fill", filter: ["all", ["==", "mode", "static"], ["==", "$type", "Polygon"]], paint: { "fill-color": "#404040", "fill-outline-color": "#404040", "fill-opacity": 0.1 } }, { id: "gl-draw-polygon-stroke-static", type: "line", filter: ["all", ["==", "mode", "static"], ["==", "$type", "Polygon"]], layout: { "line-cap": "round", "line-join": "round" }, paint: { "line-color": "#404040", "line-width": 2 } }, { id: "gl-draw-line-static", type: "line", filter: ["all", ["==", "mode", "static"], ["==", "$type", "LineString"]], layout: { "line-cap": "round", "line-join": "round" }, paint: { "line-color": "#404040", "line-width": 2 } }, { id: "gl-draw-point-static", type: "circle", filter: ["all", ["==", "mode", "static"], ["==", "$type", "Point"]], paint: { "circle-radius": 5, "circle-color": "#404040" } }];
16977    function Nt(T) {
16978      return function(D) {
16979        var Z = D.featureTarget;
16980        return !!Z && !!Z.properties && Z.properties.meta === T;
16981      };
16982    }
16983    function Dt(T) {
16984      return !!T.originalEvent && !!T.originalEvent.shiftKey && T.originalEvent.button === 0;
16985    }
16986    function Gt(T) {
16987      return !!T.featureTarget && !!T.featureTarget.properties && T.featureTarget.properties.active === ye.ACTIVE && T.featureTarget.properties.meta === X.FEATURE;
16988    }
16989    function sr(T) {
16990      return !!T.featureTarget && !!T.featureTarget.properties && T.featureTarget.properties.active === ye.INACTIVE && T.featureTarget.properties.meta === X.FEATURE;
16991    }
16992    function We(T) {
16993      return T.featureTarget === void 0;
16994    }
16995    function or(T) {
16996      return !!T.featureTarget && !!T.featureTarget.properties && T.featureTarget.properties.meta === X.FEATURE;
16997    }
16998    function hr(T) {
16999      var D = T.featureTarget;
17000      return !!D && !!D.properties && D.properties.meta === X.VERTEX;
17001    }
17002    function Cr(T) {
17003      return !!T.originalEvent && T.originalEvent.shiftKey === !0;
17004    }
17005    function wn(T) {
17006      return T.keyCode === 27;
17007    }
17008    function ut(T) {
17009      return T.keyCode === 13;
17010    }
17011    var er = Object.freeze({ __proto__: null, isOfMetaType: Nt, isShiftMousedown: Dt, isActiveFeature: Gt, isInactiveFeature: sr, noTarget: We, isFeature: or, isVertex: hr, isShiftDown: Cr, isEscapeKey: wn, isEnterKey: ut, isTrue: function() {
17012      return !0;
17013    } }), Ut = Ir;
17014    function Ir(T, D) {
17015      this.x = T, this.y = D;
17016    }
17017    Ir.prototype = { clone: function() {
17018      return new Ir(this.x, this.y);
17019    }, add: function(T) {
17020      return this.clone()._add(T);
17021    }, sub: function(T) {
17022      return this.clone()._sub(T);
17023    }, multByPoint: function(T) {
17024      return this.clone()._multByPoint(T);
17025    }, divByPoint: function(T) {
17026      return this.clone()._divByPoint(T);
17027    }, mult: function(T) {
17028      return this.clone()._mult(T);
17029    }, div: function(T) {
17030      return this.clone()._div(T);
17031    }, rotate: function(T) {
17032      return this.clone()._rotate(T);
17033    }
17033, rotateAround: function(T, D) {
17034      return this.clone()._rotateAround(T, D);
17035    }, matMult: function(T) {
17036      return this.clone()._matMult(T);
17037    }, unit: function() {
17038      return this.clone()._unit();
17039    }, perp: function() {
17040      return this.clone()._perp();
17041    }, round: function() {
17042      return this.clone()._round();
17043    }, mag: function() {
17044      return Math.sqrt(this.x * this.x + this.y * this.y);
17045    }, equals: function(T) {
17046      return this.x === T.x && this.y === T.y;
17047    }, dist: function(T) {
17048      return Math.sqrt(this.distSqr(T));
17049    }, distSqr: function(T) {
17050      var D = T.x - this.x, Z = T.y - this.y;
17051      return D * D + Z * Z;
17052    }, angle: function() {
17053      return Math.atan2(this.y, this.x);
17054    }, angleTo: function(T) {
17055      return Math.atan2(this.y - T.y, this.x - T.x);
17056    }, angleWith: function(T) {
17057      return this.angleWithSep(T.x, T.y);
17058    }, angleWithSep: function(T, D) {
17059      return Math.atan2(this.x * D - this.y * T, this.x * T + this.y * D);
17060    }, _matMult: function(T) {
17061      var D = T[0] * this.x + T[1] * this.y, Z = T[2] * this.x + T[3] * this.y;
17062      return this.x = D, this.y = Z, this;
17063    }, _add: function(T) {
17064      return this.x += T.x, this.y += T.y, this;
17065    }, _sub: function(T) {
17066      return this.x -= T.x, this.y -= T.y, this;
17067    }, _mult: function(T) {
17068      return this.x *= T, this.y *= T, this;
17069    }, _div: function(T) {
17070      return this.x /= T, this.y /= T, this;
17071    }, _multByPoint: function(T) {
17072      return this.x *= T.x, this.y *= T.y, this;
17073    }, _divByPoint: function(T) {
17074      return this.x /= T.x, this.y /= T.y, this;
17075    }, _unit: function() {
17076      return this._div(this.mag()), this;
17077    }, _perp: function() {
17078      var T = this.y;
17079      return this.y = this.x, this.x = -T, this;
17080    }, _rotate: function(T) {
17081      var D = Math.cos(T), Z = Math.sin(T), ce = D * this.x - Z * this.y, ve = Z * this.x + D * this.y;
17082      return this.x = ce, this.y = ve, this;
17083    }, _rotateAround: function(T, D) {
17084      var Z = Math.cos(T), ce = Math.sin(T), ve = D.x + Z * (this.x - D.x) - ce * (this.y - D.y), we = D.y + ce * (this.x - D.x) + Z * (this.y - D.y);
17085      return this.x = ve, this.y = we, this;
17086    }, _round: function() {
17087      return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
17088    } }, Ir.convert = function(T) {
17089      return T instanceof Ir ? T : Array.isArray(T) ? new Ir(T[0], T[1]) : T;
17090    };
17091    var pn = l(Ut);
17092    function kt(T, D) {
17093      var Z = D.getBoundingClientRect();
17094      return new pn(T.clientX - Z.left - (D.clientLeft || 0), T.clientY - Z.top - (D.clientTop || 0));
17095    }
17096    function zn(T, D, Z, ce) {
17097      return { type: ee.FEATURE, properties: { meta: X.VERTEX, parent: T, coord_path: Z, active: ce ? ye.ACTIVE : ye.INACTIVE }, geometry: { type: ee.POINT, coordinates: D } };
17098    }
17099    function zi(T, D, Z) {
17100      var ce = D.geometry.coordinates, ve = Z.geometry.coordinates;
17101      if (ce[1] > 85 || ce[1] < Se || ve[1] > 85 || ve[1] < Se) return null;
17102      var we = { lng: (ce[0] + ve[0]) / 2, lat: (ce[1] + ve[1]) / 2 };
17103      return { type: ee.FEATURE, properties: { meta: X.MIDPOINT, parent: T, lng: we.lng, lat: we.lat, coord_path: Z.properties.coord_path }, geometry: { type: ee.POINT, coordinates: [we.lng, we.lat] } };
17104    }
17105    function Bi(T, D, Z) {
17106      D === void 0 && (D = {}), Z === void 0 && (Z = null);
17107      var ce, ve = T.geometry, we = ve.type, Pe = ve.coordinates, tt = T.properties && T.properties.id, ht = [];
17108      function wt(mt, Yt) {
17109        var Xr = "", Zt = null;
17110        mt.forEach(function(kr, Ye) {
17111          var Rt = Yt != null ? Yt + "." + Ye : String(Ye), Rr = zn(tt, kr, Rt, xt(Rt));
17112          if (D.midpoints && Zt) {
17113            var $n = zi(tt, Zt, Rr);
17114            $n && ht.push($n);
17115          }
17116          Zt = Rr;
17117          var ln = JSON.stringify(kr);
17118          Xr !== ln && ht.push(Rr), Ye === 0 && (Xr = ln);
17119        });
17120      }
17121      function xt(mt) {
17122        return !!D.selectedPaths && D.selectedPaths.indexOf(mt) !== -1;
17123      }
17124      return we === ee.POINT ? ht.push(zn(tt, Pe, Z, xt(Z))) : we === ee.POLYGON ? Pe.forEach(function(mt, Yt) {
17125        wt(mt, Z !== null ? Z + "." + Yt : String(Yt));
17126      }) : we === ee.LINE_STRING ? wt(Pe, Z) : we.indexOf(ee.MULTI_PREFIX) === 0 && (ce = we.replace(ee.MULTI_PREFIX, ""), Pe.forEach(function(mt, Yt) {
17127        var Xr = { type: ee.FEATURE, properties: T.properties, geometry: { type: ce, coordinates: mt } };
17128        ht = ht.concat(Bi(Xr, D, Yt));
17129      })), ht;
17130    }
17131    var mn = { enable: function(T) {
17132      setTimeout(function() {
17133        T.map && T.map.doubleClickZoom && T._ctx && T._ctx.store && T._ctx.store.getInitialConfigValue && T._ctx.store.getInitialConfigValue("doubleClickZoom") && T.map.doubleClickZoom.enable();
17134      }, 0);
17135    }, disable: function(T) {
17136      setTimeout(function() {
17137        T.map && T.map.doubleClickZoom && T.map.doubleClickZoom.disable();
17138      }, 0);
17139    } }, le = { exports: {} }, U = function(T) {
17140      if (!T || !T.type) return null;
17141      var D = A[T.type];
17142      if (!D) return null;
17143      if (D === "geometry") return { type: "FeatureCollection", features: [{ type: "Feature", properties: {}, geometry: T }] };
17144      if (D === "feature") return { type: "FeatureCollection", features: [T] };
17145      if (D === "featurecollection") return T;
17146    }, A = { Point: "geometry", MultiPoint: "geometry", LineString: "geometry", MultiLineString: "geometry", Polygon: "geometry", MultiPolygon: "geometry", GeometryCollection: "geometry", Feature: "feature", FeatureCollection: "featurecollection" }, M = l(U), j = Object.freeze({ __proto__: null, default: function T(D) {
17147      switch (D && D.type || null) {
17148        case "FeatureCollection":
17149          return D.features = D.features.reduce(function(Z, ce) {
17150            return Z.concat(T(ce));
17151          }, []), D;
17152        case "Feature":
17153          return D.geometry ? T(D.geometry).map(function(Z) {
17154            var ce = { type: "Feature", properties: JSON.parse(JSON.stringify(D.properties)), geometry: Z };
17155            return D.id !== void 0 && (ce.id = D.id), ce;
17156          }) : [D];
17157        case "MultiPoint":
17158          return D.coordinates.map(function(Z) {
17159            return { type: "Point", coordinates: Z };
17160          });
17161        case "MultiPolygon":
17162          return D.coordinates.map(function(Z) {
17163            return { type: "Polygon", coordinates: Z };
17164          });
17165        case "MultiLineString":
17166          return D.coordinates.map(function(Z) {
17167            return { type: "LineString", coordinates: Z };
17168          });
17169        case "GeometryCollection":
17170          return D.geometries.map(T).reduce(function(Z, ce) {
17171            return Z.concat(ce);
17172          }, []);
17173        case "Point":
17174        case "Polygon":
17175        case "LineString":
17176          return [D];
17177      }
17178    } }), H = U, ne = h(j), de = function(T) {
17179      return function D(Z) {
17180        return Array.isArray(Z) && Z.length && typeof Z[0] == "number" ? [Z] : Z.reduce(function(ce, ve) {
17181          return Array.isArray(ve) && Array.isArray(ve[0]) ? ce.concat(D(ve)) : (ce.push(ve), ce);
17182        }, []);
17183      }(T);
17184    };
17185    ne instanceof Function || (ne = ne.default);
17186    var ie = { exports: {} }, Be = ie.exports = function(T) {
17187      return new Le(T);
17188    };
17189    function Le(T) {
17190      this.value = T;
17191    }
17192    function Re(T, D, Z) {
17193      var ce = [], ve = [], we = !0;
17194      return function Pe(tt) {
17195        var ht = Z ? it(tt) : tt, wt = {}, xt = !0, mt = { node: ht, node_: tt, path: [].concat(ce), parent: ve[ve.length - 1], parents: ve, key: ce.slice(-1)[0], isRoot: ce.length === 0, level: ce.length, circular: null, update: function(Zt, kr) {
17196          mt.isRoot || (mt.parent.node[mt.key] = Zt), mt.node = Zt, kr && (xt = !1);
17197        }, delete: function(Zt) {
17198          delete mt.parent.node[mt.key], Zt && (xt = !1);
17199        }, remove: function(Zt) {
17200          dr(mt.parent.node) ? mt.parent.node.splice(mt.key, 1) : delete mt.parent.node[mt.key], Zt && (xt = !1);
17201        }, keys: null, before: function(Zt) {
17202          wt.before = Zt;
17203        }, after: function(Zt) {
17204          wt.after = Zt;
17205        }, pre: function(Zt) {
17206          wt.pre = Zt;
17207        }, post: function(Zt) {
17208          wt.post = Zt;
17209        }, stop: function() {
17210          we = !1;
17211        }, block: function() {
17212          xt = !1;
17213        } };
17214        if (!we) return mt;
17215        function Yt() {
17216          if (typeof mt.node == "object" && mt.node !== null) {
17217            mt.keys && mt.node_ === mt.node || (mt.keys = Pt(mt.node)), mt.isLeaf = mt.keys.length == 0;
17218            for (var Zt = 0; Zt < ve.length; Zt++) if (ve[Zt].node_ === tt) {
17219              mt.circular = ve[Zt];
17220              break;
17221            }
17222          } else mt.isLeaf = !0, mt.keys = null;
17223          mt.notLeaf = !mt.isLeaf, mt.notRoot = !mt.isRoot;
17224        }
17225        Yt();
17226        var Xr = D.call(mt, mt.node);
17227        return Xr !== void 0 && mt.update && mt.update(Xr), wt.before && wt.before.call(mt, mt.node), xt && (typeof mt.node != "object" || mt.node === null || mt.circular || (ve.push(mt), Yt(), Wt(mt.keys, function(Zt, kr) {
17228          ce.push(Zt), wt.pre && wt.pre.call(mt, mt.node[Zt], Zt);
17229          var Ye = Pe(mt.node[Zt]);
17230          Z && mr.call(mt.node, Zt) && (mt.node[Zt] = Ye.node), Ye.isLast = kr == mt.keys.length - 1, Ye.isFirst = kr == 0, wt.post && wt.post.call(mt, Ye), ce.pop();
17231        }), ve.pop()), wt.after && wt.after.call(mt, mt.node)), mt;
17232      }(T).node;
17233    }
17234    function it(T) {
17235      if (typeof T == "object" && T !== null) {
17236        var D;
17237        if (dr(T)) D = [];
17238        else if (zt(T) === "[object Date]") D = new Date(T.getTime ? T.getTime() : T);
17239        else if (function(ve) {
17240          return zt(ve) === "[object RegExp]";
17241        }(T)) D = new RegExp(T);
17242        else if (function(ve) {
17243          return zt(ve) === "[object Error]";
17244        }(T)) D = { message: T.message };
17245        else if (function(ve) {
17246          return zt(ve) === "[object Boolean]";
17247        }(T)) D = new Boolean(T);
17248        else if (function(ve) {
17249          return zt(ve) === "[object Number]";
17250        }(T)) D = new Number(T);
17251        else if (function(ve) {
17252          return zt(ve) === "[object String]";
17253        }(T)) D = new String(T);
17254        else if (Object.create && Object.getPrototypeOf) D = Object.create(Object.getPrototypeOf(T));
17255        else if (T.constructor === Object) D = {};
17256        else {
17257          var Z = T.constructor && T.constructor.prototype || T.__proto__ || {}, ce = function() {
17258          };
17259          ce.prototype = Z, D = new ce();
17260        }
17261        return Wt(Pt(T), function(ve) {
17262          D[ve] = T[ve];
17263        }), D;
17264      }
17265      return T;
17266    }
17267    Le.prototype.get = function(T) {
17268      for (var D = this.value, Z = 0; Z < T.length; Z++) {
17269        var ce = T[Z];
17270        if (!D || !mr.call(D, ce)) {
17271          D = void 0;
17272          break;
17273        }
17274        D = D[ce];
17275      }
17276      return D;
17277    }, Le.prototype.has = function(T) {
17278      for (var D = this.value, Z = 0; Z < T.length; Z++) {
17279        var ce = T[Z];
17280        if (!D || !mr.call(D, ce)) return !1;
17281        D = D[ce];
17282      }
17283      return !0;
17284    }, Le.prototype.set = function(T, D) {
17285      for (var Z = this.value, ce = 0; ce < T.length - 1; ce++) {
17286        var ve = T[ce];
17287        mr.call(Z, ve) || (Z[ve] = {}), Z = Z[ve];
17288      }
17289      return Z[T[ce]] = D, D;
17290    }, Le.prototype.map = function(T) {
17291      return Re(this.value, T, !0);
17292    }, Le.prototype.forEach = function(T) {
17293      return this.value = Re(this.value, T, !1), this.value;
17294    }, Le.prototype.reduce = function(T, D) {
17295      var Z = arguments.length === 1, ce = Z ? this.value : D;
17296      return this.forEach(function(ve) {
17297        this.isRoot && Z || (ce = T.call(this, ce, ve));
17298      }), ce;
17299    }, Le.prototype.paths = function() {
17300      var T = [];
17301      return this.forEach(function(D) {
17302        T.push(this.path);
17303      }), T;
17304    }, Le.prototype.nodes = function() {
17305      var T = [];
17306      return this.forEach(function(D) {
17307        T.push(this.node);
17308      }), T;
17309    }, Le.prototype.clone = function() {
17310      var T = [], D = [];
17311      return function Z(ce) {
17312        for (var ve = 0; ve < T.length; ve++) if (T[ve] === ce) return D[ve];
17313        if (typeof ce == "object" && ce !== null) {
17314          var we = it(ce);
17315          return T.push(ce), D.push(we), Wt(Pt(ce), function(Pe) {
17316            we[Pe] = Z(ce[Pe]);
17317          }), T.pop(), D.pop(), we;
17318        }
17319        return ce;
17320      }(this.value);
17321    };
17322    var Pt = Object.keys || function(T) {
17323      var D = [];
17324      for (var Z in T) D.push(Z);
17325      return D;
17326    };
17327    function zt(T) {
17328      return Object.prototype.toString.call(T);
17329    }
17330    var dr = Array.isArray || function(T) {
17331      return Object.prototype.toString.call(T) === "[object Array]";
17332    }, Wt = function(T, D) {
17333      if (T.forEach) return T.forEach(D);
17334      for (var Z = 0; Z < T.length; Z++) D(T[Z], Z, T);
17335    };
17336    Wt(Pt(Le.prototype), function(T) {
17337      Be[T] = function(D) {
17338        var Z = [].slice.call(arguments, 1), ce = new Le(D);
17339        return ce[T].apply(ce, Z);
17340      };
17341    });
17342    var mr = Object.hasOwnProperty || function(T, D) {
17343      return D in T;
17344    }, gr = ie.exports, xn = yr;
17345    function yr(T) {
17346      if (!(this instanceof yr)) return new yr(T);
17347      this._bbox = T || [1 / 0, 1 / 0, -1 / 0, -1 / 0], this._valid = !!T;
17348    }
17349    yr.prototype.include = function(T) {
17350      return this._valid = !0, this._bbox[0] = Math.min(this._bbox[0], T[0]), this._bbox[1] = Math.min(this._bbox[1], T[1]), this._bbox[2] = Math.max(this._bbox[2], T[0]), this._bbox[3] = Math.max(this._bbox[3], T[1]), this;
17351    }, yr.prototype.equals = function(T) {
17352      var D;
17353      return D = T instanceof yr ? T.bbox() : T, this._bbox[0] == D[0] && this._bbox[1] == D[1] && this._bbox[2] == D[2] && this._bbox[3] == D[3];
17354    }, yr.prototype.center = function(T) {
17355      return this._valid ? [(this._bbox[0] + this._bbox[2]) / 2, (this._bbox[1] + this._bbox[3]) / 2] : null;
17356    }, yr.prototype.union = function(T) {
17357      var D;
17358      return this._valid = !0, D = T instanceof yr ? T.bbox() : T, this._bbox[0] = Math.min(this._bbox[0], D[0]), this._bbox[1] = Math.min(this._bbox[1], D[1]), this._bbox[2] = Math.max(this._bbox[2], D[2]), this._bbox[3] = Math.max(this._bbox[3], D[3]), this;
17359    }, yr.prototype.bbox = function() {
17360      return this._valid ? this._bbox : null;
17361    }, yr.prototype.contains = function(T) {
17362      if (!T) return this._fastContains();
17363      if (!this._valid) return null;
17364      var D = T[0], Z = T[1];
17365      return this._bbox[0] <= D && this._bbox[1] <= Z && this._bbox[2] >= D && this._bbox[3] >= Z;
17366    }, yr.prototype.intersect = function(T) {
17367      return this._valid ? (D = T instanceof yr ? T.bbox() : T, !(this._bbox[0] > D[2] || this._bbox[2] < D[0] || this._bbox[3] < D[1] || this._bbox[1] > D[3])) : null;
17368      var D;
17369    }, yr.prototype._fastContains = function() {
17370      if (!this._valid) return new Function("return null;");
17371      var T = "return " + this._bbox[0] + "<= ll[0] &&" + this._bbox[1] + "<= ll[1] &&" + this._bbox[2] + ">= ll[0] &&" + this._bbox[3] + ">= ll[1]";
17372      return new Function("ll", T);
17373    }, yr.prototype.polygon = function() {
17374      return this._valid ? { type: "Polygon", coordinates: [[[this._bbox[0], this._bbox[1]], [this._bbox[2], this._bbox[1]], [this._bbox[2], this._bbox[3]], [this._bbox[0], this._bbox[3]], [this._bbox[0], this._bbox[1]]]] } : null;
17375    };
17376    var lr = function(T) {
17377      if (!T) return [];
17378      var D = ne(H(T)), Z = [];
17379      return D.features.forEach(function(ce) {
17380        ce.geometry && (Z = Z.concat(de(ce.geometry.coordinates)));
17381      }), Z;
17382    }, Pr = gr, an = xn, Bn = { features: ["FeatureCollection"], coordinates: ["Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon"], geometry: ["Feature"], geometries: ["GeometryCollection"] }, Xn = Object.keys(Bn);
17383    function Jn(T) {
17384      for (var D = an(), Z = lr(T), ce = 0; ce < Z.length; ce++) D.include(Z[ce]);
17385      return D;
17386    }
17387    le.exports = function(T) {
17388      return Jn(T).bbox();
17389    }, le.exports.polygon = function(T) {
17390      return Jn(T).polygon();
17391    }, le.exports.bboxify = function(T) {
17392      return Pr(T).map(function(D) {
17393        D && Xn.some(function(Z) {
17394          return !!D[Z] && Bn[Z].indexOf(D.type) !== -1;
17395        }) && (D.bbox = Jn(D).bbox(), this.update(D));
17396      });
17397    };
17398    var Ko = l(le.exports), Mr = -90;
17399    function Aa(T, D) {
17400      var Z = Mr, ce = 90, ve = Mr, we = 90, Pe = 270, tt = -270;
17401      T.forEach(function(wt) {
17402        var xt = Ko(wt), mt = xt[1], Yt = xt[3], Xr = xt[0], Zt = xt[2];
17403        mt > Z && (Z = mt), Yt < ce && (ce = Yt), Yt > ve && (ve = Yt), mt < we && (we = mt), Xr < Pe && (Pe = Xr), Zt > tt && (tt = Zt);
17404      });
17405      var ht = D;
17406      return Z + ht.lat > 85 && (ht.lat = 85 - Z), ve + ht.lat > 90 && (ht.lat = 90 - ve), ce + ht.lat < -85 && (ht.lat = -85 - ce), we + ht.lat < Mr && (ht.lat = Mr - we), Pe + ht.lng <= -270 && (ht.lng += 360 * Math.ceil(Math.abs(ht.lng) / 360)), tt + ht.lng >= 270 && (ht.lng -= 360 * Math.ceil(Math.abs(ht.lng) / 360)), ht;
17407    }
17408    function Ca(T, D) {
17409      var Z = Aa(T.map(function(ce) {
17410        return ce.toGeoJSON();
17411      }), D);
17412      T.forEach(function(ce) {
17413        var ve, we = ce.getCoordinates(), Pe = function(ht) {
17414          var wt = { lng: ht[0] + Z.lng, lat: ht[1] + Z.lat };
17415          return [wt.lng, wt.lat];
17416        }, tt = function(ht) {
17417          return ht.map(function(wt) {
17418            return Pe(wt);
17419          });
17420        };
17421        ce.type === ee.POINT ? ve = Pe(we) : ce.type === ee.LINE_STRING || ce.type === ee.MULTI_POINT ? ve = we.map(Pe) : ce.type === ee.POLYGON || ce.type === ee.MULTI_LINE_STRING ? ve = we.map(tt) : ce.type === ee.MULTI_POLYGON && (ve = we.map(function(ht) {
17422          return ht.map(function(wt) {
17423            return tt(wt);
17424          });
17425        })), ce.incomingCoords(ve);
17426      });
17427    }
17428    var zr = { onSetup: function(T) {
17429      var D = this, Z = { dragMoveLocation: null, boxSelectStartLocation: null, boxSelectElement: void 0, boxSelecting: !1, canBoxSelect: !1, dragMoving: !1, canDragMove: !1, initiallySelectedFeatureIds: T.featureIds || [] };
17430      return this.setSelected(Z.initiallySelectedFeatureIds.filter(function(ce) {
17431        return D.getFeature(ce) !== void 0;
17432      })), this.fireActionable(), this.setActionableState({ combineFeatures: !0, uncombineFeatures: !0, trash: !0 }), Z;
17433    }, fireUpdate: function() {
17434      this.map.fire(Ce.UPDATE, { action: ge.MOVE, features: this.getSelected().map(function(T) {
17435        return T.toGeoJSON();
17436      }) });
17437    }, fireActionable: function() {
17438      var T = this, D = this.getSelected(), Z = D.filter(function(tt) {
17439        return T.isInstanceOf("MultiFeature", tt);
17440      }), ce = !1;
17441      if (D.length > 1) {
17442        ce = !0;
17443        var ve = D[0].type.replace("Multi", "");
17444        D.forEach(function(tt) {
17445          tt.type.replace("Multi", "") !== ve && (ce = !1);
17446        });
17447      }
17448      var we = Z.length > 0, Pe = D.length > 0;
17449      this.setActionableState({ combineFeatures: ce, uncombineFeatures: we, trash: Pe });
17450    }, getUniqueIds: function(T) {
17451      return T.length ? T.map(function(D) {
17452        return D.properties.id;
17453      }).filter(function(D) {
17454        return D !== void 0;
17455      }).reduce(function(D, Z) {
17456        return D.add(Z), D;
17457      }, new Ie()).values() : [];
17458    }, stopExtendedInteractions: function(T) {
17459      T.boxSelectElement && (T.boxSelectElement.parentNode && T.boxSelectElement.parentNode.removeChild(T.boxSelectElement), T.boxSelectElement = null), this.map.dragPan.enable(), T.boxSelecting = !1, T.canBoxSelect = !1, T.dragMoving = !1, T.canDragMove = !1;
17460    }, onStop: function() {
17461      mn.enable(this);
17462    }, onMouseMove: function(T, D) {
17463      return or(D) && T.dragMoving && this.fireUpdate(), this.stopExtendedInteractions(T), !0;
17464    }, onMouseOut: function(T) {
17465      return !T.dragMoving || this.fireUpdate();
17466    } };
17467    zr.onTap = zr.onClick = function(T, D) {
17468      return We(D) ? this.clickAnywhere(T, D) : Nt(X.VERTEX)(D) ? this.clickOnVertex(T, D) : or(D) ? this.clickOnFeature(T, D) : void 0;
17469    }, zr.clickAnywhere = function(T) {
17470      var D = this, Z = this.getSelectedIds();
17471      Z.length && (this.clearSelectedFeatures(), Z.forEach(function(ce) {
17472        return D.doRender(ce);
17473      })), mn.enable(this), this.stopExtendedInteractions(T);
17474    }, zr.clickOnVertex = function(T, D) {
17475      this.changeMode(ue.DIRECT_SELECT, { featureId: D.featureTarget.properties.parent, coordPath: D.featureTarget.properties.coord_path, startPos: D.lngLat }), this.updateUIClasses({ mouse: J.MOVE });
17476    }, zr.startOnActiveFeature = function(T, D) {
17477      this.stopExtendedInteractions(T), this.map.dragPan.disable(), this.doRender(D.featureTarget.properties.id), T.canDragMove = !0, T.dragMoveLocation = D.lngLat;
17478    }, zr.clickOnFeature = function(T, D) {
17479      var Z = this;
17480      mn.disable(this), this.stopExtendedInteractions(T);
17481      var ce = Cr(D), ve = this.getSelectedIds(), we = D.featureTarget.properties.id, Pe = this.isSelected(we);
17482      if (!ce && Pe && this.getFeature(we).type !== ee.POINT) return this.changeMode(ue.DIRECT_SELECT, { featureId: we });
17483      Pe && ce ? (this.deselect(we), this.updateUIClasses({ mouse: J.POINTER }), ve.length === 1 && mn.enable(this)) : !Pe && ce ? (this.select(we), this.updateUIClasses({ mouse: J.MOVE })) : Pe || ce || (ve.forEach(function(tt) {
17484        return Z.doRender(tt);
17485      }), this.setSelected(we), this.updateUIClasses({ mouse: J.MOVE })), this.doRender(we);
17486    }, zr.onMouseDown = function(T, D) {
17487      return Gt(D) ? this.startOnActiveFeature(T, D) : this.drawConfig.boxSelect && Dt(D) ? this.startBoxSelect(T, D) : void 0;
17488    }, zr.startBoxSelect = function(T, D) {
17489      this.stopExtendedInteractions(T), this.map.dragPan.disable(), T.boxSelectStartLocation = kt(D.originalEvent, this.map.getContainer()), T.canBoxSelect = !0;
17490    }, zr.onTouchStart = function(T, D) {
17491      if (Gt(D)) return this.startOnActiveFeature(T, D);
17492    }, zr.onDrag = function(T, D) {
17493      return T.canDragMove ? this.dragMove(T, D) : this.drawConfig.boxSelect && T.canBoxSelect ? this.whileBoxSelect(T, D) : void 0;
17494    }, zr.whileBoxSelect = function(T, D) {
17495      T.boxSelecting = !0, this.updateUIClasses({ mouse: J.ADD }), T.boxSelectElement || (T.boxSelectElement = document.createElement("div"), T.boxSelectElement.classList.add(R.BOX_SELECT), this.map.getContainer().appendChild(T.boxSelectElement));
17496      var Z = kt(D.originalEvent, this.map.getContainer()), ce = Math.min(T.boxSelectStartLocation.x, Z.x), ve = Math.max(T.boxSelectStartLocation.x, Z.x), we = Math.min(T.boxSelectStartLocation.y, Z.y), Pe = Math.max(T.boxSelectStartLocation.y, Z.y), tt = "translate(" + ce + "px, " + we + "px)";
17497      T.boxSelectElement.style.transform = tt, T.boxSelectElement.style.WebkitTransform = tt, T.boxSelectElement.style.width = ve - ce + "px", T.boxSelectElement.style.height = Pe - we + "px";
17498    }, zr.dragMove = function(T, D) {
17499      T.dragMoving = !0, D.originalEvent.stopPropagation();
17500      var Z = { lng: D.lngLat.lng - T.dragMoveLocation.lng, lat: D.lngLat.lat - T.dragMoveLocation.lat };
17501      Ca(this.getSelected(), Z), T.dragMoveLocation = D.lngLat;
17502    }, zr.onTouchEnd = zr.onMouseUp = function(T, D) {
17503      var Z = this;
17504      if (T.dragMoving) this.fireUpdate();
17505      else if (T.boxSelecting) {
17506        var ce = [T.boxSelectStartLocation, kt(D.originalEvent, this.map.getContainer())], ve = this.featuresAt(null, ce, "click"), we = this.getUniqueIds(ve).filter(function(Pe) {
17507          return !Z.isSelected(Pe);
17508        });
17509        we.length && (this.select(we), we.forEach(function(Pe) {
17510          return Z.doRender(Pe);
17511        }), this.updateUIClasses({ mouse: J.MOVE }));
17512      }
17513      this.stopExtendedInteractions(T);
17514    }, zr.toDisplayFeatures = function(T, D, Z) {
17515      D.properties.active = this.isSelected(D.properties.id) ? ye.ACTIVE : ye.INACTIVE, Z(D), this.fireActionable(), D.properties.active === ye.ACTIVE && D.geometry.type !== ee.POINT && Bi(D).forEach(Z);
17516    }, zr.onTrash = function() {
17517      this.deleteFeature(this.getSelectedIds()), this.fireActionable();
17518    }, zr.onCombineFeatures = function() {
17519      var T = this.getSelected();
17520      if (!(T.length === 0 || T.length < 2)) {
17521        for (var D = [], Z = [], ce = T[0].type.replace("Multi", ""), ve = 0; ve < T.length; ve++) {
17522          var we = T[ve];
17523          if (we.type.replace("Multi", "") !== ce) return;
17524          we.type.includes("Multi") ? we.getCoordinates().forEac
17524h(function(tt) {
17525            D.push(tt);
17526          }) : D.push(we.getCoordinates()), Z.push(we.toGeoJSON());
17527        }
17528        if (Z.length > 1) {
17529          var Pe = this.newFeature({ type: ee.FEATURE, properties: Z[0].properties, geometry: { type: "Multi" + ce, coordinates: D } });
17530          this.addFeature(Pe), this.deleteFeature(this.getSelectedIds(), { silent: !0 }), this.setSelected([Pe.id]), this.map.fire(Ce.COMBINE_FEATURES, { createdFeatures: [Pe.toGeoJSON()], deletedFeatures: Z });
17531        }
17532        this.fireActionable();
17533      }
17534    }, zr.onUncombineFeatures = function() {
17535      var T = this, D = this.getSelected();
17536      if (D.length !== 0) {
17537        for (var Z = [], ce = [], ve = function(Pe) {
17538          var tt = D[Pe];
17539          T.isInstanceOf("MultiFeature", tt) && (tt.getFeatures().forEach(function(ht) {
17540            T.addFeature(ht), ht.properties = tt.properties, Z.push(ht.toGeoJSON()), T.select([ht.id]);
17541          }), T.deleteFeature(tt.id, { silent: !0 }), ce.push(tt.toGeoJSON()));
17542        }, we = 0; we < D.length; we++) ve(we);
17543        Z.length > 1 && this.map.fire(Ce.UNCOMBINE_FEATURES, { createdFeatures: Z, deletedFeatures: ce }), this.fireActionable();
17544      }
17545    };
17546    var mi = Nt(X.VERTEX), fu = Nt(X.MIDPOINT), Nn = { fireUpdate: function() {
17547      this.map.fire(Ce.UPDATE, { action: ge.CHANGE_COORDINATES, features: this.getSelected().map(function(T) {
17548        return T.toGeoJSON();
17549      }) });
17550    }, fireActionable: function(T) {
17551      this.setActionableState({ combineFeatures: !1, uncombineFeatures: !1, trash: T.selectedCoordPaths.length > 0 });
17552    }, startDragging: function(T, D) {
17553      this.map.dragPan.disable(), T.canDragMove = !0, T.dragMoveLocation = D.lngLat;
17554    }, stopDragging: function(T) {
17555      this.map.dragPan.enable(), T.dragMoving = !1, T.canDragMove = !1, T.dragMoveLocation = null;
17556    }, onVertex: function(T, D) {
17557      this.startDragging(T, D);
17558      var Z = D.featureTarget.properties, ce = T.selectedCoordPaths.indexOf(Z.coord_path);
17559      Cr(D) || ce !== -1 ? Cr(D) && ce === -1 && T.selectedCoordPaths.push(Z.coord_path) : T.selectedCoordPaths = [Z.coord_path];
17560      var ve = this.pathsToCoordinates(T.featureId, T.selectedCoordPaths);
17561      this.setSelectedCoordinates(ve);
17562    }, onMidpoint: function(T, D) {
17563      this.startDragging(T, D);
17564      var Z = D.featureTarget.properties;
17565      T.feature.addCoordinate(Z.coord_path, Z.lng, Z.lat), this.fireUpdate(), T.selectedCoordPaths = [Z.coord_path];
17566    }, pathsToCoordinates: function(T, D) {
17567      return D.map(function(Z) {
17568        return { feature_id: T, coord_path: Z };
17569      });
17570    }, onFeature: function(T, D) {
17571      T.selectedCoordPaths.length === 0 ? this.startDragging(T, D) : this.stopDragging(T);
17572    }, dragFeature: function(T, D, Z) {
17573      Ca(this.getSelected(), Z), T.dragMoveLocation = D.lngLat;
17574    }, dragVertex: function(T, D, Z) {
17575      for (var ce = T.selectedCoordPaths.map(function(tt) {
17576        return T.feature.getCoordinate(tt);
17577      }), ve = Aa(ce.map(function(tt) {
17578        return { type: ee.FEATURE, properties: {}, geometry: { type: ee.POINT, coordinates: tt } };
17579      }), Z), we = 0; we < ce.length; we++) {
17580        var Pe = ce[we];
17581        T.feature.updateCoordinate(T.selectedCoordPaths[we], Pe[0] + ve.lng, Pe[1] + ve.lat);
17582      }
17583    }, clickNoTarget: function() {
17584      this.changeMode(ue.SIMPLE_SELECT);
17585    }, clickInactive: function() {
17586      this.changeMode(ue.SIMPLE_SELECT);
17587    }, clickActiveFeature: function(T) {
17588      T.selectedCoordPaths = [], this.clearSelectedCoordinates(), T.feature.changed();
17589    }, onSetup: function(T) {
17590      var D = T.featureId, Z = this.getFeature(D);
17591      if (!Z) throw new Error("You must provide a featureId to enter direct_select mode");
17592      if (Z.type === ee.POINT) throw new TypeError("direct_select mode doesn't handle point features");
17593      var ce = { featureId: D, feature: Z, dragMoveLocation: T.startPos || null, dragMoving: !1, canDragMove: !1, selectedCoordPaths: T.coordPath ? [T.coordPath] : [] };
17594      return this.setSelectedCoordinates(this.pathsToCoordinates(D, ce.selectedCoordPaths)), this.setSelected(D), mn.disable(this), this.setActionableState({ trash: !0 }), ce;
17595    }, onStop: function() {
17596      mn.enable(this), this.clearSelectedCoordinates();
17597    }, toDisplayFeatures: function(T, D, Z) {
17598      T.featureId === D.properties.id ? (D.properties.active = ye.ACTIVE, Z(D), Bi(D, { map: this.map, midpoints: !0, selectedPaths: T.selectedCoordPaths }
17598).forEach(Z)) : (D.properties.active = ye.INACTIVE, Z(D)), this.fireActionable(T);
17599    }, onTrash: function(T) {
17600      T.selectedCoordPaths.sort(function(D, Z) {
17601        return Z.localeCompare(D, "en", { numeric: !0 });
17602      }).forEach(function(D) {
17603        return T.feature.removeCoordinate(D);
17604      }), this.fireUpdate(), T.selectedCoordPaths = [], this.clearSelectedCoordinates(), this.fireActionable(T), T.feature.isValid() === !1 && (this.deleteFeature([T.featureId]), this.changeMode(ue.SIMPLE_SELECT, {}));
17605    }, onMouseMove: function(T, D) {
17606      var Z = Gt(D), ce = mi(D), ve = fu(D), we = T.selectedCoordPaths.length === 0;
17607      return Z && we || ce && !we ? this.updateUIClasses({ mouse: J.MOVE }) : this.updateUIClasses({ mouse: J.NONE }), (ce || Z || ve) && T.dragMoving && this.fireUpdate(), this.stopDragging(T), !0;
17608    }, onMouseOut: function(T) {
17609      return T.dragMoving && this.fireUpdate(), !0;
17610    } };
17611    Nn.onTouchStart = Nn.onMouseDown = function(T, D) {
17612      return mi(D) ? this.onVertex(T, D) : Gt(D) ? this.onFeature(T, D) : fu(D) ? this.onMidpoint(T, D) : void 0;
17613    }, Nn.onDrag = function(T, D) {
17614      if (T.canDragMove === !0) {
17615        T.dragMoving = !0, D.originalEvent.stopPropagation();
17616        var Z = { lng: D.lngLat.lng - T.dragMoveLocation.lng, lat: D.lngLat.lat - T.dragMoveLocation.lat };
17617        T.selectedCoordPaths.length > 0 ? this.dragVertex(T, D, Z) : this.dragFeature(T, D, Z), T.dragMoveLocation = D.lngLat;
17618      }
17619    }, Nn.onClick = function(T, D) {
17620      return We(D) ? this.clickNoTarget(T, D) : Gt(D) ? this.clickActiveFeature
17620(T, D) : sr(D) ? this.clickInactive(T, D) : void this.stopDragging(T);
17621    }, Nn.onTap = function(T, D) {
17622      return We(D) ? this.clickNoTarget(T, D) : Gt(D) ? this.clickActiveFeature(T, D) : sr(D) ? this.clickInactive(T, D) : void 0;
17623    }, Nn.onTouchEnd = Nn.onMouseUp = function(T) {
17624      T.dragMoving && this.fireUpdate(), this.stopDragging(T);
17625    };
17626    var Sn = {};
17627    function Ls(T, D) {
17628      return !!T.lngLat && T.lngLat.lng === D[0] && T.lngLat.lat === D[1];
17629    }
17630    Sn.onSetup = function() {
17631      var T = this.newFeature({ type: ee.FEATURE, properties: {}, geometry: { type: ee.POINT, coordinates: [] } });
17632      return this.addFeature(T), this.clearSelectedFeatures(), this.updateUIClasses({ mouse: J.ADD }), this.activateUIButton(K.POINT), this.setActionableState({ trash: !0 }), { point: T };
17633    }, Sn.stopDrawingAndRemove = function(T) {
17634      this.deleteFeature([T.point.id], { silent: !0 }), this.changeMode(ue.SIMPLE_SELECT);
17635    }, Sn.onTap = Sn.onClick = function(T, D) {
17636      this.updateUIClasses({ mouse: J.MOVE }), T.point.updateCoordinate("", D.lngLat.lng, D.lngLat.lat), this.map.fire(Ce.CREATE, { features: [T.point.toGeoJSON()] }), this.changeMode(ue.SIMPLE_SELECT, { featureIds: [T.point.id] });
17637    }, Sn.onStop = function(T) {
17638      this.activateUIButton(), T.point.getCoordinate().length || this.deleteFeature([T.point.id], { silent: !0 });
17639    }, Sn.toDisplayFeatures = function(T, D, Z) {
17640      var ce = D.properties.id === T.point.id;
17641      if (D.properties.active = ce ? ye.ACTIVE : ye.INACTIVE, !ce) return Z(D);
17642    }, Sn.onTrash = Sn.stopDrawingAndRemove, Sn.onKeyUp = function(T, D) {
17643      if (wn(D) || ut(D)) return this.stopDrawingAndRemove(T, D);
17644    };
17645    var Pi = { onSetup: function() {
17646      var T = this.newFeature({ type: ee.FEATURE, properties: {}, geometry: { type: ee.POLYGON, coordinates: [[]] } });
17647      return this.addFeature(T), this.clearSelectedFeatures(), mn.disable(this), this.updateUIClasses({ mouse: J.ADD }), this.activateUIButton(K.POLYGON), this.setActionableState({ trash: !0 }), { polygon: T, currentVertexPosition: 0 };
17648    }, clickAnywhere: function(T, D) {
17649      if (T.currentVertexPosition > 0 && Ls(D, T.polygon.coordinates[0][T.currentVertexPosition - 1])) return this.changeMode(ue.SIMPLE_SELECT, { featureIds: [T.polygon.id] });
17650      this.updateUIClasses({ mouse: J.ADD }), T.polygon.updateCoordinate("0." + T.currentVertexPosition, D.lngLat.lng, D.lngLat.lat), T.currentVertexPosition++, T.polygon.updateCoordinate("0." + T.currentVertexPosition, D.lngLat.lng, D.lngLat.lat);
17651    }, clickOnVertex: function(T) {
17652      return this.changeMode(ue.SIMPLE_SELECT, { featureIds: [T.polygon.id] });
17653    }, onMouseMove: function(T, D) {
17654      T.polygon.updateCoordinate("0." + T.currentVertexPosition, D.lngLat.lng, D.lngLat.lat), hr(D) && this.updateUIClasses({ mouse: J.POINTER });
17655    } };
17656    Pi.onTap = Pi.onClick = function(T, D) {
17657      return hr(D) ? this.clickOnVertex(T, D) : this.clickAnywhere(T, D);
17658    }, Pi.onKeyUp = function(T, D) {
17659      wn(D) ? (this.deleteFeature([T.polygon.id], { silent: !0 }), this.changeMode(ue.SIMPLE_SELECT)) : ut(D) && this.changeMode(ue.SIMPLE_SELECT, { featureIds: [T.polygon.id] });
17660    }, Pi.onStop = function(T) {
17661      this.updateUIClasses({ mouse: J.NONE }), mn.enable(this), this.activateUIButton(), this.getFeature(T.polygon.id) !== void 0 && (T.polygon.removeCoordinate("0." + T.currentVertexPosition), T.polygon.isValid() ? this.map.fire(Ce.CREATE, { features: [T.polygon.toGeoJSON()] }) : (this.deleteFeature([T.polygon.id], { silent: !0 }), this.changeMode(ue.SIMPLE_SELECT, {}, { silent: !0 })));
17662    }, Pi.toDisplayFeatures = function(T, D, Z) {
17663      var ce = D.properties.id === T.polygon.id;
17664      if (D.properties.active = ce ? ye.ACTIVE : ye.INACTIVE, !ce) return Z(D);
17665      if (D.geometry.coordinates.length !== 0) {
17666        var ve = D.geometry.coordinates[0].length;
17667        if (!(ve < 3)) {
17668          if (D.properties.meta = X.FEATURE, Z(zn(T.polygon.id, D.geometry.coordinates[0][0], "0.0", !1)), ve > 3) {
17669            var we = D.geometry.coordinates[0].length - 3;
17670            Z(zn(T.polygon.id, D.geometry.coordinates[0][we], "0." + we, !1));
17671          }
17672          if (ve <= 4) {
17673            var Pe = [[D.geometry.coordinates[0][0][0], D.geometry.coordinates[0][0][1]], [D.geometry.coordinates[0][1][0], D.geometry.coordinates[0][1][1]]];
17674            if (Z({ type: ee.FEATURE, properties: D.properties, geometry: { coordinates: Pe, type: ee.LINE_STRING } }), ve === 3) return;
17675          }
17676          return Z(D);
17677        }
17678      }
17679    }, Pi.onTrash = function(T) {
17680      this.deleteFeature([T.polygon.id], { silent: !0 }), this.changeMode(ue.SIMPLE_SELECT);
17681    };
17682    var rn = { onSetup: function(T) {
17683      var D, Z, ce = (T = T || {}).featureId, ve = "forward";
17684      if (ce) {
17685        if (!(D = this.getFeature(ce))) throw new Error("Could not find a feature with the provided featureId");
17686        var we = T.from;
17687        if (we && we.type === "Feature" && we.geometry && we.geometry.type === "Point" && (we = we.geometry), we && we.type === "Point" && we.coordinates && we.coordinates.length === 2 && (we = we.coordinates), !we || !Array.isArray(we)) throw new Error("Please use the `from` property to indicate which point to continue the line from");
17688        var Pe = D.coordinates.length - 1;
17689        if (D.coordinates[Pe][0] === we[0] && D.coordinates[Pe][1] === we[1]) Z = Pe + 1, D.addCoordinate.apply(D, [Z].concat(D.coordinates[Pe]));
17690        else {
17691          if (D.coordinates[0][0] !== we[0] || D.coordinates[0][1] !== we[1]) throw new Error("`from` should match the point at either the start or the end of the provided LineString");
17692          ve = "backwards", Z = 0, D.addCoordinate.apply(D, [Z].concat(D.coordinates[0]));
17693        }
17694      } else D = this.newFeature({ type: ee.FEATURE, properties: {}, geometry: { type: ee.LINE_STRING, coordinates: [] } }), Z = 0, this.addFeature(D);
17695      return this.clearSelectedFeatures(), mn.disable(this), this.updateUIClasses({ mouse: J.ADD }), this.activateUIButton(K.LINE), this.setActionableState({ trash: !0 }), { line: D, currentVertexPosition: Z, direction: ve };
17696    }, clickAnywhere: function(T, D) {
17697      if (T.currentVertexPosition > 0 && Ls(D, T.line.coordinates[T.currentVertexPosition - 1]) || T.direction === "backwards" && Ls(D, T.line.coordinates[T.currentVertexPosition + 1])) return this.changeMode(ue.SIMPLE_SELECT, { featureIds: [T.line.id] });
17698      this.updateUIClasses({ mouse: J.ADD }), T.line.updateCoordinate(T.currentVertexPosition, D.lngLat.lng, D.lngLat.lat), T.direction === "forward" ? (T.currentVertexPosition++, T.line.updateCoordinate(T.currentVertexPosition, D.lngLat.lng, D.lngLat.lat)) : T.line.addCoordinate(0, D.lngLat.lng, D.lngLat.lat);
17699    }, clickOnVertex: function(T) {
17700      return this.changeMode(ue.SIMPLE_SELECT, { featureIds: [T.line.id] });
17701    }, onMouseMove: function(T, D) {
17702      T.line.updateCoordinate(T.currentVertexPosition, D.lngLat.lng, D.lngLat.lat), hr(D) && this.updateUIClasses({ mouse: J.POINTER });
17703    } };
17704    rn.onTap = rn.onClick = function(T, D) {
17705      if (hr(D)) return this.clickOnVertex(T, D);
17706      this.clickAnywhere(T, D);
17707    }, rn.onKeyUp = function(T, D) {
17708      ut(D) ? this.changeMode(ue.SIMPLE_SELECT, { featureIds: [T.line.id] }) : wn(D) && (this.deleteFeature([T.line.id], { silent: !0 }), this.changeMode(ue.SIMPLE_SELECT));
17709    }, rn.onStop = function(T) {
17710      mn.enable(this), this.activateUIButton(), this.getFeature(T.line.id) !== void 0 && (T.line.removeCoordinate("" + T.currentVertexPosition), T.line.isValid() ? this.map.fire(Ce.CREATE, { features: [T.line.toGeoJSON()] }) : (this.deleteFeature([T.line.id], { silent: !0 }), this.changeMode(ue.SIMPLE_SELECT, {}, { silent: !0 })));
17711    }, rn.onTrash = function(T) {
17712      this.deleteFeature([T.line.id], { silent: !0 }), this.changeMode(ue.SIMPLE_SELECT);
17713    }, rn.toDisplayFeatures = function(T, D, Z) {
17714      var ce = D.properties.id === T.line.id;
17715      if (D.properties.active = ce ? ye.ACTIVE : ye.INACTIVE, !ce) return Z(D);
17716      D.geometry.coordinates.length < 2 || (D.properties.meta = X.FEATURE, Z(zn(T.line.id, D.geometry.coordinates[T.direction === "forward" ? D.geometry.coordinates.length - 2 : 1], "" + (T.direction === "forward" ? D.geometry.coordinates.length - 2 : 1), !1)), Z(D));
17717    };
17718    var Xo = { simple_select: zr, direct_select: Nn, draw_point: Sn, draw_polygon: Pi, draw_line_string: rn }, rs = { defaultMode: ue.SIMPLE_SELECT, keybindings: !0, touchEnabled: !0, clickBuffer: 2, touchBuffer: 25, boxSelect: !0, displayControlsDefault: !0, styles: Tt, modes: Xo, controls: {}, userProperties: !1 }, Cn = { point: !0, line_string: !0, polygon: !0, trash: !0, combine_features: !0, uncombine_features: !0 }, al = { point: !1, line_string: !1, polygon: !1, trash: !1, combine_features: !1, uncombine_features: !1 };
17719    function Ni(T, D) {
17720      return T.map(function(Z) {
17721        return Z.source ? Z : Qe(Z, { id: Z.id + "." + D, source: D === "hot" ? z.HOT : z.COLD });
17722      });
17723    }
17724    var Ia = { exports: {} };
17725    (function(T, D) {
17726      var Z = "__lodash_hash_undefined__", ce = 9007199254740991, ve = "[object Arguments]", we = "[object Array]", Pe = "[object Boolean]", tt = "[object Date]", ht = "[object Error]", wt = "[object Function]", xt = "[object Map]", mt = "[object Number]", Yt = "[object Object]", Xr = "[object Promise]", Zt = "[object RegExp]", kr = "[object Set]", Ye = "[object String]", Rt = "[object Symbol]", Rr = "[object WeakMap]", $n = "[object ArrayBuffer]", ln = "[object DataView]", uc = /^\[object .+?Constructor\]$/, pu = /^(?:0|[1-9]\d*)$/, nn = {};
17727      nn["[object Float32Array]"] = nn["[object Float64Array]"] = nn["[object Int8Array]"] = nn["[object Int16Array]"] = nn["[object Int32Array]"] = nn["[object Uint8Array]"] = nn["[object Uint8ClampedArray]"] = nn["[object Uint16Array]"] = nn["[object Uint32Array]"] = !0, nn[ve] = nn[we] = nn[$n] = nn[Pe] = nn[ln] = nn[tt] = nn[ht] = nn[wt] = nn[xt] = nn[mt] = nn[Yt] = nn[Zt] = nn[kr] = nn[Ye] = nn[Rr] = !1;
17728      var mu = typeof ps == "object" && ps && ps.Object === Object && ps, Nh = typeof self == "object" && self && self.Object === Object && self, ms = mu || Nh || Function("return this")(), Jo = D && !D.nodeType && D, cl = Jo && T && !T.nodeType && T, Pa = cl && cl.exports === Jo, Ma = Pa && mu.process, ul = function() {
17729        try {
17730          return Ma && Ma.binding && Ma.binding("util");
17731        } catch {
17732        }
17733      }(), ns = ul && ul.isTypedArray;
17734      function $h(be, Ue) {
17735        for (var bt = -1, qt = be == null ? 0 : be.length; ++bt < qt; ) if (Ue(be[bt], bt, be)) return !0;
17736        return !1;
17737      }
17738      function hc(be) {
17739        var Ue = -1, bt = Array(be.size);
17740        return be.forEach(function(qt, Vr) {
17741          bt[++Ue] = [Vr, qt];
17742        }), bt;
17743      }
17744      function Io(be) {
17745        var Ue = -1, bt = Array(be.size);
17746        return be.forEach(function(qt) {
17747          bt[++Ue] = qt;
17748        }), bt;
17749      }
17750      var Fs, Or, ka, jh = Array.prototype, Yo = Function.prototype, hl = Object.prototype, fl = ms["__core-js_shared__"], gu = Yo.toString, is = hl.hasOwnProperty, dl = (Fs = /[^.]+$/.exec(fl && fl.keys && fl.keys.IE_PROTO || "")) ? "Symbol(src)_1." + Fs : "", fc = hl.toString, yu = RegExp("^" + gu.call(is).replace(/[\\^$.*+?()[\]{}|]/g, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"), dc = Pa ? ms.Buffer : void 0, Oa = ms.Symbol, so = ms.Uint8Array, pc = hl.propertyIsEnumerable, Vh = jh.splice, oo = Oa ? Oa.toStringTag : void 0, Qo = Object.getOwnPropertySymbols, Uh = dc ? dc.isBuffer : void 0, pl = (Or = Object.keys, ka = Object, function(be) {
17751        return Or(ka(be));
17752      }), mc = ss(ms, "DataView"), Da = ss(ms, "Map"), ml = ss(ms, "Promise"), gl = ss(ms, "Set"), yl = ss(ms, "WeakMap"), Po = ss(Object, "create"), _u = $s(mc), _l = $s(Da), zs = $s(ml), gc = $s(gl), yc = $s(yl), vl = Oa ? Oa.prototype : void 0, ea = vl ? vl.valueOf : void 0;
17753      function Bs(be) {
17754        var Ue = -1, bt = be == null ? 0 : be.length;
17755        for (this.clear(); ++Ue < bt; ) {
17756          var qt = be[Ue];
17757          this.set(qt[0], qt[1]);
17758        }
17759      }
17760      function ii(be) {
17761        var Ue = -1, bt = be == null ? 0 : be.length;
17762        for (this.clear(); ++Ue < bt; ) {
17763          var qt = be[Ue];
17764          this.set(qt[0], qt[1]);
17765        }
17766      }
17767      function Ns(be) {
17768        var Ue = -1, bt = be == null ? 0 : be.length;
17769        for (this.clear(); ++Ue < bt; ) {
17770          var qt = be[Ue];
17771          this.set(qt[0], qt[1]);
17772        }
17773      }
17774      function bl(be) {
17775        var Ue = -1, bt = be == null ? 0 : be.length;
17776        for (this.__data__ = new Ns(); ++Ue < bt; ) this.add(be[Ue]);
17777      }
17778      function Gr(be) {
17779        var Ue = this.__data__ = new ii(be);
17780        this.size = Ue.size;
17781      }
17782      function qh(be, Ue) {
17783        var bt = co(be), qt = !bt && La(be), Vr = !bt && !qt && uo(be), br = !bt && !qt && !Vr && vc(be), cn = bt || qt || Vr || br, In = cn ? function(En, si) {
17784          for (var gi = -1, On = Array(En); ++gi < En; ) On[gi] = si(gi);
17785          return On;
17786        }(be.length, String) : [], Vi = In.length;
17787        for (var Tn in be) !is.call(be, Tn) || cn && (Tn == "length" || Vr && (Tn == "offset" || Tn == "parent") || br && (Tn == "buffer" || Tn == "byteLength" || Tn == "byteOffset") || _c(Tn, Vi)) || In.push(Tn);
17788        return In;
17789      }
17790      function cr(be, Ue) {
17791        for (var bt = be.length; bt--; ) if (lo(be[bt][0], Ue)) return bt;
17792        return -1;
17793      }
17794      function ao(be) {
17795        return be == null ? be === void 0 ? "[object Undefined]" : "[object Null]" : oo && oo in Object(be) ? function(Ue) {
17796          var bt = is.call(Ue, oo), qt = Ue[oo];
17797          try {
17798            Ue[oo] = void 0;
17799            var Vr = !0;
17800          } catch {
17801          }
17802          var br = fc.call(Ue);
17803          return Vr && (bt ? Ue[oo] = qt : delete Ue[oo]), br;
17804        }(be) : function(Ue) {
17805          return fc.call(Ue);
17806        }(be);
17807      }
17808      function Wr(be) {
17809        return _s(be) && ao(be) == ve;
17810      }
17811      function jr(be, Ue, bt, qt, Vr) {
17812        return be === Ue || (be == null || Ue == null || !_s(be) && !_s(Ue) ? be != be && Ue != Ue : function(br, cn, In, Vi, Tn, En) {
17813          var si = co(br), gi = co(cn), On = si ? we : ys(br), os = gi ? we : ys(cn), as = (On = On == ve ? Yt : On) == Yt, ho = (os = os 
17813== ve ? Yt : os) == Yt, js = On == os;
17814          if (js && uo(br)) {
17815            if (!uo(cn)) return !1;
17816            si = !0, as = !1;
17817          }
17818          if (js && !as) return En || (En = new Gr()), si || vc(br) ? ta(br, cn, In, Vi, Tn, En) : function(Ur, Br, po, Ui, Vn, Un, vs) {
17819            switch (po) {
17820              case ln:
17821                if (Ur.byteLength != Br.byteLength || Ur.byteOffset != Br.byteOffset) return !1;
17822                Ur = Ur.buffer, Br = Br.buffer;
17823              case $n:
17824                return !(Ur.byteLength != Br.byteLength || !Un(new so(Ur), new so(Br)));
17825              case Pe:
17826              case tt:
17827              case mt:
17828                return lo(+Ur, +Br);
17829              case ht:
17830                return Ur.name == Br.name && Ur.message == Br.message;
17831              case Zt:
17832              case Ye:
17833                return Ur == Br + "";
17834              case xt:
17835                var Vs = hc;
17836              case kr:
17837                var sn = 1 & Ui;
17838                if (Vs || (Vs = Io), Ur.size != Br.size && !sn) return !1;
17839                var yi = vs.get(Ur);
17840                if (yi) return yi == Br;
17841                Ui |= 2, vs.set(Ur, Br);
17842                var qn = ta(Vs(Ur), Vs(Br), Ui, Vn, Un, vs);
17843                return vs.delete(Ur), qn;
17844              case Rt:
17845                if (ea) return ea.call(Ur) == ea.call(Br);
17846            }
17847            return !1;
17848          }(br, cn, On, In, Vi, Tn, En);
17849          if (!(1 & In)) {
17850            var fo = as && is.call(br, "__wrapped__"), wl = ho && is.call(cn, "__wrapped__");
17851            if (fo || wl) {
17852              var Hh = fo ? br.value() : br, vu = wl ? cn.value() : cn;
17853              return En || (En = new Gr()), Tn(Hh, vu, In, Vi, En);
17854            }
17855          }
17856          return js ? (En || (En = new Gr()), function(Ur, Br, po, Ui, Vn, Un) {
17857            var vs = 1 & po, Vs = xl(Ur), sn = Vs.length, yi = xl(Br).length;
17858            if (sn != yi && !vs) return !1;
17859            for (var qn = sn; qn--; ) {
17860              var ls = Vs[qn];
17861              if (!(vs ? ls in Br : is.call(Br, ls))) return !1;
17862            }
17863            var Sl = Un.get(Ur);
17864            if (Sl && Un.get(Br)) return Sl == Br;
17865            var Oo = !0;
17866            Un.set(Ur, Br), Un.set(Br, Ur);
17867            for (var mo = vs; ++qn < sn; ) {
17868              var qi = Ur[ls = Vs[qn]], na = Br[ls];
17869              if (Ui) var za = vs ? Ui(na, qi, ls, Br, Ur, Un) : Ui(qi, na, ls, Ur, Br, Un);
17870              if (!(za === void 0 ? qi === na || Vn(qi, na, po, Ui, Un) : za)) {
17871                Oo = !1;
17872                break;
17873              }
17874              mo || (mo = ls == "constructor");
17875            }
17876            if (Oo && !mo) {
17877              var ia = Ur.constructor, Do = Br.constructor;
17878              ia == Do || !("constructor" in Ur) || !("constructor" in Br) || typeof ia == "function" && ia instanceof ia && typeof Do == "function" && Do instanceof Do || (Oo = !1);
17879            }
17880            return Un.delete(Ur), Un.delete(Br), Oo;
17881          }(br, cn, In, Vi, Tn, En)) : !1;
17882        }(be, Ue, bt, qt, jr, Vr));
17883      }
17884      function Mo(be) {
17885        return !(!ko(be) || function(Ue) {
17886          return !!dl && dl in Ue;
17887        }(be)) && (ra(be) ? yu : uc).test($s(be));
17888      }
17889      function Ra(be) {
17890        if (bt = (Ue = be) && Ue.constructor, qt = typeof bt == "function" && bt.prototype || hl, Ue !== qt) return pl(be);
17891        var Ue, bt, qt, Vr = [];
17892        for (var br in Object(be)) is.call(be, br) && br != "constructor" && Vr.push(br);
17893        return Vr;
17894      }
17895      function ta(be, Ue, bt, qt, Vr, br) {
17896        var cn = 1 & bt, In = be.length, Vi = Ue.length;
17897        if (In != Vi && !(cn && Vi > In)) return !1;
17898        var Tn = br.get(be);
17899        if (Tn && br.get(Ue)) return Tn == Ue;
17900        var En = -1, si = !0, gi = 2 & bt ? new bl() : void 0;
17901        for (br.set(be, Ue), br.set(Ue, be); ++En < In; ) {
17902          var On = be[En], os = Ue[En];
17903          if (qt) var as = cn ? qt(os, On, En, Ue, be, br) : qt(On, os, En, be, Ue, br);
17904          if (as !== void 0) {
17905            if (as) continue;
17906            si = !1;
17907            break;
17908          }
17909          if (gi) {
17910            if (!$h(Ue, function(ho, js) {
17911              if (fo = js, !gi.has(fo) && (On === ho || Vr(On, ho, bt, qt, br))) return gi.push(js);
17912              var fo;
17913            })) {
17914              si = !1;
17915              break;
17916            }
17917          } else if (On !== os && !Vr(On, os, bt, qt, br)) {
17918            si = !1;
17919            break;
17920          }
17921        }
17922        return br.delete(be), br.delete(Ue), si;
17923      }
17924      function xl(be) {
17925        return function(Ue, bt, qt) {
17926          var Vr = bt(Ue);
17927          return co(Ue) ? Vr : function(br, cn) {
17928            for (var In = -1, Vi = cn.length, Tn = br.length; ++In < Vi; ) br[Tn + In] = cn[In];
17929            return br;
17930          }(Vr, qt(Ue));
17931        }(be, bc, ji);
17932      }
17933      function gs(be, Ue) {
17934        var bt, qt, Vr = be.__data__;
17935        return ((qt = typeof (bt = Ue)) == "string" || qt == "number" || qt == "symbol" || qt == "boolean" ? bt !== "__proto__" : bt === null) ? Vr[typeof Ue == "string" ? "string" : "hash"] : Vr.map;
17936      }
17937      function ss(be, Ue) {
17938        var bt = function(qt, Vr) {
17939          return qt == null ? void 0 : qt[Vr];
17940        }(be, Ue);
17941        return Mo(bt) ? bt : void 0;
17942      }
17943      Bs.prototype.clear = function() {
17944        this.__data__ = Po ? Po(null) : {}, this.size = 0;
17945      }, Bs.prototype.delete = function(be) {
17946        var Ue = this.has(be) && delete this.__data__[be];
17947        return this.size -= Ue ? 1 : 0, Ue;
17948      }, Bs.prototype.get = function(be) {
17949        var Ue = this.__data__;
17950        if (Po) {
17951          var bt = Ue[be];
17952          return bt === Z ? void 0 : bt;
17953        }
17954        return is.call(Ue, be) ? Ue[be] : void 0;
17955      }, Bs.prototype.has = function(be) {
17956        var Ue = this.__data__;
17957        return Po ? Ue[be] !== void 0 : is.call(Ue, be);
17958      }, Bs.prototype.set = function(be, Ue) {
17959        var bt = this.__data__;
17960        return this.size += this.has(be) ? 0 : 1, bt[be] = Po && Ue === void 0 ? Z : Ue, this;
17961      }, ii.prototype.clear = function() {
17962        this.__data__ = [], this.size = 0;
17963      }, ii.prototype.delete = function(be) {
17964        var Ue = this.__data__, bt = cr(Ue, be);
17965        return !(bt < 0) && (bt == Ue.length - 1 ? Ue.pop() : Vh.call(Ue, bt, 1), --this.size, !0);
17966      }, ii.prototype.get = function(be) {
17967        var Ue = this.__data__, bt = cr(Ue, be);
17968        return bt < 0 ? void 0 : Ue[bt][1];
17969      }, ii.prototype.has = function(be) {
17970        return cr(this.__data__, be) > -1;
17971      }, ii.prototype.set = function(be, Ue) {
17972        var bt = this.__data__, qt = cr(bt, be);
17973        return qt < 0 ? (++this.size, bt.push([be, Ue])) : bt[qt][1] = Ue, this;
17974      }, Ns.prototype.clear = function() {
17975        this.size = 0, this.__data__ = { hash: new Bs(), map: new (Da || ii)(), string: new Bs() };
17976      }, Ns.prototype.delete = function(be) {
17977        var Ue = gs(this, be).delete(be);
17978        return this.size -= Ue ? 1 : 0, Ue;
17979      }, Ns.prototype.get = function(be) {
17980        return gs(this, be).get(be);
17981      }, Ns.prototype.has = function(be) {
17982        return gs(this, be).has(be);
17983      }, Ns.prototype.set = function(be, Ue) {
17984        var bt = gs(this, be), qt = bt.size;
17985        return bt.set(be, Ue), this.size += bt.size == qt ? 0 : 1, this;
17986      }, bl.prototype.add = bl.prototype.push = function(be) {
17987        return this.__data__.set(be, Z), this;
17988      }, bl.prototype.has = function(be) {
17989        return this.__data__.has(be);
17990      }, Gr.prototype.clear = function() {
17991        this.__data__ = new ii(), this.size = 0;
17992      }, Gr.prototype.delete = function(be) {
17993        var Ue = this.__data__, bt = Ue.delete(be);
17994        return this.size = Ue.size, bt;
17995      }, Gr.prototype.get = function(be) {
17996        return this.__data__.get(be);
17997      }, Gr.prototype.has = function(be) {
17998        return this.__data__.has(be);
17999      }, Gr.prototype.set = function(be, Ue) {
18000        var bt = this.__data__;
18001        if (bt instanceof ii) {
18002          var qt = bt.__data__;
18003          if (!Da || qt.length < 199) return qt.push([be, Ue]), this.size = ++bt.size, this;
18004          bt = this.__data__ = new Ns(qt);
18005        }
18006        return bt.set(be, Ue), this.size = bt.size, this;
18007      };
18008      var ji = Qo ? function(be) {
18009        return be == null ? [] : (be = Object(be), function(Ue, bt) {
18010          for (var qt = -1, Vr = Ue == null ? 0 : Ue.length, br = 0, cn = []; ++qt < Vr; ) {
18011            var In = Ue[qt];
18012            bt(In, qt, Ue) && (cn[br++] = In);
18013          }
18014          return cn;
18015        }(Qo(be), function(Ue) {
18016          return pc.call(be, Ue);
18017        }));
18018      } : function() {
18019        return [];
18020      }, ys = ao;
18021      function _c(be, Ue) {
18022        return !!(Ue = Ue ?? ce) && (typeof be == "number" || pu.test(be)) && be > -1 && be % 1 == 0 && be < Ue;
18023      }
18024      function $s(be) {
18025        if (be != null) {
18026          try {
18027            return gu.call(be);
18028          } catch {
18029          }
18030          try {
18031            return be + "";
18032          } catch {
18033          }
18034        }
18035        return "";
18036      }
18037      function lo(be, Ue) {
18038        return be === Ue || be != be && Ue != Ue;
18039      }
18040      (mc && ys(new mc(new ArrayBuffer(1))) != ln || Da && ys(new Da()) != xt || ml && ys(ml.resolve()) != Xr || gl && ys(new gl()) != kr || yl && ys(new yl()) != Rr) && (ys = function(be) {
18041        var Ue = ao(be), bt = Ue == Yt ? be.constructor : void 0, qt = bt ? $s(bt) : "";
18042        if (qt) switch (qt) {
18043          case _u:
18044            return ln;
18045          case _l:
18046            return xt;
18047          case zs:
18048            return Xr;
18049          case gc:
18050            return kr;
18051          case yc:
18052            return Rr;
18053        }
18054        return Ue;
18055      });
18056      var La = Wr(/* @__PURE__ */ function() {
18057        return arguments;
18058      }()) ? Wr : function(be) {
18059        return _s(be) && is.call(be, "callee") && !pc.call(be, "callee");
18060      }, co = Array.isArray, uo = Uh || function() {
18061        return !1;
18062      };
18063      function ra(be) {
18064        if (!ko(be)) return !1;
18065        var Ue = ao(be);
18066        return Ue == wt || Ue == "[object GeneratorFunction]" || Ue == "[object AsyncFunction]" || Ue == "[object Proxy]";
18067      }
18068      function Fa(be) {
18069        return typeof be == "number" && be > -1 && be % 1 == 0 && be <= ce;
18070      }
18071      function ko(be) {
18072        var Ue = typeof be;
18073        return be != null && (Ue == "object" || Ue == "function");
18074      }
18075      function _s(be) {
18076        return be != null && typeof be == "object";
18077      }
18078      var vc = ns ? /* @__PURE__ */ function(be) {
18079        return function(Ue) {
18080          return be(Ue);
18081        };
18082      }(ns) : function(be) {
18083        return _s(be) && Fa(be.length) && !!nn[ao(be)];
18084      };
18085      function bc(be) {
18086        return (Ue = be) != null && Fa(Ue.length) && !ra(Ue) ? qh(be) : Ra(be);
18087        var Ue;
18088      }
18089      T.exports = function(be, Ue) {
18090        return jr(be, Ue);
18091      };
18092    })(Ia, Ia.exports);
18093    var $i = l(Ia.exports);
18094    function du(T, D) {
18095      return T.length === D.length && JSON.stringify(T.map(function(Z) {
18096        return Z;
18097      }).sort()) === JSON.stringify(D.map(function(Z) {
18098        return Z;
18099      }).sort());
18100    }
18101    var ll = { Polygon: Fr, LineString: $r, Point: en, MultiPolygon: tn, MultiLineString: tn, MultiPoint: tn }, Co = Object.freeze({ __proto__: null, CommonSelectors: er, constrainFeatureMovement: Aa, createMidPoint: zi, createSupplementaryPoints: Bi, createVertex: zn, doubleClickZoom: mn, euclideanDistance: ct, featuresAt: Xe, getFeatureAtAndSetCursors: Ge, isClick: ot, isEventAtCoordinates: Ls, isTap: Ht, mapEventToBoundingBox: He, ModeHandler: s, moveFeatures: Ca, sortFeatures: ze, stringSetsAreEqual: du, StringSet: Ie, theme: Tt, toDenseArray: Ee }), io = function(T, D) {
18102      var Z = { options: T = function(ve) {
18103        ve === void 0 && (ve = {});
18104        var we = Qe(ve);
18105        return ve.controls || (we.controls = {}), ve.displayControlsDefault === !1 ? we.controls = Qe(al, ve.controls) : we.controls = Qe(Cn, ve.controls), (we = Qe(rs, we)).styles = Ni(we.styles, "cold").concat(Ni(we.styles, "hot")), we;
18106      }(T) };
18107      D = function(ve, we) {
18108        return we.modes = ue, we.getFeatureIdsAt = function(Pe) {
18109          return Xe.click({ point: Pe }, null, ve).map(function(tt) {
18110            return tt.properties.id;
18111          });
18112        }, we.getSelectedIds = function() {
18113          return ve.store.getSelectedIds();
18114        }, we.getSelected = function() {
18115          return { type: ee.FEATURE_COLLECTION, features: ve.store.getSelectedIds().map(function(Pe) {
18116            return ve.store.get(Pe);
18117          }).map(function(Pe) {
18118            return Pe.toGeoJSON();
18119          }) };
18120        }, we.getSelectedPoints = function() {
18121          return { type: ee.FEATURE_COLLECTION, features: ve.store.getSelectedCoordinates().map(function(Pe) {
18122            return { type: ee.FEATURE, properties: {}, geometry: { type: ee.POINT, coordinates: Pe.coordinates } };
18123          }) };
18124        }, we.set = function(Pe) {
18125          if (Pe.type === void 0 || Pe.type !== ee.FEATURE_COLLECTION || !Array.isArray(Pe.features)) throw new Error("Invalid FeatureCollection");
18126          var tt = ve.store.createRenderBatch(), ht = ve.store.getAllIds().slice(), wt = we.add(Pe), xt = new Ie(wt);
18127          return (ht = ht.filter(function(mt) {
18128            return !xt.has(mt);
18129          })).length && we.delete(ht), tt(), wt;
18130        }, we.add = function(Pe) {
18131          var tt = JSON.parse(JSON.stringify(M(Pe))).features.map(function(ht) {
18132            if (ht.id = ht.id || ur(), ht.geometry === null) throw new Error("Invalid geometry: null");
18133            if (ve.store.get(ht.id) === void 0 || ve.store.get(ht.id).type !== ht.geometry.type) {
18134              var wt = ll[ht.geometry.type];
18135              if (wt === void 0) throw new Error("Invalid geometry type: " + ht.geometry.type + ".");
18136              var xt = new wt(ve, ht);
18137              ve.store.add(xt);
18138            } else {
18139              var mt = ve.store.get(ht.id);
18140              mt.properties = ht.properties, $i(mt.properties, ht.properties) || ve.store.featureChanged(mt.id), $i(mt.getCoordinates(), ht.geometry.coordinates) || mt.incomingCoords(ht.geometry.coordinates);
18141            }
18142            return ht.id;
18143          });
18144          return ve.store.render(), tt;
18145        }, we.get = function(Pe) {
18146          var tt = ve.store.get(Pe);
18147          if (tt) return tt.toGeoJSON();
18148        }, we.getAll = function() {
18149          return { type: ee.FEATURE_COLLECTION, features: ve.store.getAll().map(function(Pe) {
18150            return Pe.toGeoJSON();
18151          }) };
18152        }, we.delete = function(Pe) {
18153          return ve.store.delete(Pe, { silent: !0 }), we.getMode() !== ue.DIRECT_SELECT || ve.store.getSelectedIds().length ? ve.store.render() : ve.events.changeMode(ue.SIMPLE_SELECT, void 0, { silent: !0 }), we;
18154        }, we.deleteAll = function() {
18155          return ve.store.delete(ve.store.getAllIds(), { silent: !0 }), we.getMode() === ue.DIRECT_SELECT ? ve.events.changeMode(ue.SIMPLE_SELECT, void 0, { silent: !0 }) : ve.store.render(), we;
18156        }, we.changeMode = function(Pe, tt) {
18157          return tt === void 0 && (tt = {}), Pe === ue.SIMPLE_SELECT && we.getMode() === ue.SIMPLE_SELECT ? (du(tt.featureIds || [], ve.store.getSelectedIds()) || (ve.store.setSelected(tt.featureIds, { silent: !0 }), ve.store.render()), we) : (Pe === ue.DIRECT_SELECT && we.getMode() === ue.DIRECT_SELECT && tt.featureId === ve.store.getSelectedIds()[0] || ve.events.changeMode(Pe, tt, { silent: !0 }), we);
18158        }, we.getMode = function() {
18159          return ve.events.getMode();
18160        }, we.trash = function() {
18161          return ve.events.trash({ silent: !0 }), we;
18162        }, we.combineFeatures = function() {
18163          return ve.events.combineFeatures({ silent: !0 }), we;
18164        }, we.uncombineFeatures = function() {
18165          return ve.events.uncombineFeatures({ silent: !0 }), we;
18166        }, we.setFeatureProperty = function(Pe, tt, ht) {
18167          return ve.store.setFeatureProperty(Pe, tt, ht), we;
18168        }, we;
18169      }(Z, D), Z.api = D;
18170      var ce = nt(Z);
18171      return D.onAdd = ce.onAdd, D.onRemove = ce.onRemove, D.types = 
18171K, D.options = T, D;
18172    };
18173    function wr(T) {
18174      io(T, this);
18175    }
18176    return wr.modes = Xo, wr.constants = je, wr.lib = Co, wr;
18177  });
18178})(qP);
18179var HH = qP.exports;
18180const AX = /* @__PURE__ */ xa(HH);
18181var HP = { exports: {} };
18182/**
18183 * MapLibre GL JS
18184 * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt
18185 */
18186(function(e, t) {
18187  (function(s, l) {
18188    e.exports = l();
18189  })(ps, function() {
18190    var s = {}, l = {};
18191    function h(m, c, w) {
18192      if (l[m] = w, m === "index") {
18193        var O = "var sharedModule = {}; (" + l.shared + ")(sharedModule); (" + l.worker + ")(sharedModule);", P = {};
18194        return l.shared(P), l.index(s, P), typeof window < "u" && s.setWorkerUrl(window.URL.createObjectURL(new Blob([O], { type: "text/javascript" }))), s;
18195      }
18196    }
18197    h("shared", ["exports"], function(m) {
18198      function c(i, n, o, u) {
18199        return new (o || (o = Promise))(function(p, v) {
18200          function b(k) {
18201            try {
18202              E(u.next(k));
18203            } catch (L) {
18204              v(L);
18205            }
18206          }
18207          function x(k) {
18208            try {
18209              E(u.throw(k));
18210            } catch (L) {
18211              v(L);
18212            }
18213          }
18214          function E(k) {
18215            var L;
18216            k.done ? p(k.value) : (L = k.value, L instanceof o ? L : new o(function(B) {
18217              B(L);
18218            })).then(b, x);
18219          }
18220          E((u = u.apply(i, n || [])).next());
18221        });
18222      }
18223      function w(i) {
18224        return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
18225      }
18226      typeof SuppressedError == "function" && SuppressedError;
18227      var O = P;
18228      function P(i, n) {
18229        this.x = i, this.y = n;
18230      }
18231      P.prototype = { clone: function() {
18232        return new P(this.x, this.y);
18233      }, add: function(i) {
18234        return this.clone()._add(i);
18235      }, sub: function(i) {
18236        return this.clone()._sub(i);
18237      }, multByPoint: function(i) {
18238        return this.clone()._multByPoint(i);
18239      }, divByPoint: function(i) {
18240        return this.clone()._divByPoint(i);
18241      }, mult: function(i) {
18242        return this.clone()._mult(i);
18243      }, div: function(i) {
18244        return this.clone()._div(i);
18245      }, rotate: function(i) {
18246        return this.clone()._rotate(i);
18247      }, rotateAround: function(i, n) {
18248        return this.clone()._rotateAround(i, n);
18249      }, matMult: function(i) {
18250        return this.clone()._matMult(i);
18251      }, unit: function() {
18252        return this.clone()._unit();
18253      }, perp: function() {
18254        return this.clone()._perp();
18255      }, round: function() {
18256        return this.clone()._round();
18257      }, mag: function() {
18258        return Math.sqrt(this.x * this.x + this.y * this.y);
18259      }, equals: function(i) {
18260        return this.x === i.x && this.y === i.y;
18261      }, dist: function(i) {
18262        return Math.sqrt(this.distSqr(i));
18263      }, distSqr: function(i) {
18264        var n = i.x - this.x, o = i.y - this.y;
18265        return n * n + o * o;
18266      }, angle: function() {
18267        return Math.atan2(this.y, this.x);
18268      }, angleTo: function(i) {
18269        return Math.atan2(this.y - i.y, this.x - i.x);
18270      }, angleWith: function(i) {
18271        return this.angleWithSep(i.x, i.y);
18272      }, angleWithSep: function(i, n) {
18273        return Math.atan2(this.x * n - this.y * i, this.x * i + this.y * n);
18274      }, _matMult: function(i) {
18275        var n = i[2] * this.x + i[3] * this.y;
18276        return this.x = i[0] * this.x + i[1] * this.y, this.y = n, this;
18277      }, _add: function(i) {
18278        return this.x += i.x, this.y += i.y, this;
18279      }, _sub: function(i) {
18280        return this.x -= i.x, this.y -= i.y, this;
18281      }, _mult: function(i) {
18282        return this.x *= i, this.y *= i, this;
18283      }, _div: function(i) {
18284        return this.x /= i, this.y /= i, this;
18285      }, _multByPoint: function(i) {
18286        return this.x *= i.x, this.y *= i.y, this;
18287      }, _divByPoint: function(i) {
18288        return this.x /= i.x, this.y /= i.y, this;
18289      }, _unit: function() {
18290        return this._div(this.mag()), this;
18291      }, _perp: function() {
18292        var i = this.y;
18293        return this.y = this.x, this.x = -i, this;
18294      }, _rotate: function(i) {
18295        var n = Math.cos(i), o = Math.sin(i), u = o * this.x + n * this.y;
18296        return this.x = n * this.x - o * this.y, this.y = u, this;
18297      }
vendor: 14,566 bytes, lines 18297-18542
18297, _rotateAround: function(i, n) {
18298        var o = Math.cos(i), u = Math.sin(i), p = n.y + u * (this.x - n.x) + o * (this.y - n.y);
18299        return this.x = n.x + o * (this.x - n.x) - u * (this.y - n.y), this.y = p, this;
18300      }, _round: function() {
18301        return this.x = Math.round(this.x), this.y = Math.round(this.y), this;
18302      } }, P.convert = function(i) {
18303        return i instanceof P ? i : Array.isArray(i) ? new P(i[0], i[1]) : i;
18304      };
18305      var R = w(O), z = J;
18306      function J(i, n, o, u) {
18307        this.cx = 3 * i, this.bx = 3 * (o - i) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * n, this.by = 3 * (u - n) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = i, this.p1y = n, this.p2x = o, this.p2y = u;
18308      }
18309      J.prototype = { sampleCurveX: function(i) {
18310        return ((this.ax * i + this.bx) * i + this.cx) * i;
18311      }, sampleCurveY: function(i) {
18312        return ((this.ay * i + this.by) * i + this.cy) * i;
18313      }, sampleCurveDerivativeX: function(i) {
18314        return (3 * this.ax * i + 2 * this.bx) * i + this.cx;
18315      }, solveCurveX: function(i, n) {
18316        if (n === void 0 && (n = 1e-6), i < 0) return 0;
18317        if (i > 1) return 1;
18318        for (var o = i, u = 0; u < 8; u++) {
18319          var p = this.sampleCurveX(o) - i;
18320          if (Math.abs(p) < n) return o;
18321          var v = this.sampleCurveDerivativeX(o);
18322          if (Math.abs(v) < 1e-6) break;
18323          o -= p / v;
18324        }
18325        var b = 0, x = 1;
18326        for (o = i, u = 0; u < 20 && (p = this.sampleCurveX(o), !(Math.abs(p - i) < n)); u++) i > p ? b = o : x = o, o = 0.5 * (x - b) + b;
18327        return o;
18328      }, solve: function(i, n) {
18329        return this.sampleCurveY(this.solveCurveX(i, n));
18330      } };
18331      var K = w(z);
18332      let ee, ue;
18333      function Ce() {
18334        return ee == null && (ee = typeof OffscreenCanvas < "u" && new OffscreenCanvas(1, 1).getContext("2d") && typeof createImageBitmap == "function"), ee;
18335      }
18336      function ge() {
18337        if (ue == null && (ue = !1, Ce())) {
18338          const n = new OffscreenCanvas(5, 5).getContext("2d", { willReadFrequently: !0 });
18339          if (n) {
18340            for (let u = 0; u < 5 * 5; u++) {
18341              const p = 4 * u;
18342              n.fillStyle = `rgb(${p},${p + 1},${p + 2})`, n.fillRect(u % 5, Math.floor(u / 5), 1, 1);
18343            }
18344            const o = n.getImageData(0, 0, 5, 5).data;
18345            for (let u = 0; u < 5 * 5 * 4; u++) if (u % 4 != 3 && o[u] !== u) {
18346              ue = !0;
18347              break;
18348            }
18349          }
18350        }
18351        return ue || !1;
18352      }
18353      function X(i, n, o, u) {
18354        const p = new K(i, n, o, u);
18355        return (v) => p.solve(v);
18356      }
18357      const ye = X(0.25, 0.1, 0.25, 1);
18358      function Ae(i, n, o) {
18359        return Math.min(o, Math.max(n, i));
18360      }
18361      function Se(i, n, o) {
18362        const u = o - n, p = ((i - n) % u + u) % u + n;
18363        return p === n ? o : p;
18364      }
18365      function je(i, ...n) {
18366        for (const o of n) for (const u in o) i[u] = o[u];
18367        return i;
18368      }
18369      let Ne = 1;
18370      function Oe(i, n, o) {
18371        const u = {};
18372        for (const p in i) u[p] = n.call(this, i[p], p, i);
18373        return u;
18374      }
18375      function ze(i, n, o) {
18376        const u = {};
18377        for (const p in i) n.call(this, i[p], p, i) && (u[p] = i[p]);
18378        return u;
18379      }
18380      function He(i) {
18381        return Array.isArray(i) ? i.map(He) : typeof i == "object" && i ? Oe(i, He) : i;
18382      }
18383      const Ie = {};
18384      function $e(i) {
18385        Ie[i] || (typeof console < "u" && console.warn(i), Ie[i] = !0);
18386      }
18387      function Xe(i, n, o) {
18388        return (o.y - i.y) * (n.x - i.x) > (n.y - i.y) * (o.x - i.x);
18389      }
18390      function st(i) {
18391        return typeof WorkerGlobalScope < "u" && i !== void 0 && i instanceof WorkerGlobalScope;
18392      }
18393      let Ge = null;
18394      function ct(i) {
18395        return typeof ImageBitmap < "u" && i instanceof ImageBitmap;
18396      }
18397      const ot = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";
18398      function Ht(i, n, o, u, p) {
18399        return c(this, void 0, void 0, function* () {
18400          if (typeof VideoFrame > "u") throw new Error("VideoFrame not supported");
18401          const v = new VideoFrame(i, { timestamp: 0 });
18402          try {
18403            const b = v == null ? void 0 : v.format;
18404            if (!b || !b.startsWith("BGR") && !b.startsWith("RGB")) throw new Error(`Unrecognized format ${b}`);
18405            const x = b.startsWith("BGR"), E = new Uint8ClampedArray(u * p * 4);
18406            if (yield v.copyTo(E, function(k, L, B, V, q) {
18407              const W = 4 * Math.max(-L, 0), Y = (Math.max(0, B) - B) * V * 4 + W, oe = 4 * V, he = Math.max(0, L), De = Math.max(0, B);
18408              return { rect: { x: he, y: De, width: Math.min(k.width, L + V) - he, height: Math.min(k.height, B + q) - De }, layout: [{ offset: Y, stride: oe }] };
18409            }(i, n, o, u, p)), x) for (let k = 0; k < E.length; k += 4) {
18410              const L = E[k];
18411              E[k] = E[k + 2], E[k + 2] = L;
18412            }
18413            return E;
18414          } finally {
18415            v.close();
18416          }
18417        });
18418      }
18419      let fr, Qt;
18420      const ur = "AbortError";
18421      function Ar() {
18422        return new Error(ur);
18423      }
18424      const en = { MAX_PARALLEL_IMAGE_REQUESTS: 16, MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME: 8, MAX_TILE_CACHE_ZOOM_LEVELS: 5, REGISTERED_PROTOCOLS: {}, WORKER_URL: "" };
18425      function $r(i) {
18426        return en.REGISTERED_PROTOCOLS[i.substring(0, i.indexOf("://"))];
18427      }
18428      const Fr = "global-dispatcher";
18429      class dn extends Error {
18430        constructor(n, o, u, p) {
18431          super(`AJAXError: ${o} (${n}): ${u}`), this.status = n, this.statusText = o, this.url = u, this.body = p;
18432        }
18433      }
18434      const kn = () => st(self) ? self.worker && self.worker.referrer : (window.location.protocol === "blob:" ? window.parent : window).location.href, tn = function(i, n) {
18435        if (/:\/\//.test(i.url) && !/^https?:|^file:/.test(i.url)) {
18436          const u = $r(i.url);
18437          if (u) return u(i, n);
18438          if (st(self) && self.worker && self.worker.actor) return self.worker.actor.sendAsync({ type: "GR", data: i, targetMapId: Fr }, n);
18439        }
18440        if (!(/^file:/.test(o = i.url) || /^file:/.test(kn()) && !/^\w+:/.test(o))) {
18441          if (fetch && Request && AbortController && Object.prototype.hasOwnProperty.call(Request.prototype, "signal")) return function(u, p) {
18442            return c(this, void 0, void 0, function* () {
18443              const v = new Request(u.url, { method: u.method || "GET", body: u.body, credentials: u.credentials, headers: u.headers, cache: u.cache, referrer: kn(), signal: p.signal });
18444              u.type !== "json" || v.headers.has("Accept") || v.headers.set("Accept", "application/json");
18445              const b = yield fetch(v);
18446              if (!b.ok) {
18447                const k = yield b.blob();
18448                throw new dn(b.status, b.statusText, u.url, k);
18449              }
18450              let x;
18451              x = u.type === "arrayBuffer" || u.type === "image" ? b.arrayBuffer() : u.type === "json" ? b.json() : b.text();
18452              const E = yield x;
18453              if (p.signal.aborted) throw Ar();
18454              return { data: E, cacheControl: b.headers.get("Cache-Control"), expires: b.headers.get("Expires") };
18455            });
18456          }(i, n);
18457          if (st(self) && self.worker && self.worker.actor) return self.worker.actor.sendAsync({ type: "GR", data: i, mustQueue: !0, targetMapId: Fr }, n);
18458        }
18459        var o;
18460        return function(u, p) {
18461          return new Promise((v, b) => {
18462            var x;
18463            const E = new XMLHttpRequest();
18464            E.open(u.method || "GET", u.url, !0), u.type !== "arrayBuffer" && u.type !== "image" || (E.responseType = "arraybuffer");
18465            for (const k in u.headers) E.setRequestHeader(k, u.headers[k]);
18466            u.type === "json" && (E.responseType = "text", !((x = u.headers) === null || x === void 0) && x.Accept || E.setRequestHeader("Accept", "application/json")), E.withCredentials = u.credentials === "include", E.onerror = () => {
18467              b(new Error(E.statusText));
18468            }, E.onload = () => {
18469              if (!p.signal.aborted) if ((E.status >= 200 && E.status < 300 || E.status === 0) && E.response !== null) {
18470                let k = E.response;
18471                if (u.type === "json") try {
18472                  k = JSON.parse(E.response);
18473                } catch (L) {
18474                  return void b(L);
18475                }
18476                v({ data: k, cacheControl: E.getResponseHeader("Cache-Control"), expires: E.getResponseHeader("Expires") });
18477              } else {
18478                const k = new Blob([E.response], { type: E.getResponseHeader("Content-Type") });
18479                b(new dn(E.status, E.statusText, u.url, k));
18480              }
18481            }, p.signal.addEventListener("abort", () => {
18482              E.abort(), b(Ar());
18483            }), E.send(u.body);
18484          });
18485        }(i, n);
18486      };
18487      function Jt(i) {
18488        if (!i || i.indexOf("://") <= 0 || i.indexOf("data:image/") === 0 || i.indexOf("blob:") === 0) return !0;
18489        const n = new URL(i), o = window.location;
18490        return n.protocol === o.protocol && n.host === o.host;
18491      }
18492      function Fi(i, n, o) {
18493        o[i] && o[i].indexOf(n) !== -1 || (o[i] = o[i] || [], o[i].push(n));
18494      }
18495      function Kn(i, n, o) {
18496        if (o && o[i]) {
18497          const u = o[i].indexOf(n);
18498          u !== -1 && o[i].splice(u, 1);
18499        }
18500      }
18501      class me {
18502        constructor(n, o = {}) {
18503          je(this, o), this.type = n;
18504        }
18505      }
18506      class Ee extends me {
18507        constructor(n, o = {}) {
18508          super("error", je({ error: n }, o));
18509        }
18510      }
18511      class Ze {
18512        on(n, o) {
18513          return this._listeners = this._listeners || {}, Fi(n, o, this._listeners), this;
18514        }
18515        off(n, o) {
18516          return Kn(n, o, this._listeners), Kn(n, o, this._oneTimeListeners), this;
18517        }
18518        once(n, o) {
18519          return o ? (this._oneTimeListeners = this._oneTimeListeners || {}, Fi(n, o, this._oneTimeListeners), this) : new Promise((u) => this.once(n, u));
18520        }
18521        fire(n, o) {
18522          typeof n == "string" && (n = new me(n, o || {}));
18523          const u = n.type;
18524          if (this.listens(u)) {
18525            n.target = this;
18526            const p = this._listeners && this._listeners[u] ? this._listeners[u].slice() : [];
18527            for (const x of p) x.call(this, n);
18528            const v = this._oneTimeListeners && this._oneTimeListeners[u] ? this._oneTimeListeners[u].slice() : [];
18529            for (const x of v) Kn(u, x, this._oneTimeListeners), x.call(this, n);
18530            const b = this._eventedParent;
18531            b && (je(n, typeof this._eventedParentData == "function" ? this._eventedParentData() : this._eventedParentData), b.fire(n));
18532          } else n instanceof Ee && console.error(n.error);
18533          return this;
18534        }
18535        listens(n) {
18536          return this._listeners && this._listeners[n] && this._listeners[n].length > 0 || this._oneTimeListeners && this._oneTimeListeners[n] && this._oneTimeListeners[n].length > 0 || this._eventedParent && this._eventedParent.listens(n);
18537        }
18538        setEventedParent(n, o) {
18539          return this._eventedParent = n, this._eventedParentData = o, this;
18540        }
18541      }
18542      var re = { $version: 8, $root: { version: { required: !0, type: "enum", values: [8] }, name: { type: "string" }, metadata: { type: "*" }, center: { type: "array", value: "number" }, zoom: { type: "number" }, bearing: { type: "number", default: 0, period: 360, units: "degrees" }, pitch: { type: "number", default: 0, units: "degrees" }, light: { type: "light" }, sky: { type: "sky" }, projection: { type: "projection" }, terrain: { type: "terrain" }, sources: { required: !0, type: "sources" }, sprite: { type: "sprite" }, glyphs: { type: "string" }, transition: { type: "transition" }, layers: { required: !0, type: "array", value: "layer" } }, sources: { "*": { type: "source" } }, source: ["source_vector", "source_raster", "source_raster_dem", "source_geojson", "source_video", "source_image"], source_vector: { type: { required: !0, type: "enum", values: { vector: {} } }, url: { type: "string" }, tiles: { type: "array", value: "string" }, bounds: { type: "array", value: "number", length: 4, default: [-180, -85.051129, 180, 85.051129] }, scheme: { type: "enum", values: { xyz: {}, tms: {} }, default: "xyz" }, minzoom: { type: "number", default: 0 }, maxzoom: { type: "number", default: 22 }, attribution: { type: "string" }, promoteId: { type: "promoteId" }, volatile: { type: "boolean", default: !1 }, "*": { type: "*" } }, source_raster: { type: { required: !0, type: "enum", values: { raster: {} } }, url: { type: "string" }, tiles: { type: "array", value: "string" }, bounds: { type: "array", value: "number", length: 4, default: [-180, -85.051129, 180, 85.051129] }, minzoom: { type: "number", default: 0 }, maxzoom: { type: "number", default: 22 }, tileSize: { type: "number", default: 512, units: "pixels" }, scheme: { type: "enum", values: { xyz: {}, tms: {} }, default: "xyz" }, attribution: { type: "string" }, volatile: { type: "boolean", default: !1 }, "*": { type: "*" } }, source_raster_dem: { type: { required: !0, type: "enum", values: { "raster-dem": {} } }, url: { type: "string" }, tiles: { type: "array", value: "string" }, bounds: { type: "array", value: "number", length: 4, default: [-180, -85.051129, 180, 85.051129] }, minzoom: { type: "number", default: 0 }, maxzoom: { type: "number", default: 22 }, tileSize: { type: "number", default: 512, units: "pixels" }, attribution: { type: "string" }, encoding: { type: "enum", values: { terrarium: {}, mapbox: {}, custom: {} }, default: "mapbox" }, redFactor: { type: "number", default: 1 }, blueFactor: { type: "number", default: 1 }, greenFactor: { type: "number", default: 1 }, baseShift: { type: "number", default: 0 }, volatile: { type: "boolean", default: !1 }, "*": { type: "*" } }, source_geojson: { type: { required: !0, type: "enum", values: { geojson: {} } }, data: { required: !0, type: "*" }, maxzoom: { type: "number", default: 18 }, attribution: { type: "string" }, buffer: { type: "number", default: 128, maximum: 512, minimum: 0 }, filter: { type: "*" }, tolerance: { type: "number", default: 0.375 }, cluster: { type: "boolean", default: !1 }, clusterRadius: { type: "number", default: 50, minimum: 0 }
vendor: 1,364 bytes, line 18542
18542, clusterMaxZoom: { type: "number" }, clusterMinPoints: { type: "number" }, clusterProperties: { type: "*" }, lineMetrics: { type: "boolean", default: !1 }, generateId: { type: "boolean", default: !1 }, promoteId: { type: "promoteId" } }, source_video: { type: { required: !0, type: "enum", values: { video: {} } }, urls: { required: !0, type: "array", value: "string" }, coordinates: { required: !0, type: "array", length: 4, value: { type: "array", length: 2, value: "number" } } }, source_image: { type: { required: !0, type: "enum", values: { image: {} } }, url: { required: !0, type: "string" }, coordinates: { required: !0, type: "array", length: 4, value: { type: "array", length: 2, value: "number" } } }, layer: { id: { type: "string", required: !0 }, type: { type: "enum", values: { fill: {}, line: {}, symbol: {}, circle: {}, heatmap: {}, "fill-extrusion": {}, raster: {}, hillshade: {}, background: {} }, required: !0 }, metadata: { type: "*" }, source: { type: "string" }, "source-layer": { type: "string" }, minzoom: { type: "number", minimum: 0, maximum: 24 }, maxzoom: { type: "number", minimum: 0, maximum: 24 }, filter: { type: "filter" }, layout: { type: "layout" }, paint: { type: "paint" } }, layout: ["layout_fill", "layout_line", "layout_circle", "layout_heatmap", "layout_fill-extrusion", "layout_symbol", "layout_raster", "layout_hillshade
vendor: 11,919 bytes, line 18542
18542", "layout_background"], layout_background: { visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, layout_fill: { "fill-sort-key": { type: "number", expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, layout_circle: { "circle-sort-key": { type: "number", expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, layout_heatmap: { visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, "layout_fill-extrusion": { visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, layout_line: { "line-cap": { type: "enum", values: { butt: {}, round: {}, square: {} }, default: "butt", expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "line-join": { type: "enum", values: { bevel: {}, round: {}, miter: {} }, default: "miter", expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "line-miter-limit": { type: "number", default: 2, requires: [{ "line-join": "miter" }], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "line-round-limit": { type: "number", default: 1.05, requires: [{ "line-join": "round" }], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "line-sort-key": { type: "number", expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, layout_symbol: { "symbol-placement": { type: "enum", values: { point: {}, line: {}, "line-center": {} }, default: "point", expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "symbol-spacing": { type: "number", default: 250, minimum: 1, units: "pixels", requires: [{ "symbol-placement": "line" }], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "symbol-avoid-edges": { type: "boolean", default: !1, expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "symbol-sort-key": { type: "number", expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "symbol-z-order": { type: "enum", values: { auto: {}, "viewport-y": {}, source: {} }, default: "auto", expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-allow-overlap": { type: "boolean", default: !1, requires: ["icon-image", { "!": "icon-overlap" }], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-overlap": { type: "enum", values: { never: {}, always: {}, cooperative: {} }, requires: ["icon-image"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-ignore-placement": { type: "boolean", default: !1, requires: ["icon-image"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-optional": { type: "boolean", default: !1, requires: ["icon-image", "text-field"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-rotation-alignment": { type: "enum", values: { map: {}, viewport: {}, auto: {} }, default: "auto", requires: ["icon-image"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-size": { type: "number", default: 1, minimum: 0, units: "factor of the original icon size", requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "icon-text-fit": { type: "enum", values: { none: {}, width: {}, height: {}, both: {} }, default: "none", requires: ["icon-image", "text-field"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-text-fit-padding": { type: "array", value: "number", length: 4, default: [0, 0, 0, 0], units: "pixels", requires: ["icon-image", "text-field", { "icon-text-fit": ["both", "width", "height"] }], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-image": { type: "resolvedImage", tokens: !0, expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "icon-rotate": { type: "number", default: 0, period: 360, units: "degrees", requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "icon-padding": { type: "padding", default: [2], units: "pixels", requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "icon-keep-upright": { type: "boolean", default: !1, requires: ["icon-image", { "icon-rotation-alignment": "map" }, { "symbol-placement": ["line", "line-center"] }], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-offset": { type: "array", value: "number", length: 2, default: [0, 0], requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "icon-anchor": { type: "enum", values: { center: {}, left: {}, right: {}, top: {}, bottom: {}, "top-left": {}, "top-right": {}, "bottom-left": {}, "bottom-right": {} }, default: "center", requires: ["icon-image"], expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "icon-pitch-alignment": { type: "enum", values: { map: {}, viewport: {}, auto: {} }, default: "auto", requires: ["icon-image"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-pitch-alignment": { type: "enum", values: { map: {}, viewport: {}, auto: {} }, default: "auto", requires: ["text-field"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-rotation-alignment": { type: "enum", values: { map: {}, viewport: {}, "viewport-glyph": {}, auto: {} }, default: "auto", requires: ["text-field"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-field": { type: "formatted", default: "", tokens: !0, expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-font": { type: "array", value: "string", default: ["Open Sans Regular", "Arial Unicode MS Regular"], requires: ["text-field"], expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-size": { type: "number", default: 16, minimum: 0, units: "pixels", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-max-width": { type: "number", default: 10, minimum: 0, units: "ems", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-line-height": { type: "number", default: 1.2, units: "ems", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-letter-spacing": { type: "number", default: 0, units: "ems", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-justify": { type: "enum", values: { auto: {}, left: {}, center: {}, right: {} }, default: "center", requires: ["text-field"], expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-radial-offset": { type: "number", units: "ems", default: 0, requires: ["text-field"], "property-type": "data-driven", expression: { interpolated: !0, parameters: ["zoom", "feature"] } }, "text-variable-anchor": { type: "array", value: "enum", values: { center: {}, left: {}, right: {}, top: {}, bottom: {}, "top-left": {}, "top-right": {}, "bottom-left": {}, "bottom-right": {} }, requires: ["text-field", { "symbol-placement": ["point"] }], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-variable-anchor-offset": { type: "variableAnchorOffsetCollection", requires: ["text-field", { "symbol-placement": ["point"] }], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-anchor": { type: "enum", values: { center: {}, left: {}, right: {}, top: {}, bottom: {}, "top-left": {}, "top-right": {}, "bottom-left": {}, "bottom-right": {} }, default: "center", requires: ["text-field", { "!": "text-variable-anchor" }], expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-max-angle": { type: "number", default: 45, units: "degrees", requires: ["text-field", { "symbol-placement": ["line", "line-center"] }], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-writing-mode": { type: "array", value: "enum", values: { horizontal: {}, vertical: {} }, requires: ["text-field", { "symbol-placement": ["point"] }], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-rotate": { type: "number", default: 0, period: 360, units: "degrees", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-padding": { type: "number", default: 2, minimum: 0, units: "pixels", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-keep-upright": { type: "boolean", default: !0, requires: ["text-field", { "text-rotation-alignment": "map" }, { "symbol-placement": ["line", "line-center"] }], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-transform": { type: "enum", values: { none: {}, uppercase: {}, lowercase: {} }, default: "none", requires: ["text-field"], expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-offset": { type: "array", value: "number", units: "ems", length: 2, default: [0, 0], requires: ["text-field", { "!": "text-radial-offset" }], expression: { interpolated: !0, parameters: ["zoom", "feature"] }, "property-type": "data-driven" }, "text-allow-overlap": { type: "boolean", default: !1, requires: ["text-field", { "!": "text-overlap" }], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-overlap": { type: "enum", values: { never: {}, always: {}, cooperative: {} }, requires: ["text-field"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-ignore-placement": { type: "boolean", default: !1, requires: ["text-field"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-optional": { type: "boolean", default: !1, requires: ["text-field", "icon-image"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, layout_raster: { visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, layout_hillshade: { visibility: { type: "enum", values: { visible: {}, none: {} }, default: "visible", "property-type": "constant" } }, 
vendor: 3,880 bytes, line 18542
18542filter: { type: "array", value: "*" }, filter_operator: { type: "enum", values: { "==": {}, "!=": {}, ">": {}, ">=": {}, "<": {}, "<=": {}, in: {}, "!in": {}, all: {}, any: {}, none: {}, has: {}, "!has": {} } }, geometry_type: { type: "enum", values: { Point: {}, LineString: {}, Polygon: {} } }, function: { expression: { type: "expression" }, stops: { type: "array", value: "function_stop" }, base: { type: "number", default: 1, minimum: 0 }, property: { type: "string", default: "$zoom" }, type: { type: "enum", values: { identity: {}, exponential: {}, interval: {}, categorical: {} }, default: "exponential" }, colorSpace: { type: "enum", values: { rgb: {}, lab: {}, hcl: {} }, default: "rgb" }, default: { type: "*", required: !1 } }, function_stop: { type: "array", minimum: 0, maximum: 24, value: ["number", "color"], length: 2 }, expression: { type: "array", value: "*", minimum: 1 }, light: { anchor: { type: "enum", default: "viewport", values: { map: {}, viewport: {} }, "property-type": "data-constant", transition: !1, expression: { interpolated: !1, parameters: ["zoom"] } }, position: { type: "array", default: [1.15, 210, 30], length: 3, value: "number", "property-type": "data-constant", transition: !0, expression: { interpolated: !0, parameters: ["zoom"] } }, color: { type: "color", "property-type": "data-constant", default: "#ffffff", expression: { interpolated: !0, parameters: ["zoom"] }, transition: !0 }, intensity: { type: "number", "property-type": "data-constant", default: 0.5, minimum: 0, maximum: 1, expression: { interpolated: !0, parameters: ["zoom"] }, transition: !0 } }, sky: { "sky-color": { type: "color", "property-type": "data-constant", default: "#88C6FC", expression: { interpolated: !0, parameters: ["zoom"] }, transition: !0 }, "horizon-color": { type: "color", "property-type": "data-constant", default: "#ffffff", expression: { interpolated: !0, parameters: ["zoom"] }, transition: !0 }, "fog-color": { type: "color", "property-type": "data-constant", default: "#ffffff", expression: { interpolated: !0, parameters: ["zoom"] }, transition: !0 }, "fog-ground-blend": { type: "number", "property-type": "data-constant", default: 0.5, minimum: 0, maximum: 1, expression: { interpolated: !0, parameters: ["zoom"] }, transition: !0 }, "horizon-fog-blend": { type: "number", "property-type": "data-constant", default: 0.8, minimum: 0, maximum: 1, expression: { interpolated: !0, parameters: ["zoom"] }, transition: !0 }, "sky-horizon-blend": { type: "number", "property-type": "data-constant", default: 0.8, minimum: 0, maximum: 1, expression: { interpolated: !0, parameters: ["zoom"] }, transition: !0 }, "atmosphere-blend": { type: "number", "property-type": "data-constant", default: 0.8, minimum: 0, maximum: 1, expression: { interpolated: !0, parameters: ["zoom"] }, transition: !0 } }, terrain: { source: { type: "string", required: !0 }, exaggeration: { type: "number", minimum: 0, default: 1 } }, projection: { type: { type: "enum", default: "mercator", values: { mercator: {}, globe: {} } } }, paint: ["paint_fill", "paint_line", "paint_circle", "paint_heatmap", "paint_fill-extrusion", "paint_symbol", "paint_raster", "paint_hillshade", "paint_background"], paint_fill: { "fill-antialias": { type: "boolean", default: !0, expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "fill-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "fill-color": { type: "color", default: "#000000", transition: !0, requires: [{ "!": "fill-pattern" }], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "fill-outline-color": { type: "color", transition: !0, requires: [{ "!": "fill-pattern" }
vendor: 133,010 bytes, lines 18542-20946
18542, { "fill-antialias": !0 }], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "fill-translate": { type: "array", value: "number", length: 2, default: [0, 0], transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "fill-translate-anchor": { type: "enum", values: { map: {}, viewport: {} }, default: "map", requires: ["fill-translate"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "fill-pattern": { type: "resolvedImage", transition: !0, expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "cross-faded-data-driven" } }, "paint_fill-extrusion": { "fill-extrusion-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "fill-extrusion-color": { type: "color", default: "#000000", transition: !0, requires: [{ "!": "fill-extrusion-pattern" }], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "fill-extrusion-translate": { type: "array", value: "number", length: 2, default: [0, 0], transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "fill-extrusion-translate-anchor": { type: "enum", values: { map: {}, viewport: {} }, default: "map", requires: ["fill-extrusion-translate"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "fill-extrusion-pattern": { type: "resolvedImage", transition: !0, expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "cross-faded-data-driven" }, "fill-extrusion-height": { type: "number", default: 0, minimum: 0, units: "meters", transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "fill-extrusion-base": { type: "number", default: 0, minimum: 0, units: "meters", transition: !0, requires: ["fill-extrusion-height"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "fill-extrusion-vertical-gradient": { type: "boolean", default: !0, transition: !1, expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" } }, paint_line: { "line-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "line-color": { type: "color", default: "#000000", transition: !0, requires: [{ "!": "line-pattern" }], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "line-translate": { type: "array", value: "number", length: 2, default: [0, 0], transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "line-translate-anchor": { type: "enum", values: { map: {}, viewport: {} }, default: "map", requires: ["line-translate"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "line-width": { type: "number", default: 1, minimum: 0, transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "line-gap-width": { type: "number", default: 0, minimum: 0, transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "line-offset": { type: "number", default: 0, transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "line-blur": { type: "number", default: 0, minimum: 0, transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "line-dasharray": { type: "array", value: "number", minimum: 0, transition: !0, units: "line widths", requires: [{ "!": "line-pattern" }], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "cross-faded" }, "line-pattern": { type: "resolvedImage", transition: !0, expression: { interpolated: !1, parameters: ["zoom", "feature"] }, "property-type": "cross-faded-data-driven" }, "line-gradient": { type: "color", transition: !1, requires: [{ "!": "line-dasharray" }, { "!": "line-pattern" }, { source: "geojson", has: { lineMetrics: !0 } }], expression: { interpolated: !0, parameters: ["line-progress"] }, "property-type": "color-ramp" } }, paint_circle: { "circle-radius": { type: "number", default: 5, minimum: 0, transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "circle-color": { type: "color", default: "#000000", transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "circle-blur": { type: "number", default: 0, transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "circle-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "circle-translate": { type: "array", value: "number", length: 2, default: [0, 0], transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "circle-translate-anchor": { type: "enum", values: { map: {}, viewport: {} }, default: "map", requires: ["circle-translate"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "circle-pitch-scale": { type: "enum", values: { map: {}, viewport: {} }, default: "map", expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "circle-pitch-alignment": { type: "enum", values: { map: {}, viewport: {} }, default: "viewport", expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "circle-stroke-width": { type: "number", default: 0, minimum: 0, transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "circle-stroke-color": { type: "color", default: "#000000", transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "circle-stroke-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" } }, paint_heatmap: { "heatmap-radius": { type: "number", default: 30, minimum: 1, transition: !0, units: "pixels", expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "heatmap-weight": { type: "number", default: 1, minimum: 0, transition: !1, expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "heatmap-intensity": { type: "number", default: 1, minimum: 0, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "heatmap-color": { type: "color", default: ["interpolate", ["linear"], ["heatmap-density"], 0, "rgba(0, 0, 255, 0)", 0.1, "royalblue", 0.3, "cyan", 0.5, "lime", 0.7, "yellow", 1, "red"], transition: !1, expression: { interpolated: !0, parameters: ["heatmap-density"] }, "property-type": "color-ramp" }, "heatmap-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" } }, paint_symbol: { "icon-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "icon-color": { type: "color", default: "#000000", transition: !0, requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "icon-halo-color": { type: "color", default: "rgba(0, 0, 0, 0)", transition: !0, requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "icon-halo-width": { type: "number", default: 0, minimum: 0, transition: !0, units: "pixels", requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "icon-halo-blur": { type: "number", default: 0, minimum: 0, transition: !0, units: "pixels", requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "icon-translate": { type: "array", value: "number", length: 2, default: [0, 0], transition: !0, units: "pixels", requires: ["icon-image"], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "icon-translate-anchor": { type: "enum", values: { map: {}, viewport: {} }, default: "map", requires: ["icon-image", "icon-translate"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "text-color": { type: "color", default: "#000000", transition: !0, overridable: !0, requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "text-halo-color": { type: "color", default: "rgba(0, 0, 0, 0)", transition: !0, requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "text-halo-width": { type: "number", default: 0, minimum: 0, transition: !0, units: "pixels", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "text-halo-blur": { type: "number", default: 0, minimum: 0, transition: !0, units: "pixels", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom", "feature", "feature-state"] }, "property-type": "data-driven" }, "text-translate": { type: "array", value: "number", length: 2, default: [0, 0], transition: !0, units: "pixels", requires: ["text-field"], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "text-translate-anchor": { type: "enum", values: { map: {}, viewport: {} }, default: "map", requires: ["text-field", "text-translate"], expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" } }, paint_raster: { "raster-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "raster-hue-rotate": { type: "number", default: 0, period: 360, transition: !0, units: "degrees", expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "raster-brightness-min": { type: "number", default: 0, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "raster-brightness-max": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "raster-saturation": { type: "number", default: 0, minimum: -1, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "raster-contrast": { type: "number", default: 0, minimum: -1, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "raster-resampling": { type: "enum", values: { linear: {}, nearest: {} }, default: "linear", expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "raster-fade-duration": { type: "number", default: 300, minimum: 0, transition: !1, units: "milliseconds", expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" } }, paint_hillshade: { "hillshade-illumination-direction": { type: "number", default: 335, minimum: 0, maximum: 359, transition: !1, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "hillshade-illumination-anchor": { type: "enum", values: { map: {}, viewport: {} }, default: "viewport", expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "data-constant" }, "hillshade-exaggeration": { type: "number", default: 0.5, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "hillshade-shadow-color": { type: "color", default: "#000000", transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "hillshade-highlight-color": { type: "color", default: "#FFFFFF", transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "hillshade-accent-color": { type: "color", default: "#000000", transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" } }, paint_background: { "background-color": { type: "color", default: "#000000", transition: !0, requires: [{ "!": "background-pattern" }], expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" }, "background-pattern": { type: "resolvedImage", transition: !0, expression: { interpolated: !1, parameters: ["zoom"] }, "property-type": "cross-faded" }, "background-opacity": { type: "number", default: 1, minimum: 0, maximum: 1, transition: !0, expression: { interpolated: !0, parameters: ["zoom"] }, "property-type": "data-constant" } }, transition: { duration: { type: "number", default: 300, minimum: 0, units: "milliseconds" }, delay: { type: "number", default: 0, minimum: 0, units: "milliseconds" } }, "property-type": { "data-driven": { type: "property-type" }, "cross-faded": { type: "property-type" }, "cross-faded-data-driven": { type: "property-type" }, "color-ramp": { type: "property-type" }, "data-constant": { type: "property-type" }, constant: { type: "property-type" } }, promoteId: { "*": { type: "string" } } };
18543      const et = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"];
18544      function ft(i, n) {
18545        const o = {};
18546        for (const u in i) u !== "ref" && (o[u] = i[u]);
18547        return et.forEach((u) => {
18548          u in n && (o[u] = n[u]);
18549        }), o;
18550      }
18551      function rt(i, n) {
18552        if (Array.isArray(i)) {
18553          if (!Array.isArray(n) || i.length !== n.length) return !1;
18554          for (let o = 0; o < i.length; o++) if (!rt(i[o], n[o])) return !1;
18555          return !0;
18556        }
18557        if (typeof i == "object" && i !== null && n !== null) {
18558          if (typeof n != "object" || Object.keys(i).length !== Object.keys(n).length) return !1;
18559          for (const o in i) if (!rt(i[o], n[o])) return !1;
18560          return !0;
18561        }
18562        return i === n;
18563      }
18564      function Qe(i, n) {
18565        i.push(n);
18566      }
18567      function dt(i, n, o) {
18568        Qe(o, { command: "addSource", args: [i, n[i]] });
18569      }
18570      function nt(i, n, o) {
18571        Qe(n, { command: "removeSource", args: [i] }), o[i] = !0;
18572      }
18573      function Tt(i, n, o, u) {
18574        nt(i, o, u), dt(i, n, o);
18575      }
18576      function Nt(i, n, o) {
18577        let u;
18578        for (u in i[o]) if (Object.prototype.hasOwnProperty.call(i[o], u) && u !== "data" && !rt(i[o][u], n[o][u])) return !1;
18579        for (u in n[o]) if (Object.prototype.hasOwnProperty.call(n[o], u) && u !== "data" && !rt(i[o][u], n[o][u])) return !1;
18580        return !0;
18581      }
18582      function Dt(i, n, o, u, p, v) {
18583        i = i || {}, n = n || {};
18584        for (const b in i) Object.prototype.hasOwnProperty.call(i, b) && (rt(i[b], n[b]) || o.push({ command: v, args: [u, b, n[b], p] }));
18585        for (const b in n) Object.prototype.hasOwnProperty.call(n, b) && !Object.prototype.hasOwnProperty.call(i, b) && (rt(i[b], n[b]) || o.push({ command: v, args: [u, b, n[b], p] }));
18586      }
18587      function Gt(i) {
18588        return i.id;
18589      }
18590      function sr(i, n) {
18591        return i[n.id] = n, i;
18592      }
18593      class We {
18594        constructor(n, o, u, p) {
18595          this.message = (n ? `${n}: ` : "") + u, p && (this.identifier = p), o != null && o.__line__ && (this.line = o.__line__);
18596        }
18597      }
18598      function or(i, ...n) {
18599        for (const o of n) for (const u in o) i[u] = o[u];
18600        return i;
18601      }
18602      class hr extends Error {
18603        constructor(n, o) {
18604          super(o), this.message = o, this.key = n;
18605        }
18606      }
18607      class Cr {
18608        constructor(n, o = []) {
18609          this.parent = n, this.bindings = {};
18610          for (const [u, p] of o) this.bindings[u] = p;
18611        }
18612        concat(n) {
18613          return new Cr(this, n);
18614        }
18615        get(n) {
18616          if (this.bindings[n]) return this.bindings[n];
18617          if (this.parent) return this.parent.get(n);
18618          throw new Error(`${n} not found in scope.`);
18619        }
18620        has(n) {
18621          return !!this.bindings[n] || !!this.parent && this.parent.has(n);
18622        }
18623      }
18624      const wn = { kind: "null" }, ut = { kind: "number" }, er = { kind: "string" }, Ut = { kind: "boolean" }, Ir = { kind: "color" }, pn = { kind: "object" }, kt = { kind: "value" }, zn = { kind: "collator" }, zi = { kind: "formatted" }, Bi = { kind: "padding" }, mn = { kind: "resolvedImage" }, le = { kind: "variableAnchorOffsetCollection" };
18625      function U(i, n) {
18626        return { kind: "array", itemType: i, N: n };
18627      }
18628      function A(i) {
18629        if (i.kind === "array") {
18630          const n = A(i.itemType);
18631          return typeof i.N == "number" ? `array<${n}, ${i.N}>` : i.itemType.kind === "value" ? "array" : `array<${n}>`;
18632        }
18633        return i.kind;
18634      }
18635      const M = [wn, ut, er, Ut, Ir, zi, pn, U(kt), Bi, mn, le];
18636      function j(i, n) {
18637        if (n.kind === "error") return null;
18638        if (i.kind === "array") {
18639          if (n.kind === "array" && (n.N === 0 && n.itemType.kind === "value" || !j(i.itemType, n.itemType)) && (typeof i.N != "number" || i.N === n.N)) return null;
18640        } else {
18641          if (i.kind === n.kind) return null;
18642          if (i.kind === "value") {
18643            for (const o of M) if (!j(o, n)) return null;
18644          }
18645        }
18646        return `Expected ${A(i)} but found ${A(n)} instead.`;
18647      }
18648      function H(i, n) {
18649        return n.some((o) => o.kind === i.kind);
18650      }
18651      function ne(i, n) {
18652        return n.some((o) => o === "null" ? i === null : o === "array" ? Array.isArray(i) : o === "object" ? i && !Array.isArray(i) && typeof i == "object" : o === typeof i);
18653      }
18654      function de(i, n) {
18655        return i.kind === "array" && n.kind === "array" ? i.itemType.kind === n.itemType.kind && typeof i.N == "number" : i.kind === n.kind;
18656      }
18657      const ie = 0.96422, Be = 0.82521, Le = 4 / 29, Re = 6 / 29, it = 3 * Re * Re, Pt = Re * Re * Re, zt = Math.PI / 180, dr = 180 / Math.PI;
18658      function Wt(i) {
18659        return (i %= 360) < 0 && (i += 360), i;
18660      }
18661      function mr([i, n, o, u]) {
18662        let p, v;
18663        const b = xn((0.2225045 * (i = gr(i)) + 0.7168786 * (n = gr(n)) + 0.0606169 * (o = gr(o))) / 1);
18664        i === n && n === o ? p = v = b : (p = xn((0.4360747 * i + 0.3850649 * n + 0.1430804 * o) / ie), v = xn((0.0139322 * i + 0.0971045 * n + 0.7141733 * o) / Be));
18665        const x = 116 * b - 16;
18666        return [x < 0 ? 0 : x, 500 * (p - b), 200 * (b - v), u];
18667      }
18668      function gr(i) {
18669        return i <= 0.04045 ? i / 12.92 : Math.pow((i + 0.055) / 1.055, 2.4);
18670      }
18671      function xn(i) {
18672        return i > Pt ? Math.pow(i, 1 / 3) : i / it + Le;
18673      }
18674      function yr([i, n, o, u]) {
18675        let p = (i + 16) / 116, v = isNaN(n) ? p : p + n / 500, b = isNaN(o) ? p : p - o / 200;
18676        return p = 1 * Pr(p), v = ie * Pr(v), b = Be * Pr(b), [lr(3.1338561 * v - 1.6168667 * p - 0.4906146 * b), lr(-0.9787684 * v + 1.9161415 * p + 0.033454 * b), lr(0.0719453 * v - 0.2289914 * p + 1.4052427 * b), u];
18677      }
18678      function lr(i) {
18679        return (i = i <= 304e-5 ? 12.92 * i : 1.055 * Math.pow(i, 1 / 2.4) - 0.055) < 0 ? 0 : i > 1 ? 1 : i;
18680      }
18681      function Pr(i) {
18682        return i > Re ? i * i * i : it * (i - Le);
18683      }
18684      function an(i) {
18685        return parseInt(i.padEnd(2, i), 16) / 255;
18686      }
18687      function Bn(i, n) {
18688        return Xn(n ? i / 100 : i, 0, 1);
18689      }
18690      function Xn(i, n, o) {
18691        return Math.min(Math.max(n, i), o);
18692      }
18693      function Jn(i) {
18694        return !i.some(Number.isNaN);
18695      }
18696      const Ko = { aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 134, 11], darkgray: [169, 169, 169], darkgreen: [0, 100, 0], darkgrey: [169, 169, 169], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 250, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], grey: [128, 128, 128], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 221], powderblue: [176, 224, 230], purple: [128, 0, 128], rebeccapurple: [102, 51, 153], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [112, 128, 144], slategrey: [112, 128, 144], snow: [255, 250, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0], yellowgreen: [154, 205, 50] };
18697      class Mr {
18698        constructor(n, o, u, p = 1, v = !0) {
18699          this.r = n, this.g = o, this.b = u, this.a = p, v || (this.r *= p, this.g *= p, this.b *= p, p || this.overwriteGetter("rgb", [n, o, u, p]));
18700        }
18701        static parse(n) {
18702          if (n instanceof Mr) return n;
18703          if (typeof n != "string") return;
18704          const o = function(u) {
18705            if ((u = u.toLowerCase().trim()) === "transparent") return [0, 0, 0, 0];
18706            const p = Ko[u];
18707            if (p) {
18708              const [b, x, E] = p;
18709              return [b / 255, x / 255, E / 255, 1];
18710            }
18711            if (u.startsWith("#") && /^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(u)) {
18712              const b = u.length < 6 ? 1 : 2;
18713              let x = 1;
18714              return [an(u.slice(x, x += b)), an(u.slice(x, x += b)), an(u.slice(x, x += b)), an(u.slice(x, x + b) || "ff")];
18715            }
18716            if (u.startsWith("rgb")) {
18717              const b = u.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);
18718              if (b) {
18719                const [x, E, k, L, B, V, q, W, Y, oe, he, De] = b, xe = [L || " ", q || " ", oe].join("");
18720                if (xe === "  " || xe === "  /" || xe === ",," || xe === ",,,") {
18721                  const ke = [k, V, Y].join(""), Ve = ke === "%%%" ? 100 : ke === "" ? 255 : 0;
18722                  if (Ve) {
18723                    const at = [Xn(+E / Ve, 0, 1), Xn(+B / Ve, 0, 1), Xn(+W / Ve, 0, 1), he ? Bn(+he, De) : 1];
18724                    if (Jn(at)) return at;
18725                  }
18726                }
18727                return;
18728              }
18729            }
18730            const v = u.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);
18731            if (v) {
18732              const [b, x, E, k, L, B, V, q, W] = v, Y = [E || " ", L || " ", V].join("");
18733              if (Y === "  " || Y === "  /" || Y === ",," || Y === ",,,") {
18734                const oe = [+x, Xn(+k, 0, 100), Xn(+B, 0, 100), q ? Bn(+q, W) : 1];
18735                if (Jn(oe)) return function([he, De, xe, ke]) {
18736                  function Ve(at) {
18737                    const At = (at + he / 30) % 12, Kt = De * Math.min(xe, 1 - xe);
18738                    return xe - Kt * Math.max(-1, Math.min(At - 3, 9 - At, 1));
18739                  }
18740                  return he = Wt(he), De /= 100, xe /= 100, [Ve(0), Ve(8), Ve(4), ke];
18741                }(oe);
18742              }
18743            }
18744          }(n);
18745          return o ? new Mr(...o, !1) : void 0;
18746        }
18747        get rgb() {
18748          const { r: n, g: o, b: u, a: p } = this, v = p || 1 / 0;
18749          return this.overwriteGetter("rgb", [n / v, o / v, u / v, p]);
18750        }
18751        get hcl() {
18752          return this.overwriteGetter("hcl", function(n) {
18753            const [o, u, p, v] = mr(n), b = Math.sqrt(u * u + p * p);
18754            return [Math.round(1e4 * b) ? Wt(Math.atan2(p, u) * dr) : NaN, b, o, v];
18755          }(this.rgb));
18756        }
18757        get lab() {
18758          return this.overwriteGetter("lab", mr(this.rgb));
18759        }
18760        overwriteGetter(n, o) {
18761          return Object.defineProperty(this, n, { value: o }), o;
18762        }
18763        toString() {
18764          const [n, o, u, p] = this.rgb;
18765          return `rgba(${[n, o, u].map((v) => Math.round(255 * v)).join(",")},${p})`;
18766        }
18767      }
18768      Mr.black = new Mr(0, 0, 0, 1), Mr.white = new Mr(1, 1, 1, 1), Mr.transparent = new Mr(0, 0, 0, 0), Mr.red = new Mr(1, 0, 0, 1);
18769      class Aa {
18770        constructor(n, o, u) {
18771          this.sensitivity = n ? o ? "variant" : "case" : o ? "accent" : "base", this.locale = u, this.collator = new Intl.Collator(this.locale ? this.locale : [], { sensitivity: this.sensitivity, usage: "search" });
18772        }
18773        compare(n, o) {
18774          return this.collator.compare(n, o);
18775        }
18776        resolvedLocale() {
18777          return new Intl.Collator(this.locale ? this.locale : []).resolvedOptions().locale;
18778        }
18779      }
18780      class Ca {
18781        constructor(n, o, u, p, v) {
18782          this.text = n, this.image = o, this.scale = u, this.fontStack = p, this.textColor = v;
18783        }
18784      }
18785      class zr {
18786        constructor(n) {
18787          this.sections = n;
18788        }
18789        static fromString(n) {
18790          return new zr([new Ca(n, null, null, null, null)]);
18791        }
18792        isEmpty() {
18793          return this.sections.length === 0 || !this.sections.some((n) => n.text.length !== 0 || n.image && n.image.name.length !== 0);
18794        }
18795        static factory(n) {
18796          return n instanceof zr ? n : zr.fromString(n);
18797        }
18798        toString() {
18799          return this.sections.length === 0 ? "" : this.sections.map((n) => n.text).join("");
18800        }
18801      }
18802      class mi {
18803        constructor(n) {
18804          this.values = n.slice();
18805        }
18806        static parse(n) {
18807          if (n instanceof mi) return n;
18808          if (typeof n == "number") return new mi([n, n, n, n]);
18809          if (Array.isArray(n) && !(n.length < 1 || n.length > 4)) {
18810            for (const o of n) if (typeof o != "number") return;
18811            switch (n.length) {
18812              case 1:
18813                n = [n[0], n[0], n[0], n[0]];
18814                break;
18815              case 2:
18816                n = [n[0], n[1], n[0], n[1]];
18817                break;
18818              case 3:
18819                n = [n[0], n[1], n[2], n[1]];
18820            }
18821            return new mi(n);
18822          }
18823        }
18824        toString() {
18825          return JSON.stringify(this.values);
18826        }
18827      }
18828      const fu = /* @__PURE__ */ new Set(["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"]);
18829      class Nn {
18830        constructor(n) {
18831          this.values = n.slice();
18832        }
18833        static parse(n) {
18834          if (n instanceof Nn) return n;
18835          if (Array.isArray(n) && !(n.length < 1) && n.length % 2 == 0) {
18836            for (let o = 0; o < n.length; o += 2) {
18837              const u = n[o], p = n[o + 1];
18838              if (typeof u != "string" || !fu.has(u) || !Array.isArray(p) || p.length !== 2 || typeof p[0] != "number" || typeof p[1] != "number") return;
18839            }
18840            return new Nn(n);
18841          }
18842        }
18843        toString() {
18844          return JSON.stringify(this.values);
18845        }
18846      }
18847      class Sn {
18848        constructor(n) {
18849          this.name = n.name, this.available = n.available;
18850        }
18851        toString() {
18852          return this.name;
18853        }
18854        static fromString(n) {
18855          return n ? new Sn({ name: n, available: !1 }) : null;
18856        }
18857      }
18858      function Ls(i, n, o, u) {
18859        return typeof i == "number" && i >= 0 && i <= 255 && typeof n == "number" && n >= 0 && n <= 255 && typeof o == "number" && o >= 0 && o <= 255 ? u === void 0 || typeof u == "number" && u >= 0 && u <= 1 ? null : `Invalid rgba value [${[i, n, o, u].join(", ")}]: 'a' must be between 0 and 1.` : `Invalid rgba value [${(typeof u == "number" ? [i, n, o, u] : [i, n, o]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`;
18860      }
18861      function Pi(i) {
18862        if (i === null || typeof i == "string" || typeof i == "boolean" || typeof i == "number" || i instanceof Mr || i instanceof Aa || i instanceof zr || i instanceof mi || i instanceof Nn || i instanceof Sn) return !0;
18863        if (Array.isArray(i)) {
18864          for (const n of i) if (!Pi(n)) return !1;
18865          return !0;
18866        }
18867        if (typeof i == "object") {
18868          for (const n in i) if (!Pi(i[n])) return !1;
18869          return !0;
18870        }
18871        return !1;
18872      }
18873      function rn(i) {
18874        if (i === null) return wn;
18875        if (typeof i == "string") return er;
18876        if (typeof i == "boolean") return Ut;
18877        if (typeof i == "number") return ut;
18878        if (i instanceof Mr) return Ir;
18879        if (i instanceof Aa) return zn;
18880        if (i instanceof zr) return zi;
18881        if (i instanceof mi) return Bi;
18882        if (i instanceof Nn) return le;
18883        if (i instanceof Sn) return mn;
18884        if (Array.isArray(i)) {
18885          const n = i.length;
18886          let o;
18887          for (const u of i) {
18888            const p = rn(u);
18889            if (o) {
18890              if (o === p) continue;
18891              o = kt;
18892              break;
18893            }
18894            o = p;
18895          }
18896          return U(o || kt, n);
18897        }
18898        return pn;
18899      }
18900      function Xo(i) {
18901        const n = typeof i;
18902        return i === null ? "" : n === "string" || n === "number" || n === "boolean" ? String(i) : i instanceof Mr || i instanceof zr || i instanceof mi || i instanceof Nn || i instanceof Sn ? i.toString() : JSON.stringify(i);
18903      }
18904      class rs {
18905        constructor(n, o) {
18906          this.type = n, this.value = o;
18907        }
18908        static parse(n, o) {
18909          if (n.length !== 2) return o.error(`'literal' expression requires exactly one argument, but found ${n.length - 1} instead.`);
18910          if (!Pi(n[1])) return o.error("invalid value");
18911          const u = n[1];
18912          let p = rn(u);
18913          const v = o.expectedType;
18914          return p.kind !== "array" || p.N !== 0 || !v || v.kind !== "array" || typeof v.N == "number" && v.N !== 0 || (p = v), new rs(p, u);
18915        }
18916        evaluate() {
18917          return this.value;
18918        }
18919        eachChild() {
18920        }
18921        outputDefined() {
18922          return !0;
18923        }
18924      }
18925      class Cn {
18926        constructor(n) {
18927          this.name = "ExpressionEvaluationError", this.message = n;
18928        }
18929        toJSON() {
18930          return this.message;
18931        }
18932      }
18933      const al = { string: er, number: ut, boolean: Ut, object: pn };
18934      class Ni {
18935        constructor(n, o) {
18936          this.type = n, this.args = o;
18937        }
18938        static parse(n, o) {
18939          if (n.length < 2) return o.error("Expected at least one argument.");
18940          let u, p = 1;
18941          const v = n[0];
18942          if (v === "array") {
18943            let x, E;
18944            if (n.length > 2) {
18945              const k = n[1];
18946              if (typeof k != "string" || !(k in al) || k === "object") return o.error('The item type argument of "array" must be one of string, number, boolean', 1);
18947              x = al[k], p++;
18948            } else x = kt;
18949            if (n.length > 3) {
18950              if (n[2] !== null && (typeof n[2] != "number" || n[2] < 0 || n[2] !== Math.floor(n[2]))) return o.error('The length argument to "array" must be a positive integer literal', 2);
18951              E = n[2], p++;
18952            }
18953            u = U(x, E);
18954          } else {
18955            if (!al[v]) throw new Error(`Types doesn't contain name = ${v}`);
18956            u = al[v];
18957          }
18958          const b = [];
18959          for (; p < n.length; p++) {
18960            const x = o.parse(n[p], p, kt);
18961            if (!x) return null;
18962            b.push(x);
18963          }
18964          return new Ni(u, b);
18965        }
18966        evaluate(n) {
18967          for (let o = 0; o < this.args.length; o++) {
18968            const u = this.args[o].evaluate(n);
18969            if (!j(this.type, rn(u))) return u;
18970            if (o === this.args.length - 1) throw new Cn(`Expected value to be of type ${A(this.type)}, but found ${A(rn(u))} instead.`);
18971          }
18972          throw new Error();
18973        }
18974        eachChild(n) {
18975          this.args.forEach(n);
18976        }
18977        outputDefined() {
18978          return this.args.every((n) => n.outputDefined());
18979        }
18980      }
18981      const Ia = { "to-boolean": Ut, "to-color": Ir, "to-number": ut, "to-string": er };
18982      class $i {
18983        constructor(n, o) {
18984          this.type = n, this.args = o;
18985        }
18986        static parse(n, o) {
18987          if (n.length < 2) return o.error("Expected at least one argument.");
18988          const u = n[0];
18989          if (!Ia[u]) throw new Error(`Can't parse ${u} as it is not part of the known types`);
18990          if ((u === "to-boolean" || u === "to-string") && n.length !== 2) return o.error("Expected one argument.");
18991          const p = Ia[u], v = [];
18992          for (let b = 1; b < n.length; b++) {
18993            const x = o.parse(n[b], b, kt);
18994            if (!x) return null;
18995            v.push(x);
18996          }
18997          return new $i(p, v);
18998        }
18999        evaluate(n) {
19000          switch (this.type.kind) {
19001            case "boolean":
19002              return !!this.args[0].evaluate(n);
19003            case "color": {
19004              let o, u;
19005              for (const p of this.args) {
19006                if (o = p.evaluate(n), u = null, o instanceof Mr) return o;
19007                if (typeof o == "string") {
19008                  const v = n.parseColor(o);
19009                  if (v) return v;
19010                } else if (Array.isArray(o) && (u = o.length < 3 || o.length > 4 ? `Invalid rbga value ${JSON.stringify(o)}: expected an array containing either three or four numeric values.` : Ls(o[0], o[1], o[2], o[3]), !u)) return new Mr(o[0] / 255, o[1] / 255, o[2] / 255, o[3]);
19011              }
19012              throw new Cn(u || `Could not parse color from value '${typeof o == "string" ? o : JSON.stringify(o)}'`);
19013            }
19014            case "padding": {
19015              let o;
19016              for (const u of this.args) {
19017                o = u.evaluate(n);
19018                const p = mi.parse(o);
19019                if (p) return p;
19020              }
19021              throw new Cn(`Could not parse padding from value '${typeof o == "string" ? o : JSON.stringify(o)}'`);
19022            }
19023            case "variableAnchorOffsetCollection": {
19024              let o;
19025              for (const u of this.args) {
19026                o = u.evaluate(n);
19027                const p = Nn.parse(o);
19028                if (p) return p;
19029              }
19030              throw new Cn(`Could not parse variableAnchorOffsetCollection from value '${typeof o == "string" ? o : JSON.stringify(o)}'`);
19031            }
19032            case "number": {
19033              let o = null;
19034              for (const u of this.args) {
19035                if (o = u.evaluate(n), o === null) return 0;
19036                const p = Number(o);
19037                if (!isNaN(p)) return p;
19038              }
19039              throw new Cn(`Could not convert ${JSON.stringify(o)} to number.`);
19040            }
19041            case "formatted":
19042              return zr.fromString(Xo(this.args[0].evaluate(n)));
19043            case "resolvedImage":
19044              return Sn.fromString(Xo(this.args[0].evaluate(n)));
19045            default:
19046              return Xo(this.args[0].evaluate(n));
19047          }
19048        }
19049        eachChild(n) {
19050          this.args.forEach(n);
19051        }
19052        outputDefined() {
19053          return this.args.every((n) => n.outputDefined());
19054        }
19055      }
19056      const du = ["Unknown", "Point", "LineString", "Polygon"];
19057      class ll {
19058        constructor() {
19059          this.globals = null, this.feature = null, this.featureState = null, this.formattedSection = null, this._parseColorCache = {}, this.availableImages = null, this.canonical = null;
19060        }
19061        id() {
19062          return this.feature && "id" in this.feature ? this.feature.id : null;
19063        }
19064        geometryType() {
19065          return this.feature ? typeof this.feature.type == "number" ? du[this.feature.type] : this.feature.type : null;
19066        }
19067        geometry() {
19068          return this.feature && "geometry" in this.feature ? this.feature.geometry : null;
19069        }
19070        canonicalID() {
19071          return this.canonical;
19072        }
19073        properties() {
19074          return this.feature && this.feature.properties || {};
19075        }
19076        parseColor(n) {
19077          let o = this._parseColorCache[n];
19078          return o || (o = this._parseColorCache[n] = Mr.parse(n)), o;
19079        }
19080      }
19081      class Co {
19082        constructor(n, o, u = [], p, v = new Cr(), b = []) {
19083          this.registry = n, this.path = u, this.key = u.map((x) => `[${x}]`).join(""), this.scope = v, this.errors = b, this.expectedType = p, this._isConstant = o;
19084        }
19085        parse(n, o, u, p, v = {}) {
19086          return o ? this.concat(o, u, p)._parse(n, v) : this._parse(n, v);
19087        }
19088        _parse(n, o) {
19089          function u(p, v, b) {
19090            return b === "assert" ? new Ni(v, [p]) : b === "coerce" ? new $i(v, [p]) : p;
19091          }
19092          if (n !== null && typeof n != "string" && typeof n != "boolean" && typeof n != "number" || (n = ["literal", n]), Array.isArray(n)) {
19093            if (n.length === 0) return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');
19094            const p = n[0];
19095            if (typeof p != "string") return this.error(`Expression name must be a string, but found ${typeof p} instead. If you wanted a literal array, use ["literal", [...]].`, 0), null;
19096            const v = this.registry[p];
19097            if (v) {
19098              let b = v.parse(n, this);
19099              if (!b) return null;
19100              if (this.expectedType) {
19101                const x = this.expectedType, E = b.type;
19102                if (x.kind !== "string" && x.kind !== "number" && x.kind !== "boolean" && x.kind !== "object" && x.kind !== "array" || E.kind !== "value") if (x.kind !== "color" && x.kind !== "formatted" && x.kind !== "resolvedImage" || E.kind !== "value" && E.kind !== "string") if (x.kind !== "padding" || E.kind !== "value" && E.kind !== "number" && E.kind !== "array") if (x.kind !== "variableAnchorOffsetCollection" || E.kind !== "value" && E.kind !== "array") {
19103                  if (this.checkSubtype(x, E)) return null;
19104                } else b = u(b, x, o.typeAnnotation || "coerce");
19105                else b = u(b, x, o.typeAnnotation || "coerce");
19106                else b = u(b, x, o.typeAnnotation || "coerce");
19107                else b = u(b, x, o.typeAnnotation || "assert");
19108              }
19109              if (!(b instanceof rs) && b.type.kind !== "resolvedImage" && this._isConstant(b)) {
19110                const x = new ll();
19111                try {
19112                  b = new rs(b.type, b.evaluate(x));
19113                } catch (E) {
19114                  return this.error(E.message), null;
19115                }
19116              }
19117              return b;
19118            }
19119            return this.error(`Unknown expression "${p}". If you wanted a literal array, use ["literal", [...]].`, 0);
19120          }
19121          return this.error(n === void 0 ? "'undefined' value invalid. Use null instead." : typeof n == "object" ? 'Bare objects invalid. Use ["literal", {...}] instead.' : `Expected an array, but found ${typeof n} instead.`);
19122        }
19123        concat(n, o, u) {
19124          const p = typeof n == "number" ? this.path.concat(n) : this.path, v = u ? this.scope.concat(u) : this.scope;
19125          return new Co(this.registry, this._isConstant, p, o || null, v, this.errors);
19126        }
19127        error(n, ...o) {
19128          const u = `${this.key}${o.map((p) => `[${p}]`).join("")}`;
19129          this.errors.push(new hr(u, n));
19130        }
19131        checkSubtype(n, o) {
19132          const u = j(n, o);
19133          return u && this.error(u), u;
19134        }
19135      }
19136      class io {
19137        constructor(n, o) {
19138          this.type = o.type, this.bindings = [].concat(n), this.result = o;
19139        }
19140        evaluate(n) {
19141          return this.result.evaluate(n);
19142        }
19143        eachChild(n) {
19144          for (const o of this.bindings) n(o[1]);
19145          n(this.result);
19146        }
19147        static parse(n, o) {
19148          if (n.length < 4) return o.error(`Expected at least 3 arguments, but found ${n.length - 1} instead.`);
19149          const u = [];
19150          for (let v = 1; v < n.length - 1; v += 2) {
19151            const b = n[v];
19152            if (typeof b != "string") return o.error(`Expected string, but found ${typeof b} instead.`, v);
19153            if (/[^a-zA-Z0-9_]/.test(b)) return o.error("Variable names must contain only alphanumeric characters or '_'.", v);
19154            const x = o.parse(n[v + 1], v + 1);
19155            if (!x) return null;
19156            u.push([b, x]);
19157          }
19158          const p = o.parse(n[n.length - 1], n.length - 1, o.expectedType, u);
19159          return p ? new io(u, p) : null;
19160        }
19161        outputDefined() {
19162          return this.result.outputDefined();
19163        }
19164      }
19165      class wr {
19166        constructor(n, o) {
19167          this.type = o.type, this.name = n, this.boundExpression = o;
19168        }
19169        static parse(n, o) {
19170          if (n.length !== 2 || typeof n[1] != "string") return o.error("'var' expression requires exactly one string literal argument.");
19171          const u = n[1];
19172          return o.scope.has(u) ? new wr(u, o.scope.get(u)) : o.error(`Unknown variable "${u}". Make sure "${u}" has been bound in an enclosing "let" expression before using it.`, 1);
19173        }
19174        evaluate(n) {
19175          return this.boundExpression.evaluate(n);
19176        }
19177        eachChild() {
19178        }
19179        outputDefined() {
19180          return !1;
19181        }
19182      }
19183      class T {
19184        constructor(n, o, u) {
19185          this.type = n, this.index = o, this.input = u;
19186        }
19187        static parse(n, o) {
19188          if (n.length !== 3) return o.error(`Expected 2 arguments, but found ${n.length - 1} instead.`);
19189          const u = o.parse(n[1], 1, ut), p = o.parse(n[2], 2, U(o.expectedType || kt));
19190          return u && p ? new T(p.type.itemType, u, p) : null;
19191        }
19192        evaluate(n) {
19193          const o = this.index.evaluate(n), u = this.input.evaluate(n);
19194          if (o < 0) throw new Cn(`Array index out of bounds: ${o} < 0.`);
19195          if (o >= u.length) throw new Cn(`Array index out of bounds: ${o} > ${u.length - 1}.`);
19196          if (o !== Math.floor(o)) throw new Cn(`Array index must be an integer, but found ${o} instead.`);
19197          return u[o];
19198        }
19199        eachChild(n) {
19200          n(this.index), n(this.input);
19201        }
19202        outputDefined() {
19203          return !1;
19204        }
19205      }
19206      class D {
19207        constructor(n, o) {
19208          this.type = Ut, this.needle = n, this.haystack = o;
19209        }
19210        static parse(n, o) {
19211          if (n.length !== 3) return o.error(`Expected 2 arguments, but found ${n.length - 1} instead.`);
19212          const u = o.parse(n[1], 1, kt), p = o.parse(n[2], 2, kt);
19213          return u && p ? H(u.type, [Ut, er, ut, wn, kt]) ? new D(u, p) : o.error(`Expected first argument to be of type boolean, string, number or null, but found ${A(u.type)} instead`) : null;
19214        }
19215        evaluate(n) {
19216          const o = this.needle.evaluate(n), u = this.haystack.evaluate(n);
19217          if (!u) return !1;
19218          if (!ne(o, ["boolean", "string", "number", "null"])) throw new Cn(`Expected first argument to be of type boolean, string, number or null, but found ${A(rn(o))} instead.`);
19219          if (!ne(u, ["string", "array"])) throw new Cn(`Expected second argument to be of type array or string, but found ${A(rn(u))} instead.`);
19220          return u.indexOf(o) >= 0;
19221        }
19222        eachChild(n) {
19223          n(this.needle), n(this.haystack);
19224        }
19225        outputDefined() {
19226          return !0;
19227        }
19228      }
19229      class Z {
19230        constructor(n, o, u) {
19231          this.type = ut, this.needle = n, this.haystack = o, this.fromIndex = u;
19232        }
19233        static parse(n, o) {
19234          if (n.length <= 2 || n.length >= 5) return o.error(`Expected 3 or 4 arguments, but found ${n.length - 1} instead.`);
19235          const u = o.parse(n[1], 1, kt), p = o.parse(n[2], 2, kt);
19236          if (!u || !p) return null;
19237          if (!H(u.type, [Ut, er, ut, wn, kt])) return o.error(`Expected first argument to be of type boolean, string, number or null, but found ${A(u.type)} instead`);
19238          if (n.length === 4) {
19239            const v = o.parse(n[3], 3, ut);
19240            return v ? new Z(u, p, v) : null;
19241          }
19242          return new Z(u, p);
19243        }
19244        evaluate(n) {
19245          const o = this.needle.evaluate(n), u = this.haystack.evaluate(n);
19246          if (!ne(o, ["boolean", "string", "number", "null"])) throw new Cn(`Expected first argument to be of type boolean, string, number or null, but found ${A(rn(o))} instead.`);
19247          let p;
19248          if (this.fromIndex && (p = this.fromIndex.evaluate(n)), ne(u, ["string"])) {
19249            const v = u.indexOf(o, p);
19250            return v === -1 ? -1 : [...u.slice(0, v)].length;
19251          }
19252          if (ne(u, ["array"])) return u.indexOf(o, p);
19253          throw new Cn(`Expected second argument to be of type array or string, but found ${A(rn(u))} instead.`);
19254        }
19255        eachChild(n) {
19256          n(this.needle), n(this.haystack), this.fromIndex && n(this.fromIndex);
19257        }
19258        outputDefined() {
19259          return !1;
19260        }
19261      }
19262      class ce {
19263        constructor(n, o, u, p, v, b) {
19264          this.inputType = n, this.type = o, this.input = u, this.cases = p, this.outputs = v, this.otherwise = b;
19265        }
19266        static parse(n, o) {
19267          if (n.length < 5) return o.error(`Expected at least 4 arguments, but found only ${n.length - 1}.`);
19268          if (n.length % 2 != 1) return o.error("Expected an even number of arguments.");
19269          let u, p;
19270          o.expectedType && o.expectedType.kind !== "value" && (p = o.expectedType);
19271          const v = {}, b = [];
19272          for (let k = 2; k < n.length - 1; k += 2) {
19273            let L = n[k];
19274            const B = n[k + 1];
19275            Array.isArray(L) || (L = [L]);
19276            const V = o.concat(k);
19277            if (L.length === 0) return V.error("Expected at least one branch label.");
19278            for (const W of L) {
19279              if (typeof W != "number" && typeof W != "string") return V.error("Branch labels must be numbers or strings.");
19280              if (typeof W == "number" && Math.abs(W) > Number.MAX_SAFE_INTEGER) return V.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);
19281              if (typeof W == "number" && Math.floor(W) !== W) return V.error("Numeric branch labels must be integer values.");
19282              if (u) {
19283                if (V.checkSubtype(u, rn(W))) return null;
19284              } else u = rn(W);
19285              if (v[String(W)] !== void 0) return V.error("Branch labels must be unique.");
19286              v[String(W)] = b.length;
19287            }
19288            const q = o.parse(B, k, p);
19289            if (!q) return null;
19290            p = p || q.type, b.push(q);
19291          }
19292          const x = o.parse(n[1], 1, kt);
19293          if (!x) return null;
19294          const E = o.parse(n[n.length - 1], n.length - 1, p);
19295          return E ? x.type.kind !== "value" && o.concat(1).checkSubtype(u, x.type) ? null : new ce(u, p, x, v, b, E) : null;
19296        }
19297        evaluate(n) {
19298          const o = this.input.evaluate(n);
19299          return (rn(o) === this.inputType && this.outputs[this.cases[o]] || this.otherwise).evaluate(n);
19300        }
19301        eachChild(n) {
19302          n(this.input), this.outputs.forEach(n), n(this.otherwise);
19303        }
19304        outputDefined() {
19305          return this.outputs.every((n) => n.outputDefined()) && this.otherwise.outputDefined();
19306        }
19307      }
19308      class ve {
19309        constructor(n, o, u) {
19310          this.type = n, this.branches = o, this.otherwise = u;
19311        }
19312        static parse(n, o) {
19313          if (n.length < 4) return o.error(`Expected at least 3 arguments, but found only ${n.length - 1}.`);
19314          if (n.length % 2 != 0) return o.error("Expected an odd number of arguments.");
19315          let u;
19316          o.expectedType && o.expectedType.kind !== "value" && (u = o.expectedType);
19317          const p = [];
19318          for (let b = 1; b < n.length - 1; b += 2) {
19319            const x = o.parse(n[b], b, Ut);
19320            if (!x) return null;
19321            const E = o.parse(n[b + 1], b + 1, u);
19322            if (!E) return null;
19323            p.push([x, E]), u = u || E.type;
19324          }
19325          const v = o.parse(n[n.length - 1], n.length - 1, u);
19326          if (!v) return null;
19327          if (!u) throw new Error("Can't infer output type");
19328          return new ve(u, p, v);
19329        }
19330        evaluate(n) {
19331          for (const [o, u] of this.branches) if (o.evaluate(n)) return u.evaluate(n);
19332          return this.otherwise.evaluate(n);
19333        }
19334        eachChild(n) {
19335          for (const [o, u] of this.branches) n(o), n(u);
19336          n(this.otherwise);
19337        }
19338        outputDefined() {
19339          return this.branches.every(([n, o]) => o.outputDefined()) && this.otherwise.outputDefined();
19340        }
19341      }
19342      class we {
19343        constructor(n, o, u, p) {
19344          this.type = n, this.input = o, this.beginIndex = u, this.endIndex = p;
19345        }
19346        static parse(n, o) {
19347          if (n.length <= 2 || n.length >= 5) return o.error(`Expected 3 or 4 arguments, but found ${n.length - 1} instead.`);
19348          const u = o.parse(n[1], 1, kt), p = o.parse(n[2], 2, ut);
19349          if (!u || !p) return null;
19350          if (!H(u.type, [U(kt), er, kt])) return o.error(`Expected first argument to be of type array or string, but found ${A(u.type)} instead`);
19351          if (n.length === 4) {
19352            const v = o.parse(n[3], 3, ut);
19353            return v ? new we(u.type, u, p, v) : null;
19354          }
19355          return new we(u.type, u, p);
19356        }
19357        evaluate(n) {
19358          const o = this.input.evaluate(n), u = this.beginIndex.evaluate(n);
19359          let p;
19360          if (this.endIndex && (p = this.endIndex.evaluate(n)), ne(o, ["string"])) return [...o].slice(u, p).join("");
19361          if (ne(o, ["array"])) return o.slice(u, p);
19362          throw new Cn(`Expected first argument to be of type array or string, but found ${A(rn(o))} instead.`);
19363        }
19364        eachChild(n) {
19365          n(this.input), n(this.beginIndex), this.endIndex && n(this.endIndex);
19366        }
19367        outputDefined() {
19368          return !1;
19369        }
19370      }
19371      function Pe(i, n) {
19372        const o = i.length - 1;
19373        let u, p, v = 0, b = o, x = 0;
19374        for (; v <= b; ) if (x = Math.floor((v + b) / 2), u = i[x], p = i[x + 1], u <= n) {
19375          if (x === o || n < p) return x;
19376          v = x + 1;
19377        } else {
19378          if (!(u > n)) throw new Cn("Input is not a number.");
19379          b = x - 1;
19380        }
19381        return 0;
19382      }
19383      class tt {
19384        constructor(n, o, u) {
19385          this.type = n, this.input = o, this.labels = [], this.outputs = [];
19386          for (const [p, v] of u) this.labels.push(p), this.outputs.push(v);
19387        }
19388        static parse(n, o) {
19389          if (n.length - 1 < 4) return o.error(`Expected at least 4 arguments, but found only ${n.length - 1}.`);
19390          if ((n.length - 1) % 2 != 0) return o.error("Expected an even number of arguments.");
19391          const u = o.parse(n[1], 1, ut);
19392          if (!u) return null;
19393          const p = [];
19394          let v = null;
19395          o.expectedType && o.expectedType.kind !== "value" && (v = o.expectedType);
19396          for (let b = 1; b < n.length; b += 2) {
19397            const x = b === 1 ? -1 / 0 : n[b], E = n[b + 1], k = b, L = b + 1;
19398            if (typeof x != "number") return o.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.', k);
19399            if (p.length && p[p.length - 1][0] >= x) return o.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.', k);
19400            const B = o.parse(E, L, v);
19401            if (!B) return null;
19402            v = v || B.type, p.push([x, B]);
19403          }
19404          return new tt(v, u, p);
19405        }
19406        evaluate(n) {
19407          const o = this.labels, u = this.outputs;
19408          if (o.length === 1) return u[0].evaluate(n);
19409          const p = this.input.evaluate(n);
19410          if (p <= o[0]) return u[0].evaluate(n);
19411          const v = o.length;
19412          return p >= o[v - 1] ? u[v - 1].evaluate(n) : u[Pe(o, p)].evaluate(n);
19413        }
19414        eachChild(n) {
19415          n(this.input);
19416          for (const o of this.outputs) n(o);
19417        }
19418        outputDefined() {
19419          return this.outputs.every((n) => n.outputDefined());
19420        }
19421      }
19422      function ht(i) {
19423        return i && i.__esModule && Object.prototype.hasOwnProperty.call(i, "default") ? i.default : i;
19424      }
19425      var wt = xt;
19426      function xt(i, n, o, u) {
19427        this.cx = 3 * i, this.bx = 3 * (o - i) - this.cx, this.ax = 1 - this.cx - this.bx, this.cy = 3 * n, this.by = 3 * (u - n) - this.cy, this.ay = 1 - this.cy - this.by, this.p1x = i, this.p1y = n, this.p2x = o, this.p2y = u;
19428      }
19429      xt.prototype = { sampleCurveX: function(i) {
19430        return ((this.ax * i + this.bx) * i + this.cx) * i;
19431      }, sampleCurveY: function(i) {
19432        return ((this.ay * i + this.by) * i + this.cy) * i;
19433      }, sampleCurveDerivativeX: function(i) {
19434        return (3 * this.ax * i + 2 * this.bx) * i + this.cx;
19435      }, solveCurveX: function(i, n) {
19436        if (n === void 0 && (n = 1e-6), i < 0) return 0;
19437        if (i > 1) return 1;
19438        for (var o = i, u = 0; u < 8; u++) {
19439          var p = this.sampleCurveX(o) - i;
19440          if (Math.abs(p) < n) return o;
19441          var v = this.sampleCurveDerivativeX(o);
19442          if (Math.abs(v) < 1e-6) break;
19443          o -= p / v;
19444        }
19445        var b = 0, x = 1;
19446        for (o = i, u = 0; u < 20 && (p = this.sampleCurveX(o), !(Math.abs(p - i) < n)); u++) i > p ? b = o : x = o, o = 0.5 * (x - b) + b;
19447        return o;
19448      }, solve: function(i, n) {
19449        return this.sampleCurveY(this.solveCurveX(i, n));
19450      } };
19451      var mt = ht(wt);
19452      function Yt(i, n, o) {
19453        return i + o * (n - i);
19454      }
19455      function Xr(i, n, o) {
19456        return i.map((u, p) => Yt(u, n[p], o));
19457      }
19458      const Zt = { number: Yt, color: function(i, n, o, u = "rgb") {
19459        switch (u) {
19460          case "rgb": {
19461            const [p, v, b, x] = Xr(i.rgb, n.rgb, o);
19462            return new Mr(p, v, b, x, !1);
19463          }
19464          case "hcl": {
19465            const [p, v, b, x] = i.hcl, [E, k, L, B] = n.hcl;
19466            let V, q;
19467            if (isNaN(p) || isNaN(E)) isNaN(p) ? isNaN(E) ? V = NaN : (V = E, b !== 1 && b !== 0 || (q = k)) : (V = p, L !== 1 && L !== 0 || (q = v));
19468            else {
19469              let De = E - p;
19470              E > p && De > 180 ? De -= 360 : E < p && p - E > 180 && (De += 360), V = p + o * De;
19471            }
19472            const [W, Y, oe, he] = function([De, xe, ke, Ve]) {
19473              return De = isNaN(De) ? 0 : De * zt, yr([ke, Math.cos(De) * xe, Math.sin(De) * xe, Ve]);
19474            }([V, q ?? Yt(v, k, o), Yt(b, L, o), Yt(x, B, o)]);
19475            return new Mr(W, Y, oe, he, !1);
19476          }
19477          case "lab": {
19478            const [p, v, b, x] = yr(Xr(i.lab, n.lab, o));
19479            return new Mr(p, v, b, x, !1);
19480          }
19481        }
19482      }, array: Xr, padding: function(i, n, o) {
19483        return new mi(Xr(i.values, n.values, o));
19484      }, variableAnchorOffsetCollection: function(i, n, o) {
19485        const u = i.values, p = n.values;
19486        if (u.length !== p.length) throw new Cn(`Cannot interpolate values of different length. from: ${i.toString()}, to: ${n.toString()}`);
19487        const v = [];
19488        for (let b = 0; b < u.length; b += 2) {
19489          if (u[b] !== p[b]) throw new Cn(`Cannot interpolate values containing mismatched anchors. from[${b}]: ${u[b]}, to[${b}]: ${p[b]}`);
19490          v.push(u[b]);
19491          const [x, E] = u[b + 1], [k, L] = p[b + 1];
19492          v.push([Yt(x, k, o), Yt(E, L, o)]);
19493        }
19494        return new Nn(v);
19495      } };
19496      class kr {
19497        constructor(n, o, u, p, v) {
19498          this.type = n, this.operator = o, this.interpolation = u, this.input = p, this.labels = [], this.outputs = [];
19499          for (const [b, x] of v) this.labels.push(b), this.outputs.push(x);
19500        }
19501        static interpolationFactor(n, o, u, p) {
19502          let v = 0;
19503          if (n.name === "exponential") v = Ye(o, n.base, u, p);
19504          else if (n.name === "linear") v = Ye(o, 1, u, p);
19505          else if (n.name === "cubic-bezier") {
19506            const b = n.controlPoints;
19507            v = new mt(b[0], b[1], b[2], b[3]).solve(Ye(o, 1, u, p));
19508          }
19509          return v;
19510        }
19511        static parse(n, o) {
19512          let [u, p, v, ...b] = n;
19513          if (!Array.isArray(p) || p.length === 0) return o.error("Expected an interpolation type expression.", 1);
19514          if (p[0] === "linear") p = { name: "linear" };
19515          else if (p[0] === "exponential") {
19516            const k = p[1];
19517            if (typeof k != "number") return o.error("Exponential interpolation requires a numeric base.", 1, 1);
19518            p = { name: "exponential", base: k };
19519          } else {
19520            if (p[0] !== "cubic-bezier") return o.error(`Unknown interpolation type ${String(p[0])}`, 1, 0);
19521            {
19522              const k = p.slice(1);
19523              if (k.length !== 4 || k.some((L) => typeof L != "number" || L < 0 || L > 1)) return o.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.", 1);
19524              p = { name: "cubic-bezier", controlPoints: k };
19525            }
19526          }
19527          if (n.length - 1 < 4) return o.error(`Expected at least 4 arguments, but found only ${n.length - 1}.`);
19528          if ((n.length - 1) % 2 != 0) return o.error("Expected an even number of arguments.");
19529          if (v = o.parse(v, 2, ut), !v) return null;
19530          const x = [];
19531          let E = null;
19532          u === "interpolate-hcl" || u === "interpolate-lab" ? E = Ir : o.expectedType && o.expectedType.kind !== "value" && (E = o.expectedType);
19533          for (let k = 0; k < b.length; k += 2) {
19534            const L = b[k], B = b[k + 1], V = k + 3, q = k + 4;
19535            if (typeof L != "number") return o.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.', V);
19536            if (x.length && x[x.length - 1][0] >= L) return o.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.', V);
19537            const W = o.parse(B, q, E);
19538            if (!W) return null;
19539            E = E || W.type, x.push([L, W]);
19540          }
19541          return de(E, ut) || de(E, Ir) || de(E, Bi) || de(E, le) || de(E, U(ut)) ? new kr(E, u, p, v, x) : o.error(`Type ${A(E)} is not interpolatable.`);
19542        }
19543        evaluate(n) {
19544          const o = this.labels, u = this.outputs;
19545          if (o.length === 1) return u[0].evaluate(n);
19546          const p = this.input.evaluate(n);
19547          if (p <= o[0]) return u[0].evaluate(n);
19548          const v = o.length;
19549          if (p >= o[v - 1]) return u[v - 1].evaluate(n);
19550          const b = Pe(o, p), x = kr.interpolationFactor(this.interpolation, p, o[b], o[b + 1]), E = u[b].evaluate(n), k = u[b + 1].evaluate(n);
19551          switch (this.operator) {
19552            case "interpolate":
19553              return Zt[this.type.kind](E, k, x);
19554            case "interpolate-hcl":
19555              return Zt.color(E, k, x, "hcl");
19556            case "interpolate-lab":
19557              return Zt.color(E, k, x, "lab");
19558          }
19559        }
19560        eachChild(n) {
19561          n(this.input);
19562          for (const o of this.outputs) n(o);
19563        }
19564        outputDefined() {
19565          return this.outputs.every((n) => n.outputDefined());
19566        }
19567      }
19568      function Ye(i, n, o, u) {
19569        const p = u - o, v = i - o;
19570        return p === 0 ? 0 : n === 1 ? v / p : (Math.pow(n, v) - 1) / (Math.pow(n, p) - 1);
19571      }
19572      class Rt {
19573        constructor(n, o) {
19574          this.type = n, this.args = o;
19575        }
19576        static parse(n, o) {
19577          if (n.length < 2) return o.error("Expectected at least one argument.");
19578          let u = null;
19579          const p = o.expectedType;
19580          p && p.kind !== "value" && (u = p);
19581          const v = [];
19582          for (const x of n.slice(1)) {
19583            const E = o.parse(x, 1 + v.length, u, void 0, { typeAnnotation: "omit" });
19584            if (!E) return null;
19585            u = u || E.type, v.push(E);
19586          }
19587          if (!u) throw new Error("No output type");
19588          const b = p && v.some((x) => j(p, x.type));
19589          return new Rt(b ? kt : u, v);
19590        }
19591        evaluate(n) {
19592          let o, u = null, p = 0;
19593          for (const v of this.args) if (p++, u = v.evaluate(n), u && u instanceof Sn && !u.available && (o || (o = u.name), u = null, p === this.args.length && (u = o)), u !== null) break;
19594          return u;
19595        }
19596        eachChild(n) {
19597          this.args.forEach(n);
19598        }
19599        outputDefined() {
19600          return this.args.every((n) => n.outputDefined());
19601        }
19602      }
19603      function Rr(i, n) {
19604        return i === "==" || i === "!=" ? n.kind === "boolean" || n.kind === "string" || n.kind === "number" || n.kind === "null" || n.kind === "value" : n.kind === "string" || n.kind === "number" || n.kind === "value";
19605      }
19606      function $n(i, n, o, u) {
19607        return u.compare(n, o) === 0;
19608      }
19609      function ln(i, n, o) {
19610        const u = i !== "==" && i !== "!=";
19611        return class GP {
19612          constructor(v, b, x) {
19613            this.type = Ut, this.lhs = v, this.rhs = b, this.collator = x, this.hasUntypedArgument = v.type.kind === "value" || b.type.kind === "value";
19614          }
19615          static parse(v, b) {
19616            if (v.length !== 3 && v.length !== 4) return b.error("Expected two or three arguments.");
19617            const x = v[0];
19618            let E = b.parse(v[1], 1, kt);
19619            if (!E) return null;
19620            if (!Rr(x, E.type)) return b.concat(1).error(`"${x}" comparisons are not supported for type '${A(E.type)}'.`);
19621            let k = b.parse(v[2], 2, kt);
19622            if (!k) return null;
19623            if (!Rr(x, k.type)) return b.concat(2).error(`"${x}" comparisons are not supported for type '${A(k.type)}'.`);
19624            if (E.type.kind !== k.type.kind && E.type.kind !== "value" && k.type.kind !== "value") return b.error(`Cannot compare types '${A(E.type)}' and '${A(k.type)}'.`);
19625            u && (E.type.kind === "value" && k.type.kind !== "value" ? E = new Ni(k.type, [E]) : E.type.kind !== "value" && k.type.kind === "value" && (k = new Ni(E.type, [k])));
19626            let L = null;
19627            if (v.length === 4) {
19628              if (E.type.kind !== "string" && k.type.kind !== "string" && E.type.kind !== "value" && k.type.kind !== "value") return b.error("Cannot use collator to compare non-string types.");
19629              if (L = b.parse(v[3], 3, zn), !L) return null;
19630            }
19631            return new GP(E, k, L);
19632          }
19633          evaluate(v) {
19634            const b = this.lhs.evaluate(v), x = this.rhs.evaluate(v);
19635            if (u && this.hasUntypedArgument) {
19636              const E = rn(b), k = rn(x);
19637              if (E.kind !== k.kind || E.kind !== "string" && E.kind !== "number") throw new Cn(`Expected arguments for "${i}" to be (string, string) or (number, number), but found (${E.kind}, ${k.kind}) instead.`);
19638            }
19639            if (this.collator && !u && this.hasUntypedArgument) {
19640              const E = rn(b), k = rn(x);
19641              if (E.kind !== "string" || k.kind !== "string") return n(v, b, x);
19642            }
19643            return this.collator ? o(v, b, x, this.collator.evaluate(v)) : n(v, b, x);
19644          }
19645          eachChild(v) {
19646            v(this.lhs), v(this.rhs), this.collator && v(this.collator);
19647          }
19648          outputDefined() {
19649            return !0;
19650          }
19651        };
19652      }
19653      const uc = ln("==", function(i, n, o) {
19654        return n === o;
19655      }, $n), pu = ln("!=", function(i, n, o) {
19656        return n !== o;
19657      }, function(i, n, o, u) {
19658        return !$n(0, n, o, u);
19659      }), nn = ln("<", function(i, n, o) {
19660        return n < o;
19661      }, function(i, n, o, u) {
19662        return u.compare(n, o) < 0;
19663      }), mu = ln(">", function(i, n, o) {
19664        return n > o;
19665      }, function(i, n, o, u) {
19666        return u.compare(n, o) > 0;
19667      }), Nh = ln("<=", function(i, n, o) {
19668        return n <= o;
19669      }, function(i, n, o, u) {
19670        return u.compare(n, o) <= 0;
19671      }), ms = ln(">=", function(i, n, o) {
19672        return n >= o;
19673      }, function(i, n, o, u) {
19674        return u.compare(n, o) >= 0;
19675      });
19676      class Jo {
19677        constructor(n, o, u) {
19678          this.type = zn, this.locale = u, this.caseSensitive = n, this.diacriticSensitive = o;
19679        }
19680        static parse(n, o) {
19681          if (n.length !== 2) return o.error("Expected one argument.");
19682          const u = n[1];
19683          if (typeof u != "object" || Array.isArray(u)) return o.error("Collator options argument must be an object.");
19684          const p = o.parse(u["case-sensitive"] !== void 0 && u["case-sensitive"], 1, Ut);
19685          if (!p) return null;
19686          const v = o.parse(u["diacritic-sensitive"] !== void 0 && u["diacritic-sensitive"], 1, Ut);
19687          if (!v) return null;
19688          let b = null;
19689          return u.locale && (b = o.parse(u.locale, 1, er), !b) ? null : new Jo(p, v, b);
19690        }
19691        evaluate(n) {
19692          return new Aa(this.caseSensitive.evaluate(n), this.diacriticSensitive.evaluate(n), this.locale ? this.locale.evaluate(n) : null);
19693        }
19694        eachChild(n) {
19695          n(this.caseSensitive), n(this.diacriticSensitive), this.locale && n(this.locale);
19696        }
19697        outputDefined() {
19698          return !1;
19699        }
19700      }
19701      class cl {
19702        constructor(n, o, u, p, v) {
19703          this.type = er, this.number = n, this.locale = o, this.currency = u, this.minFractionDigits = p, this.maxFractionDigits = v;
19704        }
19705        static parse(n, o) {
19706          if (n.length !== 3) return o.error("Expected two arguments.");
19707          const u = o.parse(n[1], 1, ut);
19708          if (!u) return null;
19709          const p = n[2];
19710          if (typeof p != "object" || Array.isArray(p)) return o.error("NumberFormat options argument must be an object.");
19711          let v = null;
19712          if (p.locale && (v = o.parse(p.locale, 1, er), !v)) return null;
19713          let b = null;
19714          if (p.currency && (b = o.parse(p.currency, 1, er), !b)) return null;
19715          let x = null;
19716          if (p["min-fraction-digits"] && (x = o.parse(p["min-fraction-digits"], 1, ut), !x)) return null;
19717          let E = null;
19718          return p["max-fraction-digits"] && (E = o.parse(p["max-fraction-digits"], 1, ut), !E) ? null : new cl(u, v, b, x, E);
19719        }
19720        evaluate(n) {
19721          return new Intl.NumberFormat(this.locale ? this.locale.evaluate(n) : [], { style: this.currency ? "currency" : "decimal", currency: this.currency ? this.currency.evaluate(n) : void 0, minimumFractionDigits: this.minFractionDigits ? this.minFractionDigits.evaluate(n) : void 0, maximumFractionDigits: this.maxFractionDigits ? this.maxFractionDigits.evaluate(n) : void 0 }).format(this.number.evaluate(n));
19722        }
19723        eachChild(n) {
19724          n(this.number), this.locale && n(this.locale), this.currency && n(this.currency), this.minFractionDigits && n(this.minFractionDigits), this.maxFractionDigits && n(this.maxFractionDigits);
19725        }
19726        outputDefined() {
19727          return !1;
19728        }
19729      }
19730      class Pa {
19731        constructor(n) {
19732          this.type = zi, this.sections = n;
19733        }
19734        static parse(n, o) {
19735          if (n.length < 2) return o.error("Expected at least one argument.");
19736          const u = n[1];
19737          if (!Array.isArray(u) && typeof u == "object") return o.error("First argument must be an image or text section.");
19738          const p = [];
19739          let v = !1;
19740          for (let b = 1; b <= n.length - 1; ++b) {
19741            const x = n[b];
19742            if (v && typeof x == "object" && !Array.isArray(x)) {
19743              v = !1;
19744              let E = null;
19745              if (x["font-scale"] && (E = o.parse(x["font-scale"], 1, ut), !E)) return null;
19746              let k = null;
19747              if (x["text-font"] && (k = o.parse(x["text-font"], 1, U(er)), !k)) return null;
19748              let L = null;
19749              if (x["text-color"] && (L = o.parse(x["text-color"], 1, Ir), !L)) return null;
19750              const B = p[p.length - 1];
19751              B.scale = E, B.font = k, B.textColor = L;
19752            } else {
19753              const E = o.parse(n[b], 1, kt);
19754              if (!E) return null;
19755              const k = E.type.kind;
19756              if (k !== "string" && k !== "value" && k !== "null" && k !== "resolvedImage") return o.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");
19757              v = !0, p.push({ content: E, scale: null, font: null, textColor: null });
19758            }
19759          }
19760          return new Pa(p);
19761        }
19762        evaluate(n) {
19763          return new zr(this.sections.map((o) => {
19764            const u = o.content.evaluate(n);
19765            return rn(u) === mn ? new Ca("", u, null, null, null) : new Ca(Xo(u), null, o.scale ? o.scale.evaluate(n) : null, o.font ? o.font.evaluate(n).join(",") : null, o.textColor ? o.textColor.evaluate(n) : null);
19766          }));
19767        }
19768        eachChild(n) {
19769          for (const o of this.sections) n(o.content), o.scale && n(o.scale), o.font && n(o.font), o.textColor && n(o.textColor);
19770        }
19771        outputDefined() {
19772          return !1;
19773        }
19774      }
19775      class Ma {
19776        constructor(n) {
19777          this.type = mn, this.input = n;
19778        }
19779        static parse(n, o) {
19780          if (n.length !== 2) return o.error("Expected two arguments.");
19781          const u = o.parse(n[1], 1, er);
19782          return u ? new Ma(u) : o.error("No image name provided.");
19783        }
19784        evaluate(n) {
19785          const o = this.input.evaluate(n), u = Sn.fromString(o);
19786          return u && n.availableImages && (u.available = n.availableImages.indexOf(o) > -1), u;
19787        }
19788        eachChild(n) {
19789          n(this.input);
19790        }
19791        outputDefined() {
19792          return !1;
19793        }
19794      }
19795      class ul {
19796        constructor(n) {
19797          this.type = ut, this.input = n;
19798        }
19799        static parse(n, o) {
19800          if (n.length !== 2) return o.error(`Expected 1 argument, but found ${n.length - 1} instead.`);
19801          const u = o.parse(n[1], 1);
19802          return u ? u.type.kind !== "array" && u.type.kind !== "string" && u.type.kind !== "value" ? o.error(`Expected argument of type string or array, but found ${A(u.type)} instead.`) : new ul(u) : null;
19803        }
19804        evaluate(n) {
19805          const o = this.input.evaluate(n);
19806          if (typeof o == "string") return [...o].length;
19807          if (Array.isArray(o)) return o.length;
19808          throw new Cn(`Expected value to be of type string or array, but found ${A(rn(o))} instead.`);
19809        }
19810        eachChild(n) {
19811          n(this.input);
19812        }
19813        outputDefined() {
19814          return !1;
19815        }
19816      }
19817      const ns = 8192;
19818      function $h(i, n) {
19819        const o = (180 + i[0]) / 360, u = (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + i[1] * Math.PI / 360))) / 360, p = Math.pow(2, n.z);
19820        return [Math.round(o * p * ns), Math.round(u * p * ns)];
19821      }
19822      function hc(i, n) {
19823        const o = Math.pow(2, n.z);
19824        return [(p = (i[0] / ns + n.x) / o, 360 * p - 180), (u = (i[1] / ns + n.y) / o, 360 / Math.PI * Math.atan(Math.exp((180 - 360 * u) * Math.PI / 180)) - 90)];
19825        var u, p;
19826      }
19827      function Io(i, n) {
19828        i[0] = Math.min(i[0], n[0]), i[1] = Math.min(i[1], n[1]), i[2] = Math.max(i[2], n[0]), i[3] = Math.max(i[3], n[1]);
19829      }
19830      function Fs(i, n) {
19831        return !(i[0] <= n[0] || i[2] >= n[2] || i[1] <= n[1] || i[3] >= n[3]);
19832      }
19833      function Or(i, n, o) {
19834        const u = i[0] - n[0], p = i[1] - n[1], v = i[0] - o[0], b = i[1] - o[1];
19835        return u * b - v * p == 0 && u * v <= 0 && p * b <= 0;
19836      }
19837      function ka(i, n, o, u) {
19838        return (p = [u[0] - o[0], u[1] - o[1]])[0] * (v = [n[0] - i[0], n[1] - i[1]])[1] - p[1] * v[0] != 0 && !(!is(i, n, o, u) || !is(o, u, i, n));
19839        var p, v;
19840      }
19841      function jh(i, n, o) {
19842        for (const u of o) for (let p = 0; p < u.length - 1; ++p) if (ka(i, n, u[p], u[p + 1])) return !0;
19843        return !1;
19844      }
19845      function Yo(i, n, o = !1) {
19846        let u = !1;
19847        for (const x of n) for (let E = 0; E < x.length - 1; E++) {
19848          if (Or(i, x[E], x[E + 1])) return o;
19849          (v = x[E])[1] > (p = i)[1] != (b = x[E + 1])[1] > p[1] && p[0] < (b[0] - v[0]) * (p[1] - v[1]) / (b[1] - v[1]) + v[0] && (u = !u);
19850        }
19851        var p, v, b;
19852        return u;
19853      }
19854      function hl(i, n) {
19855        for (const o of n) if (Yo(i, o)) return !0;
19856        return !1;
19857      }
19858      function fl(i, n) {
19859        for (const o of i) if (!Yo(o, n)) return !1;
19860        for (let o = 0; o < i.length - 1; ++o) if (jh(i[o], i[o + 1], n)) return !1;
19861        return !0;
19862      }
19863      function gu(i, n) {
19864        for (const o of n) if (fl(i, o)) return !0;
19865        return !1;
19866      }
19867      function is(i, n, o, u) {
19868        const p = u[0] - o[0], v = u[1] - o[1], b = (i[0] - o[0]) * v - p * (i[1] - o[1]), x = (n[0] - o[0]) * v - p * (n[1] - o[1]);
19869        return b > 0 && x < 0 || b < 0 && x > 0;
19870      }
19871      function dl(i, n, o) {
19872        const u = [];
19873        for (let p = 0; p < i.length; p++) {
19874          const v = [];
19875          for (let b = 0; b < i[p].length; b++) {
19876            const x = $h(i[p][b], o);
19877            Io(n, x), v.push(x);
19878          }
19879          u.push(v);
19880        }
19881        return u;
19882      }
19883      function fc(i, n, o) {
19884        const u = [];
19885        for (let p = 0; p < i.length; p++) {
19886          const v = dl(i[p], n, o);
19887          u.push(v);
19888        }
19889        return u;
19890      }
19891      function yu(i, n, o, u) {
19892        if (i[0] < o[0] || i[0] > o[2]) {
19893          const p = 0.5 * u;
19894          let v = i[0] - o[0] > p ? -u : o[0] - i[0] > p ? u : 0;
19895          v === 0 && (v = i[0] - o[2] > p ? -u : o[2] - i[0] > p ? u : 0), i[0] += v;
19896        }
19897        Io(n, i);
19898      }
19899      function dc(i, n, o, u) {
19900        const p = Math.pow(2, u.z) * ns, v = [u.x * ns, u.y * ns], b = [];
19901        for (const x of i) for (const E of x) {
19902          const k = [E.x + v[0], E.y + v[1]];
19903          yu(k, n, o, p), b.push(k);
19904        }
19905        return b;
19906      }
19907      function Oa(i, n, o, u) {
19908        const p = Math.pow(2, u.z) * ns, v = [u.x * ns, u.y * ns], b = [];
19909        for (const E of i) {
19910          const k = [];
19911          for (const L of E) {
19912            const B = [L.x + v[0], L.y + v[1]];
19913            Io(n, B), k.push(B);
19914          }
19915          b.push(k);
19916        }
19917        if (n[2] - n[0] <= p / 2) {
19918          (x = n)[0] = x[1] = 1 / 0, x[2] = x[3] = -1 / 0;
19919          for (const E of b) for (const k of E) yu(k, n, o, p);
19920        }
19921        var x;
19922        return b;
19923      }
19924      class so {
19925        constructor(n, o) {
19926          this.type = Ut, this.geojson = n, this.geometries = o;
19927        }
19928        static parse(n, o) {
19929          if (n.length !== 2) return o.error(`'within' expression requires exactly one argument, but found ${n.length - 1} instead.`);
19930          if (Pi(n[1])) {
19931            const u = n[1];
19932            if (u.type === "FeatureCollection") {
19933              const p = [];
19934              for (const v of u.features) {
19935                const { type: b, coordinates: x } = v.geometry;
19936                b === "Polygon" && p.push(x), b === "MultiPolygon" && p.push(...x);
19937              }
19938              if (p.length) return new so(u, { type: "MultiPolygon", coordinates: p });
19939            } else if (u.type === "Feature") {
19940              const p = u.geometry.type;
19941              if (p === "Polygon" || p === "MultiPolygon") return new so(u, u.geometry);
19942            } else if (u.type === "Polygon" || u.type === "MultiPolygon") return new so(u, u);
19943          }
19944          return o.error("'within' expression requires valid geojson object that contains polygon geometry type.");
19945        }
19946        evaluate(n) {
19947          if (n.geometry() != null && n.canonicalID() != null) {
19948            if (n.geometryType() === "Point") return function(o, u) {
19949              const p = [1 / 0, 1 / 0, -1 / 0, -1 / 0], v = [1 / 0, 1 / 0, -1 / 0, -1 / 0], b = o.canonicalID();
19950              if (u.type === "Polygon") {
19951                const x = dl(u.coordinates, v, b), E = dc(o.geometry(), p, v, b);
19952                if (!Fs(p, v)) return !1;
19953                for (const k of E) if (!Yo(k, x)) return !1;
19954              }
19955              if (u.type === "MultiPolygon") {
19956                const x = fc(u.coordinates, v, b), E = dc(o.geometry(), p, v, b);
19957                if (!Fs(p, v)) return !1;
19958                for (const k of E) if (!hl(k, x)) return !1;
19959              }
19960              return !0;
19961            }(n, this.geometries);
19962            if (n.geometryType() === "LineString") return function(o, u) {
19963              const p = [1 / 0, 1 / 0, -1 / 0, -1 / 0], v = [1 / 0, 1 / 0, -1 / 0, -1 / 0], b = o.canonicalID();
19964              if (u.type === "Polygon") {
19965                const x = dl(u.coordinates, v, b), E = Oa(o.geometry(), p, v, b);
19966                if (!Fs(p, v)) return !1;
19967                for (const k of E) if (!fl(k, x)) return !1;
19968              }
19969              if (u.type === "MultiPolygon") {
19970                const x = fc(u.coordinates, v, b), E = Oa(o.geometry(), p, v, b);
19971                if (!Fs(p, v)) return !1;
19972                for (const k of E) if (!gu(k, x)) return !1;
19973              }
19974              return !0;
19975            }(n, this.geometries);
19976          }
19977          return !1;
19978        }
19979        eachChild() {
19980        }
19981        outputDefined() {
19982          return !0;
19983        }
19984      }
19985      let pc = class {
19986        constructor(i = [], n = (o, u) => o < u ? -1 : o > u ? 1 : 0) {
19987          if (this.data = i, this.length = this.data.length, this.compare = n, this.length > 0) for (let o = (this.length >> 1) - 1; o >= 0; o--) this._down(o);
19988        }
19989        push(i) {
19990          this.data.push(i), this._up(this.length++);
19991        }
19992        pop() {
19993          if (this.length === 0) return;
19994          const i = this.data[0], n = this.data.pop();
19995          return --this.length > 0 && (this.data[0] = n, this._down(0)), i;
19996        }
19997        peek() {
19998          return this.data[0];
19999        }
20000        _up(i) {
20001          const { data: n, compare: o } = this, u = n[i];
20002          for (; i > 0; ) {
20003            const p = i - 1 >> 1, v = n[p];
20004            if (o(u, v) >= 0) break;
20005            n[i] = v, i = p;
20006          }
20007          n[i] = u;
20008        }
20009        _down(i) {
20010          const { data: n, compare: o } = this, u = this.length >> 1, p = n[i];
20011          for (; i < u; ) {
20012            let v = 1 + (i << 1);
20013            const b = v + 1;
20014            if (b < this.length && o(n[b], n[v]) < 0 && (v = b), o(n[v], p) >= 0) break;
20015            n[i] = n[v], i = v;
20016          }
20017          n[i] = p;
20018        }
20019      };
20020      function Vh(i, n, o, u, p) {
20021        oo(i, n, o, u || i.length - 1, p || Uh);
20022      }
20023      function oo(i, n, o, u, p) {
20024        for (; u > o; ) {
20025          if (u - o > 600) {
20026            var v = u - o + 1, b = n - o + 1, x = Math.log(v), E = 0.5 * Math.exp(2 * x / 3), k = 0.5 * Math.sqrt(x * E * (v - E) / v) * (b - v / 2 < 0 ? -1 : 1);
20027            oo(i, n, Math.max(o, Math.floor(n - b * E / v + k)), Math.min(u, Math.floor(n + (v - b) * E / v + k)), p);
20028          }
20029          var L = i[n], B = o, V = u;
20030          for (Qo(i, o, n), p(i[u], L) > 0 && Qo(i, o, u); B < V; ) {
20031            for (Qo(i, B, V), B++, V--; p(i[B], L) < 0; ) B++;
20032            for (; p(i[V], L) > 0; ) V--;
20033          }
20034          p(i[o], L) === 0 ? Qo(i, o, V) : Qo(i, ++V, u), V <= n && (o = V + 1), n <= V && (u = V - 1);
20035        }
20036      }
20037      function Qo(i, n, o) {
20038        var u = i[n];
20039        i[n] = i[o], i[o] = u;
20040      }
20041      function Uh(i, n) {
20042        return i < n ? -1 : i > n ? 1 : 0;
20043      }
20044      function pl(i, n) {
20045        if (i.length <= 1) return [i];
20046        const o = [];
20047        let u, p;
20048        for (const v of i) {
20049          const b = Da(v);
20050          b !== 0 && (v.area = Math.abs(b), p === void 0 && (p = b < 0), p === b < 0 ? (u && o.push(u), u = [v]) : u.push(v));
20051        }
20052        if (u && o.push(u), n > 1) for (let v = 0; v < o.length; v++) o[v].length <= n || (Vh(o[v], n, 1, o[v].length - 1, mc), o[v] = o[v].slice(0, n));
20053        return o;
20054      }
20055      function mc(i, n) {
20056        return n.area - i.area;
20057      }
20058      function Da(i) {
20059        let n = 0;
20060        for (let o, u, p = 0, v = i.length, b = v - 1; p < v; b = p++) o = i[p], u = i[b], n += (u.x - o.x) * (o.y + u.y);
20061        return n;
20062      }
20063      const ml = 1 / 298.257223563, gl = ml * (2 - ml), yl = Math.PI / 180;
20064      class Po {
20065        constructor(n) {
20066          const o = 6378.137 * yl * 1e3, u = Math.cos(n * yl), p = 1 / (1 - gl * (1 - u * u)), v = Math.sqrt(p);
20067          this.kx = o * v * u, this.ky = o * v * p * (1 - gl);
20068        }
20069        distance(n, o) {
20070          const u = this.wrap(n[0] - o[0]) * this.kx, p = (n[1] - o[1]) * this.ky;
20071          return Math.sqrt(u * u + p * p);
20072        }
20073        pointOnLine(n, o) {
20074          let u, p, v, b, x = 1 / 0;
20075          for (let E = 0; E < n.length - 1; E++) {
20076            let k = n[E][0], L = n[E][1], B = this.wrap(n[E + 1][0] - k) * this.kx, V = (n[E + 1][1] - L) * this.ky, q = 0;
20077            B === 0 && V === 0 || (q = (this.wrap(o[0] - k) * this.kx * B + (o[1] - L) * this.ky * V) / (B * B + V * V), q > 1 ? (k = n[E + 1][0], L = n[E + 1][1]) : q > 0 && (k += B / this.kx * q, L += V / this.ky * q)), B = this.wrap(o[0] - k) * this.kx, V = (o[1] - L) * this.ky;
20078            const W = B * B + V * V;
20079            W < x && (x = W, u = k, p = L, v = E, b = q);
20080          }
20081          return { point: [u, p], index: v, t: Math.max(0, Math.min(1, b)) };
20082        }
20083        wrap(n) {
20084          for (; n < -180; ) n += 360;
20085          for (; n > 180; ) n -= 360;
20086          return n;
20087        }
20088      }
20089      function _u(i, n) {
20090        return n[0] - i[0];
20091      }
20092      function _l(i) {
20093        return i[1] - i[0] + 1;
20094      }
20095      function zs(i, n) {
20096        return i[1] >= i[0] && i[1] < n;
20097      }
20098      function gc(i, n) {
20099        if (i[0] > i[1]) return [null, null];
20100        const o = _l(i);
20101        if (n) {
20102          if (o === 2) return [i, null];
20103          const p = Math.floor(o / 2);
20104          return [[i[0], i[0] + p], [i[0] + p, i[1]]];
20105        }
20106        if (o === 1) return [i, null];
20107        const u = Math.floor(o / 2) - 1;
20108        return [[i[0], i[0] + u], [i[0] + u + 1, i[1]]];
20109      }
20110      function yc(i, n) {
20111        if (!zs(n, i.length)) return [1 / 0, 1 / 0, -1 / 0, -1 / 0];
20112        const o = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
20113        for (let u = n[0]; u <= n[1]; ++u) Io(o, i[u]);
20114        return o;
20115      }
20116      function vl(i) {
20117        const n = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
20118        for (const o of i) for (const u of o) Io(n, u);
20119        return n;
20120      }
20121      function ea(i) {
20122        return i[0] !== -1 / 0 && i[1] !== -1 / 0 && i[2] !== 1 / 0 && i[3] !== 1 / 0;
20123      }
20124      function Bs(i, n, o) {
20125        if (!ea(i) || !ea(n)) return NaN;
20126        let u = 0, p = 0;
20127        return i[2] < n[0] && (u = n[0] - i[2]), i[0] > n[2] && (u = i[0] - n[2]), i[1] > n[3] && (p = i[1] - n[3]), i[3] < n[1] && (p = n[1] - i[3]), o.distance([0, 0], [u, p]);
20128      }
20129      function ii(i, n, o) {
20130        const u = o.pointOnLine(n, i);
20131        return o.distance(i, u.point);
20132      }
20133      function Ns(i, n, o, u, p) {
20134        const v = Math.min(ii(i, [o, u], p), ii(n, [o, u], p)), b = Math.min(ii(o, [i, n], p), ii(u, [i, n], p));
20135        return Math.min(v, b);
20136      }
20137      function bl(i, n, o, u, p) {
20138        if (!zs(n, i.length) || !zs(u, o.length)) return 1 / 0;
20139        let v = 1 / 0;
20140        for (let b = n[0]; b < n[1]; ++b) {
20141          const x = i[b], E = i[b + 1];
20142          for (let k = u[0]; k < u[1]; ++k) {
20143            const L = o[k], B = o[k + 1];
20144            if (ka(x, E, L, B)) return 0;
20145            v = Math.min(v, Ns(x, E, L, B, p));
20146          }
20147        }
20148        return v;
20149      }
20150      function Gr(i, n, o, u, p) {
20151        if (!zs(n, i.length) || !zs(u, o.length)) return NaN;
20152        let v = 1 / 0;
20153        for (let b = n[0]; b <= n[1]; ++b) for (let x = u[0]; x <= u[1]; ++x) if (v = Math.min(v, p.distance(i[b], o[x])), v === 0) return v;
20154        return v;
20155      }
20156      function qh(i, n, o) {
20157        if (Yo(i, n, !0)) return 0;
20158        let u = 1 / 0;
20159        for (const p of n) {
20160          const v = p[0], b = p[p.length - 1];
20161          if (v !== b && (u = Math.min(u, ii(i, [b, v], o)), u === 0)) return u;
20162          const x = o.pointOnLine(p, i);
20163          if (u = Math.min(u, o.distance(i, x.point)), u === 0) return u;
20164        }
20165        return u;
20166      }
20167      function cr(i, n, o, u) {
20168        if (!zs(n, i.length)) return NaN;
20169        for (let v = n[0]; v <= n[1]; ++v) if (Yo(i[v], o, !0)) return 0;
20170        let p = 1 / 0;
20171        for (let v = n[0]; v < n[1]; ++v) {
20172          const b = i[v], x = i[v + 1];
20173          for (const E of o) for (let k = 0, L = E.length, B = L - 1; k < L; B = k++) {
20174            const V = E[B], q = E[k];
20175            if (ka(b, x, V, q)) return 0;
20176            p = Math.min(p, Ns(b, x, V, q, u));
20177          }
20178        }
20179        return p;
20180      }
20181      function ao(i, n) {
20182        for (const o of i) for (const u of o) if (Yo(u, n, !0)) return !0;
20183        return !1;
20184      }
20185      function Wr(i, n, o, u = 1 / 0) {
20186        const p = vl(i), v = vl(n);
20187        if (u !== 1 / 0 && Bs(p, v, o) >= u) return u;
20188        if (Fs(p, v)) {
20189          if (ao(i, n)) return 0;
20190        } else if (ao(n, i)) return 0;
20191        let b = 1 / 0;
20192        for (const x of i) for (let E = 0, k = x.length, L = k - 1; E < k; L = E++) {
20193          const B = x[L], V = x[E];
20194          for (const q of n) for (let W = 0, Y = q.length, oe = Y - 1; W < Y; oe = W++) {
20195            const he = q[oe], De = q[W];
20196            if (ka(B, V, he, De)) return 0;
20197            b = Math.min(b, Ns(B, V, he, De, o));
20198          }
20199        }
20200        return b;
20201      }
20202      function jr(i, n, o, u, p, v) {
20203        if (!v) return;
20204        const b = Bs(yc(u, v), p, o);
20205        b < n && i.push([b, v, [0, 0]]);
20206      }
20207      function Mo(i, n, o, u, p, v, b) {
20208        if (!v || !b) return;
20209        const x = Bs(yc(u, v), yc(p, b), o);
20210        x < n && i.push([x, v, b]);
20211      }
20212      function Ra(i, n, o, u, p = 1 / 0) {
20213        let v = Math.min(u.distance(i[0], o[0][0]), p);
20214        if (v === 0) return v;
20215        const b = new pc([[0, [0, i.length - 1], [0, 0]]], _u), x = vl(o);
20216        for (; b.length > 0; ) {
20217          const E = b.pop();
20218          if (E[0] >= v) continue;
20219          const k = E[1], L = n ? 50 : 100;
20220          if (_l(k) <= L) {
20221            if (!zs(k, i.length)) return NaN;
20222            if (n) {
20223              const B = cr(i, k, o, u);
20224              if (isNaN(B) || B === 0) return B;
20225              v = Math.min(v, B);
20226            } else for (let B = k[0]; B <= k[1]; ++B) {
20227              const V = qh(i[B], o, u);
20228              if (v = Math.min(v, V), v === 0) return 0;
20229            }
20230          } else {
20231            const B = gc(k, n);
20232            jr(b, v, u, i, x, B[0]), jr(b, v, u, i, x, B[1]);
20233          }
20234        }
20235        return v;
20236      }
20237      function ta(i, n, o, u, p, v = 1 / 0) {
20238        let b = Math.min(v, p.distance(i[0], o[0]));
20239        if (b === 0) return b;
20240        const x = new pc([[0, [0, i.length - 1], [0, o.length - 1]]], _u);
20241        for (; x.length > 0; ) {
20242          const E = x.pop();
20243          if (E[0] >= b) continue;
20244          const k = E[1], L = E[2], B = n ? 50 : 100, V = u ? 50 : 100;
20245          if (_l(k) <= B && _l(L) <= V) {
20246            if (!zs(k, i.length) && zs(L, o.length)) return NaN;
20247            let q;
20248            if (n && u) q = bl(i, k, o, L, p), b = Math.min(b, q);
20249            else if (n && !u) {
20250              const W = i.slice(k[0], k[1] + 1);
20251              for (let Y = L[0]; Y <= L[1]; ++Y) if (q = ii(o[Y], W, p), b = Math.min(b, q), b === 0) return b;
20252            } else if (!n && u) {
20253              const W = o.slice(L[0], L[1] + 1);
20254              for (let Y = k[0]; Y <= k[1]; ++Y) if (q = ii(i[Y], W, p), b = Math.min(b, q), b === 0) return b;
20255            } else q = Gr(i, k, o, L, p), b = Math.min(b, q);
20256          } else {
20257            const q = gc(k, n), W = gc(L, u);
20258            Mo(x, b, p, i, o, q[0], W[0]), Mo(x, b, p, i, o, q[0], W[1]), Mo(x, b, p, i, o, q[1], W[0]), Mo(x, b, p, i, o, q[1], W[1]);
20259          }
20260        }
20261        return b;
20262      }
20263      function xl(i) {
20264        return i.type === "MultiPolygon" ? i.coordinates.map((n) => ({ type: "Polygon", coordinates: n })) : i.type === "MultiLineString" ? i.coordinates.map((n) => ({ type: "LineString", coordinates: n })) : i.type === "MultiPoint" ? i.coordinates.map((n) => ({ type: "Point", coordinates: n })) : [i];
20265      }
20266      class gs {
20267        constructor(n, o) {
20268          this.type = ut, this.geojson = n, this.geometries = o;
20269        }
20270        static parse(n, o) {
20271          if (n.length !== 2) return o.error(`'distance' expression requires exactly one argument, but found ${n.length - 1} instead.`);
20272          if (Pi(n[1])) {
20273            const u = n[1];
20274            if (u.type === "FeatureCollection") return new gs(u, u.features.map((p) => xl(p.geometry)).flat());
20275            if (u.type === "Feature") return new gs(u, xl(u.geometry));
20276            if ("type" in u && "coordinates" in u) return new gs(u, xl(u));
20277          }
20278          return o.error("'distance' expression requires valid geojson object that contains polygon geometry type.");
20279        }
20280        evaluate(n) {
20281          if (n.geometry() != null && n.canonicalID() != null) {
20282            if (n.geometryType() === "Point") return function(o, u) {
20283              const p = o.geometry(), v = p.flat().map((E) => hc([E.x, E.y], o.canonical));
20284              if (p.length === 0) return NaN;
20285              const b = new Po(v[0][1]);
20286              let x = 1 / 0;
20287              for (const E of u) {
20288                switch (E.type) {
20289                  case "Point":
20290                    x = Math.min(x, ta(v, !1, [E.coordinates], !1, b, x));
20291                    break;
20292                  case "LineString":
20293                    x = Math.min(x, ta(v, !1, E.coordinates, !0, b, x));
20294                    break;
20295                  case "Polygon":
20296                    x = Math.min(x, Ra(v, !1, E.coordinates, b, x));
20297                }
20298                if (x === 0) return x;
20299              }
20300              return x;
20301            }(n, this.geometries);
20302            if (n.geometryType() === "LineString") return function(o, u) {
20303              const p = o.geometry(), v = p.flat().map((E) => hc([E.x, E.y], o.canonical));
20304              if (p.length === 0) return NaN;
20305              const b = new Po(v[0][1]);
20306              let x = 1 / 0;
20307              for (const E of u) {
20308                switch (E.type) {
20309                  case "Point":
20310                    x = Math.min(x, ta(v, !0, [E.coordinates], !1, b, x));
20311                    break;
20312                  case "LineString":
20313                    x = Math.min(x, ta(v, !0, E.coordinates, !0, b, x));
20314                    break;
20315                  case "Polygon":
20316                    x = Math.min(x, Ra(v, !0, E.coordinates, b, x));
20317                }
20318                if (x === 0) return x;
20319              }
20320              return x;
20321            }(n, this.geometries);
20322            if (n.geometryType() === "Polygon") return function(o, u) {
20323              const p = o.geometry();
20324              if (p.length === 0 || p[0].length === 0) return NaN;
20325              const v = pl(p, 0).map((E) => E.map((k) => k.map((L) => hc([L.x, L.y], o.canonical)))), b = new Po(v[0][0][0][1]);
20326              let x = 1 / 0;
20327              for (const E of u) for (const k of v) {
20328                switch (E.type) {
20329                  case "Point":
20330                    x = Math.min(x, Ra([E.coordinates], !1, k, b, x));
20331                    break;
20332                  case "LineString":
20333                    x = Math.min(x, Ra(E.coordinates, !0, k, b, x));
20334                    break;
20335                  case "Polygon":
20336                    x = Math.min(x, Wr(k, E.coordinates, b, x));
20337                }
20338                if (x === 0) return x;
20339              }
20340              return x;
20341            }(n, this.geometries);
20342          }
20343          return NaN;
20344        }
20345        eachChild() {
20346        }
20347        outputDefined() {
20348          return !0;
20349        }
20350      }
20351      const ss = { "==": uc, "!=": pu, ">": mu, "<": nn, ">=": ms, "<=": Nh, array: Ni, at: T, boolean: Ni, case: ve, coalesce: Rt, collator: Jo, format: Pa, image: Ma, in: D, "index-of": Z, interpolate: kr, "interpolate-hcl": kr, "interpolate-lab": kr, length: ul, let: io, literal: rs, match: ce, number: Ni, "number-format": cl, object: Ni, slice: we, step: tt, string: Ni, "to-boolean": $i, "to-color": $i, "to-number": $i, "to-string": $i, var: wr, within: so, distance: gs };
20352      class ji {
20353        constructor(n, o, u, p) {
20354          this.name = n, this.type = o, this._evaluate = u, this.args = p;
20355        }
20356        evaluate(n) {
20357          return this._evaluate(n, this.args);
20358        }
20359        eachChild(n) {
20360          this.args.forEach(n);
20361        }
20362        outputDefined() {
20363          return !1;
20364        }
20365        static parse(n, o) {
20366          const u = n[0], p = ji.definitions[u];
20367          if (!p) return o.error(`Unknown expression "${u}". If you wanted a literal array, use ["literal", [...]].`, 0);
20368          const v = Array.isArray(p) ? p[0] : p.type, b = Array.isArray(p) ? [[p[1], p[2]]] : p.overloads, x = b.filter(([k]) => !Array.isArray(k) || k.length === n.length - 1);
20369          let E = null;
20370          for (const [k, L] of x) {
20371            E = new Co(o.registry, La, o.path, null, o.scope);
20372            const B = [];
20373            let V = !1;
20374            for (let q = 1; q < n.length; q++) {
20375              const W = n[q], Y = Array.isArray(k) ? k[q - 1] : k.type, oe = E.parse(W, 1 + B.length, Y);
20376              if (!oe) {
20377                V = !0;
20378                break;
20379              }
20380              B.push(oe);
20381            }
20382            if (!V) if (Array.isArray(k) && k.length !== B.length) E.error(`Expected ${k.length} arguments, but found ${B.length} instead.`);
20383            else {
20384              for (let q = 0; q < B.length; q++) {
20385                const W = Array.isArray(k) ? k[q] : k.type, Y = B[q];
20386                E.concat(q + 1).checkSubtype(W, Y.type);
20387              }
20388              if (E.errors.length === 0) return new ji(u, v, L, B);
20389            }
20390          }
20391          if (x.length === 1) o.errors.push(...E.errors);
20392          else {
20393            const k = (x.length ? x : b).map(([B]) => {
20394              return V = B, Array.isArray(V) ? `(${V.map(A).join(", ")})` : `(${A(V.type)}...)`;
20395              var V;
20396            }).join(" | "), L = [];
20397            for (let B = 1; B < n.length; B++) {
20398              const V = o.parse(n[B], 1 + L.length);
20399              if (!V) return null;
20400              L.push(A(V.type));
20401            }
20402            o.error(`Expected arguments of type ${k}, but found (${L.join(", ")}) instead.`);
20403          }
20404          return null;
20405        }
20406        static register(n, o) {
20407          ji.definitions = o;
20408          for (const u in o) n[u] = ji;
20409        }
20410      }
20411      function ys(i, [n, o, u, p]) {
20412        n = n.evaluate(i), o = o.evaluate(i), u = u.evaluate(i);
20413        const v = p ? p.evaluate(i) : 1, b = Ls(n, o, u, v);
20414        if (b) throw new Cn(b);
20415        return new Mr(n / 255, o / 255, u / 255, v, !1);
20416      }
20417      function _c(i, n) {
20418        return i in n;
20419      }
20420      function $s(i, n) {
20421        const o = n[i];
20422        return o === void 0 ? null : o;
20423      }
20424      function lo(i) {
20425        return { type: i };
20426      }
20427      function La(i) {
20428        if (i instanceof wr) return La(i.boundExpression);
20429        if (i instanceof ji && i.name === "error" || i instanceof Jo || i instanceof so || i instanceof gs) return !1;
20430        const n = i instanceof $i || i instanceof Ni;
20431        let o = !0;
20432        return i.eachChild((u) => {
20433          o = n ? o && La(u) : o && u instanceof rs;
20434        }), !!o && co(i) && ra(i, ["zoom", "heatmap-density", "line-progress", "accumulated", "is-supported-script"]);
20435      }
20436      function co(i) {
20437        if (i instanceof ji && (i.name === "get" && i.args.length === 1 || i.name === "feature-state" || i.name === "has" && i.args.length === 1 || i.name === "properties" || i.name === "geometry-type" || i.name === "id" || /^filter-/.test(i.name)) || i instanceof so || i instanceof gs) return !1;
20438        let n = !0;
20439        return i.eachChild((o) => {
20440          n && !co(o) && (n = !1);
20441        }), n;
20442      }
20443      function uo(i) {
20444        if (i instanceof ji && i.name === "feature-state") return !1;
20445        let n = !0;
20446        return i.eachChild((o) => {
20447          n && !uo(o) && (n = !1);
20448        }), n;
20449      }
20450      function ra(i, n) {
20451        if (i instanceof ji && n.indexOf(i.name) >= 0) return !1;
20452        let o = !0;
20453        return i.eachChild((u) => {
20454          o && !ra(u, n) && (o = !1);
20455        }), o;
20456      }
20457      function Fa(i) {
20458        return { result: "success", value: i };
20459      }
20460      function ko(i) {
20461        return { result: "error", value: i };
20462      }
20463      function _s(i) {
20464        return i["property-type"] === "data-driven" || i["property-type"] === "cross-faded-data-driven";
20465      }
20466      function vc(i) {
20467        return !!i.expression && i.expression.parameters.indexOf("zoom") > -1;
20468      }
20469      function bc(i) {
20470        return !!i.expression && i.expression.interpolated;
20471      }
20472      function be(i) {
20473        return i instanceof Number ? "number" : i instanceof String ? "string" : i instanceof Boolean ? "boolean" : Array.isArray(i) ? "array" : i === null ? "null" : typeof i;
20474      }
20475      function Ue(i) {
20476        return typeof i == "object" && i !== null && !Array.isArray(i);
20477      }
20478      function bt(i) {
20479        return i;
20480      }
20481      function qt(i, n) {
20482        const o = n.type === "color", u = i.stops && typeof i.stops[0][0] == "object", p = u || !(u || i.property !== void 0), v = i.type || (bc(n) ? "exponential" : "interval");
20483        if (o || n.type === "padding") {
20484          const L = o ? Mr.parse : mi.parse;
20485          (i = or({}, i)).stops && (i.stops = i.stops.map((B) => [B[0], L(B[1])])), i.default = L(i.default ? i.default : n.default);
20486        }
20487        if (i.colorSpace && (b = i.colorSpace) !== "rgb" && b !== "hcl" && b !== "lab") throw new Error(`Unknown color space: "${i.colorSpace}"`);
20488        var b;
20489        let x, E, k;
20490        if (v === "exponential") x = In;
20491        else if (v === "interval") x = cn;
20492        else if (v === "categorical") {
20493          x = br, E = /* @__PURE__ */ Object.create(null);
20494          for (const L of i.stops) E[L[0]] = L[1];
20495          k = typeof i.stops[0][0];
20496        } else {
20497          if (v !== "identity") throw new Error(`Unknown function type "${v}"`);
20498          x = Vi;
20499        }
20500        if (u) {
20501          const L = {}, B = [];
20502          for (let W = 0; W < i.stops.length; W++) {
20503            const Y = i.stops[W], oe = Y[0].zoom;
20504            L[oe] === void 0 && (L[oe] = { zoom: oe, type: i.type, property: i.property, default: i.default, stops: [] }, B.push(oe)), L[oe].stops.push([Y[0].value, Y[1]]);
20505          }
20506          const V = [];
20507          for (const W of B) V.push([L[W].zoom, qt(L[W], n)]);
20508          const q = { name: "linear" };
20509          return { kind: "composite", interpolationType: q, interpolationFactor: kr.interpolationFactor.bind(void 0, q), zoomStops: V.map((W) => W[0]), evaluate: ({ zoom: W }, Y) => In({ stops: V, base: i.base }, n, W).evaluate(W, Y) };
20510        }
20511        if (p) {
20512          const L = v === "exponential" ? { name: "exponential", base: i.base !== void 0 ? i.base : 1 } : null;
20513          return { kind: "camera", interpolationType: L, interpolationFactor: kr.interpolationFactor.bind(void 0, L), zoomStops: i.stops.map((B) => B[0]), evaluate: ({ zoom: B }) => x(i, n, B, E, k) };
20514        }
20515        return { kind: "source", evaluate(L, B) {
20516          const V = B && B.properties ? B.properties[i.property] : void 0;
20517          return V === void 0 ? Vr(i.default, n.default) : x(i, n, V, E, k);
20518        } };
20519      }
20520      function Vr(i, n, o) {
20521        return i !== void 0 ? i : n !== void 0 ? n : o !== void 0 ? o : void 0;
20522      }
20523      function br(i, n, o, u, p) {
20524        return Vr(typeof o === p ? u[o] : void 0, i.default, n.default);
20525      }
20526      function cn(i, n, o) {
20527        if (be(o) !== "number") return Vr(i.default, n.default);
20528        const u = i.stops.length;
20529        if (u === 1 || o <= i.stops[0][0]) return i.stops[0][1];
20530        if (o >= i.stops[u - 1][0]) return i.stops[u - 1][1];
20531        const p = Pe(i.stops.map((v) => v[0]), o);
20532        return i.stops[p][1];
20533      }
20534      function In(i, n, o) {
20535        const u = i.base !== void 0 ? i.base : 1;
20536        if (be(o) !== "number") return Vr(i.default, n.default);
20537        const p = i.stops.length;
20538        if (p === 1 || o <= i.stops[0][0]) return i.stops[0][1];
20539        if (o >= i.stops[p - 1][0]) return i.stops[p - 1][1];
20540        const v = Pe(i.stops.map((L) => L[0]), o), b = function(L, B, V, q) {
20541          const W = q - V, Y = L - V;
20542          return W === 0 ? 0 : B === 1 ? Y / W : (Math.pow(B, Y) - 1) / (Math.pow(B, W) - 1);
20543        }(o, u, i.stops[v][0], i.stops[v + 1][0]), x = i.stops[v][1], E = i.stops[v + 1][1], k = Zt[n.type] || bt;
20544        return typeof x.evaluate == "function" ? { evaluate(...L) {
20545          const B = x.evaluate.apply(void 0, L), V = E.evaluate.apply(void 0, L);
20546          if (B !== void 0 && V !== void 0) return k(B, V, b, i.colorSpace);
20547        } } : k(x, E, b, i.colorSpace);
20548      }
20549      function Vi(i, n, o) {
20550        switch (n.type) {
20551          case "color":
20552            o = Mr.parse(o);
20553            break;
20554          case "formatted":
20555            o = zr.fromString(o.toString());
20556            break;
20557          case "resolvedImage":
20558            o = Sn.fromString(o.toString());
20559            break;
20560          case "padding":
20561            o = mi.parse(o);
20562            break;
20563          default:
20564            be(o) === n.type || n.type === "enum" && n.values[o] || (o = void 0);
20565        }
20566        return Vr(o, i.default, n.default);
20567      }
20568      ji.register(ss, { error: [{ kind: "error" }, [er], (i, [n]) => {
20569        throw new Cn(n.evaluate(i));
20570      }], typeof: [er, [kt], (i, [n]) => A(rn(n.evaluate(i)))], "to-rgba": [U(ut, 4), [Ir], (i, [n]) => {
20571        const [o, u, p, v] = n.evaluate(i).rgb;
20572        return [255 * o, 255 * u, 255 * p, v];
20573      }], rgb: [Ir, [ut, ut, ut], ys], rgba: [Ir, [ut, ut, ut, ut], ys], has: { type: Ut, overloads: [[[er], (i, [n]) => _c(n.evaluate(i), i.properties())], [[er, pn], (i, [n, o]) => _c(n.evaluate(i), o.evaluate(i))]] }, get: { type: kt, overloads: [[[er], (i, [n]) => $s(n.evaluate(i), i.properties())], [[er, pn], (i, [n, o]) => $s(n.evaluate(i), o.evaluate(i))]] }, "feature-state": [kt, [er], (i, [n]) => $s(n.evaluate(i), i.featureState || {})], properties: [pn, [], (i) => i.properties()], "geometry-type": [er, [], (i) => i.geometryType()], id: [kt, [], (i) => i.id()], zoom: [ut, [], (i) => i.globals.zoom], "heatmap-density": [ut, [], (i) => i.globals.heatmapDensity || 0], "line-progress": [ut, [], (i) => i.globals.lineProgress || 0], accumulated: [kt, [], (i) => i.globals.accumulated === void 0 ? null : i.globals.accumulated], "+": [ut, lo(ut), (i, n) => {
20574        let o = 0;
20575        for (const u of n) o += u.evaluate(i);
20576        return o;
20577      }], "*": [ut, lo(ut), (i, n) => {
20578        let o = 1;
20579        for (const u of n) o *= u.evaluate(i);
20580        return o;
20581      }], "-": { type: ut, overloads: [[[ut, ut], (i, [n, o]) => n.evaluate(i) - o.evaluate(i)], [[ut], (i, [n]) => -n.evaluate(i)]] }, "/": [ut, [ut, ut], (i, [n, o]) => n.evaluate(i) / o.evaluate(i)], "%": [ut, [ut, ut], (i, [n, o]) => n.evaluate(i) % o.evaluate(i)], ln2: [ut, [], () => Math.LN2], pi: [ut, [], () => Math.PI], e: [ut, [], () => Math.E], "^": [ut, [ut, ut], (i, [n, o]) => Math.pow(n.evaluate(i), o.evaluate(i))], sqrt: [ut, [ut], (i, [n]) => Math.sqrt(n.evaluate(i))], log10: [ut, [ut], (i, [n]) => Math.log(n.evaluate(i)) / Math.LN10], ln: [ut, [ut], (i, [n]) => Math.log(n.evaluate(i))], log2: [ut, [ut], (i, [n]) => Math.log(n.evaluate(i)) / Math.LN2], sin: [ut, [ut], (i, [n]) => Math.sin(n.evaluate(i))], cos: [ut, [ut], (i, [n]) => Math.cos(n.evaluate(i))], tan: [ut, [ut], (i, [n]) => Math.tan(n.evaluate(i))], asin: [ut, [ut], (i, [n]) => Math.asin(n.evaluate(i))], acos: [ut, [ut], (i, [n]) => Math.acos(n.evaluate(i))], atan: [ut, [ut], (i, [n]) => Math.atan(n.evaluate(i))], min: [ut, lo(ut), (i, n) => Math.min(...n.map((o) => o.evaluate(i)))], max: [ut, lo(ut), (i, n) => Math.max(...n.map((o) => o.evaluate(i)))], abs: [ut, [ut], (i, [n]) => Math.abs(n.evaluate(i))], round: [ut, [ut], (i, [n]) => {
20582        const o = n.evaluate(i);
20583        return o < 0 ? -Math.round(-o) : Math.round(o);
20584      }], floor: [ut, [ut], (i, [n]) => Math.floor(n.evaluate(i))], ceil: [ut, [ut], (i, [n]) => Math.ceil(n.evaluate(i))], "filter-==": [Ut, [er, kt], (i, [n, o]) => i.properties()[n.value] === o.value], "filter-id-==": [Ut, [kt], (i, [n]) => i.id() === n.value], "filter-type-==": [Ut, [er], (i, [n]) => i.geometryType() === n.value], "filter-<": [Ut, [er, kt], (i, [n, o]) => {
20585        const u = i.properties()[n.value], p = o.value;
20586        return typeof u == typeof p && u < p;
20587      }], "filter-id-<": [Ut, [kt], (i, [n]) => {
20588        const o = i.id(), u = n.value;
20589        return typeof o == typeof u && o < u;
20590      }], "filter->": [Ut, [er, kt], (i, [n, o]) => {
20591        const u = i.properties()[n.value], p = o.value;
20592        return typeof u == typeof p && u > p;
20593      }], "filter-id->": [Ut, [kt], (i, [n]) => {
20594        const o = i.id(), u = n.value;
20595        return typeof o == typeof u && o > u;
20596      }], "filter-<=": [Ut, [er, kt], (i, [n, o]) => {
20597        const u = i.properties()[n.value], p = o.value;
20598        return typeof u == typeof p && u <= p;
20599      }], "filter-id-<=": [Ut, [kt], (i, [n]) => {
20600        const o = i.id(), u = n.value;
20601        return typeof o == typeof u && o <= u;
20602      }], "filter->=": [Ut, [er, kt], (i, [n, o]) => {
20603        const u = i.properties()[n.value], p = o.value;
20604        return typeof u == typeof p && u >= p;
20605      }], "filter-id->=": [Ut, [kt], (i, [n]) => {
20606        const o = i.id(), u = n.value;
20607        return typeof o == typeof u && o >= u;
20608      }], "filter-has": [Ut, [kt], (i, [n]) => n.value in i.properties()], "filter-has-id": [Ut, [], (i) => i.id() !== null && i.id() !== void 0], "filter-type-in": [Ut, [U(er)], (i, [n]) => n.value.indexOf(i.geometryType()) >= 0], "filter-id-in": [Ut, [U(kt)], (i, [n]) => n.value.indexOf(i.id()) >= 0], "filter-in-small": [Ut, [er, U(kt)], (i, [n, o]) => o.value.indexOf(i.properties()[n.value]) >= 0], "filter-in-large": [Ut, [er, U(kt)], (i, [n, o]) => function(u, p, v, b) {
20609        for (; v <= b; ) {
20610          const x = v + b >> 1;
20611          if (p[x] === u) return !0;
20612          p[x] > u ? b = x - 1 : v = x + 1;
20613        }
20614        return !1;
20615      }(i.properties()[n.value], o.value, 0, o.value.length - 1)], all: { type: Ut, overloads: [[[Ut, Ut], (i, [n, o]) => n.evaluate(i) && o.evaluate(i)], [lo(Ut), (i, n) => {
20616        for (const o of n) if (!o.evaluate(i)) return !1;
20617        return !0;
20618      }]] }, any: { type: Ut, overloads: [[[Ut, Ut], (i, [n, o]) => n.evaluate(i) || o.evaluate(i)], [lo(Ut), (i, n) => {
20619        for (const o of n) if (o.evaluate(i)) return !0;
20620        return !1;
20621      }]] }, "!": [Ut, [Ut], (i, [n]) => !n.evaluate(i)], "is-supported-script": [Ut, [er], (i, [n]) => {
20622        const o = i.globals && i.globals.isSupportedScript;
20623        return !o || o(n.evaluate(i));
20624      }], upcase: [er, [er], (i, [n]) => n.evaluate(i).toUpperCase()], downcase: [er, [er], (i, [n]) => n.evaluate(i).toLowerCase()], concat: [er, lo(kt), (i, n) => n.map((o) => Xo(o.evaluate(i))).join("")], "resolved-locale": [er, [zn], (i, [n]) => n.evaluate(i).resolvedLocale()] });
20625      class Tn {
20626        constructor(n, o) {
20627          var u;
20628          this.expression = n, this._warningHistory = {}, this._evaluator = new ll(), this._defaultValue = o ? (u = o).type === "color" && Ue(u.default) ? new Mr(0, 0, 0, 0) : u.type === "color" ? Mr.parse(u.default) || null : u.type === "padding" ? mi.parse(u.default) || null : u.type === "variableAnchorOffsetCollection" ? Nn.parse(u.default) || null : u.default === void 0 ? null : u.default : null, this._enumValues = o && o.type === "enum" ? o.values : null;
20629        }
20630        evaluateWithoutErrorHandling(n, o, u, p, v, b) {
20631          return this._evaluator.globals = n, this._evaluator.feature = o, this._evaluator.featureState = u, this._evaluator.canonical = p, this._evaluator.availableImages = v || null, this._evaluator.formattedSection = b, this.expression.evaluate(this._evaluator);
20632        }
20633        evaluate(n, o, u, p, v, b) {
20634          this._evaluator.globals = n, this._evaluator.feature = o || null, this._evaluator.featureState = u || null, this._evaluator.canonical = p, this._evaluator.availableImages = v || null, this._evaluator.formattedSection = b || null;
20635          try {
20636            const x = this.expression.evaluate(this._evaluator);
20637            if (x == null || typeof x == "number" && x != x) return this._defaultValue;
20638            if (this._enumValues && !(x in this._enumValues)) throw new Cn(`Expected value to be one of ${Object.keys(this._enumValues).map((E) => JSON.stringify(E)).join(", ")}, but found ${JSON.stringify(x)} instead.`);
20639            return x;
20640          } catch (x) {
20641            return this._warningHistory[x.message] || (this._warningHistory[x.message] = !0, typeof console < "u" && console.warn(x.message)), this._defaultValue;
20642          }
20643        }
20644      }
20645      function En(i) {
20646        return Array.isArray(i) && i.length > 0 && typeof i[0] == "string" && i[0] in ss;
20647      }
20648      function si(i, n) {
20649        const o = new Co(ss, La, [], n ? function(p) {
20650          const v = { color: Ir, string: er, number: ut, enum: er, boolean: Ut, formatted: zi, padding: Bi, resolvedImage: mn, variableAnchorOffsetCollection: le };
20651          return p.type === "array" ? U(v[p.value] || kt, p.length) : v[p.type];
20652        }(n) : void 0), u = o.parse(i, void 0, void 0, void 0, n && n.type === "string" ? { typeAnnotation: "coerce" } : void 0);
20653        return u ? Fa(new Tn(u, n)) : ko(o.errors);
20654      }
20655      class gi {
20656        constructor(n, o) {
20657          this.kind = n, this._styleExpression = o, this.isStateDependent = n !== "constant" && !uo(o.expression);
20658        }
20659        evaluateWithoutErrorHandling(n, o, u, p, v, b) {
20660          return this._styleExpression.evaluateWithoutErrorHandling(n, o, u, p, v, b);
20661        }
20662        evaluate(n, o, u, p, v, b) {
20663          return this._styleExpression.evaluate(n, o, u, p, v, b);
20664        }
20665      }
20666      class On {
20667        constructor(n, o, u, p) {
20668          this.kind = n, this.zoomStops = u, this._styleExpression = o, this.isStateDependent = n !== "camera" && !uo(o.expression), this.interpolationType = p;
20669        }
20670        evaluateWithoutErrorHandling(n, o, u, p, v, b) {
20671          return this._styleExpression.evaluateWithoutErrorHandling(n, o, u, p, v, b);
20672        }
20673        evaluate(n, o, u, p, v, b) {
20674          return this._styleExpression.evaluate(n, o, u, p, v, b);
20675        }
20676        interpolationFactor(n, o, u) {
20677          return this.interpolationType ? kr.interpolationFactor(this.interpolationType, n, o, u) : 0;
20678        }
20679      }
20680      function os(i, n) {
20681        const o = si(i, n);
20682        if (o.result === "error") return o;
20683        const u = o.value.expression, p = co(u);
20684        if (!p && !_s(n)) return ko([new hr("", "data expressions not supported")]);
20685        const v = ra(u, ["zoom"]);
20686        if (!v && !vc(n)) return ko([new hr("", "zoom expressions not supported")]);
20687        const b = ho(u);
20688        return b || v ? b instanceof hr ? ko([b]) : b instanceof kr && !bc(n) ? ko([new hr("", '"interpolate" expressions cannot be used with this property')]) : Fa(b ? new On(p ? "camera" : "composite", o.value, b.labels, b instanceof kr ? b.interpolation : void 0) : new gi(p ? "constant" : "source", o.value)) : ko([new hr("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);
20689      }
20690      class as {
20691        constructor(n, o) {
20692          this._parameters = n, this._specification = o, or(this, qt(this._parameters, this._specification));
20693        }
20694        static deserialize(n) {
20695          return new as(n._parameters, n._specification);
20696        }
20697        static serialize(n) {
20698          return { _parameters: n._parameters, _specification: n._specification };
20699        }
20700      }
20701      function ho(i) {
20702        let n = null;
20703        if (i instanceof io) n = ho(i.result);
20704        else if (i instanceof Rt) {
20705          for (const o of i.args) if (n = ho(o), n) break;
20706        } else (i instanceof tt || i instanceof kr) && i.input instanceof ji && i.input.name === "zoom" && (n = i);
20707        return n instanceof hr || i.eachChild((o) => {
20708          const u = ho(o);
20709          u instanceof hr ? n = u : !n && u ? n = new hr("", '"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.') : n && u && n !== u && (n = new hr("", 'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'));
20710        }), n;
20711      }
20712      function js(i) {
20713        if (i === !0 || i === !1) return !0;
20714        if (!Array.isArray(i) || i.length === 0) return !1;
20715        switch (i[0]) {
20716          case "has":
20717            return i.length >= 2 && i[1] !== "$id" && i[1] !== "$type";
20718          case "in":
20719            return i.length >= 3 && (typeof i[1] != "string" || Array.isArray(i[2]));
20720          case "!in":
20721          case "!has":
20722          case "none":
20723            return !1;
20724          case "==":
20725          case "!=":
20726          case ">":
20727          case ">=":
20728          case "<":
20729          case "<=":
20730            return i.length !== 3 || Array.isArray(i[1]) || Array.isArray(i[2]);
20731          case "any":
20732          case "all":
20733            for (const n of i.slice(1)) if (!js(n) && typeof n != "boolean") return !1;
20734            return !0;
20735          default:
20736            return !0;
20737        }
20738      }
20739      const fo = { type: "boolean", default: !1, transition: !1, "property-type": "data-driven", expression: { interpolated: !1, parameters: ["zoom", "feature"] } };
20740      function wl(i) {
20741        if (i == null) return { filter: () => !0, needGeometry: !1 };
20742        js(i) || (i = Ur(i));
20743        const n = si(i, fo);
20744        if (n.result === "error") throw new Error(n.value.map((o) => `${o.key}: ${o.message}`).join(", "));
20745        return { filter: (o, u, p) => n.value.evaluate(o, u, {}, p), needGeometry: vu(i) };
20746      }
20747      function Hh(i, n) {
20748        return i < n ? -1 : i > n ? 1 : 0;
20749      }
20750      function vu(i) {
20751        if (!Array.isArray(i)) return !1;
20752        if (i[0] === "within" || i[0] === "distance") return !0;
20753        for (let n = 1; n < i.length; n++) if (vu(i[n])) return !0;
20754        return !1;
20755      }
20756      function Ur(i) {
20757        if (!i) return !0;
20758        const n = i[0];
20759        return i.length <= 1 ? n !== "any" : n === "==" ? Br(i[1], i[2], "==") : n === "!=" ? Vn(Br(i[1], i[2], "==")) : n === "<" || n === ">" || n === "<=" || n === ">=" ? Br(i[1], i[2], n) : n === "any" ? (o = i.slice(1), ["any"].concat(o.map(Ur))) : n === "all" ? ["all"].concat(i.slice(1).map(Ur)) : n === "none" ? ["all"].concat(i.slice(1).map(Ur).map(Vn)) : n === "in" ? po(i[1], i.slice(2)) : n === "!in" ? Vn(po(i[1], i.slice(2))) : n === "has" ? Ui(i[1]) : n !== "!has" || Vn(Ui(i[1]));
20760        var o;
20761      }
20762      function Br(i, n, o) {
20763        switch (i) {
20764          case "$type":
20765            return [`filter-type-${o}`, n];
20766          case "$id":
20767            return [`filter-id-${o}`, n];
20768          default:
20769            return [`filter-${o}`, i, n];
20770        }
20771      }
20772      function po(i, n) {
20773        if (n.length === 0) return !1;
20774        switch (i) {
20775          case "$type":
20776            return ["filter-type-in", ["literal", n]];
20777          case "$id":
20778            return ["filter-id-in", ["literal", n]];
20779          default:
20780            return n.length > 200 && !n.some((o) => typeof o != typeof n[0]) ? ["filter-in-large", i, ["literal", n.sort(Hh)]] : ["filter-in-small", i, ["literal", n]];
20781        }
20782      }
20783      function Ui(i) {
20784        switch (i) {
20785          case "$type":
20786            return !0;
20787          case "$id":
20788            return ["filter-has-id"];
20789          default:
20790            return ["filter-has", i];
20791        }
20792      }
20793      function Vn(i) {
20794        return ["!", i];
20795      }
20796      function Un(i) {
20797        const n = typeof i;
20798        if (n === "number" || n === "boolean" || n === "string" || i == null) return JSON.stringify(i);
20799        if (Array.isArray(i)) {
20800          let p = "[";
20801          for (const v of i) p += `${Un(v)},`;
20802          return `${p}]`;
20803        }
20804        const o = Object.keys(i).sort();
20805        let u = "{";
20806        for (let p = 0; p < o.length; p++) u += `${JSON.stringify(o[p])}:${Un(i[o[p]])},`;
20807        return `${u}}`;
20808      }
20809      function vs(i) {
20810        let n = "";
20811        for (const o of et) n += `/${Un(i[o])}`;
20812        return n;
20813      }
20814      function Vs(i) {
20815        const n = i.value;
20816        return n ? [new We(i.key, n, "constants have been deprecated as of v8")] : [];
20817      }
20818      function sn(i) {
20819        return i instanceof Number || i instanceof String || i instanceof Boolean ? i.valueOf() : i;
20820      }
20821      function yi(i) {
20822        if (Array.isArray(i)) return i.map(yi);
20823        if (i instanceof Object && !(i instanceof Number || i instanceof String || i instanceof Boolean)) {
20824          const n = {};
20825          for (const o in i) n[o] = yi(i[o]);
20826          return n;
20827        }
20828        return sn(i);
20829      }
20830      function qn(i) {
20831        const n = i.key, o = i.value, u = i.valueSpec || {}, p = i.objectElementValidators || {}, v = i.style, b = i.styleSpec, x = i.validateSpec;
20832        let E = [];
20833        const k = be(o);
20834        if (k !== "object") return [new We(n, o, `object expected, ${k} found`)];
20835        for (const L in o) {
20836          const B = L.split(".")[0], V = u[B] || u["*"];
20837          let q;
20838          if (p[B]) q = p[B];
20839          else if (u[B]) q = x;
20840          else if (p["*"]) q = p["*"];
20841          else {
20842            if (!u["*"]) {
20843              E.push(new We(n, o[L], `unknown property "${L}"`));
20844              continue;
20845            }
20846            q = x;
20847          }
20848          E = E.concat(q({ key: (n && `${n}.`) + L, value: o[L], valueSpec: V, style: v, styleSpec: b, object: o, objectKey: L, validateSpec: x }, o));
20849        }
20850        for (const L in u) p[L] || u[L].required && u[L].default === void 0 && o[L] === void 0 && E.push(new We(n, o, `missing required property "${L}"`));
20851        return E;
20852      }
20853      function ls(i) {
20854        const n = i.value, o = i.valueSpec, u = i.style, p = i.styleSpec, v = i.key, b = i.arrayElementValidator || i.validateSpec;
20855        if (be(n) !== "array") return [new We(v, n, `array expected, ${be(n)} found`)];
20856        if (o.length && n.length !== o.length) return [new We(v, n, `array length ${o.length} expected, length ${n.length} found`)];
20857        if (o["min-length"] && n.length < o["min-length"]) return [new We(v, n, `array length at least ${o["min-length"]} expected, length ${n.length} found`)];
20858        let x = { type: o.value, values: o.values };
20859        p.$version < 7 && (x.function = o.function), be(o.value) === "object" && (x = o.value);
20860        let E = [];
20861        for (let k = 0; k < n.length; k++) E = E.concat(b({ array: n, arrayIndex: k, value: n[k], valueSpec: x, validateSpec: i.validateSpec, style: u, styleSpec: p, key: `${v}[${k}]` }));
20862        return E;
20863      }
20864      function Sl(i) {
20865        const n = i.key, o = i.value, u = i.valueSpec;
20866        let p = be(o);
20867        return p === "number" && o != o && (p = "NaN"), p !== "number" ? [new We(n, o, `number expected, ${p} found`)] : "minimum" in u && o < u.minimum ? [new We(n, o, `${o} is less than the minimum value ${u.minimum}`)] : "maximum" in u && o > u.maximum ? [new We(n, o, `${o} is greater than the maximum value ${u.maximum}`)] : [];
20868      }
20869      function Oo(i) {
20870        const n = i.valueSpec, o = sn(i.value.type);
20871        let u, p, v, b = {};
20872        const x = o !== "categorical" && i.value.property === void 0, E = !x, k = be(i.value.stops) === "array" && be(i.value.stops[0]) === "array" && be(i.value.stops[0][0]) === "object", L = qn({ key: i.key, value: i.value, valueSpec: i.styleSpec.function, validateSpec: i.validateSpec, style: i.style, styleSpec: i.styleSpec, objectElementValidators: { stops: function(q) {
20873          if (o === "identity") return [new We(q.key, q.value, 'identity function may not have a "stops" property')];
20874          let W = [];
20875          const Y = q.value;
20876          return W = W.concat(ls({ key: q.key, value: Y, valueSpec: q.valueSpec, validateSpec: q.validateSpec, style: q.style, styleSpec: q.styleSpec, arrayElementValidator: B })), be(Y) === "array" && Y.length === 0 && W.push(new We(q.key, Y, "array must have at least one stop")), W;
20877        }, default: function(q) {
20878          return q.validateSpec({ key: q.key, value: q.value, valueSpec: n, validateSpec: q.validateSpec, style: q.style, styleSpec: q.styleSpec });
20879        } } });
20880        return o === "identity" && x && L.push(new We(i.key, i.value, 'missing required property "property"')), o === "identity" || i.value.stops || L.push(new We(i.key, i.value, 'missing required property "stops"')), o === "exponential" && i.valueSpec.expression && !bc(i.valueSpec) && L.push(new We(i.key, i.value, "exponential functions not supported")), i.styleSpec.$version >= 8 && (E && !_s(i.valueSpec) ? L.push(new We(i.key, i.value, "property functions not supported")) : x && !vc(i.valueSpec) && L.push(new We(i.key, i.value, "zoom functions not supported"))), o !== "categorical" && !k || i.value.property !== void 0 || L.push(new We(i.key, i.value, '"property" property is required')), L;
20881        function B(q) {
20882          let W = [];
20883          const Y = q.value, oe = q.key;
20884          if (be(Y) !== "array") return [new We(oe, Y, `array expected, ${be(Y)} found`)];
20885          if (Y.length !== 2) return [new We(oe, Y, `array length 2 expected, length ${Y.length} found`)];
20886          if (k) {
20887            if (be(Y[0]) !== "object") return [new We(oe, Y, `object expected, ${be(Y[0])} found`)];
20888            if (Y[0].zoom === void 0) return [new We(oe, Y, "object stop key must have zoom")];
20889            if (Y[0].value === void 0) return [new We(oe, Y, "object stop key must have value")];
20890            if (v && v > sn(Y[0].zoom)) return [new We(oe, Y[0].zoom, "stop zoom values must appear in ascending order")];
20891            sn(Y[0].zoom) !== v && (v = sn(Y[0].zoom), p = void 0, b = {}), W = W.concat(qn({ key: `${oe}[0]`, value: Y[0], valueSpec: { zoom: {} }, validateSpec: q.validateSpec, style: q.style, styleSpec: q.styleSpec, objectElementValidators: { zoom: Sl, value: V } }));
20892          } else W = W.concat(V({ key: `${oe}[0]`, value: Y[0], validateSpec: q.validateSpec, style: q.style, styleSpec: q.styleSpec }, Y));
20893          return En(yi(Y[1])) ? W.concat([new We(`${oe}[1]`, Y[1], "expressions are not allowed in function stops.")]) : W.concat(q.validateSpec({ key: `${oe}[1]`, value: Y[1], valueSpec: n, validateSpec: q.validateSpec, style: q.style, styleSpec: q.styleSpec }));
20894        }
20895        function V(q, W) {
20896          const Y = be(q.value), oe = sn(q.value), he = q.value !== null ? q.value : W;
20897          if (u) {
20898            if (Y !== u) return [new We(q.key, he, `${Y} stop domain type must match previous stop domain type ${u}`)];
20899          } else u = Y;
20900          if (Y !== "number" && Y !== "string" && Y !== "boolean") return [new We(q.key, he, "stop domain value must be a number, string, or boolean")];
20901          if (Y !== "number" && o !== "categorical") {
20902            let De = `number expected, ${Y} found`;
20903            return _s(n) && o === void 0 && (De += '\nIf you intended to use a categorical function, specify `"type": "categorical"`.'), [new We(q.key, he, De)];
20904          }
20905          return o !== "categorical" || Y !== "number" || isFinite(oe) && Math.floor(oe) === oe ? o !== "categorical" && Y === "number" && p !== void 0 && oe < p ? [new We(q.key, he, "stop domain values must appear in ascending order")] : (p = oe, o === "categorical" && oe in b ? [new We(q.key, he, "stop domain values must be unique")] : (b[oe] = !0, [])) : [new We(q.key, he, `integer expected, found ${oe}`)];
20906        }
20907      }
20908      function mo(i) {
20909        const n = (i.expressionContext === "property" ? os : si)(yi(i.value), i.valueSpec);
20910        if (n.result === "error") return n.value.map((u) => new We(`${i.key}${u.key}`, i.value, u.message));
20911        const o = n.value.expression || n.value._styleExpression.expression;
20912        if (i.expressionContext === "property" && i.propertyKey === "text-font" && !o.outputDefined()) return [new We(i.key, i.value, `Invalid data expression for "${i.propertyKey}". Output values must be contained as literals within the expression.`)];
20913        if (i.expressionContext === "property" && i.propertyType === "layout" && !uo(o)) return [new We(i.key, i.value, '"feature-state" data expressions are not supported with layout properties.')];
20914        if (i.expressionContext === "filter" && !uo(o)) return [new We(i.key, i.value, '"feature-state" data expressions are not supported with filters.')];
20915        if (i.expressionContext && i.expressionContext.indexOf("cluster") === 0) {
20916          if (!ra(o, ["zoom", "feature-state"])) return [new We(i.key, i.value, '"zoom" and "feature-state" expressions are not supported with cluster properties.')];
20917          if (i.expressionContext === "cluster-initial" && !co(o)) return [new We(i.key, i.value, "Feature data expressions are not supported with initial expression part of cluster properties.")];
20918        }
20919        return [];
20920      }
20921      function qi(i) {
20922        const n = i.key, o = i.value, u = i.valueSpec, p = [];
20923        return Array.isArray(u.values) ? u.values.indexOf(sn(o)) === -1 && p.push(new We(n, o, `expected one of [${u.values.join(", ")}], ${JSON.stringify(o)} found`)) : Object.keys(u.values).indexOf(sn(o)) === -1 && p.push(new We(n, o, `expected one of [${Object.keys(u.values).join(", ")}], ${JSON.stringify(o)} found`)), p;
20924      }
20925      function na(i) {
20926        return js(yi(i.value)) ? mo(or({}, i, { expressionContext: "filter", valueSpec: { value: "boolean" } })) : za(i);
20927      }
20928      function za(i) {
20929        const n = i.value, o = i.key;
20930        if (be(n) !== "array") return [new We(o, n, `array expected, ${be(n)} found`)];
20931        const u = i.styleSpec;
20932        let p, v = [];
20933        if (n.length < 1) return [new We(o, n, "filter array must have at least 1 element")];
20934        switch (v = v.concat(qi({ key: `${o}[0]`, value: n[0], valueSpec: u.filter_operator, style: i.style, styleSpec: i.styleSpec })), sn(n[0])) {
20935          case "<":
20936          case "<=":
20937          case ">":
20938          case ">=":
20939            n.length >= 2 && sn(n[1]) === "$type" && v.push(new We(o, n, `"$type" cannot be use with operator "${n[0]}"`));
20940          case "==":
20941          case "!=":
20942            n.length !== 3 && v.push(new We(o, n, `filter array for operator "${n[0]}" must have 3 elements`));
20943          case "in":
20944          case "!in":
20945            n.length >= 2 && (p = be(n[1]), p !== "string" && v.push(new We(`${o}[1]`, n[1], `string expected, ${p} found`)));
20946            for (let b = 2; b < n.length; b++) p = be(n[b]), sn(n[1]) === "$type" ? v = v.concat(qi({ key: `${o}[${b}]`, value: n[b], valueSpec: u.geometry_type, style: i.style, styleSpec: i.styleSpec })) : p !== "string" && p !== "number" && p !== "boolean" && v.push(new We(`${o}[${b}
20946]`, n[b], `string, number, or boolean expected, ${p} found`));
20947            break;
20948          case "any":
20949          case "all":
20950          case "none":
20951            for (let b = 1; b < n.length; b++) v = v.concat(za({ key: `${o}[${b}]`, value: n[b], style: i.style, styleSpec: i.styleSpec }));
20952            break;
20953          case "has":
20954          case "!has":
20955            p = be(n[1]), n.length !== 2 ? v.push(new We(o, n, `filter array for "${n[0]}" operator must have 2 elements`)) : p !== "string" && v.push(new We(`${o}[1]`, n[1], `string expected, ${p} found`));
20956        }
20957        return v;
20958      }
20959      function ia(i, n) {
20960        const o = i.key, u = i.validateSpec, p = i.style, v = i.styleSpec, b = i.value, x = i.objectKey, E = v[`${n}_${i.layerType}`];
20961        if (!E) return [];
20962        const k = x.match(/^(.*)-transition$/);
20963        if (n === "paint" && k && E[k[1]] && E[k[1]].transition) return u({ key: o, value: b, valueSpec: v.transition, style: p, styleSpec: v });
20964        const L = i.valueSpec || E[x];
20965        if (!L) return [new We(o, b, `unknown property "${x}"`)];
20966        let B;
20967        if (be(b) === "string" && _s(L) && !L.tokens && (B = /^{([^}]+)}$/.exec(b))) return [new We(o, b, `"${x}" does not support interpolation syntax
20968Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(B[1])} }\`.`)];
20969        const V = [];
20970        return i.layerType === "symbol" && (x === "text-field" && p && !p.glyphs && V.push(new We(o, b, 'use of "text-field" requires a style "glyphs" property')), x === "text-font" && Ue(yi(b)) && sn(b.type) === "identity" && V.push(new We(o, b, '"text-font" does not support identity functions'))), V.concat(u({ key: i.key, value: b, valueSpec: L, style: p, styleSpec: v, expressionContext: "property", propertyType: n, propertyKey: x }));
20971      }
20972      function Do(i) {
20973        return ia(i, "paint");
20974      }
20975      function Gh(i) {
20976        return ia(i, "layout");
20977      }
20978      function Zh(i) {
20979        let n = [];
20980        const o = i.value, u = i.key, p = i.style, v = i.styleSpec;
20981        o.type || o.ref || n.push(new We(u, o, 'either "type" or "ref" is required'));
20982        let b = sn(o.type);
20983        const x = sn(o.ref);
20984        if (o.id) {
20985          const E = sn(o.id);
20986          for (let k = 0; k < i.arrayIndex; k++) {
20987            const L = p.layers[k];
20988            sn(L.id) === E && n.push(new We(u, o.id, `duplicate layer id "${o.id}", previously used at line ${L.id.__line__}`));
20989          }
20990        }
20991        if ("ref" in o) {
20992          let E;
20993          ["type", "source", "source-layer", "filter", "layout"].forEach((k) => {
20994            k in o && n.push(new We(u, o[k], `"${k}" is prohibited for ref layers`));
20995          }), p.layers.forEach((k) => {
20996            sn(k.id) === x && (E = k);
20997          }), E ? E.ref ? n.push(new We(u, o.ref, "ref cannot reference another ref layer")) : b = sn(E.type) : n.push(new We(u, o.ref, `ref layer "${x}" not found`));
20998        } else if (b !== "background") if (o.source) {
20999          const E = p.sources && p.sources[o.source], k = E && sn(E.type);
21000          E ? k === "vector" && b === "raster" ? n.push(new We(u, o.source, `layer "${o.id}" requires a raster source`)) : k !== "raster-dem" && b === "hillshade" ? n.push(new We(u, o.source, `layer "${o.id}" requires a raster-dem source`)) : k === "raster" && b !== "raster" ? n.push(new We(u, o.source, `layer "${o.id}" requires a vector source`)) : k !== "vector" || o["source-layer"] ? k === "raster-dem" && b !== "hillshade" ? n.push(new We(u, o.source, "raster-dem source can only be used with layer type 'hillshade'.")) : b !== "line" || !o.paint || !o.paint["line-gradient"] || k === "geojson" && E.lineMetrics || n.push(new We(u, o, `layer "${o.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)) : n.push(new We(u, o, `layer "${o.id}" must specify a "source-layer"`)) : n.push(new We(u, o.source, `source "${o.source}" not found`));
21001        } else n.push(new We(u, o, 'missing required property "source"'));
21002        return n = n.concat(qn({ key: u, value: o, valueSpec: v.layer, style: i.style, styleSpec: i.styleSpec, validateSpec: i.validateSpec, objectElementValidators: { "*": () => [], type: () => i.validateSpec({ key: `${u}.type`, value: o.type, valueSpec: v.layer.type, style: i.style, styleSpec: i.styleSpec, validateSpec: i.validateSpec, object: o, objectKey: "type" }), filter: na, layout: (E) => qn({ layer: o, key: E.key, value: E.value, style: E.style, styleSpec: E.styleSpec, validateSpec: E.validateSpec, objectElementValidators: { "*": (k) => Gh(or({ layerType: b }, k)) } }), paint: (E) => qn({ layer: o, key: E.key, value: E.value, style: E.style, styleSpec: E.styleSpec, validateSpec: E.validateSpec, objectElementValidators: { "*": (k) => Do(or({ layerType: b }, k)) } }) } })), n;
21003      }
21004      function Ba(i) {
vendor: 4,162 bytes, lines 21005-21068
21005        const n = i.value, o = i.key, u = be(n);
21006        return u !== "string" ? [new We(o, n, `string expected, ${u} found`)] : [];
21007      }
21008      const bu = { promoteId: function({ key: i, value: n }) {
21009        if (be(n) === "string") return Ba({ key: i, value: n });
21010        {
21011          const o = [];
21012          for (const u in n) o.push(...Ba({ key: `${i}.${u}`, value: n[u] }));
21013          return o;
21014        }
21015      } };
21016      function xc(i) {
21017        const n = i.value, o = i.key, u = i.styleSpec, p = i.style, v = i.validateSpec;
21018        if (!n.type) return [new We(o, n, '"type" is required')];
21019        const b = sn(n.type);
21020        let x;
21021        switch (b) {
21022          case "vector":
21023          case "raster":
21024            return x = qn({ key: o, value: n, valueSpec: u[`source_${b.replace("-", "_")}`], style: i.style, styleSpec: u, objectElementValidators: bu, validateSpec: v }), x;
21025          case "raster-dem":
21026            return x = function(E) {
21027              var k;
21028              const L = (k = E.sourceName) !== null && k !== void 0 ? k : "", B = E.value, V = E.styleSpec, q = V.source_raster_dem, W = E.style;
21029              let Y = [];
21030              const oe = be(B);
21031              if (B === void 0) return Y;
21032              if (oe !== "object") return Y.push(new We("source_raster_dem", B, `object expected, ${oe} found`)), Y;
21033              const he = sn(B.encoding) === "custom", De = ["redFactor", "greenFactor", "blueFactor", "baseShift"], xe = E.value.encoding ? `"${E.value.encoding}"` : "Default";
21034              for (const ke in B) !he && De.includes(ke) ? Y.push(new We(ke, B[ke], `In "${L}": "${ke}" is only valid when "encoding" is set to "custom". ${xe} encoding found`)) : q[ke] ? Y = Y.concat(E.validateSpec({ key: ke, value: B[ke], valueSpec: q[ke], validateSpec: E.validateSpec, style: W, styleSpec: V })) : Y.push(new We(ke, B[ke], `unknown property "${ke}"`));
21035              return Y;
21036            }({ sourceName: o, value: n, style: i.style, styleSpec: u, validateSpec: v }), x;
21037          case "geojson":
21038            if (x = qn({ key: o, value: n, valueSpec: u.source_geojson, style: p, styleSpec: u, validateSpec: v, objectElementValidators: bu }), n.cluster) for (const E in n.clusterProperties) {
21039              const [k, L] = n.clusterProperties[E], B = typeof k == "string" ? [k, ["accumulated"], ["get", E]] : k;
21040              x.push(...mo({ key: `${o}.${E}.map`, value: L, expressionContext: "cluster-map" })), x.push(...mo({ key: `${o}.${E}.reduce`, value: B, expressionContext: "cluster-reduce" }));
21041            }
21042            return x;
21043          case "video":
21044            return qn({ key: o, value: n, valueSpec: u.source_video, style: p, validateSpec: v, styleSpec: u });
21045          case "image":
21046            return qn({ key: o, value: n, valueSpec: u.source_image, style: p, validateSpec: v, styleSpec: u });
21047          case "canvas":
21048            return [new We(o, null, "Please use runtime APIs to add canvas sources, rather than including them in stylesheets.", "source.canvas")];
21049          default:
21050            return qi({ key: `${o}.type`, value: n.type, valueSpec: { values: ["vector", "raster", "raster-dem", "geojson", "video", "image"] } });
21051        }
21052      }
21053      function Wh(i) {
21054        const n = i.value, o = i.styleSpec, u = o.light, p = i.style;
21055        let v = [];
21056        const b = be(n);
21057        if (n === void 0) return v;
21058        if (b !== "object") return v = v.concat([new We("light", n, `object expected, ${b} found`)]), v;
21059        for (const x in n) {
21060          const E = x.match(/^(.*)-transition$/);
21061          v = v.concat(E && u[E[1]] && u[E[1]].transition ? i.validateSpec({ key: x, value: n[x], valueSpec: o.transition, validateSpec: i.validateSpec, style: p, styleSpec: o }) : u[x] ? i.validateSpec({ key: x, value: n[x], valueSpec: u[x], validateSpec: i.validateSpec, style: p, styleSpec: o }) : [new We(x, n[x], `unknown property "${x}"`)]);
21062        }
21063        return v;
21064      }
21065      function Kh(i) {
21066        const n = i.value, o = i.styleSpec, u = o.sky, p = i.style, v = be(n);
21067        if (n === void 0) return [];
21068        if (v !== "object") return [new We("sky", n, `object expected, ${v}
21068 found`)];
21069        let b = [];
21070        for (const x in n) b = b.concat(u[x] ? i.validateSpec({ key: x, value: n[x], valueSpec: u[x], style: p, styleSpec: o }) : [new We(x, n[x], `unknown property "${x}"`)]);
21071        return b;
21072      }
21073      function Xh(i) {
21074        const n = i.value, o = i.styleSpec, u = o.terrain, p = i.style;
21075        let v = [];
21076        const b = be(n);
21077        if (n === void 0) return v;
21078        if (b !== "object") return v = v.concat([new We("terrain", n, `object expected, ${b} found`)]), v;
21079        for (const x in n) v = v.concat(u[x] ? i.validateSpec({ key: x, value: n[x], valueSpec: u[x], validateSpec: i.validateSpec, style: p, styleSpec: o }) : [new We(x, n[x], `unknown property "${x}"`)]);
21080        return v;
21081      }
21082      function Jh(i) {
21083        let n = [];
21084        const o = i.value, u = i.key;
21085        if (Array.isArray(o)) {
21086          const p = [], v = [];
21087          for (const b in o) o[b].id && p.includes(o[b].id) && n.push(new We(u, o, `all the sprites' ids must be unique, but ${o[b].id} is duplicated`)), p.push(o[b].id), o[b].url && v.includes(o[b].url) && n.push(new We(u, o, `all the sprites' URLs must be unique, but ${o[b].url} is duplicated`)), v.push(o[b].url), n = n.concat(qn({ key: `${u}[${b}]`, value: o[b], valueSpec: { id: { type: "string", required: !0 }, url: { type: "string", required: !0 } }, validateSpec: i.validateSpec }));
21088          return n;
21089        }
21090        return Ba({ key: u, value: o });
21091      }
21092      const xu = { "*": () => [], array: ls, boolean: function(i) {
21093        const n = i.value, o = i.key, u = be(n);
21094        return u !== "boolean" ? [new We(o, n, `boolean expected, ${u} found`)] : [];
21095      }, number: Sl, color: function(i) {
21096        const n = i.key, o = i.value, u = be(o);
21097        return u !== "string" ? [new We(n, o, `color expected, ${u} found`)] : Mr.parse(String(o)) ? [] : [new We(n, o, `color expected, "${o}" found`)];
21098      }, constants: Vs, enum: qi, filter: na, function: Oo, layer: Zh, object: qn, source: xc, light: Wh, sky: Kh, terrain: Xh, projection: function(i) {
21099        const n = i.value, o = i.styleSpec, u = o.projection, p = i.style, v = be(n);
21100        if (n === void 0) return [];
21101        if (v !== "object") return [new We("projection", n, `object expected, ${v} found`)];
21102        let b = [];
21103        for (const x in n) b = b.concat(u[x] ? i.validateSpec({ key: x, value: n[x], valueSpec: u[x], style: p, styleSpec: o }) : [new We(x, n[x], `unknown property "${x}"`)]);
21104        return b;
21105      }, string: Ba, formatted: function(i) {
21106        return Ba(i).length === 0 ? [] : mo(i);
21107      }, resolvedImage: function(i) {
21108        return Ba(i).length === 0 ? [] : mo(i);
21109      }, padding: function(i) {
21110        const n = i.key, o = i.value;
21111        if (be(o) === "array") {
21112          if (o.length < 1 || o.length > 4) return [new We(n, o, `padding requires 1 to 4 values; ${o.length} values found`)];
21113          const u = { type: "number" };
21114          let p = [];
21115          for (let v = 0; v < o.length; v++) p = p.concat(i.validateSpec({ key: `${n}[${v}]`, value: o[v], validateSpec: i.validateSpec, valueSpec: u }));
21116          return p;
21117        }
21118        return Sl({ key: n, value: o, valueSpec: {} });
21119      }, variableAnchorOffsetCollection: function(i) {
21120        const n = i.key, o = i.value, u = be(o), p = i.styleSpec;
21121        if (u !== "array" || o.length < 1 || o.length % 2 != 0) return [new We(n, o, "variableAnchorOffsetCollection requires a non-empty array of even length")];
21122        let v = [];
21123        for (let b = 0; b < o.length; b += 2) v = v.concat(qi({ key: `${n}[${b}]`, value: o[b], valueSpec: p.layout_symbol["text-anchor"] })), v = v.concat(ls({ key: `${n}[${b + 1}]`, value: o[b + 1], valueSpec: { length: 2, value: "number" }, validateSpec: i.validateSpec, style: i.style, styleSpec: p }));
21124        return v;
21125      }, sprite: Jh };
21126      function wc(i) {
21127        const n = i.value, o = i.valueSpec, u = i.styleSpec;
21128        return i.validateSpec = wc, o.expression && Ue(sn(n)) ? Oo(i) : o.expression && En(yi(n)) ? mo(i) : o.type && xu[o.type] ? xu[o.type](i) : qn(or({}
vendor: 4,295 bytes, lines 21128-21214
21128, i, { valueSpec: o.type ? u[o.type] : o }));
21129      }
21130      function Vd(i) {
21131        const n = i.value, o = i.key, u = Ba(i);
21132        return u.length || (n.indexOf("{fontstack}") === -1 && u.push(new We(o, n, '"glyphs" url must include a "{fontstack}" token')), n.indexOf("{range}") === -1 && u.push(new We(o, n, '"glyphs" url must include a "{range}" token'))), u;
21133      }
21134      function bs(i, n = re) {
21135        let o = [];
21136        return o = o.concat(wc({ key: "", value: i, valueSpec: n.$root, styleSpec: n, style: i, validateSpec: wc, objectElementValidators: { glyphs: Vd, "*": () => [] } })), i.constants && (o = o.concat(Vs({ key: "constants", value: i.constants }))), Yh(o);
21137      }
21138      function go(i) {
21139        return function(n) {
21140          return i({ ...n, validateSpec: wc });
21141        };
21142      }
21143      function Yh(i) {
21144        return [].concat(i).sort((n, o) => n.line - o.line);
21145      }
21146      function Us(i) {
21147        return function(...n) {
21148          return Yh(i.apply(this, n));
21149        };
21150      }
21151      bs.source = Us(go(xc)), bs.sprite = Us(go(Jh)), bs.glyphs = Us(go(Vd)), bs.light = Us(go(Wh)), bs.sky = Us(go(Kh)), bs.terrain = Us(go(Xh)), bs.layer = Us(go(Zh)), bs.filter = Us(go(na)), bs.paintProperty = Us(go(Do)), bs.layoutProperty = Us(go(Gh));
21152      const Na = bs, Xg = Na.light, Jg = Na.sky, Ud = Na.paintProperty, qd = Na.layoutProperty;
21153      function Qh(i, n) {
21154        let o = !1;
21155        if (n && n.length) for (const u of n) i.fire(new Ee(new Error(u.message))), o = !0;
21156        return o;
21157      }
21158      class Tl {
21159        constructor(n, o, u) {
21160          const p = this.cells = [];
21161          if (n instanceof ArrayBuffer) {
21162            this.arrayBuffer = n;
21163            const b = new Int32Array(this.arrayBuffer);
21164            n = b[0], this.d = (o = b[1]) + 2 * (u = b[2]);
21165            for (let E = 0; E < this.d * this.d; E++) {
21166              const k = b[3 + E], L = b[3 + E + 1];
21167              p.push(k === L ? null : b.subarray(k, L));
21168            }
21169            const x = b[3 + p.length + 1];
21170            this.keys = b.subarray(b[3 + p.length], x), this.bboxes = b.subarray(x), this.insert = this._insertReadonly;
21171          } else {
21172            this.d = o + 2 * u;
21173            for (let b = 0; b < this.d * this.d; b++) p.push([]);
21174            this.keys = [], this.bboxes = [];
21175          }
21176          this.n = o, this.extent = n, this.padding = u, this.scale = o / n, this.uid = 0;
21177          const v = u / o * n;
21178          this.min = -v, this.max = n + v;
21179        }
21180        insert(n, o, u, p, v) {
21181          this._forEachCell(o, u, p, v, this._insertCell, this.uid++, void 0, void 0), this.keys.push(n), this.bboxes.push(o), this.bboxes.push(u), this.bboxes.push(p), this.bboxes.push(v);
21182        }
21183        _insertReadonly() {
21184          throw new Error("Cannot insert into a GridIndex created from an ArrayBuffer.");
21185        }
21186        _insertCell(n, o, u, p, v, b) {
21187          this.cells[v].push(b);
21188        }
21189        query(n, o, u, p, v) {
21190          const b = this.min, x = this.max;
21191          if (n <= b && o <= b && x <= u && x <= p && !v) return Array.prototype.slice.call(this.keys);
21192          {
21193            const E = [];
21194            return this._forEachCell(n, o, u, p, this._queryCell, E, {}, v), E;
21195          }
21196        }
21197        _queryCell(n, o, u, p, v, b, x, E) {
21198          const k = this.cells[v];
21199          if (k !== null) {
21200            const L = this.keys, B = this.bboxes;
21201            for (let V = 0; V < k.length; V++) {
21202              const q = k[V];
21203              if (x[q] === void 0) {
21204                const W = 4 * q;
21205                (E ? E(B[W + 0], B[W + 1], B[W + 2], B[W + 3]) : n <= B[W + 2] && o <= B[W + 3] && u >= B[W + 0] && p >= B[W + 1]) ? (x[q] = !0, b.push(L[q])) : x[q] = !1;
21206              }
21207            }
21208          }
21209        }
21210        _forEachCell(n, o, u, p, v, b, x, E) {
21211          const k = this._convertToCellCoord(n), L = this._convertToCellCoord(o), B = this._convertToCellCoord(u), V = this._convertToCellCoord(p);
21212          for (let q = k; q <= B; q++) for (let W = L; W <= V; W++) {
21213            const Y = this.d * W + q;
21214            if ((!E || E(this._convertFromCellCoord(q), this._convertFromCellCoord(W), this._convertFromCellCoord(q + 1), this._convertFromCellCoord(W + 1))) && v.call(this, n, o, u, p, Y, b, x, E)
21214) return;
21215          }
21216        }
21217        _convertFromCellCoord(n) {
21218          return (n - this.padding) / this.scale;
21219        }
21220        _convertToCellCoord(n) {
21221          return Math.max(0, Math.min(this.d - 1, Math.floor(n * this.scale) + this.padding));
21222        }
21223        toArrayBuffer() {
21224          if (this.arrayBuffer) return this.arrayBuffer;
21225          const n = this.cells, o = 3 + this.cells.length + 1 + 1;
21226          let u = 0;
21227          for (let b = 0; b < this.cells.length; b++) u += this.cells[b].length;
21228          const p = new Int32Array(o + u + this.keys.length + this.bboxes.length);
21229          p[0] = this.extent, p[1] = this.n, p[2] = this.padding;
21230          let v = o;
21231          for (let b = 0; b < n.length; b++) {
21232            const x = n[b];
21233            p[3 + b] = v, p.set(x, v), v += x.length;
21234          }
21235          return p[3 + n.length] = v, p.set(this.keys, v), v += this.keys.length, p[3 + n.length + 1] = v, p.set(this.bboxes, v), v += this.bboxes.length, p.buffer;
21236        }
21237        static serialize(n, o) {
21238          const u = n.toArrayBuffer();
21239          return o && o.push(u), { buffer: u };
21240        }
21241        static deserialize(n) {
21242          return new Tl(n.buffer);
21243        }
21244      }
21245      const xs = {};
21246      function Mt(i, n, o = {}) {
21247        if (xs[i]) throw new Error(`${i} is already registered.`);
21248        Object.defineProperty(n, "_classRegistryKey", { value: i, writeable: !1 }), xs[i] = { klass: n, omit: o.omit || [], shallow: o.shallow || [] };
21249      }
21250      Mt("Object", Object), Mt("TransferableGridIndex", Tl), Mt("Color", Mr), Mt("Error", Error), Mt("AJAXError", dn), Mt("ResolvedImage", Sn), Mt("StylePropertyFunction", as), Mt("StyleExpression", Tn, { omit: ["_evaluator"] }), Mt("ZoomDependentExpression", On), Mt("ZoomConstantExpression", gi), Mt("CompoundExpression", ji, { omit: ["_evaluate"] });
21251      for (const i in ss) ss[i]._classRegistryKey || Mt(`Expression_${i}`, ss[i]);
21252      function wu(i) {
21253        return i && typeof ArrayBuffer < "u" && (i instanceof ArrayBuffer || i.constructor && i.constructor.name === "ArrayBuffer");
21254      }
21255      function ef(i) {
21256        return i.$name || i.constructor._classRegistryKey;
21257      }
21258      function Hd(i) {
21259        return !function(n) {
21260          if (n === null || typeof n != "object") return !1;
21261          const o = ef(n);
21262          return !(!o || o === "Object");
21263        }(i) && (i == null || typeof i == "boolean" || typeof i == "number" || typeof i == "string" || i instanceof Boolean || i instanceof Number || i instanceof String || i instanceof Date || i instanceof RegExp || i instanceof Blob || i instanceof Error || wu(i) || ct(i) || ArrayBuffer.isView(i) || i instanceof ImageData);
21264      }
21265      function El(i, n) {
21266        if (Hd(i)) return (wu(i) || ct(i)) && n && n.push(i), ArrayBuffer.isView(i) && n && n.push(i.buffer), i instanceof ImageData && n && n.push(i.data.buffer), i;
21267        if (Array.isArray(i)) {
21268          const v = [];
21269          for (const b of i) v.push(El(b, n));
21270          return v;
21271        }
21272        if (typeof i != "object") throw new Error("can't serialize object of type " + typeof i);
21273        const o = ef(i);
21274        if (!o) throw new Error(`can't serialize object of unregistered class ${i.constructor.name}`);
21275        if (!xs[o]) throw new Error(`${o} is not registered.`);
21276        const { klass: u } = xs[o], p = u.serialize ? u.serialize(i, n) : {};
21277        if (u.serialize) {
21278          if (n && p === n[n.length - 1]) throw new Error("statically serialized object won't survive transfer of $name property");
21279        } else {
21280          for (const v in i) {
21281            if (!i.hasOwnProperty(v) || xs[o].omit.indexOf(v) >= 0) continue;
21282            const b = i[v];
21283            p[v] = xs[o].shallow.indexOf(v) >= 0 ? b : El(b, n);
21284          }
21285          i instanceof Error && (p.message = i.message);
21286        }
21287        if (p.$name) throw new Error("$name property is reserved for worker serialization logic.");
21288        return o !== "Object" && (p.$name = o), p;
21289      }
21290      function Al(i) {
21291        if (Hd(i)) return i;
21292        if (Array.isArray(i)) return i.map(Al);
21293        if (typeof i != "object") throw new Error("can't deserialize object of type " + typeof i);
21294        const n = ef(i) || "Object";
21295        if (!xs[n]) throw new Error(`can't deserialize unregistered class ${n}`);
21296        const { klass: o } = xs[n];
21297        if (!o) throw new Error(`can't deserialize unregistered class ${n}`);
21298        if (o.deserialize) return o.deserialize(i);
21299        const u = Object.create(o.prototype);
21300        for (const p of Object.keys(i)) {
21301          if (p === "$name") continue;
21302          const v = i[p];
21303          u[p] = xs[n].shallow.indexOf(p) >= 0 ? v : Al(v);
21304        }
21305        return u;
21306      }
21307      class tf {
21308        constructor() {
21309          this.first = !0;
21310        }
21311        update(n, o) {
21312          const u = Math.floor(n);
21313          return this.first ? (this.first = !1, this.lastIntegerZoom = u, this.lastIntegerZoomTime = 0, this.lastZoom = n, this.lastFloorZoom = u, !0) : (this.lastFloorZoom > u ? (this.lastIntegerZoom = u + 1, this.lastIntegerZoomTime = o) : this.lastFloorZoom < u && (this.lastIntegerZoom = u, this.lastIntegerZoomTime = o), n !== this.lastZoom && (this.lastZoom = n, this.lastFloorZoom = u, !0));
21314        }
21315      }
21316      const Sr = { "Latin-1 Supplement": (i) => i >= 128 && i <= 255, "Hangul Jamo": (i) => i >= 4352 && i <= 4607, Khmer: (i) => i >= 6016 && i <= 6143, "General Punctuation": (i) => i >= 8192 && i <= 8303, "Letterlike Symbols": (i) => i >= 8448 && i <= 8527, "Number Forms": (i) => i >= 8528 && i <= 8591, "Miscellaneous Technical": (i) => i >= 8960 && i <= 9215, "Control Pictures": (i) => i >= 9216 && i <= 9279, "Optical Character Recognition": (i) => i >= 9280 && i <= 9311, "Enclosed Alphanumerics": (i) => i >= 9312 && i <= 9471, "Geometric Shapes": (i) => i >= 9632 && i <= 9727, "Miscellaneous Symbols": (i) => i >= 9728 && i <= 9983, "Miscellaneous Symbols and Arrows": (i) => i >= 11008 && i <= 11263, "Ideographic Description Characters": (i) => i >= 12272 && i <= 12287, "CJK Symbols and Punctuation": (i) => i >= 12288 && i <= 12351, Katakana: (i) => i >= 12448 && i <= 12543, Kanbun: (i) => i >= 12688 && i <= 12703, "CJK Strokes": (i) => i >= 12736 && i <= 12783, "Enclosed CJK Letters and Months": (i) => i >= 12800 && i <= 13055, "CJK Compatibility": (i) => i >= 13056 && i <= 13311, "Yijing Hexagram Symbols": (i) => i >= 19904 && i <= 19967, "Private Use Area": (i) => i >= 57344 && i <= 63743, "Vertical Forms": (i) => i >= 65040 && i <= 65055, "CJK Compatibility Forms": (i) => i >= 65072 && i <= 65103, "Small Form Variants": (i) => i >= 65104 && i <= 65135, "Halfwidth and Fullwidth Forms": (i) => i >= 65280 && i <= 65519 };
21317      function rf(i) {
21318        for (const n of i) if (sf(n.charCodeAt(0))) return !0;
21319        return !1;
21320      }
21321      function Yg(i) {
21322        for (const n of i) if (!Cl(n.charCodeAt(0))) return !1;
21323        return !0;
21324      }
21325      function nf(i) {
21326        const n = i.map((o) => {
21327          try {
21328            return new RegExp(`\\p{sc=${o}}`, "u").source;
21329          } catch {
21330            return null;
21331          }
21332        }).filter((o) => o);
21333        return new RegExp(n.join("|"), "u");
21334      }
21335      const Qg = nf(["Arab", "Dupl", "Mong", "Ougr", "Syrc"]);
21336      function Cl(i) {
21337        return !Qg.test(String.fromCodePoint(i));
21338      }
21339      const Gd = nf(["Bopo", "Hani", "Hira", "Kana", "Kits", "Nshu", "Tang", "Yiii"]);
21340      function sf(i) {
21341        return !(i !== 746 && i !== 747 && (i < 4352 || !(Sr["CJK Compatibility Forms"](i) && !(i >= 65097 && i <= 65103) || Sr["CJK Compatibility"](i) || Sr["CJK Strokes"](i) || !(!Sr["CJK Symbols and Punctuation"](i) || i >= 12296 && i <= 12305 || i >= 12308 && i <= 12319 || i === 12336) || Sr["Enclosed CJK Letters and Months"](i) || Sr["Ideographic Description Characters"](i) || Sr.Kanbun(i) || Sr.Katakana(i) && i !== 12540 || !(!Sr["Halfwidth and Fullwidth Forms"](i) || i === 65288 || i === 65289 || i === 65293 || i >= 65306 && i <= 65310 || i === 65339 || i === 65341 || i === 65343 || i >= 65371 && i <= 65503 || i === 65507 || i >= 65512 && i <= 65519) || !(!Sr["Small Form Variants"](i) || i >= 65112 && i <= 65118 || i >= 65123 && i <= 65126) || Sr["Vertical Forms"](i) || Sr["Yijing Hexagram Symbols"](i) || new RegExp("\\p{sc=Cans}", "u").test(String.fromCodePoint(i)) || new RegExp("\\p{sc=Hang}", "u").test(String.fromCodePoint(i)) || Gd.test(String.fromCodePoint(i)))));
21342      }
21343      function Zd(i) {
21344        return !(sf(i) || function(n) {
21345          return !!(Sr["Latin-1 Supplement"](n) && (n === 167 || n === 169 || n === 174 || n === 177 || n === 188 || n === 189 || n === 190 || n === 215 || n === 247) || Sr["General Punctuation"](n) && (n === 8214 || n === 8224 || n === 8225 || n === 8240 || n === 8241 || n === 8251 || n === 8252 || n === 8258 || n === 8263 || n === 8264 || n === 8265 || n === 8273) || Sr["Letterlike Symbols"](n) || Sr["Number Forms"](n) || Sr["Miscellaneous Technical"](n) && (n >= 8960 && n <= 8967 || n >= 8972 && n <= 8991 || n >= 8996 && n <= 9e3 || n === 9003 || n >= 9085 && n <= 9114 || n >= 9150 && n <= 9165 || n === 9167 || n >= 9169 && n <= 9179 || n >= 9186 && n <= 9215) || Sr["Control Pictures"](n) && n !== 9251 || Sr["Optical Character Recognition"](n) || Sr["Enclosed Alphanumerics"](n) || Sr["Geometric Shapes"](n) || Sr["Miscellaneous Symbols"](n) && !(n >= 9754 && n <= 9759) || Sr["Miscellaneous Symbols and Arrows"](n) && (n >= 11026 && n <= 11055 || n >= 11088 && n <= 11097 || n >= 11192 && n <= 11243) || Sr["CJK Symbols and Punctuation"](n) || Sr.Katakana(n) || Sr["Private Use Area"](n) || Sr["CJK Compatibility Forms"](n) || Sr["Small Form Variants"](n) || Sr["Halfwidth and Fullwidth Forms"](n) || n === 8734 || n === 8756 || n === 8757 || n >= 9984 && n <= 10087 || n >= 10102 && n <= 10131 || n === 65532 || n === 65533);
21346        }(i));
21347      }
21348      const ey = nf(["Adlm", "Arab", "Armi", "Avst", "Chrs", "Cprt", "Egyp", "Elym", "Gara", "Hatr", "Hebr", "Hung", "Khar", "Lydi", "Mand", "Mani", "Me
21348nd", "Merc", "Mero", "Narb", "Nbat", "Nkoo", "Orkh", "Palm", "Phli", "Phlp", "Phnx", "Prti", "Rohg", "Samr", "Sarb", "Sogo", "Syrc", "Thaa", "Todr", "Yezi"]);
21349      function of(i) {
21350        return ey.test(String.fromCodePoint(i));
21351      }
21352      function ty(i, n) {
21353        return !(!n && of(i) || i >= 2304 && i <= 3583 || i >= 3840 && i <= 4255 || Sr.Khmer(i));
21354      }
21355      function ry(i) {
21356        for (const n of i) if (of(n.charCodeAt(0))) return !0;
21357        return !1;
21358      }
21359      const cs = new class {
21360        constructor() {
21361          this.applyArabicShaping = null, this.processBidirectionalText = null, this.processStyledBidirectionalText = null, this.pluginStatus = "unavailable", this.pluginURL = null;
21362        }
21363        setState(i) {
21364          this.pluginStatus = i.pluginStatus, this.pluginURL = i.pluginURL;
21365        }
21366        getState() {
21367          return { pluginStatus: this.pluginStatus, pluginURL: this.pluginURL };
21368        }
21369        setMethods(i) {
21370          this.applyArabicShaping = i.applyArabicShaping, this.processBidirectionalText = i.processBidirectionalText, this.processStyledBidirectionalText = i.processStyledBidirectionalText;
21371        }
21372        isParsed() {
21373          return this.applyArabicShaping != null && this.processBidirectionalText != null && this.processStyledBidirectionalText != null;
21374        }
21375        getPluginURL() {
21376          return this.pluginURL;
21377        }
21378        getRTLTextPluginStatus() {
21379          return this.pluginStatus;
21380        }
21381      }();
21382      class gn {
21383        constructor(n, o) {
21384          this.zoom = n, o ? (this.now = o.now, this.fadeDuration = o.fadeDuration, this.zoomHistory = o.zoomHistory, this.transition = o.transition) : (this.now = 0, this.fadeDuration = 0, this.zoomHistory = new tf(), this.transition = {});
21385        }
21386        isSupportedScript(n) {
21387          return function(o, u) {
vendor: 42,748 bytes, lines 21388-22394
21388            for (const p of o) if (!ty(p.charCodeAt(0), u)) return !1;
21389            return !0;
21390          }(n, cs.getRTLTextPluginStatus() === "loaded");
21391        }
21392        crossFadingFactor() {
21393          return this.fadeDuration === 0 ? 1 : Math.min((this.now - this.zoomHistory.lastIntegerZoomTime) / this.fadeDuration, 1);
21394        }
21395        getCrossfadeParameters() {
21396          const n = this.zoom, o = n - Math.floor(n), u = this.crossFadingFactor();
21397          return n > this.zoomHistory.lastIntegerZoom ? { fromScale: 2, toScale: 1, t: o + (1 - o) * u } : { fromScale: 0.5, toScale: 1, t: 1 - (1 - u) * o };
21398        }
21399      }
21400      class Il {
21401        constructor(n, o) {
21402          this.property = n, this.value = o, this.expression = function(u, p) {
21403            if (Ue(u)) return new as(u, p);
21404            if (En(u)) {
21405              const v = os(u, p);
21406              if (v.result === "error") throw new Error(v.value.map((b) => `${b.key}: ${b.message}`).join(", "));
21407              return v.value;
21408            }
21409            {
21410              let v = u;
21411              return p.type === "color" && typeof u == "string" ? v = Mr.parse(u) : p.type !== "padding" || typeof u != "number" && !Array.isArray(u) ? p.type === "variableAnchorOffsetCollection" && Array.isArray(u) && (v = Nn.parse(u)) : v = mi.parse(u), { kind: "constant", evaluate: () => v };
21412            }
21413          }(o === void 0 ? n.specification.default : o, n.specification);
21414        }
21415        isDataDriven() {
21416          return this.expression.kind === "source" || this.expression.kind === "composite";
21417        }
21418        possiblyEvaluate(n, o, u) {
21419          return this.property.possiblyEvaluate(this, n, o, u);
21420        }
21421      }
21422      class Su {
21423        constructor(n) {
21424          this.property = n, this.value = new Il(n, void 0);
21425        }
21426        transitioned(n, o) {
21427          return new Wd(this.property, this.value, o, je({}, n.transition, this.transition), n.now);
21428        }
21429        untransitioned() {
21430          return new Wd(this.property, this.value, null, {}, 0);
21431        }
21432      }
21433      class Tu {
21434        constructor(n) {
21435          this._properties = n, this._values = Object.create(n.defaultTransitionablePropertyValues);
21436        }
21437        getValue(n) {
21438          return He(this._values[n].value.value);
21439        }
21440        setValue(n, o) {
21441          Object.prototype.hasOwnProperty.call(this._values, n) || (this._values[n] = new Su(this._values[n].property)), this._values[n].value = new Il(this._values[n].property, o === null ? void 0 : He(o));
21442        }
21443        getTransition(n) {
21444          return He(this._values[n].transition);
21445        }
21446        setTransition(n, o) {
21447          Object.prototype.hasOwnProperty.call(this._values, n) || (this._values[n] = new Su(this._values[n].property)), this._values[n].transition = He(o) || void 0;
21448        }
21449        serialize() {
21450          const n = {};
21451          for (const o of Object.keys(this._values)) {
21452            const u = this.getValue(o);
21453            u !== void 0 && (n[o] = u);
21454            const p = this.getTransition(o);
21455            p !== void 0 && (n[`${o}-transition`] = p);
21456          }
21457          return n;
21458        }
21459        transitioned(n, o) {
21460          const u = new Sc(this._properties);
21461          for (const p of Object.keys(this._values)) u._values[p] = this._values[p].transitioned(n, o._values[p]);
21462          return u;
21463        }
21464        untransitioned() {
21465          const n = new Sc(this._properties);
21466          for (const o of Object.keys(this._values)) n._values[o] = this._values[o].untransitioned();
21467          return n;
21468        }
21469      }
21470      class Wd {
21471        constructor(n, o, u, p, v) {
21472          this.property = n, this.value = o, this.begin = v + p.delay || 0, this.end = this.begin + p.duration || 0, n.specification.transition && (p.delay || p.duration) && (this.prior = u);
21473        }
21474        possiblyEvaluate(n, o, u) {
21475          const p = n.now || 0, v = this.value.possiblyEvaluate(n, o, u), b = this.prior;
21476          if (b) {
21477            if (p > this.end) return this.prior = null, v;
21478            if (this.value.isDataDriven()) return this.prior = null, v;
21479            if (p < this.begin) return b.possiblyEvaluate(n, o, u);
21480            {
21481              const x = (p - this.begin) / (this.end - this.begin);
21482              return this.property.interpolate(b.possiblyEvaluate(n, o, u), v, function(E) {
21483                if (E <= 0) return 0;
21484                if (E >= 1) return 1;
21485                const k = E * E, L = k * E;
21486                return 4 * (E < 0.5 ? L : 3 * (E - k) + L - 0.75);
21487              }(x));
21488            }
21489          }
21490          return v;
21491        }
21492      }
21493      class Sc {
21494        constructor(n) {
21495          this._properties = n, this._values = Object.create(n.defaultTransitioningPropertyValues);
21496        }
21497        possiblyEvaluate(n, o, u) {
21498          const p = new Ec(this._properties);
21499          for (const v of Object.keys(this._values)) p._values[v] = this._values[v].possiblyEvaluate(n, o, u);
21500          return p;
21501        }
21502        hasTransition() {
21503          for (const n of Object.keys(this._values)) if (this._values[n].prior) return !0;
21504          return !1;
21505        }
21506      }
21507      class Tc {
21508        constructor(n) {
21509          this._properties = n, this._values = Object.create(n.defaultPropertyValues);
21510        }
21511        hasValue(n) {
21512          return this._values[n].value !== void 0;
21513        }
21514        getValue(n) {
21515          return He(this._values[n].value);
21516        }
21517        setValue(n, o) {
21518          this._values[n] = new Il(this._values[n].property, o === null ? void 0 : He(o));
21519        }
21520        serialize() {
21521          const n = {};
21522          for (const o of Object.keys(this._values)) {
21523            const u = this.getValue(o);
21524            u !== void 0 && (n[o] = u);
21525          }
21526          return n;
21527        }
21528        possiblyEvaluate(n, o, u) {
21529          const p = new Ec(this._properties);
21530          for (const v of Object.keys(this._values)) p._values[v] = this._values[v].possiblyEvaluate(n, o, u);
21531          return p;
21532        }
21533      }
21534      class yo {
21535        constructor(n, o, u) {
21536          this.property = n, this.value = o, this.parameters = u;
21537        }
21538        isConstant() {
21539          return this.value.kind === "constant";
21540        }
21541        constantOr(n) {
21542          return this.value.kind === "constant" ? this.value.value : n;
21543        }
21544        evaluate(n, o, u, p) {
21545          return this.property.evaluate(this.value, this.parameters, n, o, u, p);
21546        }
21547      }
21548      class Ec {
21549        constructor(n) {
21550          this._properties = n, this._values = Object.create(n.defaultPossiblyEvaluatedValues);
21551        }
21552        get(n) {
21553          return this._values[n];
21554        }
21555      }
21556      class Lt {
21557        constructor(n) {
21558          this.specification = n;
21559        }
21560        possiblyEvaluate(n, o) {
21561          if (n.isDataDriven()) throw new Error("Value should not be data driven");
21562          return n.expression.evaluate(o);
21563        }
21564        interpolate(n, o, u) {
21565          const p = Zt[this.specification.type];
21566          return p ? p(n, o, u) : n;
21567        }
21568      }
21569      class Xt {
21570        constructor(n, o) {
21571          this.specification = n, this.overrides = o;
21572        }
21573        possiblyEvaluate(n, o, u, p) {
21574          return new yo(this, n.expression.kind === "constant" || n.expression.kind === "camera" ? { kind: "constant", value: n.expression.evaluate(o, null, {}, u, p) } : n.expression, o);
21575        }
21576        interpolate(n, o, u) {
21577          if (n.value.kind !== "constant" || o.value.kind !== "constant") return n;
21578          if (n.value.value === void 0 || o.value.value === void 0) return new yo(this, { kind: "constant", value: void 0 }, n.parameters);
21579          const p = Zt[this.specification.type];
21580          if (p) {
21581            const v = p(n.value.value, o.value.value, u);
21582            return new yo(this, { kind: "constant", value: v }, n.parameters);
21583          }
21584          return n;
21585        }
21586        evaluate(n, o, u, p, v, b) {
21587          return n.kind === "constant" ? n.value : n.evaluate(o, u, p, v, b);
21588        }
21589      }
21590      class Eu extends Xt {
21591        possiblyEvaluate(n, o, u, p) {
21592          if (n.value === void 0) return new yo(this, { kind: "constant", value: void 0 }, o);
21593          if (n.expression.kind === "constant") {
21594            const v = n.expression.evaluate(o, null, {}, u, p), b = n.property.specification.type === "resolvedImage" && typeof v != "string" ? v.name : v, x = this._calculate(b, b, b, o);
21595            return new yo(this, { kind: "constant", value: x }, o);
21596          }
21597          if (n.expression.kind === "camera") {
21598            const v = this._calculate(n.expression.evaluate({ zoom: o.zoom - 1 }), n.expression.evaluate({ zoom: o.zoom }), n.expression.evaluate({ zoom: o.zoom + 1 }), o);
21599            return new yo(this, { kind: "constant", value: v }, o);
21600          }
21601          return new yo(this, n.expression, o);
21602        }
21603        evaluate(n, o, u, p, v, b) {
21604          if (n.kind === "source") {
21605            const x = n.evaluate(o, u, p, v, b);
21606            return this._calculate(x, x, x, o);
21607          }
21608          return n.kind === "composite" ? this._calculate(n.evaluate({ zoom: Math.floor(o.zoom) - 1 }, u, p), n.evaluate({ zoom: Math.floor(o.zoom) }, u, p), n.evaluate({ zoom: Math.floor(o.zoom) + 1 }, u, p), o) : n.value;
21609        }
21610        _calculate(n, o, u, p) {
21611          return p.zoom > p.zoomHistory.lastIntegerZoom ? { from: n, to: o } : { from: u, to: o };
21612        }
21613        interpolate(n) {
21614          return n;
21615        }
21616      }
21617      class Au {
21618        constructor(n) {
21619          this.specification = n;
21620        }
21621        possiblyEvaluate(n, o, u, p) {
21622          if (n.value !== void 0) {
21623            if (n.expression.kind === "constant") {
21624              const v = n.expression.evaluate(o, null, {}, u, p);
21625              return this._calculate(v, v, v, o);
21626            }
21627            return this._calculate(n.expression.evaluate(new gn(Math.floor(o.zoom - 1), o)), n.expression.evaluate(new gn(Math.floor(o.zoom), o)), n.expression.evaluate(new gn(Math.floor(o.zoom + 1), o)), o);
21628          }
21629        }
21630        _calculate(n, o, u, p) {
21631          return p.zoom > p.zoomHistory.lastIntegerZoom ? { from: n, to: o } : { from: u, to: o };
21632        }
21633        interpolate(n) {
21634          return n;
21635        }
21636      }
21637      class af {
21638        constructor(n) {
21639          this.specification = n;
21640        }
21641        possiblyEvaluate(n, o, u, p) {
21642          return !!n.expression.evaluate(o, null, {}, u, p);
21643        }
21644        interpolate() {
21645          return !1;
21646        }
21647      }
21648      class _ {
21649        constructor(n) {
21650          this.properties = n, this.defaultPropertyValues = {}, this.defaultTransitionablePropertyValues = {}, this.defaultTransitioningPropertyValues = {}, this.defaultPossiblyEvaluatedValues = {}, this.overridableProperties = [];
21651          for (const o in n) {
21652            const u = n[o];
21653            u.specification.overridable && this.overridableProperties.push(o);
21654            const p = this.defaultPropertyValues[o] = new Il(u, void 0), v = this.defaultTransitionablePropertyValues[o] = new Su(u);
21655            this.defaultTransitioningPropertyValues[o] = v.untransitioned(), this.defaultPossiblyEvaluatedValues[o] = p.possiblyEvaluate({});
21656          }
21657        }
21658      }
21659      Mt("DataDrivenProperty", Xt), Mt("DataConstantProperty", Lt), Mt("CrossFadedDataDrivenProperty", Eu), Mt("CrossFadedProperty", Au), Mt("ColorRampProperty", af);
21660      const r = "-transition";
21661      class a extends Ze {
21662        constructor(n, o) {
21663          if (super(), this.id = n.id, this.type = n.type, this._featureFilter = { filter: () => !0, needGeometry: !1 }, n.type !== "custom" && (this.metadata = n.metadata, this.minzoom = n.minzoom, this.maxzoom = n.maxzoom, n.type !== "background" && (this.source = n.source, this.sourceLayer = n["source-layer"], this.filter = n.filter), o.layout && (this._unevaluatedLayout = new Tc(o.layout)), o.paint)) {
21664            this._transitionablePaint = new Tu(o.paint);
21665            for (const u in n.paint) this.setPaintProperty(u, n.paint[u], { validate: !1 });
21666            for (const u in n.layout) this.setLayoutProperty(u, n.layout[u], { validate: !1 });
21667            this._transitioningPaint = this._transitionablePaint.untransitioned(), this.paint = new Ec(o.paint);
21668          }
21669        }
21670        getCrossfadeParameters() {
21671          return this._crossfadeParameters;
21672        }
21673        getLayoutProperty(n) {
21674          return n === "visibility" ? this.visibility : this._unevaluatedLayout.getValue(n);
21675        }
21676        setLayoutProperty(n, o, u = {}) {
21677          o != null && this._validate(qd, `layers.${this.id}.layout.${n}`, n, o, u) || (n !== "visibility" ? this._unevaluatedLayout.setValue(n, o) : this.visibility = o);
21678        }
21679        getPaintProperty(n) {
21680          return n.endsWith(r) ? this._transitionablePaint.getTransition(n.slice(0, -11)) : this._transitionablePaint.getValue(n);
21681        }
21682        setPaintProperty(n, o, u = {}) {
21683          if (o != null && this._validate(Ud, `layers.${this.id}.paint.${n}`, n, o, u)) return !1;
21684          if (n.endsWith(r)) return this._transitionablePaint.setTransition(n.slice(0, -11), o || void 0), !1;
21685          {
21686            const p = this._transitionablePaint._values[n], v = p.property.specification["property-type"] === "cross-faded-data-driven", b = p.value.isDataDriven(), x = p.value;
21687            this._transitionablePaint.setValue(n, o), this._handleSpecialPaintPropertyUpdate(n);
21688            const E = this._transitionablePaint._values[n].value;
21689            return E.isDataDriven() || b || v || this._handleOverridablePaintPropertyUpdate(n, x, E);
21690          }
21691        }
21692        _handleSpecialPaintPropertyUpdate(n) {
21693        }
21694        _handleOverridablePaintPropertyUpdate(n, o, u) {
21695          return !1;
21696        }
21697        isHidden(n) {
21698          return !!(this.minzoom && n < this.minzoom) || !!(this.maxzoom && n >= this.maxzoom) || this.visibility === "none";
21699        }
21700        updateTransitions(n) {
21701          this._transitioningPaint = this._transitionablePaint.transitioned(n, this._transitioningPaint);
21702        }
21703        hasTransition() {
21704          return this._transitioningPaint.hasTransition();
21705        }
21706        recalculate(n, o) {
21707          n.getCrossfadeParameters && (this._crossfadeParameters = n.getCrossfadeParameters()), this._unevaluatedLayout && (this.layout = this._unevaluatedLayout.possiblyEvaluate(n, void 0, o)), this.paint = this._transitioningPaint.possiblyEvaluate(n, void 0, o);
21708        }
21709        serialize() {
21710          const n = { id: this.id, type: this.type, source: this.source, "source-layer": this.sourceLayer, metadata: this.metadata, minzoom: this.minzoom, maxzoom: this.maxzoom, filter: this.filter, layout: this._unevaluatedLayout && this._unevaluatedLayout.serialize(), paint: this._transitionablePaint && this._transitionablePaint.serialize() };
21711          return this.visibility && (n.layout = n.layout || {}, n.layout.visibility = this.visibility), ze(n, (o, u) => !(o === void 0 || u === "layout" && !Object.keys(o).length || u === "paint" && !Object.keys(o).length));
21712        }
21713        _validate(n, o, u, p, v = {}) {
21714          return (!v || v.validate !== !1) && Qh(this, n.call(Na, { key: o, layerType: this.type, objectKey: u, value: p, styleSpec: re, style: { glyphs: !0, sprite: !0 } }));
21715        }
21716        is3D() {
21717          return !1;
21718        }
21719        isTileClipped() {
21720          return !1;
21721        }
21722        hasOffscreenPass() {
21723          return !1;
21724        }
21725        resize() {
21726        }
21727        isStateDependent() {
21728          for (const n in this.paint._values) {
21729            const o = this.paint.get(n);
21730            if (o instanceof yo && _s(o.property.specification) && (o.value.kind === "source" || o.value.kind === "composite") && o.value.isStateDependent) return !0;
21731          }
21732          return !1;
21733        }
21734      }
21735      const f = { Int8: Int8Array, Uint8: Uint8Array, Int16: Int16Array, Uint16: Uint16Array, Int32: Int32Array, Uint32: Uint32Array, Float32: Float32Array };
21736      class d {
21737        constructor(n, o) {
21738          this._structArray = n, this._pos1 = o * this.size, this._pos2 = this._pos1 / 2, this._pos4 = this._pos1 / 4, this._pos8 = this._pos1 / 8;
21739        }
21740      }
21741      class y {
21742        constructor() {
21743          this.isTransferred = !1, this.capacity = -1, this.resize(0);
21744        }
21745        static serialize(n, o) {
21746          return n._trim(), o && (n.isTransferred = !0, o.push(n.arrayBuffer)), { length: n.length, arrayBuffer: n.arrayBuffer };
21747        }
21748        static deserialize(n) {
21749          const o = Object.create(this.prototype);
21750          return o.arrayBuffer = n.arrayBuffer, o.length = n.length, o.capacity = n.arrayBuffer.byteLength / o.bytesPerElement, o._refreshViews(), o;
21751        }
21752        _trim() {
21753          this.length !== this.capacity && (this.capacity = this.length, this.arrayBuffer = this.arrayBuffer.slice(0, this.length * this.bytesPerElement), this._refreshViews());
21754        }
21755        clear() {
21756          this.length = 0;
21757        }
21758        resize(n) {
21759          this.reserve(n), this.length = n;
21760        }
21761        reserve(n) {
21762          if (n > this.capacity) {
21763            this.capacity = Math.max(n, Math.floor(5 * this.capacity), 128), this.arrayBuffer = new ArrayBuffer(this.capacity * this.bytesPerElement);
21764            const o = this.uint8;
21765            this._refreshViews(), o && this.uint8.set(o);
21766          }
21767        }
21768        _refreshViews() {
21769          throw new Error("_refreshViews() must be implemented by each concrete StructArray layout");
21770        }
21771      }
21772      function S(i, n = 1) {
21773        let o = 0, u = 0;
21774        return { members: i.map((p) => {
21775          const v = f[p.type].BYTES_PER_ELEMENT, b = o = C(o, Math.max(n, v)), x = p.components || 1;
21776          return u = Math.max(u, v), o += v * x, { name: p.name, type: p.type, components: x, offset: b };
21777        }), size: C(o, Math.max(u, n)), alignment: n };
21778      }
21779      function C(i, n) {
21780        return Math.ceil(i / n) * n;
21781      }
21782      class I extends y {
21783        _refreshViews() {
21784          this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
21785        }
21786        emplaceBack(n, o) {
21787          const u = this.length;
21788          return this.resize(u + 1), this.emplace(u, n, o);
21789        }
21790        emplace(n, o, u) {
21791          const p = 2 * n;
21792          return this.int16[p + 0] = o, this.int16[p + 1] = u, n;
21793        }
21794      }
21795      I.prototype.bytesPerElement = 4, Mt("StructArrayLayout2i4", I);
21796      class F extends y {
21797        _refreshViews() {
21798          this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
21799        }
21800        emplaceBack(n, o, u) {
21801          const p = this.length;
21802          return this.resize(p + 1), this.emplace(p, n, o, u);
21803        }
21804        emplace(n, o, u, p) {
21805          const v = 3 * n;
21806          return this.int16[v + 0] = o, this.int16[v + 1] = u, this.int16[v + 2] = p, n;
21807        }
21808      }
21809      F.prototype.bytesPerElement = 6, Mt("StructArrayLayout3i6", F);
21810      class N extends y {
21811        _refreshViews() {
21812          this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
21813        }
21814        emplaceBack(n, o, u, p) {
21815          const v = this.length;
21816          return this.resize(v + 1), this.emplace(v, n, o, u, p);
21817        }
21818        emplace(n, o, u, p, v) {
21819          const b = 4 * n;
21820          return this.int16[b + 0] = o, this.int16[b + 1] = u, this.int16[b + 2] = p, this.int16[b + 3] = v, n;
21821        }
21822      }
21823      N.prototype.bytesPerElement = 8, Mt("StructArrayLayout4i8", N);
21824      class $ extends y {
21825        _refreshViews() {
21826          this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
21827        }
21828        emplaceBack(n, o, u, p, v, b) {
21829          const x = this.length;
21830          return this.resize(x + 1), this.emplace(x, n, o, u, p, v, b);
21831        }
21832        emplace(n, o, u, p, v, b, x) {
21833          const E = 6 * n;
21834          return this.int16[E + 0] = o, this.int16[E + 1] = u, this.int16[E + 2] = p, this.int16[E + 3] = v, this.int16[E + 4] = b, this.int16[E + 5] = x, n;
21835        }
21836      }
21837      $.prototype.bytesPerElement = 12, Mt("StructArrayLayout2i4i12", $);
21838      class G extends y {
21839        _refreshViews() {
21840          this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
21841        }
21842        emplaceBack(n, o, u, p, v, b) {
21843          const x = this.length;
21844          return this.resize(x + 1), this.emplace(x, n, o, u, p, v, b);
21845        }
21846        emplace(n, o, u, p, v, b, x) {
21847          const E = 4 * n, k = 8 * n;
21848          return this.int16[E + 0] = o, this.int16[E + 1] = u, this.uint8[k + 4] = p, this.uint8[k + 5] = v, this.uint8[k + 6] = b, this.uint8[k + 7] = x, n;
21849        }
21850      }
21851      G.prototype.bytesPerElement = 8, Mt("StructArrayLayout2i4ub8", G);
21852      class Q extends y {
21853        _refreshViews() {
21854          this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
21855        }
21856        emplaceBack(n, o) {
21857          const u = this.length;
21858          return this.resize(u + 1), this.emplace(u, n, o);
21859        }
21860        emplace(n, o, u) {
21861          const p = 2 * n;
21862          return this.float32[p + 0] = o, this.float32[p + 1] = u, n;
21863        }
21864      }
21865      Q.prototype.bytesPerElement = 8, Mt("StructArrayLayout2f8", Q);
21866      class te extends y {
21867        _refreshViews() {
21868          this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
21869        }
21870        emplaceBack(n, o, u, p, v, b, x, E, k, L) {
21871          const B = this.length;
21872          return this.resize(B + 1), this.emplace(B, n, o, u, p, v, b, x, E, k, L);
21873        }
21874        emplace(n, o, u, p, v, b, x, E, k, L, B) {
21875          const V = 10 * n;
21876          return this.uint16[V + 0] = o, this.uint16[V + 1] = u, this.uint16[V + 2] = p, this.uint16[V + 3] = v, this.uint16[V + 4] = b, this.uint16[V + 5] = x, this.uint16[V + 6] = E, this.uint16[V + 7] = k, this.uint16[V + 8] = L, this.uint16[V + 9] = B, n;
21877        }
21878      }
21879      te.prototype.bytesPerElement = 20, Mt("StructArrayLayout10ui20", te);
21880      class ae extends y {
21881        _refreshViews() {
21882          this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
21883        }
21884        emplaceBack(n, o, u, p, v, b, x, E, k, L, B, V) {
21885          const q = this.length;
21886          return this.resize(q + 1), this.emplace(q, n, o, u, p, v, b, x, E, k, L, B, V);
21887        }
21888        emplace(n, o, u, p, v, b, x, E, k, L, B, V, q) {
21889          const W = 12 * n;
21890          return this.int16[W + 0] = o, this.int16[W + 1] = u, this.int16[W + 2] = p, this.int16[W + 3] = v, this.uint16[W + 4] = b, this.uint16[W + 5] = x, this.uint16[W + 6] = E, this.uint16[W + 7] = k, this.int16[W + 8] = L, this.int16[W + 9] = B, this.int16[W + 10] = V, this.int16[W + 11] = q, n;
21891        }
21892      }
21893      ae.prototype.bytesPerElement = 24, Mt("StructArrayLayout4i4ui4i24", ae);
21894      class fe extends y {
21895        _refreshViews() {
21896          this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
21897        }
21898        emplaceBack(n, o, u) {
21899          const p = this.length;
21900          return this.resize(p + 1), this.emplace(p, n, o, u);
21901        }
21902        emplace(n, o, u, p) {
21903          const v = 3 * n;
21904          return this.float32[v + 0] = o, this.float32[v + 1] = u, this.float32[v + 2] = p, n;
21905        }
21906      }
21907      fe.prototype.bytesPerElement = 12, Mt("StructArrayLayout3f12", fe);
21908      class pe extends y {
21909        _refreshViews() {
21910          this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer);
21911        }
21912        emplaceBack(n) {
21913          const o = this.length;
21914          return this.resize(o + 1), this.emplace(o, n);
21915        }
21916        emplace(n, o) {
21917          return this.uint32[1 * n + 0] = o, n;
21918        }
21919      }
21920      pe.prototype.bytesPerElement = 4, Mt("StructArrayLayout1ul4", pe);
21921      class _e extends y {
21922        _refreshViews() {
21923          this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
21924        }
21925        emplaceBack(n, o, u, p, v, b, x, E, k) {
21926          const L = this.length;
21927          return this.resize(L + 1), this.emplace(L, n, o, u, p, v, b, x, E, k);
21928        }
21929        emplace(n, o, u, p, v, b, x, E, k, L) {
21930          const B = 10 * n, V = 5 * n;
21931          return this.int16[B + 0] = o, this.int16[B + 1] = u, this.int16[B + 2] = p, this.int16[B + 3] = v, this.int16[B + 4] = b, this.int16[B + 5] = x, this.uint32[V + 3] = E, this.uint16[B + 8] = k, this.uint16[B + 9] = L, n;
21932        }
21933      }
21934      _e.prototype.bytesPerElement = 20, Mt("StructArrayLayout6i1ul2ui20", _e);
21935      class se extends y {
21936        _refreshViews() {
21937          this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
21938        }
21939        emplaceBack(n, o, u, p, v, b) {
21940          const x = this.length;
21941          return this.resize(x + 1), this.emplace(x, n, o, u, p, v, b);
21942        }
21943        emplace(n, o, u, p, v, b, x) {
21944          const E = 6 * n;
21945          return this.int16[E + 0] = o, this.int16[E + 1] = u, this.int16[E + 2] = p, this.int16[E + 3] = v, this.int16[E + 4] = b, this.int16[E + 5] = x, n;
21946        }
21947      }
21948      se.prototype.bytesPerElement = 12, Mt("StructArrayLayout2i2i2i12", se);
21949      class Te extends y {
21950        _refreshViews() {
21951          this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
21952        }
21953        emplaceBack(n, o, u, p, v) {
21954          const b = this.length;
21955          return this.resize(b + 1), this.emplace(b, n, o, u, p, v);
21956        }
21957        emplace(n, o, u, p, v, b) {
21958          const x = 4 * n, E = 8 * n;
21959          return this.float32[x + 0] = o, this.float32[x + 1] = u, this.float32[x + 2] = p, this.int16[E + 6] = v, this.int16[E + 7] = b, n;
21960        }
21961      }
21962      Te.prototype.bytesPerElement = 16, Mt("StructArrayLayout2f1f2i16", Te);
21963      class Me extends y {
21964        _refreshViews() {
21965          this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer);
21966        }
21967        emplaceBack(n, o, u, p, v, b) {
21968          const x = this.length;
21969          return this.resize(x + 1), this.emplace(x, n, o, u, p, v, b);
21970        }
21971        emplace(n, o, u, p, v, b, x) {
21972          const E = 16 * n, k = 4 * n, L = 8 * n;
21973          return this.uint8[E + 0] = o, this.uint8[E + 1] = u, this.float32[k + 1] = p, this.float32[k + 2] = v, this.int16[L + 6] = b, this.int16[L + 7] = x, n;
21974        }
21975      }
21976      Me.prototype.bytesPerElement = 16, Mt("StructArrayLayout2ub2f2i16", Me);
21977      class Fe extends y {
21978        _refreshViews() {
21979          this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
21980        }
21981        emplaceBack(n, o, u) {
21982          const p = this.length;
21983          return this.resize(p + 1), this.emplace(p, n, o, u);
21984        }
21985        emplace(n, o, u, p) {
21986          const v = 3 * n;
21987          return this.uint16[v + 0] = o, this.uint16[v + 1] = u, this.uint16[v + 2] = p, n;
21988        }
21989      }
21990      Fe.prototype.bytesPerElement = 6, Mt("StructArrayLayout3ui6", Fe);
21991      class Je extends y {
21992        _refreshViews() {
21993          this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
21994        }
21995        emplaceBack(n, o, u, p, v, b, x, E, k, L, B, V, q, W, Y, oe, he) {
21996          const De = this.length;
21997          return this.resize(De + 1), this.emplace(De, n, o, u, p, v, b, x, E, k, L, B, V, q, W, Y, oe, he);
21998        }
21999        emplace(n, o, u, p, v, b, x, E, k, L, B, V, q, W, Y, oe, he, De) {
22000          const xe = 24 * n, ke = 12 * n, Ve = 48 * n;
22001          return this.int16[xe + 0] = o, this.int16[xe + 1] = u, this.uint16[xe + 2] = p, this.uint16[xe + 3] = v, this.uint32[ke + 2] = b, this.uint32[ke + 3] = x, this.uint32[ke + 4] = E, this.uint16[xe + 10] = k, this.uint16[xe + 11] = L, this.uint16[xe + 12] = B, this.float32[ke + 7] = V, this.float32[ke + 8] = q, this.uint8[Ve + 36] = W, this.uint8[Ve + 37] = Y, this.uint8[Ve + 38] = oe, this.uint32[ke + 10] = he, this.int16[xe + 22] = De, n;
22002        }
22003      }
22004      Je.prototype.bytesPerElement = 48, Mt("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48", Je);
22005      class lt extends y {
22006        _refreshViews() {
22007          this.uint8 = new Uint8Array(this.arrayBuffer), this.int16 = new Int16Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
22008        }
22009        emplaceBack(n, o, u, p, v, b, x, E, k, L, B, V, q, W, Y, oe, he, De, xe, ke, Ve, at, At, Kt, St, _t, $t, Ot) {
22010          const It = this.length;
22011          return this.resize(It + 1), this.emplace(It, n, o, u, p, v, b, x, E, k, L, B, V, q, W, Y, oe, he, De, xe, ke, Ve, at, At, Kt, St, _t, $t, Ot);
22012        }
22013        emplace(n, o, u, p, v, b, x, E, k, L, B, V, q, W, Y, oe, he, De, xe, ke, Ve, at, At, Kt, St, _t, $t, Ot, It) {
22014          const Ke = 32 * n, Vt = 16 * n;
22015          return this.int16[Ke + 0] = o, this.int16[Ke + 1] = u, this.int16[Ke + 2] = p, this.int16[Ke + 3] = v, this.int16[Ke + 4] = b, this.int16[Ke + 5] = x, this.int16[Ke + 6] = E, this.int16[Ke + 7] = k, this.uint16[Ke + 8] = L, this.uint16[Ke + 9] = B, this.uint16[Ke + 10] = V, this.uint16[Ke + 11] = q, this.uint16[Ke + 12] = W, this.uint16[Ke + 13] = Y, this.uint16[Ke + 14] = oe, this.uint16[Ke + 15] = he, this.uint16[Ke + 16] = De, this.uint16[Ke + 17] = xe, this.uint16[Ke + 18] = ke, this.uint16[Ke + 19] = Ve, this.uint16[Ke + 20] = at, this.uint16[Ke + 21] = At, this.uint16[Ke + 22] = Kt, this.uint32[Vt + 12] = St, this.float32[Vt + 13] = _t, this.float32[Vt + 14] = $t, this.uint16[Ke + 30] = Ot, this.uint16[Ke + 31] = It, n;
22016        }
22017      }
22018      lt.prototype.bytesPerElement = 64, Mt("StructArrayLayout8i15ui1ul2f2ui64", lt);
22019      class vt extends y {
22020        _refreshViews() {
22021          this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
22022        }
22023        emplaceBack(n) {
22024          const o = this.length;
22025          return this.resize(o + 1), this.emplace(o, n);
22026        }
22027        emplace(n, o) {
22028          return this.float32[1 * n + 0] = o, n;
22029        }
22030      }
22031      vt.prototype.bytesPerElement = 4, Mt("StructArrayLayout1f4", vt);
22032      class Ct extends y {
22033        _refreshViews() {
22034          this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
22035        }
22036        emplaceBack(n, o, u) {
22037          const p = this.length;
22038          return this.resize(p + 1), this.emplace(p, n, o, u);
22039        }
22040        emplace(n, o, u, p) {
22041          const v = 3 * n;
22042          return this.uint16[6 * n + 0] = o, this.float32[v + 1] = u, this.float32[v + 2] = p, n;
22043        }
22044      }
22045      Ct.prototype.bytesPerElement = 12, Mt("StructArrayLayout1ui2f12", Ct);
22046      class gt extends y {
22047        _refreshViews() {
22048          this.uint8 = new Uint8Array(this.arrayBuffer), this.uint32 = new Uint32Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
22049        }
22050        emplaceBack(n, o, u) {
22051          const p = this.length;
22052          return this.resize(p + 1), this.emplace(p, n, o, u);
22053        }
22054        emplace(n, o, u, p) {
22055          const v = 4 * n;
22056          return this.uint32[2 * n + 0] = o, this.uint16[v + 2] = u, this.uint16[v + 3] = p, n;
22057        }
22058      }
22059      gt.prototype.bytesPerElement = 8, Mt("StructArrayLayout1ul2ui8", gt);
22060      class pt extends y {
22061        _refreshViews() {
22062          this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
22063        }
22064        emplaceBack(n, o) {
22065          const u = this.length;
22066          return this.resize(u + 1), this.emplace(u, n, o);
22067        }
22068        emplace(n, o, u) {
22069          const p = 2 * n;
22070          return this.uint16[p + 0] = o, this.uint16[p + 1] = u, n;
22071        }
22072      }
22073      pt.prototype.bytesPerElement = 4, Mt("StructArrayLayout2ui4", pt);
22074      class Ft extends y {
22075        _refreshViews() {
22076          this.uint8 = new Uint8Array(this.arrayBuffer), this.uint16 = new Uint16Array(this.arrayBuffer);
22077        }
22078        emplaceBack(n) {
22079          const o = this.length;
22080          return this.resize(o + 1), this.emplace(o, n);
22081        }
22082        emplace(n, o) {
22083          return this.uint16[1 * n + 0] = o, n;
22084        }
22085      }
22086      Ft.prototype.bytesPerElement = 2, Mt("StructArrayLayout1ui2", Ft);
22087      class ir extends y {
22088        _refreshViews() {
22089          this.uint8 = new Uint8Array(this.arrayBuffer), this.float32 = new Float32Array(this.arrayBuffer);
22090        }
22091        emplaceBack(n, o, u, p) {
22092          const v = this.length;
22093          return this.resize(v + 1), this.emplace(v, n, o, u, p);
22094        }
22095        emplace(n, o, u, p, v) {
22096          const b = 4 * n;
22097          return this.float32[b + 0] = o, this.float32[b + 1] = u, this.float32[b + 2] = p, this.float32[b + 3] = v, n;
22098        }
22099      }
22100      ir.prototype.bytesPerElement = 16, Mt("StructArrayLayout4f16", ir);
22101      class yt extends d {
22102        get anchorPointX() {
22103          return this._structArray.int16[this._pos2 + 0];
22104        }
22105        get anchorPointY() {
22106          return this._structArray.int16[this._pos2 + 1];
22107        }
22108        get x1() {
22109          return this._structArray.int16[this._pos2 + 2];
22110        }
22111        get y1() {
22112          return this._structArray.int16[this._pos2 + 3];
22113        }
22114        get x2() {
22115          return this._structArray.int16[this._pos2 + 4];
22116        }
22117        get y2() {
22118          return this._structArray.int16[this._pos2 + 5];
22119        }
22120        get featureIndex() {
22121          return this._structArray.uint32[this._pos4 + 3];
22122        }
22123        get sourceLayerIndex() {
22124          return this._structArray.uint16[this._pos2 + 8];
22125        }
22126        get bucketIndex() {
22127          return this._structArray.uint16[this._pos2 + 9];
22128        }
22129        get anchorPoint() {
22130          return new R(this.anchorPointX, this.anchorPointY);
22131        }
22132      }
22133      yt.prototype.size = 20;
22134      class Et extends _e {
22135        get(n) {
22136          return new yt(this, n);
22137        }
22138      }
22139      Mt("CollisionBoxArray", Et);
22140      class rr extends d {
22141        get anchorX() {
22142          return this._structArray.int16[this._pos2 + 0];
22143        }
22144        get anchorY() {
22145          return this._structArray.int16[this._pos2 + 1];
22146        }
22147        get glyphStartIndex() {
22148          return this._structArray.uint16[this._pos2 + 2];
22149        }
22150        get numGlyphs() {
22151          return this._structArray.uint16[this._pos2 + 3];
22152        }
22153        get vertexStartIndex() {
22154          return this._structArray.uint32[this._pos4 + 2];
22155        }
22156        get lineStartIndex() {
22157          return this._structArray.uint32[this._pos4 + 3];
22158        }
22159        get lineLength() {
22160          return this._structArray.uint32[this._pos4 + 4];
22161        }
22162        get segment() {
22163          return this._structArray.uint16[this._pos2 + 10];
22164        }
22165        get lowerSize() {
22166          return this._structArray.uint16[this._pos2 + 11];
22167        }
22168        get upperSize() {
22169          return this._structArray.uint16[this._pos2 + 12];
22170        }
22171        get lineOffsetX() {
22172          return this._structArray.float32[this._pos4 + 7];
22173        }
22174        get lineOffsetY() {
22175          return this._structArray.float32[this._pos4 + 8];
22176        }
22177        get writingMode() {
22178          return this._structArray.uint8[this._pos1 + 36];
22179        }
22180        get placedOrientation() {
22181          return this._structArray.uint8[this._pos1 + 37];
22182        }
22183        set placedOrientation(n) {
22184          this._structArray.uint8[this._pos1 + 37] = n;
22185        }
22186        get hidden() {
22187          return this._structArray.uint8[this._pos1 + 38];
22188        }
22189        set hidden(n) {
22190          this._structArray.uint8[this._pos1 + 38] = n;
22191        }
22192        get crossTileID() {
22193          return this._structArray.uint32[this._pos4 + 10];
22194        }
22195        set crossTileID(n) {
22196          this._structArray.uint32[this._pos4 + 10] = n;
22197        }
22198        get associatedIconIndex() {
22199          return this._structArray.int16[this._pos2 + 22];
22200        }
22201      }
22202      rr.prototype.size = 48;
22203      class yn extends Je {
22204        get(n) {
22205          return new rr(this, n);
22206        }
22207      }
22208      Mt("PlacedSymbolArray", yn);
22209      class pr extends d {
22210        get anchorX() {
22211          return this._structArray.int16[this._pos2 + 0];
22212        }
22213        get anchorY() {
22214          return this._structArray.int16[this._pos2 + 1];
22215        }
22216        get rightJustifiedTextSymbolIndex() {
22217          return this._structArray.int16[this._pos2 + 2];
22218        }
22219        get centerJustifiedTextSymbolIndex() {
22220          return this._structArray.int16[this._pos2 + 3];
22221        }
22222        get leftJustifiedTextSymbolIndex() {
22223          return this._structArray.int16[this._pos2 + 4];
22224        }
22225        get verticalPlacedTextSymbolIndex() {
22226          return this._structArray.int16[this._pos2 + 5];
22227        }
22228        get placedIconSymbolIndex() {
22229          return this._structArray.int16[this._pos2 + 6];
22230        }
22231        get verticalPlacedIconSymbolIndex() {
22232          return this._structArray.int16[this._pos2 + 7];
22233        }
22234        get key() {
22235          return this._structArray.uint16[this._pos2 + 8];
22236        }
22237        get textBoxStartIndex() {
22238          return this._structArray.uint16[this._pos2 + 9];
22239        }
22240        get textBoxEndIndex() {
22241          return this._structArray.uint16[this._pos2 + 10];
22242        }
22243        get verticalTextBoxStartIndex() {
22244          return this._structArray.uint16[this._pos2 + 11];
22245        }
22246        get verticalTextBoxEndIndex() {
22247          return this._structArray.uint16[this._pos2 + 12];
22248        }
22249        get iconBoxStartIndex() {
22250          return this._structArray.uint16[this._pos2 + 13];
22251        }
22252        get iconBoxEndIndex() {
22253          return this._structArray.uint16[this._pos2 + 14];
22254        }
22255        get verticalIconBoxStartIndex() {
22256          return this._structArray.uint16[this._pos2 + 15];
22257        }
22258        get verticalIconBoxEndIndex() {
22259          return this._structArray.uint16[this._pos2 + 16];
22260        }
22261        get featureIndex() {
22262          return this._structArray.uint16[this._pos2 + 17];
22263        }
22264        get numHorizontalGlyphVertices() {
22265          return this._structArray.uint16[this._pos2 + 18];
22266        }
22267        get numVerticalGlyphVertices() {
22268          return this._structArray.uint16[this._pos2 + 19];
22269        }
22270        get numIconVertices() {
22271          return this._structArray.uint16[this._pos2 + 20];
22272        }
22273        get numVerticalIconVertices() {
22274          return this._structArray.uint16[this._pos2 + 21];
22275        }
22276        get useRuntimeCollisionCircles() {
22277          return this._structArray.uint16[this._pos2 + 22];
22278        }
22279        get crossTileID() {
22280          return this._structArray.uint32[this._pos4 + 12];
22281        }
22282        set crossTileID(n) {
22283          this._structArray.uint32[this._pos4 + 12] = n;
22284        }
22285        get textBoxScale() {
22286          return this._structArray.float32[this._pos4 + 13];
22287        }
22288        get collisionCircleDiameter() {
22289          return this._structArray.float32[this._pos4 + 14];
22290        }
22291        get textAnchorOffsetStartIndex() {
22292          return this._structArray.uint16[this._pos2 + 30];
22293        }
22294        get textAnchorOffsetEndIndex() {
22295          return this._structArray.uint16[this._pos2 + 31];
22296        }
22297      }
22298      pr.prototype.size = 64;
22299      class xr extends lt {
22300        get(n) {
22301          return new pr(this, n);
22302        }
22303      }
22304      Mt("SymbolInstanceArray", xr);
22305      class _n extends vt {
22306        getoffsetX(n) {
22307          return this.float32[1 * n + 0];
22308        }
22309      }
22310      Mt("GlyphOffsetArray", _n);
22311      class _i extends F {
22312        getx(n) {
22313          return this.int16[3 * n + 0];
22314        }
22315        gety(n) {
22316          return this.int16[3 * n + 1];
22317        }
22318        gettileUnitDistanceFromAnchor(n) {
22319          return this.int16[3 * n + 2];
22320        }
22321      }
22322      Mt("SymbolLineVertexArray", _i);
22323      class qs extends d {
22324        get textAnchor() {
22325          return this._structArray.uint16[this._pos2 + 0];
22326        }
22327        get textOffset0() {
22328          return this._structArray.float32[this._pos4 + 1];
22329        }
22330        get textOffset1() {
22331          return this._structArray.float32[this._pos4 + 2];
22332        }
22333      }
22334      qs.prototype.size = 12;
22335      class vn extends Ct {
22336        get(n) {
22337          return new qs(this, n);
22338        }
22339      }
22340      Mt("TextAnchorOffsetArray", vn);
22341      class Hi extends d {
22342        get featureIndex() {
22343          return this._structArray.uint32[this._pos4 + 0];
22344        }
22345        get sourceLayerIndex() {
22346          return this._structArray.uint16[this._pos2 + 2];
22347        }
22348        get bucketIndex() {
22349          return this._structArray.uint16[this._pos2 + 3];
22350        }
22351      }
22352      Hi.prototype.size = 8;
22353      class Mi extends gt {
22354        get(n) {
22355          return new Hi(this, n);
22356        }
22357      }
22358      Mt("FeatureIndexArray", Mi);
22359      class vi extends I {
22360      }
22361      class ki extends I {
22362      }
22363      class _o extends I {
22364      }
22365      class Pl extends $ {
22366      }
22367      class Cu extends G {
22368      }
22369      class Ml extends Q {
22370      }
22371      class ws extends te {
22372      }
22373      class Iu extends ae {
22374      }
22375      class lf extends fe {
22376      }
22377      class Ss extends pe {
22378      }
22379      class Ts extends se {
22380      }
22381      class sa extends Me {
22382      }
22383      class Hs extends Fe {
22384      }
22385      class oi extends pt {
22386      }
22387      const bi = S([{ name: "a_pos", components: 2, type: "Int16" }], 4), { members: us } = bi;
22388      class Tr {
22389        constructor(n = []) {
22390          this.segments = n;
22391        }
22392        prepareSegment(n, o, u, p) {
22393          let v = this.segments[this.segments.length - 1];
22394          return n > Tr.MAX_VERTEX_ARRAY_LENGTH && $e(`Max vertices per segment is ${Tr.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${n}`), (!v || v.vertexLength + n > Tr.MAX_VERTEX_ARRAY_LENGTH || v.sortKey !== p) && (v = { vertexOffset: o.length, primitiveOffset: u.length, vertexLength: 0, primitiveLength: 0 }
vendor: 14,088 bytes, lines 22394-22661
22394, p !== void 0 && (v.sortKey = p), this.segments.push(v)), v;
22395        }
22396        get() {
22397          return this.segments;
22398        }
22399        destroy() {
22400          for (const n of this.segments) for (const o in n.vaos) n.vaos[o].destroy();
22401        }
22402        static simpleSegment(n, o, u, p) {
22403          return new Tr([{ vertexOffset: n, primitiveOffset: o, vertexLength: u, primitiveLength: p, vaos: {}, sortKey: 0 }]);
22404        }
22405      }
22406      function $a(i, n) {
22407        return 256 * (i = Ae(Math.floor(i), 0, 255)) + Ae(Math.floor(n), 0, 255);
22408      }
22409      Tr.MAX_VERTEX_ARRAY_LENGTH = Math.pow(2, 16) - 1, Mt("SegmentVector", Tr);
22410      const kl = S([{ name: "a_pattern_from", components: 4, type: "Uint16" }, { name: "a_pattern_to", components: 4, type: "Uint16" }, { name: "a_pixel_ratio_from", components: 1, type: "Uint16" }, { name: "a_pixel_ratio_to", components: 1, type: "Uint16" }]);
22411      var Ol = { exports: {} }, Kd = { exports: {} };
22412      Kd.exports = function(i, n) {
22413        var o, u, p, v, b, x, E, k;
22414        for (u = i.length - (o = 3 & i.length), p = n, b = 3432918353, x = 461845907, k = 0; k < u; ) E = 255 & i.charCodeAt(k) | (255 & i.charCodeAt(++k)) << 8 | (255 & i.charCodeAt(++k)) << 16 | (255 & i.charCodeAt(++k)) << 24, ++k, p = 27492 + (65535 & (v = 5 * (65535 & (p = (p ^= E = (65535 & (E = (E = (65535 & E) * b + (((E >>> 16) * b & 65535) << 16) & 4294967295) << 15 | E >>> 17)) * x + (((E >>> 16) * x & 65535) << 16) & 4294967295) << 13 | p >>> 19)) + ((5 * (p >>> 16) & 65535) << 16) & 4294967295)) + ((58964 + (v >>> 16) & 65535) << 16);
22415        switch (E = 0, o) {
22416          case 3:
22417            E ^= (255 & i.charCodeAt(k + 2)) << 16;
22418          case 2:
22419            E ^= (255 & i.charCodeAt(k + 1)) << 8;
22420          case 1:
22421            p ^= E = (65535 & (E = (E = (65535 & (E ^= 255 & i.charCodeAt(k))) * b + (((E >>> 16) * b & 65535) << 16) & 4294967295) << 15 | E >>> 17)) * x + (((E >>> 16) * x & 65535) << 16) & 4294967295;
22422        }
22423        return p ^= i.length, p = 2246822507 * (65535 & (p ^= p >>> 16)) + ((2246822507 * (p >>> 16) & 65535) << 16) & 4294967295, p = 3266489909 * (65535 & (p ^= p >>> 13)) + ((3266489909 * (p >>> 16) & 65535) << 16) & 4294967295, (p ^= p >>> 16) >>> 0;
22424      };
22425      var ny = Kd.exports, Xd = { exports: {} };
22426      Xd.exports = function(i, n) {
22427        for (var o, u = i.length, p = n ^ u, v = 0; u >= 4; ) o = 1540483477 * (65535 & (o = 255 & i.charCodeAt(v) | (255 & i.charCodeAt(++v)) << 8 | (255 & i.charCodeAt(++v)) << 16 | (255 & i.charCodeAt(++v)) << 24)) + ((1540483477 * (o >>> 16) & 65535) << 16), p = 1540483477 * (65535 & p) + ((1540483477 * (p >>> 16) & 65535) << 16) ^ (o = 1540483477 * (65535 & (o ^= o >>> 24)) + ((1540483477 * (o >>> 16) & 65535) << 16)), u -= 4, ++v;
22428        switch (u) {
22429          case 3:
22430            p ^= (255 & i.charCodeAt(v + 2)) << 16;
22431          case 2:
22432            p ^= (255 & i.charCodeAt(v + 1)) << 8;
22433          case 1:
22434            p = 1540483477 * (65535 & (p ^= 255 & i.charCodeAt(v))) + ((1540483477 * (p >>> 16) & 65535) << 16);
22435        }
22436        return p = 1540483477 * (65535 & (p ^= p >>> 13)) + ((1540483477 * (p >>> 16) & 65535) << 16), (p ^= p >>> 15) >>> 0;
22437      };
22438      var oa = ny, Jd = Xd.exports;
22439      Ol.exports = oa, Ol.exports.murmur3 = oa, Ol.exports.murmur2 = Jd;
22440      var Pu = w(Ol.exports);
22441      class Ac {
22442        constructor() {
22443          this.ids = [], this.positions = [], this.indexed = !1;
22444        }
22445        add(n, o, u, p) {
22446          this.ids.push(Mu(n)), this.positions.push(o, u, p);
22447        }
22448        getPositions(n) {
22449          if (!this.indexed) throw new Error("Trying to get index, but feature positions are not indexed");
22450          const o = Mu(n);
22451          let u = 0, p = this.ids.length - 1;
22452          for (; u < p; ) {
22453            const b = u + p >> 1;
22454            this.ids[b] >= o ? p = b : u = b + 1;
22455          }
22456          const v = [];
22457          for (; this.ids[u] === o; ) v.push({ index: this.positions[3 * u], start: this.positions[3 * u + 1], end: this.positions[3 * u + 2] }), u++;
22458          return v;
22459        }
22460        static serialize(n, o) {
22461          const u = new Float64Array(n.ids), p = new Uint32Array(n.positions);
22462          return ku(u, p, 0, u.length - 1), o && o.push(u.buffer, p.buffer), { ids: u, positions: p };
22463        }
22464        static deserialize(n) {
22465          const o = new Ac();
22466          return o.ids = n.ids, o.positions = n.positions, o.indexed = !0, o;
22467        }
22468      }
22469      function Mu(i) {
22470        const n = +i;
22471        return !isNaN(n) && n <= Number.MAX_SAFE_INTEGER ? n : Pu(String(i));
22472      }
22473      function ku(i, n, o, u) {
22474        for (; o < u; ) {
22475          const p = i[o + u >> 1];
22476          let v = o - 1, b = u + 1;
22477          for (; ; ) {
22478            do
22479              v++;
22480            while (i[v] < p);
22481            do
22482              b--;
22483            while (i[b] > p);
22484            if (v >= b) break;
22485            Dl(i, v, b), Dl(n, 3 * v, 3 * b), Dl(n, 3 * v + 1, 3 * b + 1), Dl(n, 3 * v + 2, 3 * b + 2);
22486          }
22487          b - o < u - b ? (ku(i, n, o, b), o = b + 1) : (ku(i, n, b + 1, u), u = b);
22488        }
22489      }
22490      function Dl(i, n, o) {
22491        const u = i[n];
22492        i[n] = i[o], i[o] = u;
22493      }
22494      Mt("FeaturePositionMap", Ac);
22495      class Cc {
22496        constructor(n, o) {
22497          this.gl = n.gl, this.location = o;
22498        }
22499      }
22500      class Yd extends Cc {
22501        constructor(n, o) {
22502          super(n, o), this.current = 0;
22503        }
22504        set(n) {
22505          this.current !== n && (this.current = n, this.gl.uniform1f(this.location, n));
22506        }
22507      }
22508      class r0 extends Cc {
22509        constructor(n, o) {
22510          super(n, o), this.current = [0, 0, 0, 0];
22511        }
22512        set(n) {
22513          n[0] === this.current[0] && n[1] === this.current[1] && n[2] === this.current[2] && n[3] === this.current[3] || (this.current = n, this.gl.uniform4f(this.location, n[0], n[1], n[2], n[3]));
22514        }
22515      }
22516      class n0 extends Cc {
22517        constructor(n, o) {
22518          super(n, o), this.current = Mr.transparent;
22519        }
22520        set(n) {
22521          n.r === this.current.r && n.g === this.current.g && n.b === this.current.b && n.a === this.current.a || (this.current = n, this.gl.uniform4f(this.location, n.r, n.g, n.b, n.a));
22522        }
22523      }
22524      const Sk = new Float32Array(16);
22525      function iy(i) {
22526        return [$a(255 * i.r, 255 * i.g), $a(255 * i.b, 255 * i.a)];
22527      }
22528      class cf {
22529        constructor(n, o, u) {
22530          this.value = n, this.uniformNames = o.map((p) => `u_${p}`), this.type = u;
22531        }
22532        setUniform(n, o, u) {
22533          n.set(u.constantOr(this.value));
22534        }
22535        getBinding(n, o, u) {
22536          return this.type === "color" ? new n0(n, o) : new Yd(n, o);
22537        }
22538      }
22539      class Ou {
22540        constructor(n, o) {
22541          this.uniformNames = o.map((u) => `u_${u}`), this.patternFrom = null, this.patternTo = null, this.pixelRatioFrom = 1, this.pixelRatioTo = 1;
22542        }
22543        setConstantPatternPositions(n, o) {
22544          this.pixelRatioFrom = o.pixelRatio, this.pixelRatioTo = n.pixelRatio, this.patternFrom = o.tlbr, this.patternTo = n.tlbr;
22545        }
22546        setUniform(n, o, u, p) {
22547          const v = p === "u_pattern_to" ? this.patternTo : p === "u_pattern_from" ? this.patternFrom : p === "u_pixel_ratio_to" ? this.pixelRatioTo : p === "u_pixel_ratio_from" ? this.pixelRatioFrom : null;
22548          v && n.set(v);
22549        }
22550        getBinding(n, o, u) {
22551          return u.substr(0, 9) === "u_pattern" ? new r0(n, o) : new Yd(n, o);
22552        }
22553      }
22554      class ja {
22555        constructor(n, o, u, p) {
22556          this.expression = n, this.type = u, this.maxValue = 0, this.paintVertexAttributes = o.map((v) => ({ name: `a_${v}`, type: "Float32", components: u === "color" ? 2 : 1, offset: 0 })), this.paintVertexArray = new p();
22557        }
22558        populatePaintArray(n, o, u, p, v) {
22559          const b = this.paintVertexArray.length, x = this.expression.evaluate(new gn(0), o, {}, p, [], v);
22560          this.paintVertexArray.resize(n), this._setPaintValue(b, n, x);
22561        }
22562        updatePaintArray(n, o, u, p) {
22563          const v = this.expression.evaluate({ zoom: 0 }, u, p);
22564          this._setPaintValue(n, o, v);
22565        }
22566        _setPaintValue(n, o, u) {
22567          if (this.type === "color") {
22568            const p = iy(u);
22569            for (let v = n; v < o; v++) this.paintVertexArray.emplace(v, p[0], p[1]);
22570          } else {
22571            for (let p = n; p < o; p++) this.paintVertexArray.emplace(p, u);
22572            this.maxValue = Math.max(this.maxValue, Math.abs(u));
22573          }
22574        }
22575        upload(n) {
22576          this.paintVertexArray && this.paintVertexArray.arrayBuffer && (this.paintVertexBuffer && this.paintVertexBuffer.buffer ? this.paintVertexBuffer.updateData(this.paintVertexArray) : this.paintVertexBuffer = n.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent));
22577        }
22578        destroy() {
22579          this.paintVertexBuffer && this.paintVertexBuffer.destroy();
22580        }
22581      }
22582      class Ro {
22583        constructor(n, o, u, p, v, b) {
22584          this.expression = n, this.uniformNames = o.map((x) => `u_${x}_t`), this.type = u, this.useIntegerZoom = p, this.zoom = v, this.maxValue = 0, this.paintVertexAttributes = o.map((x) => ({ name: `a_${x}`, type: "Float32", components: u === "color" ? 4 : 2, offset: 0 })), this.paintVertexArray = new b();
22585        }
22586        populatePaintArray(n, o, u, p, v) {
22587          const b = this.expression.evaluate(new gn(this.zoom), o, {}, p, [], v), x = this.expression.evaluate(new gn(this.zoom + 1), o, {}, p, [], v), E = this.paintVertexArray.length;
22588          this.paintVertexArray.resize(n), this._setPaintValue(E, n, b, x);
22589        }
22590        updatePaintArray(n, o, u, p) {
22591          const v = this.expression.evaluate({ zoom: this.zoom }, u, p), b = this.expression.evaluate({ zoom: this.zoom + 1 }, u, p);
22592          this._setPaintValue(n, o, v, b);
22593        }
22594        _setPaintValue(n, o, u, p) {
22595          if (this.type === "color") {
22596            const v = iy(u), b = iy(p);
22597            for (let x = n; x < o; x++) this.paintVertexArray.emplace(x, v[0], v[1], b[0], b[1]);
22598          } else {
22599            for (let v = n; v < o; v++) this.paintVertexArray.emplace(v, u, p);
22600            this.maxValue = Math.max(this.maxValue, Math.abs(u), Math.abs(p));
22601          }
22602        }
22603        upload(n) {
22604          this.paintVertexArray && this.paintVertexArray.arrayBuffer && (this.paintVertexBuffer && this.paintVertexBuffer.buffer ? this.paintVertexBuffer.updateData(this.paintVertexArray) : this.paintVertexBuffer = n.createVertexBuffer(this.paintVertexArray, this.paintVertexAttributes, this.expression.isStateDependent));
22605        }
22606        destroy() {
22607          this.paintVertexBuffer && this.paintVertexBuffer.destroy();
22608        }
22609        setUniform(n, o) {
22610          const u = this.useIntegerZoom ? Math.floor(o.zoom) : o.zoom, p = Ae(this.expression.interpolationFactor(u, this.zoom, this.zoom + 1), 0, 1);
22611          n.set(p);
22612        }
22613        getBinding(n, o, u) {
22614          return new Yd(n, o);
22615        }
22616      }
22617      class Rl {
22618        constructor(n, o, u, p, v, b) {
22619          this.expression = n, this.type = o, this.useIntegerZoom = u, this.zoom = p, this.layerId = b, this.zoomInPaintVertexArray = new v(), this.zoomOutPaintVertexArray = new v();
22620        }
22621        populatePaintArray(n, o, u) {
22622          const p = this.zoomInPaintVertexArray.length;
22623          this.zoomInPaintVertexArray.resize(n), this.zoomOutPaintVertexArray.resize(n), this._setPaintValues(p, n, o.patterns && o.patterns[this.layerId], u);
22624        }
22625        updatePaintArray(n, o, u, p, v) {
22626          this._setPaintValues(n, o, u.patterns && u.patterns[this.layerId], v);
22627        }
22628        _setPaintValues(n, o, u, p) {
22629          if (!p || !u) return;
22630          const { min: v, mid: b, max: x } = u, E = p[v], k = p[b], L = p[x];
22631          if (E && k && L) for (let B = n; B < o; B++) this.zoomInPaintVertexArray.emplace(B, k.tl[0], k.tl[1], k.br[0], k.br[1], E.tl[0], E.tl[1], E.br[0], E.br[1], k.pixelRatio, E.pixelRatio), this.zoomOutPaintVertexArray.emplace(B, k.tl[0], k.tl[1], k.br[0], k.br[1], L.tl[0], L.tl[1], L.br[0], L.br[1], k.pixelRatio, L.pixelRatio);
22632        }
22633        upload(n) {
22634          this.zoomInPaintVertexArray && this.zoomInPaintVertexArray.arrayBuffer && this.zoomOutPaintVertexArray && this.zoomOutPaintVertexArray.arrayBuffer && (this.zoomInPaintVertexBuffer = n.createVertexBuffer(this.zoomInPaintVertexArray, kl.members, this.expression.isStateDependent), this.zoomOutPaintVertexBuffer = n.createVertexBuffer(this.zoomOutPaintVertexArray, kl.members, this.expression.isStateDependent));
22635        }
22636        destroy() {
22637          this.zoomOutPaintVertexBuffer && this.zoomOutPaintVertexBuffer.destroy(), this.zoomInPaintVertexBuffer && this.zoomInPaintVertexBuffer.destroy();
22638        }
22639      }
22640      class i0 {
22641        constructor(n, o, u) {
22642          this.binders = {}, this._buffers = [];
22643          const p = [];
22644          for (const v in n.paint._values) {
22645            if (!u(v)) continue;
22646            const b = n.paint.get(v);
22647            if (!(b instanceof yo && _s(b.property.specification))) continue;
22648            const x = Tk(v, n.type), E = b.value, k = b.property.specification.type, L = b.property.useIntegerZoom, B = b.property.specification["property-type"], V = B === "cross-faded" || B === "cross-faded-data-driven";
22649            if (E.kind === "constant") this.binders[v] = V ? new Ou(E.value, x) : new cf(E.value, x, k), p.push(`/u_${v}`);
22650            else if (E.kind === "source" || V) {
22651              const q = s0(v, k, "source");
22652              this.binders[v] = V ? new Rl(E, k, L, o, q, n.id) : new ja(E, x, k, q), p.push(`/a_${v}`);
22653            } else {
22654              const q = s0(v, k, "composite");
22655              this.binders[v] = new Ro(E, x, k, L, o, q), p.push(`/z_${v}`);
22656            }
22657          }
22658          this.cacheKey = p.sort().join("");
22659        }
22660        getMaxValue(n) {
22661          const o = this.binders[n];
vendor: 7,785 bytes, lines 22662-22821
22662          return o instanceof ja || o instanceof Ro ? o.maxValue : 0;
22663        }
22664        populatePaintArrays(n, o, u, p, v) {
22665          for (const b in this.binders) {
22666            const x = this.binders[b];
22667            (x instanceof ja || x instanceof Ro || x instanceof Rl) && x.populatePaintArray(n, o, u, p, v);
22668          }
22669        }
22670        setConstantPatternPositions(n, o) {
22671          for (const u in this.binders) {
22672            const p = this.binders[u];
22673            p instanceof Ou && p.setConstantPatternPositions(n, o);
22674          }
22675        }
22676        updatePaintArrays(n, o, u, p, v) {
22677          let b = !1;
22678          for (const x in n) {
22679            const E = o.getPositions(x);
22680            for (const k of E) {
22681              const L = u.feature(k.index);
22682              for (const B in this.binders) {
22683                const V = this.binders[B];
22684                if ((V instanceof ja || V instanceof Ro || V instanceof Rl) && V.expression.isStateDependent === !0) {
22685                  const q = p.paint.get(B);
22686                  V.expression = q.value, V.updatePaintArray(k.start, k.end, L, n[x], v), b = !0;
22687                }
22688              }
22689            }
22690          }
22691          return b;
22692        }
22693        defines() {
22694          const n = [];
22695          for (const o in this.binders) {
22696            const u = this.binders[o];
22697            (u instanceof cf || u instanceof Ou) && n.push(...u.uniformNames.map((p) => `#define HAS_UNIFORM_${p}`));
22698          }
22699          return n;
22700        }
22701        getBinderAttributes() {
22702          const n = [];
22703          for (const o in this.binders) {
22704            const u = this.binders[o];
22705            if (u instanceof ja || u instanceof Ro) for (let p = 0; p < u.paintVertexAttributes.length; p++) n.push(u.paintVertexAttributes[p].name);
22706            else if (u instanceof Rl) for (let p = 0; p < kl.members.length; p++) n.push(kl.members[p].name);
22707          }
22708          return n;
22709        }
22710        getBinderUniforms() {
22711          const n = [];
22712          for (const o in this.binders) {
22713            const u = this.binders[o];
22714            if (u instanceof cf || u instanceof Ou || u instanceof Ro) for (const p of u.uniformNames) n.push(p);
22715          }
22716          return n;
22717        }
22718        getPaintVertexBuffers() {
22719          return this._buffers;
22720        }
22721        getUniforms(n, o) {
22722          const u = [];
22723          for (const p in this.binders) {
22724            const v = this.binders[p];
22725            if (v instanceof cf || v instanceof Ou || v instanceof Ro) {
22726              for (const b of v.uniformNames) if (o[b]) {
22727                const x = v.getBinding(n, o[b], b);
22728                u.push({ name: b, property: p, binding: x });
22729              }
22730            }
22731          }
22732          return u;
22733        }
22734        setUniforms(n, o, u, p) {
22735          for (const { name: v, property: b, binding: x } of o) this.binders[b].setUniform(x, p, u.get(b), v);
22736        }
22737        updatePaintBuffers(n) {
22738          this._buffers = [];
22739          for (const o in this.binders) {
22740            const u = this.binders[o];
22741            if (n && u instanceof Rl) {
22742              const p = n.fromScale === 2 ? u.zoomInPaintVertexBuffer : u.zoomOutPaintVertexBuffer;
22743              p && this._buffers.push(p);
22744            } else (u instanceof ja || u instanceof Ro) && u.paintVertexBuffer && this._buffers.push(u.paintVertexBuffer);
22745          }
22746        }
22747        upload(n) {
22748          for (const o in this.binders) {
22749            const u = this.binders[o];
22750            (u instanceof ja || u instanceof Ro || u instanceof Rl) && u.upload(n);
22751          }
22752          this.updatePaintBuffers();
22753        }
22754        destroy() {
22755          for (const n in this.binders) {
22756            const o = this.binders[n];
22757            (o instanceof ja || o instanceof Ro || o instanceof Rl) && o.destroy();
22758          }
22759        }
22760      }
22761      class Ic {
22762        constructor(n, o, u = () => !0) {
22763          this.programConfigurations = {};
22764          for (const p of n) this.programConfigurations[p.id] = new i0(p, o, u);
22765          this.needsUpload = !1, this._featureMap = new Ac(), this._bufferOffset = 0;
22766        }
22767        populatePaintArrays(n, o, u, p, v, b) {
22768          for (const x in this.programConfigurations) this.programConfigurations[x].populatePaintArrays(n, o, p, v, b);
22769          o.id !== void 0 && this._featureMap.add(o.id, u, this._bufferOffset, n), this._bufferOffset = n, this.needsUpload = !0;
22770        }
22771        updatePaintArrays(n, o, u, p) {
22772          for (const v of u) this.needsUpload = this.programConfigurations[v.id].updatePaintArrays(n, this._featureMap, o, v, p) || this.needsUpload;
22773        }
22774        get(n) {
22775          return this.programConfigurations[n];
22776        }
22777        upload(n) {
22778          if (this.needsUpload) {
22779            for (const o in this.programConfigurations) this.programConfigurations[o].upload(n);
22780            this.needsUpload = !1;
22781          }
22782        }
22783        destroy() {
22784          for (const n in this.programConfigurations) this.programConfigurations[n].destroy();
22785        }
22786      }
22787      function Tk(i, n) {
22788        return { "text-opacity": ["opacity"], "icon-opacity": ["opacity"], "text-color": ["fill_color"], "icon-color": ["fill_color"], "text-halo-color": ["halo_color"], "icon-halo-color": ["halo_color"], "text-halo-blur": ["halo_blur"], "icon-halo-blur": ["halo_blur"], "text-halo-width": ["halo_width"], "icon-halo-width": ["halo_width"], "line-gap-width": ["gapwidth"], "line-pattern": ["pattern_to", "pattern_from", "pixel_ratio_to", "pixel_ratio_from"], "fill-pattern": ["pattern_to", "pattern_from", "pixel_ratio_to", "pixel_ratio_from"], "fill-extrusion-pattern": ["pattern_to", "pattern_from", "pixel_ratio_to", "pixel_ratio_from"] }[i] || [i.replace(`${n}-`, "").replace(/-/g, "_")];
22789      }
22790      function s0(i, n, o) {
22791        const u = { color: { source: Q, composite: ir }, number: { source: vt, composite: Q } }, p = function(v) {
22792          return { "line-pattern": { source: ws, composite: ws }, "fill-pattern": { source: ws, composite: ws }, "fill-extrusion-pattern": { source: ws, composite: ws } }[v];
22793        }(i);
22794        return p && p[o] || u[n][o];
22795      }
22796      Mt("ConstantBinder", cf), Mt("CrossFadedConstantBinder", Ou), Mt("SourceExpressionBinder", ja), Mt("CrossFadedCompositeBinder", Rl), Mt("CompositeExpressionBinder", Ro), Mt("ProgramConfiguration", i0, { omit: ["_buffers"] }), Mt("ProgramConfigurationSet", Ic);
22797      const Hn = 8192, sy = Math.pow(2, 14) - 1, o0 = -sy - 1;
22798      function Pc(i) {
22799        const n = Hn / i.extent, o = i.loadGeometry();
22800        for (let u = 0; u < o.length; u++) {
22801          const p = o[u];
22802          for (let v = 0; v < p.length; v++) {
22803            const b = p[v], x = Math.round(b.x * n), E = Math.round(b.y * n);
22804            b.x = Ae(x, o0, sy), b.y = Ae(E, o0, sy), (x < b.x || x > b.x + 1 || E < b.y || E > b.y + 1) && $e("Geometry exceeds allowed extent, reduce your vector tile buffer size");
22805          }
22806        }
22807        return o;
22808      }
22809      function Mc(i, n) {
22810        return { type: i.type, id: i.id, properties: i.properties, geometry: n ? Pc(i) : [] };
22811      }
22812      function Qd(i, n, o, u, p) {
22813        i.emplaceBack(2 * n + (u + 1) / 2, 2 * o + (p + 1) / 2);
22814      }
22815      class oy {
22816        constructor(n) {
22817          this.zoom = n.zoom, this.overscaling = n.overscaling, this.layers = n.layers, this.layerIds = this.layers.map((o) => o.id), this.index = n.index, this.hasPattern = !1, this.layoutVertexArray = new ki(), this.indexArray = new Hs(), this.segments = new Tr(), this.programConfigurations = new Ic(n.layers, n.zoom), this.stateDependentLayerIds = this.layers.filter((o) => o.isStateDependent()).map((o) => o.id);
22818        }
22819        populate(n, o, u) {
22820          const p = this.layers[0], v = [];
22821          let b = null, x = !1;
vendor: 5,424 bytes, lines 22822-22935
22822          p.type === "circle" && (b = p.layout.get("circle-sort-key"), x = !b.isConstant());
22823          for (const { feature: E, id: k, index: L, sourceLayerIndex: B } of n) {
22824            const V = this.layers[0]._featureFilter.needGeometry, q = Mc(E, V);
22825            if (!this.layers[0]._featureFilter.filter(new gn(this.zoom), q, u)) continue;
22826            const W = x ? b.evaluate(q, {}, u) : void 0, Y = { id: k, properties: E.properties, type: E.type, sourceLayerIndex: B, index: L, geometry: V ? q.geometry : Pc(E), patterns: {}, sortKey: W };
22827            v.push(Y);
22828          }
22829          x && v.sort((E, k) => E.sortKey - k.sortKey);
22830          for (const E of v) {
22831            const { geometry: k, index: L, sourceLayerIndex: B } = E, V = n[L].feature;
22832            this.addFeature(E, k, L, u), o.featureIndex.insert(V, k, L, B, this.index);
22833          }
22834        }
22835        update(n, o, u) {
22836          this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(n, o, this.stateDependentLayers, u);
22837        }
22838        isEmpty() {
22839          return this.layoutVertexArray.length === 0;
22840        }
22841        uploadPending() {
22842          return !this.uploaded || this.programConfigurations.needsUpload;
22843        }
22844        upload(n) {
22845          this.uploaded || (this.layoutVertexBuffer = n.createVertexBuffer(this.layoutVertexArray, us), this.indexBuffer = n.createIndexBuffer(this.indexArray)), this.programConfigurations.upload(n), this.uploaded = !0;
22846        }
22847        destroy() {
22848          this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy());
22849        }
22850        addFeature(n, o, u, p) {
22851          for (const v of o) for (const b of v) {
22852            const x = b.x, E = b.y;
22853            if (x < 0 || x >= Hn || E < 0 || E >= Hn) continue;
22854            const k = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray, n.sortKey), L = k.vertexLength;
22855            Qd(this.layoutVertexArray, x, E, -1, -1), Qd(this.layoutVertexArray, x, E, 1, -1), Qd(this.layoutVertexArray, x, E, 1, 1), Qd(this.layoutVertexArray, x, E, -1, 1), this.indexArray.emplaceBack(L, L + 1, L + 2), this.indexArray.emplaceBack(L, L + 3, L + 2), k.vertexLength += 4, k.primitiveLength += 2;
22856          }
22857          this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, n, u, {}, p);
22858        }
22859      }
22860      function a0(i, n) {
22861        for (let o = 0; o < i.length; o++) if (Du(n, i[o])) return !0;
22862        for (let o = 0; o < n.length; o++) if (Du(i, n[o])) return !0;
22863        return !!ay(i, n);
22864      }
22865      function Ek(i, n, o) {
22866        return !!Du(i, n) || !!ly(n, i, o);
22867      }
22868      function l0(i, n) {
22869        if (i.length === 1) return u0(n, i[0]);
22870        for (let o = 0; o < n.length; o++) {
22871          const u = n[o];
22872          for (let p = 0; p < u.length; p++) if (Du(i, u[p])) return !0;
22873        }
22874        for (let o = 0; o < i.length; o++) if (u0(n, i[o])) return !0;
22875        for (let o = 0; o < n.length; o++) if (ay(i, n[o])) return !0;
22876        return !1;
22877      }
22878      function Ak(i, n, o) {
22879        if (i.length > 1) {
22880          if (ay(i, n)) return !0;
22881          for (let u = 0; u < n.length; u++) if (ly(n[u], i, o)) return !0;
22882        }
22883        for (let u = 0; u < i.length; u++) if (ly(i[u], n, o)) return !0;
22884        return !1;
22885      }
22886      function ay(i, n) {
22887        if (i.length === 0 || n.length === 0) return !1;
22888        for (let o = 0; o < i.length - 1; o++) {
22889          const u = i[o], p = i[o + 1];
22890          for (let v = 0; v < n.length - 1; v++) if (Ck(u, p, n[v], n[v + 1])) return !0;
22891        }
22892        return !1;
22893      }
22894      function Ck(i, n, o, u) {
22895        return Xe(i, o, u) !== Xe(n, o, u) && Xe(i, n, o) !== Xe(i, n, u);
22896      }
22897      function ly(i, n, o) {
22898        const u = o * o;
22899        if (n.length === 1) return i.distSqr(n[0]) < u;
22900        for (let p = 1; p < n.length; p++) if (c0(i, n[p - 1], n[p]) < u) return !0;
22901        return !1;
22902      }
22903      function c0(i, n, o) {
22904        const u = n.distSqr(o);
22905        if (u === 0) return i.distSqr(n);
22906        const p = ((i.x - n.x) * (o.x - n.x) + (i.y - n.y) * (o.y - n.y)) / u;
22907        return i.distSqr(p < 0 ? n : p > 1 ? o : o.sub(n)._mult(p)._add(n));
22908      }
22909      function u0(i, n) {
22910        let o, u, p, v = !1;
22911        for (let b = 0; b < i.length; b++) {
22912          o = i[b];
22913          for (let x = 0, E = o.length - 1; x < o.length; E = x++) u = o[x], p = o[E], u.y > n.y != p.y > n.y && n.x < (p.x - u.x) * (n.y - u.y) / (p.y - u.y) + u.x && (v = !v);
22914        }
22915        return v;
22916      }
22917      function Du(i, n) {
22918        let o = !1;
22919        for (let u = 0, p = i.length - 1; u < i.length; p = u++) {
22920          const v = i[u], b = i[p];
22921          v.y > n.y != b.y > n.y && n.x < (b.x - v.x) * (n.y - v.y) / (b.y - v.y) + v.x && (o = !o);
22922        }
22923        return o;
22924      }
22925      function Ik(i, n, o) {
22926        const u = o[0], p = o[2];
22927        if (i.x < u.x && n.x < u.x || i.x > p.x && n.x > p.x || i.y < u.y && n.y < u.y || i.y > p.y && n.y > p.y) return !1;
22928        const v = Xe(i, n, o[0]);
22929        return v !== Xe(i, n, o[1]) || v !== Xe(i, n, o[2]) || v !== Xe(i, n, o[3]);
22930      }
22931      function uf(i, n, o) {
22932        const u = n.paint.get(i).value;
22933        return u.kind === "constant" ? u.value : o.programConfigurations.get(n.id).getMaxValue(i);
22934      }
22935      function ep(i) {
22936        return Math.sqrt(i[0] * i[0] + i[1] * i[1]);
22937      }
22938      function tp(i, n, o, u, p) {
22939        if (!n[0] && !n[1]) return i;
22940        const v = R.convert(n)._mult(p);
22941        o === "viewport" && v._rotate(-u);
22942        const b = [];
22943        for (let x = 0; x < i.length; x++) b.push(i[x].sub(v));
22944        return b;
22945      }
22946      let h0, f0;
22947      Mt("CircleBucket", oy, { omit: ["layers"] });
22948      var Pk = { get paint() {
22949        return f0 = f0 || new _({ "circle-radius": new Xt(re.paint_circle["circle-radius"]), "circle-color": new Xt(re.paint_circle["circle-color"]), "circle-blur": new Xt(re.paint_circle["circle-blur"]), "circle-opacity": new Xt(re.paint_circle["circle-opacity"]), "circle-translate": new Lt(re.paint_circle["circle-translate"]), "circle-translate-anchor": new Lt(re.paint_circle["circle-translate-anchor"]), "circle-pitch-scale": new Lt(re.paint_circle["circle-pitch-scale"]), "circle-pitch-alignment": new Lt(re.paint_circle["circle-pitch-alignment"]), "circle-stroke-width": new Xt(re.paint_circle["circle-stroke-width"]), "circle-stroke-color": new Xt(re.paint_circle["circle-stroke-color"]), "circle-stroke-opacity": new Xt(re.paint_circle["circle-stroke-opacity"]) });
22950      }, get layout() {
22951        return h0 = h0 || new _({ "circle-sort-key": new Xt(re.layout_circle["circle-sort-key"]) });
22952      } }, Gi = 1e-6, Ru = typeof Float32Array < "u" ? Float32Array : Array;
22953      function cy(i) {
22954        return i[0] = 1, i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = 1, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[10] = 1, i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0, i[15] = 1, i;
22955      }
22956      function d0(i, n, o) {
22957        var u = n[0], p = n[1], v = n[2], b = n[3], x = n[4], E = n[5], k = n[6], L = n[7], B = n[8], V = n[9], q = n[10], W = n[11], Y = n[12], oe = n[13], he = n[14], De = n[15], xe = o[0], ke = o[1], Ve = o[2], at = o[3];
22958        return i[0] = xe * u + ke * x + Ve * B + at * Y, i[1] = xe * p + ke * E + Ve * V + at * oe, i[2] = xe * v + ke * k + Ve * q + at * he, i[3] = xe * b + ke * L + Ve * W + at * De, i[4] = (xe = o[4]) * u + (ke = o[5]) * x + (Ve = o[6]) * B + (at = o[7]) * Y, i[5] = xe * p + ke * E + Ve * V + at * oe, i[6] = xe * v + ke * k + Ve * q + at * he, i[7] = xe * b + ke * L + Ve * W + at * De, i[8] = (xe = o[8]) * u + (ke = o[9]) * x + (Ve = o[10]) * B + (at = o[11]) * Y, i[9] = xe * p + ke * E + Ve * V + at * oe, i[10] = xe * v + ke * k + Ve * q + at * he, i[11] = xe * b + ke * L + Ve * W + at * De, i[12] = (xe = o[12]) * u + (ke = o[13]) * x + (Ve = o[14]) * B + (at = o[15]) * Y, i[13] = xe * p + ke * E + Ve * V + at * oe, i[14] = xe * v + ke * k + Ve * q + at * he, i[15] = xe * b + ke * L + Ve * W + at * De, i;
22959      }
22960      Math.hypot || (Math.hypot = function() {
22961        for (var i = 0, n = arguments.length; n--; ) i += arguments[n] * arguments[n];
22962        return Math.sqrt(i);
22963      });
22964      var hf, Mk = d0;
22965      function rp(i, n, o) {
22966        var u = n[0], p = n[1], v = n[2], b = n[3];
22967        return i[0] = o[0] * u + o[4] * p + o[8] * v + o[12] * b, i[1] = o[1] * u + o[5] * p + o[9] * v + o[13] * b, i[2] = o[2] * u + o[6] * p + o[10] * v + o[14] * b, i[3] = o[3] * u + o[7] * p + o[11] * v + o[15] * b, i;
22968      }
22969      hf = new Ru(4), Ru != Float32Array && (hf[0] = 0, hf[1] = 0, hf[2] = 0, hf[3] = 0);
22970      class kk extends a {
22971        constructor(n) {
22972          super(n, Pk);
22973        }
22974        createBucket(n) {
22975          return new oy(n);
22976        }
22977        queryRadius(n) {
22978          const o = n;
22979          return uf("circle-radius", this, o) + uf("circle-stroke-width", this, o) + ep(this.paint.get("circle-translate"));
22980        }
22981        queryIntersectsFeature(n, o, u, p, v, b, x, E) {
22982          const k = tp(n, this.paint.get("circle-translate"), this.paint.get("circle-translate-anchor"), b.angle, x), L = this.paint.get("circle-radius").evaluate(o, u) + this.paint.get("circle-stroke-width").evaluate(o, u), B = this.paint.get("circle-pitch-alignment") === "map", V = B ? k : function(W, Y) {
22983            return W.map((oe) => p0(oe, Y));
22984          }(k, E), q = B ? L * x : L;
22985          for (const W of p) for (const Y of W) {
22986            const oe = B ? Y : p0(Y, E);
22987            let he = q;
22988            const De = rp([], [Y.x, Y.y, 0, 1], E);
22989            if (this.paint.get("circle-pitch-scale") === "viewport" && this.paint.get("circle-pitch-alignment") === "map" ? he *= De[3] / b.cameraToCenterDistance : this.paint.get("circle-pitch-scale") === "map" && this.paint.get("circle-pitch-alignment") === "viewport" && (he *= b.cameraToCenterDistance / De[3]), Ek(V, oe, he)) return !0;
22990          }
22991          return !1;
22992        }
22993      }
22994      function p0(i, n) {
22995        const o = rp([], [i.x, i.y, 0, 1], n);
22996        return new R(o[0] / o[3], o[1] / o[3]);
22997      }
22998      class m0 extends oy {
22999      }
23000      let g0;
23001      Mt("HeatmapBucket", m0, { omit: ["layers"] });
23002      var Ok = { get paint() {
23003        return g0 = g0 || new _({ "heatmap-radius": new Xt(re.paint_heatmap["heatmap-radius"]), "heatmap-weight": new Xt(re.paint_heatmap["heatmap-weight"]), "heatmap-intensity": new Lt(re.paint_heatmap["heatmap-intensity"]), "heatmap-color": new af(re.paint_heatmap["heatmap-color"]), "heatmap-opacity": new Lt(re.paint_heatmap["heatmap-opacity"]) });
23004      } };
23005      function uy(i, { width: n, height: o }, u, p) {
23006        if (p) {
23007          if (p instanceof Uint8ClampedArray) p = new Uint8Array(p.buffer);
23008          else if (p.length !== n * o * u) throw new RangeError(`mismatched image size. expected: ${p.length} but got: ${n * o * u}`);
23009        } else p = new Uint8Array(n * o * u);
23010        return i.width = n, i.height = o, i.data = p, i;
23011      }
23012      function y0(i, { width: n, height: o }, u) {
23013        if (n === i.width && o === i.height) return;
23014        const p = uy({}, { width: n, height: o }, u);
23015        hy(i, p, { x: 0, y: 0 }, { x: 0, y: 0 }, { width: Math.min(i.width, n), height: Math.min(i.height, o) }, u), i.width = n, i.height = o, i.data = p.data;
23016      }
23017      function hy(i, n, o, u, p, v) {
23018        if (p.width === 0 || p.height === 0) return n;
23019        if (p.width > i.width || p.height > i.height || o.x > i.width - p.width || o.y > i.height - p.height) throw new RangeError("out of range source coordinates for image copy");
23020        if (p.width > n.width || p.height > n.height || u.x > n.width - p.width || u.y > n.height - p.height) throw new RangeError("out of range destination coordinates for image copy");
23021        const b = i.data, x = n.data;
23022        if (b === x) throw new Error("srcData equals dstData, so image is already copied");
23023        for (let E = 0; E < p.height; E++) {
vendor: 6,994 bytes, lines 23024-23193
23024          const k = ((o.y + E) * i.width + o.x) * v, L = ((u.y + E) * n.width + u.x) * v;
23025          for (let B = 0; B < p.width * v; B++) x[L + B] = b[k + B];
23026        }
23027        return n;
23028      }
23029      class ff {
23030        constructor(n, o) {
23031          uy(this, n, 1, o);
23032        }
23033        resize(n) {
23034          y0(this, n, 1);
23035        }
23036        clone() {
23037          return new ff({ width: this.width, height: this.height }, new Uint8Array(this.data));
23038        }
23039        static copy(n, o, u, p, v) {
23040          hy(n, o, u, p, v, 1);
23041        }
23042      }
23043      class Gs {
23044        constructor(n, o) {
23045          uy(this, n, 4, o);
23046        }
23047        resize(n) {
23048          y0(this, n, 4);
23049        }
23050        replace(n, o) {
23051          o ? this.data.set(n) : this.data = n instanceof Uint8ClampedArray ? new Uint8Array(n.buffer) : n;
23052        }
23053        clone() {
23054          return new Gs({ width: this.width, height: this.height }, new Uint8Array(this.data));
23055        }
23056        static copy(n, o, u, p, v) {
23057          hy(n, o, u, p, v, 4);
23058        }
23059      }
23060      function _0(i) {
23061        const n = {}, o = i.resolution || 256, u = i.clips ? i.clips.length : 1, p = i.image || new Gs({ width: o, height: u });
23062        if (Math.log(o) / Math.LN2 % 1 != 0) throw new Error(`width is not a power of 2 - ${o}`);
23063        const v = (b, x, E) => {
23064          n[i.evaluationKey] = E;
23065          const k = i.expression.evaluate(n);
23066          p.data[b + x + 0] = Math.floor(255 * k.r / k.a), p.data[b + x + 1] = Math.floor(255 * k.g / k.a), p.data[b + x + 2] = Math.floor(255 * k.b / k.a), p.data[b + x + 3] = Math.floor(255 * k.a);
23067        };
23068        if (i.clips) for (let b = 0, x = 0; b < u; ++b, x += 4 * o) for (let E = 0, k = 0; E < o; E++, k += 4) {
23069          const L = E / (o - 1), { start: B, end: V } = i.clips[b];
23070          v(x, k, B * (1 - L) + V * L);
23071        }
23072        else for (let b = 0, x = 0; b < o; b++, x += 4) v(0, x, b / (o - 1));
23073        return p;
23074      }
23075      Mt("AlphaImage", ff), Mt("RGBAImage", Gs);
23076      const fy = "big-fb";
23077      class Dk extends a {
23078        createBucket(n) {
23079          return new m0(n);
23080        }
23081        constructor(n) {
23082          super(n, Ok), this.heatmapFbos = /* @__PURE__ */ new Map(), this._updateColorRamp();
23083        }
23084        _handleSpecialPaintPropertyUpdate(n) {
23085          n === "heatmap-color" && this._updateColorRamp();
23086        }
23087        _updateColorRamp() {
23088          this.colorRamp = _0({ expression: this._transitionablePaint._values["heatmap-color"].value.expression, evaluationKey: "heatmapDensity", image: this.colorRamp }), this.colorRampTexture = null;
23089        }
23090        resize() {
23091          this.heatmapFbos.has(fy) && this.heatmapFbos.delete(fy);
23092        }
23093        queryRadius() {
23094          return 0;
23095        }
23096        queryIntersectsFeature() {
23097          return !1;
23098        }
23099        hasOffscreenPass() {
23100          return this.paint.get("heatmap-opacity") !== 0 && this.visibility !== "none";
23101        }
23102      }
23103      let v0;
23104      var Rk = { get paint() {
23105        return v0 = v0 || new _({ "hillshade-illumination-direction": new Lt(re.paint_hillshade["hillshade-illumination-direction"]), "hillshade-illumination-anchor": new Lt(re.paint_hillshade["hillshade-illumination-anchor"]), "hillshade-exaggeration": new Lt(re.paint_hillshade["hillshade-exaggeration"]), "hillshade-shadow-color": new Lt(re.paint_hillshade["hillshade-shadow-color"]), "hillshade-highlight-color": new Lt(re.paint_hillshade["hillshade-highlight-color"]), "hillshade-accent-color": new Lt(re.paint_hillshade["hillshade-accent-color"]) });
23106      } };
23107      class Lk extends a {
23108        constructor(n) {
23109          super(n, Rk);
23110        }
23111        hasOffscreenPass() {
23112          return this.paint.get("hillshade-exaggeration") !== 0 && this.visibility !== "none";
23113        }
23114      }
23115      const Fk = S([{ name: "a_pos", components: 2, type: "Int16" }], 4), { members: zk } = Fk;
23116      function b0(i, n, o = 2) {
23117        const u = n && n.length, p = u ? n[0] * o : i.length;
23118        let v = x0(i, 0, p, o, !0);
23119        const b = [];
23120        if (!v || v.next === v.prev) return b;
23121        let x, E, k;
23122        if (u && (v = function(L, B, V, q) {
23123          const W = [];
23124          for (let Y = 0, oe = B.length; Y < oe; Y++) {
23125            const he = x0(L, B[Y] * q, Y < oe - 1 ? B[Y + 1] * q : L.length, q, !1);
23126            he === he.next && (he.steiner = !0), W.push(Hk(he));
23127          }
23128          W.sort(Vk);
23129          for (let Y = 0; Y < W.length; Y++) V = Uk(W[Y], V);
23130          return V;
23131        }(i, n, v, o)), i.length > 80 * o) {
23132          x = 1 / 0, E = 1 / 0;
23133          let L = -1 / 0, B = -1 / 0;
23134          for (let V = o; V < p; V += o) {
23135            const q = i[V], W = i[V + 1];
23136            q < x && (x = q), W < E && (E = W), q > L && (L = q), W > B && (B = W);
23137          }
23138          k = Math.max(L - x, B - E), k = k !== 0 ? 32767 / k : 0;
23139        }
23140        return df(v, b, o, x, E, k, 0), b;
23141      }
23142      function x0(i, n, o, u, p) {
23143        let v;
23144        if (p === function(b, x, E, k) {
23145          let L = 0;
23146          for (let B = x, V = E - k; B < E; B += k) L += (b[V] - b[B]) * (b[B + 1] + b[V + 1]), V = B;
23147          return L;
23148        }(i, n, o, u) > 0) for (let b = n; b < o; b += u) v = T0(b / u | 0, i[b], i[b + 1], v);
23149        else for (let b = o - u; b >= n; b -= u) v = T0(b / u | 0, i[b], i[b + 1], v);
23150        return v && np(v, v.next) && (mf(v), v = v.next), v;
23151      }
23152      function kc(i, n) {
23153        if (!i) return i;
23154        n || (n = i);
23155        let o, u = i;
23156        do
23157          if (o = !1, u.steiner || !np(u, u.next) && jn(u.prev, u, u.next) !== 0) u = u.next;
23158          else {
23159            if (mf(u), u = n = u.prev, u === u.next) break;
23160            o = !0;
23161          }
23162        while (o || u !== n);
23163        return n;
23164      }
23165      function df(i, n, o, u, p, v, b) {
23166        if (!i) return;
23167        !b && v && function(E, k, L, B) {
23168          let V = E;
23169          do
23170            V.z === 0 && (V.z = dy(V.x, V.y, k, L, B)), V.prevZ = V.prev, V.nextZ = V.next, V = V.next;
23171          while (V !== E);
23172          V.prevZ.nextZ = null, V.prevZ = null, function(q) {
23173            let W, Y = 1;
23174            do {
23175              let oe, he = q;
23176              q = null;
23177              let De = null;
23178              for (W = 0; he; ) {
23179                W++;
23180                let xe = he, ke = 0;
23181                for (let at = 0; at < Y && (ke++, xe = xe.nextZ, xe); at++) ;
23182                let Ve = Y;
23183                for (; ke > 0 || Ve > 0 && xe; ) ke !== 0 && (Ve === 0 || !xe || he.z <= xe.z) ? (oe = he, he = he.nextZ, ke--) : (oe = xe, xe = xe.nextZ, Ve--), De ? De.nextZ = oe : q = oe, oe.prevZ = De, De = oe;
23184                he = xe;
23185              }
23186              De.nextZ = null, Y *= 2;
23187            } while (W > 1);
23188          }(V);
23189        }(i, u, p, v);
23190        let x = i;
23191        for (; i.prev !== i.next; ) {
23192          const E = i.prev, k = i.next;
23193          if (v ? Nk(i, u, p, v) : Bk(i)) n.push(E.i, i.i, k.i), mf(i), i = k.next, x = k.next;
vendor: 4,274 bytes, lines 23194-23288
23194          else if ((i = k) === x) {
23195            b ? b === 1 ? df(i = $k(kc(i), n), n, o, u, p, v, 2) : b === 2 && jk(i, n, o, u, p, v) : df(kc(i), n, o, u, p, v, 1);
23196            break;
23197          }
23198        }
23199      }
23200      function Bk(i) {
23201        const n = i.prev, o = i, u = i.next;
23202        if (jn(n, o, u) >= 0) return !1;
23203        const p = n.x, v = o.x, b = u.x, x = n.y, E = o.y, k = u.y, L = p < v ? p < b ? p : b : v < b ? v : b, B = x < E ? x < k ? x : k : E < k ? E : k, V = p > v ? p > b ? p : b : v > b ? v : b, q = x > E ? x > k ? x : k : E > k ? E : k;
23204        let W = u.next;
23205        for (; W !== n; ) {
23206          if (W.x >= L && W.x <= V && W.y >= B && W.y <= q && Lu(p, x, v, E, b, k, W.x, W.y) && jn(W.prev, W, W.next) >= 0) return !1;
23207          W = W.next;
23208        }
23209        return !0;
23210      }
23211      function Nk(i, n, o, u) {
23212        const p = i.prev, v = i, b = i.next;
23213        if (jn(p, v, b) >= 0) return !1;
23214        const x = p.x, E = v.x, k = b.x, L = p.y, B = v.y, V = b.y, q = x < E ? x < k ? x : k : E < k ? E : k, W = L < B ? L < V ? L : V : B < V ? B : V, Y = x > E ? x > k ? x : k : E > k ? E : k, oe = L > B ? L > V ? L : V : B > V ? B : V, he = dy(q, W, n, o, u), De = dy(Y, oe, n, o, u);
23215        let xe = i.prevZ, ke = i.nextZ;
23216        for (; xe && xe.z >= he && ke && ke.z <= De; ) {
23217          if (xe.x >= q && xe.x <= Y && xe.y >= W && xe.y <= oe && xe !== p && xe !== b && Lu(x, L, E, B, k, V, xe.x, xe.y) && jn(xe.prev, xe, xe.next) >= 0 || (xe = xe.prevZ, ke.x >= q && ke.x <= Y && ke.y >= W && ke.y <= oe && ke !== p && ke !== b && Lu(x, L, E, B, k, V, ke.x, ke.y) && jn(ke.prev, ke, ke.next) >= 0)) return !1;
23218          ke = ke.nextZ;
23219        }
23220        for (; xe && xe.z >= he; ) {
23221          if (xe.x >= q && xe.x <= Y && xe.y >= W && xe.y <= oe && xe !== p && xe !== b && Lu(x, L, E, B, k, V, xe.x, xe.y) && jn(xe.prev, xe, xe.next) >= 0) return !1;
23222          xe = xe.prevZ;
23223        }
23224        for (; ke && ke.z <= De; ) {
23225          if (ke.x >= q && ke.x <= Y && ke.y >= W && ke.y <= oe && ke !== p && ke !== b && Lu(x, L, E, B, k, V, ke.x, ke.y) && jn(ke.prev, ke, ke.next) >= 0) return !1;
23226          ke = ke.nextZ;
23227        }
23228        return !0;
23229      }
23230      function $k(i, n) {
23231        let o = i;
23232        do {
23233          const u = o.prev, p = o.next.next;
23234          !np(u, p) && w0(u, o, o.next, p) && pf(u, p) && pf(p, u) && (n.push(u.i, o.i, p.i), mf(o), mf(o.next), o = i = p), o = o.next;
23235        } while (o !== i);
23236        return kc(o);
23237      }
23238      function jk(i, n, o, u, p, v) {
23239        let b = i;
23240        do {
23241          let x = b.next.next;
23242          for (; x !== b.prev; ) {
23243            if (b.i !== x.i && Gk(b, x)) {
23244              let E = S0(b, x);
23245              return b = kc(b, b.next), E = kc(E, E.next), df(b, n, o, u, p, v, 0), void df(E, n, o, u, p, v, 0);
23246            }
23247            x = x.next;
23248          }
23249          b = b.next;
23250        } while (b !== i);
23251      }
23252      function Vk(i, n) {
23253        return i.x - n.x;
23254      }
23255      function Uk(i, n) {
23256        const o = function(p, v) {
23257          let b = v;
23258          const x = p.x, E = p.y;
23259          let k, L = -1 / 0;
23260          do {
23261            if (E <= b.y && E >= b.next.y && b.next.y !== b.y) {
23262              const Y = b.x + (E - b.y) * (b.next.x - b.x) / (b.next.y - b.y);
23263              if (Y <= x && Y > L && (L = Y, k = b.x < b.next.x ? b : b.next, Y === x)) return k;
23264            }
23265            b = b.next;
23266          } while (b !== v);
23267          if (!k) return null;
23268          const B = k, V = k.x, q = k.y;
23269          let W = 1 / 0;
23270          b = k;
23271          do {
23272            if (x >= b.x && b.x >= V && x !== b.x && Lu(E < q ? x : L, E, V, q, E < q ? L : x, E, b.x, b.y)) {
23273              const Y = Math.abs(E - b.y) / (x - b.x);
23274              pf(b, p) && (Y < W || Y === W && (b.x > k.x || b.x === k.x && qk(k, b))) && (k = b, W = Y);
23275            }
23276            b = b.next;
23277          } while (b !== B);
23278          return k;
23279        }(i, n);
23280        if (!o) return n;
23281        const u = S0(o, i);
23282        return kc(u, u.next), kc(o, o.next);
23283      }
23284      function qk(i, n) {
23285        return jn(i.prev, i, n.prev) < 0 && jn(n.next, i, i.next) < 0;
23286      }
23287      function dy(i, n, o, u, p) {
23288        return (i = 1431655765 & ((i = 858993459 & ((i = 252645135 & ((i 
vendor: 4,715 bytes, lines 23288-23378
23288= 16711935 & ((i = (i - o) * p | 0) | i << 8)) | i << 4)) | i << 2)) | i << 1)) | (n = 1431655765 & ((n = 858993459 & ((n = 252645135 & ((n = 16711935 & ((n = (n - u) * p | 0) | n << 8)) | n << 4)) | n << 2)) | n << 1)) << 1;
23289      }
23290      function Hk(i) {
23291        let n = i, o = i;
23292        do
23293          (n.x < o.x || n.x === o.x && n.y < o.y) && (o = n), n = n.next;
23294        while (n !== i);
23295        return o;
23296      }
23297      function Lu(i, n, o, u, p, v, b, x) {
23298        return (p - b) * (n - x) >= (i - b) * (v - x) && (i - b) * (u - x) >= (o - b) * (n - x) && (o - b) * (v - x) >= (p - b) * (u - x);
23299      }
23300      function Gk(i, n) {
23301        return i.next.i !== n.i && i.prev.i !== n.i && !function(o, u) {
23302          let p = o;
23303          do {
23304            if (p.i !== o.i && p.next.i !== o.i && p.i !== u.i && p.next.i !== u.i && w0(p, p.next, o, u)) return !0;
23305            p = p.next;
23306          } while (p !== o);
23307          return !1;
23308        }(i, n) && (pf(i, n) && pf(n, i) && function(o, u) {
23309          let p = o, v = !1;
23310          const b = (o.x + u.x) / 2, x = (o.y + u.y) / 2;
23311          do
23312            p.y > x != p.next.y > x && p.next.y !== p.y && b < (p.next.x - p.x) * (x - p.y) / (p.next.y - p.y) + p.x && (v = !v), p = p.next;
23313          while (p !== o);
23314          return v;
23315        }(i, n) && (jn(i.prev, i, n.prev) || jn(i, n.prev, n)) || np(i, n) && jn(i.prev, i, i.next) > 0 && jn(n.prev, n, n.next) > 0);
23316      }
23317      function jn(i, n, o) {
23318        return (n.y - i.y) * (o.x - n.x) - (n.x - i.x) * (o.y - n.y);
23319      }
23320      function np(i, n) {
23321        return i.x === n.x && i.y === n.y;
23322      }
23323      function w0(i, n, o, u) {
23324        const p = sp(jn(i, n, o)), v = sp(jn(i, n, u)), b = sp(jn(o, u, i)), x = sp(jn(o, u, n));
23325        return p !== v && b !== x || !(p !== 0 || !ip(i, o, n)) || !(v !== 0 || !ip(i, u, n)) || !(b !== 0 || !ip(o, i, u)) || !(x !== 0 || !ip(o, n, u));
23326      }
23327      function ip(i, n, o) {
23328        return n.x <= Math.max(i.x, o.x) && n.x >= Math.min(i.x, o.x) && n.y <= Math.max(i.y, o.y) && n.y >= Math.min(i.y, o.y);
23329      }
23330      function sp(i) {
23331        return i > 0 ? 1 : i < 0 ? -1 : 0;
23332      }
23333      function pf(i, n) {
23334        return jn(i.prev, i, i.next) < 0 ? jn(i, n, i.next) >= 0 && jn(i, i.prev, n) >= 0 : jn(i, n, i.prev) < 0 || jn(i, i.next, n) < 0;
23335      }
23336      function S0(i, n) {
23337        const o = py(i.i, i.x, i.y), u = py(n.i, n.x, n.y), p = i.next, v = n.prev;
23338        return i.next = n, n.prev = i, o.next = p, p.prev = o, u.next = o, o.prev = u, v.next = u, u.prev = v, u;
23339      }
23340      function T0(i, n, o, u) {
23341        const p = py(i, n, o);
23342        return u ? (p.next = u.next, p.prev = u, u.next.prev = p, u.next = p) : (p.prev = p, p.next = p), p;
23343      }
23344      function mf(i) {
23345        i.next.prev = i.prev, i.prev.next = i.next, i.prevZ && (i.prevZ.nextZ = i.nextZ), i.nextZ && (i.nextZ.prevZ = i.prevZ);
23346      }
23347      function py(i, n, o) {
23348        return { i, x: n, y: o, prev: null, next: null, z: 0, prevZ: null, nextZ: null, steiner: !1 };
23349      }
23350      function my(i, n, o) {
23351        const u = o.patternDependencies;
23352        let p = !1;
23353        for (const v of n) {
23354          const b = v.paint.get(`${i}-pattern`);
23355          b.isConstant() || (p = !0);
23356          const x = b.constantOr(null);
23357          x && (p = !0, u[x.to] = !0, u[x.from] = !0);
23358        }
23359        return p;
23360      }
23361      function gy(i, n, o, u, p) {
23362        const v = p.patternDependencies;
23363        for (const b of n) {
23364          const x = b.paint.get(`${i}-pattern`).value;
23365          if (x.kind !== "constant") {
23366            let E = x.evaluate({ zoom: u - 1 }, o, {}, p.availableImages), k = x.evaluate({ zoom: u }, o, {}, p.availableImages), L = x.evaluate({ zoom: u + 1 }, o, {}, p.availableImages);
23367            E = E && E.name ? E.name : E, k = k && k.name ? k.name : k, L = L && L.name ? L.name : L, v[E] = !0, v[k] = !0, v[L] = !0, o.patterns[b.id] = { min: E, mid: k, max: L };
23368          }
23369        }
23370        return o;
23371      }
23372      class yy {
23373        constructor(n) {
23374          this.zoom = n.zoom, this.overscaling = n.overscaling, this.layers = n.layers, this.layerIds = this.layers.map((o) => o.id), this.index = n.index, this.hasPattern = !1, this.patternFeatures = [], this.layoutVertexArray = new _o(), this.indexArray = new Hs(), this.indexArray2 = new oi(), this.programConfigurations = new Ic(n.layers, n.zoom), this.segments = new Tr(), this.segments2 = new Tr(), this.stateDependentLayerIds = this.layers.filter((o) => o.isStateDependent()).map((o) => o.id);
23375        }
23376        populate(n, o, u) {
23377          this.hasPattern = my("fill", this.layers, o);
23378          const p = this.layers[0].layout.get("fill-sort-key"), v = !p.isConstant(), b = [];
vendor: 20,940 bytes, lines 23379-23738
23379          for (const { feature: x, id: E, index: k, sourceLayerIndex: L } of n) {
23380            const B = this.layers[0]._featureFilter.needGeometry, V = Mc(x, B);
23381            if (!this.layers[0]._featureFilter.filter(new gn(this.zoom), V, u)) continue;
23382            const q = v ? p.evaluate(V, {}, u, o.availableImages) : void 0, W = { id: E, properties: x.properties, type: x.type, sourceLayerIndex: L, index: k, geometry: B ? V.geometry : Pc(x), patterns: {}, sortKey: q };
23383            b.push(W);
23384          }
23385          v && b.sort((x, E) => x.sortKey - E.sortKey);
23386          for (const x of b) {
23387            const { geometry: E, index: k, sourceLayerIndex: L } = x;
23388            if (this.hasPattern) {
23389              const B = gy("fill", this.layers, x, this.zoom, o);
23390              this.patternFeatures.push(B);
23391            } else this.addFeature(x, E, k, u, {});
23392            o.featureIndex.insert(n[k].feature, E, k, L, this.index);
23393          }
23394        }
23395        update(n, o, u) {
23396          this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(n, o, this.stateDependentLayers, u);
23397        }
23398        addFeatures(n, o, u) {
23399          for (const p of this.patternFeatures) this.addFeature(p, p.geometry, p.index, o, u);
23400        }
23401        isEmpty() {
23402          return this.layoutVertexArray.length === 0;
23403        }
23404        uploadPending() {
23405          return !this.uploaded || this.programConfigurations.needsUpload;
23406        }
23407        upload(n) {
23408          this.uploaded || (this.layoutVertexBuffer = n.createVertexBuffer(this.layoutVertexArray, zk), this.indexBuffer = n.createIndexBuffer(this.indexArray), this.indexBuffer2 = n.createIndexBuffer(this.indexArray2)), this.programConfigurations.upload(n), this.uploaded = !0;
23409        }
23410        destroy() {
23411          this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.indexBuffer2.destroy(), this.programConfigurations.destroy(), this.segments.destroy(), this.segments2.destroy());
23412        }
23413        addFeature(n, o, u, p, v) {
23414          for (const b of pl(o, 500)) {
23415            let x = 0;
23416            for (const q of b) x += q.length;
23417            const E = this.segments.prepareSegment(x, this.layoutVertexArray, this.indexArray), k = E.vertexLength, L = [], B = [];
23418            for (const q of b) {
23419              if (q.length === 0) continue;
23420              q !== b[0] && B.push(L.length / 2);
23421              const W = this.segments2.prepareSegment(q.length, this.layoutVertexArray, this.indexArray2), Y = W.vertexLength;
23422              this.layoutVertexArray.emplaceBack(q[0].x, q[0].y), this.indexArray2.emplaceBack(Y + q.length - 1, Y), L.push(q[0].x), L.push(q[0].y);
23423              for (let oe = 1; oe < q.length; oe++) this.layoutVertexArray.emplaceBack(q[oe].x, q[oe].y), this.indexArray2.emplaceBack(Y + oe - 1, Y + oe), L.push(q[oe].x), L.push(q[oe].y);
23424              W.vertexLength += q.length, W.primitiveLength += q.length;
23425            }
23426            const V = b0(L, B);
23427            for (let q = 0; q < V.length; q += 3) this.indexArray.emplaceBack(k + V[q], k + V[q + 1], k + V[q + 2]);
23428            E.vertexLength += x, E.primitiveLength += V.length / 3;
23429          }
23430          this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, n, u, v, p);
23431        }
23432      }
23433      let E0, A0;
23434      Mt("FillBucket", yy, { omit: ["layers", "patternFeatures"] });
23435      var Zk = { get paint() {
23436        return A0 = A0 || new _({ "fill-antialias": new Lt(re.paint_fill["fill-antialias"]), "fill-opacity": new Xt(re.paint_fill["fill-opacity"]), "fill-color": new Xt(re.paint_fill["fill-color"]), "fill-outline-color": new Xt(re.paint_fill["fill-outline-color"]), "fill-translate": new Lt(re.paint_fill["fill-translate"]), "fill-translate-anchor": new Lt(re.paint_fill["fill-translate-anchor"]), "fill-pattern": new Eu(re.paint_fill["fill-pattern"]) });
23437      }, get layout() {
23438        return E0 = E0 || new _({ "fill-sort-key": new Xt(re.layout_fill["fill-sort-key"]) });
23439      } };
23440      class Wk extends a {
23441        constructor(n) {
23442          super(n, Zk);
23443        }
23444        recalculate(n, o) {
23445          super.recalculate(n, o);
23446          const u = this.paint._values["fill-outline-color"];
23447          u.value.kind === "constant" && u.value.value === void 0 && (this.paint._values["fill-outline-color"] = this.paint._values["fill-color"]);
23448        }
23449        createBucket(n) {
23450          return new yy(n);
23451        }
23452        queryRadius() {
23453          return ep(this.paint.get("fill-translate"));
23454        }
23455        queryIntersectsFeature(n, o, u, p, v, b, x) {
23456          return l0(tp(n, this.paint.get("fill-translate"), this.paint.get("fill-translate-anchor"), b.angle, x), p);
23457        }
23458        isTileClipped() {
23459          return !0;
23460        }
23461      }
23462      const Kk = S([{ name: "a_pos", components: 2, type: "Int16" }, { name: "a_normal_ed", components: 4, type: "Int16" }], 4), Xk = S([{ name: "a_centroid", components: 2, type: "Int16" }], 4), { members: Jk } = Kk;
23463      var Ll = {}, Yk = O, C0 = Fu;
23464      function Fu(i, n, o, u, p) {
23465        this.properties = {}, this.extent = o, this.type = 0, this._pbf = i, this._geometry = -1, this._keys = u, this._values = p, i.readFields(Qk, this, n);
23466      }
23467      function Qk(i, n, o) {
23468        i == 1 ? n.id = o.readVarint() : i == 2 ? function(u, p) {
23469          for (var v = u.readVarint() + u.pos; u.pos < v; ) {
23470            var b = p._keys[u.readVarint()], x = p._values[u.readVarint()];
23471            p.properties[b] = x;
23472          }
23473        }(o, n) : i == 3 ? n.type = o.readVarint() : i == 4 && (n._geometry = o.pos);
23474      }
23475      function eO(i) {
23476        for (var n, o, u = 0, p = 0, v = i.length, b = v - 1; p < v; b = p++) u += ((o = i[b]).x - (n = i[p]).x) * (n.y + o.y);
23477        return u;
23478      }
23479      Fu.types = ["Unknown", "Point", "LineString", "Polygon"], Fu.prototype.loadGeometry = function() {
23480        var i = this._pbf;
23481        i.pos = this._geometry;
23482        for (var n, o = i.readVarint() + i.pos, u = 1, p = 0, v = 0, b = 0, x = []; i.pos < o; ) {
23483          if (p <= 0) {
23484            var E = i.readVarint();
23485            u = 7 & E, p = E >> 3;
23486          }
23487          if (p--, u === 1 || u === 2) v += i.readSVarint(), b += i.readSVarint(), u === 1 && (n && x.push(n), n = []), n.push(new Yk(v, b));
23488          else {
23489            if (u !== 7) throw new Error("unknown command " + u);
23490            n && n.push(n[0].clone());
23491          }
23492        }
23493        return n && x.push(n), x;
23494      }, Fu.prototype.bbox = function() {
23495        var i = this._pbf;
23496        i.pos = this._geometry;
23497        for (var n = i.readVarint() + i.pos, o = 1, u = 0, p = 0, v = 0, b = 1 / 0, x = -1 / 0, E = 1 / 0, k = -1 / 0; i.pos < n; ) {
23498          if (u <= 0) {
23499            var L = i.readVarint();
23500            o = 7 & L, u = L >> 3;
23501          }
23502          if (u--, o === 1 || o === 2) (p += i.readSVarint()) < b && (b = p), p > x && (x = p), (v += i.readSVarint()) < E && (E = v), v > k && (k = v);
23503          else if (o !== 7) throw new Error("unknown command " + o);
23504        }
23505        return [b, E, x, k];
23506      }, Fu.prototype.toGeoJSON = function(i, n, o) {
23507        var u, p, v = this.extent * Math.pow(2, o), b = this.extent * i, x = this.extent * n, E = this.loadGeometry(), k = Fu.types[this.type];
23508        function L(q) {
23509          for (var W = 0; W < q.length; W++) {
23510            var Y = q[W];
23511            q[W] = [360 * (Y.x + b) / v - 180, 360 / Math.PI * Math.atan(Math.exp((180 - 360 * (Y.y + x) / v) * Math.PI / 180)) - 90];
23512          }
23513        }
23514        switch (this.type) {
23515          case 1:
23516            var B = [];
23517            for (u = 0; u < E.length; u++) B[u] = E[u][0];
23518            L(E = B);
23519            break;
23520          case 2:
23521            for (u = 0; u < E.length; u++) L(E[u]);
23522            break;
23523          case 3:
23524            for (E = function(q) {
23525              var W = q.length;
23526              if (W <= 1) return [q];
23527              for (var Y, oe, he = [], De = 0; De < W; De++) {
23528                var xe = eO(q[De]);
23529                xe !== 0 && (oe === void 0 && (oe = xe < 0), oe === xe < 0 ? (Y && he.push(Y), Y = [q[De]]) : Y.push(q[De]));
23530              }
23531              return Y && he.push(Y), he;
23532            }(E), u = 0; u < E.length; u++) for (p = 0; p < E[u].length; p++) L(E[u][p]);
23533        }
23534        E.length === 1 ? E = E[0] : k = "Multi" + k;
23535        var V = { type: "Feature", geometry: { type: k, coordinates: E }, properties: this.properties };
23536        return "id" in this && (V.id = this.id), V;
23537      };
23538      var tO = C0, I0 = P0;
23539      function P0(i, n) {
23540        this.version = 1, this.name = null, this.extent = 4096, this.length = 0, this._pbf = i, this._keys = [], this._values = [], this._features = [], i.readFields(rO, this, n), this.length = this._features.length;
23541      }
23542      function rO(i, n, o) {
23543        i === 15 ? n.version = o.readVarint() : i === 1 ? n.name = o.readString() : i === 5 ? n.extent = o.readVarint() : i === 2 ? n._features.push(o.pos) : i === 3 ? n._keys.push(o.readString()) : i === 4 && n._values.push(function(u) {
23544          for (var p = null, v = u.readVarint() + u.pos; u.pos < v; ) {
23545            var b = u.readVarint() >> 3;
23546            p = b === 1 ? u.readString() : b === 2 ? u.readFloat() : b === 3 ? u.readDouble() : b === 4 ? u.readVarint64() : b === 5 ? u.readVarint() : b === 6 ? u.readSVarint() : b === 7 ? u.readBoolean() : null;
23547          }
23548          return p;
23549        }(o));
23550      }
23551      P0.prototype.feature = function(i) {
23552        if (i < 0 || i >= this._features.length) throw new Error("feature index out of bounds");
23553        this._pbf.pos = this._features[i];
23554        var n = this._pbf.readVarint() + this._pbf.pos;
23555        return new tO(this._pbf, n, this.extent, this._keys, this._values);
23556      };
23557      var nO = I0;
23558      function iO(i, n, o) {
23559        if (i === 3) {
23560          var u = new nO(o, o.readVarint() + o.pos);
23561          u.length && (n[u.name] = u);
23562        }
23563      }
23564      Ll.VectorTile = function(i, n) {
23565        this.layers = i.readFields(iO, {}, n);
23566      }, Ll.VectorTileFeature = C0, Ll.VectorTileLayer = I0;
23567      const sO = Ll.VectorTileFeature.types, _y = Math.pow(2, 13);
23568      function gf(i, n, o, u, p, v, b, x) {
23569        i.emplaceBack(n, o, 2 * Math.floor(u * _y) + b, p * _y * 2, v * _y * 2, Math.round(x));
23570      }
23571      class vy {
23572        constructor(n) {
23573          this.zoom = n.zoom, this.overscaling = n.overscaling, this.layers = n.layers, this.layerIds = this.layers.map((o) => o.id), this.index = n.index, this.hasPattern = !1, this.layoutVertexArray = new Pl(), this.centroidVertexArray = new vi(), this.indexArray = new Hs(), this.programConfigurations = new Ic(n.layers, n.zoom), this.segments = new Tr(), this.stateDependentLayerIds = this.layers.filter((o) => o.isStateDependent()).map((o) => o.id);
23574        }
23575        populate(n, o, u) {
23576          this.features = [], this.hasPattern = my("fill-extrusion", this.layers, o);
23577          for (const { feature: p, id: v, index: b, sourceLayerIndex: x } of n) {
23578            const E = this.layers[0]._featureFilter.needGeometry, k = Mc(p, E);
23579            if (!this.layers[0]._featureFilter.filter(new gn(this.zoom), k, u)) continue;
23580            const L = { id: v, sourceLayerIndex: x, index: b, geometry: E ? k.geometry : Pc(p), properties: p.properties, type: p.type, patterns: {} };
23581            this.hasPattern ? this.features.push(gy("fill-extrusion", this.layers, L, this.zoom, o)) : this.addFeature(L, L.geometry, b, u, {}), o.featureIndex.insert(p, L.geometry, b, x, this.index, !0);
23582          }
23583        }
23584        addFeatures(n, o, u) {
23585          for (const p of this.features) {
23586            const { geometry: v } = p;
23587            this.addFeature(p, v, p.index, o, u);
23588          }
23589        }
23590        update(n, o, u) {
23591          this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(n, o, this.stateDependentLayers, u);
23592        }
23593        isEmpty() {
23594          return this.layoutVertexArray.length === 0 && this.centroidVertexArray.length === 0;
23595        }
23596        uploadPending() {
23597          return !this.uploaded || this.programConfigurations.needsUpload;
23598        }
23599        upload(n) {
23600          this.uploaded || (this.layoutVertexBuffer = n.createVertexBuffer(this.layoutVertexArray, Jk), this.centroidVertexBuffer = n.createVertexBuffer(this.centroidVertexArray, Xk.members, !0), this.indexBuffer = n.createIndexBuffer(this.indexArray)), this.programConfigurations.upload(n), this.uploaded = !0;
23601        }
23602        destroy() {
23603          this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy(), this.centroidVertexBuffer.destroy());
23604        }
23605        addFeature(n, o, u, p, v) {
23606          for (const b of pl(o, 500)) {
23607            const x = { x: 0, y: 0, vertexCount: 0 };
23608            let E = 0;
23609            for (const W of b) E += W.length;
23610            let k = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray);
23611            for (const W of b) {
23612              if (W.length === 0 || aO(W)) continue;
23613              let Y = 0;
23614              for (let oe = 0; oe < W.length; oe++) {
23615                const he = W[oe];
23616                if (oe >= 1) {
23617                  const De = W[oe - 1];
23618                  if (!oO(he, De)) {
23619                    k.vertexLength + 4 > Tr.MAX_VERTEX_ARRAY_LENGTH && (k = this.segments.prepareSegment(4, this.layoutVertexArray, this.indexArray));
23620                    const xe = he.sub(De)._perp()._unit(), ke = De.dist(he);
23621                    Y + ke > 32768 && (Y = 0), gf(this.layoutVertexArray, he.x, he.y, xe.x, xe.y, 0, 0, Y), gf(this.layoutVertexArray, he.x, he.y, xe.x, xe.y, 0, 1, Y), x.x += 2 * he.x, x.y += 2 * he.y, x.vertexCount += 2, Y += ke, gf(this.layoutVertexArray, De.x, De.y, xe.x, xe.y, 0, 0, Y), gf(this.layoutVertexArray, De.x, De.y, xe.x, xe.y, 0, 1, Y), x.x += 2 * De.x, x.y += 2 * De.y, x.vertexCount += 2;
23622                    const Ve = k.vertexLength;
23623                    this.indexArray.emplaceBack(Ve, Ve + 2, Ve + 1), this.indexArray.emplaceBack(Ve + 1, Ve + 2, Ve + 3), k.vertexLength += 4, k.primitiveLength += 2;
23624                  }
23625                }
23626              }
23627            }
23628            if (k.vertexLength + E > Tr.MAX_VERTEX_ARRAY_LENGTH && (k = this.segments.prepareSegment(E, this.layoutVertexArray, this.indexArray)), sO[n.type] !== "Polygon") continue;
23629            const L = [], B = [], V = k.vertexLength;
23630            for (const W of b) if (W.length !== 0) {
23631              W !== b[0] && B.push(L.length / 2);
23632              for (let Y = 0; Y < W.length; Y++) {
23633                const oe = W[Y];
23634                gf(this.layoutVertexArray, oe.x, oe.y, 0, 0, 1, 1, 0), x.x += oe.x, x.y += oe.y, x.vertexCount += 1, L.push(oe.x), L.push(oe.y);
23635              }
23636            }
23637            const q = b0(L, B);
23638            for (let W = 0; W < q.length; W += 3) this.indexArray.emplaceBack(V + q[W], V + q[W + 2], V + q[W + 1]);
23639            k.primitiveLength += q.length / 3, k.vertexLength += E;
23640            for (let W = 0; W < x.vertexCount; W++) {
23641              const Y = Math.floor(x.x / x.vertexCount), oe = Math.floor(x.y / x.vertexCount);
23642              this.centroidVertexArray.emplaceBack(Y, oe);
23643            }
23644          }
23645          this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, n, u, v, p);
23646        }
23647      }
23648      function oO(i, n) {
23649        return i.x === n.x && (i.x < 0 || i.x > Hn) || i.y === n.y && (i.y < 0 || i.y > Hn);
23650      }
23651      function aO(i) {
23652        return i.every((n) => n.x < 0) || i.every((n) => n.x > Hn) || i.every((n) => n.y < 0) || i.every((n) => n.y > Hn);
23653      }
23654      let M0;
23655      Mt("FillExtrusionBucket", vy, { omit: ["layers", "features"] });
23656      var lO = { get paint() {
23657        return M0 = M0 || new _({ "fill-extrusion-opacity": new Lt(re["paint_fill-extrusion"]["fill-extrusion-opacity"]), "fill-extrusion-color": new Xt(re["paint_fill-extrusion"]["fill-extrusion-color"]), "fill-extrusion-translate": new Lt(re["paint_fill-extrusion"]["fill-extrusion-translate"]), "fill-extrusion-translate-anchor": new Lt(re["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]), "fill-extrusion-pattern": new Eu(re["paint_fill-extrusion"]["fill-extrusion-pattern"]), "fill-extrusion-height": new Xt(re["paint_fill-extrusion"]["fill-extrusion-height"]), "fill-extrusion-base": new Xt(re["paint_fill-extrusion"]["fill-extrusion-base"]), "fill-extrusion-vertical-gradient": new Lt(re["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"]) });
23658      } };
23659      class cO extends a {
23660        constructor(n) {
23661          super(n, lO);
23662        }
23663        createBucket(n) {
23664          return new vy(n);
23665        }
23666        queryRadius() {
23667          return ep(this.paint.get("fill-extrusion-translate"));
23668        }
23669        is3D() {
23670          return !0;
23671        }
23672        queryIntersectsFeature(n, o, u, p, v, b, x, E) {
23673          const k = tp(n, this.paint.get("fill-extrusion-translate"), this.paint.get("fill-extrusion-translate-anchor"), b.angle, x), L = this.paint.get("fill-extrusion-height").evaluate(o, u), B = this.paint.get("fill-extrusion-base").evaluate(o, u), V = function(W, Y, oe, he) {
23674            const De = [];
23675            for (const xe of W) {
23676              const ke = [xe.x, xe.y, 0, 1];
23677              rp(ke, ke, Y), De.push(new R(ke[0] / ke[3], ke[1] / ke[3]));
23678            }
23679            return De;
23680          }(k, E), q = function(W, Y, oe, he) {
23681            const De = [], xe = [], ke = he[8] * Y, Ve = he[9] * Y, at = he[10] * Y, At = he[11] * Y, Kt = he[8] * oe, St = he[9] * oe, _t = he[10] * oe, $t = he[11] * oe;
23682            for (const Ot of W) {
23683              const It = [], Ke = [];
23684              for (const Vt of Ot) {
23685                const Bt = Vt.x, nr = Vt.y, on = he[0] * Bt + he[4] * nr + he[12], Yr = he[1] * Bt + he[5] * nr + he[13], ei = he[2] * Bt + he[6] * nr + he[14], vo = he[3] * Bt + he[7] * nr + he[15], wi = ei + at, ti = vo + At, Zi = on + Kt, Wi = Yr + St, Ki = ei + _t, Dn = vo + $t, ri = new R((on + ke) / ti, (Yr + Ve) / ti);
23686                ri.z = wi / ti, It.push(ri);
23687                const Oi = new R(Zi / Dn, Wi / Dn);
23688                Oi.z = Ki / Dn, Ke.push(Oi);
23689              }
23690              De.push(It), xe.push(Ke);
23691            }
23692            return [De, xe];
23693          }(p, B, L, E);
23694          return function(W, Y, oe) {
23695            let he = 1 / 0;
23696            l0(oe, Y) && (he = k0(oe, Y[0]));
23697            for (let De = 0; De < Y.length; De++) {
23698              const xe = Y[De], ke = W[De];
23699              for (let Ve = 0; Ve < xe.length - 1; Ve++) {
23700                const at = xe[Ve], At = [at, xe[Ve + 1], ke[Ve + 1], ke[Ve], at];
23701                a0(oe, At) && (he = Math.min(he, k0(oe, At)));
23702              }
23703            }
23704            return he !== 1 / 0 && he;
23705          }(q[0], q[1], V);
23706        }
23707      }
23708      function yf(i, n) {
23709        return i.x * n.x + i.y * n.y;
23710      }
23711      function k0(i, n) {
23712        if (i.length === 1) {
23713          let o = 0;
23714          const u = n[o++];
23715          let p;
23716          for (; !p || u.equals(p); ) if (p = n[o++], !p) return 1 / 0;
23717          for (; o < n.length; o++) {
23718            const v = n[o], b = i[0], x = p.sub(u), E = v.sub(u), k = b.sub(u), L = yf(x, x), B = yf(x, E), V = yf(E, E), q = yf(k, x), W = yf(k, E), Y = L * V - B * B, oe = (V * q - B * W) / Y, he = (L * W - B * q) / Y, De = u.z * (1 - oe - he) + p.z * oe + v.z * he;
23719            if (isFinite(De)) return De;
23720          }
23721          return 1 / 0;
23722        }
23723        {
23724          let o = 1 / 0;
23725          for (const u of n) o = Math.min(o, u.z);
23726          return o;
23727        }
23728      }
23729      const uO = S([{ name: "a_pos_normal", components: 2, type: "Int16" }, { name: "a_data", components: 4, type: "Uint8" }], 4), { members: hO } = uO, fO = S([{ name: "a_uv_x", components: 1, type: "Float32" }, { name: "a_split_index", components: 1, type: "Float32" }]), { members: dO } = fO, pO = Ll.VectorTileFeature.types, mO = Math.cos(Math.PI / 180 * 37.5), O0 = Math.pow(2, 14) / 0.5;
23730      class by {
23731        constructor(n) {
23732          this.zoom = n.zoom, this.overscaling = n.overscaling, this.layers = n.layers, this.layerIds = this.layers.map((o) => o.id), this.index = n.index, this.hasPattern = !1, this.patternFeatures = [], this.lineClipsArray = [], this.gradients = {}, this.layers.forEach((o) => {
23733            this.gradients[o.id] = {};
23734          }), this.layoutVertexArray = new Cu(), this.layoutVertexArray2 = new Ml(), this.indexArray = new Hs(), this.programConfigurations = new Ic(n.layers, n.zoom), this.segments = new Tr(), this.maxLineLength = 0, this.stateDependentLayerIds = this.layers.filter((o) => o.isStateDependent()).map((o) => o.id);
23735        }
23736        populate(n, o, u) {
23737          this.hasPattern = my("line", this.layers, o);
23738          const p = this.layers[0].layout.get("line-sort-key"), v = !p.isConstant(), b = [];
vendor: 14,744 bytes, lines 23739-23952
23739          for (const { feature: x, id: E, index: k, sourceLayerIndex: L } of n) {
23740            const B = this.layers[0]._featureFilter.needGeometry, V = Mc(x, B);
23741            if (!this.layers[0]._featureFilter.filter(new gn(this.zoom), V, u)) continue;
23742            const q = v ? p.evaluate(V, {}, u) : void 0, W = { id: E, properties: x.properties, type: x.type, sourceLayerIndex: L, index: k, geometry: B ? V.geometry : Pc(x), patterns: {}, sortKey: q };
23743            b.push(W);
23744          }
23745          v && b.sort((x, E) => x.sortKey - E.sortKey);
23746          for (const x of b) {
23747            const { geometry: E, index: k, sourceLayerIndex: L } = x;
23748            if (this.hasPattern) {
23749              const B = gy("line", this.layers, x, this.zoom, o);
23750              this.patternFeatures.push(B);
23751            } else this.addFeature(x, E, k, u, {});
23752            o.featureIndex.insert(n[k].feature, E, k, L, this.index);
23753          }
23754        }
23755        update(n, o, u) {
23756          this.stateDependentLayers.length && this.programConfigurations.updatePaintArrays(n, o, this.stateDependentLayers, u);
23757        }
23758        addFeatures(n, o, u) {
23759          for (const p of this.patternFeatures) this.addFeature(p, p.geometry, p.index, o, u);
23760        }
23761        isEmpty() {
23762          return this.layoutVertexArray.length === 0;
23763        }
23764        uploadPending() {
23765          return !this.uploaded || this.programConfigurations.needsUpload;
23766        }
23767        upload(n) {
23768          this.uploaded || (this.layoutVertexArray2.length !== 0 && (this.layoutVertexBuffer2 = n.createVertexBuffer(this.layoutVertexArray2, dO)), this.layoutVertexBuffer = n.createVertexBuffer(this.layoutVertexArray, hO), this.indexBuffer = n.createIndexBuffer(this.indexArray)), this.programConfigurations.upload(n), this.uploaded = !0;
23769        }
23770        destroy() {
23771          this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy());
23772        }
23773        lineFeatureClips(n) {
23774          if (n.properties && Object.prototype.hasOwnProperty.call(n.properties, "mapbox_clip_start") && Object.prototype.hasOwnProperty.call(n.properties, "mapbox_clip_end")) return { start: +n.properties.mapbox_clip_start, end: +n.properties.mapbox_clip_end };
23775        }
23776        addFeature(n, o, u, p, v) {
23777          const b = this.layers[0].layout, x = b.get("line-join").evaluate(n, {}), E = b.get("line-cap"), k = b.get("line-miter-limit"), L = b.get("line-round-limit");
23778          this.lineClips = this.lineFeatureClips(n);
23779          for (const B of o) this.addLine(B, n, x, E, k, L);
23780          this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length, n, u, v, p);
23781        }
23782        addLine(n, o, u, p, v, b) {
23783          if (this.distance = 0, this.scaledDistance = 0, this.totalDistance = 0, this.lineClips) {
23784            this.lineClipsArray.push(this.lineClips);
23785            for (let he = 0; he < n.length - 1; he++) this.totalDistance += n[he].dist(n[he + 1]);
23786            this.updateScaledDistance(), this.maxLineLength = Math.max(this.maxLineLength, this.totalDistance);
23787          }
23788          const x = pO[o.type] === "Polygon";
23789          let E = n.length;
23790          for (; E >= 2 && n[E - 1].equals(n[E - 2]); ) E--;
23791          let k = 0;
23792          for (; k < E - 1 && n[k].equals(n[k + 1]); ) k++;
23793          if (E < (x ? 3 : 2)) return;
23794          u === "bevel" && (v = 1.05);
23795          const L = this.overscaling <= 16 ? 15 * Hn / (512 * this.overscaling) : 0, B = this.segments.prepareSegment(10 * E, this.layoutVertexArray, this.indexArray);
23796          let V, q, W, Y, oe;
23797          this.e1 = this.e2 = -1, x && (V = n[E - 2], oe = n[k].sub(V)._unit()._perp());
23798          for (let he = k; he < E; he++) {
23799            if (W = he === E - 1 ? x ? n[k + 1] : void 0 : n[he + 1], W && n[he].equals(W)) continue;
23800            oe && (Y = oe), V && (q = V), V = n[he], oe = W ? W.sub(V)._unit()._perp() : Y, Y = Y || oe;
23801            let De = Y.add(oe);
23802            De.x === 0 && De.y === 0 || De._unit();
23803            const xe = Y.x * oe.x + Y.y * oe.y, ke = De.x * oe.x + De.y * oe.y, Ve = ke !== 0 ? 1 / ke : 1 / 0, at = 2 * Math.sqrt(2 - 2 * ke), At = ke < mO && q && W, Kt = Y.x * oe.y - Y.y * oe.x > 0;
23804            if (At && he > k) {
23805              const $t = V.dist(q);
23806              if ($t > 2 * L) {
23807                const Ot = V.sub(V.sub(q)._mult(L / $t)._round());
23808                this.updateDistance(q, Ot), this.addCurrentVertex(Ot, Y, 0, 0, B), q = Ot;
23809              }
23810            }
23811            const St = q && W;
23812            let _t = St ? u : x ? "butt" : p;
23813            if (St && _t === "round" && (Ve < b ? _t = "miter" : Ve <= 2 && (_t = "fakeround")), _t === "miter" && Ve > v && (_t = "bevel"), _t === "bevel" && (Ve > 2 && (_t = "flipbevel"), Ve < v && (_t = "miter")), q && this.updateDistance(q, V), _t === "miter") De._mult(Ve), this.addCurrentVertex(V, De, 0, 0, B);
23814            else if (_t === "flipbevel") {
23815              if (Ve > 100) De = oe.mult(-1);
23816              else {
23817                const $t = Ve * Y.add(oe).mag() / Y.sub(oe).mag();
23818                De._perp()._mult($t * (Kt ? -1 : 1));
23819              }
23820              this.addCurrentVertex(V, De, 0, 0, B), this.addCurrentVertex(V, De.mult(-1), 0, 0, B);
23821            } else if (_t === "bevel" || _t === "fakeround") {
23822              const $t = -Math.sqrt(Ve * Ve - 1), Ot = Kt ? $t : 0, It = Kt ? 0 : $t;
23823              if (q && this.addCurrentVertex(V, Y, Ot, It, B), _t === "fakeround") {
23824                const Ke = Math.round(180 * at / Math.PI / 20);
23825                for (let Vt = 1; Vt < Ke; Vt++) {
23826                  let Bt = Vt / Ke;
23827                  if (Bt !== 0.5) {
23828                    const on = Bt - 0.5;
23829                    Bt += Bt * on * (Bt - 1) * ((1.0904 + xe * (xe * (3.55645 - 1.43519 * xe) - 3.2452)) * on * on + (0.848013 + xe * (0.215638 * xe - 1.06021)));
23830                  }
23831                  const nr = oe.sub(Y)._mult(Bt)._add(Y)._unit()._mult(Kt ? -1 : 1);
23832                  this.addHalfVertex(V, nr.x, nr.y, !1, Kt, 0, B);
23833                }
23834              }
23835              W && this.addCurrentVertex(V, oe, -Ot, -It, B);
23836            } else if (_t === "butt") this.addCurrentVertex(V, De, 0, 0, B);
23837            else if (_t === "square") {
23838              const $t = q ? 1 : -1;
23839              this.addCurrentVertex(V, De, $t, $t, B);
23840            } else _t === "round" && (q && (this.addCurrentVertex(V, Y, 0, 0, B), this.addCurrentVertex(V, Y, 1, 1, B, !0)), W && (this.addCurrentVertex(V, oe, -1, -1, B, !0), this.addCurrentVertex(V, oe, 0, 0, B)));
23841            if (At && he < E - 1) {
23842              const $t = V.dist(W);
23843              if ($t > 2 * L) {
23844                const Ot = V.add(W.sub(V)._mult(L / $t)._round());
23845                this.updateDistance(V, Ot), this.addCurrentVertex(Ot, oe, 0, 0, B), V = Ot;
23846              }
23847            }
23848          }
23849        }
23850        addCurrentVertex(n, o, u, p, v, b = !1) {
23851          const x = o.y * p - o.x, E = -o.y - o.x * p;
23852          this.addHalfVertex(n, o.x + o.y * u, o.y - o.x * u, b, !1, u, v), this.addHalfVertex(n, x, E, b, !0, -p, v), this.distance > O0 / 2 && this.totalDistance === 0 && (this.distance = 0, this.updateScaledDistance(), this.addCurrentVertex(n, o, u, p, v, b));
23853        }
23854        addHalfVertex({ x: n, y: o }, u, p, v, b, x, E) {
23855          const k = 0.5 * (this.lineClips ? this.scaledDistance * (O0 - 1) : this.scaledDistance);
23856          this.layoutVertexArray.emplaceBack((n << 1) + (v ? 1 : 0), (o << 1) + (b ? 1 : 0), Math.round(63 * u) + 128, Math.round(63 * p) + 128, 1 + (x === 0 ? 0 : x < 0 ? -1 : 1) | (63 & k) << 2, k >> 6), this.lineClips && this.layoutVertexArray2.emplaceBack((this.scaledDistance - this.lineClips.start) / (this.lineClips.end - this.lineClips.start), this.lineClipsArray.length);
23857          const L = E.vertexLength++;
23858          this.e1 >= 0 && this.e2 >= 0 && (this.indexArray.emplaceBack(this.e1, this.e2, L), E.primitiveLength++), b ? this.e2 = L : this.e1 = L;
23859        }
23860        updateScaledDistance() {
23861          this.scaledDistance = this.lineClips ? this.lineClips.start + (this.lineClips.end - this.lineClips.start) * this.distance / this.totalDistance : this.distance;
23862        }
23863        updateDistance(n, o) {
23864          this.distance += n.dist(o), this.updateScaledDistance();
23865        }
23866      }
23867      let D0, R0;
23868      Mt("LineBucket", by, { omit: ["layers", "patternFeatures"] });
23869      var L0 = { get paint() {
23870        return R0 = R0 || new _({ "line-opacity": new Xt(re.paint_line["line-opacity"]), "line-color": new Xt(re.paint_line["line-color"]), "line-translate": new Lt(re.paint_line["line-translate"]), "line-translate-anchor": new Lt(re.paint_line["line-translate-anchor"]), "line-width": new Xt(re.paint_line["line-width"]), "line-gap-width": new Xt(re.paint_line["line-gap-width"]), "line-offset": new Xt(re.paint_line["line-offset"]), "line-blur": new Xt(re.paint_line["line-blur"]), "line-dasharray": new Au(re.paint_line["line-dasharray"]), "line-pattern": new Eu(re.paint_line["line-pattern"]), "line-gradient": new af(re.paint_line["line-gradient"]) });
23871      }, get layout() {
23872        return D0 = D0 || new _({ "line-cap": new Lt(re.layout_line["line-cap"]), "line-join": new Xt(re.layout_line["line-join"]), "line-miter-limit": new Lt(re.layout_line["line-miter-limit"]), "line-round-limit": new Lt(re.layout_line["line-round-limit"]), "line-sort-key": new Xt(re.layout_line["line-sort-key"]) });
23873      } };
23874      class gO extends Xt {
23875        possiblyEvaluate(n, o) {
23876          return o = new gn(Math.floor(o.zoom), { now: o.now, fadeDuration: o.fadeDuration, zoomHistory: o.zoomHistory, transition: o.transition }), super.possiblyEvaluate(n, o);
23877        }
23878        evaluate(n, o, u, p) {
23879          return o = je({}, o, { zoom: Math.floor(o.zoom) }), super.evaluate(n, o, u, p);
23880        }
23881      }
23882      let op;
23883      class yO extends a {
23884        constructor(n) {
23885          super(n, L0), this.gradientVersion = 0, op || (op = new gO(L0.paint.properties["line-width"].specification), op.useIntegerZoom = !0);
23886        }
23887        _handleSpecialPaintPropertyUpdate(n) {
23888          if (n === "line-gradient") {
23889            const o = this.gradientExpression();
23890            this.stepInterpolant = !!function(u) {
23891              return u._styleExpression !== void 0;
23892            }(o) && o._styleExpression.expression instanceof tt, this.gradientVersion = (this.gradientVersion + 1) % Number.MAX_SAFE_INTEGER;
23893          }
23894        }
23895        gradientExpression() {
23896          return this._transitionablePaint._values["line-gradient"].value.expression;
23897        }
23898        recalculate(n, o) {
23899          super.recalculate(n, o), this.paint._values["line-floorwidth"] = op.possiblyEvaluate(this._transitioningPaint._values["line-width"].value, n);
23900        }
23901        createBucket(n) {
23902          return new by(n);
23903        }
23904        queryRadius(n) {
23905          const o = n, u = F0(uf("line-width", this, o), uf("line-gap-width", this, o)), p = uf("line-offset", this, o);
23906          return u / 2 + Math.abs(p) + ep(this.paint.get("line-translate"));
23907        }
23908        queryIntersectsFeature(n, o, u, p, v, b, x) {
23909          const E = tp(n, this.paint.get("line-translate"), this.paint.get("line-translate-anchor"), b.angle, x), k = x / 2 * F0(this.paint.get("line-width").evaluate(o, u), this.paint.get("line-gap-width").evaluate(o, u)), L = this.paint.get("line-offset").evaluate(o, u);
23910          return L && (p = function(B, V) {
23911            const q = [];
23912            for (let W = 0; W < B.length; W++) {
23913              const Y = B[W], oe = [];
23914              for (let he = 0; he < Y.length; he++) {
23915                const De = Y[he - 1], xe = Y[he], ke = Y[he + 1], Ve = he === 0 ? new R(0, 0) : xe.sub(De)._unit()._perp(), at = he === Y.length - 1 ? new R(0, 0) : ke.sub(xe)._unit()._perp(), At = Ve._add(at)._unit(), Kt = At.x * at.x + At.y * at.y;
23916                Kt !== 0 && At._mult(1 / Kt), oe.push(At._mult(V)._add(xe));
23917              }
23918              q.push(oe);
23919            }
23920            return q;
23921          }(p, L * x)), function(B, V, q) {
23922            for (let W = 0; W < V.length; W++) {
23923              const Y = V[W];
23924              if (B.length >= 3) {
23925                for (let oe = 0; oe < Y.length; oe++) if (Du(B, Y[oe])) return !0;
23926              }
23927              if (Ak(B, Y, q)) return !0;
23928            }
23929            return !1;
23930          }(E, p, k);
23931        }
23932        isTileClipped() {
23933          return !0;
23934        }
23935      }
23936      function F0(i, n) {
23937        return n > 0 ? n + 2 * i : i;
23938      }
23939      const _O = S([{ name: "a_pos_offset", components: 4, type: "Int16" }, { name: "a_data", components: 4, type: "Uint16" }, { name: "a_pixeloffset", components: 4, type: "Int16" }], 4), vO = S([{ name: "a_projected_pos", components: 3, type: "Float32" }], 4);
23940      S([{ name: "a_fade_opacity", components: 1, type: "Uint32" }], 4);
23941      const bO = S([{ name: "a_placed", components: 2, type: "Uint8" }, { name: "a_shift", components: 2, type: "Float32" }, { name: "a_box_real", components: 2, type: "Int16" }]);
23942      S([{ type: "Int16", name: "anchorPointX" }, { type: "Int16", name: "anchorPointY" }, { type: "Int16", name: "x1" }, { type: "Int16", name: "y1" }, { type: "Int16", name: "x2" }, { type: "Int16", name: "y2" }, { type: "Uint32", name: "featureIndex" }, { type: "Uint16", name: "sourceLayerIndex" }, { type: "Uint16", name: "bucketIndex" }]);
23943      const z0 = S([{ name: "a_pos", components: 2, type: "Int16" }, { name: "a_anchor_pos", components: 2, type: "Int16" }, { name: "a_extrude", components: 2, type: "Int16" }], 4), xO = S([{ name: "a_pos", components: 2, type: "Float32" }, { name: "a_radius", components: 1, type: "Float32" }, { name: "a_flags", components: 2, type: "Int16" }], 4);
23944      function wO(i, n, o) {
23945        return i.sections.forEach((u) => {
23946          u.text = function(p, v, b) {
23947            const x = v.layout.get("text-transform").evaluate(b, {});
23948            return x === "uppercase" ? p = p.toLocaleUpperCase() : x === "lowercase" && (p = p.toLocaleLowerCase()), cs.applyArabicShaping && (p = cs.applyArabicShaping(p)), p;
23949          }(u.text, n, o);
23950        }), i;
23951      }
23952      S([{ name: "triangle", components: 3, type: "Uint16" }]), S([{ type: "Int16", name: "anchorX" }, { type: "Int16", name: "anchorY" }, { type: "Uint16", name: "glyphStartIndex" }, { type: "Uint16", name: "numGlyphs" }, { type: "Uint32", name: "vertexStartIndex" }, { type: "Uint32", name: "lineStartIndex" }, { type: "Uint32", name: "lineLength" }, { type: "Uint16", name: "segment" }, { type: "Uint16", name: "lowerSize" }, { type: "Uint16", name: "upperSize" }, { type: "Float32", name: "lineOffsetX" }, { type: "Float32", name: "lineOffsetY" }
vendor: 4,892 bytes, lines 23952-23978
23952, { type: "Uint8", name: "writingMode" }, { type: "Uint8", name: "placedOrientation" }, { type: "Uint8", name: "hidden" }, { type: "Uint32", name: "crossTileID" }, { type: "Int16", name: "associatedIconIndex" }]), S([{ type: "Int16", name: "anchorX" }, { type: "Int16", name: "anchorY" }, { type: "Int16", name: "rightJustifiedTextSymbolIndex" }, { type: "Int16", name: "centerJustifiedTextSymbolIndex" }, { type: "Int16", name: "leftJustifiedTextSymbolIndex" }, { type: "Int16", name: "verticalPlacedTextSymbolIndex" }, { type: "Int16", name: "placedIconSymbolIndex" }, { type: "Int16", name: "verticalPlacedIconSymbolIndex" }, { type: "Uint16", name: "key" }, { type: "Uint16", name: "textBoxStartIndex" }, { type: "Uint16", name: "textBoxEndIndex" }, { type: "Uint16", name: "verticalTextBoxStartIndex" }, { type: "Uint16", name: "verticalTextBoxEndIndex" }, { type: "Uint16", name: "iconBoxStartIndex" }, { type: "Uint16", name: "iconBoxEndIndex" }, { type: "Uint16", name: "verticalIconBoxStartIndex" }, { type: "Uint16", name: "verticalIconBoxEndIndex" }, { type: "Uint16", name: "featureIndex" }, { type: "Uint16", name: "numHorizontalGlyphVertices" }, { type: "Uint16", name: "numVerticalGlyphVertices" }, { type: "Uint16", name: "numIconVertices" }, { type: "Uint16", name: "numVerticalIconVertices" }, { type: "Uint16", name: "useRuntimeCollisionCircles" }, { type: "Uint32", name: "crossTileID" }, { type: "Float32", name: "textBoxScale" }, { type: "Float32", name: "collisionCircleDiameter" }, { type: "Uint16", name: "textAnchorOffsetStartIndex" }, { type: "Uint16", name: "textAnchorOffsetEndIndex" }]), S([{ type: "Float32", name: "offsetX" }]), S([{ type: "Int16", name: "x" }, { type: "Int16", name: "y" }, { type: "Int16", name: "tileUnitDistanceFromAnchor" }]), S([{ type: "Uint16", name: "textAnchor" }, { type: "Float32", components: 2, name: "textOffset" }]);
23953      const _f = { "!": "︕", "#": "#", $: "$", "%": "%", "&": "&", "(": "︵", ")": "︶", "*": "*", "+": "+", ",": "︐", "-": "︲", ".": "・", "/": "/", ":": "︓", ";": "︔", "<": "︿", "=": "=", ">": "﹀", "?": "︖", "@": "@", "[": "﹇", "\\": "\", "]": "﹈", "^": "^", _: "︳", "`": "`", "{": "︷", "|": "―", "}": "︸", "~": "~", "¢": "¢", "£": "£", "¥": "¥", "¦": "¦", "¬": "¬", "¯": " ̄", "–": "︲", "—": "︱", "‘": "﹃", "’": "﹄", "“": "﹁", "”": "﹂", "…": "︙", "‧": "・", "₩": "₩", "、": "︑", "。": "︒", "〈": "︿", "〉": "﹀", "《": "︽", "》": "︾", "「": "﹁", "」": "﹂", "『": "﹃", "』": "﹄", "【": "︻", "】": "︼", "〔": "︹", "〕": "︺", "〖": "︗", "〗": "︘", "!": "︕", "(": "︵", ")": "︶", ",": "︐", "-": "︲", ".": "・", ":": "︓", ";": "︔", "<": "︿", ">": "﹀", "?": "︖", "[": "﹇", "]": "﹈", "_": "︳", "{": "︷", "|": "―", "}": "︸", "⦅": "︵", "⦆": "︶", "。": "︒", "「": "﹁", "」": "﹂" };
23954      var Yn = 24, B0 = Jr, N0 = function(i, n, o, u, p) {
23955        var v, b, x = 8 * p - u - 1, E = (1 << x) - 1, k = E >> 1, L = -7, B = p - 1, V = -1, q = i[n + B];
23956        for (B += V, v = q & (1 << -L) - 1, q >>= -L, L += x; L > 0; v = 256 * v + i[n + B], B += V, L -= 8) ;
23957        for (b = v & (1 << -L) - 1, v >>= -L, L += u; L > 0; b = 256 * b + i[n + B], B += V, L -= 8) ;
23958        if (v === 0) v = 1 - k;
23959        else {
23960          if (v === E) return b ? NaN : 1 / 0 * (q ? -1 : 1);
23961          b += Math.pow(2, u), v -= k;
23962        }
23963        return (q ? -1 : 1) * b * Math.pow(2, v - u);
23964      }, $0 = function(i, n, o, u, p, v) {
23965        var b, x, E, k = 8 * v - p - 1, L = (1 << k) - 1, B = L >> 1, V = p === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, q = 0, W = 1, Y = n < 0 || n === 0 && 1 / n < 0 ? 1 : 0;
23966        for (n = Math.abs(n), isNaN(n) || n === 1 / 0 ? (x = isNaN(n) ? 1 : 0, b = L) : (b = Math.floor(Math.log(n) / Math.LN2), n * (E = Math.pow(2, -b)) < 1 && (b--, E *= 2), (n += b + B >= 1 ? V / E : V * Math.pow(2, 1 - B)) * E >= 2 && (b++, E /= 2), b + B >= L ? (x = 0, b = L) : b + B >= 1 ? (x = (n * E - 1) * Math.pow(2, p), b += B) : (x = n * Math.pow(2, B - 1) * Math.pow(2, p), b = 0)); p >= 8; i[o + q] = 255 & x, q += W, x /= 256, p -= 8) ;
23967        for (b = b << p | x, k += p; k > 0; i[o + q] = 255 & b, q += W, b /= 256, k -= 8) ;
23968        i[o + q - W] |= 128 * Y;
23969      };
23970      function Jr(i) {
23971        this.buf = ArrayBuffer.isView && ArrayBuffer.isView(i) ? i : new Uint8Array(i || 0), this.pos = 0, this.type = 0, this.length = this.buf.length;
23972      }
23973      Jr.Varint = 0, Jr.Fixed64 = 1, Jr.Bytes = 2, Jr.Fixed32 = 5;
23974      var xy = 4294967296, j0 = 1 / xy, V0 = typeof TextDecoder > "u" ? null : new TextDecoder("utf-8");
23975      function Va(i) {
23976        return i.type === Jr.Bytes ? i.readVarint() + i.pos : i.pos + 1;
23977      }
23978      function zu(i, n, o) {
vendor: 5,184 bytes, lines 23979-24079
23979        return o ? 4294967296 * n + (i >>> 0) : 4294967296 * (n >>> 0) + (i >>> 0);
23980      }
23981      function U0(i, n, o) {
23982        var u = n <= 16383 ? 1 : n <= 2097151 ? 2 : n <= 268435455 ? 3 : Math.floor(Math.log(n) / (7 * Math.LN2));
23983        o.realloc(u);
23984        for (var p = o.pos - 1; p >= i; p--) o.buf[p + u] = o.buf[p];
23985      }
23986      function SO(i, n) {
23987        for (var o = 0; o < i.length; o++) n.writeVarint(i[o]);
23988      }
23989      function TO(i, n) {
23990        for (var o = 0; o < i.length; o++) n.writeSVarint(i[o]);
23991      }
23992      function EO(i, n) {
23993        for (var o = 0; o < i.length; o++) n.writeFloat(i[o]);
23994      }
23995      function AO(i, n) {
23996        for (var o = 0; o < i.length; o++) n.writeDouble(i[o]);
23997      }
23998      function CO(i, n) {
23999        for (var o = 0; o < i.length; o++) n.writeBoolean(i[o]);
24000      }
24001      function IO(i, n) {
24002        for (var o = 0; o < i.length; o++) n.writeFixed32(i[o]);
24003      }
24004      function PO(i, n) {
24005        for (var o = 0; o < i.length; o++) n.writeSFixed32(i[o]);
24006      }
24007      function MO(i, n) {
24008        for (var o = 0; o < i.length; o++) n.writeFixed64(i[o]);
24009      }
24010      function kO(i, n) {
24011        for (var o = 0; o < i.length; o++) n.writeSFixed64(i[o]);
24012      }
24013      function ap(i, n) {
24014        return (i[n] | i[n + 1] << 8 | i[n + 2] << 16) + 16777216 * i[n + 3];
24015      }
24016      function Bu(i, n, o) {
24017        i[o] = n, i[o + 1] = n >>> 8, i[o + 2] = n >>> 16, i[o + 3] = n >>> 24;
24018      }
24019      function q0(i, n) {
24020        return (i[n] | i[n + 1] << 8 | i[n + 2] << 16) + (i[n + 3] << 24);
24021      }
24022      Jr.prototype = { destroy: function() {
24023        this.buf = null;
24024      }, readFields: function(i, n, o) {
24025        for (o = o || this.length; this.pos < o; ) {
24026          var u = this.readVarint(), p = u >> 3, v = this.pos;
24027          this.type = 7 & u, i(p, n, this), this.pos === v && this.skip(u);
24028        }
24029        return n;
24030      }, readMessage: function(i, n) {
24031        return this.readFields(i, n, this.readVarint() + this.pos);
24032      }, readFixed32: function() {
24033        var i = ap(this.buf, this.pos);
24034        return this.pos += 4, i;
24035      }, readSFixed32: function() {
24036        var i = q0(this.buf, this.pos);
24037        return this.pos += 4, i;
24038      }, readFixed64: function() {
24039        var i = ap(this.buf, this.pos) + ap(this.buf, this.pos + 4) * xy;
24040        return this.pos += 8, i;
24041      }, readSFixed64: function() {
24042        var i = ap(this.buf, this.pos) + q0(this.buf, this.pos + 4) * xy;
24043        return this.pos += 8, i;
24044      }, readFloat: function() {
24045        var i = N0(this.buf, this.pos, !0, 23, 4);
24046        return this.pos += 4, i;
24047      }, readDouble: function() {
24048        var i = N0(this.buf, this.pos, !0, 52, 8);
24049        return this.pos += 8, i;
24050      }, readVarint: function(i) {
24051        var n, o, u = this.buf;
24052        return n = 127 & (o = u[this.pos++]), o < 128 ? n : (n |= (127 & (o = u[this.pos++])) << 7, o < 128 ? n : (n |= (127 & (o = u[this.pos++])) << 14, o < 128 ? n : (n |= (127 & (o = u[this.pos++])) << 21, o < 128 ? n : function(p, v, b) {
24053          var x, E, k = b.buf;
24054          if (x = (112 & (E = k[b.pos++])) >> 4, E < 128 || (x |= (127 & (E = k[b.pos++])) << 3, E < 128) || (x |= (127 & (E = k[b.pos++])) << 10, E < 128) || (x |= (127 & (E = k[b.pos++])) << 17, E < 128) || (x |= (127 & (E = k[b.pos++])) << 24, E < 128) || (x |= (1 & (E = k[b.pos++])) << 31, E < 128)) return zu(p, x, v);
24055          throw new Error("Expected varint not more than 10 bytes");
24056        }(n |= (15 & (o = u[this.pos])) << 28, i, this))));
24057      }, readVarint64: function() {
24058        return this.readVarint(!0);
24059      }, readSVarint: function() {
24060        var i = this.readVarint();
24061        return i % 2 == 1 ? (i + 1) / -2 : i / 2;
24062      }, readBoolean: function() {
24063        return !!this.readVarint();
24064      }, readString: function() {
24065        var i = this.readVarint() + this.pos, n = this.pos;
24066        return this.pos = i, i - n >= 12 && V0 ? function(o, u, p) {
24067          return V0.decode(o.subarray(u, p));
24068        }(this.buf, n, i) : function(o, u, p) {
24069          for (var v = "", b = u; b < p; ) {
24070            var x, E, k, L = o[b], B = null, V = L > 239 ? 4 : L > 223 ? 3 : L > 191 ? 2 : 1;
24071            if (b + V > p) break;
24072            V === 1 ? L < 128 && (B = L) : V === 2 ? (192 & (x = o[b + 1])) == 128 && (B = (31 & L) << 6 | 63 & x) <= 127 && (B = null) : V === 3 ? (E = o[b + 2], (192 & (x = o[b + 1])) == 128 && (192 & E) == 128 && ((B = (15 & L) << 12 | (63 & x) << 6 | 63 & E) <= 2047 || B >= 55296 && B <= 57343) && (B = null)) : V === 4 && (E = o[b + 2], k = o[b + 3], (192 & (x = o[b + 1])) == 128 && (192 & E) == 128 && (192 & k) == 128 && ((B = (15 & L) << 18 | (63 & x) << 12 | (63 & E) << 6 | 63 & k) <= 65535 || B >= 1114112) && (B = null)), B === null ? (B = 65533, V = 1) : B > 65535 && (B -= 65536, v += String.fromCharCode(B >>> 10 & 1023 | 55296), B = 56320 | 1023 & B), v += String.fromCharCode(B), b += V;
24073          }
24074          return v;
24075        }(this.buf, n, i);
24076      }, readBytes: function() {
24077        var i = this.readVarint() + this.pos, n = this.buf.subarray(this.pos, i);
24078        return this.pos = i, n;
24079      }, readPackedVarint: function(i, n) {
vendor: 22,210 bytes, lines 24080-24516
24080        if (this.type !== Jr.Bytes) return i.push(this.readVarint(n));
24081        var o = Va(this);
24082        for (i = i || []; this.pos < o; ) i.push(this.readVarint(n));
24083        return i;
24084      }, readPackedSVarint: function(i) {
24085        if (this.type !== Jr.Bytes) return i.push(this.readSVarint());
24086        var n = Va(this);
24087        for (i = i || []; this.pos < n; ) i.push(this.readSVarint());
24088        return i;
24089      }, readPackedBoolean: function(i) {
24090        if (this.type !== Jr.Bytes) return i.push(this.readBoolean());
24091        var n = Va(this);
24092        for (i = i || []; this.pos < n; ) i.push(this.readBoolean());
24093        return i;
24094      }, readPackedFloat: function(i) {
24095        if (this.type !== Jr.Bytes) return i.push(this.readFloat());
24096        var n = Va(this);
24097        for (i = i || []; this.pos < n; ) i.push(this.readFloat());
24098        return i;
24099      }, readPackedDouble: function(i) {
24100        if (this.type !== Jr.Bytes) return i.push(this.readDouble());
24101        var n = Va(this);
24102        for (i = i || []; this.pos < n; ) i.push(this.readDouble());
24103        return i;
24104      }, readPackedFixed32: function(i) {
24105        if (this.type !== Jr.Bytes) return i.push(this.readFixed32());
24106        var n = Va(this);
24107        for (i = i || []; this.pos < n; ) i.push(this.readFixed32());
24108        return i;
24109      }, readPackedSFixed32: function(i) {
24110        if (this.type !== Jr.Bytes) return i.push(this.readSFixed32());
24111        var n = Va(this);
24112        for (i = i || []; this.pos < n; ) i.push(this.readSFixed32());
24113        return i;
24114      }, readPackedFixed64: function(i) {
24115        if (this.type !== Jr.Bytes) return i.push(this.readFixed64());
24116        var n = Va(this);
24117        for (i = i || []; this.pos < n; ) i.push(this.readFixed64());
24118        return i;
24119      }, readPackedSFixed64: function(i) {
24120        if (this.type !== Jr.Bytes) return i.push(this.readSFixed64());
24121        var n = Va(this);
24122        for (i = i || []; this.pos < n; ) i.push(this.readSFixed64());
24123        return i;
24124      }, skip: function(i) {
24125        var n = 7 & i;
24126        if (n === Jr.Varint) for (; this.buf[this.pos++] > 127; ) ;
24127        else if (n === Jr.Bytes) this.pos = this.readVarint() + this.pos;
24128        else if (n === Jr.Fixed32) this.pos += 4;
24129        else {
24130          if (n !== Jr.Fixed64) throw new Error("Unimplemented type: " + n);
24131          this.pos += 8;
24132        }
24133      }, writeTag: function(i, n) {
24134        this.writeVarint(i << 3 | n);
24135      }, realloc: function(i) {
24136        for (var n = this.length || 16; n < this.pos + i; ) n *= 2;
24137        if (n !== this.length) {
24138          var o = new Uint8Array(n);
24139          o.set(this.buf), this.buf = o, this.length = n;
24140        }
24141      }, finish: function() {
24142        return this.length = this.pos, this.pos = 0, this.buf.subarray(0, this.length);
24143      }, writeFixed32: function(i) {
24144        this.realloc(4), Bu(this.buf, i, this.pos), this.pos += 4;
24145      }, writeSFixed32: function(i) {
24146        this.realloc(4), Bu(this.buf, i, this.pos), this.pos += 4;
24147      }, writeFixed64: function(i) {
24148        this.realloc(8), Bu(this.buf, -1 & i, this.pos), Bu(this.buf, Math.floor(i * j0), this.pos + 4), this.pos += 8;
24149      }, writeSFixed64: function(i) {
24150        this.realloc(8), Bu(this.buf, -1 & i, this.pos), Bu(this.buf, Math.floor(i * j0), this.pos + 4), this.pos += 8;
24151      }, writeVarint: function(i) {
24152        (i = +i || 0) > 268435455 || i < 0 ? function(n, o) {
24153          var u, p;
24154          if (n >= 0 ? (u = n % 4294967296 | 0, p = n / 4294967296 | 0) : (p = ~(-n / 4294967296), 4294967295 ^ (u = ~(-n % 4294967296)) ? u = u + 1 | 0 : (u = 0, p = p + 1 | 0)), n >= 18446744073709552e3 || n < -18446744073709552e3) throw new Error("Given varint doesn't fit into 10 bytes");
24155          o.realloc(10), function(v, b, x) {
24156            x.buf[x.pos++] = 127 & v | 128, v >>>= 7, x.buf[x.pos++] = 127 & v | 128, v >>>= 7, x.buf[x.pos++] = 127 & v | 128, v >>>= 7, x.buf[x.pos++] = 127 & v | 128, x.buf[x.pos] = 127 & (v >>>= 7);
24157          }(u, 0, o), function(v, b) {
24158            var x = (7 & v) << 4;
24159            b.buf[b.pos++] |= x | ((v >>>= 3) ? 128 : 0), v && (b.buf[b.pos++] = 127 & v | ((v >>>= 7) ? 128 : 0), v && (b.buf[b.pos++] = 127 & v | ((v >>>= 7) ? 128 : 0), v && (b.buf[b.pos++] = 127 & v | ((v >>>= 7) ? 128 : 0), v && (b.buf[b.pos++] = 127 & v | ((v >>>= 7) ? 128 : 0), v && (b.buf[b.pos++] = 127 & v)))));
24160          }(p, o);
24161        }(i, this) : (this.realloc(4), this.buf[this.pos++] = 127 & i | (i > 127 ? 128 : 0), i <= 127 || (this.buf[this.pos++] = 127 & (i >>>= 7) | (i > 127 ? 128 : 0), i <= 127 || (this.buf[this.pos++] = 127 & (i >>>= 7) | (i > 127 ? 128 : 0), i <= 127 || (this.buf[this.pos++] = i >>> 7 & 127))));
24162      }, writeSVarint: function(i) {
24163        this.writeVarint(i < 0 ? 2 * -i - 1 : 2 * i);
24164      }, writeBoolean: function(i) {
24165        this.writeVarint(!!i);
24166      }, writeString: function(i) {
24167        i = String(i), this.realloc(4 * i.length), this.pos++;
24168        var n = this.pos;
24169        this.pos = function(u, p, v) {
24170          for (var b, x, E = 0; E < p.length; E++) {
24171            if ((b = p.charCodeAt(E)) > 55295 && b < 57344) {
24172              if (!x) {
24173                b > 56319 || E + 1 === p.length ? (u[v++] = 239, u[v++] = 191, u[v++] = 189) : x = b;
24174                continue;
24175              }
24176              if (b < 56320) {
24177                u[v++] = 239, u[v++] = 191, u[v++] = 189, x = b;
24178                continue;
24179              }
24180              b = x - 55296 << 10 | b - 56320 | 65536, x = null;
24181            } else x && (u[v++] = 239, u[v++] = 191, u[v++] = 189, x = null);
24182            b < 128 ? u[v++] = b : (b < 2048 ? u[v++] = b >> 6 | 192 : (b < 65536 ? u[v++] = b >> 12 | 224 : (u[v++] = b >> 18 | 240, u[v++] = b >> 12 & 63 | 128), u[v++] = b >> 6 & 63 | 128), u[v++] = 63 & b | 128);
24183          }
24184          return v;
24185        }(this.buf, i, this.pos);
24186        var o = this.pos - n;
24187        o >= 128 && U0(n, o, this), this.pos = n - 1, this.writeVarint(o), this.pos += o;
24188      }, writeFloat: function(i) {
24189        this.realloc(4), $0(this.buf, i, this.pos, !0, 23, 4), this.pos += 4;
24190      }, writeDouble: function(i) {
24191        this.realloc(8), $0(this.buf, i, this.pos, !0, 52, 8), this.pos += 8;
24192      }, writeBytes: function(i) {
24193        var n = i.length;
24194        this.writeVarint(n), this.realloc(n);
24195        for (var o = 0; o < n; o++) this.buf[this.pos++] = i[o];
24196      }, writeRawMessage: function(i, n) {
24197        this.pos++;
24198        var o = this.pos;
24199        i(n, this);
24200        var u = this.pos - o;
24201        u >= 128 && U0(o, u, this), this.pos = o - 1, this.writeVarint(u), this.pos += u;
24202      }, writeMessage: function(i, n, o) {
24203        this.writeTag(i, Jr.Bytes), this.writeRawMessage(n, o);
24204      }, writePackedVarint: function(i, n) {
24205        n.length && this.writeMessage(i, SO, n);
24206      }, writePackedSVarint: function(i, n) {
24207        n.length && this.writeMessage(i, TO, n);
24208      }, writePackedBoolean: function(i, n) {
24209        n.length && this.writeMessage(i, CO, n);
24210      }, writePackedFloat: function(i, n) {
24211        n.length && this.writeMessage(i, EO, n);
24212      }, writePackedDouble: function(i, n) {
24213        n.length && this.writeMessage(i, AO, n);
24214      }, writePackedFixed32: function(i, n) {
24215        n.length && this.writeMessage(i, IO, n);
24216      }, writePackedSFixed32: function(i, n) {
24217        n.length && this.writeMessage(i, PO, n);
24218      }, writePackedFixed64: function(i, n) {
24219        n.length && this.writeMessage(i, MO, n);
24220      }, writePackedSFixed64: function(i, n) {
24221        n.length && this.writeMessage(i, kO, n);
24222      }, writeBytesField: function(i, n) {
24223        this.writeTag(i, Jr.Bytes), this.writeBytes(n);
24224      }, writeFixed32Field: function(i, n) {
24225        this.writeTag(i, Jr.Fixed32), this.writeFixed32(n);
24226      }, writeSFixed32Field: function(i, n) {
24227        this.writeTag(i, Jr.Fixed32), this.writeSFixed32(n);
24228      }, writeFixed64Field: function(i, n) {
24229        this.writeTag(i, Jr.Fixed64), this.writeFixed64(n);
24230      }, writeSFixed64Field: function(i, n) {
24231        this.writeTag(i, Jr.Fixed64), this.writeSFixed64(n);
24232      }, writeVarintField: function(i, n) {
24233        this.writeTag(i, Jr.Varint), this.writeVarint(n);
24234      }, writeSVarintField: function(i, n) {
24235        this.writeTag(i, Jr.Varint), this.writeSVarint(n);
24236      }, writeStringField: function(i, n) {
24237        this.writeTag(i, Jr.Bytes), this.writeString(n);
24238      }, writeFloatField: function(i, n) {
24239        this.writeTag(i, Jr.Fixed32), this.writeFloat(n);
24240      }, writeDoubleField: function(i, n) {
24241        this.writeTag(i, Jr.Fixed64), this.writeDouble(n);
24242      }, writeBooleanField: function(i, n) {
24243        this.writeVarintField(i, !!n);
24244      } };
24245      var wy = w(B0);
24246      const Sy = 3;
24247      function OO(i, n, o) {
24248        i === 1 && o.readMessage(DO, n);
24249      }
24250      function DO(i, n, o) {
24251        if (i === 3) {
24252          const { id: u, bitmap: p, width: v, height: b, left: x, top: E, advance: k } = o.readMessage(RO, {});
24253          n.push({ id: u, bitmap: new ff({ width: v + 2 * Sy, height: b + 2 * Sy }, p), metrics: { width: v, height: b, left: x, top: E, advance: k } });
24254        }
24255      }
24256      function RO(i, n, o) {
24257        i === 1 ? n.id = o.readVarint() : i === 2 ? n.bitmap = o.readBytes() : i === 3 ? n.width = o.readVarint() : i === 4 ? n.height = o.readVarint() : i === 5 ? n.left = o.readSVarint() : i === 6 ? n.top = o.readSVarint() : i === 7 && (n.advance = o.readVarint());
24258      }
24259      const H0 = Sy;
24260      function G0(i) {
24261        let n = 0, o = 0;
24262        for (const b of i) n += b.w * b.h, o = Math.max(o, b.w);
24263        i.sort((b, x) => x.h - b.h);
24264        const u = [{ x: 0, y: 0, w: Math.max(Math.ceil(Math.sqrt(n / 0.95)), o), h: 1 / 0 }];
24265        let p = 0, v = 0;
24266        for (const b of i) for (let x = u.length - 1; x >= 0; x--) {
24267          const E = u[x];
24268          if (!(b.w > E.w || b.h > E.h)) {
24269            if (b.x = E.x, b.y = E.y, v = Math.max(v, b.y + b.h), p = Math.max(p, b.x + b.w), b.w === E.w && b.h === E.h) {
24270              const k = u.pop();
24271              x < u.length && (u[x] = k);
24272            } else b.h === E.h ? (E.x += b.w, E.w -= b.w) : b.w === E.w ? (E.y += b.h, E.h -= b.h) : (u.push({ x: E.x + b.w, y: E.y, w: E.w - b.w, h: b.h }), E.y += b.h, E.h -= b.h);
24273            break;
24274          }
24275        }
24276        return { w: p, h: v, fill: n / (p * v) || 0 };
24277      }
24278      const hs = 1;
24279      class Ty {
24280        constructor(n, { pixelRatio: o, version: u, stretchX: p, stretchY: v, content: b, textFitWidth: x, textFitHeight: E }) {
24281          this.paddedRect = n, this.pixelRatio = o, this.stretchX = p, this.stretchY = v, this.content = b, this.version = u, this.textFitWidth = x, this.textFitHeight = E;
24282        }
24283        get tl() {
24284          return [this.paddedRect.x + hs, this.paddedRect.y + hs];
24285        }
24286        get br() {
24287          return [this.paddedRect.x + this.paddedRect.w - hs, this.paddedRect.y + this.paddedRect.h - hs];
24288        }
24289        get tlbr() {
24290          return this.tl.concat(this.br);
24291        }
24292        get displaySize() {
24293          return [(this.paddedRect.w - 2 * hs) / this.pixelRatio, (this.paddedRect.h - 2 * hs) / this.pixelRatio];
24294        }
24295      }
24296      class Z0 {
24297        constructor(n, o) {
24298          const u = {}, p = {};
24299          this.haveRenderCallbacks = [];
24300          const v = [];
24301          this.addImages(n, u, v), this.addImages(o, p, v);
24302          const { w: b, h: x } = G0(v), E = new Gs({ width: b || 1, height: x || 1 });
24303          for (const k in n) {
24304            const L = n[k], B = u[k].paddedRect;
24305            Gs.copy(L.data, E, { x: 0, y: 0 }, { x: B.x + hs, y: B.y + hs }, L.data);
24306          }
24307          for (const k in o) {
24308            const L = o[k], B = p[k].paddedRect, V = B.x + hs, q = B.y + hs, W = L.data.width, Y = L.data.height;
24309            Gs.copy(L.data, E, { x: 0, y: 0 }, { x: V, y: q }, L.data), Gs.copy(L.data, E, { x: 0, y: Y - 1 }, { x: V, y: q - 1 }, { width: W, height: 1 }), Gs.copy(L.data, E, { x: 0, y: 0 }, { x: V, y: q + Y }, { width: W, height: 1 }), Gs.copy(L.data, E, { x: W - 1, y: 0 }, { x: V - 1, y: q }, { width: 1, height: Y }), Gs.copy(L.data, E, { x: 0, y: 0 }, { x: V + W, y: q }, { width: 1, height: Y });
24310          }
24311          this.image = E, this.iconPositions = u, this.patternPositions = p;
24312        }
24313        addImages(n, o, u) {
24314          for (const p in n) {
24315            const v = n[p], b = { x: 0, y: 0, w: v.data.width + 2 * hs, h: v.data.height + 2 * hs };
24316            u.push(b), o[p] = new Ty(b, v), v.hasRenderCallback && this.haveRenderCallbacks.push(p);
24317          }
24318        }
24319        patchUpdatedImages(n, o) {
24320          n.dispatchRenderCallbacks(this.haveRenderCallbacks);
24321          for (const u in n.updatedImages) this.patchUpdatedImage(this.iconPositions[u], n.getImage(u), o), this.patchUpdatedImage(this.patternPositions[u], n.getImage(u), o);
24322        }
24323        patchUpdatedImage(n, o, u) {
24324          if (!n || !o || n.version === o.version) return;
24325          n.version = o.version;
24326          const [p, v] = n.tl;
24327          u.update(o.data, void 0, { x: p, y: v });
24328        }
24329      }
24330      var Fl;
24331      Mt("ImagePosition", Ty), Mt("ImageAtlas", Z0), m.ah = void 0, (Fl = m.ah || (m.ah = {}))[Fl.none = 0] = "none", Fl[Fl.horizontal = 1] = "horizontal", Fl[Fl.vertical = 2] = "vertical", Fl[Fl.horizontalOnly = 3] = "horizontalOnly";
24332      const vf = -17;
24333      class bf {
24334        constructor() {
24335          this.scale = 1, this.fontStack = "", this.imageName = null;
24336        }
24337        static forText(n, o) {
24338          const u = new bf();
24339          return u.scale = n || 1, u.fontStack = o, u;
24340        }
24341        static forImage(n) {
24342          const o = new bf();
24343          return o.imageName = n, o;
24344        }
24345      }
24346      class Nu {
24347        constructor() {
24348          this.text = "", this.sectionIndex = [], this.sections = [], this.imageSectionID = null;
24349        }
24350        static fromFeature(n, o) {
24351          const u = new Nu();
24352          for (let p = 0; p < n.sections.length; p++) {
24353            const v = n.sections[p];
24354            v.image ? u.addImageSection(v) : u.addTextSection(v, o);
24355          }
24356          return u;
24357        }
24358        length() {
24359          return this.text.length;
24360        }
24361        getSection(n) {
24362          return this.sections[this.sectionIndex[n]];
24363        }
24364        getSectionIndex(n) {
24365          return this.sectionIndex[n];
24366        }
24367        getCharCode(n) {
24368          return this.text.charCodeAt(n);
24369        }
24370        verticalizePunctuation() {
24371          this.text = function(n) {
24372            let o = "";
24373            for (let u = 0; u < n.length; u++) {
24374              const p = n.charCodeAt(u + 1) || null, v = n.charCodeAt(u - 1) || null;
24375              o += p && Zd(p) && !_f[n[u + 1]] || v && Zd(v) && !_f[n[u - 1]] || !_f[n[u]] ? n[u] : _f[n[u]];
24376            }
24377            return o;
24378          }(this.text);
24379        }
24380        trim() {
24381          let n = 0;
24382          for (let u = 0; u < this.text.length && cp[this.text.charCodeAt(u)]; u++) n++;
24383          let o = this.text.length;
24384          for (let u = this.text.length - 1; u >= 0 && u >= n && cp[this.text.charCodeAt(u)]; u--) o--;
24385          this.text = this.text.substring(n, o), this.sectionIndex = this.sectionIndex.slice(n, o);
24386        }
24387        substring(n, o) {
24388          const u = new Nu();
24389          return u.text = this.text.substring(n, o), u.sectionIndex = this.sectionIndex.slice(n, o), u.sections = this.sections, u;
24390        }
24391        toString() {
24392          return this.text;
24393        }
24394        getMaxScale() {
24395          return this.sectionIndex.reduce((n, o) => Math.max(n, this.sections[o].scale), 0);
24396        }
24397        addTextSection(n, o) {
24398          this.text += n.text, this.sections.push(bf.forText(n.scale, n.fontStack || o));
24399          const u = this.sections.length - 1;
24400          for (let p = 0; p < n.text.length; ++p) this.sectionIndex.push(u);
24401        }
24402        addImageSection(n) {
24403          const o = n.image ? n.image.name : "";
24404          if (o.length === 0) return void $e("Can't add FormattedSection with an empty image.");
24405          const u = this.getNextImageSectionCharCode();
24406          u ? (this.text += String.fromCharCode(u), this.sections.push(bf.forImage(o)), this.sectionIndex.push(this.sections.length - 1)) : $e("Reached maximum number of images 6401");
24407        }
24408        getNextImageSectionCharCode() {
24409          return this.imageSectionID ? this.imageSectionID >= 63743 ? null : ++this.imageSectionID : (this.imageSectionID = 57344, this.imageSectionID);
24410        }
24411      }
24412      function lp(i, n, o, u, p, v, b, x, E, k, L, B, V, q, W) {
24413        const Y = Nu.fromFeature(i, p);
24414        let oe;
24415        B === m.ah.vertical && Y.verticalizePunctuation();
24416        const { processBidirectionalText: he, processStyledBidirectionalText: De } = cs;
24417        if (he && Y.sections.length === 1) {
24418          oe = [];
24419          const Ve = he(Y.toString(), Ey(Y, k, v, n, u, q));
24420          for (const at of Ve) {
24421            const At = new Nu();
24422            At.text = at, At.sections = Y.sections;
24423            for (let Kt = 0; Kt < at.length; Kt++) At.sectionIndex.push(0);
24424            oe.push(At);
24425          }
24426        } else if (De) {
24427          oe = [];
24428          const Ve = De(Y.text, Y.sectionIndex, Ey(Y, k, v, n, u, q));
24429          for (const at of Ve) {
24430            const At = new Nu();
24431            At.text = at[0], At.sectionIndex = at[1], At.sections = Y.sections, oe.push(At);
24432          }
24433        } else oe = function(Ve, at) {
24434          const At = [], Kt = Ve.text;
24435          let St = 0;
24436          for (const _t of at) At.push(Ve.substring(St, _t)), St = _t;
24437          return St < Kt.length && At.push(Ve.substring(St, Kt.length)), At;
24438        }(Y, Ey(Y, k, v, n, u, q));
24439        const xe = [], ke = { positionedLines: xe, text: Y.toString(), top: L[1], bottom: L[1], left: L[0], right: L[0], writingMode: B, iconsInText: !1, verticalizable: !1 };
24440        return function(Ve, at, At, Kt, St, _t, $t, Ot, It, Ke, Vt, Bt) {
24441          let nr = 0, on = vf, Yr = 0, ei = 0;
24442          const vo = Ot === "right" ? 1 : Ot === "left" ? 0 : 0.5;
24443          let wi = 0;
24444          for (const Dn of St) {
24445            Dn.trim();
24446            const ri = Dn.getMaxScale(), Oi = (ri - 1) * Yn, Si = { positionedGlyphs: [], lineOffset: 0 };
24447            Ve.positionedLines[wi] = Si;
24448            const Xi = Si.positionedGlyphs;
24449            let Ti = 0;
24450            if (!Dn.length()) {
24451              on += _t, ++wi;
24452              continue;
24453            }
24454            for (let fs = 0; fs < Dn.length(); fs++) {
24455              const Lr = Dn.getSection(fs), un = Dn.getSectionIndex(fs), bn = Dn.getCharCode(fs);
24456              let Es = 0, Pn = null, Uu = null, la = null, ca = Yn;
24457              const bo = !(It === m.ah.horizontal || !Vt && !sf(bn) || Vt && (cp[bn] || (ti = bn, new RegExp("\\p{sc=Arab}", "u").test(String.fromCodePoint(ti)))));
24458              if (Lr.imageName) {
24459                const Ks = Kt[Lr.imageName];
24460                if (!Ks) continue;
24461                la = Lr.imageName, Ve.iconsInText = Ve.iconsInText || !0, Uu = Ks.paddedRect;
24462                const ai = Ks.displaySize;
24463                Lr.scale = Lr.scale * Yn / Bt, Pn = { width: ai[0], height: ai[1], left: hs, top: -H0, advance: bo ? ai[1] : ai[0] }, Es = Oi + (Yn - ai[1] * Lr.scale), ca = Pn.advance;
24464                const Ua = bo ? ai[0] * Lr.scale - Yn * ri : ai[1] * Lr.scale - Yn * ri;
24465                Ua > 0 && Ua > Ti && (Ti = Ua);
24466              } else {
24467                const Ks = At[Lr.fontStack], ai = Ks && Ks[bn];
24468                if (ai && ai.rect) Uu = ai.rect, Pn = ai.metrics;
24469                else {
24470                  const Ua = at[Lr.fontStack], Af = Ua && Ua[bn];
24471                  if (!Af) continue;
24472                  Pn = Af.metrics;
24473                }
24474                Es = (ri - Lr.scale) * Yn;
24475              }
24476              bo ? (Ve.verticalizable = !0, Xi.push({ glyph: bn, imageName: la, x: nr, y: on + Es, vertical: bo, scale: Lr.scale, fontStack: Lr.fontStack, sectionIndex: un, metrics: Pn, rect: Uu }), nr += ca * Lr.scale + Ke) : (Xi.push({ glyph: bn, imageName: la, x: nr, y: on + Es, vertical: bo, scale: Lr.scale, fontStack: Lr.fontStack, sectionIndex: un, metrics: Pn, rect: Uu }), nr += Pn.advance * Lr.scale + Ke);
24477            }
24478            Xi.length !== 0 && (Yr = Math.max(nr - Ke, Yr), BO(Xi, 0, Xi.length - 1, vo, Ti)), nr = 0;
24479            const Ws = _t * ri + Ti;
24480            Si.lineOffset = Math.max(Ti, Oi), on += Ws, ei = Math.max(Ws, ei), ++wi;
24481          }
24482          var ti;
24483          const Zi = on - vf, { horizontalAlign: Wi, verticalAlign: Ki } = Ay($t);
24484          (function(Dn, ri, Oi, Si, Xi, Ti, Ws, fs, Lr) {
24485            const un = (ri - Oi) * Xi;
24486            let bn = 0;
24487            bn = Ti !== Ws ? -fs * Si - vf : (-Si * Lr + 0.5) * Ws;
24488            for (const Es of Dn) for (const Pn of Es.positionedGlyphs) Pn.x += un, Pn.y += bn;
24489          })(Ve.positionedLines, vo, Wi, Ki, Yr, ei, _t, Zi, St.length), Ve.top += -Ki * Zi, Ve.bottom = Ve.top + Zi, Ve.left += -Wi * Yr, Ve.right = Ve.left + Yr;
24490        }(ke, n, o, u, oe, b, x, E, B, k, V, W), !function(Ve) {
24491          for (const at of Ve) if (at.positionedGlyphs.length !== 0) return !1;
24492          return !0;
24493        }(xe) && ke;
24494      }
24495      const cp = { 9: !0, 10: !0, 11: !0, 12: !0, 13: !0, 32: !0 }, LO = { 10: !0, 32: !0, 38: !0, 41: !0, 43: !0, 45: !0, 47: !0, 173: !0, 183: !0, 8203: !0, 8208: !0, 8211: !0, 8231: !0 }, FO = { 40: !0 };
24496      function W0(i, n, o, u, p, v) {
24497        if (n.imageName) {
24498          const b = u[n.imageName];
24499          return b ? b.displaySize[0] * n.scale * Yn / v + p : 0;
24500        }
24501        {
24502          const b = o[n.fontStack], x = b && b[i];
24503          return x ? x.metrics.advance * n.scale + p : 0;
24504        }
24505      }
24506      function K0(i, n, o, u) {
24507        const p = Math.pow(i - n, 2);
24508        return u ? i < n ? p / 2 : 2 * p : p + Math.abs(o) * o;
24509      }
24510      function zO(i, n, o) {
24511        let u = 0;
24512        return i === 10 && (u -= 1e4), o && (u += 150), i !== 40 && i !== 65288 || (u += 50), n !== 41 && n !== 65289 || (u += 50), u;
24513      }
24514      function X0(i, n, o, u, p, v) {
24515        let b = null, x = K0(n, o, p, v);
24516        for (const E of u) {
vendor: 37,842 bytes, lines 24517-25102
24517          const k = K0(n - E.x, o, p, v) + E.badness;
24518          k <= x && (b = E, x = k);
24519        }
24520        return { index: i, x: n, priorBreak: b, badness: x };
24521      }
24522      function J0(i) {
24523        return i ? J0(i.priorBreak).concat(i.index) : [];
24524      }
24525      function Ey(i, n, o, u, p, v) {
24526        if (!i) return [];
24527        const b = [], x = function(B, V, q, W, Y, oe) {
24528          let he = 0;
24529          for (let De = 0; De < B.length(); De++) {
24530            const xe = B.getSection(De);
24531            he += W0(B.getCharCode(De), xe, W, Y, V, oe);
24532          }
24533          return he / Math.max(1, Math.ceil(he / q));
24534        }(i, n, o, u, p, v), E = i.text.indexOf("​") >= 0;
24535        let k = 0;
24536        for (let B = 0; B < i.length(); B++) {
24537          const V = i.getSection(B), q = i.getCharCode(B);
24538          if (cp[q] || (k += W0(q, V, u, p, n, v)), B < i.length() - 1) {
24539            const W = !((L = q) < 11904) && (!!Sr["CJK Compatibility Forms"](L) || !!Sr["CJK Compatibility"](L) || !!Sr["CJK Strokes"](L) || !!Sr["CJK Symbols and Punctuation"](L) || !!Sr["Enclosed CJK Letters and Months"](L) || !!Sr["Halfwidth and Fullwidth Forms"](L) || !!Sr["Ideographic Description Characters"](L) || !!Sr["Vertical Forms"](L) || Gd.test(String.fromCodePoint(L)));
24540            (LO[q] || W || V.imageName || B !== i.length() - 2 && FO[i.getCharCode(B + 1)]) && b.push(X0(B + 1, k, x, b, zO(q, i.getCharCode(B + 1), W && E), !1));
24541          }
24542        }
24543        var L;
24544        return J0(X0(i.length(), k, x, b, 0, !0));
24545      }
24546      function Ay(i) {
24547        let n = 0.5, o = 0.5;
24548        switch (i) {
24549          case "right":
24550          case "top-right":
24551          case "bottom-right":
24552            n = 1;
24553            break;
24554          case "left":
24555          case "top-left":
24556          case "bottom-left":
24557            n = 0;
24558        }
24559        switch (i) {
24560          case "bottom":
24561          case "bottom-right":
24562          case "bottom-left":
24563            o = 1;
24564            break;
24565          case "top":
24566          case "top-right":
24567          case "top-left":
24568            o = 0;
24569        }
24570        return { horizontalAlign: n, verticalAlign: o };
24571      }
24572      function BO(i, n, o, u, p) {
24573        if (!u && !p) return;
24574        const v = i[o], b = (i[o].x + v.metrics.advance * v.scale) * u;
24575        for (let x = n; x <= o; x++) i[x].x -= b, i[x].y += p;
24576      }
24577      function NO(i, n, o) {
24578        const { horizontalAlign: u, verticalAlign: p } = Ay(o), v = n[0] - i.displaySize[0] * u, b = n[1] - i.displaySize[1] * p;
24579        return { image: i, top: b, bottom: b + i.displaySize[1], left: v, right: v + i.displaySize[0] };
24580      }
24581      function Y0(i) {
24582        var n, o;
24583        let u = i.left, p = i.top, v = i.right - u, b = i.bottom - p;
24584        const x = (n = i.image.textFitWidth) !== null && n !== void 0 ? n : "stretchOrShrink", E = (o = i.image.textFitHeight) !== null && o !== void 0 ? o : "stretchOrShrink", k = (i.image.content[2] - i.image.content[0]) / (i.image.content[3] - i.image.content[1]);
24585        if (E === "proportional") {
24586          if (x === "stretchOnly" && v / b < k || x === "proportional") {
24587            const L = Math.ceil(b * k);
24588            u *= L / v, v = L;
24589          }
24590        } else if (x === "proportional" && E === "stretchOnly" && k !== 0 && v / b > k) {
24591          const L = Math.ceil(v / k);
24592          p *= L / b, b = L;
24593        }
24594        return { x1: u, y1: p, x2: u + v, y2: p + b };
24595      }
24596      function Q0(i, n, o, u, p, v) {
24597        const b = i.image;
24598        let x;
24599        if (b.content) {
24600          const oe = b.content, he = b.pixelRatio || 1;
24601          x = [oe[0] / he, oe[1] / he, b.displaySize[0] - oe[2] / he, b.displaySize[1] - oe[3] / he];
24602        }
24603        const E = n.left * v, k = n.right * v;
24604        let L, B, V, q;
24605        o === "width" || o === "both" ? (q = p[0] + E - u[3], B = p[0] + k + u[1]) : (q = p[0] + (E + k - b.displaySize[0]) / 2, B = q + b.displaySize[0]);
24606        const W = n.top * v, Y = n.bottom * v;
24607        return o === "height" || o === "both" ? (L = p[1] + W - u[0], V = p[1] + Y + u[2]) : (L = p[1] + (W + Y - b.displaySize[1]) / 2, V = L + b.displaySize[1]), { image: b, top: L, right: B, bottom: V, left: q, collisionPadding: x };
24608      }
24609      const xf = 255, aa = 128, zl = xf * aa;
24610      function e1(i, n) {
24611        const { expression: o } = n;
24612        if (o.kind === "constant") return { kind: "constant", layoutSize: o.evaluate(new gn(i + 1)) };
24613        if (o.kind === "source") return { kind: "source" };
24614        {
24615          const { zoomStops: u, interpolationType: p } = o;
24616          let v = 0;
24617          for (; v < u.length && u[v] <= i; ) v++;
24618          v = Math.max(0, v - 1);
24619          let b = v;
24620          for (; b < u.length && u[b] < i + 1; ) b++;
24621          b = Math.min(u.length - 1, b);
24622          const x = u[v], E = u[b];
24623          return o.kind === "composite" ? { kind: "composite", minZoom: x, maxZoom: E, interpolationType: p } : { kind: "camera", minZoom: x, maxZoom: E, minSize: o.evaluate(new gn(x)), maxSize: o.evaluate(new gn(E)), interpolationType: p };
24624        }
24625      }
24626      function Cy(i, n, o) {
24627        let u = "never";
24628        const p = i.get(n);
24629        return p ? u = p : i.get(o) && (u = "always"), u;
24630      }
24631      const $O = Ll.VectorTileFeature.types, jO = [{ name: "a_fade_opacity", components: 1, type: "Uint8", offset: 0 }];
24632      function up(i, n, o, u, p, v, b, x, E, k, L, B, V) {
24633        const q = x ? Math.min(zl, Math.round(x[0])) : 0, W = x ? Math.min(zl, Math.round(x[1])) : 0;
24634        i.emplaceBack(n, o, Math.round(32 * u), Math.round(32 * p), v, b, (q << 1) + (E ? 1 : 0), W, 16 * k, 16 * L, 256 * B, 256 * V);
24635      }
24636      function Iy(i, n, o) {
24637        i.emplaceBack(n.x, n.y, o), i.emplaceBack(n.x, n.y, o), i.emplaceBack(n.x, n.y, o), i.emplaceBack(n.x, n.y, o);
24638      }
24639      function VO(i) {
24640        for (const n of i.sections) if (ry(n.text)) return !0;
24641        return !1;
24642      }
24643      class Py {
24644        constructor(n) {
24645          this.layoutVertexArray = new Iu(), this.indexArray = new Hs(), this.programConfigurations = n, this.segments = new Tr(), this.dynamicLayoutVertexArray = new lf(), this.opacityVertexArray = new Ss(), this.hasVisibleVertices = !1, this.placedSymbolArray = new yn();
24646        }
24647        isEmpty() {
24648          return this.layoutVertexArray.length === 0 && this.indexArray.length === 0 && this.dynamicLayoutVertexArray.length === 0 && this.opacityVertexArray.length === 0;
24649        }
24650        upload(n, o, u, p) {
24651          this.isEmpty() || (u && (this.layoutVertexBuffer = n.createVertexBuffer(this.layoutVertexArray, _O.members), this.indexBuffer = n.createIndexBuffer(this.indexArray, o), this.dynamicLayoutVertexBuffer = n.createVertexBuffer(this.dynamicLayoutVertexArray, vO.members, !0), this.opacityVertexBuffer = n.createVertexBuffer(this.opacityVertexArray, jO, !0), this.opacityVertexBuffer.itemSize = 1), (u || p) && this.programConfigurations.upload(n));
24652        }
24653        destroy() {
24654          this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.programConfigurations.destroy(), this.segments.destroy(), this.dynamicLayoutVertexBuffer.destroy(), this.opacityVertexBuffer.destroy());
24655        }
24656      }
24657      Mt("SymbolBuffers", Py);
24658      class My {
24659        constructor(n, o, u) {
24660          this.layoutVertexArray = new n(), this.layoutAttributes = o, this.indexArray = new u(), this.segments = new Tr(), this.collisionVertexArray = new sa();
24661        }
24662        upload(n) {
24663          this.layoutVertexBuffer = n.createVertexBuffer(this.layoutVertexArray, this.layoutAttributes), this.indexBuffer = n.createIndexBuffer(this.indexArray), this.collisionVertexBuffer = n.createVertexBuffer(this.collisionVertexArray, bO.members, !0);
24664        }
24665        destroy() {
24666          this.layoutVertexBuffer && (this.layoutVertexBuffer.destroy(), this.indexBuffer.destroy(), this.segments.destroy(), this.collisionVertexBuffer.destroy());
24667        }
24668      }
24669      Mt("CollisionBuffers", My);
24670      class $u {
24671        constructor(n) {
24672          this.collisionBoxArray = n.collisionBoxArray, this.zoom = n.zoom, this.overscaling = n.overscaling, this.layers = n.layers, this.layerIds = this.layers.map((b) => b.id), this.index = n.index, this.pixelRatio = n.pixelRatio, this.sourceLayerIndex = n.sourceLayerIndex, this.hasPattern = !1, this.hasRTLText = !1, this.sortKeyRanges = [], this.collisionCircleArray = [], this.placementInvProjMatrix = cy([]), this.placementViewportMatrix = cy([]);
24673          const o = this.layers[0]._unevaluatedLayout._values;
24674          this.textSizeData = e1(this.zoom, o["text-size"]), this.iconSizeData = e1(this.zoom, o["icon-size"]);
24675          const u = this.layers[0].layout, p = u.get("symbol-sort-key"), v = u.get("symbol-z-order");
24676          this.canOverlap = Cy(u, "text-overlap", "text-allow-overlap") !== "never" || Cy(u, "icon-overlap", "icon-allow-overlap") !== "never" || u.get("text-ignore-placement") || u.get("icon-ignore-placement"), this.sortFeaturesByKey = v !== "viewport-y" && !p.isConstant(), this.sortFeaturesByY = (v === "viewport-y" || v === "auto" && !this.sortFeaturesByKey) && this.canOverlap, u.get("symbol-placement") === "point" && (this.writingModes = u.get("text-writing-mode").map((b) => m.ah[b])), this.stateDependentLayerIds = this.layers.filter((b) => b.isStateDependent()).map((b) => b.id), this.sourceID = n.sourceID;
24677        }
24678        createArrays() {
24679          this.text = new Py(new Ic(this.layers, this.zoom, (n) => /^text/.test(n))), this.icon = new Py(new Ic(this.layers, this.zoom, (n) => /^icon/.test(n))), this.glyphOffsetArray = new _n(), this.lineVertexArray = new _i(), this.symbolInstances = new xr(), this.textAnchorOffsets = new vn();
24680        }
24681        calculateGlyphDependencies(n, o, u, p, v) {
24682          for (let b = 0; b < n.length; b++) if (o[n.charCodeAt(b)] = !0, (u || p) && v) {
24683            const x = _f[n.charAt(b)];
24684            x && (o[x.charCodeAt(0)] = !0);
24685          }
24686        }
24687        populate(n, o, u) {
24688          const p = this.layers[0], v = p.layout, b = v.get("text-font"), x = v.get("text-field"), E = v.get("icon-image"), k = (x.value.kind !== "constant" || x.value.value instanceof zr && !x.value.value.isEmpty() || x.value.value.toString().length > 0) && (b.value.kind !== "constant" || b.value.value.length > 0), L = E.value.kind !== "constant" || !!E.value.value || Object.keys(E.parameters).length > 0, B = v.get("symbol-sort-key");
24689          if (this.features = [], !k && !L) return;
24690          const V = o.iconDependencies, q = o.glyphDependencies, W = o.availableImages, Y = new gn(this.zoom);
24691          for (const { feature: oe, id: he, index: De, sourceLayerIndex: xe } of n) {
24692            const ke = p._featureFilter.needGeometry, Ve = Mc(oe, ke);
24693            if (!p._featureFilter.filter(Y, Ve, u)) continue;
24694            let at, At;
24695            if (ke || (Ve.geometry = Pc(oe)), k) {
24696              const St = p.getValueAndResolveTokens("text-field", Ve, u, W), _t = zr.factory(St), $t = this.hasRTLText = this.hasRTLText || VO(_t);
24697              (!$t || cs.getRTLTextPluginStatus() === "unavailable" || $t && cs.isParsed()) && (at = wO(_t, p, Ve));
24698            }
24699            if (L) {
24700              const St = p.getValueAndResolveTokens("icon-image", Ve, u, W);
24701              At = St instanceof Sn ? St : Sn.fromString(St);
24702            }
24703            if (!at && !At) continue;
24704            const Kt = this.sortFeaturesByKey ? B.evaluate(Ve, {}, u) : void 0;
24705            if (this.features.push({ id: he, text: at, icon: At, index: De, sourceLayerIndex: xe, geometry: Ve.geometry, properties: oe.properties, type: $O[oe.type], sortKey: Kt }), At && (V[At.name] = !0), at) {
24706              const St = b.evaluate(Ve, {}, u).join(","), _t = v.get("text-rotation-alignment") !== "viewport" && v.get("symbol-placement") !== "point";
24707              this.allowVerticalPlacement = this.writingModes && this.writingModes.indexOf(m.ah.vertical) >= 0;
24708              for (const $t of at.sections) if ($t.image) V[$t.image.name] = !0;
24709              else {
24710                const Ot = rf(at.toString()), It = $t.fontStack || St, Ke = q[It] = q[It] || {};
24711                this.calculateGlyphDependencies($t.text, Ke, _t, this.allowVerticalPlacement, Ot);
24712              }
24713            }
24714          }
24715          v.get("symbol-placement") === "line" && (this.features = function(oe) {
24716            const he = {}, De = {}, xe = [];
24717            let ke = 0;
24718            function Ve(St) {
24719              xe.push(oe[St]), ke++;
24720            }
24721            function at(St, _t, $t) {
24722              const Ot = De[St];
24723              return delete De[St], De[_t] = Ot, xe[Ot].geometry[0].pop(), xe[Ot].geometry[0] = xe[Ot].geometry[0].concat($t[0]), Ot;
24724            }
24725            function At(St, _t, $t) {
24726              const Ot = he[_t];
24727              return delete he[_t], he[St] = Ot, xe[Ot].geometry[0].shift(), xe[Ot].geometry[0] = $t[0].concat(xe[Ot].geometry[0]), Ot;
24728            }
24729            function Kt(St, _t, $t) {
24730              const Ot = $t ? _t[0][_t[0].length - 1] : _t[0][0];
24731              return `${St}:${Ot.x}:${Ot.y}`;
24732            }
24733            for (let St = 0; St < oe.length; St++) {
24734              const _t = oe[St], $t = _t.geometry, Ot = _t.text ? _t.text.toString() : null;
24735              if (!Ot) {
24736                Ve(St);
24737                continue;
24738              }
24739              const It = Kt(Ot, $t), Ke = Kt(Ot, $t, !0);
24740              if (It in De && Ke in he && De[It] !== he[Ke]) {
24741                const Vt = At(It, Ke, $t), Bt = at(It, Ke, xe[Vt].geometry);
24742                delete he[It], delete De[Ke], De[Kt(Ot, xe[Bt].geometry, !0)] = Bt, xe[Vt].geometry = null;
24743              } else It in De ? at(It, Ke, $t) : Ke in he ? At(It, Ke, $t) : (Ve(St), he[It] = ke - 1, De[Ke] = ke - 1);
24744            }
24745            return xe.filter((St) => St.geometry);
24746          }(this.features)), this.sortFeaturesByKey && this.features.sort((oe, he) => oe.sortKey - he.sortKey);
24747        }
24748        update(n, o, u) {
24749          this.stateDependentLayers.length && (this.text.programConfigurations.updatePaintArrays(n, o, this.layers, u), this.icon.programConfigurations.updatePaintArrays(n, o, this.layers, u));
24750        }
24751        isEmpty() {
24752          return this.symbolInstances.length === 0 && !this.hasRTLText;
24753        }
24754        uploadPending() {
24755          return !this.uploaded || this.text.programConfigurations.needsUpload || this.icon.programConfigurations.needsUpload;
24756        }
24757        upload(n) {
24758          !this.uploaded && this.hasDebugData() && (this.textCollisionBox.upload(n), this.iconCollisionBox.upload(n)), this.text.upload(n, this.sortFeaturesByY, !this.uploaded, this.text.programConfigurations.needsUpload), this.icon.upload(n, this.sortFeaturesByY, !this.uploaded, this.icon.programConfigurations.needsUpload), this.uploaded = !0;
24759        }
24760        destroyDebugData() {
24761          this.textCollisionBox.destroy(), this.iconCollisionBox.destroy();
24762        }
24763        destroy() {
24764          this.text.destroy(), this.icon.destroy(), this.hasDebugData() && this.destroyDebugData();
24765        }
24766        addToLineVertexArray(n, o) {
24767          const u = this.lineVertexArray.length;
24768          if (n.segment !== void 0) {
24769            let p = n.dist(o[n.segment + 1]), v = n.dist(o[n.segment]);
24770            const b = {};
24771            for (let x = n.segment + 1; x < o.length; x++) b[x] = { x: o[x].x, y: o[x].y, tileUnitDistanceFromAnchor: p }, x < o.length - 1 && (p += o[x + 1].dist(o[x]));
24772            for (let x = n.segment || 0; x >= 0; x--) b[x] = { x: o[x].x, y: o[x].y, tileUnitDistanceFromAnchor: v }, x > 0 && (v += o[x - 1].dist(o[x]));
24773            for (let x = 0; x < o.length; x++) {
24774              const E = b[x];
24775              this.lineVertexArray.emplaceBack(E.x, E.y, E.tileUnitDistanceFromAnchor);
24776            }
24777          }
24778          return { lineStartIndex: u, lineLength: this.lineVertexArray.length - u };
24779        }
24780        addSymbols(n, o, u, p, v, b, x, E, k, L, B, V) {
24781          const q = n.indexArray, W = n.layoutVertexArray, Y = n.segments.prepareSegment(4 * o.length, W, q, this.canOverlap ? b.sortKey : void 0), oe = this.glyphOffsetArray.length, he = Y.vertexLength, De = this.allowVerticalPlacement && x === m.ah.vertical ? Math.PI / 2 : 0, xe = b.text && b.text.sections;
24782          for (let ke = 0; ke < o.length; ke++) {
24783            const { tl: Ve, tr: at, bl: At, br: Kt, tex: St, pixelOffsetTL: _t, pixelOffsetBR: $t, minFontScaleX: Ot, minFontScaleY: It, glyphOffset: Ke, isSDF: Vt, sectionIndex: Bt } = o[ke], nr = Y.vertexLength, on = Ke[1];
24784            up(W, E.x, E.y, Ve.x, on + Ve.y, St.x, St.y, u, Vt, _t.x, _t.y, Ot, It), up(W, E.x, E.y, at.x, on + at.y, St.x + St.w, St.y, u, Vt, $t.x, _t.y, Ot, It), up(W, E.x, E.y, At.x, on + At.y, St.x, St.y + St.h, u, Vt, _t.x, $t.y, Ot, It), up(W, E.x, E.y, Kt.x, on + Kt.y, St.x + St.w, St.y + St.h, u, Vt, $t.x, $t.y, Ot, It), Iy(n.dynamicLayoutVertexArray, E, De), q.emplaceBack(nr, nr + 1, nr + 2), q.emplaceBack(nr + 1, nr + 2, nr + 3), Y.vertexLength += 4, Y.primitiveLength += 2, this.glyphOffsetArray.emplaceBack(Ke[0]), ke !== o.length - 1 && Bt === o[ke + 1].sectionIndex || n.programConfigurations.populatePaintArrays(W.length, b, b.index, {}, V, xe && xe[Bt]);
24785          }
24786          n.placedSymbolArray.emplaceBack(E.x, E.y, oe, this.glyphOffsetArray.length - oe, he, k, L, E.segment, u ? u[0] : 0, u ? u[1] : 0, p[0], p[1], x, 0, !1, 0, B);
24787        }
24788        _addCollisionDebugVertex(n, o, u, p, v, b) {
24789          return o.emplaceBack(0, 0), n.emplaceBack(u.x, u.y, p, v, Math.round(b.x), Math.round(b.y));
24790        }
24791        addCollisionDebugVertices(n, o, u, p, v, b, x) {
24792          const E = v.segments.prepareSegment(4, v.layoutVertexArray, v.indexArray), k = E.vertexLength, L = v.layoutVertexArray, B = v.collisionVertexArray, V = x.anchorX, q = x.anchorY;
24793          this._addCollisionDebugVertex(L, B, b, V, q, new R(n, o)), this._addCollisionDebugVertex(L, B, b, V, q, new R(u, o)), this._addCollisionDebugVertex(L, B, b, V, q, new R(u, p)), this._addCollisionDebugVertex(L, B, b, V, q, new R(n, p)), E.vertexLength += 4;
24794          const W = v.indexArray;
24795          W.emplaceBack(k, k + 1), W.emplaceBack(k + 1, k + 2), W.emplaceBack(k + 2, k + 3), W.emplaceBack(k + 3, k), E.primitiveLength += 4;
24796        }
24797        addDebugCollisionBoxes(n, o, u, p) {
24798          for (let v = n; v < o; v++) {
24799            const b = this.collisionBoxArray.get(v);
24800            this.addCollisionDebugVertices(b.x1, b.y1, b.x2, b.y2, p ? this.textCollisionBox : this.iconCollisionBox, b.anchorPoint, u);
24801          }
24802        }
24803        generateCollisionDebugBuffers() {
24804          this.hasDebugData() && this.destroyDebugData(), this.textCollisionBox = new My(Ts, z0.members, oi), this.iconCollisionBox = new My(Ts, z0.members, oi);
24805          for (let n = 0; n < this.symbolInstances.length; n++) {
24806            const o = this.symbolInstances.get(n);
24807            this.addDebugCollisionBoxes(o.textBoxStartIndex, o.textBoxEndIndex, o, !0), this.addDebugCollisionBoxes(o.verticalTextBoxStartIndex, o.verticalTextBoxEndIndex, o, !0), this.addDebugCollisionBoxes(o.iconBoxStartIndex, o.iconBoxEndIndex, o, !1), this.addDebugCollisionBoxes(o.verticalIconBoxStartIndex, o.verticalIconBoxEndIndex, o, !1);
24808          }
24809        }
24810        _deserializeCollisionBoxesForSymbol(n, o, u, p, v, b, x, E, k) {
24811          const L = {};
24812          for (let B = o; B < u; B++) {
24813            const V = n.get(B);
24814            L.textBox = { x1: V.x1, y1: V.y1, x2: V.x2, y2: V.y2, anchorPointX: V.anchorPointX, anchorPointY: V.anchorPointY }, L.textFeatureIndex = V.featureIndex;
24815            break;
24816          }
24817          for (let B = p; B < v; B++) {
24818            const V = n.get(B);
24819            L.verticalTextBox = { x1: V.x1, y1: V.y1, x2: V.x2, y2: V.y2, anchorPointX: V.anchorPointX, anchorPointY: V.anchorPointY }, L.verticalTextFeatureIndex = V.featureIndex;
24820            break;
24821          }
24822          for (let B = b; B < x; B++) {
24823            const V = n.get(B);
24824            L.iconBox = { x1: V.x1, y1: V.y1, x2: V.x2, y2: V.y2, anchorPointX: V.anchorPointX, anchorPointY: V.anchorPointY }, L.iconFeatureIndex = V.featureIndex;
24825            break;
24826          }
24827          for (let B = E; B < k; B++) {
24828            const V = n.get(B);
24829            L.verticalIconBox = { x1: V.x1, y1: V.y1, x2: V.x2, y2: V.y2, anchorPointX: V.anchorPointX, anchorPointY: V.anchorPointY }, L.verticalIconFeatureIndex = V.featureIndex;
24830            break;
24831          }
24832          return L;
24833        }
24834        deserializeCollisionBoxes(n) {
24835          this.collisionArrays = [];
24836          for (let o = 0; o < this.symbolInstances.length; o++) {
24837            const u = this.symbolInstances.get(o);
24838            this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(n, u.textBoxStartIndex, u.textBoxEndIndex, u.verticalTextBoxStartIndex, u.verticalTextBoxEndIndex, u.iconBoxStartIndex, u.iconBoxEndIndex, u.verticalIconBoxStartIndex, u.verticalIconBoxEndIndex));
24839          }
24840        }
24841        hasTextData() {
24842          return this.text.segments.get().length > 0;
24843        }
24844        hasIconData() {
24845          return this.icon.segments.get().length > 0;
24846        }
24847        hasDebugData() {
24848          return this.textCollisionBox && this.iconCollisionBox;
24849        }
24850        hasTextCollisionBoxData() {
24851          return this.hasDebugData() && this.textCollisionBox.segments.get().length > 0;
24852        }
24853        hasIconCollisionBoxData() {
24854          return this.hasDebugData() && this.iconCollisionBox.segments.get().length > 0;
24855        }
24856        addIndicesForPlacedSymbol(n, o) {
24857          const u = n.placedSymbolArray.get(o), p = u.vertexStartIndex + 4 * u.numGlyphs;
24858          for (let v = u.vertexStartIndex; v < p; v += 4) n.indexArray.emplaceBack(v, v + 1, v + 2), n.indexArray.emplaceBack(v + 1, v + 2, v + 3);
24859        }
24860        getSortedSymbolIndexes(n) {
24861          if (this.sortedAngle === n && this.symbolInstanceIndexes !== void 0) return this.symbolInstanceIndexes;
24862          const o = Math.sin(n), u = Math.cos(n), p = [], v = [], b = [];
24863          for (let x = 0; x < this.symbolInstances.length; ++x) {
24864            b.push(x);
24865            const E = this.symbolInstances.get(x);
24866            p.push(0 | Math.round(o * E.anchorX + u * E.anchorY)), v.push(E.featureIndex);
24867          }
24868          return b.sort((x, E) => p[x] - p[E] || v[E] - v[x]), b;
24869        }
24870        addToSortKeyRanges(n, o) {
24871          const u = this.sortKeyRanges[this.sortKeyRanges.length - 1];
24872          u && u.sortKey === o ? u.symbolInstanceEnd = n + 1 : this.sortKeyRanges.push({ sortKey: o, symbolInstanceStart: n, symbolInstanceEnd: n + 1 });
24873        }
24874        sortFeatures(n) {
24875          if (this.sortFeaturesByY && this.sortedAngle !== n && !(this.text.segments.get().length > 1 || this.icon.segments.get().length > 1)) {
24876            this.symbolInstanceIndexes = this.getSortedSymbolIndexes(n), this.sortedAngle = n, this.text.indexArray.clear(), this.icon.indexArray.clear(), this.featureSortOrder = [];
24877            for (const o of this.symbolInstanceIndexes) {
24878              const u = this.symbolInstances.get(o);
24879              this.featureSortOrder.push(u.featureIndex), [u.rightJustifiedTextSymbolIndex, u.centerJustifiedTextSymbolIndex, u.leftJustifiedTextSymbolIndex].forEach((p, v, b) => {
24880                p >= 0 && b.indexOf(p) === v && this.addIndicesForPlacedSymbol(this.text, p);
24881              }), u.verticalPlacedTextSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.text, u.verticalPlacedTextSymbolIndex), u.placedIconSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.icon, u.placedIconSymbolIndex), u.verticalPlacedIconSymbolIndex >= 0 && this.addIndicesForPlacedSymbol(this.icon, u.verticalPlacedIconSymbolIndex);
24882            }
24883            this.text.indexBuffer && this.text.indexBuffer.updateData(this.text.indexArray), this.icon.indexBuffer && this.icon.indexBuffer.updateData(this.icon.indexArray);
24884          }
24885        }
24886      }
24887      let t1, r1;
24888      Mt("SymbolBucket", $u, { omit: ["layers", "collisionBoxArray", "features", "compareText"] }), $u.MAX_GLYPHS = 65535, $u.addDynamicAttributes = Iy;
24889      var ky = { get paint() {
24890        return r1 = r1 || new _({ "icon-opacity": new Xt(re.paint_symbol["icon-opacity"]), "icon-color": new Xt(re.paint_symbol["icon-color"]), "icon-halo-color": new Xt(re.paint_symbol["icon-halo-color"]), "icon-halo-width": new Xt(re.paint_symbol["icon-halo-width"]), "icon-halo-blur": new Xt(re.paint_symbol["icon-halo-blur"]), "icon-translate": new Lt(re.paint_symbol["icon-translate"]), "icon-translate-anchor": new Lt(re.paint_symbol["icon-translate-anchor"]), "text-opacity": new Xt(re.paint_symbol["text-opacity"]), "text-color": new Xt(re.paint_symbol["text-color"], { runtimeType: Ir, getOverride: (i) => i.textColor, hasOverride: (i) => !!i.textColor }), "text-halo-color": new Xt(re.paint_symbol["text-halo-color"]), "text-halo-width": new Xt(re.paint_symbol["text-halo-width"]), "text-halo-blur": new Xt(re.paint_symbol["text-halo-blur"]), "text-translate": new Lt(re.paint_symbol["text-translate"]), "text-translate-anchor": new Lt(re.paint_symbol["text-translate-anchor"]) });
24891      }, get layout() {
24892        return t1 = t1 || new _({ "symbol-placement": new Lt(re.layout_symbol["symbol-placement"]), "symbol-spacing": new Lt(re.layout_symbol["symbol-spacing"]), "symbol-avoid-edges": new Lt(re.layout_symbol["symbol-avoid-edges"]), "symbol-sort-key": new Xt(re.layout_symbol["symbol-sort-key"]), "symbol-z-order": new Lt(re.layout_symbol["symbol-z-order"]), "icon-allow-overlap": new Lt(re.layout_symbol["icon-allow-overlap"]), "icon-overlap": new Lt(re.layout_symbol["icon-overlap"]), "icon-ignore-placement": new Lt(re.layout_symbol["icon-ignore-placement"]), "icon-optional": new Lt(re.layout_symbol["icon-optional"]), "icon-rotation-alignment": new Lt(re.layout_symbol["icon-rotation-alignment"]), "icon-size": new Xt(re.layout_symbol["icon-size"]), "icon-text-fit": new Lt(re.layout_symbol["icon-text-fit"]), "icon-text-fit-padding": new Lt(re.layout_symbol["icon-text-fit-padding"]), "icon-image": new Xt(re.layout_symbol["icon-image"]), "icon-rotate": new Xt(re.layout_symbol["icon-rotate"]), "icon-padding": new Xt(re.layout_symbol["icon-padding"]), "icon-keep-upright": new Lt(re.layout_symbol["icon-keep-upright"]), "icon-offset": new Xt(re.layout_symbol["icon-offset"]), "icon-anchor": new Xt(re.layout_symbol["icon-anchor"]), "icon-pitch-alignment": new Lt(re.layout_symbol["icon-pitch-alignment"]), "text-pitch-alignment": new Lt(re.layout_symbol["text-pitch-alignment"]), "text-rotation-alignment": new Lt(re.layout_symbol["text-rotation-alignment"]), "text-field": new Xt(re.layout_symbol["text-field"]), "text-font": new Xt(re.layout_symbol["text-font"]), "text-size": new Xt(re.layout_symbol["text-size"]), "text-max-width": new Xt(re.layout_symbol["text-max-width"]), "text-line-height": new Lt(re.layout_symbol["text-line-height"]), "text-letter-spacing": new Xt(re.layout_symbol["text-letter-spacing"]), "text-justify": new Xt(re.layout_symbol["text-justify"]), "text-radial-offset": new Xt(re.layout_symbol["text-radial-offset"]), "text-variable-anchor": new Lt(re.layout_symbol["text-variable-anchor"]), "text-variable-anchor-offset": new Xt(re.layout_symbol["text-variable-anchor-offset"]), "text-anchor": new Xt(re.layout_symbol["text-anchor"]), "text-max-angle": new Lt(re.layout_symbol["text-max-angle"]), "text-writing-mode": new Lt(re.layout_symbol["text-writing-mode"]), "text-rotate": new Xt(re.layout_symbol["text-rotate"]), "text-padding": new Lt(re.layout_symbol["text-padding"]), "text-keep-upright": new Lt(re.layout_symbol["text-keep-upright"]), "text-transform": new Xt(re.layout_symbol["text-transform"]), "text-offset": new Xt(re.layout_symbol["text-offset"]), "text-allow-overlap": new Lt(re.layout_symbol["text-allow-overlap"]), "text-overlap": new Lt(re.layout_symbol["text-overlap"]), "text-ignore-placement": new Lt(re.layout_symbol["text-ignore-placement"]), "text-optional": new Lt(re.layout_symbol["text-optional"]) });
24893      } };
24894      class n1 {
24895        constructor(n) {
24896          if (n.property.overrides === void 0) throw new Error("overrides must be provided to instantiate FormatSectionOverride class");
24897          this.type = n.property.overrides ? n.property.overrides.runtimeType : wn, this.defaultValue = n;
24898        }
24899        evaluate(n) {
24900          if (n.formattedSection) {
24901            const o = this.defaultValue.property.overrides;
24902            if (o && o.hasOverride(n.formattedSection)) return o.getOverride(n.formattedSection);
24903          }
24904          return n.feature && n.featureState ? this.defaultValue.evaluate(n.feature, n.featureState) : this.defaultValue.property.specification.default;
24905        }
24906        eachChild(n) {
24907          this.defaultValue.isConstant() || n(this.defaultValue.value._styleExpression.expression);
24908        }
24909        outputDefined() {
24910          return !1;
24911        }
24912        serialize() {
24913          return null;
24914        }
24915      }
24916      Mt("FormatSectionOverride", n1, { omit: ["defaultValue"] });
24917      class hp extends a {
24918        constructor(n) {
24919          super(n, ky);
24920        }
24921        recalculate(n, o) {
24922          if (super.recalculate(n, o), this.layout.get("icon-rotation-alignment") === "auto" && (this.layout._values["icon-rotation-alignment"] = this.layout.get("symbol-placement") !== "point" ? "map" : "viewport"), this.layout.get("text-rotation-alignment") === "auto" && (this.layout._values["text-rotation-alignment"] = this.layout.get("symbol-placement") !== "point" ? "map" : "viewport"), this.layout.get("text-pitch-alignment") === "auto" && (this.layout._values["text-pitch-alignment"] = this.layout.get("text-rotation-alignment") === "map" ? "map" : "viewport"), this.layout.get("icon-pitch-alignment") === "auto" && (this.layout._values["icon-pitch-alignment"] = this.layout.get("icon-rotation-alignment")), this.layout.get("symbol-placement") === "point") {
24923            const u = this.layout.get("text-writing-mode");
24924            if (u) {
24925              const p = [];
24926              for (const v of u) p.indexOf(v) < 0 && p.push(v);
24927              this.layout._values["text-writing-mode"] = p;
24928            } else this.layout._values["text-writing-mode"] = ["horizontal"];
24929          }
24930          this._setPaintOverrides();
24931        }
24932        getValueAndResolveTokens(n, o, u, p) {
24933          const v = this.layout.get(n).evaluate(o, {}, u, p), b = this._unevaluatedLayout._values[n];
24934          return b.isDataDriven() || En(b.value) || !v ? v : function(x, E) {
24935            return E.replace(/{([^{}]+)}/g, (k, L) => x && L in x ? String(x[L]) : "");
24936          }(o.properties, v);
24937        }
24938        createBucket(n) {
24939          return new $u(n);
24940        }
24941        queryRadius() {
24942          return 0;
24943        }
24944        queryIntersectsFeature() {
24945          throw new Error("Should take a different path in FeatureIndex");
24946        }
24947        _setPaintOverrides() {
24948          for (const n of ky.paint.overridableProperties) {
24949            if (!hp.hasPaintOverride(this.layout, n)) continue;
24950            const o = this.paint.get(n), u = new n1(o), p = new Tn(u, o.property.specification);
24951            let v = null;
24952            v = o.value.kind === "constant" || o.value.kind === "source" ? new gi("source", p) : new On("composite", p, o.value.zoomStops), this.paint._values[n] = new yo(o.property, v, o.parameters);
24953          }
24954        }
24955        _handleOverridablePaintPropertyUpdate(n, o, u) {
24956          return !(!this.layout || o.isDataDriven() || u.isDataDriven()) && hp.hasPaintOverride(this.layout, n);
24957        }
24958        static hasPaintOverride(n, o) {
24959          const u = n.get("text-field"), p = ky.paint.properties[o];
24960          let v = !1;
24961          const b = (x) => {
24962            for (const E of x) if (p.overrides && p.overrides.hasOverride(E)) return void (v = !0);
24963          };
24964          if (u.value.kind === "constant" && u.value.value instanceof zr) b(u.value.value.sections);
24965          else if (u.value.kind === "source") {
24966            const x = (k) => {
24967              v || (k instanceof rs && rn(k.value) === zi ? b(k.value.sections) : k instanceof Pa ? b(k.sections) : k.eachChild(x));
24968            }, E = u.value;
24969            E._styleExpression && x(E._styleExpression.expression);
24970          }
24971          return v;
24972        }
24973      }
24974      let i1;
24975      var UO = { get paint() {
24976        return i1 = i1 || new _({ "background-color": new Lt(re.paint_background["background-color"]), "background-pattern": new Au(re.paint_background["background-pattern"]), "background-opacity": new Lt(re.paint_background["background-opacity"]) });
24977      } };
24978      class qO extends a {
24979        constructor(n) {
24980          super(n, UO);
24981        }
24982      }
24983      let s1;
24984      var HO = { get paint() {
24985        return s1 = s1 || new _({ "raster-opacity": new Lt(re.paint_raster["raster-opacity"]), "raster-hue-rotate": new Lt(re.paint_raster["raster-hue-rotate"]), "raster-brightness-min": new Lt(re.paint_raster["raster-brightness-min"]), "raster-brightness-max": new Lt(re.paint_raster["raster-brightness-max"]), "raster-saturation": new Lt(re.paint_raster["raster-saturation"]), "raster-contrast": new Lt(re.paint_raster["raster-contrast"]), "raster-resampling": new Lt(re.paint_raster["raster-resampling"]), "raster-fade-duration": new Lt(re.paint_raster["raster-fade-duration"]) });
24986      } };
24987      class GO extends a {
24988        constructor(n) {
24989          super(n, HO);
24990        }
24991      }
24992      class ZO extends a {
24993        constructor(n) {
24994          super(n, {}), this.onAdd = (o) => {
24995            this.implementation.onAdd && this.implementation.onAdd(o, o.painter.context.gl);
24996          }, this.onRemove = (o) => {
24997            this.implementation.onRemove && this.implementation.onRemove(o, o.painter.context.gl);
24998          }, this.implementation = n;
24999        }
25000        is3D() {
25001          return this.implementation.renderingMode === "3d";
25002        }
25003        hasOffscreenPass() {
25004          return this.implementation.prerender !== void 0;
25005        }
25006        recalculate() {
25007        }
25008        updateTransitions() {
25009        }
25010        hasTransition() {
25011          return !1;
25012        }
25013        serialize() {
25014          throw new Error("Custom layers cannot be serialized");
25015        }
25016      }
25017      class WO {
25018        constructor(n) {
25019          this._methodToThrottle = n, this._triggered = !1, typeof MessageChannel < "u" && (this._channel = new MessageChannel(), this._channel.port2.onmessage = () => {
25020            this._triggered = !1, this._methodToThrottle();
25021          });
25022        }
25023        trigger() {
25024          this._triggered || (this._triggered = !0, this._channel ? this._channel.port1.postMessage(!0) : setTimeout(() => {
25025            this._triggered = !1, this._methodToThrottle();
25026          }, 0));
25027        }
25028        remove() {
25029          delete this._channel, this._methodToThrottle = () => {
25030          };
25031        }
25032      }
25033      const Oy = 63710088e-1;
25034      class Bl {
25035        constructor(n, o) {
25036          if (isNaN(n) || isNaN(o)) throw new Error(`Invalid LngLat object: (${n}, ${o})`);
25037          if (this.lng = +n, this.lat = +o, this.lat > 90 || this.lat < -90) throw new Error("Invalid LngLat latitude value: must be between -90 and 90");
25038        }
25039        wrap() {
25040          return new Bl(Se(this.lng, -180, 180), this.lat);
25041        }
25042        toArray() {
25043          return [this.lng, this.lat];
25044        }
25045        toString() {
25046          return `LngLat(${this.lng}, ${this.lat})`;
25047        }
25048        distanceTo(n) {
25049          const o = Math.PI / 180, u = this.lat * o, p = n.lat * o, v = Math.sin(u) * Math.sin(p) + Math.cos(u) * Math.cos(p) * Math.cos((n.lng - this.lng) * o);
25050          return Oy * Math.acos(Math.min(v, 1));
25051        }
25052        static convert(n) {
25053          if (n instanceof Bl) return n;
25054          if (Array.isArray(n) && (n.length === 2 || n.length === 3)) return new Bl(Number(n[0]), Number(n[1]));
25055          if (!Array.isArray(n) && typeof n == "object" && n !== null) return new Bl(Number("lng" in n ? n.lng : n.lon), Number(n.lat));
25056          throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]");
25057        }
25058      }
25059      const o1 = 2 * Math.PI * Oy;
25060      function a1(i) {
25061        return o1 * Math.cos(i * Math.PI / 180);
25062      }
25063      function l1(i) {
25064        return (180 + i) / 360;
25065      }
25066      function c1(i) {
25067        return (180 - 180 / Math.PI * Math.log(Math.tan(Math.PI / 4 + i * Math.PI / 360))) / 360;
25068      }
25069      function u1(i, n) {
25070        return i / a1(n);
25071      }
25072      function Dy(i) {
25073        return 360 / Math.PI * Math.atan(Math.exp((180 - 360 * i) * Math.PI / 180)) - 90;
25074      }
25075      class wf {
25076        constructor(n, o, u = 0) {
25077          this.x = +n, this.y = +o, this.z = +u;
25078        }
25079        static fromLngLat(n, o = 0) {
25080          const u = Bl.convert(n);
25081          return new wf(l1(u.lng), c1(u.lat), u1(o, u.lat));
25082        }
25083        toLngLat() {
25084          return new Bl(360 * this.x - 180, Dy(this.y));
25085        }
25086        toAltitude() {
25087          return this.z * a1(Dy(this.y));
25088        }
25089        meterInMercatorCoordinateUnits() {
25090          return 1 / o1 * (n = Dy(this.y), 1 / Math.cos(n * Math.PI / 180));
25091          var n;
25092        }
25093      }
25094      function h1(i, n, o) {
25095        var u = 2 * Math.PI * 6378137 / 256 / Math.pow(2, o);
25096        return [i * u - 2 * Math.PI * 6378137 / 2, n * u - 2 * Math.PI * 6378137 / 2];
25097      }
25098      class Ry {
25099        constructor(n, o, u) {
25100          if (!function(p, v, b) {
25101            return !(p < 0 || p > 25 || b < 0 || b >= Math.pow(2, p) || v < 0 || v >= Math.pow(2, p));
25102          }(n, o, u)) throw new Error(`x=${o}, y=${u}, z=${n} outside of bounds. 0<=x<${Math.pow(2, n)}, 0<=y<${Math.pow(2, n)} 0<=z<=25 `);
vendor: 5,563 bytes, lines 25103-25203
25103          this.z = n, this.x = o, this.y = u, this.key = Sf(0, n, n, o, u);
25104        }
25105        equals(n) {
25106          return this.z === n.z && this.x === n.x && this.y === n.y;
25107        }
25108        url(n, o, u) {
25109          const p = (b = this.y, x = this.z, E = h1(256 * (v = this.x), 256 * (b = Math.pow(2, x) - b - 1), x), k = h1(256 * (v + 1), 256 * (b + 1), x), E[0] + "," + E[1] + "," + k[0] + "," + k[1]);
25110          var v, b, x, E, k;
25111          const L = function(B, V, q) {
25112            let W, Y = "";
25113            for (let oe = B; oe > 0; oe--) W = 1 << oe - 1, Y += (V & W ? 1 : 0) + (q & W ? 2 : 0);
25114            return Y;
25115          }(this.z, this.x, this.y);
25116          return n[(this.x + this.y) % n.length].replace(/{prefix}/g, (this.x % 16).toString(16) + (this.y % 16).toString(16)).replace(/{z}/g, String(this.z)).replace(/{x}/g, String(this.x)).replace(/{y}/g, String(u === "tms" ? Math.pow(2, this.z) - this.y - 1 : this.y)).replace(/{ratio}/g, o > 1 ? "@2x" : "").replace(/{quadkey}/g, L).replace(/{bbox-epsg-3857}/g, p);
25117        }
25118        isChildOf(n) {
25119          const o = this.z - n.z;
25120          return o > 0 && n.x === this.x >> o && n.y === this.y >> o;
25121        }
25122        getTilePoint(n) {
25123          const o = Math.pow(2, this.z);
25124          return new R((n.x * o - this.x) * Hn, (n.y * o - this.y) * Hn);
25125        }
25126        toString() {
25127          return `${this.z}/${this.x}/${this.y}`;
25128        }
25129      }
25130      class f1 {
25131        constructor(n, o) {
25132          this.wrap = n, this.canonical = o, this.key = Sf(n, o.z, o.z, o.x, o.y);
25133        }
25134      }
25135      class Zs {
25136        constructor(n, o, u, p, v) {
25137          if (n < u) throw new Error(`overscaledZ should be >= z; overscaledZ = ${n}; z = ${u}`);
25138          this.overscaledZ = n, this.wrap = o, this.canonical = new Ry(u, +p, +v), this.key = Sf(o, n, u, p, v);
25139        }
25140        clone() {
25141          return new Zs(this.overscaledZ, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y);
25142        }
25143        equals(n) {
25144          return this.overscaledZ === n.overscaledZ && this.wrap === n.wrap && this.canonical.equals(n.canonical);
25145        }
25146        scaledTo(n) {
25147          if (n > this.overscaledZ) throw new Error(`targetZ > this.overscaledZ; targetZ = ${n}; overscaledZ = ${this.overscaledZ}`);
25148          const o = this.canonical.z - n;
25149          return n > this.canonical.z ? new Zs(n, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y) : new Zs(n, this.wrap, n, this.canonical.x >> o, this.canonical.y >> o);
25150        }
25151        calculateScaledKey(n, o) {
25152          if (n > this.overscaledZ) throw new Error(`targetZ > this.overscaledZ; targetZ = ${n}; overscaledZ = ${this.overscaledZ}`);
25153          const u = this.canonical.z - n;
25154          return n > this.canonical.z ? Sf(this.wrap * +o, n, this.canonical.z, this.canonical.x, this.canonical.y) : Sf(this.wrap * +o, n, n, this.canonical.x >> u, this.canonical.y >> u);
25155        }
25156        isChildOf(n) {
25157          if (n.wrap !== this.wrap) return !1;
25158          const o = this.canonical.z - n.canonical.z;
25159          return n.overscaledZ === 0 || n.overscaledZ < this.overscaledZ && n.canonical.x === this.canonical.x >> o && n.canonical.y === this.canonical.y >> o;
25160        }
25161        children(n) {
25162          if (this.overscaledZ >= n) return [new Zs(this.overscaledZ + 1, this.wrap, this.canonical.z, this.canonical.x, this.canonical.y)];
25163          const o = this.canonical.z + 1, u = 2 * this.canonical.x, p = 2 * this.canonical.y;
25164          return [new Zs(o, this.wrap, o, u, p), new Zs(o, this.wrap, o, u + 1, p), new Zs(o, this.wrap, o, u, p + 1), new Zs(o, this.wrap, o, u + 1, p + 1)];
25165        }
25166        isLessThan(n) {
25167          return this.wrap < n.wrap || !(this.wrap > n.wrap) && (this.overscaledZ < n.overscaledZ || !(this.overscaledZ > n.overscaledZ) && (this.canonical.x < n.canonical.x || !(this.canonical.x > n.canonical.x) && this.canonical.y < n.canonical.y));
25168        }
25169        wrapped() {
25170          return new Zs(this.overscaledZ, 0, this.canonical.z, this.canonical.x, this.canonical.y);
25171        }
25172        unwrapTo(n) {
25173          return new Zs(this.overscaledZ, n, this.canonical.z, this.canonical.x, this.canonical.y);
25174        }
25175        overscaleFactor() {
25176          return Math.pow(2, this.overscaledZ - this.canonical.z);
25177        }
25178        toUnwrapped() {
25179          return new f1(this.wrap, this.canonical);
25180        }
25181        toString() {
25182          return `${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`;
25183        }
25184        getTilePoint(n) {
25185          return this.canonical.getTilePoint(new wf(n.x - this.wrap, n.y));
25186        }
25187      }
25188      function Sf(i, n, o, u, p) {
25189        (i *= 2) < 0 && (i = -1 * i - 1);
25190        const v = 1 << o;
25191        return (v * v * i + v * p + u).toString(36) + o.toString(36) + n.toString(36);
25192      }
25193      Mt("CanonicalTileID", Ry), Mt("OverscaledTileID", Zs, { omit: ["posMatrix"] });
25194      class d1 {
25195        constructor(n, o, u, p = 1, v = 1, b = 1, x = 0) {
25196          if (this.uid = n, o.height !== o.width) throw new RangeError("DEM tiles must be square");
25197          if (u && !["mapbox", "terrarium", "custom"].includes(u)) return void $e(`"${u}" is not a valid encoding type. Valid types include "mapbox", "terrarium" and "custom".`);
25198          this.stride = o.height;
25199          const E = this.dim = o.height - 2;
25200          switch (this.data = new Uint32Array(o.data.buffer), u) {
25201            case "terrarium":
25202              this.redFactor = 256, this.greenFactor = 1, this.blueFactor = 1 / 256, this.baseShift = 32768;
25203              break;
vendor: 18,695 bytes, lines 25204-25572
25204            case "custom":
25205              this.redFactor = p, this.greenFactor = v, this.blueFactor = b, this.baseShift = x;
25206              break;
25207            default:
25208              this.redFactor = 6553.6, this.greenFactor = 25.6, this.blueFactor = 0.1, this.baseShift = 1e4;
25209          }
25210          for (let k = 0; k < E; k++) this.data[this._idx(-1, k)] = this.data[this._idx(0, k)], this.data[this._idx(E, k)] = this.data[this._idx(E - 1, k)], this.data[this._idx(k, -1)] = this.data[this._idx(k, 0)], this.data[this._idx(k, E)] = this.data[this._idx(k, E - 1)];
25211          this.data[this._idx(-1, -1)] = this.data[this._idx(0, 0)], this.data[this._idx(E, -1)] = this.data[this._idx(E - 1, 0)], this.data[this._idx(-1, E)] = this.data[this._idx(0, E - 1)], this.data[this._idx(E, E)] = this.data[this._idx(E - 1, E - 1)], this.min = Number.MAX_SAFE_INTEGER, this.max = Number.MIN_SAFE_INTEGER;
25212          for (let k = 0; k < E; k++) for (let L = 0; L < E; L++) {
25213            const B = this.get(k, L);
25214            B > this.max && (this.max = B), B < this.min && (this.min = B);
25215          }
25216        }
25217        get(n, o) {
25218          const u = new Uint8Array(this.data.buffer), p = 4 * this._idx(n, o);
25219          return this.unpack(u[p], u[p + 1], u[p + 2]);
25220        }
25221        getUnpackVector() {
25222          return [this.redFactor, this.greenFactor, this.blueFactor, this.baseShift];
25223        }
25224        _idx(n, o) {
25225          if (n < -1 || n >= this.dim + 1 || o < -1 || o >= this.dim + 1) throw new RangeError("out of range source coordinates for DEM data");
25226          return (o + 1) * this.stride + (n + 1);
25227        }
25228        unpack(n, o, u) {
25229          return n * this.redFactor + o * this.greenFactor + u * this.blueFactor - this.baseShift;
25230        }
25231        getPixels() {
25232          return new Gs({ width: this.stride, height: this.stride }, new Uint8Array(this.data.buffer));
25233        }
25234        backfillBorder(n, o, u) {
25235          if (this.dim !== n.dim) throw new Error("dem dimension mismatch");
25236          let p = o * this.dim, v = o * this.dim + this.dim, b = u * this.dim, x = u * this.dim + this.dim;
25237          switch (o) {
25238            case -1:
25239              p = v - 1;
25240              break;
25241            case 1:
25242              v = p + 1;
25243          }
25244          switch (u) {
25245            case -1:
25246              b = x - 1;
25247              break;
25248            case 1:
25249              x = b + 1;
25250          }
25251          const E = -o * this.dim, k = -u * this.dim;
25252          for (let L = b; L < x; L++) for (let B = p; B < v; B++) this.data[this._idx(B, L)] = n.data[this._idx(B + E, L + k)];
25253        }
25254      }
25255      Mt("DEMData", d1);
25256      class p1 {
25257        constructor(n) {
25258          this._stringToNumber = {}, this._numberToString = [];
25259          for (let o = 0; o < n.length; o++) {
25260            const u = n[o];
25261            this._stringToNumber[u] = o, this._numberToString[o] = u;
25262          }
25263        }
25264        encode(n) {
25265          return this._stringToNumber[n];
25266        }
25267        decode(n) {
25268          if (n >= this._numberToString.length) throw new Error(`Out of bounds. Index requested n=${n} can't be >= this._numberToString.length ${this._numberToString.length}`);
25269          return this._numberToString[n];
25270        }
25271      }
25272      class m1 {
25273        constructor(n, o, u, p, v) {
25274          this.type = "Feature", this._vectorTileFeature = n, n._z = o, n._x = u, n._y = p, this.properties = n.properties, this.id = v;
25275        }
25276        get geometry() {
25277          return this._geometry === void 0 && (this._geometry = this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x, this._vectorTileFeature._y, this._vectorTileFeature._z).geometry), this._geometry;
25278        }
25279        set geometry(n) {
25280          this._geometry = n;
25281        }
25282        toJSON() {
25283          const n = { geometry: this.geometry };
25284          for (const o in this) o !== "_geometry" && o !== "_vectorTileFeature" && (n[o] = this[o]);
25285          return n;
25286        }
25287      }
25288      class g1 {
25289        constructor(n, o) {
25290          this.tileID = n, this.x = n.canonical.x, this.y = n.canonical.y, this.z = n.canonical.z, this.grid = new Tl(Hn, 16, 0), this.grid3D = new Tl(Hn, 16, 0), this.featureIndexArray = new Mi(), this.promoteId = o;
25291        }
25292        insert(n, o, u, p, v, b) {
25293          const x = this.featureIndexArray.length;
25294          this.featureIndexArray.emplaceBack(u, p, v);
25295          const E = b ? this.grid3D : this.grid;
25296          for (let k = 0; k < o.length; k++) {
25297            const L = o[k], B = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
25298            for (let V = 0; V < L.length; V++) {
25299              const q = L[V];
25300              B[0] = Math.min(B[0], q.x), B[1] = Math.min(B[1], q.y), B[2] = Math.max(B[2], q.x), B[3] = Math.max(B[3], q.y);
25301            }
25302            B[0] < Hn && B[1] < Hn && B[2] >= 0 && B[3] >= 0 && E.insert(x, B[0], B[1], B[2], B[3]);
25303          }
25304        }
25305        loadVTLayers() {
25306          return this.vtLayers || (this.vtLayers = new Ll.VectorTile(new wy(this.rawTileData)).layers, this.sourceLayerCoder = new p1(this.vtLayers ? Object.keys(this.vtLayers).sort() : ["_geojsonTileLayer"])), this.vtLayers;
25307        }
25308        query(n, o, u, p) {
25309          this.loadVTLayers();
25310          const v = n.params || {}, b = Hn / n.tileSize / n.scale, x = wl(v.filter), E = n.queryGeometry, k = n.queryPadding * b, L = _1(E), B = this.grid.query(L.minX - k, L.minY - k, L.maxX + k, L.maxY + k), V = _1(n.cameraQueryGeometry), q = this.grid3D.query(V.minX - k, V.minY - k, V.maxX + k, V.maxY + k, (oe, he, De, xe) => function(ke, Ve, at, At, Kt) {
25311            for (const _t of ke) if (Ve <= _t.x && at <= _t.y && At >= _t.x && Kt >= _t.y) return !0;
25312            const St = [new R(Ve, at), new R(Ve, Kt), new R(At, Kt), new R(At, at)];
25313            if (ke.length > 2) {
25314              for (const _t of St) if (Du(ke, _t)) return !0;
25315            }
25316            for (let _t = 0; _t < ke.length - 1; _t++) if (Ik(ke[_t], ke[_t + 1], St)) return !0;
25317            return !1;
25318          }(n.cameraQueryGeometry, oe - k, he - k, De + k, xe + k));
25319          for (const oe of q) B.push(oe);
25320          B.sort(KO);
25321          const W = {};
25322          let Y;
25323          for (let oe = 0; oe < B.length; oe++) {
25324            const he = B[oe];
25325            if (he === Y) continue;
25326            Y = he;
25327            const De = this.featureIndexArray.get(he);
25328            let xe = null;
25329            this.loadMatchingFeature(W, De.bucketIndex, De.sourceLayerIndex, De.featureIndex, x, v.layers, v.availableImages, o, u, p, (ke, Ve, at) => (xe || (xe = Pc(ke)), Ve.queryIntersectsFeature(E, ke, at, xe, this.z, n.transform, b, n.pixelPosMatrix)));
25330          }
25331          return W;
25332        }
25333        loadMatchingFeature(n, o, u, p, v, b, x, E, k, L, B) {
25334          const V = this.bucketLayerIDs[o];
25335          if (b && !function(oe, he) {
25336            for (let De = 0; De < oe.length; De++) if (he.indexOf(oe[De]) >= 0) return !0;
25337            return !1;
25338          }(b, V)) return;
25339          const q = this.sourceLayerCoder.decode(u), W = this.vtLayers[q].feature(p);
25340          if (v.needGeometry) {
25341            const oe = Mc(W, !0);
25342            if (!v.filter(new gn(this.tileID.overscaledZ), oe, this.tileID.canonical)) return;
25343          } else if (!v.filter(new gn(this.tileID.overscaledZ), W)) return;
25344          const Y = this.getId(W, q);
25345          for (let oe = 0; oe < V.length; oe++) {
25346            const he = V[oe];
25347            if (b && b.indexOf(he) < 0) continue;
25348            const De = E[he];
25349            if (!De) continue;
25350            let xe = {};
25351            Y && L && (xe = L.getState(De.sourceLayer || "_geojsonTileLayer", Y));
25352            const ke = je({}, k[he]);
25353            ke.paint = y1(ke.paint, De.paint, W, xe, x), ke.layout = y1(ke.layout, De.layout, W, xe, x);
25354            const Ve = !B || B(W, De, xe);
25355            if (!Ve) continue;
25356            const at = new m1(W, this.z, this.x, this.y, Y);
25357            at.layer = ke;
25358            let At = n[he];
25359            At === void 0 && (At = n[he] = []), At.push({ featureIndex: p, feature: at, intersectionZ: Ve });
25360          }
25361        }
25362        lookupSymbolFeatures(n, o, u, p, v, b, x, E) {
25363          const k = {};
25364          this.loadVTLayers();
25365          const L = wl(v);
25366          for (const B of n) this.loadMatchingFeature(k, u, p, B, L, b, x, E, o);
25367          return k;
25368        }
25369        hasLayer(n) {
25370          for (const o of this.bucketLayerIDs) for (const u of o) if (n === u) return !0;
25371          return !1;
25372        }
25373        getId(n, o) {
25374          let u = n.id;
25375          return this.promoteId && (u = n.properties[typeof this.promoteId == "string" ? this.promoteId : this.promoteId[o]], typeof u == "boolean" && (u = Number(u))), u;
25376        }
25377      }
25378      function y1(i, n, o, u, p) {
25379        return Oe(i, (v, b) => {
25380          const x = n instanceof Ec ? n.get(b) : null;
25381          return x && x.evaluate ? x.evaluate(o, u, p) : x;
25382        });
25383      }
25384      function _1(i) {
25385        let n = 1 / 0, o = 1 / 0, u = -1 / 0, p = -1 / 0;
25386        for (const v of i) n = Math.min(n, v.x), o = Math.min(o, v.y), u = Math.max(u, v.x), p = Math.max(p, v.y);
25387        return { minX: n, minY: o, maxX: u, maxY: p };
25388      }
25389      function KO(i, n) {
25390        return n - i;
25391      }
25392      function v1(i, n, o, u, p) {
25393        const v = [];
25394        for (let b = 0; b < i.length; b++) {
25395          const x = i[b];
25396          let E;
25397          for (let k = 0; k < x.length - 1; k++) {
25398            let L = x[k], B = x[k + 1];
25399            L.x < n && B.x < n || (L.x < n ? L = new R(n, L.y + (n - L.x) / (B.x - L.x) * (B.y - L.y))._round() : B.x < n && (B = new R(n, L.y + (n - L.x) / (B.x - L.x) * (B.y - L.y))._round()), L.y < o && B.y < o || (L.y < o ? L = new R(L.x + (o - L.y) / (B.y - L.y) * (B.x - L.x), o)._round() : B.y < o && (B = new R(L.x + (o - L.y) / (B.y - L.y) * (B.x - L.x), o)._round()), L.x >= u && B.x >= u || (L.x >= u ? L = new R(u, L.y + (u - L.x) / (B.x - L.x) * (B.y - L.y))._round() : B.x >= u && (B = new R(u, L.y + (u - L.x) / (B.x - L.x) * (B.y - L.y))._round()), L.y >= p && B.y >= p || (L.y >= p ? L = new R(L.x + (p - L.y) / (B.y - L.y) * (B.x - L.x), p)._round() : B.y >= p && (B = new R(L.x + (p - L.y) / (B.y - L.y) * (B.x - L.x), p)._round()), E && L.equals(E[E.length - 1]) || (E = [L], v.push(E)), E.push(B)))));
25400          }
25401        }
25402        return v;
25403      }
25404      Mt("FeatureIndex", g1, { omit: ["rawTileData", "sourceLayerCoder"] });
25405      class Nl extends R {
25406        constructor(n, o, u, p) {
25407          super(n, o), this.angle = u, p !== void 0 && (this.segment = p);
25408        }
25409        clone() {
25410          return new Nl(this.x, this.y, this.angle, this.segment);
25411        }
25412      }
25413      function b1(i, n, o, u, p) {
25414        if (n.segment === void 0 || o === 0) return !0;
25415        let v = n, b = n.segment + 1, x = 0;
25416        for (; x > -o / 2; ) {
25417          if (b--, b < 0) return !1;
25418          x -= i[b].dist(v), v = i[b];
25419        }
25420        x += i[b].dist(i[b + 1]), b++;
25421        const E = [];
25422        let k = 0;
25423        for (; x < o / 2; ) {
25424          const L = i[b], B = i[b + 1];
25425          if (!B) return !1;
25426          let V = i[b - 1].angleTo(L) - L.angleTo(B);
25427          for (V = Math.abs((V + 3 * Math.PI) % (2 * Math.PI) - Math.PI), E.push({ distance: x, angleDelta: V }), k += V; x - E[0].distance > u; ) k -= E.shift().angleDelta;
25428          if (k > p) return !1;
25429          b++, x += L.dist(B);
25430        }
25431        return !0;
25432      }
25433      function x1(i) {
25434        let n = 0;
25435        for (let o = 0; o < i.length - 1; o++) n += i[o].dist(i[o + 1]);
25436        return n;
25437      }
25438      function w1(i, n, o) {
25439        return i ? 0.6 * n * o : 0;
25440      }
25441      function S1(i, n) {
25442        return Math.max(i ? i.right - i.left : 0, n ? n.right - n.left : 0);
25443      }
25444      function XO(i, n, o, u, p, v) {
25445        const b = w1(o, p, v), x = S1(o, u) * v;
25446        let E = 0;
25447        const k = x1(i) / 2;
25448        for (let L = 0; L < i.length - 1; L++) {
25449          const B = i[L], V = i[L + 1], q = B.dist(V);
25450          if (E + q > k) {
25451            const W = (k - E) / q, Y = Zt.number(B.x, V.x, W), oe = Zt.number(B.y, V.y, W), he = new Nl(Y, oe, V.angleTo(B), L);
25452            return he._round(), !b || b1(i, he, x, b, n) ? he : void 0;
25453          }
25454          E += q;
25455        }
25456      }
25457      function JO(i, n, o, u, p, v, b, x, E) {
25458        const k = w1(u, v, b), L = S1(u, p), B = L * b, V = i[0].x === 0 || i[0].x === E || i[0].y === 0 || i[0].y === E;
25459        return n - B < n / 4 && (n = B + n / 4), T1(i, V ? n / 2 * x % n : (L / 2 + 2 * v) * b * x % n, n, k, o, B, V, !1, E);
25460      }
25461      function T1(i, n, o, u, p, v, b, x, E) {
25462        const k = v / 2, L = x1(i);
25463        let B = 0, V = n - o, q = [];
25464        for (let W = 0; W < i.length - 1; W++) {
25465          const Y = i[W], oe = i[W + 1], he = Y.dist(oe), De = oe.angleTo(Y);
25466          for (; V + o < B + he; ) {
25467            V += o;
25468            const xe = (V - B) / he, ke = Zt.number(Y.x, oe.x, xe), Ve = Zt.number(Y.y, oe.y, xe);
25469            if (ke >= 0 && ke < E && Ve >= 0 && Ve < E && V - k >= 0 && V + k <= L) {
25470              const at = new Nl(ke, Ve, De, W);
25471              at._round(), u && !b1(i, at, v, u, p) || q.push(at);
25472            }
25473          }
25474          B += he;
25475        }
25476        return x || q.length || b || (q = T1(i, B / 2, o, u, p, v, b, !0, E)), q;
25477      }
25478      Mt("Anchor", Nl);
25479      const ju = hs;
25480      function E1(i, n, o, u) {
25481        const p = [], v = i.image, b = v.pixelRatio, x = v.paddedRect.w - 2 * ju, E = v.paddedRect.h - 2 * ju;
25482        let k = { x1: i.left, y1: i.top, x2: i.right, y2: i.bottom };
25483        const L = v.stretchX || [[0, x]], B = v.stretchY || [[0, E]], V = (Ke, Vt) => Ke + Vt[1] - Vt[0], q = L.reduce(V, 0), W = B.reduce(V, 0), Y = x - q, oe = E - W;
25484        let he = 0, De = q, xe = 0, ke = W, Ve = 0, at = Y, At = 0, Kt = oe;
25485        if (v.content && u) {
25486          const Ke = v.content, Vt = Ke[2] - Ke[0], Bt = Ke[3] - Ke[1];
25487          (v.textFitWidth || v.textFitHeight) && (k = Y0(i)), he = fp(L, 0, Ke[0]), xe = fp(B, 0, Ke[1]), De = fp(L, Ke[0], Ke[2]), ke = fp(B, Ke[1], Ke[3]), Ve = Ke[0] - he, At = Ke[1] - xe, at = Vt - De, Kt = Bt - ke;
25488        }
25489        const St = k.x1, _t = k.y1, $t = k.x2 - St, Ot = k.y2 - _t, It = (Ke, Vt, Bt, nr) => {
25490          const on = dp(Ke.stretch - he, De, $t, St), Yr = pp(Ke.fixed - Ve, at, Ke.stretch, q), ei = dp(Vt.stretch - xe, ke, Ot, _t), vo = pp(Vt.fixed - At, Kt, Vt.stretch, W), wi = dp(Bt.stretch - he, De, $t, St), ti = pp(Bt.fixed - Ve, at, Bt.stretch, q), Zi = dp(nr.stretch - xe, ke, Ot, _t), Wi = pp(nr.fixed - At, Kt, nr.stretch, W), Ki = new R(on, ei), Dn = new R(wi, ei), ri = new R(wi, Zi), Oi = new R(on, Zi), Si = new R(Yr / b, vo / b), Xi = new R(ti / b, Wi / b), Ti = n * Math.PI / 180;
25491          if (Ti) {
25492            const Lr = Math.sin(Ti), un = Math.cos(Ti), bn = [un, -Lr, Lr, un];
25493            Ki._matMult(bn), Dn._matMult(bn), Oi._matMult(bn), ri._matMult(bn);
25494          }
25495          const Ws = Ke.stretch + Ke.fixed, fs = Vt.stretch + Vt.fixed;
25496          return { tl: Ki, tr: Dn, bl: Oi, br: ri, tex: { x: v.paddedRect.x + ju + Ws, y: v.paddedRect.y + ju + fs, w: Bt.stretch + Bt.fixed - Ws, h: nr.stretch + nr.fixed - fs }, writingMode: void 0, glyphOffset: [0, 0], sectionIndex: 0, pixelOffsetTL: Si, pixelOffsetBR: Xi, minFontScaleX: at / b / $t, minFontScaleY: Kt / b / Ot, isSDF: o };
25497        };
25498        if (u && (v.stretchX || v.stretchY)) {
25499          const Ke = A1(L, Y, q), Vt = A1(B, oe, W);
25500          for (let Bt = 0; Bt < Ke.length - 1; Bt++) {
25501            const nr = Ke[Bt], on = Ke[Bt + 1];
25502            for (let Yr = 0; Yr < Vt.length - 1; Yr++) p.push(It(nr, Vt[Yr], on, Vt[Yr + 1]));
25503          }
25504        } else p.push(It({ fixed: 0, stretch: -1 }, { fixed: 0, stretch: -1 }, { fixed: 0, stretch: x + 1 }, { fixed: 0, stretch: E + 1 }));
25505        return p;
25506      }
25507      function fp(i, n, o) {
25508        let u = 0;
25509        for (const p of i) u += Math.max(n, Math.min(o, p[1])) - Math.max(n, Math.min(o, p[0]));
25510        return u;
25511      }
25512      function A1(i, n, o) {
25513        const u = [{ fixed: -ju, stretch: 0 }];
25514        for (const [p, v] of i) {
25515          const b = u[u.length - 1];
25516          u.push({ fixed: p - b.stretch, stretch: b.stretch }), u.push({ fixed: p - b.stretch, stretch: b.stretch + (v - p) });
25517        }
25518        return u.push({ fixed: n + ju, stretch: o }), u;
25519      }
25520      function dp(i, n, o, u) {
25521        return i / n * o + u;
25522      }
25523      function pp(i, n, o, u) {
25524        return i - n * o / u;
25525      }
25526      class mp {
25527        constructor(n, o, u, p, v, b, x, E, k, L) {
25528          var B;
25529          if (this.boxStartIndex = n.length, k) {
25530            let V = b.top, q = b.bottom;
25531            const W = b.collisionPadding;
25532            W && (V -= W[1], q += W[3]);
25533            let Y = q - V;
25534            Y > 0 && (Y = Math.max(10, Y), this.circleDiameter = Y);
25535          } else {
25536            const V = !((B = b.image) === null || B === void 0) && B.content && (b.image.textFitWidth || b.image.textFitHeight) ? Y0(b) : { x1: b.left, y1: b.top, x2: b.right, y2: b.bottom };
25537            V.y1 = V.y1 * x - E[0], V.y2 = V.y2 * x + E[2], V.x1 = V.x1 * x - E[3], V.x2 = V.x2 * x + E[1];
25538            const q = b.collisionPadding;
25539            if (q && (V.x1 -= q[0] * x, V.y1 -= q[1] * x, V.x2 += q[2] * x, V.y2 += q[3] * x), L) {
25540              const W = new R(V.x1, V.y1), Y = new R(V.x2, V.y1), oe = new R(V.x1, V.y2), he = new R(V.x2, V.y2), De = L * Math.PI / 180;
25541              W._rotate(De), Y._rotate(De), oe._rotate(De), he._rotate(De), V.x1 = Math.min(W.x, Y.x, oe.x, he.x), V.x2 = Math.max(W.x, Y.x, oe.x, he.x), V.y1 = Math.min(W.y, Y.y, oe.y, he.y), V.y2 = Math.max(W.y, Y.y, oe.y, he.y);
25542            }
25543            n.emplaceBack(o.x, o.y, V.x1, V.y1, V.x2, V.y2, u, p, v);
25544          }
25545          this.boxEndIndex = n.length;
25546        }
25547      }
25548      class YO {
25549        constructor(n = [], o = (u, p) => u < p ? -1 : u > p ? 1 : 0) {
25550          if (this.data = n, this.length = this.data.length, this.compare = o, this.length > 0) for (let u = (this.length >> 1) - 1; u >= 0; u--) this._down(u);
25551        }
25552        push(n) {
25553          this.data.push(n), this._up(this.length++);
25554        }
25555        pop() {
25556          if (this.length === 0) return;
25557          const n = this.data[0], o = this.data.pop();
25558          return --this.length > 0 && (this.data[0] = o, this._down(0)), n;
25559        }
25560        peek() {
25561          return this.data[0];
25562        }
25563        _up(n) {
25564          const { data: o, compare: u } = this, p = o[n];
25565          for (; n > 0; ) {
25566            const v = n - 1 >> 1, b = o[v];
25567            if (u(p, b) >= 0) break;
25568            o[n] = b, n = v;
25569          }
25570          o[n] = p;
25571        }
25572        _down(n) {
vendor: 4,386 bytes, lines 25573-25682
25573          const { data: o, compare: u } = this, p = this.length >> 1, v = o[n];
25574          for (; n < p; ) {
25575            let b = 1 + (n << 1);
25576            const x = b + 1;
25577            if (x < this.length && u(o[x], o[b]) < 0 && (b = x), u(o[b], v) >= 0) break;
25578            o[n] = o[b], n = b;
25579          }
25580          o[n] = v;
25581        }
25582      }
25583      function QO(i, n = 1, o = !1) {
25584        let u = 1 / 0, p = 1 / 0, v = -1 / 0, b = -1 / 0;
25585        const x = i[0];
25586        for (let q = 0; q < x.length; q++) {
25587          const W = x[q];
25588          (!q || W.x < u) && (u = W.x), (!q || W.y < p) && (p = W.y), (!q || W.x > v) && (v = W.x), (!q || W.y > b) && (b = W.y);
25589        }
25590        const E = Math.min(v - u, b - p);
25591        let k = E / 2;
25592        const L = new YO([], eD);
25593        if (E === 0) return new R(u, p);
25594        for (let q = u; q < v; q += E) for (let W = p; W < b; W += E) L.push(new Vu(q + k, W + k, k, i));
25595        let B = function(q) {
25596          let W = 0, Y = 0, oe = 0;
25597          const he = q[0];
25598          for (let De = 0, xe = he.length, ke = xe - 1; De < xe; ke = De++) {
25599            const Ve = he[De], at = he[ke], At = Ve.x * at.y - at.x * Ve.y;
25600            Y += (Ve.x + at.x) * At, oe += (Ve.y + at.y) * At, W += 3 * At;
25601          }
25602          return new Vu(Y / W, oe / W, 0, q);
25603        }(i), V = L.length;
25604        for (; L.length; ) {
25605          const q = L.pop();
25606          (q.d > B.d || !B.d) && (B = q, o && console.log("found best %d after %d probes", Math.round(1e4 * q.d) / 1e4, V)), q.max - B.d <= n || (k = q.h / 2, L.push(new Vu(q.p.x - k, q.p.y - k, k, i)), L.push(new Vu(q.p.x + k, q.p.y - k, k, i)), L.push(new Vu(q.p.x - k, q.p.y + k, k, i)), L.push(new Vu(q.p.x + k, q.p.y + k, k, i)), V += 4);
25607        }
25608        return o && (console.log(`num probes: ${V}`), console.log(`best distance: ${B.d}`)), B.p;
25609      }
25610      function eD(i, n) {
25611        return n.max - i.max;
25612      }
25613      function Vu(i, n, o, u) {
25614        this.p = new R(i, n), this.h = o, this.d = function(p, v) {
25615          let b = !1, x = 1 / 0;
25616          for (let E = 0; E < v.length; E++) {
25617            const k = v[E];
25618            for (let L = 0, B = k.length, V = B - 1; L < B; V = L++) {
25619              const q = k[L], W = k[V];
25620              q.y > p.y != W.y > p.y && p.x < (W.x - q.x) * (p.y - q.y) / (W.y - q.y) + q.x && (b = !b), x = Math.min(x, c0(p, q, W));
25621            }
25622          }
25623          return (b ? 1 : -1) * Math.sqrt(x);
25624        }(this.p, u), this.max = this.d + this.h * Math.SQRT2;
25625      }
25626      var xi;
25627      m.aq = void 0, (xi = m.aq || (m.aq = {}))[xi.center = 1] = "center", xi[xi.left = 2] = "left", xi[xi.right = 3] = "right", xi[xi.top = 4] = "top", xi[xi.bottom = 5] = "bottom", xi[xi["top-left"] = 6] = "top-left", xi[xi["top-right"] = 7] = "top-right", xi[xi["bottom-left"] = 8] = "bottom-left", xi[xi["bottom-right"] = 9] = "bottom-right";
25628      const $l = 7, Ly = Number.POSITIVE_INFINITY;
25629      function C1(i, n) {
25630        return n[1] !== Ly ? function(o, u, p) {
25631          let v = 0, b = 0;
25632          switch (u = Math.abs(u), p = Math.abs(p), o) {
25633            case "top-right":
25634            case "top-left":
25635            case "top":
25636              b = p - $l;
25637              break;
25638            case "bottom-right":
25639            case "bottom-left":
25640            case "bottom":
25641              b = -p + $l;
25642          }
25643          switch (o) {
25644            case "top-right":
25645            case "bottom-right":
25646            case "right":
25647              v = -u;
25648              break;
25649            case "top-left":
25650            case "bottom-left":
25651            case "left":
25652              v = u;
25653          }
25654          return [v, b];
25655        }(i, n[0], n[1]) : function(o, u) {
25656          let p = 0, v = 0;
25657          u < 0 && (u = 0);
25658          const b = u / Math.SQRT2;
25659          switch (o) {
25660            case "top-right":
25661            case "top-left":
25662              v = b - $l;
25663              break;
25664            case "bottom-right":
25665            case "bottom-left":
25666              v = -b + $l;
25667              break;
25668            case "bottom":
25669              v = -u + $l;
25670              break;
25671            case "top":
25672              v = u - $l;
25673          }
25674          switch (o) {
25675            case "top-right":
25676            case "bottom-right":
25677              p = -b;
25678              break;
25679            case "top-left":
25680            case "bottom-left":
25681              p = b;
25682              break;
vendor: 6,096 bytes, lines 25683-25769
25683            case "left":
25684              p = u;
25685              break;
25686            case "right":
25687              p = -u;
25688          }
25689          return [p, v];
25690        }(i, n[0]);
25691      }
25692      function I1(i, n, o) {
25693        var u;
25694        const p = i.layout, v = (u = p.get("text-variable-anchor-offset")) === null || u === void 0 ? void 0 : u.evaluate(n, {}, o);
25695        if (v) {
25696          const x = v.values, E = [];
25697          for (let k = 0; k < x.length; k += 2) {
25698            const L = E[k] = x[k], B = x[k + 1].map((V) => V * Yn);
25699            L.startsWith("top") ? B[1] -= $l : L.startsWith("bottom") && (B[1] += $l), E[k + 1] = B;
25700          }
25701          return new Nn(E);
25702        }
25703        const b = p.get("text-variable-anchor");
25704        if (b) {
25705          let x;
25706          x = i._unevaluatedLayout.getValue("text-radial-offset") !== void 0 ? [p.get("text-radial-offset").evaluate(n, {}, o) * Yn, Ly] : p.get("text-offset").evaluate(n, {}, o).map((k) => k * Yn);
25707          const E = [];
25708          for (const k of b) E.push(k, C1(k, x));
25709          return new Nn(E);
25710        }
25711        return null;
25712      }
25713      function Fy(i) {
25714        switch (i) {
25715          case "right":
25716          case "top-right":
25717          case "bottom-right":
25718            return "right";
25719          case "left":
25720          case "top-left":
25721          case "bottom-left":
25722            return "left";
25723        }
25724        return "center";
25725      }
25726      function tD(i, n, o, u, p, v, b, x, E, k, L) {
25727        let B = v.textMaxSize.evaluate(n, {});
25728        B === void 0 && (B = b);
25729        const V = i.layers[0].layout, q = V.get("icon-offset").evaluate(n, {}, L), W = M1(o.horizontal), Y = b / 24, oe = i.tilePixelRatio * Y, he = i.tilePixelRatio * B / 24, De = i.tilePixelRatio * x, xe = i.tilePixelRatio * V.get("symbol-spacing"), ke = V.get("text-padding") * i.tilePixelRatio, Ve = function(Ke, Vt, Bt, nr = 1) {
25730          const on = Ke.get("icon-padding").evaluate(Vt, {}, Bt), Yr = on && on.values;
25731          return [Yr[0] * nr, Yr[1] * nr, Yr[2] * nr, Yr[3] * nr];
25732        }(V, n, L, i.tilePixelRatio), at = V.get("text-max-angle") / 180 * Math.PI, At = V.get("text-rotation-alignment") !== "viewport" && V.get("symbol-placement") !== "point", Kt = V.get("icon-rotation-alignment") === "map" && V.get("symbol-placement") !== "point", St = V.get("symbol-placement"), _t = xe / 2, $t = V.get("icon-text-fit");
25733        let Ot;
25734        u && $t !== "none" && (i.allowVerticalPlacement && o.vertical && (Ot = Q0(u, o.vertical, $t, V.get("icon-text-fit-padding"), q, Y)), W && (u = Q0(u, W, $t, V.get("icon-text-fit-padding"), q, Y)));
25735        const It = (Ke, Vt) => {
25736          Vt.x < 0 || Vt.x >= Hn || Vt.y < 0 || Vt.y >= Hn || function(Bt, nr, on, Yr, ei, vo, wi, ti, Zi, Wi, Ki, Dn, ri, Oi, Si, Xi, Ti, Ws, fs, Lr, un, bn, Es, Pn, Uu) {
25737            const la = Bt.addToLineVertexArray(nr, on);
25738            let ca, bo, Ks, ai, Ua = 0, Af = 0, R1 = 0, L1 = 0, qy = -1, Hy = -1;
25739            const qa = {};
25740            let F1 = Pu("");
25741            if (Bt.allowVerticalPlacement && Yr.vertical) {
25742              const Di = ti.layout.get("text-rotate").evaluate(un, {}, Pn) + 90;
25743              Ks = new mp(Zi, nr, Wi, Ki, Dn, Yr.vertical, ri, Oi, Si, Di), wi && (ai = new mp(Zi, nr, Wi, Ki, Dn, wi, Ti, Ws, Si, Di));
25744            }
25745            if (ei) {
25746              const Di = ti.layout.get("icon-rotate").evaluate(un, {}), Xs = ti.layout.get("icon-text-fit") !== "none", Oc = E1(ei, Di, Es, Xs), Fo = wi ? E1(wi, Di, Es, Xs) : void 0;
25747              bo = new mp(Zi, nr, Wi, Ki, Dn, ei, Ti, Ws, !1, Di), Ua = 4 * Oc.length;
25748              const Dc = Bt.iconSizeData;
25749              let ua = null;
25750              Dc.kind === "source" ? (ua = [aa * ti.layout.get("icon-size").evaluate(un, {})], ua[0] > zl && $e(`${Bt.layerIds[0]}: Value for "icon-size" is >= ${xf}. Reduce your "icon-size".`)) : Dc.kind === "composite" && (ua = [aa * bn.compositeIconSizes[0].evaluate(un, {}, Pn), aa * bn.compositeIconSizes[1].evaluate(un, {}, Pn)], (ua[0] > zl || ua[1] > zl) && $e(`${Bt.layerIds[0]}: Value for "icon-size" is >= ${xf}. Reduce your "icon-size".`)), Bt.addSymbols(Bt.icon, Oc, ua, Lr, fs, un, m.ah.none, nr, la.lineStartIndex, la.lineLength, -1, Pn), qy = Bt.icon.placedSymbolArray.length - 1, Fo && (Af = 4 * Fo.length, Bt.addSymbols(Bt.icon, Fo, ua, Lr, fs, un, m.ah.vertical, nr, la.lineStartIndex, la.lineLength, -1, Pn), Hy = Bt.icon.placedSymbolArray.length - 1);
25751            }
25752            const z1 = Object.keys(Yr.horizontal);
25753            for (const Di of z1) {
25754              const Xs = Yr.horizontal[Di];
25755              if (!ca) {
25756                F1 = Pu(Xs.text);
25757                const Fo = ti.layout.get("text-rotate").evaluate(un, {}, Pn);
25758                ca = new mp(Zi, nr, Wi, Ki, Dn, Xs, ri, Oi, Si, Fo);
25759              }
25760              const Oc = Xs.positionedLines.length === 1;
25761              if (R1 += P1(Bt, nr, Xs, vo, ti, Si, un, Xi, la, Yr.vertical ? m.ah.horizontal : m.ah.horizontalOnly, Oc ? z1 : [Di], qa, qy, bn, Pn), Oc) break;
25762            }
25763            Yr.vertical && (L1 += P1(Bt, nr, Yr.vertical, vo, ti, Si, un, Xi, la, m.ah.vertical, ["vertical"], qa, Hy, bn, Pn));
25764            const iD = ca ? ca.boxStartIndex : Bt.collisionBoxArray.length, sD = ca ? ca.boxEndIndex : Bt.collisionBoxArray.length, oD = Ks ? Ks.boxStartIndex : Bt.collisionBoxArray.length, aD = Ks ? Ks.boxEndIndex : Bt.collisionBoxArray.length, lD = bo ? bo.boxStartIndex : Bt.collisionBoxArray.length, cD = bo ? bo.boxEndIndex : Bt.collisionBoxArray.length, uD = ai ? ai.boxStartIndex : Bt.collisionBoxArray.length, hD = ai ? ai.boxEndIndex : Bt.collisionBoxArray.length;
25765            let Lo = -1;
25766            const yp = (Di, Xs) => Di && Di.circleDiameter ? Math.max(Di.circleDiameter, Xs) : Xs;
25767            Lo = yp(ca, Lo), Lo = yp(Ks, Lo), Lo = yp(bo, Lo), Lo = yp(ai, Lo);
25768            const B1 = Lo > -1 ? 1 : 0;
25769            B1 && (Lo *= Uu / Yn), Bt.glyphOffsetArray.length >= $u.MAX_GLYPHS && $e("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"), un.sortKey !== void 0 && Bt.addToSortKey
vendor: 5,061 bytes, lines 25769-25842
25769Ranges(Bt.symbolInstances.length, un.sortKey);
25770            const fD = I1(ti, un, Pn), [dD, pD] = function(Di, Xs) {
25771              const Oc = Di.length, Fo = Xs == null ? void 0 : Xs.values;
25772              if ((Fo == null ? void 0 : Fo.length) > 0) for (let Dc = 0; Dc < Fo.length; Dc += 2) {
25773                const ua = Fo[Dc + 1];
25774                Di.emplaceBack(m.aq[Fo[Dc]], ua[0], ua[1]);
25775              }
25776              return [Oc, Di.length];
25777            }(Bt.textAnchorOffsets, fD);
25778            Bt.symbolInstances.emplaceBack(nr.x, nr.y, qa.right >= 0 ? qa.right : -1, qa.center >= 0 ? qa.center : -1, qa.left >= 0 ? qa.left : -1, qa.vertical || -1, qy, Hy, F1, iD, sD, oD, aD, lD, cD, uD, hD, Wi, R1, L1, Ua, Af, B1, 0, ri, Lo, dD, pD);
25779          }(i, Vt, Ke, o, u, p, Ot, i.layers[0], i.collisionBoxArray, n.index, n.sourceLayerIndex, i.index, oe, [ke, ke, ke, ke], At, E, De, Ve, Kt, q, n, v, k, L, b);
25780        };
25781        if (St === "line") for (const Ke of v1(n.geometry, 0, 0, Hn, Hn)) {
25782          const Vt = JO(Ke, xe, at, o.vertical || W, u, 24, he, i.overscaling, Hn);
25783          for (const Bt of Vt) W && rD(i, W.text, _t, Bt) || It(Ke, Bt);
25784        }
25785        else if (St === "line-center") {
25786          for (const Ke of n.geometry) if (Ke.length > 1) {
25787            const Vt = XO(Ke, at, o.vertical || W, u, 24, he);
25788            Vt && It(Ke, Vt);
25789          }
25790        } else if (n.type === "Polygon") for (const Ke of pl(n.geometry, 0)) {
25791          const Vt = QO(Ke, 16);
25792          It(Ke[0], new Nl(Vt.x, Vt.y, 0));
25793        }
25794        else if (n.type === "LineString") for (const Ke of n.geometry) It(Ke, new Nl(Ke[0].x, Ke[0].y, 0));
25795        else if (n.type === "Point") for (const Ke of n.geometry) for (const Vt of Ke) It([Vt], new Nl(Vt.x, Vt.y, 0));
25796      }
25797      function P1(i, n, o, u, p, v, b, x, E, k, L, B, V, q, W) {
25798        const Y = function(De, xe, ke, Ve, at, At, Kt, St) {
25799          const _t = Ve.layout.get("text-rotate").evaluate(At, {}) * Math.PI / 180, $t = [];
25800          for (const Ot of xe.positionedLines) for (const It of Ot.positionedGlyphs) {
25801            if (!It.rect) continue;
25802            const Ke = It.rect || {};
25803            let Vt = H0 + 1, Bt = !0, nr = 1, on = 0;
25804            const Yr = (at || St) && It.vertical, ei = It.metrics.advance * It.scale / 2;
25805            if (St && xe.verticalizable && (on = Ot.lineOffset / 2 - (It.imageName ? -(Yn - It.metrics.width * It.scale) / 2 : (It.scale - 1) * Yn)), It.imageName) {
25806              const Lr = Kt[It.imageName];
25807              Bt = Lr.sdf, nr = Lr.pixelRatio, Vt = hs / nr;
25808            }
25809            const vo = at ? [It.x + ei, It.y] : [0, 0];
25810            let wi = at ? [0, 0] : [It.x + ei + ke[0], It.y + ke[1] - on], ti = [0, 0];
25811            Yr && (ti = wi, wi = [0, 0]);
25812            const Zi = It.metrics.isDoubleResolution ? 2 : 1, Wi = (It.metrics.left - Vt) * It.scale - ei + wi[0], Ki = (-It.metrics.top - Vt) * It.scale + wi[1], Dn = Wi + Ke.w / Zi * It.scale / nr, ri = Ki + Ke.h / Zi * It.scale / nr, Oi = new R(Wi, Ki), Si = new R(Dn, Ki), Xi = new R(Wi, ri), Ti = new R(Dn, ri);
25813            if (Yr) {
25814              const Lr = new R(-ei, ei - vf), un = -Math.PI / 2, bn = Yn / 2 - ei, Es = new R(5 - vf - bn, -(It.imageName ? bn : 0)), Pn = new R(...ti);
25815              Oi._rotateAround(un, Lr)._add(Es)._add(Pn), Si._rotateAround(un, Lr)._add(Es)._add(Pn), Xi._rotateAround(un, Lr)._add(Es)._add(Pn), Ti._rotateAround(un, Lr)._add(Es)._add(Pn);
25816            }
25817            if (_t) {
25818              const Lr = Math.sin(_t), un = Math.cos(_t), bn = [un, -Lr, Lr, un];
25819              Oi._matMult(bn), Si._matMult(bn), Xi._matMult(bn), Ti._matMult(bn);
25820            }
25821            const Ws = new R(0, 0), fs = new R(0, 0);
25822            $t.push({ tl: Oi, tr: Si, bl: Xi, br: Ti, tex: Ke, writingMode: xe.writingMode, glyphOffset: vo, sectionIndex: It.sectionIndex, isSDF: Bt, pixelOffsetTL: Ws, pixelOffsetBR: fs, minFontScaleX: 0, minFontScaleY: 0 });
25823          }
25824          return $t;
25825        }(0, o, x, p, v, b, u, i.allowVerticalPlacement), oe = i.textSizeData;
25826        let he = null;
25827        oe.kind === "source" ? (he = [aa * p.layout.get("text-size").evaluate(b, {})], he[0] > zl && $e(`${i.layerIds[0]}: Value for "text-size" is >= ${xf}. Reduce your "text-size".`)) : oe.kind === "composite" && (he = [aa * q.compositeTextSizes[0].evaluate(b, {}, W), aa * q.compositeTextSizes[1].evaluate(b, {}, W)], (he[0] > zl || he[1] > zl) && $e(`${i.layerIds[0]}: Value for "text-size" is >= ${xf}. Reduce your "text-size".`)), i.addSymbols(i.text, Y, he, x, v, b, k, n, E.lineStartIndex, E.lineLength, V, W);
25828        for (const De of L) B[De] = i.text.placedSymbolArray.length - 1;
25829        return 4 * Y.length;
25830      }
25831      function M1(i) {
25832        for (const n in i) return i[n];
25833        return null;
25834      }
25835      function rD(i, n, o, u) {
25836        const p = i.compareText;
25837        if (n in p) {
25838          const v = p[n];
25839          for (let b = v.length - 1; b >= 0; b--) if (u.dist(v[b]) < o) return !0;
25840        } else p[n] = [];
25841        return p[n].push(u), !1;
25842      }
vendor: 36,160 bytes, lines 25843-26348
25843      const k1 = [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array];
25844      class zy {
25845        static from(n) {
25846          if (!(n instanceof ArrayBuffer)) throw new Error("Data must be an instance of ArrayBuffer.");
25847          const [o, u] = new Uint8Array(n, 0, 2);
25848          if (o !== 219) throw new Error("Data does not appear to be in a KDBush format.");
25849          const p = u >> 4;
25850          if (p !== 1) throw new Error(`Got v${p} data when expected v1.`);
25851          const v = k1[15 & u];
25852          if (!v) throw new Error("Unrecognized array type.");
25853          const [b] = new Uint16Array(n, 2, 1), [x] = new Uint32Array(n, 4, 1);
25854          return new zy(x, b, v, n);
25855        }
25856        constructor(n, o = 64, u = Float64Array, p) {
25857          if (isNaN(n) || n < 0) throw new Error(`Unpexpected numItems value: ${n}.`);
25858          this.numItems = +n, this.nodeSize = Math.min(Math.max(+o, 2), 65535), this.ArrayType = u, this.IndexArrayType = n < 65536 ? Uint16Array : Uint32Array;
25859          const v = k1.indexOf(this.ArrayType), b = 2 * n * this.ArrayType.BYTES_PER_ELEMENT, x = n * this.IndexArrayType.BYTES_PER_ELEMENT, E = (8 - x % 8) % 8;
25860          if (v < 0) throw new Error(`Unexpected typed array class: ${u}.`);
25861          p && p instanceof ArrayBuffer ? (this.data = p, this.ids = new this.IndexArrayType(this.data, 8, n), this.coords = new this.ArrayType(this.data, 8 + x + E, 2 * n), this._pos = 2 * n, this._finished = !0) : (this.data = new ArrayBuffer(8 + b + x + E), this.ids = new this.IndexArrayType(this.data, 8, n), this.coords = new this.ArrayType(this.data, 8 + x + E, 2 * n), this._pos = 0, this._finished = !1, new Uint8Array(this.data, 0, 2).set([219, 16 + v]), new Uint16Array(this.data, 2, 1)[0] = o, new Uint32Array(this.data, 4, 1)[0] = n);
25862        }
25863        add(n, o) {
25864          const u = this._pos >> 1;
25865          return this.ids[u] = u, this.coords[this._pos++] = n, this.coords[this._pos++] = o, u;
25866        }
25867        finish() {
25868          const n = this._pos >> 1;
25869          if (n !== this.numItems) throw new Error(`Added ${n} items when expected ${this.numItems}.`);
25870          return By(this.ids, this.coords, this.nodeSize, 0, this.numItems - 1, 0), this._finished = !0, this;
25871        }
25872        range(n, o, u, p) {
25873          if (!this._finished) throw new Error("Data not yet indexed - call index.finish().");
25874          const { ids: v, coords: b, nodeSize: x } = this, E = [0, v.length - 1, 0], k = [];
25875          for (; E.length; ) {
25876            const L = E.pop() || 0, B = E.pop() || 0, V = E.pop() || 0;
25877            if (B - V <= x) {
25878              for (let oe = V; oe <= B; oe++) {
25879                const he = b[2 * oe], De = b[2 * oe + 1];
25880                he >= n && he <= u && De >= o && De <= p && k.push(v[oe]);
25881              }
25882              continue;
25883            }
25884            const q = V + B >> 1, W = b[2 * q], Y = b[2 * q + 1];
25885            W >= n && W <= u && Y >= o && Y <= p && k.push(v[q]), (L === 0 ? n <= W : o <= Y) && (E.push(V), E.push(q - 1), E.push(1 - L)), (L === 0 ? u >= W : p >= Y) && (E.push(q + 1), E.push(B), E.push(1 - L));
25886          }
25887          return k;
25888        }
25889        within(n, o, u) {
25890          if (!this._finished) throw new Error("Data not yet indexed - call index.finish().");
25891          const { ids: p, coords: v, nodeSize: b } = this, x = [0, p.length - 1, 0], E = [], k = u * u;
25892          for (; x.length; ) {
25893            const L = x.pop() || 0, B = x.pop() || 0, V = x.pop() || 0;
25894            if (B - V <= b) {
25895              for (let oe = V; oe <= B; oe++) D1(v[2 * oe], v[2 * oe + 1], n, o) <= k && E.push(p[oe]);
25896              continue;
25897            }
25898            const q = V + B >> 1, W = v[2 * q], Y = v[2 * q + 1];
25899            D1(W, Y, n, o) <= k && E.push(p[q]), (L === 0 ? n - u <= W : o - u <= Y) && (x.push(V), x.push(q - 1), x.push(1 - L)), (L === 0 ? n + u >= W : o + u >= Y) && (x.push(q + 1), x.push(B), x.push(1 - L));
25900          }
25901          return E;
25902        }
25903      }
25904      function By(i, n, o, u, p, v) {
25905        if (p - u <= o) return;
25906        const b = u + p >> 1;
25907        O1(i, n, b, u, p, v), By(i, n, o, u, b - 1, 1 - v), By(i, n, o, b + 1, p, 1 - v);
25908      }
25909      function O1(i, n, o, u, p, v) {
25910        for (; p > u; ) {
25911          if (p - u > 600) {
25912            const k = p - u + 1, L = o - u + 1, B = Math.log(k), V = 0.5 * Math.exp(2 * B / 3), q = 0.5 * Math.sqrt(B * V * (k - V) / k) * (L - k / 2 < 0 ? -1 : 1);
25913            O1(i, n, o, Math.max(u, Math.floor(o - L * V / k + q)), Math.min(p, Math.floor(o + (k - L) * V / k + q)), v);
25914          }
25915          const b = n[2 * o + v];
25916          let x = u, E = p;
25917          for (Tf(i, n, u, o), n[2 * p + v] > b && Tf(i, n, u, p); x < E; ) {
25918            for (Tf(i, n, x, E), x++, E--; n[2 * x + v] < b; ) x++;
25919            for (; n[2 * E + v] > b; ) E--;
25920          }
25921          n[2 * u + v] === b ? Tf(i, n, u, E) : (E++, Tf(i, n, E, p)), E <= o && (u = E + 1), o <= E && (p = E - 1);
25922        }
25923      }
25924      function Tf(i, n, o, u) {
25925        Ny(i, o, u), Ny(n, 2 * o, 2 * u), Ny(n, 2 * o + 1, 2 * u + 1);
25926      }
25927      function Ny(i, n, o) {
25928        const u = i[n];
25929        i[n] = i[o], i[o] = u;
25930      }
25931      function D1(i, n, o, u) {
25932        const p = i - o, v = n - u;
25933        return p * p + v * v;
25934      }
25935      var $y;
25936      m.bg = void 0, ($y = m.bg || (m.bg = {})).create = "create", $y.load = "load", $y.fullLoad = "fullLoad";
25937      let gp = null, Ef = [];
25938      const jy = 1e3 / 60, Vy = "loadTime", Uy = "fullLoadTime", nD = { mark(i) {
25939        performance.mark(i);
25940      }, frame(i) {
25941        const n = i;
25942        gp != null && Ef.push(n - gp), gp = n;
25943      }, clearMetrics() {
25944        gp = null, Ef = [], performance.clearMeasures(Vy), performance.clearMeasures(Uy);
25945        for (const i in m.bg) performance.clearMarks(m.bg[i]);
25946      }, getPerformanceMetrics() {
25947        performance.measure(Vy, m.bg.create, m.bg.load), performance.measure(Uy, m.bg.create, m.bg.fullLoad);
25948        const i = performance.getEntriesByName(Vy)[0].duration, n = performance.getEntriesByName(Uy)[0].duration, o = Ef.length, u = 1 / (Ef.reduce((v, b) => v + b, 0) / o / 1e3), p = Ef.filter((v) => v > jy).reduce((v, b) => v + (b - jy) / jy, 0);
25949        return { loadTime: i, fullLoadTime: n, fps: u, percentDroppedFrames: p / (o + p) * 100, totalFrames: o };
25950      } };
25951      m.$ = class extends N {
25952      }, m.A = Ru, m.B = Jg, m.C = function(i) {
25953        if (Ge == null) {
25954          const n = i.navigator ? i.navigator.userAgent : null;
25955          Ge = !!i.safari || !(!n || !(/\b(iPad|iPhone|iPod)\b/.test(n) || n.match("Safari") && !n.match("Chrome")));
25956        }
25957        return Ge;
25958      }, m.D = Lt, m.E = Ze, m.F = class {
25959        constructor(i, n) {
25960          this.target = i, this.mapId = n, this.resolveRejects = {}, this.tasks = {}, this.taskQueue = [], this.abortControllers = {}, this.messageHandlers = {}, this.invoker = new WO(() => this.process()), this.subscription = function(o, u, p, v) {
25961            return o.addEventListener(u, p, !1), { unsubscribe: () => {
25962              o.removeEventListener(u, p, !1);
25963            } };
25964          }(this.target, "message", (o) => this.receive(o)), this.globalScope = st(self) ? i : window;
25965        }
25966        registerMessageHandler(i, n) {
25967          this.messageHandlers[i] = n;
25968        }
25969        sendAsync(i, n) {
25970          return new Promise((o, u) => {
25971            const p = Math.round(1e18 * Math.random()).toString(36).substring(0, 10);
25972            this.resolveRejects[p] = { resolve: o, reject: u }, n && n.signal.addEventListener("abort", () => {
25973              delete this.resolveRejects[p];
25974              const x = { id: p, type: "<cancel>", origin: location.origin, targetMapId: i.targetMapId, sourceMapId: this.mapId };
25975              this.target.postMessage(x);
25976            }, { once: !0 });
25977            const v = [], b = Object.assign(Object.assign({}, i), { id: p, sourceMapId: this.mapId, origin: location.origin, data: El(i.data, v) });
25978            this.target.postMessage(b, { transfer: v });
25979          });
25980        }
25981        receive(i) {
25982          const n = i.data, o = n.id;
25983          if (!(n.origin !== "file://" && location.origin !== "file://" && n.origin !== "resource://android" && location.origin !== "resource://android" && n.origin !== location.origin || n.targetMapId && this.mapId !== n.targetMapId)) {
25984            if (n.type === "<cancel>") {
25985              delete this.tasks[o];
25986              const u = this.abortControllers[o];
25987              return delete this.abortControllers[o], void (u && u.abort());
25988            }
25989            if (st(self) || n.mustQueue) return this.tasks[o] = n, this.taskQueue.push(o), void this.invoker.trigger();
25990            this.processTask(o, n);
25991          }
25992        }
25993        process() {
25994          if (this.taskQueue.length === 0) return;
25995          const i = this.taskQueue.shift(), n = this.tasks[i];
25996          delete this.tasks[i], this.taskQueue.length > 0 && this.invoker.trigger(), n && this.processTask(i, n);
25997        }
25998        processTask(i, n) {
25999          return c(this, void 0, void 0, function* () {
26000            if (n.type === "<response>") {
26001              const p = this.resolveRejects[i];
26002              return delete this.resolveRejects[i], p ? void (n.error ? p.reject(Al(n.error)) : p.resolve(Al(n.data))) : void 0;
26003            }
26004            if (!this.messageHandlers[n.type]) return void this.completeTask(i, new Error(`Could not find a registered handler for ${n.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));
26005            const o = Al(n.data), u = new AbortController();
26006            this.abortControllers[i] = u;
26007            try {
26008              const p = yield this.messageHandlers[n.type](n.sourceMapId, o, u);
26009              this.completeTask(i, null, p);
26010            } catch (p) {
26011              this.completeTask(i, p);
26012            }
26013          });
26014        }
26015        completeTask(i, n, o) {
26016          const u = [];
26017          delete this.abortControllers[i];
26018          const p = { id: i, type: "<response>", sourceMapId: this.mapId, origin: location.origin, error: n ? El(n) : null, data: El(o, u) };
26019          this.target.postMessage(p, { transfer: u });
26020        }
26021        remove() {
26022          this.invoker.remove(), this.subscription.unsubscribe();
26023        }
26024      }, m.G = Fr, m.H = function() {
26025        var i = new Ru(16);
26026        return Ru != Float32Array && (i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0), i[0] = 1, i[5] = 1, i[10] = 1, i[15] = 1, i;
26027      }, m.I = Ty, m.J = function(i, n, o) {
26028        var u, p, v, b, x, E, k, L, B, V, q, W, Y = o[0], oe = o[1], he = o[2];
26029        return n === i ? (i[12] = n[0] * Y + n[4] * oe + n[8] * he + n[12], i[13] = n[1] * Y + n[5] * oe + n[9] * he + n[13], i[14] = n[2] * Y + n[6] * oe + n[10] * he + n[14], i[15] = n[3] * Y + n[7] * oe + n[11] * he + n[15]) : (p = n[1], v = n[2], b = n[3], x = n[4], E = n[5], k = n[6], L = n[7], B = n[8], V = n[9], q = n[10], W = n[11], i[0] = u = n[0], i[1] = p, i[2] = v, i[3] = b, i[4] = x, i[5] = E, i[6] = k, i[7] = L, i[8] = B, i[9] = V, i[10] = q, i[11] = W, i[12] = u * Y + x * oe + B * he + n[12], i[13] = p * Y + E * oe + V * he + n[13], i[14] = v * Y + k * oe + q * he + n[14], i[15] = b * Y + L * oe + W * he + n[15]), i;
26030      }, m.K = function(i, n, o) {
26031        var u = o[0], p = o[1], v = o[2];
26032        return i[0] = n[0] * u, i[1] = n[1] * u, i[2] = n[2] * u, i[3] = n[3] * u, i[4] = n[4] * p, i[5] = n[5] * p, i[6] = n[6] * p, i[7] = n[7] * p, i[8] = n[8] * v, i[9] = n[9] * v, i[10] = n[10] * v, i[11] = n[11] * v, i[12] = n[12], i[13] = n[13], i[14] = n[14], i[15] = n[15], i;
26033      }, m.L = d0, m.M = function(i, n) {
26034        const o = {};
26035        for (let u = 0; u < n.length; u++) {
26036          const p = n[u];
26037          p in i && (o[p] = i[p]);
26038        }
26039        return o;
26040      }, m.N = Bl, m.O = l1, m.P = R, m.Q = c1, m.R = Gs, m.S = Zs, m.T = Tu, m.U = Ce, m.V = ge, m.W = Ht, m.X = Hn, m.Y = S, m.Z = wf, m._ = c, m.a = en, m.a$ = function(i, n) {
26041        var o = i[0], u = i[1], p = i[2], v = i[3], b = i[4], x = i[5], E = i[6], k = i[7], L = i[8], B = i[9], V = i[10], q = i[11], W = i[12], Y = i[13], oe = i[14], he = i[15], De = n[0], xe = n[1], ke = n[2], Ve = n[3], at = n[4], At = n[5], Kt = n[6], St = n[7], _t = n[8], $t = n[9], Ot = n[10], It = n[11], Ke = n[12], Vt = n[13], Bt = n[14], nr = n[15];
26042        return Math.abs(o - De) <= Gi * Math.max(1, Math.abs(o), Math.abs(De)) && Math.abs(u - xe) <= Gi * Math.max(1, Math.abs(u), Math.abs(xe)) && Math.abs(p - ke) <= Gi * Math.max(1, Math.abs(p), Math.abs(ke)) && Math.abs(v - Ve) <= Gi * Math.max(1, Math.abs(v), Math.abs(Ve)) && Math.abs(b - at) <= Gi * Math.max(1, Math.abs(b), Math.abs(at)) && Math.abs(x - At) <= Gi * Math.max(1, Math.abs(x), Math.abs(At)) && Math.abs(E - Kt) <= Gi * Math.max(1, Math.abs(E), Math.abs(Kt)) && Math.abs(k - St) <= Gi * Math.max(1, Math.abs(k), Math.abs(St)) && Math.abs(L - _t) <= Gi * Math.max(1, Math.abs(L), Math.abs(_t)) && Math.abs(B - $t) <= Gi * Math.max(1, Math.abs(B), Math.abs($t)) && Math.abs(V - Ot) <= Gi * Math.max(1, Math.abs(V), Math.abs(Ot)) && Math.abs(q - It) <= Gi * Math.max(1, Math.abs(q), Math.abs(It)) && Math.abs(W - Ke) <= Gi * Math.max(1, Math.abs(W), Math.abs(Ke)) && Math.abs(Y - Vt) <= Gi * Math.max(1, Math.abs(Y), Math.abs(Vt)) && Math.abs(oe - Bt) <= Gi * Math.max(1, Math.abs(oe), Math.abs(Bt)) && Math.abs(he - nr) <= Gi * Math.max(1, Math.abs(he), Math.abs(nr));
26043      }, m.a0 = Tr, m.a1 = Ry, m.a2 = We, m.a3 = (i) => {
26044        const n = window.document.createElement("video");
26045        return n.muted = !0, new Promise((o) => {
26046          n.onloadstart = () => {
26047            o(n);
26048          };
26049          for (const u of i) {
26050            const p = window.document.createElement("source");
26051            Jt(u) || (n.crossOrigin = "Anonymous"), p.src = u, n.appendChild(p);
26052          }
26053        });
26054      }, m.a4 = function() {
26055        return Ne++;
26056      }, m.a5 = Et, m.a6 = $u, m.a7 = wl, m.a8 = Mc, m.a9 = m1, m.aA = function(i) {
26057        if (i.type === "custom") return new ZO(i);
26058        switch (i.type) {
26059          case "background":
26060            return new qO(i);
26061          case "circle":
26062            return new kk(i);
26063          case "fill":
26064            return new Wk(i);
26065          case "fill-extrusion":
26066            return new cO(i);
26067          case "heatmap":
26068            return new Dk(i);
26069          case "hillshade":
26070            return new Lk(i);
26071          case "line":
26072            return new yO(i);
26073          case "raster":
26074            return new GO(i);
26075          case "symbol":
26076            return new hp(i);
26077        }
26078      }, m.aB = He, m.aC = function(i, n) {
26079        if (!i) return [{ command: "setStyle", args: [n] }];
26080        let o = [];
26081        try {
26082          if (!rt(i.version, n.version)) return [{ command: "setStyle", args: [n] }];
26083          rt(i.center, n.center) || o.push({ command: "setCenter", args: [n.center] }), rt(i.zoom, n.zoom) || o.push({ command: "setZoom", args: [n.zoom] }), rt(i.bearing, n.bearing) || o.push({ command: "setBearing", args: [n.bearing] }), rt(i.pitch, n.pitch) || o.push({ command: "setPitch", args: [n.pitch] }), rt(i.sprite, n.sprite) || o.push({ command: "setSprite", args: [n.sprite] }), rt(i.glyphs, n.glyphs) || o.push({ command: "setGlyphs", args: [n.glyphs] }), rt(i.transition, n.transition) || o.push({ command: "setTransition", args: [n.transition] }), rt(i.light, n.light) || o.push({ command: "setLight", args: [n.light] }), rt(i.terrain, n.terrain) || o.push({ command: "setTerrain", args: [n.terrain] }), rt(i.sky, n.sky) || o.push({ command: "setSky", args: [n.sky] }), rt(i.projection, n.projection) || o.push({ command: "setProjection", args: [n.projection] });
26084          const u = {}, p = [];
26085          (function(b, x, E, k) {
26086            let L;
26087            for (L in x = x || {}, b = b || {}) Object.prototype.hasOwnProperty.call(b, L) && (Object.prototype.hasOwnProperty.call(x, L) || nt(L, E, k));
26088            for (L in x) Object.prototype.hasOwnProperty.call(x, L) && (Object.prototype.hasOwnProperty.call(b, L) ? rt(b[L], x[L]) || (b[L].type === "geojson" && x[L].type === "geojson" && Nt(b, x, L) ? Qe(E, { command: "setGeoJSONSourceData", args: [L, x[L].data] }) : Tt(L, x, E, k)) : dt(L, x, E));
26089          })(i.sources, n.sources, p, u);
26090          const v = [];
26091          i.layers && i.layers.forEach((b) => {
26092            "source" in b && u[b.source] ? o.push({ command: "removeLayer", args: [b.id] }) : v.push(b);
26093          }), o = o.concat(p), function(b, x, E) {
26094            x = x || [];
26095            const k = (b = b || []).map(Gt), L = x.map(Gt), B = b.reduce(sr, {}), V = x.reduce(sr, {}), q = k.slice(), W = /* @__PURE__ */ Object.create(null);
26096            let Y, oe, he, De, xe;
26097            for (let ke = 0, Ve = 0; ke < k.length; ke++) Y = k[ke], Object.prototype.hasOwnProperty.call(V, Y) ? Ve++ : (Qe(E, { command: "removeLayer", args: [Y] }), q.splice(q.indexOf(Y, Ve), 1));
26098            for (let ke = 0, Ve = 0; ke < L.length; ke++) Y = L[L.length - 1 - ke], q[q.length - 1 - ke] !== Y && (Object.prototype.hasOwnProperty.call(B, Y) ? (Qe(E, { command: "removeLayer", args: [Y] }), q.splice(q.lastIndexOf(Y, q.length - Ve), 1)) : Ve++, De = q[q.length - ke], Qe(E, { command: "addLayer", args: [V[Y], De] }), q.splice(q.length - ke, 0, Y), W[Y] = !0);
26099            for (let ke = 0; ke < L.length; ke++) if (Y = L[ke], oe = B[Y], he = V[Y], !W[Y] && !rt(oe, he)) if (rt(oe.source, he.source) && rt(oe["source-layer"], he["source-layer"]) && rt(oe.type, he.type)) {
26100              for (xe in Dt(oe.layout, he.layout, E, Y, null, "setLayoutProperty"), Dt(oe.paint, he.paint, E, Y, null, "setPaintProperty"), rt(oe.filter, he.filter) || Qe(E, { command: "setFilter", args: [Y, he.filter] }), rt(oe.minzoom, he.minzoom) && rt(oe.maxzoom, he.maxzoom) || Qe(E, { command: "setLayerZoomRange", args: [Y, he.minzoom, he.maxzoom] }), oe) Object.prototype.hasOwnProperty.call(oe, xe) && xe !== "layout" && xe !== "paint" && xe !== "filter" && xe !== "metadata" && xe !== "minzoom" && xe !== "maxzoom" && (xe.indexOf("paint.") === 0 ? Dt(oe[xe], he[xe], E, Y, xe.slice(6), "setPaintProperty") : rt(oe[xe], he[xe]) || Qe(E, { command: "setLayerProperty", args: [Y, xe, he[xe]] }));
26101              for (xe in he) Object.prototype.hasOwnProperty.call(he, xe) && !Object.prototype.hasOwnProperty.call(oe, xe) && xe !== "layout" && xe !== "paint" && xe !== "filter" && xe !== "metadata" && xe !== "minzoom" && xe !== "maxzoom" && (xe.indexOf("paint.") === 0 ? Dt(oe[xe], he[xe], E, Y, xe.slice(6), "setPaintProperty") : rt(oe[xe], he[xe]) || Qe(E, { command: "setLayerProperty", args: [Y, xe, he[xe]] }));
26102            } else Qe(E, { command: "removeLayer", args: [Y] }), De = q[q.lastIndexOf(Y) + 1], Qe(E, { command: "addLayer", args: [he, De] });
26103          }(v, n.layers, o);
26104        } catch (u) {
26105          console.warn("Unable to compute style diff:", u), o = [{ command: "setStyle", args: [n] }];
26106        }
26107        return o;
26108      }, m.aD = function(i) {
26109        const n = [], o = i.id;
26110        return o === void 0 && n.push({ message: `layers.${o}: missing required property "id"` }), i.render === void 0 && n.push({ message: `layers.${o}: missing required method "render"` }), i.renderingMode && i.renderingMode !== "2d" && i.renderingMode !== "3d" && n.push({ message: `layers.${o}: property "renderingMode" must be either "2d" or "3d"` }), n;
26111      }, m.aE = function i(n, o) {
26112        if (Array.isArray(n)) {
26113          if (!Array.isArray(o) || n.length !== o.length) return !1;
26114          for (let u = 0; u < n.length; u++) if (!i(n[u], o[u])) return !1;
26115          return !0;
26116        }
26117        if (typeof n == "object" && n !== null && o !== null) {
26118          if (typeof o != "object" || Object.keys(n).length !== Object.keys(o).length) return !1;
26119          for (const u in n) if (!i(n[u], o[u])) return !1;
26120          return !0;
26121        }
26122        return n === o;
26123      }, m.aF = Oe, m.aG = ze, m.aH = class extends Cc {
26124        constructor(i, n) {
26125          super(i, n), this.current = 0;
26126        }
26127        set(i) {
26128          this.current !== i && (this.current = i, this.gl.uniform1i(this.location, i));
26129        }
26130      }, m.aI = Yd, m.aJ = class extends Cc {
26131        constructor(i, n) {
26132          super(i, n), this.current = Sk;
26133        }
26134        set(i) {
26135          if (i[12] !== this.current[12] || i[0] !== this.current[0]) return this.current = i, void this.gl.uniformMatrix4fv(this.location, !1, i);
26136          for (let n = 1; n < 16; n++) if (i[n] !== this.current[n]) {
26137            this.current = i, this.gl.uniformMatrix4fv(this.location, !1, i);
26138            break;
26139          }
26140        }
26141      }, m.aK = r0, m.aL = n0, m.aM = Mr, m.aN = class extends Cc {
26142        constructor(i, n) {
26143          super(i, n), this.current = [0, 0, 0];
26144        }
26145        set(i) {
26146          i[0] === this.current[0] && i[1] === this.current[1] && i[2] === this.current[2] || (this.current = i, this.gl.uniform3f(this.location, i[0], i[1], i[2]));
26147        }
26148      }, m.aO = class extends Cc {
26149        constructor(i, n) {
26150          super(i, n), this.current = [0, 0];
26151        }
26152        set(i) {
26153          i[0] === this.current[0] && i[1] === this.current[1] || (this.current = i, this.gl.uniform2f(this.location, i[0], i[1]));
26154        }
26155      }, m.aP = function(i, n, o, u, p, v, b) {
26156        var x = 1 / (n - o), E = 1 / (u - p), k = 1 / (v - b);
26157        return i[0] = -2 * x, i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = -2 * E, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[10] = 2 * k, i[11] = 0, i[12] = (n + o) * x, i[13] = (p + u) * E, i[14] = (b + v) * k, i[15] = 1, i;
26158      }, m.aQ = Mk, m.aR = class extends Te {
26159      }, m.aS = xO, m.aT = class extends Fe {
26160      }, m.aU = fy, m.aV = function(i) {
26161        return i <= 1 ? 1 : Math.pow(2, Math.ceil(Math.log(i) / Math.LN2));
26162      }, m.aW = _0, m.aX = vi, m.aY = Hs, m.aZ = class extends Ft {
26163      }, m.a_ = function(i, n) {
26164        return i[0] === n[0] && i[1] === n[1] && i[2] === n[2] && i[3] === n[3] && i[4] === n[4] && i[5] === n[5] && i[6] === n[6] && i[7] === n[7] && i[8] === n[8] && i[9] === n[9] && i[10] === n[10] && i[11] === n[11] && i[12] === n[12] && i[13] === n[13] && i[14] === n[14] && i[15] === n[15];
26165      }, m.aa = function(i) {
26166        const n = {};
26167        if (i.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g, (o, u, p, v) => {
26168          const b = p || v;
26169          return n[u] = !b || b.toLowerCase(), "";
26170        }), n["max-age"]) {
26171          const o = parseInt(n["max-age"], 10);
26172          isNaN(o) ? delete n["max-age"] : n["max-age"] = o;
26173        }
26174        return n;
26175      }, m.ab = function(i, n) {
26176        const o = [];
26177        for (const u in i) u in n || o.push(u);
26178        return o;
26179      }, m.ac = Ae, m.ad = function(i, n, o) {
26180        var u = Math.sin(o), p = Math.cos(o), v = n[0], b = n[1], x = n[2], E = n[3], k = n[4], L = n[5], B = n[6], V = n[7];
26181        return n !== i && (i[8] = n[8], i[9] = n[9], i[10] = n[10], i[11] = n[11], i[12] = n[12], i[13] = n[13], i[14] = n[14], i[15] = n[15]), i[0] = v * p + k * u, i[1] = b * p + L * u, i[2] = x * p + B * u, i[3] = E * p + V * u, i[4] = k * p - v * u, i[5] = L * p - b * u, i[6] = B * p - x * u, i[7] = V * p - E * u, i;
26182      }, m.ae = function(i) {
26183        var n = new Ru(16);
26184        return n[0] = i[0], n[1] = i[1], n[2] = i[2], n[3] = i[3], n[4] = i[4], n[5] = i[5], n[6] = i[6], n[7] = i[7], n[8] = i[8], n[9] = i[9], n[10] = i[10], n[11] = i[11], n[12] = i[12], n[13] = i[13], n[14] = i[14], n[15] = i[15], n;
26185      }, m.af = rp, m.ag = function(i, n) {
26186        let o = 0, u = 0;
26187        if (i.kind === "constant") u = i.layoutSize;
26188        else if (i.kind !== "source") {
26189          const { interpolationType: p, minZoom: v, maxZoom: b } = i, x = p ? Ae(kr.interpolationFactor(p, n, v, b), 0, 1) : 0;
26190          i.kind === "camera" ? u = Zt.number(i.minSize, i.maxSize, x) : o = x;
26191        }
26192        return { uSizeT: o, uSize: u };
26193      }, m.ai = function(i, { uSize: n, uSizeT: o }, { lowerSize: u, upperSize: p }) {
26194        return i.kind === "source" ? u / aa : i.kind === "composite" ? Zt.number(u / aa, p / aa, o) : n;
26195      }, m.aj = Iy, m.ak = function(i, n, o, u) {
26196        const p = n.y - i.y, v = n.x - i.x, b = u.y - o.y, x = u.x - o.x, E = b * v - x * p;
26197        if (E === 0) return null;
26198        const k = (x * (i.y - o.y) - b * (i.x - o.x)) / E;
26199        return new R(i.x + k * v, i.y + k * p);
26200      }, m.al = v1, m.am = a0, m.an = cy, m.ao = function(i) {
26201        let n = 1 / 0, o = 1 / 0, u = -1 / 0, p = -1 / 0;
26202        for (const v of i) n = Math.min(n, v.x), o = Math.min(o, v.y), u = Math.max(u, v.x), p = Math.max(p, v.y);
26203        return [n, o, u, p];
26204      }, m.ap = Yn, m.ar = Cy, m.as = function(i, n) {
26205        var o = n[0], u = n[1], p = n[2], v = n[3], b = n[4], x = n[5], E = n[6], k = n[7], L = n[8], B = n[9], V = n[10], q = n[11], W = n[12], Y = n[13], oe = n[14], he = n[15], De = o * x - u * b, xe = o * E - p * b, ke = o * k - v * b, Ve = u * E - p * x, at = u * k - v * x, At = p * k - v * E, Kt = L * Y - B * W, St = L * oe - V * W, _t = L * he - q * W, $t = B * oe - V * Y, Ot = B * he - q * Y, It = V * he - q * oe, Ke = De * It - xe * Ot + ke * $t + Ve * _t - at * St + At * Kt;
26206        return Ke ? (i[0] = (x * It - E * Ot + k * $t) * (Ke = 1 / Ke), i[1] = (p * Ot - u * It - v * $t) * Ke, i[2] = (Y * At - oe * at + he * Ve) * Ke, i[3] = (V * at - B * At - q * Ve) * Ke, i[4] = (E * _t - b * It - k * St) * Ke, i[5] = (o * It - p * _t + v * St) * Ke, i[6] = (oe * ke - W * At - he * xe) * Ke, i[7] = (L * At - V * ke + q * xe) * Ke, i[8] = (b * Ot - x * _t + k * Kt) * Ke, i[9] = (u * _t - o * Ot - v * Kt) * Ke, i[10] = (W * at - Y * ke + he * De) * Ke, i[11] = (B * ke - L * at - q * De) * Ke, i[12] = (x * St - b * $t - E * Kt) * Ke, i[13] = (o * $t - u * St + p * Kt) * Ke, i[14] = (Y * xe - W * Ve - oe * De) * Ke, i[15] = (L * Ve - B * xe + V * De) * Ke, i) : null;
26207      }, m.at = Fy, m.au = Ay, m.av = zy, m.aw = function() {
26208        const i = {}, n = re.$version;
26209        for (const o in re.$root) {
26210          const u = re.$root[o];
26211          if (u.required) {
26212            let p = null;
26213            p = o === "version" ? n : u.type === "array" ? [] : {}, p != null && (i[o] = p);
26214          }
26215        }
26216        return i;
26217      }, m.ax = tf, m.ay = kn, m.az = function(i) {
26218        i = i.slice();
26219        const n = /* @__PURE__ */ Object.create(null);
26220        for (let o = 0; o < i.length; o++) n[i[o].id] = i[o];
26221        for (let o = 0; o < i.length; o++) "ref" in i[o] && (i[o] = ft(i[o], n[i[o].ref]));
26222        return i;
26223      }, m.b = ct, m.b0 = function(i, n) {
26224        return i[0] = n[0], i[1] = n[1], i[2] = n[2], i[3] = n[3], i[4] = n[4], i[5] = n[5], i[6] = n[6], i[7] = n[7], i[8] = n[8], i[9] = n[9], i[10] = n[10], i[11] = n[11], i[12] = n[12], i[13] = n[13], i[14] = n[14], i[15] = n[15], i;
26225      }, m.b1 = function(i, n, o) {
26226        return i[0] = n[0] * o[0], i[1] = n[1] * o[1], i[2] = n[2] * o[2], i[3] = n[3] * o[3], i;
26227      }, m.b2 = function(i, n) {
26228        return i[0] * n[0] + i[1] * n[1] + i[2] * n[2] + i[3] * n[3];
26229      }, m.b3 = Se, m.b4 = f1, m.b5 = u1, m.b6 = function(i, n, o, u, p) {
26230        var v, b = 1 / Math.tan(n / 2);
26231        return i[0] = b / o, i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = b, i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[11] = -1, i[12] = 0, i[13] = 0, i[15] = 0, p != null && p !== 1 / 0 ? (i[10] = (p + u) * (v = 1 / (u - p)), i[14] = 2 * p * u * v) : (i[10] = -1, i[14] = -2 * u), i;
26232      }, m.b7 = function(i, n, o) {
26233        var u = Math.sin(o), p = Math.cos(o), v = n[4], b = n[5], x = n[6], E = n[7], k = n[8], L = n[9], B = n[10], V = n[11];
26234        return n !== i && (i[0] = n[0], i[1] = n[1], i[2] = n[2], i[3] = n[3], i[12] = n[12], i[13] = n[13], i[14] = n[14], i[15] = n[15]), i[4] = v * p + k * u, i[5] = b * p + L * u, i[6] = x * p + B * u, i[7] = E * p + V * u, i[8] = k * p - v * u, i[9] = L * p - b * u, i[10] = B * p - x * u, i[11] = V * p - E * u, i;
26235      }, m.b8 = X, m.b9 = ye, m.bA = B0, m.bB = function(i) {
26236        return i.message === ur;
26237      }, m.bC = si, m.bD = cs, m.ba = function(i) {
26238        return i * Math.PI / 180;
26239      }, m.bb = function(i, n) {
26240        const { x: o, y: u } = wf.fromLngLat(n);
26241        return !(i < 0 || i > 25 || u < 0 || u >= 1 || o < 0 || o >= 1);
26242      }, m.bc = function(i, n) {
26243        return i[0] = n[0], i[1] = 0, i[2] = 0, i[3] = 0, i[4] = 0, i[5] = n[1], i[6] = 0, i[7] = 0, i[8] = 0, i[9] = 0, i[10] = n[2], i[11] = 0, i[12] = 0, i[13] = 0, i[14] = 0, i[15] = 1, i;
26244      }, m.bd = class extends F {
26245      }, m.be = Oy, m.bf = nD, m.bh = dn, m.bi = function(i, n) {
26246        en.REGISTERED_PROTOCOLS[i] = n;
26247      }, m.bj = function(i) {
26248        delete en.REGISTERED_PROTOCOLS[i];
26249      }, m.bk = function(i, n) {
26250        const o = {};
26251        for (let p = 0; p < i.length; p++) {
26252          const v = n && n[i[p].id] || vs(i[p]);
26253          n && (n[i[p].id] = v);
26254          let b = o[v];
26255          b || (b = o[v] = []), b.push(i[p]);
26256        }
26257        const u = [];
26258        for (const p in o) u.push(o[p]);
26259        return u;
26260      }, m.bl = Mt, m.bm = p1, m.bn = g1, m.bo = Z0, m.bp = function(i) {
26261        i.bucket.createArrays(), i.bucket.tilePixelRatio = Hn / (512 * i.bucket.overscaling), i.bucket.compareText = {}, i.bucket.iconsNeedLinear = !1;
26262        const n = i.bucket.layers[0], o = n.layout, u = n._unevaluatedLayout._values, p = { layoutIconSize: u["icon-size"].possiblyEvaluate(new gn(i.bucket.zoom + 1), i.canonical), layoutTextSize: u["text-size"].possiblyEvaluate(new gn(i.bucket.zoom + 1), i.canonical), textMaxSize: u["text-size"].possiblyEvaluate(new gn(18)) };
26263        if (i.bucket.textSizeData.kind === "composite") {
26264          const { minZoom: k, maxZoom: L } = i.bucket.textSizeData;
26265          p.compositeTextSizes = [u["text-size"].possiblyEvaluate(new gn(k), i.canonical), u["text-size"].possiblyEvaluate(new gn(L), i.canonical)];
26266        }
26267        if (i.bucket.iconSizeData.kind === "composite") {
26268          const { minZoom: k, maxZoom: L } = i.bucket.iconSizeData;
26269          p.compositeIconSizes = [u["icon-size"].possiblyEvaluate(new gn(k), i.canonical), u["icon-size"].possiblyEvaluate(new gn(L), i.canonical)];
26270        }
26271        const v = o.get("text-line-height") * Yn, b = o.get("text-rotation-alignment") !== "viewport" && o.get("symbol-placement") !== "point", x = o.get("text-keep-upright"), E = o.get("text-size");
26272        for (const k of i.bucket.features) {
26273          const L = o.get("text-font").evaluate(k, {}, i.canonical).join(","), B = E.evaluate(k, {}, i.canonical), V = p.layoutTextSize.evaluate(k, {}, i.canonical), q = p.layoutIconSize.evaluate(k, {}, i.canonical), W = { horizontal: {}, vertical: void 0 }, Y = k.text;
26274          let oe, he = [0, 0];
26275          if (Y) {
26276            const ke = Y.toString(), Ve = o.get("text-letter-spacing").evaluate(k, {}, i.canonical) * Yn, at = Yg(ke) ? Ve : 0, At = o.get("text-anchor").evaluate(k, {}, i.canonical), Kt = I1(n, k, i.canonical);
26277            if (!Kt) {
26278              const Ot = o.get("text-radial-offset").evaluate(k, {}, i.canonical);
26279              he = Ot ? C1(At, [Ot * Yn, Ly]) : o.get("text-offset").evaluate(k, {}, i.canonical).map((It) => It * Yn);
26280            }
26281            let St = b ? "center" : o.get("text-justify").evaluate(k, {}, i.canonical);
26282            const _t = o.get("symbol-placement") === "point" ? o.get("text-max-width").evaluate(k, {}, i.canonical) * Yn : 1 / 0, $t = () => {
26283              i.bucket.allowVerticalPlacement && rf(ke) && (W.vertical = lp(Y, i.glyphMap, i.glyphPositions, i.imagePositions, L, _t, v, At, "left", at, he, m.ah.vertical, !0, V, B));
26284            };
26285            if (!b && Kt) {
26286              const Ot = /* @__PURE__ */ new Set();
26287              if (St === "auto") for (let Ke = 0; Ke < Kt.values.length; Ke += 2) Ot.add(Fy(Kt.values[Ke]));
26288              else Ot.add(St);
26289              let It = !1;
26290              for (const Ke of Ot) if (!W.horizontal[Ke]) if (It) W.horizontal[Ke] = W.horizontal[0];
26291              else {
26292                const Vt = lp(Y, i.glyphMap, i.glyphPositions, i.imagePositions, L, _t, v, "center", Ke, at, he, m.ah.horizontal, !1, V, B);
26293                Vt && (W.horizontal[Ke] = Vt, It = Vt.positionedLines.length === 1);
26294              }
26295              $t();
26296            } else {
26297              St === "auto" && (St = Fy(At));
26298              const Ot = lp(Y, i.glyphMap, i.glyphPositions, i.imagePositions, L, _t, v, At, St, at, he, m.ah.horizontal, !1, V, B);
26299              Ot && (W.horizontal[St] = Ot), $t(), rf(ke) && b && x && (W.vertical = lp(Y, i.glyphMap, i.glyphPositions, i.imagePositions, L, _t, v, At, St, at, he, m.ah.vertical, !1, V, B));
26300            }
26301          }
26302          let De = !1;
26303          if (k.icon && k.icon.name) {
26304            const ke = i.imageMap[k.icon.name];
26305            ke && (oe = NO(i.imagePositions[k.icon.name], o.get("icon-offset").evaluate(k, {}, i.canonical), o.get("icon-anchor").evaluate(k, {}, i.canonical)), De = !!ke.sdf, i.bucket.sdfIcons === void 0 ? i.bucket.sdfIcons = De : i.bucket.sdfIcons !== De && $e("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"), (ke.pixelRatio !== i.bucket.pixelRatio || o.get("icon-rotate").constantOr(1) !== 0) && (i.bucket.iconsNeedLinear = !0));
26306          }
26307          const xe = M1(W.horizontal) || W.vertical;
26308          i.bucket.iconsInText = !!xe && xe.iconsInText, (xe || oe) && tD(i.bucket, k, W, oe, i.imageMap, p, V, q, he, De, i.canonical);
26309        }
26310        i.showCollisionBoxes && i.bucket.generateCollisionDebugBuffers();
26311      }, m.bq = by, m.br = yy, m.bs = vy, m.bt = Ll, m.bu = wy, m.bv = class {
26312        constructor(i) {
26313          this._marks = { start: [i.url, "start"].join("#"), end: [i.url, "end"].join("#"), measure: i.url.toString() }, performance.mark(this._marks.start);
26314        }
26315        finish() {
26316          performance.mark(this._marks.end);
26317          let i = performance.getEntriesByName(this._marks.measure);
26318          return i.length === 0 && (performance.measure(this._marks.measure, this._marks.start, this._marks.end), i = performance.getEntriesByName(this._marks.measure), performance.clearMarks(this._marks.start), performance.clearMarks(this._marks.end), performance.clearMeasures(this._marks.measure)), i;
26319        }
26320      }, m.bw = function(i, n, o, u, p) {
26321        return c(this, void 0, void 0, function* () {
26322          if (ge()) try {
26323            return yield Ht(i, n, o, u, p);
26324          } catch {
26325          }
26326          return function(v, b, x, E, k) {
26327            const L = v.width, B = v.height;
26328            fr && Qt || (fr = new OffscreenCanvas(L, B), Qt = fr.getContext("2d", { willReadFrequently: !0 })), fr.width = L, fr.height = B, Qt.drawImage(v, 0, 0, L, B);
26329            const V = Qt.getImageData(b, x, E, k);
26330            return Qt.clearRect(0, 0, L, B), V.data;
26331          }(i, n, o, u, p);
26332        });
26333      }, m.bx = d1, m.by = w, m.bz = O, m.c = Ar, m.d = (i) => c(void 0, void 0, void 0, function* () {
26334        if (i.byteLength === 0) return createImageBitmap(new ImageData(1, 1));
26335        const n = new Blob([new Uint8Array(i)], { type: "image/png" });
26336        try {
26337          return createImageBitmap(n);
26338        } catch (o) {
26339          throw new Error(`Could not load image because of ${o.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`);
26340        }
26341      }), m.e = je, m.f = (i) => new Promise((n, o) => {
26342        const u = new Image();
26343        u.onload = () => {
26344          n(u), URL.revokeObjectURL(u.src), u.onload = null, window.requestAnimationFrame(() => {
26345            u.src = ot;
26346          });
26347        }, u.onerror = () => o(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));
26348        const p = new Blob([new Uint8Array(i)], { type: "image/png" });
vendor: 25,297 bytes, lines 26349-26827
26349        u.src = i.byteLength ? URL.createObjectURL(p) : ot;
26350      }), m.g = $r, m.h = (i, n) => tn(je(i, { type: "json" }), n), m.i = st, m.j = Ee, m.k = me, m.l = (i, n) => tn(je(i, { type: "arrayBuffer" }), n), m.m = tn, m.n = function(i) {
26351        return new wy(i).readFields(OO, []);
26352      }, m.o = ff, m.p = G0, m.q = _, m.r = Xg, m.s = Jt, m.t = Qh, m.u = Na, m.v = re, m.w = $e, m.x = function([i, n, o]) {
26353        return n += 90, n *= Math.PI / 180, o *= Math.PI / 180, { x: i * Math.cos(n) * Math.sin(o), y: i * Math.sin(n) * Math.sin(o), z: i * Math.cos(o) };
26354      }, m.y = Zt, m.z = gn;
26355    }), h("worker", ["./shared"], function(m) {
26356      class c {
26357        constructor(U) {
26358          this.keyCache = {}, U && this.replace(U);
26359        }
26360        replace(U) {
26361          this._layerConfigs = {}, this._layers = {}, this.update(U, []);
26362        }
26363        update(U, A) {
26364          for (const j of U) {
26365            this._layerConfigs[j.id] = j;
26366            const H = this._layers[j.id] = m.aA(j);
26367            H._featureFilter = m.a7(H.filter), this.keyCache[j.id] && delete this.keyCache[j.id];
26368          }
26369          for (const j of A) delete this.keyCache[j], delete this._layerConfigs[j], delete this._layers[j];
26370          this.familiesBySource = {};
26371          const M = m.bk(Object.values(this._layerConfigs), this.keyCache);
26372          for (const j of M) {
26373            const H = j.map((Re) => this._layers[Re.id]), ne = H[0];
26374            if (ne.visibility === "none") continue;
26375            const de = ne.source || "";
26376            let ie = this.familiesBySource[de];
26377            ie || (ie = this.familiesBySource[de] = {});
26378            const Be = ne.sourceLayer || "_geojsonTileLayer";
26379            let Le = ie[Be];
26380            Le || (Le = ie[Be] = []), Le.push(H);
26381          }
26382        }
26383      }
26384      class w {
26385        constructor(U) {
26386          const A = {}, M = [];
26387          for (const de in U) {
26388            const ie = U[de], Be = A[de] = {};
26389            for (const Le in ie) {
26390              const Re = ie[+Le];
26391              if (!Re || Re.bitmap.width === 0 || Re.bitmap.height === 0) continue;
26392              const it = { x: 0, y: 0, w: Re.bitmap.width + 2, h: Re.bitmap.height + 2 };
26393              M.push(it), Be[Le] = { rect: it, metrics: Re.metrics };
26394            }
26395          }
26396          const { w: j, h: H } = m.p(M), ne = new m.o({ width: j || 1, height: H || 1 });
26397          for (const de in U) {
26398            const ie = U[de];
26399            for (const Be in ie) {
26400              const Le = ie[+Be];
26401              if (!Le || Le.bitmap.width === 0 || Le.bitmap.height === 0) continue;
26402              const Re = A[de][Be].rect;
26403              m.o.copy(Le.bitmap, ne, { x: 0, y: 0 }, { x: Re.x + 1, y: Re.y + 1 }, Le.bitmap);
26404            }
26405          }
26406          this.image = ne, this.positions = A;
26407        }
26408      }
26409      m.bl("GlyphAtlas", w);
26410      class O {
26411        constructor(U) {
26412          this.tileID = new m.S(U.tileID.overscaledZ, U.tileID.wrap, U.tileID.canonical.z, U.tileID.canonical.x, U.tileID.canonical.y), this.uid = U.uid, this.zoom = U.zoom, this.pixelRatio = U.pixelRatio, this.tileSize = U.tileSize, this.source = U.source, this.overscaling = this.tileID.overscaleFactor(), this.showCollisionBoxes = U.showCollisionBoxes, this.collectResourceTiming = !!U.collectResourceTiming, this.returnDependencies = !!U.returnDependencies, this.promoteId = U.promoteId, this.inFlightDependencies = [];
26413        }
26414        parse(U, A, M, j) {
26415          return m._(this, void 0, void 0, function* () {
26416            this.status = "parsing", this.data = U, this.collisionBoxArray = new m.a5();
26417            const H = new m.bm(Object.keys(U.layers).sort()), ne = new m.bn(this.tileID, this.promoteId);
26418            ne.bucketLayerIDs = [];
26419            const de = {}, ie = { featureIndex: ne, iconDependencies: {}, patternDependencies: {}, glyphDependencies: {}, availableImages: M }, Be = A.familiesBySource[this.source];
26420            for (const lr in Be) {
26421              const Pr = U.layers[lr];
26422              if (!Pr) continue;
26423              Pr.version === 1 && m.w(`Vector tile source "${this.source}" layer "${lr}" does not use vector tile spec v2 and therefore may have some rendering errors.`);
26424              const an = H.encode(lr), Bn = [];
26425              for (let Xn = 0; Xn < Pr.length; Xn++) {
26426                const Jn = Pr.feature(Xn), Ko = ne.getId(Jn, lr);
26427                Bn.push({ feature: Jn, id: Ko, index: Xn, sourceLayerIndex: an });
26428              }
26429              for (const Xn of Be[lr]) {
26430                const Jn = Xn[0];
26431                Jn.source !== this.source && m.w(`layer.source = ${Jn.source} does not equal this.source = ${this.source}`), Jn.minzoom && this.zoom < Math.floor(Jn.minzoom) || Jn.maxzoom && this.zoom >= Jn.maxzoom || Jn.visibility !== "none" && (P(Xn, this.zoom, M), (de[Jn.id] = Jn.createBucket({ index: ne.bucketLayerIDs.length, layers: Xn, zoom: this.zoom, pixelRatio: this.pixelRatio, overscaling: this.overscaling, collisionBoxArray: this.collisionBoxArray, sourceLayerIndex: an, sourceID: this.source })).populate(Bn, ie, this.tileID.canonical), ne.bucketLayerIDs.push(Xn.map((Ko) => Ko.id)));
26432              }
26433            }
26434            const Le = m.aF(ie.glyphDependencies, (lr) => Object.keys(lr).map(Number));
26435            this.inFlightDependencies.forEach((lr) => lr == null ? void 0 : lr.abort()), this.inFlightDependencies = [];
26436            let Re = Promise.resolve({});
26437            if (Object.keys(Le).length) {
26438              const lr = new AbortController();
26439              this.inFlightDependencies.push(lr), Re = j.sendAsync({ type: "GG", data: { stacks: Le, source: this.source, tileID: this.tileID, type: "glyphs" } }, lr);
26440            }
26441            const it = Object.keys(ie.iconDependencies);
26442            let Pt = Promise.resolve({});
26443            if (it.length) {
26444              const lr = new AbortController();
26445              this.inFlightDependencies.push(lr), Pt = j.sendAsync({ type: "GI", data: { icons: it, source: this.source, tileID: this.tileID, type: "icons" } }, lr);
26446            }
26447            const zt = Object.keys(ie.patternDependencies);
26448            let dr = Promise.resolve({});
26449            if (zt.length) {
26450              const lr = new AbortController();
26451              this.inFlightDependencies.push(lr), dr = j.sendAsync({ type: "GI", data: { icons: zt, source: this.source, tileID: this.tileID, type: "patterns" } }, lr);
26452            }
26453            const [Wt, mr, gr] = yield Promise.all([Re, Pt, dr]), xn = new w(Wt), yr = new m.bo(mr, gr);
26454            for (const lr in de) {
26455              const Pr = de[lr];
26456              Pr instanceof m.a6 ? (P(Pr.layers, this.zoom, M), m.bp({ bucket: Pr, glyphMap: Wt, glyphPositions: xn.positions, imageMap: mr, imagePositions: yr.iconPositions, showCollisionBoxes: this.showCollisionBoxes, canonical: this.tileID.canonical })) : Pr.hasPattern && (Pr instanceof m.bq || Pr instanceof m.br || Pr instanceof m.bs) && (P(Pr.layers, this.zoom, M), Pr.addFeatures(ie, this.tileID.canonical, yr.patternPositions));
26457            }
26458            return this.status = "done", { buckets: Object.values(de).filter((lr) => !lr.isEmpty()), featureIndex: ne, collisionBoxArray: this.collisionBoxArray, glyphAtlasImage: xn.image, imageAtlas: yr, glyphMap: this.returnDependencies ? Wt : null, iconMap: this.returnDependencies ? mr : null, glyphPositions: this.returnDependencies ? xn.positions : null };
26459          });
26460        }
26461      }
26462      function P(le, U, A) {
26463        const M = new m.z(U);
26464        for (const j of le) j.recalculate(M, A);
26465      }
26466      class R {
26467        constructor(U, A, M) {
26468          this.actor = U, this.layerIndex = A, this.availableImages = M, this.fetching = {}, this.loading = {}, this.loaded = {};
26469        }
26470        loadVectorTile(U, A) {
26471          return m._(this, void 0, void 0, function* () {
26472            const M = yield m.l(U.request, A);
26473            try {
26474              return { vectorTile: new m.bt.VectorTile(new m.bu(M.data)), rawData: M.data, cacheControl: M.cacheControl, expires: M.expires };
26475            } catch (j) {
26476              const H = new Uint8Array(M.data);
26477              let ne = `Unable to parse the tile at ${U.request.url}, `;
26478              throw ne += H[0] === 31 && H[1] === 139 ? "please make sure the data is not gzipped and that you have configured the relevant header in the server" : `got error: ${j.message}`, new Error(ne);
26479            }
26480          });
26481        }
26482        loadTile(U) {
26483          return m._(this, void 0, void 0, function* () {
26484            const A = U.uid, M = !!(U && U.request && U.request.collectResourceTiming) && new m.bv(U.request), j = new O(U);
26485            this.loading[A] = j;
26486            const H = new AbortController();
26487            j.abort = H;
26488            try {
26489              const ne = yield this.loadVectorTile(U, H);
26490              if (delete this.loading[A], !ne) return null;
26491              const de = ne.rawData, ie = {};
26492              ne.expires && (ie.expires = ne.expires), ne.cacheControl && (ie.cacheControl = ne.cacheControl);
26493              const Be = {};
26494              if (M) {
26495                const Re = M.finish();
26496                Re && (Be.resourceTiming = JSON.parse(JSON.stringify(Re)));
26497              }
26498              j.vectorTile = ne.vectorTile;
26499              const Le = j.parse(ne.vectorTile, this.layerIndex, this.availableImages, this.actor);
26500              this.loaded[A] = j, this.fetching[A] = { rawTileData: de, cacheControl: ie, resourceTiming: Be };
26501              try {
26502                const Re = yield Le;
26503                return m.e({ rawTileData: de.slice(0) }, Re, ie, Be);
26504              } finally {
26505                delete this.fetching[A];
26506              }
26507            } catch (ne) {
26508              throw delete this.loading[A], j.status = "done", this.loaded[A] = j, ne;
26509            }
26510          });
26511        }
26512        reloadTile(U) {
26513          return m._(this, void 0, void 0, function* () {
26514            const A = U.uid;
26515            if (!this.loaded || !this.loaded[A]) throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");
26516            const M = this.loaded[A];
26517            if (M.showCollisionBoxes = U.showCollisionBoxes, M.status === "parsing") {
26518              const j = yield M.parse(M.vectorTile, this.layerIndex, this.availableImages, this.actor);
26519              let H;
26520              if (this.fetching[A]) {
26521                const { rawTileData: ne, cacheControl: de, resourceTiming: ie } = this.fetching[A];
26522                delete this.fetching[A], H = m.e({ rawTileData: ne.slice(0) }, j, de, ie);
26523              } else H = j;
26524              return H;
26525            }
26526            if (M.status === "done" && M.vectorTile) return M.parse(M.vectorTile, this.layerIndex, this.availableImages, this.actor);
26527          });
26528        }
26529        abortTile(U) {
26530          return m._(this, void 0, void 0, function* () {
26531            const A = this.loading, M = U.uid;
26532            A && A[M] && A[M].abort && (A[M].abort.abort(), delete A[M]);
26533          });
26534        }
26535        removeTile(U) {
26536          return m._(this, void 0, void 0, function* () {
26537            this.loaded && this.loaded[U.uid] && delete this.loaded[U.uid];
26538          });
26539        }
26540      }
26541      class z {
26542        constructor() {
26543          this.loaded = {};
26544        }
26545        loadTile(U) {
26546          return m._(this, void 0, void 0, function* () {
26547            const { uid: A, encoding: M, rawImageData: j, redFactor: H, greenFactor: ne, blueFactor: de, baseShift: ie } = U, Be = j.width + 2, Le = j.height + 2, Re = m.b(j) ? new m.R({ width: Be, height: Le }, yield m.bw(j, -1, -1, Be, Le)) : j, it = new m.bx(A, Re, M, H, ne, de, ie);
26548            return this.loaded = this.loaded || {}, this.loaded[A] = it, it;
26549          });
26550        }
26551        removeTile(U) {
26552          const A = this.loaded, M = U.uid;
26553          A && A[M] && delete A[M];
26554        }
26555      }
26556      function J(le, U) {
26557        if (le.length !== 0) {
26558          K(le[0], U);
26559          for (var A = 1; A < le.length; A++) K(le[A], !U);
26560        }
26561      }
26562      function K(le, U) {
26563        for (var A = 0, M = 0, j = 0, H = le.length, ne = H - 1; j < H; ne = j++) {
26564          var de = (le[j][0] - le[ne][0]) * (le[ne][1] + le[j][1]), ie = A + de;
26565          M += Math.abs(A) >= Math.abs(de) ? A - ie + de : de - ie + A, A = ie;
26566        }
26567        A + M >= 0 != !!U && le.reverse();
26568      }
26569      var ee = m.by(function le(U, A) {
26570        var M, j = U && U.type;
26571        if (j === "FeatureCollection") for (M = 0; M < U.features.length; M++) le(U.features[M], A);
26572        else if (j === "GeometryCollection") for (M = 0; M < U.geometries.length; M++) le(U.geometries[M], A);
26573        else if (j === "Feature") le(U.geometry, A);
26574        else if (j === "Polygon") J(U.coordinates, A);
26575        else if (j === "MultiPolygon") for (M = 0; M < U.coordinates.length; M++) J(U.coordinates[M], A);
26576        return U;
26577      });
26578      const ue = m.bt.VectorTileFeature.prototype.toGeoJSON;
26579      var Ce = { exports: {} }, ge = m.bz, X = m.bt.VectorTileFeature, ye = Ae;
26580      function Ae(le, U) {
26581        this.options = U || {}, this.features = le, this.length = le.length;
26582      }
26583      function Se(le, U) {
26584        this.id = typeof le.id == "number" ? le.id : void 0, this.type = le.type, this.rawGeometry = le.type === 1 ? [le.geometry] : le.geometry, this.properties = le.tags, this.extent = U || 4096;
26585      }
26586      Ae.prototype.feature = function(le) {
26587        return new Se(this.features[le], this.options.extent);
26588      }, Se.prototype.loadGeometry = function() {
26589        var le = this.rawGeometry;
26590        this.geometry = [];
26591        for (var U = 0; U < le.length; U++) {
26592          for (var A = le[U], M = [], j = 0; j < A.length; j++) M.push(new ge(A[j][0], A[j][1]));
26593          this.geometry.push(M);
26594        }
26595        return this.geometry;
26596      }, Se.prototype.bbox = function() {
26597        this.geometry || this.loadGeometry();
26598        for (var le = this.geometry, U = 1 / 0, A = -1 / 0, M = 1 / 0, j = -1 / 0, H = 0; H < le.length; H++) for (var ne = le[H], de = 0; de < ne.length; de++) {
26599          var ie = ne[de];
26600          U = Math.min(U, ie.x), A = Math.max(A, ie.x), M = Math.min(M, ie.y), j = Math.max(j, ie.y);
26601        }
26602        return [U, M, A, j];
26603      }, Se.prototype.toGeoJSON = X.prototype.toGeoJSON;
26604      var je = m.bA, Ne = ye;
26605      function Oe(le) {
26606        var U = new je();
26607        return function(A, M) {
26608          for (var j in A.layers) M.writeMessage(3, ze, A.layers[j]);
26609        }(le, U), U.finish();
26610      }
26611      function ze(le, U) {
26612        var A;
26613        U.writeVarintField(15, le.version || 1), U.writeStringField(1, le.name || ""), U.writeVarintField(5, le.extent || 4096);
26614        var M = { keys: [], values: [], keycache: {}, valuecache: {} };
26615        for (A = 0; A < le.length; A++) M.feature = le.feature(A), U.writeMessage(2, He, M);
26616        var j = M.keys;
26617        for (A = 0; A < j.length; A++) U.writeStringField(3, j[A]);
26618        var H = M.values;
26619        for (A = 0; A < H.length; A++) U.writeMessage(4, Ge, H[A]);
26620      }
26621      function He(le, U) {
26622        var A = le.feature;
26623        A.id !== void 0 && U.writeVarintField(1, A.id), U.writeMessage(2, Ie, le), U.writeVarintField(3, A.type), U.writeMessage(4, st, A);
26624      }
26625      function Ie(le, U) {
26626        var A = le.feature, M = le.keys, j = le.values, H = le.keycache, ne = le.valuecache;
26627        for (var de in A.properties) {
26628          var ie = A.properties[de], Be = H[de];
26629          if (ie !== null) {
26630            Be === void 0 && (M.push(de), H[de] = Be = M.length - 1), U.writeVarint(Be);
26631            var Le = typeof ie;
26632            Le !== "string" && Le !== "boolean" && Le !== "number" && (ie = JSON.stringify(ie));
26633            var Re = Le + ":" + ie, it = ne[Re];
26634            it === void 0 && (j.push(ie), ne[Re] = it = j.length - 1), U.writeVarint(it);
26635          }
26636        }
26637      }
26638      function $e(le, U) {
26639        return (U << 3) + (7 & le);
26640      }
26641      function Xe(le) {
26642        return le << 1 ^ le >> 31;
26643      }
26644      function st(le, U) {
26645        for (var A = le.loadGeometry(), M = le.type, j = 0, H = 0, ne = A.length, de = 0; de < ne; de++) {
26646          var ie = A[de], Be = 1;
26647          M === 1 && (Be = ie.length), U.writeVarint($e(1, Be));
26648          for (var Le = M === 3 ? ie.length - 1 : ie.length, Re = 0; Re < Le; Re++) {
26649            Re === 1 && M !== 1 && U.writeVarint($e(2, Le - 1));
26650            var it = ie[Re].x - j, Pt = ie[Re].y - H;
26651            U.writeVarint(Xe(it)), U.writeVarint(Xe(Pt)), j += it, H += Pt;
26652          }
26653          M === 3 && U.writeVarint($e(7, 1));
26654        }
26655      }
26656      function Ge(le, U) {
26657        var A = typeof le;
26658        A === "string" ? U.writeStringField(1, le) : A === "boolean" ? U.writeBooleanField(7, le) : A === "number" && (le % 1 != 0 ? U.writeDoubleField(3, le) : le < 0 ? U.writeSVarintField(6, le) : U.writeVarintField(5, le));
26659      }
26660      Ce.exports = Oe, Ce.exports.fromVectorTileJs = Oe, Ce.exports.fromGeojsonVt = function(le, U) {
26661        U = U || {};
26662        var A = {};
26663        for (var M in le) A[M] = new Ne(le[M].features, U), A[M].name = M, A[M].version = U.version, A[M].extent = U.extent;
26664        return Oe({ layers: A });
26665      }, Ce.exports.GeoJSONWrapper = Ne;
26666      var ct = m.by(Ce.exports);
26667      const ot = { minZoom: 0, maxZoom: 16, minPoints: 2, radius: 40, extent: 512, nodeSize: 64, log: !1, generateId: !1, reduce: null, map: (le) => le }, Ht = Math.fround || (fr = new Float32Array(1), (le) => (fr[0] = +le, fr[0]));
26668      var fr;
26669      const Qt = 3, ur = 5, Ar = 6;
26670      class en {
26671        constructor(U) {
26672          this.options = Object.assign(Object.create(ot), U), this.trees = new Array(this.options.maxZoom + 1), this.stride = this.options.reduce ? 7 : 6, this.clusterProps = [];
26673        }
26674        load(U) {
26675          const { log: A, minZoom: M, maxZoom: j } = this.options;
26676          A && console.time("total time");
26677          const H = `prepare ${U.length} points`;
26678          A && console.time(H), this.points = U;
26679          const ne = [];
26680          for (let ie = 0; ie < U.length; ie++) {
26681            const Be = U[ie];
26682            if (!Be.geometry) continue;
26683            const [Le, Re] = Be.geometry.coordinates, it = Ht(dn(Le)), Pt = Ht(kn(Re));
26684            ne.push(it, Pt, 1 / 0, ie, -1, 1), this.options.reduce && ne.push(0);
26685          }
26686          let de = this.trees[j + 1] = this._createTree(ne);
26687          A && console.timeEnd(H);
26688          for (let ie = j; ie >= M; ie--) {
26689            const Be = +Date.now();
26690            de = this.trees[ie] = this._createTree(this._cluster(de, ie)), A && console.log("z%d: %d clusters in %dms", ie, de.numItems, +Date.now() - Be);
26691          }
26692          return A && console.timeEnd("total time"), this;
26693        }
26694        getClusters(U, A) {
26695          let M = ((U[0] + 180) % 360 + 360) % 360 - 180;
26696          const j = Math.max(-90, Math.min(90, U[1]));
26697          let H = U[2] === 180 ? 180 : ((U[2] + 180) % 360 + 360) % 360 - 180;
26698          const ne = Math.max(-90, Math.min(90, U[3]));
26699          if (U[2] - U[0] >= 360) M = -180, H = 180;
26700          else if (M > H) {
26701            const Re = this.getClusters([M, j, 180, ne], A), it = this.getClusters([-180, j, H, ne], A);
26702            return Re.concat(it);
26703          }
26704          const de = this.trees[this._limitZoom(A)], ie = de.range(dn(M), kn(ne), dn(H), kn(j)), Be = de.data, Le = [];
26705          for (const Re of ie) {
26706            const it = this.stride * Re;
26707            Le.push(Be[it + ur] > 1 ? $r(Be, it, this.clusterProps) : this.points[Be[it + Qt]]);
26708          }
26709          return Le;
26710        }
26711        getChildren(U) {
26712          const A = this._getOriginId(U), M = this._getOriginZoom(U), j = "No cluster with the specified id.", H = this.trees[M];
26713          if (!H) throw new Error(j);
26714          const ne = H.data;
26715          if (A * this.stride >= ne.length) throw new Error(j);
26716          const de = this.options.radius / (this.options.extent * Math.pow(2, M - 1)), ie = H.within(ne[A * this.stride], ne[A * this.stride + 1], de), Be = [];
26717          for (const Le of ie) {
26718            const Re = Le * this.stride;
26719            ne[Re + 4] === U && Be.push(ne[Re + ur] > 1 ? $r(ne, Re, this.clusterProps) : this.points[ne[Re + Qt]]);
26720          }
26721          if (Be.length === 0) throw new Error(j);
26722          return Be;
26723        }
26724        getLeaves(U, A, M) {
26725          const j = [];
26726          return this._appendLeaves(j, U, A = A || 10, M = M || 0, 0), j;
26727        }
26728        getTile(U, A, M) {
26729          const j = this.trees[this._limitZoom(U)], H = Math.pow(2, U), { extent: ne, radius: de } = this.options, ie = de / ne, Be = (M - ie) / H, Le = (M + 1 + ie) / H, Re = { features: [] };
26730          return this._addTileFeatures(j.range((A - ie) / H, Be, (A + 1 + ie) / H, Le), j.data, A, M, H, Re), A === 0 && this._addTileFeatures(j.range(1 - ie / H, Be, 1, Le), j.data, H, M, H, Re), A === H - 1 && this._addTileFeatures(j.range(0, Be, ie / H, Le), j.data, -1, M, H, Re), Re.features.length ? Re : null;
26731        }
26732        getClusterExpansionZoom(U) {
26733          let A = this._getOriginZoom(U) - 1;
26734          for (; A <= this.options.maxZoom; ) {
26735            const M = this.getChildren(U);
26736            if (A++, M.length !== 1) break;
26737            U = M[0].properties.cluster_id;
26738          }
26739          return A;
26740        }
26741        _appendLeaves(U, A, M, j, H) {
26742          const ne = this.getChildren(A);
26743          for (const de of ne) {
26744            const ie = de.properties;
26745            if (ie && ie.cluster ? H + ie.point_count <= j ? H += ie.point_count : H = this._appendLeaves(U, ie.cluster_id, M, j, H) : H < j ? H++ : U.push(de), U.length === M) break;
26746          }
26747          return H;
26748        }
26749        _createTree(U) {
26750          const A = new m.av(U.length / this.stride | 0, this.options.nodeSize, Float32Array);
26751          for (let M = 0; M < U.length; M += this.stride) A.add(U[M], U[M + 1]);
26752          return A.finish(), A.data = U, A;
26753        }
26754        _addTileFeatures(U, A, M, j, H, ne) {
26755          for (const de of U) {
26756            const ie = de * this.stride, Be = A[ie + ur] > 1;
26757            let Le, Re, it;
26758            if (Be) Le = Fr(A, ie, this.clusterProps), Re = A[ie], it = A[ie + 1];
26759            else {
26760              const dr = this.points[A[ie + Qt]];
26761              Le = dr.properties;
26762              const [Wt, mr] = dr.geometry.coordinates;
26763              Re = dn(Wt), it = kn(mr);
26764            }
26765            const Pt = { type: 1, geometry: [[Math.round(this.options.extent * (Re * H - M)), Math.round(this.options.extent * (it * H - j))]], tags: Le };
26766            let zt;
26767            zt = Be || this.options.generateId ? A[ie + Qt] : this.points[A[ie + Qt]].id, zt !== void 0 && (Pt.id = zt), ne.features.push(Pt);
26768          }
26769        }
26770        _limitZoom(U) {
26771          return Math.max(this.options.minZoom, Math.min(Math.floor(+U), this.options.maxZoom + 1));
26772        }
26773        _cluster(U, A) {
26774          const { radius: M, extent: j, reduce: H, minPoints: ne } = this.options, de = M / (j * Math.pow(2, A)), ie = U.data, Be = [], Le = this.stride;
26775          for (let Re = 0; Re < ie.length; Re += Le) {
26776            if (ie[Re + 2] <= A) continue;
26777            ie[Re + 2] = A;
26778            const it = ie[Re], Pt = ie[Re + 1], zt = U.within(ie[Re], ie[Re + 1], de), dr = ie[Re + ur];
26779            let Wt = dr;
26780            for (const mr of zt) {
26781              const gr = mr * Le;
26782              ie[gr + 2] > A && (Wt += ie[gr + ur]);
26783            }
26784            if (Wt > dr && Wt >= ne) {
26785              let mr, gr = it * dr, xn = Pt * dr, yr = -1;
26786              const lr = ((Re / Le | 0) << 5) + (A + 1) + this.points.length;
26787              for (const Pr of zt) {
26788                const an = Pr * Le;
26789                if (ie[an + 2] <= A) continue;
26790                ie[an + 2] = A;
26791                const Bn = ie[an + ur];
26792                gr += ie[an] * Bn, xn += ie[an + 1] * Bn, ie[an + 4] = lr, H && (mr || (mr = this._map(ie, Re, !0), yr = this.clusterProps.length, this.clusterProps.push(mr)), H(mr, this._map(ie, an)));
26793              }
26794              ie[Re + 4] = lr, Be.push(gr / Wt, xn / Wt, 1 / 0, lr, -1, Wt), H && Be.push(yr);
26795            } else {
26796              for (let mr = 0; mr < Le; mr++) Be.push(ie[Re + mr]);
26797              if (Wt > 1) for (const mr of zt) {
26798                const gr = mr * Le;
26799                if (!(ie[gr + 2] <= A)) {
26800                  ie[gr + 2] = A;
26801                  for (let xn = 0; xn < Le; xn++) Be.push(ie[gr + xn]);
26802                }
26803              }
26804            }
26805          }
26806          return Be;
26807        }
26808        _getOriginId(U) {
26809          return U - this.points.length >> 5;
26810        }
26811        _getOriginZoom(U) {
26812          return (U - this.points.length) % 32;
26813        }
26814        _map(U, A, M) {
26815          if (U[A + ur] > 1) {
26816            const ne = this.clusterProps[U[A + Ar]];
26817            return M ? Object.assign({}, ne) : ne;
26818          }
26819          const j = this.points[U[A + Qt]].properties, H = this.options.map(j);
26820          return M && H === j ? Object.assign({}, H) : H;
26821        }
26822      }
26823      function $r(le, U, A) {
26824        return { type: "Feature", id: le[U + Qt], properties: Fr(le, U, A), geometry: { type: "Point", coordinates: [(M = le[U], 360 * (M - 0.5)), tn(le[U + 1])] } };
26825        var M;
26826      }
26827      function Fr(le, U, A) {
vendor: 19,772 bytes, lines 26828-27215
26828        const M = le[U + ur], j = M >= 1e4 ? `${Math.round(M / 1e3)}k` : M >= 1e3 ? Math.round(M / 100) / 10 + "k" : M, H = le[U + Ar], ne = H === -1 ? {} : Object.assign({}, A[H]);
26829        return Object.assign(ne, { cluster: !0, cluster_id: le[U + Qt], point_count: M, point_count_abbreviated: j });
26830      }
26831      function dn(le) {
26832        return le / 360 + 0.5;
26833      }
26834      function kn(le) {
26835        const U = Math.sin(le * Math.PI / 180), A = 0.5 - 0.25 * Math.log((1 + U) / (1 - U)) / Math.PI;
26836        return A < 0 ? 0 : A > 1 ? 1 : A;
26837      }
26838      function tn(le) {
26839        const U = (180 - 360 * le) * Math.PI / 180;
26840        return 360 * Math.atan(Math.exp(U)) / Math.PI - 90;
26841      }
26842      function Jt(le, U, A, M) {
26843        let j = M;
26844        const H = U + (A - U >> 1);
26845        let ne, de = A - U;
26846        const ie = le[U], Be = le[U + 1], Le = le[A], Re = le[A + 1];
26847        for (let it = U + 3; it < A; it += 3) {
26848          const Pt = Fi(le[it], le[it + 1], ie, Be, Le, Re);
26849          if (Pt > j) ne = it, j = Pt;
26850          else if (Pt === j) {
26851            const zt = Math.abs(it - H);
26852            zt < de && (ne = it, de = zt);
26853          }
26854        }
26855        j > M && (ne - U > 3 && Jt(le, U, ne, M), le[ne + 2] = j, A - ne > 3 && Jt(le, ne, A, M));
26856      }
26857      function Fi(le, U, A, M, j, H) {
26858        let ne = j - A, de = H - M;
26859        if (ne !== 0 || de !== 0) {
26860          const ie = ((le - A) * ne + (U - M) * de) / (ne * ne + de * de);
26861          ie > 1 ? (A = j, M = H) : ie > 0 && (A += ne * ie, M += de * ie);
26862        }
26863        return ne = le - A, de = U - M, ne * ne + de * de;
26864      }
26865      function Kn(le, U, A, M) {
26866        const j = { id: le ?? null, type: U, geometry: A, tags: M, minX: 1 / 0, minY: 1 / 0, maxX: -1 / 0, maxY: -1 / 0 };
26867        if (U === "Point" || U === "MultiPoint" || U === "LineString") me(j, A);
26868        else if (U === "Polygon") me(j, A[0]);
26869        else if (U === "MultiLineString") for (const H of A) me(j, H);
26870        else if (U === "MultiPolygon") for (const H of A) me(j, H[0]);
26871        return j;
26872      }
26873      function me(le, U) {
26874        for (let A = 0; A < U.length; A += 3) le.minX = Math.min(le.minX, U[A]), le.minY = Math.min(le.minY, U[A + 1]), le.maxX = Math.max(le.maxX, U[A]), le.maxY = Math.max(le.maxY, U[A + 1]);
26875      }
26876      function Ee(le, U, A, M) {
26877        if (!U.geometry) return;
26878        const j = U.geometry.coordinates;
26879        if (j && j.length === 0) return;
26880        const H = U.geometry.type, ne = Math.pow(A.tolerance / ((1 << A.maxZoom) * A.extent), 2);
26881        let de = [], ie = U.id;
26882        if (A.promoteId ? ie = U.properties[A.promoteId] : A.generateId && (ie = M || 0), H === "Point") Ze(j, de);
26883        else if (H === "MultiPoint") for (const Be of j) Ze(Be, de);
26884        else if (H === "LineString") re(j, de, ne, !1);
26885        else if (H === "MultiLineString") {
26886          if (A.lineMetrics) {
26887            for (const Be of j) de = [], re(Be, de, ne, !1), le.push(Kn(ie, "LineString", de, U.properties));
26888            return;
26889          }
26890          et(j, de, ne, !1);
26891        } else if (H === "Polygon") et(j, de, ne, !0);
26892        else {
26893          if (H !== "MultiPolygon") {
26894            if (H === "GeometryCollection") {
26895              for (const Be of U.geometry.geometries) Ee(le, { id: ie, geometry: Be, properties: U.properties }, A, M);
26896              return;
26897            }
26898            throw new Error("Input data is not a valid GeoJSON object.");
26899          }
26900          for (const Be of j) {
26901            const Le = [];
26902            et(Be, Le, ne, !0), de.push(Le);
26903          }
26904        }
26905        le.push(Kn(ie, H, de, U.properties));
26906      }
26907      function Ze(le, U) {
26908        U.push(ft(le[0]), rt(le[1]), 0);
26909      }
26910      function re(le, U, A, M) {
26911        let j, H, ne = 0;
26912        for (let ie = 0; ie < le.length; ie++) {
26913          const Be = ft(le[ie][0]), Le = rt(le[ie][1]);
26914          U.push(Be, Le, 0), ie > 0 && (ne += M ? (j * Le - Be * H) / 2 : Math.sqrt(Math.pow(Be - j, 2) + Math.pow(Le - H, 2))), j = Be, H = Le;
26915        }
26916        const de = U.length - 3;
26917        U[2] = 1, Jt(U, 0, de, A), U[de + 2] = 1, U.size = Math.abs(ne), U.start = 0, U.end = U.size;
26918      }
26919      function et(le, U, A, M) {
26920        for (let j = 0; j < le.length; j++) {
26921          const H = [];
26922          re(le[j], H, A, M), U.push(H);
26923        }
26924      }
26925      function ft(le) {
26926        return le / 360 + 0.5;
26927      }
26928      function rt(le) {
26929        const U = Math.sin(le * Math.PI / 180), A = 0.5 - 0.25 * Math.log((1 + U) / (1 - U)) / Math.PI;
26930        return A < 0 ? 0 : A > 1 ? 1 : A;
26931      }
26932      function Qe(le, U, A, M, j, H, ne, de) {
26933        if (M /= U, H >= (A /= U) && ne < M) return le;
26934        if (ne < A || H >= M) return null;
26935        const ie = [];
26936        for (const Be of le) {
26937          const Le = Be.geometry;
26938          let Re = Be.type;
26939          const it = j === 0 ? Be.minX : Be.minY, Pt = j === 0 ? Be.maxX : Be.maxY;
26940          if (it >= A && Pt < M) {
26941            ie.push(Be);
26942            continue;
26943          }
26944          if (Pt < A || it >= M) continue;
26945          let zt = [];
26946          if (Re === "Point" || Re === "MultiPoint") dt(Le, zt, A, M, j);
26947          else if (Re === "LineString") nt(Le, zt, A, M, j, !1, de.lineMetrics);
26948          else if (Re === "MultiLineString") Nt(Le, zt, A, M, j, !1);
26949          else if (Re === "Polygon") Nt(Le, zt, A, M, j, !0);
26950          else if (Re === "MultiPolygon") for (const dr of Le) {
26951            const Wt = [];
26952            Nt(dr, Wt, A, M, j, !0), Wt.length && zt.push(Wt);
26953          }
26954          if (zt.length) {
26955            if (de.lineMetrics && Re === "LineString") {
26956              for (const dr of zt) ie.push(Kn(Be.id, Re, dr, Be.tags));
26957              continue;
26958            }
26959            Re !== "LineString" && Re !== "MultiLineString" || (zt.length === 1 ? (Re = "LineString", zt = zt[0]) : Re = "MultiLineString"), Re !== "Point" && Re !== "MultiPoint" || (Re = zt.length === 3 ? "Point" : "MultiPoint"), ie.push(Kn(Be.id, Re, zt, Be.tags));
26960          }
26961        }
26962        return ie.length ? ie : null;
26963      }
26964      function dt(le, U, A, M, j) {
26965        for (let H = 0; H < le.length; H += 3) {
26966          const ne = le[H + j];
26967          ne >= A && ne <= M && Dt(U, le[H], le[H + 1], le[H + 2]);
26968        }
26969      }
26970      function nt(le, U, A, M, j, H, ne) {
26971        let de = Tt(le);
26972        const ie = j === 0 ? Gt : sr;
26973        let Be, Le, Re = le.start;
26974        for (let Wt = 0; Wt < le.length - 3; Wt += 3) {
26975          const mr = le[Wt], gr = le[Wt + 1], xn = le[Wt + 2], yr = le[Wt + 3], lr = le[Wt + 4], Pr = j === 0 ? mr : gr, an = j === 0 ? yr : lr;
26976          let Bn = !1;
26977          ne && (Be = Math.sqrt(Math.pow(mr - yr, 2) + Math.pow(gr - lr, 2))), Pr < A ? an > A && (Le = ie(de, mr, gr, yr, lr, A), ne && (de.start = Re + Be * Le)) : Pr > M ? an < M && (Le = ie(de, mr, gr, yr, lr, M), ne && (de.start = Re + Be * Le)) : Dt(de, mr, gr, xn), an < A && Pr >= A && (Le = ie(de, mr, gr, yr, lr, A), Bn = !0), an > M && Pr <= M && (Le = ie(de, mr, gr, yr, lr, M), Bn = !0), !H && Bn && (ne && (de.end = Re + Be * Le), U.push(de), de = Tt(le)), ne && (Re += Be);
26978        }
26979        let it = le.length - 3;
26980        const Pt = le[it], zt = le[it + 1], dr = j === 0 ? Pt : zt;
26981        dr >= A && dr <= M && Dt(de, Pt, zt, le[it + 2]), it = de.length - 3, H && it >= 3 && (de[it] !== de[0] || de[it + 1] !== de[1]) && Dt(de, de[0], de[1], de[2]), de.length && U.push(de);
26982      }
26983      function Tt(le) {
26984        const U = [];
26985        return U.size = le.size, U.start = le.start, U.end = le.end, U;
26986      }
26987      function Nt(le, U, A, M, j, H) {
26988        for (const ne of le) nt(ne, U, A, M, j, H, !1);
26989      }
26990      function Dt(le, U, A, M) {
26991        le.push(U, A, M);
26992      }
26993      function Gt(le, U, A, M, j, H) {
26994        const ne = (H - U) / (M - U);
26995        return Dt(le, H, A + (j - A) * ne, 1), ne;
26996      }
26997      function sr(le, U, A, M, j, H) {
26998        const ne = (H - A) / (j - A);
26999        return Dt(le, U + (M - U) * ne, H, 1), ne;
27000      }
27001      function We(le, U) {
27002        const A = [];
27003        for (let M = 0; M < le.length; M++) {
27004          const j = le[M], H = j.type;
27005          let ne;
27006          if (H === "Point" || H === "MultiPoint" || H === "LineString") ne = or(j.geometry, U);
27007          else if (H === "MultiLineString" || H === "Polygon") {
27008            ne = [];
27009            for (const de of j.geometry) ne.push(or(de, U));
27010          } else if (H === "MultiPolygon") {
27011            ne = [];
27012            for (const de of j.geometry) {
27013              const ie = [];
27014              for (const Be of de) ie.push(or(Be, U));
27015              ne.push(ie);
27016            }
27017          }
27018          A.push(Kn(j.id, H, ne, j.tags));
27019        }
27020        return A;
27021      }
27022      function or(le, U) {
27023        const A = [];
27024        A.size = le.size, le.start !== void 0 && (A.start = le.start, A.end = le.end);
27025        for (let M = 0; M < le.length; M += 3) A.push(le[M] + U, le[M + 1], le[M + 2]);
27026        return A;
27027      }
27028      function hr(le, U) {
27029        if (le.transformed) return le;
27030        const A = 1 << le.z, M = le.x, j = le.y;
27031        for (const H of le.features) {
27032          const ne = H.geometry, de = H.type;
27033          if (H.geometry = [], de === 1) for (let ie = 0; ie < ne.length; ie += 2) H.geometry.push(Cr(ne[ie], ne[ie + 1], U, A, M, j));
27034          else for (let ie = 0; ie < ne.length; ie++) {
27035            const Be = [];
27036            for (let Le = 0; Le < ne[ie].length; Le += 2) Be.push(Cr(ne[ie][Le], ne[ie][Le + 1], U, A, M, j));
27037            H.geometry.push(Be);
27038          }
27039        }
27040        return le.transformed = !0, le;
27041      }
27042      function Cr(le, U, A, M, j, H) {
27043        return [Math.round(A * (le * M - j)), Math.round(A * (U * M - H))];
27044      }
27045      function wn(le, U, A, M, j) {
27046        const H = U === j.maxZoom ? 0 : j.tolerance / ((1 << U) * j.extent), ne = { features: [], numPoints: 0, numSimplified: 0, numFeatures: le.length, source: null, x: A, y: M, z: U, transformed: !1, minX: 2, minY: 1, maxX: -1, maxY: 0 };
27047        for (const de of le) ut(ne, de, H, j);
27048        return ne;
27049      }
27050      function ut(le, U, A, M) {
27051        const j = U.geometry, H = U.type, ne = [];
27052        if (le.minX = Math.min(le.minX, U.minX), le.minY = Math.min(le.minY, U.minY), le.maxX = Math.max(le.maxX, U.maxX), le.maxY = Math.max(le.maxY, U.maxY), H === "Point" || H === "MultiPoint") for (let de = 0; de < j.length; de += 3) ne.push(j[de], j[de + 1]), le.numPoints++, le.numSimplified++;
27053        else if (H === "LineString") er(ne, j, le, A, !1, !1);
27054        else if (H === "MultiLineString" || H === "Polygon") for (let de = 0; de < j.length; de++) er(ne, j[de], le, A, H === "Polygon", de === 0);
27055        else if (H === "MultiPolygon") for (let de = 0; de < j.length; de++) {
27056          const ie = j[de];
27057          for (let Be = 0; Be < ie.length; Be++) er(ne, ie[Be], le, A, !0, Be === 0);
27058        }
27059        if (ne.length) {
27060          let de = U.tags || null;
27061          if (H === "LineString" && M.lineMetrics) {
27062            de = {};
27063            for (const Be in U.tags) de[Be] = U.tags[Be];
27064            de.mapbox_clip_start = j.start / j.size, de.mapbox_clip_end = j.end / j.size;
27065          }
27066          const ie = { geometry: ne, type: H === "Polygon" || H === "MultiPolygon" ? 3 : H === "LineString" || H === "MultiLineString" ? 2 : 1, tags: de };
27067          U.id !== null && (ie.id = U.id), le.features.push(ie);
27068        }
27069      }
27070      function er(le, U, A, M, j, H) {
27071        const ne = M * M;
27072        if (M > 0 && U.size < (j ? ne : M)) return void (A.numPoints += U.length / 3);
27073        const de = [];
27074        for (let ie = 0; ie < U.length; ie += 3) (M === 0 || U[ie + 2] > ne) && (A.numSimplified++, de.push(U[ie], U[ie + 1])), A.numPoints++;
27075        j && function(ie, Be) {
27076          let Le = 0;
27077          for (let Re = 0, it = ie.length, Pt = it - 2; Re < it; Pt = Re, Re += 2) Le += (ie[Re] - ie[Pt]) * (ie[Re + 1] + ie[Pt + 1]);
27078          if (Le > 0 === Be) for (let Re = 0, it = ie.length; Re < it / 2; Re += 2) {
27079            const Pt = ie[Re], zt = ie[Re + 1];
27080            ie[Re] = ie[it - 2 - Re], ie[Re + 1] = ie[it - 1 - Re], ie[it - 2 - Re] = Pt, ie[it - 1 - Re] = zt;
27081          }
27082        }(de, H), le.push(de);
27083      }
27084      const Ut = { maxZoom: 14, indexMaxZoom: 5, indexMaxPoints: 1e5, tolerance: 3, extent: 4096, buffer: 64, lineMetrics: !1, promoteId: null, generateId: !1, debug: 0 };
27085      class Ir {
27086        constructor(U, A) {
27087          const M = (A = this.options = function(H, ne) {
27088            for (const de in ne) H[de] = ne[de];
27089            return H;
27090          }(Object.create(Ut), A)).debug;
27091          if (M && console.time("preprocess data"), A.maxZoom < 0 || A.maxZoom > 24) throw new Error("maxZoom should be in the 0-24 range");
27092          if (A.promoteId && A.generateId) throw new Error("promoteId and generateId cannot be used together.");
27093          let j = function(H, ne) {
27094            const de = [];
27095            if (H.type === "FeatureCollection") for (let ie = 0; ie < H.features.length; ie++) Ee(de, H.features[ie], ne, ie);
27096            else Ee(de, H.type === "Feature" ? H : { geometry: H }, ne);
27097            return de;
27098          }(U, A);
27099          this.tiles = {}, this.tileCoords = [], M && (console.timeEnd("preprocess data"), console.log("index: maxZoom: %d, maxPoints: %d", A.indexMaxZoom, A.indexMaxPoints), console.time("generate tiles"), this.stats = {}, this.total = 0), j = function(H, ne) {
27100            const de = ne.buffer / ne.extent;
27101            let ie = H;
27102            const Be = Qe(H, 1, -1 - de, de, 0, -1, 2, ne), Le = Qe(H, 1, 1 - de, 2 + de, 0, -1, 2, ne);
27103            return (Be || Le) && (ie = Qe(H, 1, -de, 1 + de, 0, -1, 2, ne) || [], Be && (ie = We(Be, 1).concat(ie)), Le && (ie = ie.concat(We(Le, -1)))), ie;
27104          }(j, A), j.length && this.splitTile(j, 0, 0, 0), M && (j.length && console.log("features: %d, points: %d", this.tiles[0].numFeatures, this.tiles[0].numPoints), console.timeEnd("generate tiles"), console.log("tiles generated:", this.total, JSON.stringify(this.stats)));
27105        }
27106        splitTile(U, A, M, j, H, ne, de) {
27107          const ie = [U, A, M, j], Be = this.options, Le = Be.debug;
27108          for (; ie.length; ) {
27109            j = ie.pop(), M = ie.pop(), A = ie.pop(), U = ie.pop();
27110            const Re = 1 << A, it = pn(A, M, j);
27111            let Pt = this.tiles[it];
27112            if (!Pt && (Le > 1 && console.time("creation"), Pt = this.tiles[it] = wn(U, A, M, j, Be), this.tileCoords.push({ z: A, x: M, y: j }), Le)) {
27113              Le > 1 && (console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)", A, M, j, Pt.numFeatures, Pt.numPoints, Pt.numSimplified), console.timeEnd("creation"));
27114              const Bn = `z${A}`;
27115              this.stats[Bn] = (this.stats[Bn] || 0) + 1, this.total++;
27116            }
27117            if (Pt.source = U, H == null) {
27118              if (A === Be.indexMaxZoom || Pt.numPoints <= Be.indexMaxPoints) continue;
27119            } else {
27120              if (A === Be.maxZoom || A === H) continue;
27121              if (H != null) {
27122                const Bn = H - A;
27123                if (M !== ne >> Bn || j !== de >> Bn) continue;
27124              }
27125            }
27126            if (Pt.source = null, U.length === 0) continue;
27127            Le > 1 && console.time("clipping");
27128            const zt = 0.5 * Be.buffer / Be.extent, dr = 0.5 - zt, Wt = 0.5 + zt, mr = 1 + zt;
27129            let gr = null, xn = null, yr = null, lr = null, Pr = Qe(U, Re, M - zt, M + Wt, 0, Pt.minX, Pt.maxX, Be), an = Qe(U, Re, M + dr, M + mr, 0, Pt.minX, Pt.maxX, Be);
27130            U = null, Pr && (gr = Qe(Pr, Re, j - zt, j + Wt, 1, Pt.minY, Pt.maxY, Be), xn = Qe(Pr, Re, j + dr, j + mr, 1, Pt.minY, Pt.maxY, Be), Pr = null), an && (yr = Qe(an, Re, j - zt, j + Wt, 1, Pt.minY, Pt.maxY, Be), lr = Qe(an, Re, j + dr, j + mr, 1, Pt.minY, Pt.maxY, Be), an = null), Le > 1 && console.timeEnd("clipping"), ie.push(gr || [], A + 1, 2 * M, 2 * j), ie.push(xn || [], A + 1, 2 * M, 2 * j + 1), ie.push(yr || [], A + 1, 2 * M + 1, 2 * j), ie.push(lr || [], A + 1, 2 * M + 1, 2 * j + 1);
27131          }
27132        }
27133        getTile(U, A, M) {
27134          U = +U, A = +A, M = +M;
27135          const j = this.options, { extent: H, debug: ne } = j;
27136          if (U < 0 || U > 24) return null;
27137          const de = 1 << U, ie = pn(U, A = A + de & de - 1, M);
27138          if (this.tiles[ie]) return hr(this.tiles[ie], H);
27139          ne > 1 && console.log("drilling down to z%d-%d-%d", U, A, M);
27140          let Be, Le = U, Re = A, it = M;
27141          for (; !Be && Le > 0; ) Le--, Re >>= 1, it >>= 1, Be = this.tiles[pn(Le, Re, it)];
27142          return Be && Be.source ? (ne > 1 && (console.log("found parent tile z%d-%d-%d", Le, Re, it), console.time("drilling down")), this.splitTile(Be.source, Le, Re, it, U, A, M), ne > 1 && console.timeEnd("drilling down"), this.tiles[ie] ? hr(this.tiles[ie], H) : null) : null;
27143        }
27144      }
27145      function pn(le, U, A) {
27146        return 32 * ((1 << le) * A + U) + le;
27147      }
27148      function kt(le, U) {
27149        return U ? le.properties[U] : le.id;
27150      }
27151      function zn(le, U) {
27152        if (le == null) return !0;
27153        if (le.type === "Feature") return kt(le, U) != null;
27154        if (le.type === "FeatureCollection") {
27155          const A = /* @__PURE__ */ new Set();
27156          for (const M of le.features) {
27157            const j = kt(M, U);
27158            if (j == null || A.has(j)) return !1;
27159            A.add(j);
27160          }
27161          return !0;
27162        }
27163        return !1;
27164      }
27165      function zi(le, U) {
27166        const A = /* @__PURE__ */ new Map();
27167        if (le != null) if (le.type === "Feature") A.set(kt(le, U), le);
27168        else for (const M of le.features) A.set(kt(M, U), M);
27169        return A;
27170      }
27171      class Bi extends R {
27172        constructor() {
27173          super(...arguments), this._dataUpdateable = /* @__PURE__ */ new Map();
27174        }
27175        loadVectorTile(U, A) {
27176          return m._(this, void 0, void 0, function* () {
27177            const M = U.tileID.canonical;
27178            if (!this._geoJSONIndex) throw new Error("Unable to parse the data into a cluster or geojson");
27179            const j = this._geoJSONIndex.getTile(M.z, M.x, M.y);
27180            if (!j) return null;
27181            const H = new class {
27182              constructor(de) {
27183                this.layers = { _geojsonTileLayer: this }, this.name = "_geojsonTileLayer", this.extent = m.X, this.length = de.length, this._features = de;
27184              }
27185              feature(de) {
27186                return new class {
27187                  constructor(ie) {
27188                    this._feature = ie, this.extent = m.X, this.type = ie.type, this.properties = ie.tags, "id" in ie && !isNaN(ie.id) && (this.id = parseInt(ie.id, 10));
27189                  }
27190                  loadGeometry() {
27191                    if (this._feature.type === 1) {
27192                      const ie = [];
27193                      for (const Be of this._feature.geometry) ie.push([new m.P(Be[0], Be[1])]);
27194                      return ie;
27195                    }
27196                    {
27197                      const ie = [];
27198                      for (const Be of this._feature.geometry) {
27199                        const Le = [];
27200                        for (const Re of Be) Le.push(new m.P(Re[0], Re[1]));
27201                        ie.push(Le);
27202                      }
27203                      return ie;
27204                    }
27205                  }
27206                  toGeoJSON(ie, Be, Le) {
27207                    return ue.call(this, ie, Be, Le);
27208                  }
27209                }(this._features[de]);
27210              }
27211            }(j.features);
27212            let ne = ct(H);
27213            return ne.byteOffset === 0 && ne.byteLength === ne.buffer.byteLength || (ne = new Uint8Array(ne)), { vectorTile: H, rawData: ne.buffer };
27214          });
27215        }
27216        loadData(U) {
27217          return m._(this, void 0, void 0, function* () {
27218            var A;
27219            (A = this._pendingRequest) === null || A === void 0 || A.abort();
27220            const M = !!(U && U.request && U.request.collectResourceTiming) && new m.bv(U.request);
27221            this._pendingRequest = new AbortController();
27222            try {
27223              this._pendingData = this.loadAndProcessGeoJSON(U, this._pendingRequest), this._geoJSONIndex = U.cluster ? new en(function({ superclusterOptions: ne, clusterProperties: de }) {
27224                if (!de || !ne) return ne;
27225                const ie = {}, Be = {}, Le = { accumulated: null, zoom: 0 }, Re = { properties: null }, it = Object.keys(de);
27226                for (const Pt of it) {
27227                  const [zt, dr] = de[Pt], Wt = m.bC(dr), mr = m.bC(typeof zt == "string" ? [zt, ["accumulated"], ["get", Pt]] : zt);
27228                  ie[Pt] = Wt.value, Be[Pt] = mr.value;
27229                }
27230                return ne.map = (Pt) => {
27231                  Re.properties = Pt;
27232                  const zt = {};
27233                  for (const dr of it) zt[dr] = ie[dr].evaluate(Le, Re);
27234                  return zt;
27235                }, ne.reduce = (Pt, zt) => {
27236                  Re.properties = zt;
27237                  for (const dr of it) Le.accumulated = Pt[dr], Pt[dr] = Be[dr].evaluate(Le, Re);
27238                }, ne;
27239              }(U)).load((yield this._pendingData).features) : (j = yield this._pendingData, new Ir(j, U.geojsonVtOptions)), this.loaded = {};
27240              const H = {};
27241              if (M) {
27242                const ne = M.finish();
27243                ne && (H.resourceTiming = {}, H.resourceTiming[U.source] = JSON.parse(JSON.stringify(ne)));
27244              }
27245              return H;
27246            } catch (H) {
27247              if (delete this._pendingRequest, m.bB(H)) return { abandoned: !0 };
27248              throw H;
27249            }
27250            var j;
27251          });
27252        }
27253        getData() {
27254          return m._(this, void 0, void 0, function* () {
27255            return this._pendingData;
27256          });
27257        }
27258        reloadTile(U) {
27259          const A = this.loaded;
27260          return A && A[U.uid] ? super.reloadTile(U) : this.loadTile(U);
27261        }
27262        loadAndProcessGeoJSON(U, A) {
27263          return m._(this, void 0, void 0, function* () {
27264            let M = yield this.loadGeoJSON(U, A);
27265            if (delete this._pendingRequest, typeof M != "object") throw new Error(`Input data given to '${U.source}' is not a valid GeoJSON object.`);
27266            if (ee(M, !0), U.filter) {
27267              const j = m.bC(U.filter, { type: "boolean", "property-type": "data-driven", overridable: !1, transition: !1 });
27268              if (j.result === "error") throw new Error(j.value.map((ne) => `${ne.key}: ${ne.message}`).join(", "));
27269              M = { type: "FeatureCollection", features: M.features.filter((ne) => j.value.evaluate({ zoom: 0 }, ne)) };
27270            }
27271            return M;
27272          });
27273        }
27274        loadGeoJSON(U, A) {
27275          return m._(this, void 0, void 0, function* () {
27276            const { promoteId: M } = U;
27277            if (U.request) {
27278              const j = yield m.h(U.request, A);
27279              return this._dataUpdateable = zn(j.data, M) ? zi(j.data, M) : void 0, j.data;
27280            }
27281            if (typeof U.data == "string") try {
27282              const j = JSON.parse(U.data);
27283              return this._dataUpdateable = zn(j, M) ? zi(j, M) : void 0, j;
27284            } catch {
27285              throw new Error(`Input data given to '${U.source}' is not a valid GeoJSON object.`);
27286            }
27287            if (!U.dataDiff) throw new Error(`Input data given to '${U.source}' is not a valid GeoJSON object.`);
27288            if (!this._dataUpdateable) throw new Error(`Cannot update existing geojson data in ${U.source}`);
27289            return function(j, H, ne) {
27290              var de, ie, Be, Le;
27291              if (H.removeAll && j.clear(), H.remove) for (const Re of H.remove) j.delete(Re);
27292              if (H.add) for (const Re of H.add) {
27293                const it = kt(Re, ne);
27294                it != null && j.set(it, Re);
27295              }
27296              if (H.update) for (const Re of H.update) {
27297                let it = j.get(Re.id);
27298                if (it == null) continue;
27299                const Pt = !Re.removeAllProperties && (((de = Re.removeProperties) === null || de === void 0 ? void 0 : de.length) > 0 || ((ie = Re.addOrUpdateProperties) === null || ie === void 0 ? void 0 : ie.length) > 0);
27300                if ((Re.newGeometry || Re.removeAllProperties || Pt) && (it = Object.assign({}, it), j.set(Re.id, it), Pt && (it.properties = Object.assign({}, it.properties))), Re.newGeometry && (it.geometry = Re.newGeometry), Re.removeAllProperties) it.properties = {};
27301                else if (((Be = Re.removeProperties) === null || Be === void 0 ? void 0 : Be.length) > 0) for (const zt of Re.removeProperties) Object.prototype.hasOwnProperty.call(it.properties, zt) && delete it.properties[zt];
27302                if (((Le = Re.addOrUpdateProperties) === null || Le === void 0 ? void 0 : Le.length) > 0) for (const { key: zt, value: dr } of Re.addOrUpdateProperties) it.properties[zt] = dr;
27303              }
27304            }(this._dataUpdateable, U.dataDiff, M), { type: "FeatureCollection", features: Array.from(this._dataUpdateable.values()) };
27305          });
27306        }
27307        removeSource(U) {
27308          return m._(this, void 0, void 0, function* () {
27309            this._pendingRequest && this._pendingRequest.abort();
27310          });
27311        }
27312        getClusterExpansionZoom(U) {
27313          return this._geoJSONIndex.getClusterExpansionZoom(U.clusterId);
27314        }
27315        getClusterChildren(U) {
27316          return this._geoJSONIndex.getChildren(U.clusterId);
27317        }
27318        getClusterLeaves(U) {
27319          return this._geoJSONIndex.getLeaves(U.clusterId, U.limit, U.offset);
27320        }
27321      }
27322      class mn {
27323        constructor(U) {
27324          this.self = U, this.actor = new m.F(U), this.layerIndexes = {}, this.availableImages = {}, this.workerSources = {}, this.demWorkerSources = {}, this.externalWorkerSourceTypes = {}
27324, this.self.registerWorkerSource = (A, M) => {
27325            if (this.externalWorkerSourceTypes[A]) throw new Error(`Worker source with name "${A}" already registered.`);
27326            this.externalWorkerSourceTypes[A] = M;
27327          }, this.self.addProtocol = m.bi, this.self.removeProtocol = m.bj, this.self.registerRTLTextPlugin = (A) => {
27328            if (m.bD.isParsed()) throw new Error("RTL text plugin already registered.");
27329            m.bD.setMethods(A);
27330          }, this.actor.registerMessageHandler("LDT", (A, M) => this._getDEMWorkerSource(A, M.source).loadTile(M)), this.actor.registerMessageHandler("RDT", (A, M) => m._(this, void 0, void 0, function* () {
27331            this._getDEMWorkerSource(A, M.source).removeTile(M);
27332          })), this.actor.registerMessageHandler("GCEZ", (A, M) => m._(this, void 0, void 0, function* () {
27333            return this._getWorkerSource(A, M.type, M.source).getClusterExpansionZoom(M);
27334          })), this.actor.registerMessageHandler("GCC", (A, M) => m._(this, void 0, void 0, function* () {
27335            return this._getWorkerSource(A, M.type, M.source).getClusterChildren(M);
27336          })), this.actor.registerMessageHandler("GCL", (A, M) => m._(this, void 0, void 0, function* () {
27337            return this._getWorkerSource(A, M.type, M.source).getClusterLeaves(M);
27338          })), this.actor.registerMessageHandler("LD", (A, M) => this._getWorkerSource(A, M.type, M.source).loadData(M)), this.actor.registerMessageHandler("GD", (A, M) => this._getWorkerSource(A, M.type, M.source).getData()), this.actor.registerMessageHandler("LT", (A, M) => this._getWorkerSource(A, M.type, M.source).loadTile(M)), this.actor.registerMessageHandler("RT", (A, M) => this._getWorkerSource(A, M.type, M.source).reloadTile(M)), this.actor.registerMessageHandler("AT", (A, M) => this._getWorkerSource(A, M.type, M.source).abortTile(M)), this.actor.registerMessageHandler("RMT", (A, M) => this._getWorkerSource(A, M.type, M.source).removeTile(M)), this.actor.registerMessageHandler("RS", (A, M) => m._(this, void 0, void 0, function* () {
27339            if (!this.workerSources[A] || !this.workerSources[A][M.type] || !this.workerSources[A][M.type][M.source]) return;
27340            const j = this.workerSources[A][M.type][M.source];
27341            delete this.workerSources[A][M.type][M.source], j.removeSource !== void 0 && j.removeSource(M);
27342          })), this.actor.registerMessageHandler("RM", (A) => m._(this, void 0, void 0, function* () {
27343            delete this.layerIndexes[A], delete this.availableImages[A], delete this.workerSources[A], delete this.demWorkerSources[A];
27344          })), this.actor.registerMessageHandler("SR", (A, M) => m._(this, void 0, void 0, function* () {
27345            this.referrer = M;
27346          })), this.actor.registerMessageHandler("SRPS", (A, M) => this._syncRTLPluginState(A, M)), this.actor.registerMessageHandler("IS", (A, M) => m._(this, void 0, void 0, function* () {
27347            this.self.importScripts(M);
27348          })), this.actor.registerMessageHandler("SI", (A, M) => this._setImages(A, M)), this.actor.registerMessageHandler("UL", (A, M) => m._(this, void 0, void 0, function* () {
27349            this._getLayerIndex(A).update(M.layers, M.removedIds);
27350          })), this.actor.registerMessageHandler("SL", (A, M) => m._(this, void 0, void 0, function* () {
27351            this._getLayerIndex(A).replace(M);
27352          }));
27353        }
27354        _setImages(U, A) {
27355          return m._(this, void 0, void 0, function* () {
27356            this.availableImages[U] = A;
27357            for (const M in this.workerSources[U]) {
27358              const j = this.workerSources[U][M];
27359              for (const H in j) j[H].availableImages = A;
27360            }
27361          });
27362        }
27363        _syncRTLPluginState(U, A) {
27364          return m._(this, void 0, void 0, function* () {
27365            if (m.bD.isParsed()) return m.bD.getState();
27366            if (A.pluginStatus !== "loading") return m.bD.setState(A), A;
27367            const M = A.pluginURL;
27368            if (this.self.importScripts(M), m.bD.isParsed()) {
27369              const j = { pluginStatus: "loaded", pluginURL: M };
27370              return m.bD.setState(j), j;
27371            }
27372            throw m.bD.setState({ pluginStatus: "error", pluginURL: "" }), new Error(`RTL Text Plugin failed to import scripts from ${M}`);
27373          });
27374        }
27375        _getAvailableImages(U) {
27376          let A = this.availableImages[U];
27377          return A || (A = []), A;
27378        }
27379        _getLayerIndex(U) {
27380          let A = this.layerIndexes[U];
27381          return A || (A = this.layerIndexes[U] = new c()), A;
27382        }
27383        _getWorkerSource(U, A, M) {
27384          if (this.workerSources[U] || (this.workerSources[U] = {}
vendor: 17,074 bytes, lines 27384-27715
27384), this.workerSources[U][A] || (this.workerSources[U][A] = {}), !this.workerSources[U][A][M]) {
27385            const j = { sendAsync: (H, ne) => (H.targetMapId = U, this.actor.sendAsync(H, ne)) };
27386            switch (A) {
27387              case "vector":
27388                this.workerSources[U][A][M] = new R(j, this._getLayerIndex(U), this._getAvailableImages(U));
27389                break;
27390              case "geojson":
27391                this.workerSources[U][A][M] = new Bi(j, this._getLayerIndex(U), this._getAvailableImages(U));
27392                break;
27393              default:
27394                this.workerSources[U][A][M] = new this.externalWorkerSourceTypes[A](j, this._getLayerIndex(U), this._getAvailableImages(U));
27395            }
27396          }
27397          return this.workerSources[U][A][M];
27398        }
27399        _getDEMWorkerSource(U, A) {
27400          return this.demWorkerSources[U] || (this.demWorkerSources[U] = {}), this.demWorkerSources[U][A] || (this.demWorkerSources[U][A] = new z()), this.demWorkerSources[U][A];
27401        }
27402      }
27403      return m.i(self) && (self.worker = new mn(self)), mn;
27404    }), h("index", ["exports", "./shared"], function(m, c) {
27405      var w = "4.7.1";
27406      let O, P;
27407      const R = { now: typeof performance < "u" && performance && performance.now ? performance.now.bind(performance) : Date.now.bind(Date), frameAsync: (_) => new Promise((r, a) => {
27408        const f = requestAnimationFrame(r);
27409        _.signal.addEventListener("abort", () => {
27410          cancelAnimationFrame(f), a(c.c());
27411        });
27412      }), getImageData(_, r = 0) {
27413        return this.getImageCanvasContext(_).getImageData(-r, -r, _.width + 2 * r, _.height + 2 * r);
27414      }, getImageCanvasContext(_) {
27415        const r = window.document.createElement("canvas"), a = r.getContext("2d", { willReadFrequently: !0 });
27416        if (!a) throw new Error("failed to create canvas 2d context");
27417        return r.width = _.width, r.height = _.height, a.drawImage(_, 0, 0, _.width, _.height), a;
27418      }, resolveURL: (_) => (O || (O = document.createElement("a")), O.href = _, O.href), hardwareConcurrency: typeof navigator < "u" && navigator.hardwareConcurrency || 4, get prefersReducedMotion() {
27419        return !!matchMedia && (P == null && (P = matchMedia("(prefers-reduced-motion: reduce)")), P.matches);
27420      } };
27421      class z {
27422        static testProp(r) {
27423          if (!z.docStyle) return r[0];
27424          for (let a = 0; a < r.length; a++) if (r[a] in z.docStyle) return r[a];
27425          return r[0];
27426        }
27427        static create(r, a, f) {
27428          const d = window.document.createElement(r);
27429          return a !== void 0 && (d.className = a), f && f.appendChild(d), d;
27430        }
27431        static createNS(r, a) {
27432          return window.document.createElementNS(r, a);
27433        }
27434        static disableDrag() {
27435          z.docStyle && z.selectProp && (z.userSelect = z.docStyle[z.selectProp], z.docStyle[z.selectProp] = "none");
27436        }
27437        static enableDrag() {
27438          z.docStyle && z.selectProp && (z.docStyle[z.selectProp] = z.userSelect);
27439        }
27440        static setTransform(r, a) {
27441          r.style[z.transformProp] = a;
27442        }
27443        static addEventListener(r, a, f, d = {}) {
27444          r.addEventListener(a, f, "passive" in d ? d : d.capture);
27445        }
27446        static removeEventListener(r, a, f, d = {}) {
27447          r.removeEventListener(a, f, "passive" in d ? d : d.capture);
27448        }
27449        static suppressClickInternal(r) {
27450          r.preventDefault(), r.stopPropagation(), window.removeEventListener("click", z.suppressClickInternal, !0);
27451        }
27452        static suppressClick() {
27453          window.addEventListener("click", z.suppressClickInternal, !0), window.setTimeout(() => {
27454            window.removeEventListener("click", z.suppressClickInternal, !0);
27455          }, 0);
27456        }
27457        static getScale(r) {
27458          const a = r.getBoundingClientRect();
27459          return { x: a.width / r.offsetWidth || 1, y: a.height / r.offsetHeight || 1, boundingClientRect: a };
27460        }
27461        static getPoint(r, a, f) {
27462          const d = a.boundingClientRect;
27463          return new c.P((f.clientX - d.left) / a.x - r.clientLeft, (f.clientY - d.top) / a.y - r.clientTop);
27464        }
27465        static mousePos(r, a) {
27466          const f = z.getScale(r);
27467          return z.getPoint(r, f, a);
27468        }
27469        static touchPos(r, a) {
27470          const f = [], d = z.getScale(r);
27471          for (let y = 0; y < a.length; y++) f.push(z.getPoint(r, d, a[y]));
27472          return f;
27473        }
27474        static mouseButton(r) {
27475          return r.button;
27476        }
27477        static remove(r) {
27478          r.parentNode && r.parentNode.removeChild(r);
27479        }
27480      }
27481      z.docStyle = typeof window < "u" && window.document && window.document.documentElement.style, z.selectProp = z.testProp(["userSelect", "MozUserSelect", "WebkitUserSelect", "msUserSelect"]), z.transformProp = z.testProp(["transform", "WebkitTransform"]);
27482      const J = { supported: !1, testSupport: function(_) {
27483        !ue && ee && (Ce ? ge(_) : K = _);
27484      } };
27485      let K, ee, ue = !1, Ce = !1;
27486      function ge(_) {
27487        const r = _.createTexture();
27488        _.bindTexture(_.TEXTURE_2D, r);
27489        try {
27490          if (_.texImage2D(_.TEXTURE_2D, 0, _.RGBA, _.RGBA, _.UNSIGNED_BYTE, ee), _.isContextLost()) return;
27491          J.supported = !0;
27492        } catch {
27493        }
27494        _.deleteTexture(r), ue = !0;
27495      }
27496      var X;
27497      typeof document < "u" && (ee = document.createElement("img"), ee.onload = () => {
27498        K && ge(K), K = null, Ce = !0;
27499      }, ee.onerror = () => {
27500        ue = !0, K = null;
27501      }, ee.src = "data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="), function(_) {
27502        let r, a, f, d;
27503        _.resetRequestQueue = () => {
27504          r = [], a = 0, f = 0, d = {};
27505        }, _.addThrottleControl = (I) => {
27506          const F = f++;
27507          return d[F] = I, F;
27508        }, _.removeThrottleControl = (I) => {
27509          delete d[I], S();
27510        }, _.getImage = (I, F, N = !0) => new Promise(($, G) => {
27511          J.supported && (I.headers || (I.headers = {}), I.headers.accept = "image/webp,*/*"), c.e(I, { type: "image" }), r.push({ abortController: F, requestParameters: I, supportImageRefresh: N, state: "queued", onError: (Q) => {
27512            G(Q);
27513          }, onSuccess: (Q) => {
27514            $(Q);
27515          } }), S();
27516        });
27517        const y = (I) => c._(this, void 0, void 0, function* () {
27518          I.state = "running";
27519          const { requestParameters: F, supportImageRefresh: N, onError: $, onSuccess: G, abortController: Q } = I, te = N === !1 && !c.i(self) && !c.g(F.url) && (!F.headers || Object.keys(F.headers).reduce((pe, _e) => pe && _e === "accept", !0));
27520          a++;
27521          const ae = te ? C(F, Q) : c.m(F, Q);
27522          try {
27523            const pe = yield ae;
27524            delete I.abortController, I.state = "completed", pe.data instanceof HTMLImageElement || c.b(pe.data) ? G(pe) : pe.data && G({ data: yield (fe = pe.data, typeof createImageBitmap == "function" ? c.d(fe) : c.f(fe)), cacheControl: pe.cacheControl, expires: pe.expires });
27525          } catch (pe) {
27526            delete I.abortController, $(pe);
27527          } finally {
27528            a--, S();
27529          }
27530          var fe;
27531        }), S = () => {
27532          const I = (() => {
27533            for (const F of Object.keys(d)) if (d[F]()) return !0;
27534            return !1;
27535          })() ? c.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME : c.a.MAX_PARALLEL_IMAGE_REQUESTS;
27536          for (let F = a; F < I && r.length > 0; F++) {
27537            const N = r.shift();
27538            N.abortController.signal.aborted ? F-- : y(N);
27539          }
27540        }, C = (I, F) => new Promise((N, $) => {
27541          const G = new Image(), Q = I.url, te = I.credentials;
27542          te && te === "include" ? G.crossOrigin = "use-credentials" : (te && te === "same-origin" || !c.s(Q)) && (G.crossOrigin = "anonymous"), F.signal.addEventListener("abort", () => {
27543            G.src = "", $(c.c());
27544          }), G.fetchPriority = "high", G.onload = () => {
27545            G.onerror = G.onload = null, N({ data: G });
27546          }, G.onerror = () => {
27547            G.onerror = G.onload = null, F.signal.aborted || $(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));
27548          }, G.src = Q;
27549        });
27550      }(X || (X = {})), X.resetRequestQueue();
27551      class ye {
27552        constructor(r) {
27553          this._transformRequestFn = r;
27554        }
27555        transformRequest(r, a) {
27556          return this._transformRequestFn && this._transformRequestFn(r, a) || { url: r };
27557        }
27558        setTransformRequest(r) {
27559          this._transformRequestFn = r;
27560        }
27561      }
27562      function Ae(_) {
27563        var r = new c.A(3);
27564        return r[0] = _[0], r[1] = _[1], r[2] = _[2], r;
27565      }
27566      var Se, je = function(_, r, a) {
27567        return _[0] = r[0] - a[0], _[1] = r[1] - a[1], _[2] = r[2] - a[2], _;
27568      };
27569      Se = new c.A(3), c.A != Float32Array && (Se[0] = 0, Se[1] = 0, Se[2] = 0);
27570      var Ne = function(_) {
27571        var r = _[0], a = _[1];
27572        return r * r + a * a;
27573      };
27574      function Oe(_) {
27575        const r = [];
27576        if (typeof _ == "string") r.push({ id: "default", url: _ });
27577        else if (_ && _.length > 0) {
27578          const a = [];
27579          for (const { id: f, url: d } of _) {
27580            const y = `${f}${d}`;
27581            a.indexOf(y) === -1 && (a.push(y), r.push({ id: f, url: d }));
27582          }
27583        }
27584        return r;
27585      }
27586      function ze(_, r, a) {
27587        const f = _.split("?");
27588        return f[0] += `${r}${a}`, f.join("?");
27589      }
27590      (function() {
27591        var _ = new c.A(2);
27592        c.A != Float32Array && (_[0] = 0, _[1] = 0);
27593      })();
27594      class He {
27595        constructor(r, a, f, d) {
27596          this.context = r, this.format = f, this.texture = r.gl.createTexture(), this.update(a, d);
27597        }
27598        update(r, a, f) {
27599          const { width: d, height: y } = r, S = !(this.size && this.size[0] === d && this.size[1] === y || f), { context: C } = this, { gl: I } = C;
27600          if (this.useMipmap = !!(a && a.useMipmap), I.bindTexture(I.TEXTURE_2D, this.texture), C.pixelStoreUnpackFlipY.set(!1), C.pixelStoreUnpack.set(1), C.pixelStoreUnpackPremultiplyAlpha.set(this.format === I.RGBA && (!a || a.premultiply !== !1)), S) this.size = [d, y], r instanceof HTMLImageElement || r instanceof HTMLCanvasElement || r instanceof HTMLVideoElement || r instanceof ImageData || c.b(r) ? I.texImage2D(I.TEXTURE_2D, 0, this.format, this.format, I.UNSIGNED_BYTE, r) : I.texImage2D(I.TEXTURE_2D, 0, this.format, d, y, 0, this.format, I.UNSIGNED_BYTE, r.data);
27601          else {
27602            const { x: F, y: N } = f || { x: 0, y: 0 };
27603            r instanceof HTMLImageElement || r instanceof HTMLCanvasElement || r instanceof HTMLVideoElement || r instanceof ImageData || c.b(r) ? I.texSubImage2D(I.TEXTURE_2D, 0, F, N, I.RGBA, I.UNSIGNED_BYTE, r) : I.texSubImage2D(I.TEXTURE_2D, 0, F, N, d, y, I.RGBA, I.UNSIGNED_BYTE, r.data);
27604          }
27605          this.useMipmap && this.isSizePowerOfTwo() && I.generateMipmap(I.TEXTURE_2D);
27606        }
27607        bind(r, a, f) {
27608          const { context: d } = this, { gl: y } = d;
27609          y.bindTexture(y.TEXTURE_2D, this.texture), f !== y.LINEAR_MIPMAP_NEAREST || this.isSizePowerOfTwo() || (f = y.LINEAR), r !== this.filter && (y.texParameteri(y.TEXTURE_2D, y.TEXTURE_MAG_FILTER, r), y.texParameteri(y.TEXTURE_2D, y.TEXTURE_MIN_FILTER, f || r), this.filter = r), a !== this.wrap && (y.texParameteri(y.TEXTURE_2D, y.TEXTURE_WRAP_S, a), y.texParameteri(y.TEXTURE_2D, y.TEXTURE_WRAP_T, a), this.wrap = a);
27610        }
27611        isSizePowerOfTwo() {
27612          return this.size[0] === this.size[1] && Math.log(this.size[0]) / Math.LN2 % 1 == 0;
27613        }
27614        destroy() {
27615          const { gl: r } = this.context;
27616          r.deleteTexture(this.texture), this.texture = null;
27617        }
27618      }
27619      function Ie(_) {
27620        const { userImage: r } = _;
27621        return !!(r && r.render && r.render()) && (_.data.replace(new Uint8Array(r.data.buffer)), !0);
27622      }
27623      class $e extends c.E {
27624        constructor() {
27625          super(), this.images = {}, this.updatedImages = {}, this.callbackDispatchedThisFrame = {}, this.loaded = !1, this.requestors = [], this.patterns = {}, this.atlasImage = new c.R({ width: 1, height: 1 }), this.dirty = !0;
27626        }
27627        isLoaded() {
27628          return this.loaded;
27629        }
27630        setLoaded(r) {
27631          if (this.loaded !== r && (this.loaded = r, r)) {
27632            for (const { ids: a, promiseResolve: f } of this.requestors) f(this._getImagesForIds(a));
27633            this.requestors = [];
27634          }
27635        }
27636        getImage(r) {
27637          const a = this.images[r];
27638          if (a && !a.data && a.spriteData) {
27639            const f = a.spriteData;
27640            a.data = new c.R({ width: f.width, height: f.height }, f.context.getImageData(f.x, f.y, f.width, f.height).data), a.spriteData = null;
27641          }
27642          return a;
27643        }
27644        addImage(r, a) {
27645          if (this.images[r]) throw new Error(`Image id ${r} already exist, use updateImage instead`);
27646          this._validate(r, a) && (this.images[r] = a);
27647        }
27648        _validate(r, a) {
27649          let f = !0;
27650          const d = a.data || a.spriteData;
27651          return this._validateStretch(a.stretchX, d && d.width) || (this.fire(new c.j(new Error(`Image "${r}" has invalid "stretchX" value`))), f = !1), this._validateStretch(a.stretchY, d && d.height) || (this.fire(new c.j(new Error(`Image "${r}" has invalid "stretchY" value`))), f = !1), this._validateContent(a.content, a) || (this.fire(new c.j(new Error(`Image "${r}" has invalid "content" value`))), f = !1), f;
27652        }
27653        _validateStretch(r, a) {
27654          if (!r) return !0;
27655          let f = 0;
27656          for (const d of r) {
27657            if (d[0] < f || d[1] < d[0] || a < d[1]) return !1;
27658            f = d[1];
27659          }
27660          return !0;
27661        }
27662        _validateContent(r, a) {
27663          if (!r) return !0;
27664          if (r.length !== 4) return !1;
27665          const f = a.spriteData, d = f && f.width || a.data.width, y = f && f.height || a.data.height;
27666          return !(r[0] < 0 || d < r[0] || r[1] < 0 || y < r[1] || r[2] < 0 || d < r[2] || r[3] < 0 || y < r[3] || r[2] < r[0] || r[3] < r[1]);
27667        }
27668        updateImage(r, a, f = !0) {
27669          const d = this.getImage(r);
27670          if (f && (d.data.width !== a.data.width || d.data.height !== a.data.height)) throw new Error(`size mismatch between old image (${d.data.width}x${d.data.height}) and new image (${a.data.width}x${a.data.height}).`);
27671          a.version = d.version + 1, this.images[r] = a, this.updatedImages[r] = !0;
27672        }
27673        removeImage(r) {
27674          const a = this.images[r];
27675          delete this.images[r], delete this.patterns[r], a.userImage && a.userImage.onRemove && a.userImage.onRemove();
27676        }
27677        listImages() {
27678          return Object.keys(this.images);
27679        }
27680        getImages(r) {
27681          return new Promise((a, f) => {
27682            let d = !0;
27683            if (!this.isLoaded()) for (const y of r) this.images[y] || (d = !1);
27684            this.isLoaded() || d ? a(this._getImagesForIds(r)) : this.requestors.push({ ids: r, promiseResolve: a });
27685          });
27686        }
27687        _getImagesForIds(r) {
27688          const a = {};
27689          for (const f of r) {
27690            let d = this.getImage(f);
27691            d || (this.fire(new c.k("styleimagemissing", { id: f })), d = this.getImage(f)), d ? a[f] = { data: d.data.clone(), pixelRatio: d.pixelRatio, sdf: d.sdf, version: d.version, stretchX: d.stretchX, stretchY: d.stretchY, content: d.content, textFitWidth: d.textFitWidth, textFitHeight: d.textFitHeight, hasRenderCallback: !!(d.userImage && d.userImage.render) } : c.w(`Image "${f}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`);
27692          }
27693          return a;
27694        }
27695        getPixelSize() {
27696          const { width: r, height: a } = this.atlasImage;
27697          return { width: r, height: a };
27698        }
27699        getPattern(r) {
27700          const a = this.patterns[r], f = this.getImage(r);
27701          if (!f) return null;
27702          if (a && a.position.version === f.version) return a.position;
27703          if (a) a.position.version = f.version;
27704          else {
27705            const d = { w: f.data.width + 2, h: f.data.height + 2, x: 0, y: 0 }, y = new c.I(d, f);
27706            this.patterns[r] = { bin: d, position: y };
27707          }
27708          return this._updatePatternAtlas(), this.patterns[r].position;
27709        }
27710        bind(r) {
27711          const a = r.gl;
27712          this.atlasTexture ? this.dirty && (this.atlasTexture.update(this.atlasImage), this.dirty = !1) : this.atlasTexture = new He(r, this.atlasImage, a.RGBA), this.atlasTexture.bind(a.LINEAR, a.CLAMP_TO_EDGE);
27713        }
27714        _updatePatternAtlas() {
27715          const r = [];
vendor: 5,448 bytes, lines 27716-27819
27716          for (const y in this.patterns) r.push(this.patterns[y].bin);
27717          const { w: a, h: f } = c.p(r), d = this.atlasImage;
27718          d.resize({ width: a || 1, height: f || 1 });
27719          for (const y in this.patterns) {
27720            const { bin: S } = this.patterns[y], C = S.x + 1, I = S.y + 1, F = this.getImage(y).data, N = F.width, $ = F.height;
27721            c.R.copy(F, d, { x: 0, y: 0 }, { x: C, y: I }, { width: N, height: $ }), c.R.copy(F, d, { x: 0, y: $ - 1 }, { x: C, y: I - 1 }, { width: N, height: 1 }), c.R.copy(F, d, { x: 0, y: 0 }, { x: C, y: I + $ }, { width: N, height: 1 }), c.R.copy(F, d, { x: N - 1, y: 0 }, { x: C - 1, y: I }, { width: 1, height: $ }), c.R.copy(F, d, { x: 0, y: 0 }, { x: C + N, y: I }, { width: 1, height: $ });
27722          }
27723          this.dirty = !0;
27724        }
27725        beginFrame() {
27726          this.callbackDispatchedThisFrame = {};
27727        }
27728        dispatchRenderCallbacks(r) {
27729          for (const a of r) {
27730            if (this.callbackDispatchedThisFrame[a]) continue;
27731            this.callbackDispatchedThisFrame[a] = !0;
27732            const f = this.getImage(a);
27733            f || c.w(`Image with ID: "${a}" was not found`), Ie(f) && this.updateImage(a, f);
27734          }
27735        }
27736      }
27737      const Xe = 1e20;
27738      function st(_, r, a, f, d, y, S, C, I) {
27739        for (let F = r; F < r + f; F++) Ge(_, a * y + F, y, d, S, C, I);
27740        for (let F = a; F < a + d; F++) Ge(_, F * y + r, 1, f, S, C, I);
27741      }
27742      function Ge(_, r, a, f, d, y, S) {
27743        y[0] = 0, S[0] = -Xe, S[1] = Xe, d[0] = _[r];
27744        for (let C = 1, I = 0, F = 0; C < f; C++) {
27745          d[C] = _[r + C * a];
27746          const N = C * C;
27747          do {
27748            const $ = y[I];
27749            F = (d[C] - d[$] + N - $ * $) / (C - $) / 2;
27750          } while (F <= S[I] && --I > -1);
27751          I++, y[I] = C, S[I] = F, S[I + 1] = Xe;
27752        }
27753        for (let C = 0, I = 0; C < f; C++) {
27754          for (; S[I + 1] < C; ) I++;
27755          const F = y[I], N = C - F;
27756          _[r + C * a] = d[F] + N * N;
27757        }
27758      }
27759      class ct {
27760        constructor(r, a) {
27761          this.requestManager = r, this.localIdeographFontFamily = a, this.entries = {};
27762        }
27763        setURL(r) {
27764          this.url = r;
27765        }
27766        getGlyphs(r) {
27767          return c._(this, void 0, void 0, function* () {
27768            const a = [];
27769            for (const y in r) for (const S of r[y]) a.push(this._getAndCacheGlyphsPromise(y, S));
27770            const f = yield Promise.all(a), d = {};
27771            for (const { stack: y, id: S, glyph: C } of f) d[y] || (d[y] = {}), d[y][S] = C && { id: C.id, bitmap: C.bitmap.clone(), metrics: C.metrics };
27772            return d;
27773          });
27774        }
27775        _getAndCacheGlyphsPromise(r, a) {
27776          return c._(this, void 0, void 0, function* () {
27777            let f = this.entries[r];
27778            f || (f = this.entries[r] = { glyphs: {}, requests: {}, ranges: {} });
27779            let d = f.glyphs[a];
27780            if (d !== void 0) return { stack: r, id: a, glyph: d };
27781            if (d = this._tinySDF(f, r, a), d) return f.glyphs[a] = d, { stack: r, id: a, glyph: d };
27782            const y = Math.floor(a / 256);
27783            if (256 * y > 65535) throw new Error("glyphs > 65535 not supported");
27784            if (f.ranges[y]) return { stack: r, id: a, glyph: d };
27785            if (!this.url) throw new Error("glyphsUrl is not set");
27786            if (!f.requests[y]) {
27787              const C = ct.loadGlyphRange(r, y, this.url, this.requestManager);
27788              f.requests[y] = C;
27789            }
27790            const S = yield f.requests[y];
27791            for (const C in S) this._doesCharSupportLocalGlyph(+C) || (f.glyphs[+C] = S[+C]);
27792            return f.ranges[y] = !0, { stack: r, id: a, glyph: S[a] || null };
27793          });
27794        }
27795        _doesCharSupportLocalGlyph(r) {
27796          return !!this.localIdeographFontFamily && new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}", "u").test(String.fromCodePoint(r));
27797        }
27798        _tinySDF(r, a, f) {
27799          const d = this.localIdeographFontFamily;
27800          if (!d || !this._doesCharSupportLocalGlyph(f)) return;
27801          let y = r.tinySDF;
27802          if (!y) {
27803            let C = "400";
27804            /bold/i.test(a) ? C = "900" : /medium/i.test(a) ? C = "500" : /light/i.test(a) && (C = "200"), y = r.tinySDF = new ct.TinySDF({ fontSize: 48, buffer: 6, radius: 16, cutoff: 0.25, fontFamily: d, fontWeight: C });
27805          }
27806          const S = y.draw(String.fromCharCode(f));
27807          return { id: f, bitmap: new c.o({ width: S.width || 60, height: S.height || 60 }, S.data), metrics: { width: S.glyphWidth / 2 || 24, height: S.glyphHeight / 2 || 24, left: S.glyphLeft / 2 + 0.5 || 0, top: S.glyphTop / 2 - 27.5 || -8, advance: S.glyphAdvance / 2 || 24, isDoubleResolution: !0 } };
27808        }
27809      }
27810      ct.loadGlyphRange = function(_, r, a, f) {
27811        return c._(this, void 0, void 0, function* () {
27812          const d = 256 * r, y = d + 255, S = f.transformRequest(a.replace("{fontstack}", _).replace("{range}", `${d}-${y}`), "Glyphs"), C = yield c.l(S, new AbortController());
27813          if (!C || !C.data) throw new Error(`Could not load glyph range. range: ${r}, ${d}-${y}`);
27814          const I = {};
27815          for (const F of c.n(C.data)) I[F.id] = F;
27816          return I;
27817        });
27818      }, ct.TinySDF = class {
27819        constructor({ fontSize: _ = 24, buffer: r = 3, radius: a = 8, cutoff: f = 0.25, fontFamily: d 
vendor: 9,808 bytes, lines 27819-28004
27819= "sans-serif", fontWeight: y = "normal", fontStyle: S = "normal" } = {}) {
27820          this.buffer = r, this.cutoff = f, this.radius = a;
27821          const C = this.size = _ + 4 * r, I = this._createCanvas(C), F = this.ctx = I.getContext("2d", { willReadFrequently: !0 });
27822          F.font = `${S} ${y} ${_}px ${d}`, F.textBaseline = "alphabetic", F.textAlign = "left", F.fillStyle = "black", this.gridOuter = new Float64Array(C * C), this.gridInner = new Float64Array(C * C), this.f = new Float64Array(C), this.z = new Float64Array(C + 1), this.v = new Uint16Array(C);
27823        }
27824        _createCanvas(_) {
27825          const r = document.createElement("canvas");
27826          return r.width = r.height = _, r;
27827        }
27828        draw(_) {
27829          const { width: r, actualBoundingBoxAscent: a, actualBoundingBoxDescent: f, actualBoundingBoxLeft: d, actualBoundingBoxRight: y } = this.ctx.measureText(_), S = Math.ceil(a), C = Math.max(0, Math.min(this.size - this.buffer, Math.ceil(y - d))), I = Math.min(this.size - this.buffer, S + Math.ceil(f)), F = C + 2 * this.buffer, N = I + 2 * this.buffer, $ = Math.max(F * N, 0), G = new Uint8ClampedArray($), Q = { data: G, width: F, height: N, glyphWidth: C, glyphHeight: I, glyphTop: S, glyphLeft: 0, glyphAdvance: r };
27830          if (C === 0 || I === 0) return Q;
27831          const { ctx: te, buffer: ae, gridInner: fe, gridOuter: pe } = this;
27832          te.clearRect(ae, ae, C, I), te.fillText(_, ae, ae + S);
27833          const _e = te.getImageData(ae, ae, C, I);
27834          pe.fill(Xe, 0, $), fe.fill(0, 0, $);
27835          for (let se = 0; se < I; se++) for (let Te = 0; Te < C; Te++) {
27836            const Me = _e.data[4 * (se * C + Te) + 3] / 255;
27837            if (Me === 0) continue;
27838            const Fe = (se + ae) * F + Te + ae;
27839            if (Me === 1) pe[Fe] = 0, fe[Fe] = Xe;
27840            else {
27841              const Je = 0.5 - Me;
27842              pe[Fe] = Je > 0 ? Je * Je : 0, fe[Fe] = Je < 0 ? Je * Je : 0;
27843            }
27844          }
27845          st(pe, 0, 0, F, N, F, this.f, this.v, this.z), st(fe, ae, ae, C, I, F, this.f, this.v, this.z);
27846          for (let se = 0; se < $; se++) {
27847            const Te = Math.sqrt(pe[se]) - Math.sqrt(fe[se]);
27848            G[se] = Math.round(255 - 255 * (Te / this.radius + this.cutoff));
27849          }
27850          return Q;
27851        }
27852      };
27853      class ot {
27854        constructor() {
27855          this.specification = c.v.light.position;
27856        }
27857        possiblyEvaluate(r, a) {
27858          return c.x(r.expression.evaluate(a));
27859        }
27860        interpolate(r, a, f) {
27861          return { x: c.y.number(r.x, a.x, f), y: c.y.number(r.y, a.y, f), z: c.y.number(r.z, a.z, f) };
27862        }
27863      }
27864      let Ht;
27865      class fr extends c.E {
27866        constructor(r) {
27867          super(), Ht = Ht || new c.q({ anchor: new c.D(c.v.light.anchor), position: new ot(), color: new c.D(c.v.light.color), intensity: new c.D(c.v.light.intensity) }), this._transitionable = new c.T(Ht), this.setLight(r), this._transitioning = this._transitionable.untransitioned();
27868        }
27869        getLight() {
27870          return this._transitionable.serialize();
27871        }
27872        setLight(r, a = {}) {
27873          if (!this._validate(c.r, r, a)) for (const f in r) {
27874            const d = r[f];
27875            f.endsWith("-transition") ? this._transitionable.setTransition(f.slice(0, -11), d) : this._transitionable.setValue(f, d);
27876          }
27877        }
27878        updateTransitions(r) {
27879          this._transitioning = this._transitionable.transitioned(r, this._transitioning);
27880        }
27881        hasTransition() {
27882          return this._transitioning.hasTransition();
27883        }
27884        recalculate(r) {
27885          this.properties = this._transitioning.possiblyEvaluate(r);
27886        }
27887        _validate(r, a, f) {
27888          return (!f || f.validate !== !1) && c.t(this, r.call(c.u, { value: a, style: { glyphs: !0, sprite: !0 }, styleSpec: c.v }));
27889        }
27890      }
27891      const Qt = new c.q({ "sky-color": new c.D(c.v.sky["sky-color"]), "horizon-color": new c.D(c.v.sky["horizon-color"]), "fog-color": new c.D(c.v.sky["fog-color"]), "fog-ground-blend": new c.D(c.v.sky["fog-ground-blend"]), "horizon-fog-blend": new c.D(c.v.sky["horizon-fog-blend"]), "sky-horizon-blend": new c.D(c.v.sky["sky-horizon-blend"]), "atmosphere-blend": new c.D(c.v.sky["atmosphere-blend"]) });
27892      class ur extends c.E {
27893        constructor(r) {
27894          super(), this._transitionable = new c.T(Qt), this.setSky(r), this._transitioning = this._transitionable.untransitioned(), this.recalculate(new c.z(0));
27895        }
27896        setSky(r, a = {}) {
27897          if (!this._validate(c.B, r, a)) {
27898            r || (r = { "sky-color": "transparent", "horizon-color": "transparent", "fog-color": "transparent", "fog-ground-blend": 1, "atmosphere-blend": 0 });
27899            for (const f in r) {
27900              const d = r[f];
27901              f.endsWith("-transition") ? this._transitionable.setTransition(f.slice(0, -11), d) : this._transitionable.setValue(f, d);
27902            }
27903          }
27904        }
27905        getSky() {
27906          return this._transitionable.serialize();
27907        }
27908        updateTransitions(r) {
27909          this._transitioning = this._transitionable.transitioned(r, this._transitioning);
27910        }
27911        hasTransition() {
27912          return this._transitioning.hasTransition();
27913        }
27914        recalculate(r) {
27915          this.properties = this._transitioning.possiblyEvaluate(r);
27916        }
27917        _validate(r, a, f = {}) {
27918          return (f == null ? void 0 : f.validate) !== !1 && c.t(this, r.call(c.u, c.e({ value: a, style: { glyphs: !0, sprite: !0 }, styleSpec: c.v })));
27919        }
27920        calculateFogBlendOpacity(r) {
27921          return r < 60 ? 0 : r < 70 ? (r - 60) / 10 : 1;
27922        }
27923      }
27924      class Ar {
27925        constructor(r, a) {
27926          this.width = r, this.height = a, this.nextRow = 0, this.data = new Uint8Array(this.width * this.height), this.dashEntry = {};
27927        }
27928        getDash(r, a) {
27929          const f = r.join(",") + String(a);
27930          return this.dashEntry[f] || (this.dashEntry[f] = this.addDash(r, a)), this.dashEntry[f];
27931        }
27932        getDashRanges(r, a, f) {
27933          const d = [];
27934          let y = r.length % 2 == 1 ? -r[r.length - 1] * f : 0, S = r[0] * f, C = !0;
27935          d.push({ left: y, right: S, isDash: C, zeroLength: r[0] === 0 });
27936          let I = r[0];
27937          for (let F = 1; F < r.length; F++) {
27938            C = !C;
27939            const N = r[F];
27940            y = I * f, I += N, S = I * f, d.push({ left: y, right: S, isDash: C, zeroLength: N === 0 });
27941          }
27942          return d;
27943        }
27944        addRoundDash(r, a, f) {
27945          const d = a / 2;
27946          for (let y = -f; y <= f; y++) {
27947            const S = this.width * (this.nextRow + f + y);
27948            let C = 0, I = r[C];
27949            for (let F = 0; F < this.width; F++) {
27950              F / I.right > 1 && (I = r[++C]);
27951              const N = Math.abs(F - I.left), $ = Math.abs(F - I.right), G = Math.min(N, $);
27952              let Q;
27953              const te = y / f * (d + 1);
27954              if (I.isDash) {
27955                const ae = d - Math.abs(te);
27956                Q = Math.sqrt(G * G + ae * ae);
27957              } else Q = d - Math.sqrt(G * G + te * te);
27958              this.data[S + F] = Math.max(0, Math.min(255, Q + 128));
27959            }
27960          }
27961        }
27962        addRegularDash(r) {
27963          for (let C = r.length - 1; C >= 0; --C) {
27964            const I = r[C], F = r[C + 1];
27965            I.zeroLength ? r.splice(C, 1) : F && F.isDash === I.isDash && (F.left = I.left, r.splice(C, 1));
27966          }
27967          const a = r[0], f = r[r.length - 1];
27968          a.isDash === f.isDash && (a.left = f.left - this.width, f.right = a.right + this.width);
27969          const d = this.width * this.nextRow;
27970          let y = 0, S = r[y];
27971          for (let C = 0; C < this.width; C++) {
27972            C / S.right > 1 && (S = r[++y]);
27973            const I = Math.abs(C - S.left), F = Math.abs(C - S.right), N = Math.min(I, F);
27974            this.data[d + C] = Math.max(0, Math.min(255, (S.isDash ? N : -N) + 128));
27975          }
27976        }
27977        addDash(r, a) {
27978          const f = a ? 7 : 0, d = 2 * f + 1;
27979          if (this.nextRow + d > this.height) return c.w("LineAtlas out of space"), null;
27980          let y = 0;
27981          for (let C = 0; C < r.length; C++) y += r[C];
27982          if (y !== 0) {
27983            const C = this.width / y, I = this.getDashRanges(r, this.width, C);
27984            a ? this.addRoundDash(I, C, f) : this.addRegularDash(I);
27985          }
27986          const S = { y: (this.nextRow + f + 0.5) / this.height, height: 2 * f / this.height, width: y };
27987          return this.nextRow += d, this.dirty = !0, S;
27988        }
27989        bind(r) {
27990          const a = r.gl;
27991          this.texture ? (a.bindTexture(a.TEXTURE_2D, this.texture), this.dirty && (this.dirty = !1, a.texSubImage2D(a.TEXTURE_2D, 0, 0, 0, this.width, this.height, a.ALPHA, a.UNSIGNED_BYTE, this.data))) : (this.texture = a.createTexture(), a.bindTexture(a.TEXTURE_2D, this.texture), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_S, a.REPEAT), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_WRAP_T, a.REPEAT), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MIN_FILTER, a.LINEAR), a.texParameteri(a.TEXTURE_2D, a.TEXTURE_MAG_FILTER, a.LINEAR), a.texImage2D(a.TEXTURE_2D, 0, a.ALPHA, this.width, this.height, 0, a.ALPHA, a.UNSIGNED_BYTE, this.data));
27992        }
27993      }
27994      const en = "maplibre_preloaded_worker_pool";
27995      class $r {
27996        constructor() {
27997          this.active = {};
27998        }
27999        acquire(r) {
28000          if (!this.workers) for (this.workers = []; this.workers.length < $r.workerCount; ) this.workers.push(new Worker(c.a.WORKER_URL));
28001          return this.active[r] = !0, this.workers.slice();
28002        }
28003        release(r) {
28004          delete this.active[r], this.numActive() === 0 && (this.workers.forEac
vendor: 4,106 bytes, lines 28004-28100
28004h((a) => {
28005            a.terminate();
28006          }), this.workers = null);
28007        }
28008        isPreloaded() {
28009          return !!this.active[en];
28010        }
28011        numActive() {
28012          return Object.keys(this.active).length;
28013        }
28014      }
28015      const Fr = Math.floor(R.hardwareConcurrency / 2);
28016      let dn, kn;
28017      function tn() {
28018        return dn || (dn = new $r()), dn;
28019      }
28020      $r.workerCount = c.C(globalThis) ? Math.max(Math.min(Fr, 3), 1) : 1;
28021      class Jt {
28022        constructor(r, a) {
28023          this.workerPool = r, this.actors = [], this.currentActor = 0, this.id = a;
28024          const f = this.workerPool.acquire(a);
28025          for (let d = 0; d < f.length; d++) {
28026            const y = new c.F(f[d], a);
28027            y.name = `Worker ${d}`, this.actors.push(y);
28028          }
28029          if (!this.actors.length) throw new Error("No actors found");
28030        }
28031        broadcast(r, a) {
28032          const f = [];
28033          for (const d of this.actors) f.push(d.sendAsync({ type: r, data: a }));
28034          return Promise.all(f);
28035        }
28036        getActor() {
28037          return this.currentActor = (this.currentActor + 1) % this.actors.length, this.actors[this.currentActor];
28038        }
28039        remove(r = !0) {
28040          this.actors.forEach((a) => {
28041            a.remove();
28042          }), this.actors = [], r && this.workerPool.release(this.id);
28043        }
28044        registerMessageHandler(r, a) {
28045          for (const f of this.actors) f.registerMessageHandler(r, a);
28046        }
28047      }
28048      function Fi() {
28049        return kn || (kn = new Jt(tn(), c.G), kn.registerMessageHandler("GR", (_, r, a) => c.m(r, a))), kn;
28050      }
28051      function Kn(_, r) {
28052        const a = c.H();
28053        return c.J(a, a, [1, 1, 0]), c.K(a, a, [0.5 * _.width, 0.5 * _.height, 1]), c.L(a, a, _.calculatePosMatrix(r.toUnwrapped()));
28054      }
28055      function me(_, r, a, f, d, y) {
28056        const S = function($, G, Q) {
28057          if ($) for (const te of $) {
28058            const ae = G[te];
28059            if (ae && ae.source === Q && ae.type === "fill-extrusion") return !0;
28060          }
28061          else for (const te in G) {
28062            const ae = G[te];
28063            if (ae.source === Q && ae.type === "fill-extrusion") return !0;
28064          }
28065          return !1;
28066        }(d && d.layers, r, _.id), C = y.maxPitchScaleFactor(), I = _.tilesIn(f, C, S);
28067        I.sort(Ee);
28068        const F = [];
28069        for (const $ of I) F.push({ wrappedTileID: $.tileID.wrapped().key, queryResults: $.tile.queryRenderedFeatures(r, a, _._state, $.queryGeometry, $.cameraQueryGeometry, $.scale, d, y, C, Kn(_.transform, $.tileID)) });
28070        const N = function($) {
28071          const G = {}, Q = {};
28072          for (const te of $) {
28073            const ae = te.queryResults, fe = te.wrappedTileID, pe = Q[fe] = Q[fe] || {};
28074            for (const _e in ae) {
28075              const se = ae[_e], Te = pe[_e] = pe[_e] || {}, Me = G[_e] = G[_e] || [];
28076              for (const Fe of se) Te[Fe.featureIndex] || (Te[Fe.featureIndex] = !0, Me.push(Fe));
28077            }
28078          }
28079          return G;
28080        }(F);
28081        for (const $ in N) N[$].forEach((G) => {
28082          const Q = G.feature, te = _.getFeatureState(Q.layer["source-layer"], Q.id);
28083          Q.source = Q.layer.source, Q.layer["source-layer"] && (Q.sourceLayer = Q.layer["source-layer"]), Q.state = te;
28084        });
28085        return N;
28086      }
28087      function Ee(_, r) {
28088        const a = _.tileID, f = r.tileID;
28089        return a.overscaledZ - f.overscaledZ || a.canonical.y - f.canonical.y || a.wrap - f.wrap || a.canonical.x - f.canonical.x;
28090      }
28091      function Ze(_, r, a) {
28092        return c._(this, void 0, void 0, function* () {
28093          let f = _;
28094          if (_.url ? f = (yield c.h(r.transformRequest(_.url, "Source"), a)).data : yield R.frameAsync(a), !f) return null;
28095          const d = c.M(c.e(f, _), ["tiles", "minzoom", "maxzoom", "attribution", "bounds", "scheme", "tileSize", "encoding"]);
28096          return "vector_layers" in f && f.vector_layers && (d.vectorLayerIds = f.vector_layers.map((y) => y.id)), d;
28097        });
28098      }
28099      class re {
28100        constructor(r, a) {
vendor: 7,667 bytes, lines 28101-28253
28101          r && (a ? this.setSouthWest(r).setNorthEast(a) : Array.isArray(r) && (r.length === 4 ? this.setSouthWest([r[0], r[1]]).setNorthEast([r[2], r[3]]) : this.setSouthWest(r[0]).setNorthEast(r[1])));
28102        }
28103        setNorthEast(r) {
28104          return this._ne = r instanceof c.N ? new c.N(r.lng, r.lat) : c.N.convert(r), this;
28105        }
28106        setSouthWest(r) {
28107          return this._sw = r instanceof c.N ? new c.N(r.lng, r.lat) : c.N.convert(r), this;
28108        }
28109        extend(r) {
28110          const a = this._sw, f = this._ne;
28111          let d, y;
28112          if (r instanceof c.N) d = r, y = r;
28113          else {
28114            if (!(r instanceof re)) return Array.isArray(r) ? r.length === 4 || r.every(Array.isArray) ? this.extend(re.convert(r)) : this.extend(c.N.convert(r)) : r && ("lng" in r || "lon" in r) && "lat" in r ? this.extend(c.N.convert(r)) : this;
28115            if (d = r._sw, y = r._ne, !d || !y) return this;
28116          }
28117          return a || f ? (a.lng = Math.min(d.lng, a.lng), a.lat = Math.min(d.lat, a.lat), f.lng = Math.max(y.lng, f.lng), f.lat = Math.max(y.lat, f.lat)) : (this._sw = new c.N(d.lng, d.lat), this._ne = new c.N(y.lng, y.lat)), this;
28118        }
28119        getCenter() {
28120          return new c.N((this._sw.lng + this._ne.lng) / 2, (this._sw.lat + this._ne.lat) / 2);
28121        }
28122        getSouthWest() {
28123          return this._sw;
28124        }
28125        getNorthEast() {
28126          return this._ne;
28127        }
28128        getNorthWest() {
28129          return new c.N(this.getWest(), this.getNorth());
28130        }
28131        getSouthEast() {
28132          return new c.N(this.getEast(), this.getSouth());
28133        }
28134        getWest() {
28135          return this._sw.lng;
28136        }
28137        getSouth() {
28138          return this._sw.lat;
28139        }
28140        getEast() {
28141          return this._ne.lng;
28142        }
28143        getNorth() {
28144          return this._ne.lat;
28145        }
28146        toArray() {
28147          return [this._sw.toArray(), this._ne.toArray()];
28148        }
28149        toString() {
28150          return `LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`;
28151        }
28152        isEmpty() {
28153          return !(this._sw && this._ne);
28154        }
28155        contains(r) {
28156          const { lng: a, lat: f } = c.N.convert(r);
28157          let d = this._sw.lng <= a && a <= this._ne.lng;
28158          return this._sw.lng > this._ne.lng && (d = this._sw.lng >= a && a >= this._ne.lng), this._sw.lat <= f && f <= this._ne.lat && d;
28159        }
28160        static convert(r) {
28161          return r instanceof re ? r : r && new re(r);
28162        }
28163        static fromLngLat(r, a = 0) {
28164          const f = 360 * a / 40075017, d = f / Math.cos(Math.PI / 180 * r.lat);
28165          return new re(new c.N(r.lng - d, r.lat - f), new c.N(r.lng + d, r.lat + f));
28166        }
28167        adjustAntiMeridian() {
28168          const r = new c.N(this._sw.lng, this._sw.lat), a = new c.N(this._ne.lng, this._ne.lat);
28169          return new re(r, r.lng > a.lng ? new c.N(a.lng + 360, a.lat) : a);
28170        }
28171      }
28172      class et {
28173        constructor(r, a, f) {
28174          this.bounds = re.convert(this.validateBounds(r)), this.minzoom = a || 0, this.maxzoom = f || 24;
28175        }
28176        validateBounds(r) {
28177          return Array.isArray(r) && r.length === 4 ? [Math.max(-180, r[0]), Math.max(-90, r[1]), Math.min(180, r[2]), Math.min(90, r[3])] : [-180, -90, 180, 90];
28178        }
28179        contains(r) {
28180          const a = Math.pow(2, r.z), f = Math.floor(c.O(this.bounds.getWest()) * a), d = Math.floor(c.Q(this.bounds.getNorth()) * a), y = Math.ceil(c.O(this.bounds.getEast()) * a), S = Math.ceil(c.Q(this.bounds.getSouth()) * a);
28181          return r.x >= f && r.x < y && r.y >= d && r.y < S;
28182        }
28183      }
28184      class ft extends c.E {
28185        constructor(r, a, f, d) {
28186          if (super(), this.id = r, this.dispatcher = f, this.type = "vector", this.minzoom = 0, this.maxzoom = 22, this.scheme = "xyz", this.tileSize = 512, this.reparseOverscaled = !0, this.isTileClipped = !0, this._loaded = !1, c.e(this, c.M(a, ["url", "scheme", "tileSize", "promoteId"])), this._options = c.e({ type: "vector" }, a), this._collectResourceTiming = a.collectResourceTiming, this.tileSize !== 512) throw new Error("vector tile sources must have a tileSize of 512");
28187          this.setEventedParent(d);
28188        }
28189        load() {
28190          return c._(this, void 0, void 0, function* () {
28191            this._loaded = !1, this.fire(new c.k("dataloading", { dataType: "source" })), this._tileJSONRequest = new AbortController();
28192            try {
28193              const r = yield Ze(this._options, this.map._requestManager, this._tileJSONRequest);
28194              this._tileJSONRequest = null, this._loaded = !0, this.map.style.sourceCaches[this.id].clearTiles(), r && (c.e(this, r), r.bounds && (this.tileBounds = new et(r.bounds, this.minzoom, this.maxzoom)), this.fire(new c.k("data", { dataType: "source", sourceDataType: "metadata" })), this.fire(new c.k("data", { dataType: "source", sourceDataType: "content" })));
28195            } catch (r) {
28196              this._tileJSONRequest = null, this.fire(new c.j(r));
28197            }
28198          });
28199        }
28200        loaded() {
28201          return this._loaded;
28202        }
28203        hasTile(r) {
28204          return !this.tileBounds || this.tileBounds.contains(r.canonical);
28205        }
28206        onAdd(r) {
28207          this.map = r, this.load();
28208        }
28209        setSourceProperty(r) {
28210          this._tileJSONRequest && this._tileJSONRequest.abort(), r(), this.load();
28211        }
28212        setTiles(r) {
28213          return this.setSourceProperty(() => {
28214            this._options.tiles = r;
28215          }), this;
28216        }
28217        setUrl(r) {
28218          return this.setSourceProperty(() => {
28219            this.url = r, this._options.url = r;
28220          }), this;
28221        }
28222        onRemove() {
28223          this._tileJSONRequest && (this._tileJSONRequest.abort(), this._tileJSONRequest = null);
28224        }
28225        serialize() {
28226          return c.e({}, this._options);
28227        }
28228        loadTile(r) {
28229          return c._(this, void 0, void 0, function* () {
28230            const a = r.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme), f = { request: this.map._requestManager.transformRequest(a, "Tile"), uid: r.uid, tileID: r.tileID, zoom: r.tileID.overscaledZ, tileSize: this.tileSize * r.tileID.overscaleFactor(), type: this.type, source: this.id, pixelRatio: this.map.getPixelRatio(), showCollisionBoxes: this.map.showCollisionBoxes, promoteId: this.promoteId };
28231            f.request.collectResourceTiming = this._collectResourceTiming;
28232            let d = "RT";
28233            if (r.actor && r.state !== "expired") {
28234              if (r.state === "loading") return new Promise((y, S) => {
28235                r.reloadPromise = { resolve: y, reject: S };
28236              });
28237            } else r.actor = this.dispatcher.getActor(), d = "LT";
28238            r.abortController = new AbortController();
28239            try {
28240              const y = yield r.actor.sendAsync({ type: d, data: f }, r.abortController);
28241              if (delete r.abortController, r.aborted) return;
28242              this._afterTileLoadWorkerResponse(r, y);
28243            } catch (y) {
28244              if (delete r.abortController, r.aborted) return;
28245              if (y && y.status !== 404) throw y;
28246              this._afterTileLoadWorkerResponse(r, null);
28247            }
28248          });
28249        }
28250        _afterTileLoadWorkerResponse(r, a) {
28251          if (a && a.resourceTiming && (r.resourceTiming = a.resourceTiming), a && this.map._refreshExpiredTiles && r.setExpiryData(a), r.loadVectorData(a, this.map.painter), r.reloadPromise) {
28252            const f = r.reloadPromise;
28253            r.reloadPromise = null, this.loadTile(r).then(f.resolve).cat
vendor: 7,096 bytes, lines 28253-28386
28253ch(f.reject);
28254          }
28255        }
28256        abortTile(r) {
28257          return c._(this, void 0, void 0, function* () {
28258            r.abortController && (r.abortController.abort(), delete r.abortController), r.actor && (yield r.actor.sendAsync({ type: "AT", data: { uid: r.uid, type: this.type, source: this.id } }));
28259          });
28260        }
28261        unloadTile(r) {
28262          return c._(this, void 0, void 0, function* () {
28263            r.unloadVectorData(), r.actor && (yield r.actor.sendAsync({ type: "RMT", data: { uid: r.uid, type: this.type, source: this.id } }));
28264          });
28265        }
28266        hasTransition() {
28267          return !1;
28268        }
28269      }
28270      class rt extends c.E {
28271        constructor(r, a, f, d) {
28272          super(), this.id = r, this.dispatcher = f, this.setEventedParent(d), this.type = "raster", this.minzoom = 0, this.maxzoom = 22, this.roundZoom = !0, this.scheme = "xyz", this.tileSize = 512, this._loaded = !1, this._options = c.e({ type: "raster" }, a), c.e(this, c.M(a, ["url", "scheme", "tileSize"]));
28273        }
28274        load() {
28275          return c._(this, void 0, void 0, function* () {
28276            this._loaded = !1, this.fire(new c.k("dataloading", { dataType: "source" })), this._tileJSONRequest = new AbortController();
28277            try {
28278              const r = yield Ze(this._options, this.map._requestManager, this._tileJSONRequest);
28279              this._tileJSONRequest = null, this._loaded = !0, r && (c.e(this, r), r.bounds && (this.tileBounds = new et(r.bounds, this.minzoom, this.maxzoom)), this.fire(new c.k("data", { dataType: "source", sourceDataType: "metadata" })), this.fire(new c.k("data", { dataType: "source", sourceDataType: "content" })));
28280            } catch (r) {
28281              this._tileJSONRequest = null, this.fire(new c.j(r));
28282            }
28283          });
28284        }
28285        loaded() {
28286          return this._loaded;
28287        }
28288        onAdd(r) {
28289          this.map = r, this.load();
28290        }
28291        onRemove() {
28292          this._tileJSONRequest && (this._tileJSONRequest.abort(), this._tileJSONRequest = null);
28293        }
28294        setSourceProperty(r) {
28295          this._tileJSONRequest && (this._tileJSONRequest.abort(), this._tileJSONRequest = null), r(), this.load();
28296        }
28297        setTiles(r) {
28298          return this.setSourceProperty(() => {
28299            this._options.tiles = r;
28300          }), this;
28301        }
28302        setUrl(r) {
28303          return this.setSourceProperty(() => {
28304            this.url = r, this._options.url = r;
28305          }), this;
28306        }
28307        serialize() {
28308          return c.e({}, this._options);
28309        }
28310        hasTile(r) {
28311          return !this.tileBounds || this.tileBounds.contains(r.canonical);
28312        }
28313        loadTile(r) {
28314          return c._(this, void 0, void 0, function* () {
28315            const a = r.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme);
28316            r.abortController = new AbortController();
28317            try {
28318              const f = yield X.getImage(this.map._requestManager.transformRequest(a, "Tile"), r.abortController, this.map._refreshExpiredTiles);
28319              if (delete r.abortController, r.aborted) return void (r.state = "unloaded");
28320              if (f && f.data) {
28321                this.map._refreshExpiredTiles && f.cacheControl && f.expires && r.setExpiryData({ cacheControl: f.cacheControl, expires: f.expires });
28322                const d = this.map.painter.context, y = d.gl, S = f.data;
28323                r.texture = this.map.painter.getTileTexture(S.width), r.texture ? r.texture.update(S, { useMipmap: !0 }) : (r.texture = new He(d, S, y.RGBA, { useMipmap: !0 }), r.texture.bind(y.LINEAR, y.CLAMP_TO_EDGE, y.LINEAR_MIPMAP_NEAREST)), r.state = "loaded";
28324              }
28325            } catch (f) {
28326              if (delete r.abortController, r.aborted) r.state = "unloaded";
28327              else if (f) throw r.state = "errored", f;
28328            }
28329          });
28330        }
28331        abortTile(r) {
28332          return c._(this, void 0, void 0, function* () {
28333            r.abortController && (r.abortController.abort(), delete r.abortController);
28334          });
28335        }
28336        unloadTile(r) {
28337          return c._(this, void 0, void 0, function* () {
28338            r.texture && this.map.painter.saveTileTexture(r.texture);
28339          });
28340        }
28341        hasTransition() {
28342          return !1;
28343        }
28344      }
28345      class Qe extends rt {
28346        constructor(r, a, f, d) {
28347          super(r, a, f, d), this.type = "raster-dem", this.maxzoom = 22, this._options = c.e({ type: "raster-dem" }, a), this.encoding = a.encoding || "mapbox", this.redFactor = a.redFactor, this.greenFactor = a.greenFactor, this.blueFactor = a.blueFactor, this.baseShift = a.baseShift;
28348        }
28349        loadTile(r) {
28350          return c._(this, void 0, void 0, function* () {
28351            const a = r.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme), f = this.map._requestManager.transformRequest(a, "Tile");
28352            r.neighboringTiles = this._getNeighboringTiles(r.tileID), r.abortController = new AbortController();
28353            try {
28354              const d = yield X.getImage(f, r.abortController, this.map._refreshExpiredTiles);
28355              if (delete r.abortController, r.aborted) return void (r.state = "unloaded");
28356              if (d && d.data) {
28357                const y = d.data;
28358                this.map._refreshExpiredTiles && d.cacheControl && d.expires && r.setExpiryData({ cacheControl: d.cacheControl, expires: d.expires });
28359                const S = c.b(y) && c.U() ? y : yield this.readImageNow(y), C = { type: this.type, uid: r.uid, source: this.id, rawImageData: S, encoding: this.encoding, redFactor: this.redFactor, greenFactor: this.greenFactor, blueFactor: this.blueFactor, baseShift: this.baseShift };
28360                if (!r.actor || r.state === "expired") {
28361                  r.actor = this.dispatcher.getActor();
28362                  const I = yield r.actor.sendAsync({ type: "LDT", data: C });
28363                  r.dem = I, r.needsHillshadePrepare = !0, r.needsTerrainPrepare = !0, r.state = "loaded";
28364                }
28365              }
28366            } catch (d) {
28367              if (delete r.abortController, r.aborted) r.state = "unloaded";
28368              else if (d) throw r.state = "errored", d;
28369            }
28370          });
28371        }
28372        readImageNow(r) {
28373          return c._(this, void 0, void 0, function* () {
28374            if (typeof VideoFrame < "u" && c.V()) {
28375              const a = r.width + 2, f = r.height + 2;
28376              try {
28377                return new c.R({ width: a, height: f }, yield c.W(r, -1, -1, a, f));
28378              } catch {
28379              }
28380            }
28381            return R.getImageData(r, 1);
28382          });
28383        }
28384        _getNeighboringTiles(r) {
28385          const a = r.canonical, f = Math.pow(2, a.z), d = (a.x - 1 + f) % f, y = a.x === 0 ? r.wrap - 1 : r.wrap, S = (a.x + 1 + f) % f, C = a.x + 1 === f ? r.wrap + 1 : r.wrap, I = {};
28386          return I[new c.S(r.overscaledZ, y, a.z, d, a.y).key] = { backfilled: !1 }, I[new c.S(r.overscaledZ, C, a.z, S, a.y).key] = { backfilled: !1 }, a.y >
28386 0 && (I[new c.S(r.overscaledZ, y, a.z, d, a.y - 1).key] = { backfilled: !1 }, I[new c.S(r.overscaledZ, r.wrap, a.z, a.x, a.y - 1).key] = { backfilled: !1 }, I[new c.S(r.overscaledZ, C, a.z, S, a.y - 1).key] = { backfilled: !1 }), a.y + 1 < f && (I[new c.S(r.overscaledZ, y, a.z, d, a.y + 1).key] = { backfilled: !1 }, I[new c.S(r.overscaledZ, r.wrap, a.z, a.x, a.y + 1).key] = { backfilled: !1 }, I[new c.S(r.overscaledZ, C, a.z, S, a.y + 1).key] = { backfilled: !1 }), I;
28387        }
28388        unloadTile(r) {
28389          return c._(this, void 0, void 0, function* () {
28390            r.demTexture && this.map.painter.saveTileTexture(r.demTexture), r.fbo && (r.fbo.destroy(), delete r.fbo), r.dem && delete r.dem, delete r.neighboringTiles, r.state = "unloaded", r.actor && (yield r.actor.sendAsync({ type: "RDT", data: { type: this.type, uid: r.uid, source: this.id } }));
28391          });
28392        }
28393      }
28394      class dt extends c.E {
28395        constructor(r, a, f, d) {
28396          super(), this.id = r, this.type = "geojson", this.minzoom = 0, this.maxzoom = 18, this.tileSize = 512, this.isTileClipped = !0, this.reparseOverscaled = !0, this._removed = !1, this._pendingLoads = 0, this.actor = f.getActor(), this.setEventedParent(d), this._data = a.data, this._options = c.e({}, a), this._collectResourceTiming = a.collectResourceTiming, a.maxzoom !== void 0 && (this.maxzoom = a.maxzoom), a.type && (this.type = a.type), a.attribution && (this.attribution = a.attribution), this.promoteId = a.promoteId;
28397          const y = c.X / this.tileSize;
28398          a.clusterMaxZoom !== void 0 && this.maxzoom <= a.clusterMaxZoom && c.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${a.clusterMaxZoom}".`), this.workerOptions = c.e({ source: this.id, cluster: a.cluster || !1, geojsonVtOptions: { buffer: (a.buffer !== void 0 ? a.buffer : 128) * y, tolerance: (a.tolerance !== void 0 ? a.tolerance : 0.375) * y, extent: c.X, maxZoom: this.maxzoom, lineMetrics: a.lineMetrics || !1, generateId: a.generateId || !1 }, superclusterOptions: { maxZoom: a.clusterMaxZoom !== void 0 ? a.clusterMaxZoom : this.maxzoom - 1, minPoints: Math.max(2, a.clusterMinPoints || 2), extent: c.X, radius: (a.clusterRadius || 50) * y, log: !1, generateId: a.generateId || !1 }, clusterProperties: a.clusterProperties, filter: a.filter }, a.workerOptions), typeof this.promoteId == "string" && (this.workerOptions.promoteId = this.promoteId);
28399        }
28400        load() {
28401          return c._(this, void 0, void 0, function* () {
28402            yield this._updateWorkerData();
28403          });
28404        }
28405        onAdd(r) {
28406          this.map = r, this.load();
28407        }
28408        setData(r) {
28409          return this._data = r, this._updateWorkerData(), this;
28410        }
28411        updateData(r) {
28412          return this._updateWorkerData(r), this;
28413        }
28414        getData() {
28415          return c._(this, void 0, void 0, function* () {
28416            const r = c.e({ type: this.type }, this.workerOptions);
28417            return this.actor.sendAsync({ type: "GD", data: r });
28418          });
28419        }
28420        setClusterOptions(r) {
28421          return this.workerOptions.cluster = r.cluster, r && (r.clusterRadius !== void 0 && (this.workerOptions.superclusterOptions.radius = r.clusterRadius), r.clusterMaxZoom !== void 0 && (this.workerOptions.superclusterOptions.maxZoom = r.clusterMa
vendor: 4,616 bytes, lines 28421-28494
28421xZoom)), this._updateWorkerData(), this;
28422        }
28423        getClusterExpansionZoom(r) {
28424          return this.actor.sendAsync({ type: "GCEZ", data: { type: this.type, clusterId: r, source: this.id } });
28425        }
28426        getClusterChildren(r) {
28427          return this.actor.sendAsync({ type: "GCC", data: { type: this.type, clusterId: r, source: this.id } });
28428        }
28429        getClusterLeaves(r, a, f) {
28430          return this.actor.sendAsync({ type: "GCL", data: { type: this.type, source: this.id, clusterId: r, limit: a, offset: f } });
28431        }
28432        _updateWorkerData(r) {
28433          return c._(this, void 0, void 0, function* () {
28434            const a = c.e({ type: this.type }, this.workerOptions);
28435            r ? a.dataDiff = r : typeof this._data == "string" ? (a.request = this.map._requestManager.transformRequest(R.resolveURL(this._data), "Source"), a.request.collectResourceTiming = this._collectResourceTiming) : a.data = JSON.stringify(this._data), this._pendingLoads++, this.fire(new c.k("dataloading", { dataType: "source" }));
28436            try {
28437              const f = yield this.actor.sendAsync({ type: "LD", data: a });
28438              if (this._pendingLoads--, this._removed || f.abandoned) return void this.fire(new c.k("dataabort", { dataType: "source" }));
28439              let d = null;
28440              f.resourceTiming && f.resourceTiming[this.id] && (d = f.resourceTiming[this.id].slice(0));
28441              const y = { dataType: "source" };
28442              this._collectResourceTiming && d && d.length > 0 && c.e(y, { resourceTiming: d }), this.fire(new c.k("data", Object.assign(Object.assign({}, y), { sourceDataType: "metadata" }))), this.fire(new c.k("data", Object.assign(Object.assign({}, y), { sourceDataType: "content" })));
28443            } catch (f) {
28444              if (this._pendingLoads--, this._removed) return void this.fire(new c.k("dataabort", { dataType: "source" }));
28445              this.fire(new c.j(f));
28446            }
28447          });
28448        }
28449        loaded() {
28450          return this._pendingLoads === 0;
28451        }
28452        loadTile(r) {
28453          return c._(this, void 0, void 0, function* () {
28454            const a = r.actor ? "RT" : "LT";
28455            r.actor = this.actor;
28456            const f = { type: this.type, uid: r.uid, tileID: r.tileID, zoom: r.tileID.overscaledZ, maxZoom: this.maxzoom, tileSize: this.tileSize, source: this.id, pixelRatio: this.map.getPixelRatio(), showCollisionBoxes: this.map.showCollisionBoxes, promoteId: this.promoteId };
28457            r.abortController = new AbortController();
28458            const d = yield this.actor.sendAsync({ type: a, data: f }, r.abortController);
28459            delete r.abortController, r.unloadVectorData(), r.aborted || r.loadVectorData(d, this.map.painter, a === "RT");
28460          });
28461        }
28462        abortTile(r) {
28463          return c._(this, void 0, void 0, function* () {
28464            r.abortController && (r.abortController.abort(), delete r.abortController), r.aborted = !0;
28465          });
28466        }
28467        unloadTile(r) {
28468          return c._(this, void 0, void 0, function* () {
28469            r.unloadVectorData(), yield this.actor.sendAsync({ type: "RMT", data: { uid: r.uid, type: this.type, source: this.id } });
28470          });
28471        }
28472        onRemove() {
28473          this._removed = !0, this.actor.sendAsync({ type: "RS", data: { type: this.type, source: this.id } });
28474        }
28475        serialize() {
28476          return c.e({}, this._options, { type: this.type, data: this._data });
28477        }
28478        hasTransition() {
28479          return !1;
28480        }
28481      }
28482      var nt = c.Y([{ name: "a_pos", type: "Int16", components: 2 }, { name: "a_texture_pos", type: "Int16", components: 2 }]);
28483      class Tt extends c.E {
28484        constructor(r, a, f, d) {
28485          super(), this.id = r, this.dispatcher = f, this.coordinates = a.coordinates, this.type = "image", this.minzoom = 0, this.maxzoom = 22, this.tileSize = 512, this.tiles = {}, this._loaded = !1, this.setEventedParent(d), this.options = a;
28486        }
28487        load(r) {
28488          return c._(this, void 0, void 0, function* () {
28489            this._loaded = !1, this.fire(new c.k("dataloading", { dataType: "source" })), this.url = this.options.url, this._request = new AbortController();
28490            try {
28491              const a = yield X.getImage(this.map._requestManager.transformRequest(this.url, "Image"), this._request);
28492              this._request = null, this._loaded = !0, a && a.data && (this.image = a.data, r && (this.coordinates = r), this._finishLoading());
28493            } catch (a) {
28494              this._request = null, this._loaded = !0, this.fire(new c.j(a)
vendor: 10,411 bytes, lines 28494-28689
28494);
28495            }
28496          });
28497        }
28498        loaded() {
28499          return this._loaded;
28500        }
28501        updateImage(r) {
28502          return r.url ? (this._request && (this._request.abort(), this._request = null), this.options.url = r.url, this.load(r.coordinates).finally(() => {
28503            this.texture = null;
28504          }), this) : this;
28505        }
28506        _finishLoading() {
28507          this.map && (this.setCoordinates(this.coordinates), this.fire(new c.k("data", { dataType: "source", sourceDataType: "metadata" })));
28508        }
28509        onAdd(r) {
28510          this.map = r, this.load();
28511        }
28512        onRemove() {
28513          this._request && (this._request.abort(), this._request = null);
28514        }
28515        setCoordinates(r) {
28516          this.coordinates = r;
28517          const a = r.map(c.Z.fromLngLat);
28518          this.tileID = function(d) {
28519            let y = 1 / 0, S = 1 / 0, C = -1 / 0, I = -1 / 0;
28520            for (const G of d) y = Math.min(y, G.x), S = Math.min(S, G.y), C = Math.max(C, G.x), I = Math.max(I, G.y);
28521            const F = Math.max(C - y, I - S), N = Math.max(0, Math.floor(-Math.log(F) / Math.LN2)), $ = Math.pow(2, N);
28522            return new c.a1(N, Math.floor((y + C) / 2 * $), Math.floor((S + I) / 2 * $));
28523          }(a), this.minzoom = this.maxzoom = this.tileID.z;
28524          const f = a.map((d) => this.tileID.getTilePoint(d)._round());
28525          return this._boundsArray = new c.$(), this._boundsArray.emplaceBack(f[0].x, f[0].y, 0, 0), this._boundsArray.emplaceBack(f[1].x, f[1].y, c.X, 0), this._boundsArray.emplaceBack(f[3].x, f[3].y, 0, c.X), this._boundsArray.emplaceBack(f[2].x, f[2].y, c.X, c.X), this.boundsBuffer && (this.boundsBuffer.destroy(), delete this.boundsBuffer), this.fire(new c.k("data", { dataType: "source", sourceDataType: "content" })), this;
28526        }
28527        prepare() {
28528          if (Object.keys(this.tiles).length === 0 || !this.image) return;
28529          const r = this.map.painter.context, a = r.gl;
28530          this.boundsBuffer || (this.boundsBuffer = r.createVertexBuffer(this._boundsArray, nt.members)), this.boundsSegments || (this.boundsSegments = c.a0.simpleSegment(0, 0, 4, 2)), this.texture || (this.texture = new He(r, this.image, a.RGBA), this.texture.bind(a.LINEAR, a.CLAMP_TO_EDGE));
28531          let f = !1;
28532          for (const d in this.tiles) {
28533            const y = this.tiles[d];
28534            y.state !== "loaded" && (y.state = "loaded", y.texture = this.texture, f = !0);
28535          }
28536          f && this.fire(new c.k("data", { dataType: "source", sourceDataType: "idle", sourceId: this.id }));
28537        }
28538        loadTile(r) {
28539          return c._(this, void 0, void 0, function* () {
28540            this.tileID && this.tileID.equals(r.tileID.canonical) ? (this.tiles[String(r.tileID.wrap)] = r, r.buckets = {}) : r.state = "errored";
28541          });
28542        }
28543        serialize() {
28544          return { type: "image", url: this.options.url, coordinates: this.coordinates };
28545        }
28546        hasTransition() {
28547          return !1;
28548        }
28549      }
28550      class Nt extends Tt {
28551        constructor(r, a, f, d) {
28552          super(r, a, f, d), this.roundZoom = !0, this.type = "video", this.options = a;
28553        }
28554        load() {
28555          return c._(this, void 0, void 0, function* () {
28556            this._loaded = !1;
28557            const r = this.options;
28558            this.urls = [];
28559            for (const a of r.urls) this.urls.push(this.map._requestManager.transformRequest(a, "Source").url);
28560            try {
28561              const a = yield c.a3(this.urls);
28562              if (this._loaded = !0, !a) return;
28563              this.video = a, this.video.loop = !0, this.video.addEventListener("playing", () => {
28564                this.map.triggerRepaint();
28565              }), this.map && this.video.play(), this._finishLoading();
28566            } catch (a) {
28567              this.fire(new c.j(a));
28568            }
28569          });
28570        }
28571        pause() {
28572          this.video && this.video.pause();
28573        }
28574        play() {
28575          this.video && this.video.play();
28576        }
28577        seek(r) {
28578          if (this.video) {
28579            const a = this.video.seekable;
28580            r < a.start(0) || r > a.end(0) ? this.fire(new c.j(new c.a2(`sources.${this.id}`, null, `Playback for this video can be set only between the ${a.start(0)} and ${a.end(0)}-second mark.`))) : this.video.currentTime = r;
28581          }
28582        }
28583        getVideo() {
28584          return this.video;
28585        }
28586        onAdd(r) {
28587          this.map || (this.map = r, this.load(), this.video && (this.video.play(), this.setCoordinates(this.coordinates)));
28588        }
28589        prepare() {
28590          if (Object.keys(this.tiles).length === 0 || this.video.readyState < 2) return;
28591          const r = this.map.painter.context, a = r.gl;
28592          this.boundsBuffer || (this.boundsBuffer = r.createVertexBuffer(this._boundsArray, nt.members)), this.boundsSegments || (this.boundsSegments = c.a0.simpleSegment(0, 0, 4, 2)), this.texture ? this.video.paused || (this.texture.bind(a.LINEAR, a.CLAMP_TO_EDGE), a.texSubImage2D(a.TEXTURE_2D, 0, 0, 0, a.RGBA, a.UNSIGNED_BYTE, this.video)) : (this.texture = new He(r, this.video, a.RGBA), this.texture.bind(a.LINEAR, a.CLAMP_TO_EDGE));
28593          let f = !1;
28594          for (const d in this.tiles) {
28595            const y = this.tiles[d];
28596            y.state !== "loaded" && (y.state = "loaded", y.texture = this.texture, f = !0);
28597          }
28598          f && this.fire(new c.k("data", { dataType: "source", sourceDataType: "idle", sourceId: this.id }));
28599        }
28600        serialize() {
28601          return { type: "video", urls: this.urls, coordinates: this.coordinates };
28602        }
28603        hasTransition() {
28604          return this.video && !this.video.paused;
28605        }
28606      }
28607      class Dt extends Tt {
28608        constructor(r, a, f, d) {
28609          super(r, a, f, d), a.coordinates ? Array.isArray(a.coordinates) && a.coordinates.length === 4 && !a.coordinates.some((y) => !Array.isArray(y) || y.length !== 2 || y.some((S) => typeof S != "number")) || this.fire(new c.j(new c.a2(`sources.${r}`, null, '"coordinates" property must be an array of 4 longitude/latitude array pairs'))) : this.fire(new c.j(new c.a2(`sources.${r}`, null, 'missing required property "coordinates"'))), a.animate && typeof a.animate != "boolean" && this.fire(new c.j(new c.a2(`sources.${r}`, null, 'optional "animate" property must be a boolean value'))), a.canvas ? typeof a.canvas == "string" || a.canvas instanceof HTMLCanvasElement || this.fire(new c.j(new c.a2(`sources.${r}`, null, '"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))) : this.fire(new c.j(new c.a2(`sources.${r}`, null, 'missing required property "canvas"'))), this.options = a, this.animate = a.animate === void 0 || a.animate;
28610        }
28611        load() {
28612          return c._(this, void 0, void 0, function* () {
28613            this._loaded = !0, this.canvas || (this.canvas = this.options.canvas instanceof HTMLCanvasElement ? this.options.canvas : document.getElementById(this.options.canvas)), this.width = this.canvas.width, this.height = this.canvas.height, this._hasInvalidDimensions() ? this.fire(new c.j(new Error("Canvas dimensions cannot be less than or equal to zero."))) : (this.play = function() {
28614              this._playing = !0, this.map.triggerRepaint();
28615            }, this.pause = function() {
28616              this._playing && (this.prepare(), this._playing = !1);
28617            }, this._finishLoading());
28618          });
28619        }
28620        getCanvas() {
28621          return this.canvas;
28622        }
28623        onAdd(r) {
28624          this.map = r, this.load(), this.canvas && this.animate && this.play();
28625        }
28626        onRemove() {
28627          this.pause();
28628        }
28629        prepare() {
28630          let r = !1;
28631          if (this.canvas.width !== this.width && (this.width = this.canvas.width, r = !0), this.canvas.height !== this.height && (this.height = this.canvas.height, r = !0), this._hasInvalidDimensions() || Object.keys(this.tiles).length === 0) return;
28632          const a = this.map.painter.context, f = a.gl;
28633          this.boundsBuffer || (this.boundsBuffer = a.createVertexBuffer(this._boundsArray, nt.members)), this.boundsSegments || (this.boundsSegments = c.a0.simpleSegment(0, 0, 4, 2)), this.texture ? (r || this._playing) && this.texture.update(this.canvas, { premultiply: !0 }) : this.texture = new He(a, this.canvas, f.RGBA, { premultiply: !0 });
28634          let d = !1;
28635          for (const y in this.tiles) {
28636            const S = this.tiles[y];
28637            S.state !== "loaded" && (S.state = "loaded", S.texture = this.texture, d = !0);
28638          }
28639          d && this.fire(new c.k("data", { dataType: "source", sourceDataType: "idle", sourceId: this.id }));
28640        }
28641        serialize() {
28642          return { type: "canvas", coordinates: this.coordinates };
28643        }
28644        hasTransition() {
28645          return this._playing;
28646        }
28647        _hasInvalidDimensions() {
28648          for (const r of [this.canvas.width, this.canvas.height]) if (isNaN(r) || r <= 0) return !0;
28649          return !1;
28650        }
28651      }
28652      const Gt = {}, sr = (_) => {
28653        switch (_) {
28654          case "geojson":
28655            return dt;
28656          case "image":
28657            return Tt;
28658          case "raster":
28659            return rt;
28660          case "raster-dem":
28661            return Qe;
28662          case "vector":
28663            return ft;
28664          case "video":
28665            return Nt;
28666          case "canvas":
28667            return Dt;
28668        }
28669        return Gt[_];
28670      }, We = "RTLPluginLoaded";
28671      class or extends c.E {
28672        constructor() {
28673          super(...arguments), this.status = "unavailable", this.url = null, this.dispatcher = Fi();
28674        }
28675        _syncState(r) {
28676          return this.status = r, this.dispatcher.broadcast("SRPS", { pluginStatus: r, pluginURL: this.url }).catch((a) => {
28677            throw this.status = "error", a;
28678          });
28679        }
28680        getRTLTextPluginStatus() {
28681          return this.status;
28682        }
28683        clearRTLTextPlugin() {
28684          this.status = "unavailable", this.url = null;
28685        }
28686        setRTLTextPlugin(r) {
28687          return c._(this, arguments, void 0, function* (a, f = !1) {
28688            if (this.url) throw new Error("setRTLTextPlugin cannot be called multiple times.");
28689            if (this.url = R.resolveURL(a), !this.url) throw new Error(`requested url ${a}
28689 is invalid`);
28690            if (this.status === "unavailable") {
28691              if (!f) return this._requestImport();
28692              this.status = "deferred", this._syncState(this.status);
28693            } else if (this.status === "requested") return this._requestImport();
28694          });
28695        }
28696        _requestImport() {
28697          return c._(this, void 0, void 0, function* () {
28698            yield this._syncState("loading"), this.status = "loaded", this.fire(new c.k(We));
28699          });
28700        }
28701        lazyLoad() {
28702          this.status === "unavailable" ? this.status = "requested" : this.status === "deferred" && this._requestImport();
28703        }
28704      }
28705      let hr = null;
28706      function Cr() {
28707        return hr || (hr = new or()), hr;
28708      }
28709      class wn {
28710        constructor(r, a) {
28711          this.timeAdded = 0, this.fadeEndTime = 0, this.tileID = r, this.uid = c.a4(), this.uses = 0, this.tileSize = a, this.buckets = {}, this.expirationTime = null, this.queryPadding = 0, this.hasSymbolBuckets = !1, this.hasRTLText = !1, this.dependencies = {}, this.rtt = [], this.rttCoords = {}, this.expiredRequestCount = 0, this.state = "loading";
28712        }
28713        registerFadeDuration(r) {
28714          const a = r + this.timeAdded;
28715          a < this.fadeEndTime || (this.fadeEndTime = a);
28716        }
28717        wasRequested() {
28718          return this.state === "errored" || this.state === "loaded" || this.state === "reloading";
28719        }
28720        clearTextures(r) {
28721          this.demTexture && r.saveTileTexture(this.demTexture), this.demTexture = null;
28722        }
28723        loadVectorData(r, a, f) {
28724          if (this.hasData() && this.unloadVectorData(), this.state = "loaded", r) {
28725            r.featureIndex && (this.latestFeatureIndex = r.featureIndex, r.rawTileData ? (this.latestRawTileData = r.rawTileData, this.latestFeatureIndex.rawTileData = r.rawTileData) : this.latestRawTileData && (this.latestFeatureIndex.rawTileData = this.latestRawTileData)), this.collisionBoxArray = r.collisionBoxArray, this.buckets = function(d, y) {
28726              const S = {};
28727              if (!y) return S;
28728              for (const C of d) {
28729                const I = C.layerIds.map((F) => y.getLayer(F)).filter(Boolean);
28730                if (I.length !== 0) {
28731                  C.layers = I, C.stateDependentLayerIds && (C.stateDependentLayers = C.stateDependentLayerIds.map((F) => I.filter((N) => N.id === F)[0]));
28732                  for (const F of I) S[F.id] = C;
28733                }
28734              }
28735              return S;
28736            }(r.buckets, a.style), this.hasSymbolBuckets = !1;
28737            for (const d in this.buckets) {
28738              const y = this.buckets[d];
28739              if (y instanceof c.a6) {
28740                if (this.hasSymbolBuckets = !0, !f) break;
28741                y.justReloaded = !0;
28742              }
28743            }
28744            if (this.hasRTLText = !1, this.hasSymbolBuckets) for (const d in this.buckets) {
28745              const y = this.buckets[d];
28746              if (y instanceof c.a6 && y.hasRTLText) {
28747                this.hasRTLText = !0, Cr().lazyLoad();
28748                break;
28749              }
28750            }
28751            this.queryPadding = 0;
28752            for (const d in this.buckets) {
28753              const y = this.buckets[d];
28754              this.queryPadding = Math.max(this.queryPadding, a.style.getLayer(d).queryRadius(y));
28755            }
28756            r.imageAtlas && (this.imageAtlas = r.imageAtlas), r.glyphAtlasImage && (this.glyphAtlasImage = r.glyphAtlasImage);
28757          } else this.collisionBoxArray = new c.a5();
28758        }
28759        unloadVectorData() {
28760          for (const r in this.buckets) this.buckets[r].destroy();
28761          this.buckets = {}, this.imageAtlasTexture && this.imageAtlasTexture.destroy(), this.imageAtlas && (this.imageAtlas = null), this.glyphAtlasTexture && this.glyphAtlasTexture.destroy(), this.latestFeatureIndex = null, this.state = "unloaded";
28762        }
28763        getBucket(r) {
28764          return this.buckets[r.id];
28765        }
28766        upload(r) {
28767          for (const f in this.buckets) {
28768            const d = this.buckets[f];
28769            d.uploadPending() && d.upload(r);
28770          }
28771          const a = r.gl;
28772          this.imageAtlas && !this.imageAtlas.uploaded && (this.imageAtlasTexture = new He(r, this.imageAtlas.image, a.RGBA), this.imageAtlas.uploaded = !0), this.glyphAtlasImage && (this.glyphAtlasTexture = new He(r, this.glyphAtlasImage, a.ALPHA), this.glyphAtlasImage = null);
28773        }
28774        prepare(r) {
28775          this.imageAtlas && this.imageAtlas.patchUpdatedImages(r, this.imageAtlasTexture);
28776        }
28777        queryRenderedFeatures(r, a, f, d, y, S, C, I, F, N) {
28778          return this.latestFeatureIndex && this.latestFeatureIndex.rawTileData ? this.latestFeatureIndex.query({ queryGeometry: d, cameraQueryGeometry: y, scale: S, tileSize: this.tileSize, pixelPosMatrix: N, transform: I, params: C, queryPadding: this.queryPadding * F }, r, a, f) : {};
28779        }
28780        querySourceFeatures(r, a) {
28781          const f = this.latestFeatureIndex;
28782          if (!f || !f.rawTileData) return;
28783          const d = f.loadVTLayers(), y = a && a.sourceLayer ? a.sourceLayer : "", S = d._geojsonTileLayer || d[y];
28784          if (!S) return;
28785          const C = c.a7(a && a.filter), { z: I, x: F, y: N } = this.tileID.canonical, $ = { z: I, x: F, y: N };
28786          for (let G = 0; G < S.length; G++) {
28787            const Q = S.feature(G);
28788            if (C.needGeometry) {
28789              const fe = c.a8(Q, !0);
vendor: 9,268 bytes, lines 28790-28985
28790              if (!C.filter(new c.z(this.tileID.overscaledZ), fe, this.tileID.canonical)) continue;
28791            } else if (!C.filter(new c.z(this.tileID.overscaledZ), Q)) continue;
28792            const te = f.getId(Q, y), ae = new c.a9(Q, I, F, N, te);
28793            ae.tile = $, r.push(ae);
28794          }
28795        }
28796        hasData() {
28797          return this.state === "loaded" || this.state === "reloading" || this.state === "expired";
28798        }
28799        patternsLoaded() {
28800          return this.imageAtlas && !!Object.keys(this.imageAtlas.patternPositions).length;
28801        }
28802        setExpiryData(r) {
28803          const a = this.expirationTime;
28804          if (r.cacheControl) {
28805            const f = c.aa(r.cacheControl);
28806            f["max-age"] && (this.expirationTime = Date.now() + 1e3 * f["max-age"]);
28807          } else r.expires && (this.expirationTime = new Date(r.expires).getTime());
28808          if (this.expirationTime) {
28809            const f = Date.now();
28810            let d = !1;
28811            if (this.expirationTime > f) d = !1;
28812            else if (a) if (this.expirationTime < a) d = !0;
28813            else {
28814              const y = this.expirationTime - a;
28815              y ? this.expirationTime = f + Math.max(y, 3e4) : d = !0;
28816            }
28817            else d = !0;
28818            d ? (this.expiredRequestCount++, this.state = "expired") : this.expiredRequestCount = 0;
28819          }
28820        }
28821        getExpiryTimeout() {
28822          if (this.expirationTime) return this.expiredRequestCount ? 1e3 * (1 << Math.min(this.expiredRequestCount - 1, 31)) : Math.min(this.expirationTime - (/* @__PURE__ */ new Date()).getTime(), Math.pow(2, 31) - 1);
28823        }
28824        setFeatureState(r, a) {
28825          if (!this.latestFeatureIndex || !this.latestFeatureIndex.rawTileData || Object.keys(r).length === 0) return;
28826          const f = this.latestFeatureIndex.loadVTLayers();
28827          for (const d in this.buckets) {
28828            if (!a.style.hasLayer(d)) continue;
28829            const y = this.buckets[d], S = y.layers[0].sourceLayer || "_geojsonTileLayer", C = f[S], I = r[S];
28830            if (!C || !I || Object.keys(I).length === 0) continue;
28831            y.update(I, C, this.imageAtlas && this.imageAtlas.patternPositions || {});
28832            const F = a && a.style && a.style.getLayer(d);
28833            F && (this.queryPadding = Math.max(this.queryPadding, F.queryRadius(y)));
28834          }
28835        }
28836        holdingForFade() {
28837          return this.symbolFadeHoldUntil !== void 0;
28838        }
28839        symbolFadeFinished() {
28840          return !this.symbolFadeHoldUntil || this.symbolFadeHoldUntil < R.now();
28841        }
28842        clearFadeHold() {
28843          this.symbolFadeHoldUntil = void 0;
28844        }
28845        setHoldDuration(r) {
28846          this.symbolFadeHoldUntil = R.now() + r;
28847        }
28848        setDependencies(r, a) {
28849          const f = {};
28850          for (const d of a) f[d] = !0;
28851          this.dependencies[r] = f;
28852        }
28853        hasDependency(r, a) {
28854          for (const f of r) {
28855            const d = this.dependencies[f];
28856            if (d) {
28857              for (const y of a) if (d[y]) return !0;
28858            }
28859          }
28860          return !1;
28861        }
28862      }
28863      class ut {
28864        constructor(r, a) {
28865          this.max = r, this.onRemove = a, this.reset();
28866        }
28867        reset() {
28868          for (const r in this.data) for (const a of this.data[r]) a.timeout && clearTimeout(a.timeout), this.onRemove(a.value);
28869          return this.data = {}, this.order = [], this;
28870        }
28871        add(r, a, f) {
28872          const d = r.wrapped().key;
28873          this.data[d] === void 0 && (this.data[d] = []);
28874          const y = { value: a, timeout: void 0 };
28875          if (f !== void 0 && (y.timeout = setTimeout(() => {
28876            this.remove(r, y);
28877          }, f)), this.data[d].push(y), this.order.push(d), this.order.length > this.max) {
28878            const S = this._getAndRemoveByKey(this.order[0]);
28879            S && this.onRemove(S);
28880          }
28881          return this;
28882        }
28883        has(r) {
28884          return r.wrapped().key in this.data;
28885        }
28886        getAndRemove(r) {
28887          return this.has(r) ? this._getAndRemoveByKey(r.wrapped().key) : null;
28888        }
28889        _getAndRemoveByKey(r) {
28890          const a = this.data[r].shift();
28891          return a.timeout && clearTimeout(a.timeout), this.data[r].length === 0 && delete this.data[r], this.order.splice(this.order.indexOf(r), 1), a.value;
28892        }
28893        getByKey(r) {
28894          const a = this.data[r];
28895          return a ? a[0].value : null;
28896        }
28897        get(r) {
28898          return this.has(r) ? this.data[r.wrapped().key][0].value : null;
28899        }
28900        remove(r, a) {
28901          if (!this.has(r)) return this;
28902          const f = r.wrapped().key, d = a === void 0 ? 0 : this.data[f].indexOf(a), y = this.data[f][d];
28903          return this.data[f].splice(d, 1), y.timeout && clearTimeout(y.timeout), this.data[f].length === 0 && delete this.data[f], this.onRemove(y.value), this.order.splice(this.order.indexOf(f), 1), this;
28904        }
28905        setMaxSize(r) {
28906          for (this.max = r; this.order.length > this.max; ) {
28907            const a = this._getAndRemoveByKey(this.order[0]);
28908            a && this.onRemove(a);
28909          }
28910          return this;
28911        }
28912        filter(r) {
28913          const a = [];
28914          for (const f in this.data) for (const d of this.data[f]) r(d.value) || a.push(d);
28915          for (const f of a) this.remove(f.value.tileID, f);
28916        }
28917      }
28918      class er {
28919        constructor() {
28920          this.state = {}, this.stateChanges = {}, this.deletedStates = {};
28921        }
28922        updateState(r, a, f) {
28923          const d = String(a);
28924          if (this.stateChanges[r] = this.stateChanges[r] || {}, this.stateChanges[r][d] = this.stateChanges[r][d] || {}, c.e(this.stateChanges[r][d], f), this.deletedStates[r] === null) {
28925            this.deletedStates[r] = {};
28926            for (const y in this.state[r]) y !== d && (this.deletedStates[r][y] = null);
28927          } else if (this.deletedStates[r] && this.deletedStates[r][d] === null) {
28928            this.deletedStates[r][d] = {};
28929            for (const y in this.state[r][d]) f[y] || (this.deletedStates[r][d][y] = null);
28930          } else for (const y in f) this.deletedStates[r] && this.deletedStates[r][d] && this.deletedStates[r][d][y] === null && delete this.deletedStates[r][d][y];
28931        }
28932        removeFeatureState(r, a, f) {
28933          if (this.deletedStates[r] === null) return;
28934          const d = String(a);
28935          if (this.deletedStates[r] = this.deletedStates[r] || {}, f && a !== void 0) this.deletedStates[r][d] !== null && (this.deletedStates[r][d] = this.deletedStates[r][d] || {}, this.deletedStates[r][d][f] = null);
28936          else if (a !== void 0) if (this.stateChanges[r] && this.stateChanges[r][d]) for (f in this.deletedStates[r][d] = {}, this.stateChanges[r][d]) this.deletedStates[r][d][f] = null;
28937          else this.deletedStates[r][d] = null;
28938          else this.deletedStates[r] = null;
28939        }
28940        getState(r, a) {
28941          const f = String(a), d = c.e({}, (this.state[r] || {})[f], (this.stateChanges[r] || {})[f]);
28942          if (this.deletedStates[r] === null) return {};
28943          if (this.deletedStates[r]) {
28944            const y = this.deletedStates[r][a];
28945            if (y === null) return {};
28946            for (const S in y) delete d[S];
28947          }
28948          return d;
28949        }
28950        initializeTileState(r, a) {
28951          r.setFeatureState(this.state, a);
28952        }
28953        coalesceChanges(r, a) {
28954          const f = {};
28955          for (const d in this.stateChanges) {
28956            this.state[d] = this.state[d] || {};
28957            const y = {};
28958            for (const S in this.stateChanges[d]) this.state[d][S] || (this.state[d][S] = {}), c.e(this.state[d][S], this.stateChanges[d][S]), y[S] = this.state[d][S];
28959            f[d] = y;
28960          }
28961          for (const d in this.deletedStates) {
28962            this.state[d] = this.state[d] || {};
28963            const y = {};
28964            if (this.deletedStates[d] === null) for (const S in this.state[d]) y[S] = {}, this.state[d][S] = {};
28965            else for (const S in this.deletedStates[d]) {
28966              if (this.deletedStates[d][S] === null) this.state[d][S] = {};
28967              else for (const C of Object.keys(this.deletedStates[d][S])) delete this.state[d][S][C];
28968              y[S] = this.state[d][S];
28969            }
28970            f[d] = f[d] || {}, c.e(f[d], y);
28971          }
28972          if (this.stateChanges = {}, this.deletedStates = {}, Object.keys(f).length !== 0) for (const d in r) r[d].setFeatureState(f, a);
28973        }
28974      }
28975      class Ut extends c.E {
28976        constructor(r, a, f) {
28977          super(), this.id = r, this.dispatcher = f, this.on("data", (d) => this._dataHandler(d)), this.on("dataloading", () => {
28978            this._sourceErrored = !1;
28979          }), this.on("error", () => {
28980            this._sourceErrored = this._source.loaded();
28981          }), this._source = ((d, y, S, C) => {
28982            const I = new (sr(y.type))(d, y, S, C);
28983            if (I.id !== d) throw new Error(`Expected Source id to be ${d} instead of ${I.id}`);
28984            return I;
28985          })(r, a, f, this), this._tiles = {}, this._cache = new ut(0, (d) => this._unloadTile(d)), this._timers = {}, this._cacheTimers = {}
28985, this._maxTileCacheSize = null, this._maxTileCacheZoomLevels = null, this._loadedParentTiles = {}, this._coveredTiles = {}, this._state = new er(), this._didEmitContent = !1, this._updated = !1;
28986        }
28987        onAdd(r) {
28988          this.map = r, this._maxTileCacheSize = r ? r._maxTileCacheSize : null, this._maxTileCacheZoomLevels = r ? r._maxTileCacheZoomLevels : null, this._source && this._source.onAdd && this._source.onAdd(r);
28989        }
28990        onRemove(r) {
28991          this.clearTiles(), this._source && this._source.onRemove && this._source.onRemove(r);
28992        }
28993        loaded() {
28994          if (this._sourceErrored) return !0;
28995          if (!this._sourceLoaded || !this._source.loaded()) return !1;
28996          if (!(this.used === void 0 && this.usedForTerrain === void 0 || this.used || this.usedForTerrain)) return !0;
28997          if (!this._updated) return !1;
28998          for (const r in this._tiles) {
28999            const a = this._tiles[r];
29000            if (a.state !== "loaded" && a.state !== "errored") return !1;
29001          }
29002          return !0;
29003        }
29004        getSource() {
29005          return this._source;
29006        }
29007        pause() {
29008          this._paused = !0;
29009        }
29010        resume() {
29011          if (!this._paused) return;
29012          const r = this._shouldReloadOnResume;
29013          this._paused = !1, this._shouldReloadOnResume = !1, r && this.reload(), this.transform && this.update(this.transform, this.terrain);
29014        }
29015        _loadTile(r, a, f) {
29016          return c._(this, void 0, void 0, function* () {
29017            try {
29018              yield this._source.loadTile(r), this._tileLoaded(r, a, f);
29019            } catch (d) {
29020              r.state = "errored", d.status !== 404 ? this._source.fire(new c.j(d, { tile: r })) : this.update(this.transform, this.terrain);
29021            }
29022          });
29023        }
29024        _unloadTile(r) {
29025          this._source.unloadTile && this._source.unloadTile(r);
29026        }
29027        _abortTile(r) {
29028          this._source.abortTile && this._source.abortTile(r), this._source.fire(new c.k("dataabort", { tile: r, coord: r.tileID, dataType: "source" }));
29029        }
29030        serialize() {
29031          return this._source.serialize();
29032        }
29033        prepare(r) {
29034          this._source.prepare && this._source.prepare(), this._state.coalesceChanges(this._tiles, this.map ? this.map.painter : null);
29035          for (const a in this._tiles) {
29036            const f = this._tiles[a];
29037            f.upload(r), f.prepare(this.map.style.imageManager);
29038          }
29039        }
29040        getIds() {
29041          return Object.values(this._tiles).map((r) => r.tileID).sort(Ir).map((r) => r.key);
29042        }
29043        getRenderableIds(r) {
29044          const a = [];
29045          for (const f in this._tiles) this._isIdRenderable(f, r) && a.push(this._tiles[f]);
29046          return r ? a.sort((f, d) => {
29047            const y = f.tileID, S = d.tileID, C = new c.P(y.canonical.x, y.canonical.y)._rotate(this.transform.angle), I = new c.P(S.canonical.x, S.canonical.y)._rotate(this.transform.angle);
29048            return y.overscaledZ - S.overscaledZ || I.y - C.y || I.x - C.x;
29049          }).map((f) => f.tileID.key) : a.map((f) => f.tileID).sort(Ir).map((f) => f.key);
29050        }
29051        hasRenderableParent(r) {
29052          const a = this.findLoadedParent(r, 0);
29053          return !!a && this._isIdRenderable(a.tileID.key);
29054        }
29055        _isIdRenderable(r, a) {
29056          return this._tiles[r] && this._tiles[r].hasData() && !this._coveredTiles[r] && (a || !this._tiles[r].holdingForFade());
29057        }
29058        reload() {
29059          if (this._paused) this._shouldReloadOnResume = !0;
29060          else {
29061            this._cache.reset();
29062            for (const r in this._tiles) this._tiles[r].state !== "errored" && this._reloadTile(r, "reloading");
29063          }
29064        }
29065        _reloadTile(r, a) {
29066          return c._(this, void 0, void 0, function* () {
29067            const f = this._tiles[r];
29068            f && (f.state !== "loading" && (f.state = a), yield this._loadTile(f, r, a));
29069          });
29070        }
29071        _tileLoaded(r, a, f) {
29072          r.timeAdded = R.now(), f === "expired" && (r.refreshedUponExpiration = !0), this._setTileReloadTimer(a, r), this.get
vendor: 16,447 bytes, lines 29072-29377
29072Source().type === "raster-dem" && r.dem && this._backfillDEM(r), this._state.initializeTileState(r, this.map ? this.map.painter : null), r.aborted || this._source.fire(new c.k("data", { dataType: "source", tile: r, coord: r.tileID }));
29073        }
29074        _backfillDEM(r) {
29075          const a = this.getRenderableIds();
29076          for (let d = 0; d < a.length; d++) {
29077            const y = a[d];
29078            if (r.neighboringTiles && r.neighboringTiles[y]) {
29079              const S = this.getTileByID(y);
29080              f(r, S), f(S, r);
29081            }
29082          }
29083          function f(d, y) {
29084            d.needsHillshadePrepare = !0, d.needsTerrainPrepare = !0;
29085            let S = y.tileID.canonical.x - d.tileID.canonical.x;
29086            const C = y.tileID.canonical.y - d.tileID.canonical.y, I = Math.pow(2, d.tileID.canonical.z), F = y.tileID.key;
29087            S === 0 && C === 0 || Math.abs(C) > 1 || (Math.abs(S) > 1 && (Math.abs(S + I) === 1 ? S += I : Math.abs(S - I) === 1 && (S -= I)), y.dem && d.dem && (d.dem.backfillBorder(y.dem, S, C), d.neighboringTiles && d.neighboringTiles[F] && (d.neighboringTiles[F].backfilled = !0)));
29088          }
29089        }
29090        getTile(r) {
29091          return this.getTileByID(r.key);
29092        }
29093        getTileByID(r) {
29094          return this._tiles[r];
29095        }
29096        _retainLoadedChildren(r, a, f, d) {
29097          for (const y in this._tiles) {
29098            let S = this._tiles[y];
29099            if (d[y] || !S.hasData() || S.tileID.overscaledZ <= a || S.tileID.overscaledZ > f) continue;
29100            let C = S.tileID;
29101            for (; S && S.tileID.overscaledZ > a + 1; ) {
29102              const F = S.tileID.scaledTo(S.tileID.overscaledZ - 1);
29103              S = this._tiles[F.key], S && S.hasData() && (C = F);
29104            }
29105            let I = C;
29106            for (; I.overscaledZ > a; ) if (I = I.scaledTo(I.overscaledZ - 1), r[I.key]) {
29107              d[C.key] = C;
29108              break;
29109            }
29110          }
29111        }
29112        findLoadedParent(r, a) {
29113          if (r.key in this._loadedParentTiles) {
29114            const f = this._loadedParentTiles[r.key];
29115            return f && f.tileID.overscaledZ >= a ? f : null;
29116          }
29117          for (let f = r.overscaledZ - 1; f >= a; f--) {
29118            const d = r.scaledTo(f), y = this._getLoadedTile(d);
29119            if (y) return y;
29120          }
29121        }
29122        findLoadedSibling(r) {
29123          return this._getLoadedTile(r);
29124        }
29125        _getLoadedTile(r) {
29126          const a = this._tiles[r.key];
29127          return a && a.hasData() ? a : this._cache.getByKey(r.wrapped().key);
29128        }
29129        updateCacheSize(r) {
29130          const a = Math.ceil(r.width / this._source.tileSize) + 1, f = Math.ceil(r.height / this._source.tileSize) + 1, d = Math.floor(a * f * (this._maxTileCacheZoomLevels === null ? c.a.MAX_TILE_CACHE_ZOOM_LEVELS : this._maxTileCacheZoomLevels)), y = typeof this._maxTileCacheSize == "number" ? Math.min(this._maxTileCacheSize, d) : d;
29131          this._cache.setMaxSize(y);
29132        }
29133        handleWrapJump(r) {
29134          const a = Math.round((r - (this._prevLng === void 0 ? r : this._prevLng)) / 360);
29135          if (this._prevLng = r, a) {
29136            const f = {};
29137            for (const d in this._tiles) {
29138              const y = this._tiles[d];
29139              y.tileID = y.tileID.unwrapTo(y.tileID.wrap + a), f[y.tileID.key] = y;
29140            }
29141            this._tiles = f;
29142            for (const d in this._timers) clearTimeout(this._timers[d]), delete this._timers[d];
29143            for (const d in this._tiles) this._setTileReloadTimer(d, this._tiles[d]);
29144          }
29145        }
29146        _updateCoveredAndRetainedTiles(r, a, f, d, y, S) {
29147          const C = {}, I = {}, F = Object.keys(r), N = R.now();
29148          for (const $ of F) {
29149            const G = r[$], Q = this._tiles[$];
29150            if (!Q || Q.fadeEndTime !== 0 && Q.fadeEndTime <= N) continue;
29151            const te = this.findLoadedParent(G, a), ae = this.findLoadedSibling(G), fe = te || ae || null;
29152            fe && (this._addTile(fe.tileID), C[fe.tileID.key] = fe.tileID), I[$] = G;
29153          }
29154          this._retainLoadedChildren(I, d, f, r);
29155          for (const $ in C) r[$] || (this._coveredTiles[$] = !0, r[$] = C[$]);
29156          if (S) {
29157            const $ = {}, G = {};
29158            for (const Q of y) this._tiles[Q.key].hasData() ? $[Q.key] = Q : G[Q.key] = Q;
29159            for (const Q in G) {
29160              const te = G[Q].children(this._source.maxzoom);
29161              this._tiles[te[0].key] && this._tiles[te[1].key] && this._tiles[te[2].key] && this._tiles[te[3].key] && ($[te[0].key] = r[te[0].key] = te[0], $[te[1].key] = r[te[1].key] = te[1], $[te[2].key] = r[te[2].key] = te[2], $[te[3].key] = r[te[3].key] = te[3], delete G[Q]);
29162            }
29163            for (const Q in G) {
29164              const te = G[Q], ae = this.findLoadedParent(te, this._source.minzoom), fe = this.findLoadedSibling(te), pe = ae || fe || null;
29165              if (pe) {
29166                $[pe.tileID.key] = r[pe.tileID.key] = pe.tileID;
29167                for (const _e in $) $[_e].isChildOf(pe.tileID) && delete $[_e];
29168              }
29169            }
29170            for (const Q in this._tiles) $[Q] || (this._coveredTiles[Q] = !0);
29171          }
29172        }
29173        update(r, a) {
29174          if (!this._sourceLoaded || this._paused) return;
29175          let f;
29176          this.transform = r, this.terrain = a, this.updateCacheSize(r), this.handleWrapJump(this.transform.center.lng), this._coveredTiles = {}, this.used || this.usedForTerrain ? this._source.tileID ? f = r.getVisibleUnwrappedCoordinates(this._source.tileID).map((N) => new c.S(N.canonical.z, N.wrap, N.canonical.z, N.canonical.x, N.canonical.y)) : (f = r.coveringTiles({ tileSize: this.usedForTerrain ? this.tileSize : this._source.tileSize, minzoom: this._source.minzoom, maxzoom: this._source.maxzoom, roundZoom: !this.usedForTerrain && this._source.roundZoom, reparseOverscaled: this._source.reparseOverscaled, terrain: a }), this._source.hasTile && (f = f.filter((N) => this._source.hasTile(N)))) : f = [];
29177          const d = r.coveringZoomLevel(this._source), y = Math.max(d - Ut.maxOverzooming, this._source.minzoom), S = Math.max(d + Ut.maxUnderzooming, this._source.minzoom);
29178          if (this.usedForTerrain) {
29179            const N = {};
29180            for (const $ of f) if ($.canonical.z > this._source.minzoom) {
29181              const G = $.scaledTo($.canonical.z - 1);
29182              N[G.key] = G;
29183              const Q = $.scaledTo(Math.max(this._source.minzoom, Math.min($.canonical.z, 5)));
29184              N[Q.key] = Q;
29185            }
29186            f = f.concat(Object.values(N));
29187          }
29188          const C = f.length === 0 && !this._updated && this._didEmitContent;
29189          this._updated = !0, C && this.fire(new c.k("data", { sourceDataType: "idle", dataType: "source", sourceId: this.id }));
29190          const I = this._updateRetainedTiles(f, d);
29191          pn(this._source.type) && this._updateCoveredAndRetainedTiles(I, y, S, d, f, a);
29192          for (const N in I) this._tiles[N].clearFadeHold();
29193          const F = c.ab(this._tiles, I);
29194          for (const N of F) {
29195            const $ = this._tiles[N];
29196            $.hasSymbolBuckets && !$.holdingForFade() ? $.setHoldDuration(this.map._fadeDuration) : $.hasSymbolBuckets && !$.symbolFadeFinished() || this._removeTile(N);
29197          }
29198          this._updateLoadedParentTileCache(), this._updateLoadedSiblingTileCache();
29199        }
29200        releaseSymbolFadeTiles() {
29201          for (const r in this._tiles) this._tiles[r].holdingForFade() && this._removeTile(r);
29202        }
29203        _updateRetainedTiles(r, a) {
29204          var f;
29205          const d = {}, y = {}, S = Math.max(a - Ut.maxOverzooming, this._source.minzoom), C = Math.max(a + Ut.maxUnderzooming, this._source.minzoom), I = {};
29206          for (const F of r) {
29207            const N = this._addTile(F);
29208            d[F.key] = F, N.hasData() || a < this._source.maxzoom && (I[F.key] = F);
29209          }
29210          this._retainLoadedChildren(I, a, C, d);
29211          for (const F of r) {
29212            let N = this._tiles[F.key];
29213            if (N.hasData()) continue;
29214            if (a + 1 > this._source.maxzoom) {
29215              const G = F.children(this._source.maxzoom)[0], Q = this.getTile(G);
29216              if (Q && Q.hasData()) {
29217                d[G.key] = G;
29218                continue;
29219              }
29220            } else {
29221              const G = F.children(this._source.maxzoom);
29222              if (d[G[0].key] && d[G[1].key] && d[G[2].key] && d[G[3].key]) continue;
29223            }
29224            let $ = N.wasRequested();
29225            for (let G = F.overscaledZ - 1; G >= S; --G) {
29226              const Q = F.scaledTo(G);
29227              if (y[Q.key]) break;
29228              if (y[Q.key] = !0, N = this.getTile(Q), !N && $ && (N = this._addTile(Q)), N) {
29229                const te = N.hasData();
29230                if ((te || !(!((f = this.map) === null || f === void 0) && f.cancelPendingTileRequestsWhileZooming) || $) && (d[Q.key] = Q), $ = N.wasRequested(), te) break;
29231              }
29232            }
29233          }
29234          return d;
29235        }
29236        _updateLoadedParentTileCache() {
29237          this._loadedParentTiles = {};
29238          for (const r in this._tiles) {
29239            const a = [];
29240            let f, d = this._tiles[r].tileID;
29241            for (; d.overscaledZ > 0; ) {
29242              if (d.key in this._loadedParentTiles) {
29243                f = this._loadedParentTiles[d.key];
29244                break;
29245              }
29246              a.push(d.key);
29247              const y = d.scaledTo(d.overscaledZ - 1);
29248              if (f = this._getLoadedTile(y), f) break;
29249              d = y;
29250            }
29251            for (const y of a) this._loadedParentTiles[y] = f;
29252          }
29253        }
29254        _updateLoadedSiblingTileCache() {
29255          this._loadedSiblingTiles = {};
29256          for (const r in this._tiles) {
29257            const a = this._tiles[r].tileID, f = this._getLoadedTile(a);
29258            this._loadedSiblingTiles[a.key] = f;
29259          }
29260        }
29261        _addTile(r) {
29262          let a = this._tiles[r.key];
29263          if (a) return a;
29264          a = this._cache.getAndRemove(r), a && (this._setTileReloadTimer(r.key, a), a.tileID = r, this._state.initializeTileState(a, this.map ? this.map.painter : null), this._cacheTimers[r.key] && (clearTimeout(this._cacheTimers[r.key]), delete this._cacheTimers[r.key], this._setTileReloadTimer(r.key, a)));
29265          const f = a;
29266          return a || (a = new wn(r, this._source.tileSize * r.overscaleFactor()), this._loadTile(a, r.key, a.state)), a.uses++, this._tiles[r.key] = a, f || this._source.fire(new c.k("dataloading", { tile: a, coord: a.tileID, dataType: "source" })), a;
29267        }
29268        _setTileReloadTimer(r, a) {
29269          r in this._timers && (clearTimeout(this._timers[r]), delete this._timers[r]);
29270          const f = a.getExpiryTimeout();
29271          f && (this._timers[r] = setTimeout(() => {
29272            this._reloadTile(r, "expired"), delete this._timers[r];
29273          }, f));
29274        }
29275        _removeTile(r) {
29276          const a = this._tiles[r];
29277          a && (a.uses--, delete this._tiles[r], this._timers[r] && (clearTimeout(this._timers[r]), delete this._timers[r]), a.uses > 0 || (a.hasData() && a.state !== "reloading" ? this._cache.add(a.tileID, a, a.getExpiryTimeout()) : (a.aborted = !0, this._abortTile(a), this._unloadTile(a))));
29278        }
29279        _dataHandler(r) {
29280          const a = r.sourceDataType;
29281          r.dataType === "source" && a === "metadata" && (this._sourceLoaded = !0), this._sourceLoaded && !this._paused && r.dataType === "source" && a === "content" && (this.reload(), this.transform && this.update(this.transform, this.terrain), this._didEmitContent = !0);
29282        }
29283        clearTiles() {
29284          this._shouldReloadOnResume = !1, this._paused = !1;
29285          for (const r in this._tiles) this._removeTile(r);
29286          this._cache.reset();
29287        }
29288        tilesIn(r, a, f) {
29289          const d = [], y = this.transform;
29290          if (!y) return d;
29291          const S = f ? y.getCameraQueryGeometry(r) : r, C = r.map((te) => y.pointCoordinate(te, this.terrain)), I = S.map((te) => y.pointCoordinate(te, this.terrain)), F = this.getIds();
29292          let N = 1 / 0, $ = 1 / 0, G = -1 / 0, Q = -1 / 0;
29293          for (const te of I) N = Math.min(N, te.x), $ = Math.min($, te.y), G = Math.max(G, te.x), Q = Math.max(Q, te.y);
29294          for (let te = 0; te < F.length; te++) {
29295            const ae = this._tiles[F[te]];
29296            if (ae.holdingForFade()) continue;
29297            const fe = ae.tileID, pe = Math.pow(2, y.zoom - ae.tileID.overscaledZ), _e = a * ae.queryPadding * c.X / ae.tileSize / pe, se = [fe.getTilePoint(new c.Z(N, $)), fe.getTilePoint(new c.Z(G, Q))];
29298            if (se[0].x - _e < c.X && se[0].y - _e < c.X && se[1].x + _e >= 0 && se[1].y + _e >= 0) {
29299              const Te = C.map((Fe) => fe.getTilePoint(Fe)), Me = I.map((Fe) => fe.getTilePoint(Fe));
29300              d.push({ tile: ae, tileID: fe, queryGeometry: Te, cameraQueryGeometry: Me, scale: pe });
29301            }
29302          }
29303          return d;
29304        }
29305        getVisibleCoordinates(r) {
29306          const a = this.getRenderableIds(r).map((f) => this._tiles[f].tileID);
29307          for (const f of a) f.posMatrix = this.transform.calculatePosMatrix(f.toUnwrapped());
29308          return a;
29309        }
29310        hasTransition() {
29311          if (this._source.hasTransition()) return !0;
29312          if (pn(this._source.type)) {
29313            const r = R.now();
29314            for (const a in this._tiles) if (this._tiles[a].fadeEndTime >= r) return !0;
29315          }
29316          return !1;
29317        }
29318        setFeatureState(r, a, f) {
29319          this._state.updateState(r = r || "_geojsonTileLayer", a, f);
29320        }
29321        removeFeatureState(r, a, f) {
29322          this._state.removeFeatureState(r = r || "_geojsonTileLayer", a, f);
29323        }
29324        getFeatureState(r, a) {
29325          return this._state.getState(r = r || "_geojsonTileLayer", a);
29326        }
29327        setDependencies(r, a, f) {
29328          const d = this._tiles[r];
29329          d && d.setDependencies(a, f);
29330        }
29331        reloadTilesForDependencies(r, a) {
29332          for (const f in this._tiles) this._tiles[f].hasDependency(r, a) && this._reloadTile(f, "reloading");
29333          this._cache.filter((f) => !f.hasDependency(r, a));
29334        }
29335      }
29336      function Ir(_, r) {
29337        const a = Math.abs(2 * _.wrap) - +(_.wrap < 0), f = Math.abs(2 * r.wrap) - +(r.wrap < 0);
29338        return _.overscaledZ - r.overscaledZ || f - a || r.canonical.y - _.canonical.y || r.canonical.x - _.canonical.x;
29339      }
29340      function pn(_) {
29341        return _ === "raster" || _ === "image" || _ === "video";
29342      }
29343      Ut.maxOverzooming = 10, Ut.maxUnderzooming = 3;
29344      class kt {
29345        constructor(r, a) {
29346          this.reset(r, a);
29347        }
29348        reset(r, a) {
29349          this.points = r || [], this._distances = [0];
29350          for (let f = 1; f < this.points.length; f++) this._distances[f] = this._distances[f - 1] + this.points[f].dist(this.points[f - 1]);
29351          this.length = this._distances[this._distances.length - 1], this.padding = Math.min(a || 0, 0.5 * this.length), this.paddedLength = this.length - 2 * this.padding;
29352        }
29353        lerp(r) {
29354          if (this.points.length === 1) return this.points[0];
29355          r = c.ac(r, 0, 1);
29356          let a = 1, f = this._distances[a];
29357          const d = r * this.paddedLength + this.padding;
29358          for (; f < d && a < this._distances.length; ) f = this._distances[++a];
29359          const y = a - 1, S = this._distances[y], C = f - S, I = C > 0 ? (d - S) / C : 0;
29360          return this.points[y].mult(1 - I).add(this.points[a].mult(I));
29361        }
29362      }
29363      function zn(_, r) {
29364        let a = !0;
29365        return _ === "always" || _ !== "never" && r !== "never" || (a = !1), a;
29366      }
29367      class zi {
29368        constructor(r, a, f) {
29369          const d = this.boxCells = [], y = this.circleCells = [];
29370          this.xCellCount = Math.ceil(r / f), this.yCellCount = Math.ceil(a / f);
29371          for (let S = 0; S < this.xCellCount * this.yCellCount; S++) d.push([]), y.push([]);
29372          this.circleKeys = [], this.boxKeys = [], this.bboxes = [], this.circles = [], this.width = r, this.height = a, this.xScale = this.xCellCount / r, this.yScale = this.yCellCount / a, this.boxUid = 0, this.circleUid = 0;
29373        }
29374        keysLength() {
29375          return this.boxKeys.length + this.circleKeys.length;
29376        }
29377        insert(r, a, f, d, y) {
vendor: 4,374 bytes, lines 29378-29457
29378          this._forEachCell(a, f, d, y, this._insertBoxCell, this.boxUid++), this.boxKeys.push(r), this.bboxes.push(a), this.bboxes.push(f), this.bboxes.push(d), this.bboxes.push(y);
29379        }
29380        insertCircle(r, a, f, d) {
29381          this._forEachCell(a - d, f - d, a + d, f + d, this._insertCircleCell, this.circleUid++), this.circleKeys.push(r), this.circles.push(a), this.circles.push(f), this.circles.push(d);
29382        }
29383        _insertBoxCell(r, a, f, d, y, S) {
29384          this.boxCells[y].push(S);
29385        }
29386        _insertCircleCell(r, a, f, d, y, S) {
29387          this.circleCells[y].push(S);
29388        }
29389        _query(r, a, f, d, y, S, C) {
29390          if (f < 0 || r > this.width || d < 0 || a > this.height) return [];
29391          const I = [];
29392          if (r <= 0 && a <= 0 && this.width <= f && this.height <= d) {
29393            if (y) return [{ key: null, x1: r, y1: a, x2: f, y2: d }];
29394            for (let F = 0; F < this.boxKeys.length; F++) I.push({ key: this.boxKeys[F], x1: this.bboxes[4 * F], y1: this.bboxes[4 * F + 1], x2: this.bboxes[4 * F + 2], y2: this.bboxes[4 * F + 3] });
29395            for (let F = 0; F < this.circleKeys.length; F++) {
29396              const N = this.circles[3 * F], $ = this.circles[3 * F + 1], G = this.circles[3 * F + 2];
29397              I.push({ key: this.circleKeys[F], x1: N - G, y1: $ - G, x2: N + G, y2: $ + G });
29398            }
29399          } else this._forEachCell(r, a, f, d, this._queryCell, I, { hitTest: y, overlapMode: S, seenUids: { box: {}, circle: {} } }, C);
29400          return I;
29401        }
29402        query(r, a, f, d) {
29403          return this._query(r, a, f, d, !1, null);
29404        }
29405        hitTest(r, a, f, d, y, S) {
29406          return this._query(r, a, f, d, !0, y, S).length > 0;
29407        }
29408        hitTestCircle(r, a, f, d, y) {
29409          const S = r - f, C = r + f, I = a - f, F = a + f;
29410          if (C < 0 || S > this.width || F < 0 || I > this.height) return !1;
29411          const N = [];
29412          return this._forEachCell(S, I, C, F, this._queryCellCircle, N, { hitTest: !0, overlapMode: d, circle: { x: r, y: a, radius: f }, seenUids: { box: {}, circle: {} } }, y), N.length > 0;
29413        }
29414        _queryCell(r, a, f, d, y, S, C, I) {
29415          const { seenUids: F, hitTest: N, overlapMode: $ } = C, G = this.boxCells[y];
29416          if (G !== null) {
29417            const te = this.bboxes;
29418            for (const ae of G) if (!F.box[ae]) {
29419              F.box[ae] = !0;
29420              const fe = 4 * ae, pe = this.boxKeys[ae];
29421              if (r <= te[fe + 2] && a <= te[fe + 3] && f >= te[fe + 0] && d >= te[fe + 1] && (!I || I(pe)) && (!N || !zn($, pe.overlapMode)) && (S.push({ key: pe, x1: te[fe], y1: te[fe + 1], x2: te[fe + 2], y2: te[fe + 3] }), N)) return !0;
29422            }
29423          }
29424          const Q = this.circleCells[y];
29425          if (Q !== null) {
29426            const te = this.circles;
29427            for (const ae of Q) if (!F.circle[ae]) {
29428              F.circle[ae] = !0;
29429              const fe = 3 * ae, pe = this.circleKeys[ae];
29430              if (this._circleAndRectCollide(te[fe], te[fe + 1], te[fe + 2], r, a, f, d) && (!I || I(pe)) && (!N || !zn($, pe.overlapMode))) {
29431                const _e = te[fe], se = te[fe + 1], Te = te[fe + 2];
29432                if (S.push({ key: pe, x1: _e - Te, y1: se - Te, x2: _e + Te, y2: se + Te }), N) return !0;
29433              }
29434            }
29435          }
29436          return !1;
29437        }
29438        _queryCellCircle(r, a, f, d, y, S, C, I) {
29439          const { circle: F, seenUids: N, overlapMode: $ } = C, G = this.boxCells[y];
29440          if (G !== null) {
29441            const te = this.bboxes;
29442            for (const ae of G) if (!N.box[ae]) {
29443              N.box[ae] = !0;
29444              const fe = 4 * ae, pe = this.boxKeys[ae];
29445              if (this._circleAndRectCollide(F.x, F.y, F.radius, te[fe + 0], te[fe + 1], te[fe + 2], te[fe + 3]) && (!I || I(pe)) && !zn($, pe.overlapMode)) return S.push(!0), !0;
29446            }
29447          }
29448          const Q = this.circleCells[y];
29449          if (Q !== null) {
29450            const te = this.circles;
29451            for (const ae of Q) if (!N.circle[ae]) {
29452              N.circle[ae] = !0;
29453              const fe = 3 * ae, pe = this.circleKeys[ae];
29454              if (this._circlesCollide(te[fe], te[fe + 1], te[fe + 2], F.x, F.y, F.radius) && (!I || I(pe)) && !zn($, pe.overlapMode)) return S.push(!0), !0;
29455            }
29456          }
29457        }
vendor: 6,566 bytes, lines 29458-29572
29458        _forEachCell(r, a, f, d, y, S, C, I) {
29459          const F = this._convertToXCellCoord(r), N = this._convertToYCellCoord(a), $ = this._convertToXCellCoord(f), G = this._convertToYCellCoord(d);
29460          for (let Q = F; Q <= $; Q++) for (let te = N; te <= G; te++) if (y.call(this, r, a, f, d, this.xCellCount * te + Q, S, C, I)) return;
29461        }
29462        _convertToXCellCoord(r) {
29463          return Math.max(0, Math.min(this.xCellCount - 1, Math.floor(r * this.xScale)));
29464        }
29465        _convertToYCellCoord(r) {
29466          return Math.max(0, Math.min(this.yCellCount - 1, Math.floor(r * this.yScale)));
29467        }
29468        _circlesCollide(r, a, f, d, y, S) {
29469          const C = d - r, I = y - a, F = f + S;
29470          return F * F > C * C + I * I;
29471        }
29472        _circleAndRectCollide(r, a, f, d, y, S, C) {
29473          const I = (S - d) / 2, F = Math.abs(r - (d + I));
29474          if (F > I + f) return !1;
29475          const N = (C - y) / 2, $ = Math.abs(a - (y + N));
29476          if ($ > N + f) return !1;
29477          if (F <= I || $ <= N) return !0;
29478          const G = F - I, Q = $ - N;
29479          return G * G + Q * Q <= f * f;
29480        }
29481      }
29482      function Bi(_, r, a, f, d) {
29483        const y = c.H();
29484        return r ? (c.K(y, y, [1 / d, 1 / d, 1]), a || c.ad(y, y, f.angle)) : c.L(y, f.labelPlaneMatrix, _), y;
29485      }
29486      function mn(_, r, a, f, d) {
29487        if (r) {
29488          const y = c.ae(_);
29489          return c.K(y, y, [d, d, 1]), a || c.ad(y, y, -f.angle), y;
29490        }
29491        return f.glCoordMatrix;
29492      }
29493      function le(_, r, a, f) {
29494        let d;
29495        f ? (d = [_, r, f(_, r), 1], c.af(d, d, a)) : (d = [_, r, 0, 1], dr(d, d, a));
29496        const y = d[3];
29497        return { point: new c.P(d[0] / y, d[1] / y), signedDistanceFromCamera: y, isOccluded: !1 };
29498      }
29499      function U(_, r) {
29500        return 0.5 + _ / r * 0.5;
29501      }
29502      function A(_, r) {
29503        return _.x >= -r[0] && _.x <= r[0] && _.y >= -r[1] && _.y <= r[1];
29504      }
29505      function M(_, r, a, f, d, y, S, C, I, F, N, $, G, Q, te) {
29506        const ae = f ? _.textSizeData : _.iconSizeData, fe = c.ag(ae, a.transform.zoom), pe = [256 / a.width * 2 + 1, 256 / a.height * 2 + 1], _e = f ? _.text.dynamicLayoutVertexArray : _.icon.dynamicLayoutVertexArray;
29507        _e.clear();
29508        const se = _.lineVertexArray, Te = f ? _.text.placedSymbolArray : _.icon.placedSymbolArray, Me = a.transform.width / a.transform.height;
29509        let Fe = !1;
29510        for (let Je = 0; Je < Te.length; Je++) {
29511          const lt = Te.get(Je);
29512          if (lt.hidden || lt.writingMode === c.ah.vertical && !Fe) {
29513            zt(lt.numGlyphs, _e);
29514            continue;
29515          }
29516          Fe = !1;
29517          const vt = le(lt.anchorX, lt.anchorY, r, te);
29518          if (!A(vt.point, pe)) {
29519            zt(lt.numGlyphs, _e);
29520            continue;
29521          }
29522          const Ct = U(a.transform.cameraToCenterDistance, vt.signedDistanceFromCamera), gt = c.ai(ae, fe, lt), pt = S ? gt / Ct : gt * Ct, Ft = { getElevation: te, labelPlaneMatrix: d, lineVertexArray: se, pitchWithMap: S, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: F, tileAnchorPoint: new c.P(lt.anchorX, lt.anchorY), unwrappedTileID: N, width: $, height: G, translation: Q }, ir = ne(Ft, lt, pt, !1, C, r, y, _.glyphOffsetArray, _e, Me, I);
29523          Fe = ir.useVertical, (ir.notEnoughRoom || Fe || ir.needsFlipping && ne(Ft, lt, pt, !0, C, r, y, _.glyphOffsetArray, _e, Me, I).notEnoughRoom) && zt(lt.numGlyphs, _e);
29524        }
29525        f ? _.text.dynamicLayoutVertexBuffer.updateData(_e) : _.icon.dynamicLayoutVertexBuffer.updateData(_e);
29526      }
29527      function j(_, r, a, f, d, y, S, C) {
29528        const I = y.glyphStartIndex + y.numGlyphs, F = y.lineStartIndex, N = y.lineStartIndex + y.lineLength, $ = r.getoffsetX(y.glyphStartIndex), G = r.getoffsetX(I - 1), Q = it(_ * $, a, f, d, y.segment, F, N, C, S);
29529        if (!Q) return null;
29530        const te = it(_ * G, a, f, d, y.segment, F, N, C, S);
29531        return te ? C.projectionCache.anyProjectionOccluded ? null : { first: Q, last: te } : null;
29532      }
29533      function H(_, r, a, f) {
29534        return _ === c.ah.horizontal && Math.abs(a.y - r.y) > Math.abs(a.x - r.x) * f ? { useVertical: !0 } : (_ === c.ah.vertical ? r.y < a.y : r.x > a.x) ? { needsFlipping: !0 } : null;
29535      }
29536      function ne(_, r, a, f, d, y, S, C, I, F, N) {
29537        const $ = a / 24, G = r.lineOffsetX * $, Q = r.lineOffsetY * $;
29538        let te;
29539        if (r.numGlyphs > 1) {
29540          const ae = r.glyphStartIndex + r.numGlyphs, fe = r.lineStartIndex, pe = r.lineStartIndex + r.lineLength, _e = j($, C, G, Q, f, r, N, _);
29541          if (!_e) return { notEnoughRoom: !0 };
29542          const se = le(_e.first.point.x, _e.first.point.y, S, _.getElevation).point, Te = le(_e.last.point.x, _e.last.point.y, S, _.getElevation).point;
29543          if (d && !f) {
29544            const Me = H(r.writingMode, se, Te, F);
29545            if (Me) return Me;
29546          }
29547          te = [_e.first];
29548          for (let Me = r.glyphStartIndex + 1; Me < ae - 1; Me++) te.push(it($ * C.getoffsetX(Me), G, Q, f, r.segment, fe, pe, _, N));
29549          te.push(_e.last);
29550        } else {
29551          if (d && !f) {
29552            const fe = le(_.tileAnchorPoint.x, _.tileAnchorPoint.y, y, _.getElevation).point, pe = r.lineStartIndex + r.segment + 1, _e = new c.P(_.lineVertexArray.getx(pe), _.lineVertexArray.gety(pe)), se = le(_e.x, _e.y, y, _.getElevation), Te = se.signedDistanceFromCamera > 0 ? se.point : function(Fe, Je, lt, vt, Ct, gt) {
29553              return de(Fe, Je, lt, 1, Ct, gt);
29554            }(_.tileAnchorPoint, _e, fe, 0, y, _), Me = H(r.writingMode, fe, Te, F);
29555            if (Me) return Me;
29556          }
29557          const ae = it($ * C.getoffsetX(r.glyphStartIndex), G, Q, f, r.segment, r.lineStartIndex, r.lineStartIndex + r.lineLength, _, N);
29558          if (!ae || _.projectionCache.anyProjectionOccluded) return { notEnoughRoom: !0 };
29559          te = [ae];
29560        }
29561        for (const ae of te) c.aj(I, ae.point, ae.angle);
29562        return {};
29563      }
29564      function de(_, r, a, f, d, y) {
29565        const S = _.add(_.sub(r)._unit()), C = d !== void 0 ? le(S.x, S.y, d, y.getElevation).point : Be(S.x, S.y, y).point, I = a.sub(C);
29566        return a.add(I._mult(f / I.mag()));
29567      }
29568      function ie(_, r, a) {
29569        const f = r.projectionCache;
29570        if (f.projections[_]) return f.projections[_];
29571        const d = new c.P(r.lineVertexArray.getx(_), r.lineVertexArray.gety(_)), y = Be(d.x, d.y, r);
29572        if (y.signedDistanceFromCamera >
vendor: 4,884 bytes, lines 29572-29644
29572 0) return f.projections[_] = y.point, f.anyProjectionOccluded = f.anyProjectionOccluded || y.isOccluded, y.point;
29573        const S = _ - a.direction;
29574        return function(C, I, F, N, $) {
29575          return de(C, I, F, N, void 0, $);
29576        }(a.distanceFromAnchor === 0 ? r.tileAnchorPoint : new c.P(r.lineVertexArray.getx(S), r.lineVertexArray.gety(S)), d, a.previousVertex, a.absOffsetX - a.distanceFromAnchor + 1, r);
29577      }
29578      function Be(_, r, a) {
29579        const f = _ + a.translation[0], d = r + a.translation[1];
29580        let y;
29581        return !a.pitchWithMap && a.projection.useSpecialProjectionForSymbols ? (y = a.projection.projectTileCoordinates(f, d, a.unwrappedTileID, a.getElevation), y.point.x = (0.5 * y.point.x + 0.5) * a.width, y.point.y = (0.5 * -y.point.y + 0.5) * a.height) : (y = le(f, d, a.labelPlaneMatrix, a.getElevation), y.isOccluded = !1), y;
29582      }
29583      function Le(_, r, a) {
29584        return _._unit()._perp()._mult(r * a);
29585      }
29586      function Re(_, r, a, f, d, y, S, C, I) {
29587        if (C.projectionCache.offsets[_]) return C.projectionCache.offsets[_];
29588        const F = a.add(r);
29589        if (_ + I.direction < f || _ + I.direction >= d) return C.projectionCache.offsets[_] = F, F;
29590        const N = ie(_ + I.direction, C, I), $ = Le(N.sub(a), S, I.direction), G = a.add($), Q = N.add($);
29591        return C.projectionCache.offsets[_] = c.ak(y, F, G, Q) || F, C.projectionCache.offsets[_];
29592      }
29593      function it(_, r, a, f, d, y, S, C, I) {
29594        const F = f ? _ - r : _ + r;
29595        let N = F > 0 ? 1 : -1, $ = 0;
29596        f && (N *= -1, $ = Math.PI), N < 0 && ($ += Math.PI);
29597        let G, Q = N > 0 ? y + d : y + d + 1;
29598        C.projectionCache.cachedAnchorPoint ? G = C.projectionCache.cachedAnchorPoint : (G = Be(C.tileAnchorPoint.x, C.tileAnchorPoint.y, C).point, C.projectionCache.cachedAnchorPoint = G);
29599        let te, ae, fe = G, pe = G, _e = 0, se = 0;
29600        const Te = Math.abs(F), Me = [];
29601        let Fe;
29602        for (; _e + se <= Te; ) {
29603          if (Q += N, Q < y || Q >= S) return null;
29604          _e += se, pe = fe, ae = te;
29605          const vt = { absOffsetX: Te, direction: N, distanceFromAnchor: _e, previousVertex: pe };
29606          if (fe = ie(Q, C, vt), a === 0) Me.push(pe), Fe = fe.sub(pe);
29607          else {
29608            let Ct;
29609            const gt = fe.sub(pe);
29610            Ct = gt.mag() === 0 ? Le(ie(Q + N, C, vt).sub(fe), a, N) : Le(gt, a, N), ae || (ae = pe.add(Ct)), te = Re(Q, Ct, fe, y, S, ae, a, C, vt), Me.push(ae), Fe = te.sub(ae);
29611          }
29612          se = Fe.mag();
29613        }
29614        const Je = Fe._mult((Te - _e) / se)._add(ae || pe), lt = $ + Math.atan2(fe.y - pe.y, fe.x - pe.x);
29615        return Me.push(Je), { point: Je, angle: I ? lt : 0, path: Me };
29616      }
29617      const Pt = new Float32Array([-1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0, -1 / 0, -1 / 0, 0]);
29618      function zt(_, r) {
29619        for (let a = 0; a < _; a++) {
29620          const f = r.length;
29621          r.resize(f + 4), r.float32.set(Pt, 3 * f);
29622        }
29623      }
29624      function dr(_, r, a) {
29625        const f = r[0], d = r[1];
29626        return _[0] = a[0] * f + a[4] * d + a[12], _[1] = a[1] * f + a[5] * d + a[13], _[3] = a[3] * f + a[7] * d + a[15], _;
29627      }
29628      const Wt = 100;
29629      class mr {
29630        constructor(r, a, f = new zi(r.width + 200, r.height + 200, 25), d = new zi(r.width + 200, r.height + 200, 25)) {
29631          this.transform = r, this.mapProjection = a, this.grid = f, this.ignoredGrid = d, this.pitchFactor = Math.cos(r._pitch) * r.cameraToCenterDistance, this.screenRightBoundary = r.width + Wt, this.screenBottomBoundary = r.height + Wt, this.gridRightBoundary = r.width + 200, this.gridBottomBoundary = r.height + 200, this.perspectiveRatioCutoff = 0.6;
29632        }
29633        placeCollisionBox(r, a, f, d, y, S, C, I, F, N, $) {
29634          const G = r.anchorPointX + I[0], Q = r.anchorPointY + I[1], te = this.projectAndGetPerspectiveRatio(d, G, Q, y, N), ae = f * te.perspectiveRatio;
29635          let fe;
29636          if (S || C) fe = this._projectCollisionBox(r, ae, d, y, S, C, I, te, N, $);
29637          else {
29638            const Me = te.point.x + ($ ? $.x * ae : 0), Fe = te.point.y + ($ ? $.y * ae : 0);
29639            fe = { allPointsOccluded: !1, box: [Me + r.x1 * ae, Fe + r.y1 * ae, Me + r.x2 * ae, Fe + r.y2 * ae] };
29640          }
29641          const [pe, _e, se, Te] = fe.box;
29642          return this.mapProjection.useSpecialProjectionForSymbols && (S ? fe.allPointsOccluded : this.mapProjection.isOccluded(G, Q, y)) || te.perspectiveRatio < this.perspectiveRatioCutoff || !this.isInsideGrid(pe, _e, se, Te) || a !== "always" && this.grid.hitTest(pe, _e, se, Te, a, F) ? { box: [pe, _e, se, Te], placeable: !1, offscreen: !1 } : { box: [pe, _e, se, Te], placeable: !0, offscreen: this.isOffscreen(pe, _e, se, Te) };
29643        }
29644        placeCollisionCircles(r, a, f, d, y, S, C, I, F, N, $, G, Q, te, ae, fe) {
vendor: 4,239 bytes, lines 29645-29702
29645          const pe = [], _e = new c.P(a.anchorX, a.anchorY), se = this.getPerspectiveRatio(S, _e.x, _e.y, C, fe), Te = ($ ? y / se : y * se) / c.ap, Me = { getElevation: fe, labelPlaneMatrix: I, lineVertexArray: f, pitchWithMap: $, projectionCache: { projections: {}, offsets: {}, cachedAnchorPoint: void 0, anyProjectionOccluded: !1 }, projection: this.mapProjection, tileAnchorPoint: _e, unwrappedTileID: C, width: this.transform.width, height: this.transform.height, translation: ae }, Fe = j(Te, d, a.lineOffsetX * Te, a.lineOffsetY * Te, !1, a, !1, Me);
29646          let Je = !1, lt = !1, vt = !0;
29647          if (Fe) {
29648            const Ct = 0.5 * Q * se + te, gt = new c.P(-100, -100), pt = new c.P(this.screenRightBoundary, this.screenBottomBoundary), Ft = new kt(), ir = Fe.first, yt = Fe.last;
29649            let Et = [];
29650            for (let pr = ir.path.length - 1; pr >= 1; pr--) Et.push(ir.path[pr]);
29651            for (let pr = 1; pr < yt.path.length; pr++) Et.push(yt.path[pr]);
29652            const rr = 2.5 * Ct;
29653            if (F) {
29654              const pr = this.projectPathToScreenSpace(Et, Me, F);
29655              Et = pr.some((xr) => xr.signedDistanceFromCamera <= 0) ? [] : pr.map((xr) => xr.point);
29656            }
29657            let yn = [];
29658            if (Et.length > 0) {
29659              const pr = Et[0].clone(), xr = Et[0].clone();
29660              for (let _n = 1; _n < Et.length; _n++) pr.x = Math.min(pr.x, Et[_n].x), pr.y = Math.min(pr.y, Et[_n].y), xr.x = Math.max(xr.x, Et[_n].x), xr.y = Math.max(xr.y, Et[_n].y);
29661              yn = pr.x >= gt.x && xr.x <= pt.x && pr.y >= gt.y && xr.y <= pt.y ? [Et] : xr.x < gt.x || pr.x > pt.x || xr.y < gt.y || pr.y > pt.y ? [] : c.al([Et], gt.x, gt.y, pt.x, pt.y);
29662            }
29663            for (const pr of yn) {
29664              Ft.reset(pr, 0.25 * Ct);
29665              let xr = 0;
29666              xr = Ft.length <= 0.5 * Ct ? 1 : Math.ceil(Ft.paddedLength / rr) + 1;
29667              for (let _n = 0; _n < xr; _n++) {
29668                const _i = _n / Math.max(xr - 1, 1), qs = Ft.lerp(_i), vn = qs.x + Wt, Hi = qs.y + Wt;
29669                pe.push(vn, Hi, Ct, 0);
29670                const Mi = vn - Ct, vi = Hi - Ct, ki = vn + Ct, _o = Hi + Ct;
29671                if (vt = vt && this.isOffscreen(Mi, vi, ki, _o), lt = lt || this.isInsideGrid(Mi, vi, ki, _o), r !== "always" && this.grid.hitTestCircle(vn, Hi, Ct, r, G) && (Je = !0, !N)) return { circles: [], offscreen: !1, collisionDetected: Je };
29672              }
29673            }
29674          }
29675          return { circles: !N && Je || !lt || se < this.perspectiveRatioCutoff ? [] : pe, offscreen: vt, collisionDetected: Je };
29676        }
29677        projectPathToScreenSpace(r, a, f) {
29678          return r.map((d) => le(d.x, d.y, f, a.getElevation));
29679        }
29680        queryRenderedSymbols(r) {
29681          if (r.length === 0 || this.grid.keysLength() === 0 && this.ignoredGrid.keysLength() === 0) return {};
29682          const a = [];
29683          let f = 1 / 0, d = 1 / 0, y = -1 / 0, S = -1 / 0;
29684          for (const N of r) {
29685            const $ = new c.P(N.x + Wt, N.y + Wt);
29686            f = Math.min(f, $.x), d = Math.min(d, $.y), y = Math.max(y, $.x), S = Math.max(S, $.y), a.push($);
29687          }
29688          const C = this.grid.query(f, d, y, S).concat(this.ignoredGrid.query(f, d, y, S)), I = {}, F = {};
29689          for (const N of C) {
29690            const $ = N.key;
29691            if (I[$.bucketInstanceId] === void 0 && (I[$.bucketInstanceId] = {}), I[$.bucketInstanceId][$.featureIndex]) continue;
29692            const G = [new c.P(N.x1, N.y1), new c.P(N.x2, N.y1), new c.P(N.x2, N.y2), new c.P(N.x1, N.y2)];
29693            c.am(a, G) && (I[$.bucketInstanceId][$.featureIndex] = !0, F[$.bucketInstanceId] === void 0 && (F[$.bucketInstanceId] = []), F[$.bucketInstanceId].push($.featureIndex));
29694          }
29695          return F;
29696        }
29697        insertCollisionBox(r, a, f, d, y, S) {
29698          (f ? this.ignoredGrid : this.grid).insert({ bucketInstanceId: d, featureIndex: y, collisionGroupID: S, overlapMode: a }, r[0], r[1], r[2], r[3]);
29699        }
29700        insertCollisionCircles(r, a, f, d, y, S) {
29701          const C = f ? this.ignoredGrid : this.grid, I = { bucketInstanceId: d, featureIndex: y, collisionGroupID: S, overlapMode: a };
29702          for (let F = 0; F < r.length;
vendor: 5,950 bytes, lines 29702-29814
29702 F += 4) C.insertCircle(I, r[F], r[F + 1], r[F + 2]);
29703        }
29704        projectAndGetPerspectiveRatio(r, a, f, d, y) {
29705          let S;
29706          y ? (S = [a, f, y(a, f), 1], c.af(S, S, r)) : (S = [a, f, 0, 1], dr(S, S, r));
29707          const C = S[3];
29708          return { point: new c.P((S[0] / C + 1) / 2 * this.transform.width + Wt, (-S[1] / C + 1) / 2 * this.transform.height + Wt), perspectiveRatio: 0.5 + this.transform.cameraToCenterDistance / C * 0.5, isOccluded: !1, signedDistanceFromCamera: C };
29709        }
29710        getPerspectiveRatio(r, a, f, d, y) {
29711          const S = this.mapProjection.useSpecialProjectionForSymbols ? this.mapProjection.projectTileCoordinates(a, f, d, y) : le(a, f, r, y);
29712          return 0.5 + this.transform.cameraToCenterDistance / S.signedDistanceFromCamera * 0.5;
29713        }
29714        isOffscreen(r, a, f, d) {
29715          return f < Wt || r >= this.screenRightBoundary || d < Wt || a > this.screenBottomBoundary;
29716        }
29717        isInsideGrid(r, a, f, d) {
29718          return f >= 0 && r < this.gridRightBoundary && d >= 0 && a < this.gridBottomBoundary;
29719        }
29720        getViewportMatrix() {
29721          const r = c.an([]);
29722          return c.J(r, r, [-100, -100, 0]), r;
29723        }
29724        _projectCollisionBox(r, a, f, d, y, S, C, I, F, N) {
29725          let $ = new c.P(1, 0), G = new c.P(0, 1);
29726          const Q = new c.P(r.anchorPointX + C[0], r.anchorPointY + C[1]);
29727          if (S && !y) {
29728            const vt = this.projectAndGetPerspectiveRatio(f, Q.x + 1, Q.y, d, F).point.sub(I.point).unit(), Ct = Math.atan(vt.y / vt.x) + (vt.x < 0 ? Math.PI : 0), gt = Math.sin(Ct), pt = Math.cos(Ct);
29729            $ = new c.P(pt, gt), G = new c.P(-gt, pt);
29730          } else if (!S && y) {
29731            const vt = -this.transform.angle, Ct = Math.sin(vt), gt = Math.cos(vt);
29732            $ = new c.P(gt, Ct), G = new c.P(-Ct, gt);
29733          }
29734          let te = I.point, ae = a;
29735          if (y) {
29736            te = Q;
29737            const vt = this.transform.zoom - Math.floor(this.transform.zoom);
29738            ae = Math.pow(2, -vt), ae *= this.mapProjection.getPitchedTextCorrection(this.transform, Q, d), N || (ae *= c.ac(0.5 + I.signedDistanceFromCamera / this.transform.cameraToCenterDistance * 0.5, 0, 4));
29739          }
29740          N && (te = te.add($.mult(N.x * ae)).add(G.mult(N.y * ae)));
29741          const fe = r.x1 * ae, pe = r.x2 * ae, _e = (fe + pe) / 2, se = r.y1 * ae, Te = r.y2 * ae, Me = (se + Te) / 2, Fe = [{ offsetX: fe, offsetY: se }, { offsetX: _e, offsetY: se }, { offsetX: pe, offsetY: se }, { offsetX: pe, offsetY: Me }, { offsetX: pe, offsetY: Te }, { offsetX: _e, offsetY: Te }, { offsetX: fe, offsetY: Te }, { offsetX: fe, offsetY: Me }];
29742          let Je = [];
29743          for (const { offsetX: vt, offsetY: Ct } of Fe) Je.push(new c.P(te.x + $.x * vt + G.x * Ct, te.y + $.y * vt + G.y * Ct));
29744          let lt = !1;
29745          if (y) {
29746            const vt = Je.map((Ct) => this.projectAndGetPerspectiveRatio(f, Ct.x, Ct.y, d, F));
29747            lt = vt.some((Ct) => !Ct.isOccluded), Je = vt.map((Ct) => Ct.point);
29748          } else lt = !0;
29749          return { box: c.ao(Je), allPointsOccluded: !lt };
29750        }
29751      }
29752      function gr(_, r, a) {
29753        return r * (c.X / (_.tileSize * Math.pow(2, a - _.tileID.overscaledZ)));
29754      }
29755      class xn {
29756        constructor(r, a, f, d) {
29757          this.opacity = r ? Math.max(0, Math.min(1, r.opacity + (r.placed ? a : -a))) : d && f ? 1 : 0, this.placed = f;
29758        }
29759        isHidden() {
29760          return this.opacity === 0 && !this.placed;
29761        }
29762      }
29763      class yr {
29764        constructor(r, a, f, d, y) {
29765          this.text = new xn(r ? r.text : null, a, f, y), this.icon = new xn(r ? r.icon : null, a, d, y);
29766        }
29767        isHidden() {
29768          return this.text.isHidden() && this.icon.isHidden();
29769        }
29770      }
29771      class lr {
29772        constructor(r, a, f) {
29773          this.text = r, this.icon = a, this.skipFade = f;
29774        }
29775      }
29776      class Pr {
29777        constructor() {
29778          this.invProjMatrix = c.H(), this.viewportMatrix = c.H(), this.circles = [];
29779        }
29780      }
29781      class an {
29782        constructor(r, a, f, d, y) {
29783          this.bucketInstanceId = r, this.featureIndex = a, this.sourceLayerIndex = f, this.bucketIndex = d, this.tileID = y;
29784        }
29785      }
29786      class Bn {
29787        constructor(r) {
29788          this.crossSourceCollisions = r, this.maxGroupID = 0, this.collisionGroups = {};
29789        }
29790        get(r) {
29791          if (this.crossSourceCollisions) return { ID: 0, predicate: null };
29792          if (!this.collisionGroups[r]) {
29793            const a = ++this.maxGroupID;
29794            this.collisionGroups[r] = { ID: a, predicate: (f) => f.collisionGroupID === a };
29795          }
29796          return this.collisionGroups[r];
29797        }
29798      }
29799      function Xn(_, r, a, f, d) {
29800        const { horizontalAlign: y, verticalAlign: S } = c.au(_);
29801        return new c.P(-(y - 0.5) * r + f[0] * d, -(S - 0.5) * a + f[1] * d);
29802      }
29803      class Jn {
29804        constructor(r, a, f, d, y, S) {
29805          this.transform = r.clone(), this.terrain = f, this.collisionIndex = new mr(this.transform, a), this.placements = {}, this.opacities = {}, this.variableOffsets = {}, this.stale = !1, this.commitTime = 0, this.fadeDuration = d, this.retainedQueryData = {}, this.collisionGroups = new Bn(y), this.collisionCircleArrays = {}, this.collisionBoxArrays = /* @__PURE__ */ new Map(), this.prevPlacement = S, S && (S.prevPlacement = void 0), this.placedOrientations = {};
29806        }
29807        _getTerrainElevationFunc(r) {
29808          const a = this.terrain;
29809          return a ? (f, d) => a.getElevation(r, f, d) : null;
29810        }
29811        getBucketParts(r, a, f, d) {
29812          const y = f.getBucket(a), S = f.latestFeatureIndex;
29813          if (!y || !S || a.id !== y.layerIds[0]) return;
29814          const C = f.collisionBoxArray, I = y.layers[0].layout, F = y.layers[0].paint, N = Math.pow(2, this.transform.zoom - f.tileID.overscaledZ
vendor: 21,563 bytes, lines 29814-30056
29814), $ = f.tileSize / c.X, G = f.tileID.toUnwrapped(), Q = this.transform.calculatePosMatrix(G), te = I.get("text-pitch-alignment") === "map", ae = I.get("text-rotation-alignment") === "map", fe = gr(f, 1, this.transform.zoom), pe = this.collisionIndex.mapProjection.translatePosition(this.transform, f, F.get("text-translate"), F.get("text-translate-anchor")), _e = this.collisionIndex.mapProjection.translatePosition(this.transform, f, F.get("icon-translate"), F.get("icon-translate-anchor")), se = Bi(Q, te, ae, this.transform, fe);
29815          let Te = null;
29816          if (te) {
29817            const Fe = mn(Q, te, ae, this.transform, fe);
29818            Te = c.L([], this.transform.labelPlaneMatrix, Fe);
29819          }
29820          this.retainedQueryData[y.bucketInstanceId] = new an(y.bucketInstanceId, S, y.sourceLayerIndex, y.index, f.tileID);
29821          const Me = { bucket: y, layout: I, translationText: pe, translationIcon: _e, posMatrix: Q, unwrappedTileID: G, textLabelPlaneMatrix: se, labelToScreenMatrix: Te, scale: N, textPixelRatio: $, holdingForFade: f.holdingForFade(), collisionBoxArray: C, partiallyEvaluatedTextSize: c.ag(y.textSizeData, this.transform.zoom), collisionGroup: this.collisionGroups.get(y.sourceID) };
29822          if (d) for (const Fe of y.sortKeyRanges) {
29823            const { sortKey: Je, symbolInstanceStart: lt, symbolInstanceEnd: vt } = Fe;
29824            r.push({ sortKey: Je, symbolInstanceStart: lt, symbolInstanceEnd: vt, parameters: Me });
29825          }
29826          else r.push({ symbolInstanceStart: 0, symbolInstanceEnd: y.symbolInstances.length, parameters: Me });
29827        }
29828        attemptAnchorPlacement(r, a, f, d, y, S, C, I, F, N, $, G, Q, te, ae, fe, pe, _e, se) {
29829          const Te = c.aq[r.textAnchor], Me = [r.textOffset0, r.textOffset1], Fe = Xn(Te, f, d, Me, y), Je = this.collisionIndex.placeCollisionBox(a, G, I, F, N, C, S, fe, $.predicate, se, Fe);
29830          if ((!_e || this.collisionIndex.placeCollisionBox(_e, G, I, F, N, C, S, pe, $.predicate, se, Fe).placeable) && Je.placeable) {
29831            let lt;
29832            if (this.prevPlacement && this.prevPlacement.variableOffsets[Q.crossTileID] && this.prevPlacement.placements[Q.crossTileID] && this.prevPlacement.placements[Q.crossTileID].text && (lt = this.prevPlacement.variableOffsets[Q.crossTileID].anchor), Q.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
29833            return this.variableOffsets[Q.crossTileID] = { textOffset: Me, width: f, height: d, anchor: Te, textBoxScale: y, prevAnchor: lt }, this.markUsedJustification(te, Te, Q, ae), te.allowVerticalPlacement && (this.markUsedOrientation(te, ae, Q), this.placedOrientations[Q.crossTileID] = ae), { shift: Fe, placedGlyphBoxes: Je };
29834          }
29835        }
29836        placeLayerBucketPart(r, a, f) {
29837          const { bucket: d, layout: y, translationText: S, translationIcon: C, posMatrix: I, unwrappedTileID: F, textLabelPlaneMatrix: N, labelToScreenMatrix: $, textPixelRatio: G, holdingForFade: Q, collisionBoxArray: te, partiallyEvaluatedTextSize: ae, collisionGroup: fe } = r.parameters, pe = y.get("text-optional"), _e = y.get("icon-optional"), se = c.ar(y, "text-overlap", "text-allow-overlap"), Te = se === "always", Me = c.ar(y, "icon-overlap", "icon-allow-overlap"), Fe = Me === "always", Je = y.get("text-rotation-alignment") === "map", lt = y.get("text-pitch-alignment") === "map", vt = y.get("icon-text-fit") !== "none", Ct = y.get("symbol-z-order") === "viewport-y", gt = Te && (Fe || !d.hasIconData() || _e), pt = Fe && (Te || !d.hasTextData() || pe);
29838          !d.collisionArrays && te && d.deserializeCollisionBoxes(te);
29839          const Ft = this._getTerrainElevationFunc(this.retainedQueryData[d.bucketInstanceId].tileID), ir = (yt, Et, rr) => {
29840            var yn, pr;
29841            if (a[yt.crossTileID]) return;
29842            if (Q) return void (this.placements[yt.crossTileID] = new lr(!1, !1, !1));
29843            let xr = !1, _n = !1, _i = !0, qs = null, vn = { box: null, placeable: !1, offscreen: null }, Hi = { placeable: !1 }, Mi = null, vi = null, ki = null, _o = 0, Pl = 0, Cu = 0;
29844            Et.textFeatureIndex ? _o = Et.textFeatureIndex : yt.useRuntimeCollisionCircles && (_o = yt.featureIndex), Et.verticalTextFeatureIndex && (Pl = Et.verticalTextFeatureIndex);
29845            const Ml = Et.textBox;
29846            if (Ml) {
29847              const Ss = (oi) => {
29848                let bi = c.ah.horizontal;
29849                if (d.allowVerticalPlacement && !oi && this.prevPlacement) {
29850                  const us = this.prevPlacement.placedOrientations[yt.crossTileID];
29851                  us && (this.placedOrientations[yt.crossTileID] = us, bi = us, this.markUsedOrientation(d, bi, yt));
29852                }
29853                return bi;
29854              }, Ts = (oi, bi) => {
29855                if (d.allowVerticalPlacement && yt.numVerticalGlyphVertices > 0 && Et.verticalTextBox) {
29856                  for (const us of d.writingModes) if (us === c.ah.vertical ? (vn = bi(), Hi = vn) : vn = oi(), vn && vn.placeable) break;
29857                } else vn = oi();
29858              }, sa = yt.textAnchorOffsetStartIndex, Hs = yt.textAnchorOffsetEndIndex;
29859              if (Hs === sa) {
29860                const oi = (bi, us) => {
29861                  const Tr = this.collisionIndex.placeCollisionBox(bi, se, G, I, F, lt, Je, S, fe.predicate, Ft);
29862                  return Tr && Tr.placeable && (this.markUsedOrientation(d, us, yt), this.placedOrientations[yt.crossTileID] = us), Tr;
29863                };
29864                Ts(() => oi(Ml, c.ah.horizontal), () => {
29865                  const bi = Et.verticalTextBox;
29866                  return d.allowVerticalPlacement && yt.numVerticalGlyphVertices > 0 && bi ? oi(bi, c.ah.vertical) : { box: null, offscreen: null };
29867                }), Ss(vn && vn.placeable);
29868              } else {
29869                let oi = c.aq[(pr = (yn = this.prevPlacement) === null || yn === void 0 ? void 0 : yn.variableOffsets[yt.crossTileID]) === null || pr === void 0 ? void 0 : pr.anchor];
29870                const bi = (Tr, $a, kl) => {
29871                  const Ol = Tr.x2 - Tr.x1, Kd = Tr.y2 - Tr.y1, ny = yt.textBoxScale, Xd = vt && Me === "never" ? $a : null;
29872                  let oa = null, Jd = se === "never" ? 1 : 2, Pu = "never";
29873                  oi && Jd++;
29874                  for (let Ac = 0; Ac < Jd; Ac++) {
29875                    for (let Mu = sa; Mu < Hs; Mu++) {
29876                      const ku = d.textAnchorOffsets.get(Mu);
29877                      if (oi && ku.textAnchor !== oi) continue;
29878                      const Dl = this.attemptAnchorPlacement(ku, Tr, Ol, Kd, ny, Je, lt, G, I, F, fe, Pu, yt, d, kl, S, C, Xd, Ft);
29879                      if (Dl && (oa = Dl.placedGlyphBoxes, oa && oa.placeable)) return xr = !0, qs = Dl.shift, oa;
29880                    }
29881                    oi ? oi = null : Pu = se;
29882                  }
29883                  return f && !oa && (oa = { box: this.collisionIndex.placeCollisionBox(Ml, "always", G, I, F, lt, Je, S, fe.predicate, Ft, new c.P(0, 0)).box, offscreen: !1, placeable: !1 }), oa;
29884                };
29885                Ts(() => bi(Ml, Et.iconBox, c.ah.horizontal), () => {
29886                  const Tr = Et.verticalTextBox;
29887                  return d.allowVerticalPlacement && (!vn || !vn.placeable) && yt.numVerticalGlyphVertices > 0 && Tr ? bi(Tr, Et.verticalIconBox, c.ah.vertical) : { box: null, occluded: !0, offscreen: null };
29888                }), vn && (xr = vn.placeable, _i = vn.offscreen);
29889                const us = Ss(vn && vn.placeable);
29890                if (!xr && this.prevPlacement) {
29891                  const Tr = this.prevPlacement.variableOffsets[yt.crossTileID];
29892                  Tr && (this.variableOffsets[yt.crossTileID] = Tr, this.markUsedJustification(d, Tr.anchor, yt, us));
29893                }
29894              }
29895            }
29896            if (Mi = vn, xr = Mi && Mi.placeable, _i = Mi && Mi.offscreen, yt.useRuntimeCollisionCircles) {
29897              const Ss = d.text.placedSymbolArray.get(yt.centerJustifiedTextSymbolIndex), Ts = c.ai(d.textSizeData, ae, Ss), sa = y.get("text-padding");
29898              vi = this.collisionIndex.placeCollisionCircles(se, Ss, d.lineVertexArray, d.glyphOffsetArray, Ts, I, F, N, $, f, lt, fe.predicate, yt.collisionCircleDiameter, sa, S, Ft), vi.circles.length && vi.collisionDetected && !f && c.w("Collisions detected, but collision boxes are not shown"), xr = Te || vi.circles.length > 0 && !vi.collisionDetected, _i = _i && vi.offscreen;
29899            }
29900            if (Et.iconFeatureIndex && (Cu = Et.iconFeatureIndex), Et.iconBox) {
29901              const Ss = (Ts) => this.collisionIndex.placeCollisionBox(Ts, Me, G, I, F, lt, Je, C, fe.predicate, Ft, vt && qs ? qs : void 0);
29902              Hi && Hi.placeable && Et.verticalIconBox ? (ki = Ss(Et.verticalIconBox), _n = ki.placeable) : (ki = Ss(Et.iconBox), _n = ki.placeable), _i = _i && ki.offscreen;
29903            }
29904            const ws = pe || yt.numHorizontalGlyphVertices === 0 && yt.numVerticalGlyphVertices === 0, Iu = _e || yt.numIconVertices === 0;
29905            ws || Iu ? Iu ? ws || (_n = _n && xr) : xr = _n && xr : _n = xr = _n && xr;
29906            const lf = _n && ki.placeable;
29907            if (xr && Mi.placeable && this.collisionIndex.insertCollisionBox(Mi.box, se, y.get("text-ignore-placement"), d.bucketInstanceId, Hi && Hi.placeable && Pl ? Pl : _o, fe.ID), lf && this.collisionIndex.insertCollisionBox(ki.box, Me, y.get("icon-ignore-placement"), d.bucketInstanceId, Cu, fe.ID), vi && xr && this.collisionIndex.insertCollisionCircles(vi.circles, se, y.get("text-ignore-placement"), d.bucketInstanceId, _o, fe.ID), f && this.storeCollisionData(d.bucketInstanceId, rr, Et, Mi, ki, vi), yt.crossTileID === 0) throw new Error("symbolInstance.crossTileID can't be 0");
29908            if (d.bucketInstanceId === 0) throw new Error("bucket.bucketInstanceId can't be 0");
29909            this.placements[yt.crossTileID] = new lr(xr || gt, _n || pt, _i || d.justReloaded), a[yt.crossTileID] = !0;
29910          };
29911          if (Ct) {
29912            if (r.symbolInstanceStart !== 0) throw new Error("bucket.bucketInstanceId should be 0");
29913            const yt = d.getSortedSymbolIndexes(this.transform.angle);
29914            for (let Et = yt.length - 1; Et >= 0; --Et) {
29915              const rr = yt[Et];
29916              ir(d.symbolInstances.get(rr), d.collisionArrays[rr], rr);
29917            }
29918          } else for (let yt = r.symbolInstanceStart; yt < r.symbolInstanceEnd; yt++) ir(d.symbolInstances.get(yt), d.collisionArrays[yt], yt);
29919          if (f && d.bucketInstanceId in this.collisionCircleArrays) {
29920            const yt = this.collisionCircleArrays[d.bucketInstanceId];
29921            c.as(yt.invProjMatrix, I), yt.viewportMatrix = this.collisionIndex.getViewportMatrix();
29922          }
29923          d.justReloaded = !1;
29924        }
29925        storeCollisionData(r, a, f, d, y, S) {
29926          if (f.textBox || f.iconBox) {
29927            let C, I;
29928            this.collisionBoxArrays.has(r) ? C = this.collisionBoxArrays.get(r) : (C = /* @__PURE__ */ new Map(), this.collisionBoxArrays.set(r, C)), C.has(a) ? I = C.get(a) : (I = { text: null, icon: null }, C.set(a, I)), f.textBox && (I.text = d.box), f.iconBox && (I.icon = y.box);
29929          }
29930          if (S) {
29931            let C = this.collisionCircleArrays[r];
29932            C === void 0 && (C = this.collisionCircleArrays[r] = new Pr());
29933            for (let I = 0; I < S.circles.length; I += 4) C.circles.push(S.circles[I + 0]), C.circles.push(S.circles[I + 1]), C.circles.push(S.circles[I + 2]), C.circles.push(S.collisionDetected ? 1 : 0);
29934          }
29935        }
29936        markUsedJustification(r, a, f, d) {
29937          let y;
29938          y = d === c.ah.vertical ? f.verticalPlacedTextSymbolIndex : { left: f.leftJustifiedTextSymbolIndex, center: f.centerJustifiedTextSymbolIndex, right: f.rightJustifiedTextSymbolIndex }[c.at(a)];
29939          const S = [f.leftJustifiedTextSymbolIndex, f.centerJustifiedTextSymbolIndex, f.rightJustifiedTextSymbolIndex, f.verticalPlacedTextSymbolIndex];
29940          for (const C of S) C >= 0 && (r.text.placedSymbolArray.get(C).crossTileID = y >= 0 && C !== y ? 0 : f.crossTileID);
29941        }
29942        markUsedOrientation(r, a, f) {
29943          const d = a === c.ah.horizontal || a === c.ah.horizontalOnly ? a : 0, y = a === c.ah.vertical ? a : 0, S = [f.leftJustifiedTextSymbolIndex, f.centerJustifiedTextSymbolIndex, f.rightJustifiedTextSymbolIndex];
29944          for (const C of S) r.text.placedSymbolArray.get(C).placedOrientation = d;
29945          f.verticalPlacedTextSymbolIndex && (r.text.placedSymbolArray.get(f.verticalPlacedTextSymbolIndex).placedOrientation = y);
29946        }
29947        commit(r) {
29948          this.commitTime = r, this.zoomAtLastRecencyCheck = this.transform.zoom;
29949          const a = this.prevPlacement;
29950          let f = !1;
29951          this.prevZoomAdjustment = a ? a.zoomAdjustment(this.transform.zoom) : 0;
29952          const d = a ? a.symbolFadeChange(r) : 1, y = a ? a.opacities : {}, S = a ? a.variableOffsets : {}, C = a ? a.placedOrientations : {};
29953          for (const I in this.placements) {
29954            const F = this.placements[I], N = y[I];
29955            N ? (this.opacities[I] = new yr(N, d, F.text, F.icon), f = f || F.text !== N.text.placed || F.icon !== N.icon.placed) : (this.opacities[I] = new yr(null, d, F.text, F.icon, F.skipFade), f = f || F.text || F.icon);
29956          }
29957          for (const I in y) {
29958            const F = y[I];
29959            if (!this.opacities[I]) {
29960              const N = new yr(F, d, !1, !1);
29961              N.isHidden() || (this.opacities[I] = N, f = f || F.text.placed || F.icon.placed);
29962            }
29963          }
29964          for (const I in S) this.variableOffsets[I] || !this.opacities[I] || this.opacities[I].isHidden() || (this.variableOffsets[I] = S[I]);
29965          for (const I in C) this.placedOrientations[I] || !this.opacities[I] || this.opacities[I].isHidden() || (this.placedOrientations[I] = C[I]);
29966          if (a && a.lastPlacementChangeTime === void 0) throw new Error("Last placement time for previous placement is not defined");
29967          f ? this.lastPlacementChangeTime = r : typeof this.lastPlacementChangeTime != "number" && (this.lastPlacementChangeTime = a ? a.lastPlacementChangeTime : r);
29968        }
29969        updateLayerOpacities(r, a) {
29970          const f = {};
29971          for (const d of a) {
29972            const y = d.getBucket(r);
29973            y && d.latestFeatureIndex && r.id === y.layerIds[0] && this.updateBucketOpacities(y, d.tileID, f, d.collisionBoxArray);
29974          }
29975        }
29976        updateBucketOpacities(r, a, f, d) {
29977          r.hasTextData() && (r.text.opacityVertexArray.clear(), r.text.hasVisibleVertices = !1), r.hasIconData() && (r.icon.opacityVertexArray.clear(), r.icon.hasVisibleVertices = !1), r.hasIconCollisionBoxData() && r.iconCollisionBox.collisionVertexArray.clear(), r.hasTextCollisionBoxData() && r.textCollisionBox.collisionVertexArray.clear();
29978          const y = r.layers[0], S = y.layout, C = new yr(null, 0, !1, !1, !0), I = S.get("text-allow-overlap"), F = S.get("icon-allow-overlap"), N = y._unevaluatedLayout.hasValue("text-variable-anchor") || y._unevaluatedLayout.hasValue("text-variable-anchor-offset"), $ = S.get("text-rotation-alignment") === "map", G = S.get("text-pitch-alignment") === "map", Q = S.get("icon-text-fit") !== "none", te = new yr(null, 0, I && (F || !r.hasIconData() || S.get("icon-optional")), F && (I || !r.hasTextData() || S.get("text-optional")), !0);
29979          !r.collisionArrays && d && (r.hasIconCollisionBoxData() || r.hasTextCollisionBoxData()) && r.deserializeCollisionBoxes(d);
29980          const ae = (pe, _e, se) => {
29981            for (let Te = 0; Te < _e / 4; Te++) pe.opacityVertexArray.emplaceBack(se);
29982            pe.hasVisibleVertices = pe.hasVisibleVertices || se !== Ls;
29983          }, fe = this.collisionBoxArrays.get(r.bucketInstanceId);
29984          for (let pe = 0; pe < r.symbolInstances.length; pe++) {
29985            const _e = r.symbolInstances.get(pe), { numHorizontalGlyphVertices: se, numVerticalGlyphVertices: Te, crossTileID: Me } = _e;
29986            let Fe = this.opacities[Me];
29987            f[Me] ? Fe = C : Fe || (Fe = te, this.opacities[Me] = Fe), f[Me] = !0;
29988            const Je = _e.numIconVertices > 0, lt = this.placedOrientations[_e.crossTileID], vt = lt === c.ah.vertical, Ct = lt === c.ah.horizontal || lt === c.ah.horizontalOnly;
29989            if (se > 0 || Te > 0) {
29990              const pt = Sn(Fe.text);
29991              ae(r.text, se, vt ? Ls : pt), ae(r.text, Te, Ct ? Ls : pt);
29992              const Ft = Fe.text.isHidden();
29993              [_e.rightJustifiedTextSymbolIndex, _e.centerJustifiedTextSymbolIndex, _e.leftJustifiedTextSymbolIndex].forEach((Et) => {
29994                Et >= 0 && (r.text.placedSymbolArray.get(Et).hidden = Ft || vt ? 1 : 0);
29995              }), _e.verticalPlacedTextSymbolIndex >= 0 && (r.text.placedSymbolArray.get(_e.verticalPlacedTextSymbolIndex).hidden = Ft || Ct ? 1 : 0);
29996              const ir = this.variableOffsets[_e.crossTileID];
29997              ir && this.markUsedJustification(r, ir.anchor, _e, lt);
29998              const yt = this.placedOrientations[_e.crossTileID];
29999              yt && (this.markUsedJustification(r, "left", _e, yt), this.markUsedOrientation(r, yt, _e));
30000            }
30001            if (Je) {
30002              const pt = Sn(Fe.icon), Ft = !(Q && _e.verticalPlacedIconSymbolIndex && vt);
30003              _e.placedIconSymbolIndex >= 0 && (ae(r.icon, _e.numIconVertices, Ft ? pt : Ls), r.icon.placedSymbolArray.get(_e.placedIconSymbolIndex).hidden = Fe.icon.isHidden()), _e.verticalPlacedIconSymbolIndex >= 0 && (ae(r.icon, _e.numVerticalIconVertices, Ft ? Ls : pt), r.icon.placedSymbolArray.get(_e.verticalPlacedIconSymbolIndex).hidden = Fe.icon.isHidden());
30004            }
30005            const gt = fe && fe.has(pe) ? fe.get(pe) : { text: null, icon: null };
30006            if (r.hasIconCollisionBoxData() || r.hasTextCollisionBoxData()) {
30007              const pt = r.collisionArrays[pe];
30008              if (pt) {
30009                let Ft = new c.P(0, 0);
30010                if (pt.textBox || pt.verticalTextBox) {
30011                  let ir = !0;
30012                  if (N) {
30013                    const yt = this.variableOffsets[Me];
30014                    yt ? (Ft = Xn(yt.anchor, yt.width, yt.height, yt.textOffset, yt.textBoxScale), $ && Ft._rotate(G ? this.transform.angle : -this.transform.angle)) : ir = !1;
30015                  }
30016                  if (pt.textBox || pt.verticalTextBox) {
30017                    let yt;
30018                    pt.textBox && (yt = vt), pt.verticalTextBox && (yt = Ct), Ko(r.textCollisionBox.collisionVertexArray, Fe.text.placed, !ir || yt, gt.text, Ft.x, Ft.y);
30019                  }
30020                }
30021                if (pt.iconBox || pt.verticalIconBox) {
30022                  const ir = !!(!Ct && pt.verticalIconBox);
30023                  let yt;
30024                  pt.iconBox && (yt = ir), pt.verticalIconBox && (yt = !ir), Ko(r.iconCollisionBox.collisionVertexArray, Fe.icon.placed, yt, gt.icon, Q ? Ft.x : 0, Q ? Ft.y : 0);
30025                }
30026              }
30027            }
30028          }
30029          if (r.sortFeatures(this.transform.angle), this.retainedQueryData[r.bucketInstanceId] && (this.retainedQueryData[r.bucketInstanceId].featureSortOrder = r.featureSortOrder), r.hasTextData() && r.text.opacityVertexBuffer && r.text.opacityVertexBuffer.updateData(r.text.opacityVertexArray), r.hasIconData() && r.icon.opacityVertexBuffer && r.icon.opacityVertexBuffer.updateData(r.icon.opacityVertexArray), r.hasIconCollisionBoxData() && r.iconCollisionBox.collisionVertexBuffer && r.iconCollisionBox.collisionVertexBuffer.updateData(r.iconCollisionBox.collisionVertexArray), r.hasTextCollisionBoxData() && r.textCollisionBox.collisionVertexBuffer && r.textCollisionBox.collisionVertexBuffer.updateData(r.textCollisionBox.collisionVertexArray), r.text.opacityVertexArray.length !== r.text.layoutVertexArray.length / 4) throw new Error(`bucket.text.opacityVertexArray.length (= ${r.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${r.text.layoutVertexArray.length}) / 4`);
30030          if (r.icon.opacityVertexArray.length !== r.icon.layoutVertexArray.length / 4) throw new Error(`bucket.icon.opacityVertexArray.length (= ${r.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${r.icon.layoutVertexArray.length}) / 4`);
30031          if (r.bucketInstanceId in this.collisionCircleArrays) {
30032            const pe = this.collisionCircleArrays[r.bucketInstanceId];
30033            r.placementInvProjMatrix = pe.invProjMatrix, r.placementViewportMatrix = pe.viewportMatrix, r.collisionCircleArray = pe.circles, delete this.collisionCircleArrays[r.bucketInstanceId];
30034          }
30035        }
30036        symbolFadeChange(r) {
30037          return this.fadeDuration === 0 ? 1 : (r - this.commitTime) / this.fadeDuration + this.prevZoomAdjustment;
30038        }
30039        zoomAdjustment(r) {
30040          return Math.max(0, (this.transform.zoom - r) / 1.5);
30041        }
30042        hasTransitions(r) {
30043          return this.stale || r - this.lastPlacementChangeTime < this.fadeDuration;
30044        }
30045        stillRecent(r, a) {
30046          const f = this.zoomAtLastRecencyCheck === a ? 1 - this.zoomAdjustment(a) : 1;
30047          return this.zoomAtLastRecencyCheck = a, this.commitTime + this.fadeDuration * f > r;
30048        }
30049        setStale() {
30050          this.stale = !0;
30051        }
30052      }
30053      function Ko(_, r, a, f, d, y) {
30054        f && f.length !== 0 || (f = [0, 0, 0, 0]);
30055        const S = f[0] - Wt, C = f[1] - Wt, I = f[2] - Wt, F = f[3] - Wt;
30056        _.emplaceBack(r ? 1 : 0, a ? 1 : 0, d || 0, y || 0, S, C), _.emplaceBack(r ? 1 : 0, a ? 1 : 0, d || 0, y || 0, I, 
30056C), _.emplaceBack(r ? 1 : 0, a ? 1 : 0, d || 0, y || 0, I, F), _.emplaceBack(r ? 1 : 0, a ? 1 : 0, d || 0, y || 0, S, F);
30057      }
30058      const Mr = Math.pow(2, 25), Aa = Math.pow(2, 24), Ca = Math.pow(2, 17), zr = Math.pow(2, 16), mi = Math.pow(2, 9), fu = Math.pow(2, 8), Nn = Math.pow(2, 1);
30059      function Sn(_) {
30060        if (_.opacity === 0 && !_.placed) return 0;
30061        if (_.opacity === 1 && _.placed) return 4294967295;
30062        const r = _.placed ? 1 : 0, a = Math.floor(127 * _.opacity);
30063        return a * Mr + r * Aa + a * Ca + r * zr + a * mi + r * fu + a * Nn + r;
30064      }
30065      const Ls = 0;
30066      function Pi() {
30067        return { isOccluded: (_, r, a) => !1, getPitchedTextCorrection: (_, r, a) => 1, get useSpecialProjectionForSymbols() {
30068          return !1;
30069        }, projectTileCoordinates(_, r, a, f) {
30070          throw new Error("Not implemented.");
30071        }, translatePosition: (_, r, a, f) => function(d, y, S, C, I = !1) {
30072          if (!S[0] && !S[1]) return [0, 0];
30073          const F = I ? C === "map" ? d.angle : 0 : C === "viewport" ? -d.angle : 0;
30074          if (F) {
30075            const N = Math.sin(F), $ = Math.cos(F);
30076            S = [S[0] * $ - S[1] * N, S[0] * N + S[1] * $];
30077          }
30078          return [I ? S[0] : gr(y, S[0], d.zoom), I ? S[1] : gr(y, S[1], d.zoom)];
30079        }(_, r, a, f), getCircleRadiusCorrection: (_) => 1 };
30080      }
30081      class rn {
30082        constructor(r) {
30083          this._sortAcrossTiles = r.layout.get("symbol-z-order") !== "viewport-y" && !r.layout.get("symbol-sort-key").isConstant(), this._currentTileIndex = 0, this._currentPartIndex = 0, this._seenCrossTileIDs = {}, this._bucketParts = [];
30084        }
30085        continuePlacement(r, a, f, d, y) {
30086          const S = this._bucketParts;
30087          for (; this._currentTileIndex < r.length; ) if (a.getBucketParts(S, d, r[this._currentTileIndex], this._sortAcrossTiles), this._currentTileIndex++, y()) return !0;
30088          for (this._sortAcrossTiles && (this._sortAcrossTiles = !1, S.sort((C, I) => C.sortKey - I.sortKey)); this._currentPartIndex < S.length; ) if (a.placeLayerBucketPart(S[this._currentPartIndex], this._seenCrossTileIDs, f), this._currentPartIndex++, y()) return !0;
30089          return !1;
30090        }
30091      }
30092      class Xo {
30093        constructor(r, a, f, d, y, S, C, I) {
30094          this.placement = new Jn(r, Pi(), a, S, C, I), this._currentPlacementIndex = f.length - 1, this._forceFullPlacement = d, this._showCollisionBoxes = y, this._done = !1;
30095        }
30096        isDone() {
30097          return this._done;
30098        }
30099        continuePlacement(r, a, f) {
30100          const d = R.now(), y = () => !this._forceFullPlacement && R.now() - d > 2;
30101          for (; this._currentPlacementIndex >= 0; ) {
30102            const S = a[r[this._currentPlacementIndex]], C = this.placement.collisionIndex.transform.zoom;
30103            if (S.type === "symbol" && (!S.minzoom || S.minzoom <= C) && (!S.maxzoom || S.maxzoom > C)) {
30104              if (this._inProgressLayer || (this._inProgressLayer = new rn(S)), this._inProgressLayer.continuePlacement(f[S.source], this.placement, this._showCollisionBoxes, S, y)) return;
30105              delete this._inProgressLayer;
30106            }
30107            this._currentPlacementIndex--;
30108          }
30109          this._done = !0;
30110        }
30111        commit(r) {
30112          return this.placement.commit(r), this.placement;
30113        }
30114      }
30115      const rs = 512 / c.X / 2;
30116      class Cn {
30117        constructor(r, a, f) {
30118          this.tileID = r, this.bucketInstanceId = f, this._symbolsByKey = {};
30119          const d = /* @__PURE__ */ new Map();
30120          for (let y = 0; y < a.length; y++) {
30121            const S = a.get(y), C = S.key, I = d.get(C);
30122            I ? I.push(S) : d.set(C, [S]);
30123          }
30124          for (const [y, S] of d) {
30125            const C = { positions: S.map((I) => ({ x: Math.floor(I.anchorX * rs), y: Math.floor(I.anchorY * rs) })), crossTileIDs: S.map((I) => I.crossTileID) };
30126            if (C.positions.length > 128) {
30127              const I = new c.av(C.positions.length, 16, Uint16Array);
30128              for (const { x: F, y: N } of C.positions) I.add(F, N);
30129              I.finish(), delete C.positions, C.index = I;
30130            }
30131            this._symbolsByKey[y] = C;
30132          }
30133        }
30134        getScaledCoordinates(r, a) {
30135          const { x: f, y: d, z: y } = this.tileID.canonical, { x: S, y: C, z: I }
vendor: 43,267 bytes, lines 30135-30935
30135 = a.canonical, F = rs / Math.pow(2, I - y), N = (C * c.X + r.anchorY) * F, $ = d * c.X * rs;
30136          return { x: Math.floor((S * c.X + r.anchorX) * F - f * c.X * rs), y: Math.floor(N - $) };
30137        }
30138        findMatches(r, a, f) {
30139          const d = this.tileID.canonical.z < a.canonical.z ? 1 : Math.pow(2, this.tileID.canonical.z - a.canonical.z);
30140          for (let y = 0; y < r.length; y++) {
30141            const S = r.get(y);
30142            if (S.crossTileID) continue;
30143            const C = this._symbolsByKey[S.key];
30144            if (!C) continue;
30145            const I = this.getScaledCoordinates(S, a);
30146            if (C.index) {
30147              const F = C.index.range(I.x - d, I.y - d, I.x + d, I.y + d).sort();
30148              for (const N of F) {
30149                const $ = C.crossTileIDs[N];
30150                if (!f[$]) {
30151                  f[$] = !0, S.crossTileID = $;
30152                  break;
30153                }
30154              }
30155            } else if (C.positions) for (let F = 0; F < C.positions.length; F++) {
30156              const N = C.positions[F], $ = C.crossTileIDs[F];
30157              if (Math.abs(N.x - I.x) <= d && Math.abs(N.y - I.y) <= d && !f[$]) {
30158                f[$] = !0, S.crossTileID = $;
30159                break;
30160              }
30161            }
30162          }
30163        }
30164        getCrossTileIDsLists() {
30165          return Object.values(this._symbolsByKey).map(({ crossTileIDs: r }) => r);
30166        }
30167      }
30168      class al {
30169        constructor() {
30170          this.maxCrossTileID = 0;
30171        }
30172        generate() {
30173          return ++this.maxCrossTileID;
30174        }
30175      }
30176      class Ni {
30177        constructor() {
30178          this.indexes = {}, this.usedCrossTileIDs = {}, this.lng = 0;
30179        }
30180        handleWrapJump(r) {
30181          const a = Math.round((r - this.lng) / 360);
30182          if (a !== 0) for (const f in this.indexes) {
30183            const d = this.indexes[f], y = {};
30184            for (const S in d) {
30185              const C = d[S];
30186              C.tileID = C.tileID.unwrapTo(C.tileID.wrap + a), y[C.tileID.key] = C;
30187            }
30188            this.indexes[f] = y;
30189          }
30190          this.lng = r;
30191        }
30192        addBucket(r, a, f) {
30193          if (this.indexes[r.overscaledZ] && this.indexes[r.overscaledZ][r.key]) {
30194            if (this.indexes[r.overscaledZ][r.key].bucketInstanceId === a.bucketInstanceId) return !1;
30195            this.removeBucketCrossTileIDs(r.overscaledZ, this.indexes[r.overscaledZ][r.key]);
30196          }
30197          for (let y = 0; y < a.symbolInstances.length; y++) a.symbolInstances.get(y).crossTileID = 0;
30198          this.usedCrossTileIDs[r.overscaledZ] || (this.usedCrossTileIDs[r.overscaledZ] = {});
30199          const d = this.usedCrossTileIDs[r.overscaledZ];
30200          for (const y in this.indexes) {
30201            const S = this.indexes[y];
30202            if (Number(y) > r.overscaledZ) for (const C in S) {
30203              const I = S[C];
30204              I.tileID.isChildOf(r) && I.findMatches(a.symbolInstances, r, d);
30205            }
30206            else {
30207              const C = S[r.scaledTo(Number(y)).key];
30208              C && C.findMatches(a.symbolInstances, r, d);
30209            }
30210          }
30211          for (let y = 0; y < a.symbolInstances.length; y++) {
30212            const S = a.symbolInstances.get(y);
30213            S.crossTileID || (S.crossTileID = f.generate(), d[S.crossTileID] = !0);
30214          }
30215          return this.indexes[r.overscaledZ] === void 0 && (this.indexes[r.overscaledZ] = {}), this.indexes[r.overscaledZ][r.key] = new Cn(r, a.symbolInstances, a.bucketInstanceId), !0;
30216        }
30217        removeBucketCrossTileIDs(r, a) {
30218          for (const f of a.getCrossTileIDsLists()) for (const d of f) delete this.usedCrossTileIDs[r][d];
30219        }
30220        removeStaleBuckets(r) {
30221          let a = !1;
30222          for (const f in this.indexes) {
30223            const d = this.indexes[f];
30224            for (const y in d) r[d[y].bucketInstanceId] || (this.removeBucketCrossTileIDs(f, d[y]), delete d[y], a = !0);
30225          }
30226          return a;
30227        }
30228      }
30229      class Ia {
30230        constructor() {
30231          this.layerIndexes = {}, this.crossTileIDs = new al(), this.maxBucketInstanceId = 0, this.bucketsInCurrentPlacement = {};
30232        }
30233        addLayer(r, a, f) {
30234          let d = this.layerIndexes[r.id];
30235          d === void 0 && (d = this.layerIndexes[r.id] = new Ni());
30236          let y = !1;
30237          const S = {};
30238          d.handleWrapJump(f);
30239          for (const C of a) {
30240            const I = C.getBucket(r);
30241            I && r.id === I.layerIds[0] && (I.bucketInstanceId || (I.bucketInstanceId = ++this.maxBucketInstanceId), d.addBucket(C.tileID, I, this.crossTileIDs) && (y = !0), S[I.bucketInstanceId] = !0);
30242          }
30243          return d.removeStaleBuckets(S) && (y = !0), y;
30244        }
30245        pruneUnusedLayers(r) {
30246          const a = {};
30247          r.forEach((f) => {
30248            a[f] = !0;
30249          });
30250          for (const f in this.layerIndexes) a[f] || delete this.layerIndexes[f];
30251        }
30252      }
30253      const $i = (_, r) => c.t(_, r && r.filter((a) => a.identifier !== "source.canvas")), du = c.aw();
30254      class ll extends c.E {
30255        constructor(r, a = {}) {
30256          super(), this._rtlPluginLoaded = () => {
30257            for (const f in this.sourceCaches) {
30258              const d = this.sourceCaches[f].getSource().type;
30259              d !== "vector" && d !== "geojson" || this.sourceCaches[f].reload();
30260            }
30261          }, this.map = r, this.dispatcher = new Jt(tn(), r._getMapId()), this.dispatcher.registerMessageHandler("GG", (f, d) => this.getGlyphs(f, d)), this.dispatcher.registerMessageHandler("GI", (f, d) => this.getImages(f, d)), this.imageManager = new $e(), this.imageManager.setEventedParent(this), this.glyphManager = new ct(r._requestManager, a.localIdeographFontFamily), this.lineAtlas = new Ar(256, 512), this.crossTileSymbolIndex = new Ia(), this._spritesImagesIds = {}, this._layers = {}, this._order = [], this.sourceCaches = {}, this.zoomHistory = new c.ax(), this._loaded = !1, this._availableImages = [], this._resetUpdates(), this.dispatcher.broadcast("SR", c.ay()), Cr().on(We, this._rtlPluginLoaded), this.on("data", (f) => {
30262            if (f.dataType !== "source" || f.sourceDataType !== "metadata") return;
30263            const d = this.sourceCaches[f.sourceId];
30264            if (!d) return;
30265            const y = d.getSource();
30266            if (y && y.vectorLayerIds) for (const S in this._layers) {
30267              const C = this._layers[S];
30268              C.source === y.id && this._validateLayer(C);
30269            }
30270          });
30271        }
30272        loadURL(r, a = {}, f) {
30273          this.fire(new c.k("dataloading", { dataType: "style" })), a.validate = typeof a.validate != "boolean" || a.validate;
30274          const d = this.map._requestManager.transformRequest(r, "Style");
30275          this._loadStyleRequest = new AbortController();
30276          const y = this._loadStyleRequest;
30277          c.h(d, this._loadStyleRequest).then((S) => {
30278            this._loadStyleRequest = null, this._load(S.data, a, f);
30279          }).catch((S) => {
30280            this._loadStyleRequest = null, S && !y.signal.aborted && this.fire(new c.j(S));
30281          });
30282        }
30283        loadJSON(r, a = {}, f) {
30284          this.fire(new c.k("dataloading", { dataType: "style" })), this._frameRequest = new AbortController(), R.frameAsync(this._frameRequest).then(() => {
30285            this._frameRequest = null, a.validate = a.validate !== !1, this._load(r, a, f);
30286          }).catch(() => {
30287          });
30288        }
30289        loadEmpty() {
30290          this.fire(new c.k("dataloading", { dataType: "style" })), this._load(du, { validate: !1 });
30291        }
30292        _load(r, a, f) {
30293          var d;
30294          const y = a.transformStyle ? a.transformStyle(f, r) : r;
30295          if (!a.validate || !$i(this, c.u(y))) {
30296            this._loaded = !0, this.stylesheet = y;
30297            for (const S in y.sources) this.addSource(S, y.sources[S], { validate: !1 });
30298            y.sprite ? this._loadSprite(y.sprite) : this.imageManager.setLoaded(!0), this.glyphManager.setURL(y.glyphs), this._createLayers(), this.light = new fr(this.stylesheet.light), this.sky = new ur(this.stylesheet.sky), this.map.setTerrain((d = this.stylesheet.terrain) !== null && d !== void 0 ? d : null), this.fire(new c.k("data", { dataType: "style" })), this.fire(new c.k("style.load"));
30299          }
30300        }
30301        _createLayers() {
30302          const r = c.az(this.stylesheet.layers);
30303          this.dispatcher.broadcast("SL", r), this._order = r.map((a) => a.id), this._layers = {}, this._serializedLayers = null;
30304          for (const a of r) {
30305            const f = c.aA(a);
30306            f.setEventedParent(this, { layer: { id: a.id } }), this._layers[a.id] = f;
30307          }
30308        }
30309        _loadSprite(r, a = !1, f = void 0) {
30310          let d;
30311          this.imageManager.setLoaded(!1), this._spriteRequest = new AbortController(), function(y, S, C, I) {
30312            return c._(this, void 0, void 0, function* () {
30313              const F = Oe(y), N = C > 1 ? "@2x" : "", $ = {}, G = {};
30314              for (const { id: Q, url: te } of F) {
30315                const ae = S.transformRequest(ze(te, N, ".json"), "SpriteJSON");
30316                $[Q] = c.h(ae, I);
30317                const fe = S.transformRequest(ze(te, N, ".png"), "SpriteImage");
30318                G[Q] = X.getImage(fe, I);
30319              }
30320              return yield Promise.all([...Object.values($), ...Object.values(G)]), function(Q, te) {
30321                return c._(this, void 0, void 0, function* () {
30322                  const ae = {};
30323                  for (const fe in Q) {
30324                    ae[fe] = {};
30325                    const pe = R.getImageCanvasContext((yield te[fe]).data), _e = (yield Q[fe]).data;
30326                    for (const se in _e) {
30327                      const { width: Te, height: Me, x: Fe, y: Je, sdf: lt, pixelRatio: vt, stretchX: Ct, stretchY: gt, content: pt, textFitWidth: Ft, textFitHeight: ir } = _e[se];
30328                      ae[fe][se] = { data: null, pixelRatio: vt, sdf: lt, stretchX: Ct, stretchY: gt, content: pt, textFitWidth: Ft, textFitHeight: ir, spriteData: { width: Te, height: Me, x: Fe, y: Je, context: pe } };
30329                    }
30330                  }
30331                  return ae;
30332                });
30333              }($, G);
30334            });
30335          }(r, this.map._requestManager, this.map.getPixelRatio(), this._spriteRequest).then((y) => {
30336            if (this._spriteRequest = null, y) for (const S in y) {
30337              this._spritesImagesIds[S] = [];
30338              const C = this._spritesImagesIds[S] ? this._spritesImagesIds[S].filter((I) => !(I in y)) : [];
30339              for (const I of C) this.imageManager.removeImage(I), this._changedImages[I] = !0;
30340              for (const I in y[S]) {
30341                const F = S === "default" ? I : `${S}:${I}`;
30342                this._spritesImagesIds[S].push(F), F in this.imageManager.images ? this.imageManager.updateImage(F, y[S][I], !1) : this.imageManager.addImage(F, y[S][I]), a && (this._changedImages[F] = !0);
30343              }
30344            }
30345          }).catch((y) => {
30346            this._spriteRequest = null, d = y, this.fire(new c.j(d));
30347          }).finally(() => {
30348            this.imageManager.setLoaded(!0), this._availableImages = this.imageManager.listImages(), a && (this._changed = !0), this.dispatcher.broadcast("SI", this._availableImages), this.fire(new c.k("data", { dataType: "style" })), f && f(d);
30349          });
30350        }
30351        _unloadSprite() {
30352          for (const r of Object.values(this._spritesImagesIds).flat()) this.imageManager.removeImage(r), this._changedImages[r] = !0;
30353          this._spritesImagesIds = {}, this._availableImages = this.imageManager.listImages(), this._changed = !0, this.dispatcher.broadcast("SI", this._availableImages), this.fire(new c.k("data", { dataType: "style" }));
30354        }
30355        _validateLayer(r) {
30356          const a = this.sourceCaches[r.source];
30357          if (!a) return;
30358          const f = r.sourceLayer;
30359          if (!f) return;
30360          const d = a.getSource();
30361          (d.type === "geojson" || d.vectorLayerIds && d.vectorLayerIds.indexOf(f) === -1) && this.fire(new c.j(new Error(`Source layer "${f}" does not exist on source "${d.id}" as specified by style layer "${r.id}".`)));
30362        }
30363        loaded() {
30364          if (!this._loaded || Object.keys(this._updatedSources).length) return !1;
30365          for (const r in this.sourceCaches) if (!this.sourceCaches[r].loaded()) return !1;
30366          return !!this.imageManager.isLoaded();
30367        }
30368        _serializeByIds(r, a = !1) {
30369          const f = this._serializedAllLayers();
30370          if (!r || r.length === 0) return Object.values(a ? c.aB(f) : f);
30371          const d = [];
30372          for (const y of r) if (f[y]) {
30373            const S = a ? c.aB(f[y]) : f[y];
30374            d.push(S);
30375          }
30376          return d;
30377        }
30378        _serializedAllLayers() {
30379          let r = this._serializedLayers;
30380          if (r) return r;
30381          r = this._serializedLayers = {};
30382          const a = Object.keys(this._layers);
30383          for (const f of a) {
30384            const d = this._layers[f];
30385            d.type !== "custom" && (r[f] = d.serialize());
30386          }
30387          return r;
30388        }
30389        hasTransitions() {
30390          if (this.light && this.light.hasTransition() || this.sky && this.sky.hasTransition()) return !0;
30391          for (const r in this.sourceCaches) if (this.sourceCaches[r].hasTransition()) return !0;
30392          for (const r in this._layers) if (this._layers[r].hasTransition()) return !0;
30393          return !1;
30394        }
30395        _checkLoaded() {
30396          if (!this._loaded) throw new Error("Style is not done loading.");
30397        }
30398        update(r) {
30399          if (!this._loaded) return;
30400          const a = this._changed;
30401          if (a) {
30402            const d = Object.keys(this._updatedLayers), y = Object.keys(this._removedLayers);
30403            (d.length || y.length) && this._updateWorkerLayers(d, y);
30404            for (const S in this._updatedSources) {
30405              const C = this._updatedSources[S];
30406              if (C === "reload") this._reloadSource(S);
30407              else {
30408                if (C !== "clear") throw new Error(`Invalid action ${C}`);
30409                this._clearSource(S);
30410              }
30411            }
30412            this._updateTilesForChangedImages(), this._updateTilesForChangedGlyphs();
30413            for (const S in this._updatedPaintProps) this._layers[S].updateTransitions(r);
30414            this.light.updateTransitions(r), this.sky.updateTransitions(r), this._resetUpdates();
30415          }
30416          const f = {};
30417          for (const d in this.sourceCaches) {
30418            const y = this.sourceCaches[d];
30419            f[d] = y.used, y.used = !1;
30420          }
30421          for (const d of this._order) {
30422            const y = this._layers[d];
30423            y.recalculate(r, this._availableImages), !y.isHidden(r.zoom) && y.source && (this.sourceCaches[y.source].used = !0);
30424          }
30425          for (const d in f) {
30426            const y = this.sourceCaches[d];
30427            !!f[d] != !!y.used && y.fire(new c.k("data", { sourceDataType: "visibility", dataType: "source", sourceId: d }));
30428          }
30429          this.light.recalculate(r), this.sky.recalculate(r), this.z = r.zoom, a && this.fire(new c.k("data", { dataType: "style" }));
30430        }
30431        _updateTilesForChangedImages() {
30432          const r = Object.keys(this._changedImages);
30433          if (r.length) {
30434            for (const a in this.sourceCaches) this.sourceCaches[a].reloadTilesForDependencies(["icons", "patterns"], r);
30435            this._changedImages = {};
30436          }
30437        }
30438        _updateTilesForChangedGlyphs() {
30439          if (this._glyphsDidChange) {
30440            for (const r in this.sourceCaches) this.sourceCaches[r].reloadTilesForDependencies(["glyphs"], [""]);
30441            this._glyphsDidChange = !1;
30442          }
30443        }
30444        _updateWorkerLayers(r, a) {
30445          this.dispatcher.broadcast("UL", { layers: this._serializeByIds(r, !1), removedIds: a });
30446        }
30447        _resetUpdates() {
30448          this._changed = !1, this._updatedLayers = {}, this._removedLayers = {}, this._updatedSources = {}, this._updatedPaintProps = {}, this._changedImages = {}, this._glyphsDidChange = !1;
30449        }
30450        setState(r, a = {}) {
30451          var f;
30452          this._checkLoaded();
30453          const d = this.serialize();
30454          if (r = a.transformStyle ? a.transformStyle(d, r) : r, ((f = a.validate) === null || f === void 0 || f) && $i(this, c.u(r))) return !1;
30455          (r = c.aB(r)).layers = c.az(r.layers);
30456          const y = c.aC(d, r), S = this._getOperationsToPerform(y);
30457          if (S.unimplemented.length > 0) throw new Error(`Unimplemented: ${S.unimplemented.join(", ")}.`);
30458          if (S.operations.length === 0) return !1;
30459          for (const C of S.operations) C();
30460          return this.stylesheet = r, this._serializedLayers = null, !0;
30461        }
30462        _getOperationsToPerform(r) {
30463          const a = [], f = [];
30464          for (const d of r) switch (d.command) {
30465            case "setCenter":
30466            case "setZoom":
30467            case "setBearing":
30468            case "setPitch":
30469              continue;
30470            case "addLayer":
30471              a.push(() => this.addLayer.apply(this, d.args));
30472              break;
30473            case "removeLayer":
30474              a.push(() => this.removeLayer.apply(this, d.args));
30475              break;
30476            case "setPaintProperty":
30477              a.push(() => this.setPaintProperty.apply(this, d.args));
30478              break;
30479            case "setLayoutProperty":
30480              a.push(() => this.setLayoutProperty.apply(this, d.args));
30481              break;
30482            case "setFilter":
30483              a.push(() => this.setFilter.apply(this, d.args));
30484              break;
30485            case "addSource":
30486              a.push(() => this.addSource.apply(this, d.args));
30487              break;
30488            case "removeSource":
30489              a.push(() => this.removeSource.apply(this, d.args));
30490              break;
30491            case "setLayerZoomRange":
30492              a.push(() => this.setLayerZoomRange.apply(this, d.args));
30493              break;
30494            case "setLight":
30495              a.push(() => this.setLight.apply(this, d.args));
30496              break;
30497            case "setGeoJSONSourceData":
30498              a.push(() => this.setGeoJSONSourceData.apply(this, d.args));
30499              break;
30500            case "setGlyphs":
30501              a.push(() => this.setGlyphs.apply(this, d.args));
30502              break;
30503            case "setSprite":
30504              a.push(() => this.setSprite.apply(this, d.args));
30505              break;
30506            case "setSky":
30507              a.push(() => this.setSky.apply(this, d.args));
30508              break;
30509            case "setTerrain":
30510              a.push(() => this.map.setTerrain.apply(this, d.args));
30511              break;
30512            case "setTransition":
30513              a.push(() => {
30514              });
30515              break;
30516            default:
30517              f.push(d.command);
30518          }
30519          return { operations: a, unimplemented: f };
30520        }
30521        addImage(r, a) {
30522          if (this.getImage(r)) return this.fire(new c.j(new Error(`An image named "${r}" already exists.`)));
30523          this.imageManager.addImage(r, a), this._afterImageUpdated(r);
30524        }
30525        updateImage(r, a) {
30526          this.imageManager.updateImage(r, a);
30527        }
30528        getImage(r) {
30529          return this.imageManager.getImage(r);
30530        }
30531        removeImage(r) {
30532          if (!this.getImage(r)) return this.fire(new c.j(new Error(`An image named "${r}" does not exist.`)));
30533          this.imageManager.removeImage(r), this._afterImageUpdated(r);
30534        }
30535        _afterImageUpdated(r) {
30536          this._availableImages = this.imageManager.listImages(), this._changedImages[r] = !0, this._changed = !0, this.dispatcher.broadcast("SI", this._availableImages), this.fire(new c.k("data", { dataType: "style" }));
30537        }
30538        listImages() {
30539          return this._checkLoaded(), this.imageManager.listImages();
30540        }
30541        addSource(r, a, f = {}) {
30542          if (this._checkLoaded(), this.sourceCaches[r] !== void 0) throw new Error(`Source "${r}" already exists.`);
30543          if (!a.type) throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(a).join(", ")}.`);
30544          if (["vector", "raster", "geojson", "video", "image"].indexOf(a.type) >= 0 && this._validate(c.u.source, `sources.${r}`, a, null, f)) return;
30545          this.map && this.map._collectResourceTiming && (a.collectResourceTiming = !0);
30546          const d = this.sourceCaches[r] = new Ut(r, a, this.dispatcher);
30547          d.style = this, d.setEventedParent(this, () => ({ isSourceLoaded: d.loaded(), source: d.serialize(), sourceId: r })), d.onAdd(this.map), this._changed = !0;
30548        }
30549        removeSource(r) {
30550          if (this._checkLoaded(), this.sourceCaches[r] === void 0) throw new Error("There is no source with this ID");
30551          for (const f in this._layers) if (this._layers[f].source === r) return this.fire(new c.j(new Error(`Source "${r}" cannot be removed while layer "${f}" is using it.`)));
30552          const a = this.sourceCaches[r];
30553          delete this.sourceCaches[r], delete this._updatedSources[r], a.fire(new c.k("data", { sourceDataType: "metadata", dataType: "source", sourceId: r })), a.setEventedParent(null), a.onRemove(this.map), this._changed = !0;
30554        }
30555        setGeoJSONSourceData(r, a) {
30556          if (this._checkLoaded(), this.sourceCaches[r] === void 0) throw new Error(`There is no source with this ID=${r}`);
30557          const f = this.sourceCaches[r].getSource();
30558          if (f.type !== "geojson") throw new Error(`geojsonSource.type is ${f.type}, which is !== 'geojson`);
30559          f.setData(a), this._changed = !0;
30560        }
30561        getSource(r) {
30562          return this.sourceCaches[r] && this.sourceCaches[r].getSource();
30563        }
30564        addLayer(r, a, f = {}) {
30565          this._checkLoaded();
30566          const d = r.id;
30567          if (this.getLayer(d)) return void this.fire(new c.j(new Error(`Layer "${d}" already exists on this map.`)));
30568          let y;
30569          if (r.type === "custom") {
30570            if ($i(this, c.aD(r))) return;
30571            y = c.aA(r);
30572          } else {
30573            if ("source" in r && typeof r.source == "object" && (this.addSource(d, r.source), r = c.aB(r), r = c.e(r, { source: d })), this._validate(c.u.layer, `layers.${d}`, r, { arrayIndex: -1 }, f)) return;
30574            y = c.aA(r), this._validateLayer(y), y.setEventedParent(this, { layer: { id: d } });
30575          }
30576          const S = a ? this._order.indexOf(a) : this._order.length;
30577          if (a && S === -1) this.fire(new c.j(new Error(`Cannot add layer "${d}" before non-existing layer "${a}".`)));
30578          else {
30579            if (this._order.splice(S, 0, d), this._layerOrderChanged = !0, this._layers[d] = y, this._removedLayers[d] && y.source && y.type !== "custom") {
30580              const C = this._removedLayers[d];
30581              delete this._removedLayers[d], C.type !== y.type ? this._updatedSources[y.source] = "clear" : (this._updatedSources[y.source] = "reload", this.sourceCaches[y.source].pause());
30582            }
30583            this._updateLayer(y), y.onAdd && y.onAdd(this.map);
30584          }
30585        }
30586        moveLayer(r, a) {
30587          if (this._checkLoaded(), this._changed = !0, !this._layers[r]) return void this.fire(new c.j(new Error(`The layer '${r}' does not exist in the map's style and cannot be moved.`)));
30588          if (r === a) return;
30589          const f = this._order.indexOf(r);
30590          this._order.splice(f, 1);
30591          const d = a ? this._order.indexOf(a) : this._order.length;
30592          a && d === -1 ? this.fire(new c.j(new Error(`Cannot move layer "${r}" before non-existing layer "${a}".`))) : (this._order.splice(d, 0, r), this._layerOrderChanged = !0);
30593        }
30594        removeLayer(r) {
30595          this._checkLoaded();
30596          const a = this._layers[r];
30597          if (!a) return void this.fire(new c.j(new Error(`Cannot remove non-existing layer "${r}".`)));
30598          a.setEventedParent(null);
30599          const f = this._order.indexOf(r);
30600          this._order.splice(f, 1), this._layerOrderChanged = !0, this._changed = !0, this._removedLayers[r] = a, delete this._layers[r], this._serializedLayers && delete this._serializedLayers[r], delete this._updatedLayers[r], delete this._updatedPaintProps[r], a.onRemove && a.onRemove(this.map);
30601        }
30602        getLayer(r) {
30603          return this._layers[r];
30604        }
30605        getLayersOrder() {
30606          return [...this._order];
30607        }
30608        hasLayer(r) {
30609          return r in this._layers;
30610        }
30611        setLayerZoomRange(r, a, f) {
30612          this._checkLoaded();
30613          const d = this.getLayer(r);
30614          d ? d.minzoom === a && d.maxzoom === f || (a != null && (d.minzoom = a), f != null && (d.maxzoom = f), this._updateLayer(d)) : this.fire(new c.j(new Error(`Cannot set the zoom range of non-existing layer "${r}".`)));
30615        }
30616        setFilter(r, a, f = {}) {
30617          this._checkLoaded();
30618          const d = this.getLayer(r);
30619          if (d) {
30620            if (!c.aE(d.filter, a)) return a == null ? (d.filter = void 0, void this._updateLayer(d)) : void (this._validate(c.u.filter, `layers.${d.id}.filter`, a, null, f) || (d.filter = c.aB(a), this._updateLayer(d)));
30621          } else this.fire(new c.j(new Error(`Cannot filter non-existing layer "${r}".`)));
30622        }
30623        getFilter(r) {
30624          return c.aB(this.getLayer(r).filter);
30625        }
30626        setLayoutProperty(r, a, f, d = {}) {
30627          this._checkLoaded();
30628          const y = this.getLayer(r);
30629          y ? c.aE(y.getLayoutProperty(a), f) || (y.setLayoutProperty(a, f, d), this._updateLayer(y)) : this.fire(new c.j(new Error(`Cannot style non-existing layer "${r}".`)));
30630        }
30631        getLayoutProperty(r, a) {
30632          const f = this.getLayer(r);
30633          if (f) return f.getLayoutProperty(a);
30634          this.fire(new c.j(new Error(`Cannot get style of non-existing layer "${r}".`)));
30635        }
30636        setPaintProperty(r, a, f, d = {}) {
30637          this._checkLoaded();
30638          const y = this.getLayer(r);
30639          y ? c.aE(y.getPaintProperty(a), f) || (y.setPaintProperty(a, f, d) && this._updateLayer(y), this._changed = !0, this._updatedPaintProps[r] = !0, this._serializedLayers = null) : this.fire(new c.j(new Error(`Cannot style non-existing layer "${r}".`)));
30640        }
30641        getPaintProperty(r, a) {
30642          return this.getLayer(r).getPaintProperty(a);
30643        }
30644        setFeatureState(r, a) {
30645          this._checkLoaded();
30646          const f = r.source, d = r.sourceLayer, y = this.sourceCaches[f];
30647          if (y === void 0) return void this.fire(new c.j(new Error(`The source '${f}' does not exist in the map's style.`)));
30648          const S = y.getSource().type;
30649          S === "geojson" && d ? this.fire(new c.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))) : S !== "vector" || d ? (r.id === void 0 && this.fire(new c.j(new Error("The feature id parameter must be provided."))), y.setFeatureState(d, r.id, a)) : this.fire(new c.j(new Error("The sourceLayer parameter must be provided for vector source types.")));
30650        }
30651        removeFeatureState(r, a) {
30652          this._checkLoaded();
30653          const f = r.source, d = this.sourceCaches[f];
30654          if (d === void 0) return void this.fire(new c.j(new Error(`The source '${f}' does not exist in the map's style.`)));
30655          const y = d.getSource().type, S = y === "vector" ? r.sourceLayer : void 0;
30656          y !== "vector" || S ? a && typeof r.id != "string" && typeof r.id != "number" ? this.fire(new c.j(new Error("A feature id is required to remove its specific state property."))) : d.removeFeatureState(S, r.id, a) : this.fire(new c.j(new Error("The sourceLayer parameter must be provided for vector source types.")));
30657        }
30658        getFeatureState(r) {
30659          this._checkLoaded();
30660          const a = r.source, f = r.sourceLayer, d = this.sourceCaches[a];
30661          if (d !== void 0) return d.getSource().type !== "vector" || f ? (r.id === void 0 && this.fire(new c.j(new Error("The feature id parameter must be provided."))), d.getFeatureState(f, r.id)) : void this.fire(new c.j(new Error("The sourceLayer parameter must be provided for vector source types.")));
30662          this.fire(new c.j(new Error(`The source '${a}' does not exist in the map's style.`)));
30663        }
30664        getTransition() {
30665          return c.e({ duration: 300, delay: 0 }, this.stylesheet && this.stylesheet.transition);
30666        }
30667        serialize() {
30668          if (!this._loaded) return;
30669          const r = c.aF(this.sourceCaches, (y) => y.serialize()), a = this._serializeByIds(this._order, !0), f = this.map.getTerrain() || void 0, d = this.stylesheet;
30670          return c.aG({ version: d.version, name: d.name, metadata: d.metadata, light: d.light, sky: d.sky, center: d.center, zoom: d.zoom, bearing: d.bearing, pitch: d.pitch, sprite: d.sprite, glyphs: d.glyphs, transition: d.transition, sources: r, layers: a, terrain: f }, (y) => y !== void 0);
30671        }
30672        _updateLayer(r) {
30673          this._updatedLayers[r.id] = !0, r.source && !this._updatedSources[r.source] && this.sourceCaches[r.source].getSource().type !== "raster" && (this._updatedSources[r.source] = "reload", this.sourceCaches[r.source].pause()), this._serializedLayers = null, this._changed = !0;
30674        }
30675        _flattenAndSortRenderedFeatures(r) {
30676          const a = (S) => this._layers[S].type === "fill-extrusion", f = {}, d = [];
30677          for (let S = this._order.length - 1; S >= 0; S--) {
30678            const C = this._order[S];
30679            if (a(C)) {
30680              f[C] = S;
30681              for (const I of r) {
30682                const F = I[C];
30683                if (F) for (const N of F) d.push(N);
30684              }
30685            }
30686          }
30687          d.sort((S, C) => C.intersectionZ - S.intersectionZ);
30688          const y = [];
30689          for (let S = this._order.length - 1; S >= 0; S--) {
30690            const C = this._order[S];
30691            if (a(C)) for (let I = d.length - 1; I >= 0; I--) {
30692              const F = d[I].feature;
30693              if (f[F.layer.id] < S) break;
30694              y.push(F), d.pop();
30695            }
30696            else for (const I of r) {
30697              const F = I[C];
30698              if (F) for (const N of F) y.push(N.feature);
30699            }
30700          }
30701          return y;
30702        }
30703        queryRenderedFeatures(r, a, f) {
30704          a && a.filter && this._validate(c.u.filter, "queryRenderedFeatures.filter", a.filter, null, a);
30705          const d = {};
30706          if (a && a.layers) {
30707            if (!Array.isArray(a.layers)) return this.fire(new c.j(new Error("parameters.layers must be an Array."))), [];
30708            for (const C of a.layers) {
30709              const I = this._layers[C];
30710              if (!I) return this.fire(new c.j(new Error(`The layer '${C}' does not exist in the map's style and cannot be queried for features.`))), [];
30711              d[I.source] = !0;
30712            }
30713          }
30714          const y = [];
30715          a.availableImages = this._availableImages;
30716          const S = this._serializedAllLayers();
30717          for (const C in this.sourceCaches) a.layers && !d[C] || y.push(me(this.sourceCaches[C], this._layers, S, r, a, f));
30718          return this.placement && y.push(function(C, I, F, N, $, G, Q) {
30719            const te = {}, ae = G.queryRenderedSymbols(N), fe = [];
30720            for (const pe of Object.keys(ae).map(Number)) fe.push(Q[pe]);
30721            fe.sort(Ee);
30722            for (const pe of fe) {
30723              const _e = pe.featureIndex.lookupSymbolFeatures(ae[pe.bucketInstanceId], I, pe.bucketIndex, pe.sourceLayerIndex, $.filter, $.layers, $.availableImages, C);
30724              for (const se in _e) {
30725                const Te = te[se] = te[se] || [], Me = _e[se];
30726                Me.sort((Fe, Je) => {
30727                  const lt = pe.featureSortOrder;
30728                  if (lt) {
30729                    const vt = lt.indexOf(Fe.featureIndex);
30730                    return lt.indexOf(Je.featureIndex) - vt;
30731                  }
30732                  return Je.featureIndex - Fe.featureIndex;
30733                });
30734                for (const Fe of Me) Te.push(Fe);
30735              }
30736            }
30737            for (const pe in te) te[pe].forEach((_e) => {
30738              const se = _e.feature, Te = F[C[pe].source].getFeatureState(se.layer["source-layer"], se.id);
30739              se.source = se.layer.source, se.layer["source-layer"] && (se.sourceLayer = se.layer["source-layer"]), se.state = Te;
30740            });
30741            return te;
30742          }(this._layers, S, this.sourceCaches, r, a, this.placement.collisionIndex, this.placement.retainedQueryData)), this._flattenAndSortRenderedFeatures(y);
30743        }
30744        querySourceFeatures(r, a) {
30745          a && a.filter && this._validate(c.u.filter, "querySourceFeatures.filter", a.filter, null, a);
30746          const f = this.sourceCaches[r];
30747          return f ? function(d, y) {
30748            const S = d.getRenderableIds().map((F) => d.getTileByID(F)), C = [], I = {};
30749            for (let F = 0; F < S.length; F++) {
30750              const N = S[F], $ = N.tileID.canonical.key;
30751              I[$] || (I[$] = !0, N.querySourceFeatures(C, y));
30752            }
30753            return C;
30754          }(f, a) : [];
30755        }
30756        getLight() {
30757          return this.light.getLight();
30758        }
30759        setLight(r, a = {}) {
30760          this._checkLoaded();
30761          const f = this.light.getLight();
30762          let d = !1;
30763          for (const S in r) if (!c.aE(r[S], f[S])) {
30764            d = !0;
30765            break;
30766          }
30767          if (!d) return;
30768          const y = { now: R.now(), transition: c.e({ duration: 300, delay: 0 }, this.stylesheet.transition) };
30769          this.light.setLight(r, a), this.light.updateTransitions(y);
30770        }
30771        getSky() {
30772          var r;
30773          return (r = this.stylesheet) === null || r === void 0 ? void 0 : r.sky;
30774        }
30775        setSky(r, a = {}) {
30776          const f = this.getSky();
30777          let d = !1;
30778          if (!r && !f) return;
30779          if (r && !f) d = !0;
30780          else if (!r && f) d = !0;
30781          else for (const S in r) if (!c.aE(r[S], f[S])) {
30782            d = !0;
30783            break;
30784          }
30785          if (!d) return;
30786          const y = { now: R.now(), transition: c.e({ duration: 300, delay: 0 }, this.stylesheet.transition) };
30787          this.stylesheet.sky = r, this.sky.setSky(r, a), this.sky.updateTransitions(y);
30788        }
30789        _validate(r, a, f, d, y = {}) {
30790          return (!y || y.validate !== !1) && $i(this, r.call(c.u, c.e({ key: a, style: this.serialize(), value: f, styleSpec: c.v }, d)));
30791        }
30792        _remove(r = !0) {
30793          this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this._loadStyleRequest && (this._loadStyleRequest.abort(), this._loadStyleRequest = null), this._spriteRequest && (this._spriteRequest.abort(), this._spriteRequest = null), Cr().off(We, this._rtlPluginLoaded);
30794          for (const a in this._layers) this._layers[a].setEventedParent(null);
30795          for (const a in this.sourceCaches) {
30796            const f = this.sourceCaches[a];
30797            f.setEventedParent(null), f.onRemove(this.map);
30798          }
30799          this.imageManager.setEventedParent(null), this.setEventedParent(null), r && this.dispatcher.broadcast("RM", void 0), this.dispatcher.remove(r);
30800        }
30801        _clearSource(r) {
30802          this.sourceCaches[r].clearTiles();
30803        }
30804        _reloadSource(r) {
30805          this.sourceCaches[r].resume(), this.sourceCaches[r].reload();
30806        }
30807        _updateSources(r) {
30808          for (const a in this.sourceCaches) this.sourceCaches[a].update(r, this.map.terrain);
30809        }
30810        _generateCollisionBoxes() {
30811          for (const r in this.sourceCaches) this._reloadSource(r);
30812        }
30813        _updatePlacement(r, a, f, d, y = !1) {
30814          let S = !1, C = !1;
30815          const I = {};
30816          for (const F of this._order) {
30817            const N = this._layers[F];
30818            if (N.type !== "symbol") continue;
30819            if (!I[N.source]) {
30820              const G = this.sourceCaches[N.source];
30821              I[N.source] = G.getRenderableIds(!0).map((Q) => G.getTileByID(Q)).sort((Q, te) => te.tileID.overscaledZ - Q.tileID.overscaledZ || (Q.tileID.isLessThan(te.tileID) ? -1 : 1));
30822            }
30823            const $ = this.crossTileSymbolIndex.addLayer(N, I[N.source], r.center.lng);
30824            S = S || $;
30825          }
30826          if (this.crossTileSymbolIndex.pruneUnusedLayers(this._order), ((y = y || this._layerOrderChanged || f === 0) || !this.pauseablePlacement || this.pauseablePlacement.isDone() && !this.placement.stillRecent(R.now(), r.zoom)) && (this.pauseablePlacement = new Xo(r, this.map.terrain, this._order, y, a, f, d, this.placement), this._layerOrderChanged = !1), this.pauseablePlacement.isDone() ? this.placement.setStale() : (this.pauseablePlacement.continuePlacement(this._order, this._layers, I), this.pauseablePlacement.isDone() && (this.placement = this.pauseablePlacement.commit(R.now()), C = !0), S && this.pauseablePlacement.placement.setStale()), C || S) for (const F of this._order) {
30827            const N = this._layers[F];
30828            N.type === "symbol" && this.placement.updateLayerOpacities(N, I[N.source]);
30829          }
30830          return !this.pauseablePlacement.isDone() || this.placement.hasTransitions(R.now());
30831        }
30832        _releaseSymbolFadeTiles() {
30833          for (const r in this.sourceCaches) this.sourceCaches[r].releaseSymbolFadeTiles();
30834        }
30835        getImages(r, a) {
30836          return c._(this, void 0, void 0, function* () {
30837            const f = yield this.imageManager.getImages(a.icons);
30838            this._updateTilesForChangedImages();
30839            const d = this.sourceCaches[a.source];
30840            return d && d.setDependencies(a.tileID.key, a.type, a.icons), f;
30841          });
30842        }
30843        getGlyphs(r, a) {
30844          return c._(this, void 0, void 0, function* () {
30845            const f = yield this.glyphManager.getGlyphs(a.stacks), d = this.sourceCaches[a.source];
30846            return d && d.setDependencies(a.tileID.key, a.type, [""]), f;
30847          });
30848        }
30849        getGlyphsUrl() {
30850          return this.stylesheet.glyphs || null;
30851        }
30852        setGlyphs(r, a = {}) {
30853          this._checkLoaded(), r && this._validate(c.u.glyphs, "glyphs", r, null, a) || (this._glyphsDidChange = !0, this.stylesheet.glyphs = r, this.glyphManager.entries = {}, this.glyphManager.setURL(r));
30854        }
30855        addSprite(r, a, f = {}, d) {
30856          this._checkLoaded();
30857          const y = [{ id: r, url: a }], S = [...Oe(this.stylesheet.sprite), ...y];
30858          this._validate(c.u.sprite, "sprite", S, null, f) || (this.stylesheet.sprite = S, this._loadSprite(y, !0, d));
30859        }
30860        removeSprite(r) {
30861          this._checkLoaded();
30862          const a = Oe(this.stylesheet.sprite);
30863          if (a.find((f) => f.id === r)) {
30864            if (this._spritesImagesIds[r]) for (const f of this._spritesImagesIds[r]) this.imageManager.removeImage(f), this._changedImages[f] = !0;
30865            a.splice(a.findIndex((f) => f.id === r), 1), this.stylesheet.sprite = a.length > 0 ? a : void 0, delete this._spritesImagesIds[r], this._availableImages = this.imageManager.listImages(), this._changed = !0, this.dispatcher.broadcast("SI", this._availableImages), this.fire(new c.k("data", { dataType: "style" }));
30866          } else this.fire(new c.j(new Error(`Sprite "${r}" doesn't exists on this map.`)));
30867        }
30868        getSprite() {
30869          return Oe(this.stylesheet.sprite);
30870        }
30871        setSprite(r, a = {}, f) {
30872          this._checkLoaded(), r && this._validate(c.u.sprite, "sprite", r, null, a) || (this.stylesheet.sprite = r, r ? this._loadSprite(r, !0, f) : (this._unloadSprite(), f && f(null)));
30873        }
30874      }
30875      var Co = c.Y([{ name: "a_pos", type: "Int16", components: 2 }]);
30876      const io = { prelude: wr(`#ifdef GL_ES
30877precision mediump float;
30878#else
30879#if !defined(lowp)
30880#define lowp
30881#endif
30882#if !defined(mediump)
30883#define mediump
30884#endif
30885#if !defined(highp)
30886#define highp
30887#endif
30888#endif
30889`, `#ifdef GL_ES
30890precision highp float;
30891#else
30892#if !defined(lowp)
30893#define lowp
30894#endif
30895#if !defined(mediump)
30896#define mediump
30897#endif
30898#if !defined(highp)
30899#define highp
30900#endif
30901#endif
30902vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0
30903);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}
30904#ifdef TERRAIN3D
30905uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth;
30906#endif
30907const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) {
30908#ifdef TERRAIN3D
30909highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0));
30910#else
30911return 1.0;
30912#endif
30913}float calculate_visibility(vec4 pos) {
30914#ifdef TERRAIN3D
30915vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0;
30916#else
30917return 1.0;
30918#endif
30919}float ele(vec2 pos) {
30920#ifdef TERRAIN3D
30921vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a;
30922#else
30923return 0.0;
30924#endif
30925}float get_elevation(vec2 pos) {
30926#ifdef TERRAIN3D
30927vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration;
30928#else
30929return 0.0;
30930#endif
30931}`), background: wr(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;
30932#ifdef OVERDRAW_INSPECTOR
30933gl_FragColor=vec4(1.0);
30934#endif
30935}`, "attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"), backgroundPattern: wr(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;
30935uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;
30936#ifdef OVERDRAW_INSPECTOR
30937gl_FragColor=vec4(1.0);
30938#endif
30939}`, "uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"), circle: wr(`varying vec3 v_data;varying float v_visibility;
30940#pragma mapbox: define highp vec4 color
30941#pragma mapbox: define mediump float radius
30942#pragma mapbox: define lowp float blur
30943#pragma mapbox: define lowp float opacity
30944#pragma mapbox: define highp vec4 stroke_color
30945#pragma mapbox: define mediump float stroke_width
30946#pragma mapbox: define lowp float stroke_opacity
30947void main() {
30948#pragma mapbox: initialize highp vec4 color
30949#pragma mapbox: initialize mediump float radius
30950#pragma mapbox: initialize lowp float blur
30951#pragma mapbox: initialize lowp float opacity
30952#pragma mapbox: initialize highp vec4 stroke_color
30953#pragma mapbox: initialize mediump float stroke_width
30954#pragma mapbox: initialize lowp float stroke_opacity
30955vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);
30956#ifdef OVERDRAW_INSPECTOR
30957gl_FragColor=vec4(1.0);
30958#endif
30959}`, `uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility;
30960#pragma mapbox: define highp vec4 color
30961#pragma mapbox: define mediump float radius
30962#pragma mapbox: define lowp float blur
30963#pragma mapbox: define lowp float opacity
30964#pragma mapbox: define highp vec4 stroke_color
30965#pragma mapbox: define mediump float stroke_width
30966#pragma mapbox: define lowp float stroke_opacity
30967void main(void) {
30968#pragma mapbox: initialize highp vec4 color
30969#pragma mapbox: initialize mediump float radius
30970#pragma mapbox: initialize lowp float blur
30971#pragma mapbox: initialize lowp float opacity
30972#pragma mapbox: initialize highp vec4 stroke_color
30973#pragma mapbox: initialize mediump float stroke_width
30974#pragma mapbox: initialize lowp float stroke_opacity
30975vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`), clippingMask: wr("void main() {gl_FragColor=vec4(1.0);}", "attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"), heatmap: wr(`uniform highp float u_intensity;varying vec2 v_extrude;
30976#pragma mapbox: define highp float weight
30977#define GAUSS_COEF 0.3989422804014327
30978void main() {
30979#pragma mapbox: initialize highp float weight
30980float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);
30981#ifdef OVERDRAW_INSPECTOR
30982gl_FragColor=vec4(1.0);
30983#endif
30984}`, `uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;
30985#pragma mapbox: define highp float weight
30986#pragma mapbox: define mediump float radius
30987const highp float ZERO=1.0/255.0/16.0;
30988#define GAUSS_COEF 0.3989422804014327
30989void main(void) {
30990#pragma mapbox: initialize highp float weight
30991#pragma mapbox: initialize mediump float radius
30992vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`), heatmapTexture: wr(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;
30993#ifdef OVERDRAW_INSPECTOR
30994gl_FragColor=vec4(0.0);
30995#endif
30996}`, "uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"), collisionBox: wr("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}", "attribute vec2 a_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"), collisionCircle: wr("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}", "attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"), debug: wr("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}", "attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"), fill: wr(`#pragma mapbox: define highp vec4 color
30997#pragma mapbox: define lowp float opacity
30998void main() {
30999#pragma mapbox: initialize highp vec4 color
31000#pragma mapbox: initialize lowp float opacity
31001gl_FragColor=color*opacity;
31002#ifdef OVERDRAW_INSPECTOR
31003gl_FragColor=vec4(1.0);
31004#endif
31005}`, `attribute vec2 a_pos;uniform mat4 u_matrix;
31006#pragma mapbox: define highp vec4 color
31007#pragma mapbox: define lowp float opacity
31008void main() {
31009#pragma mapbox: initialize highp vec4 color
31010#pragma mapbox: initialize lowp float opacity
31011gl_Position=u_matrix*vec4(a_pos,0,1);}`), fillOutline: wr(`varying vec2 v_pos;
31012#pragma mapbox: define highp vec4 outline_color
31013#pragma mapbox: define lowp float opacity
31014void main() {
31015#pragma mapbox: initialize highp vec4 outline_color
31016#pragma mapbox: initialize lowp float opacity
31017float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);
31018#ifdef OVERDRAW_INSPECTOR
31019gl_FragColor=vec4(1.0);
31020#endif
31021}`, `attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;
31022#pragma mapbox: define highp vec4 outline_color
31023#pragma mapbox: define lowp float opacity
31024void main() {
31025#pragma mapbox: initialize highp vec4 outline_color
31026#pragma mapbox: initialize lowp float opacity
31027gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`), fillOutlinePattern: wr(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
31028#pragma mapbox: define lowp float opacity
31029#pragma mapbox: define lowp vec4 pattern_from
31030#pragma mapbox: define lowp vec4 pattern_to
31031void main() {
31032#pragma mapbox: initialize lowp float opacity
31033#pragma mapbox: initialize mediump vec4 pattern_from
31034#pragma mapbox: initialize mediump vec4 pattern_to
31035vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;
31036#ifdef OVERDRAW_INSPECTOR
31037gl_FragColor=vec4(1.0);
31038#endif
31039}`, `uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;
31040#pragma mapbox: define lowp float opacity
31041#pragma mapbox: define lowp vec4 pattern_from
31042#pragma mapbox: define lowp vec4 pattern_to
31043#pragma mapbox: define lowp float pixel_ratio_from
31044#pragma mapbox: define lowp float pixel_ratio_to
31045void main() {
31046#pragma mapbox: initialize lowp float opacity
31047#pragma mapbox: initialize mediump vec4 pattern_from
31048#pragma mapbox: initialize mediump vec4 pattern_to
31049#pragma mapbox: initialize lowp float pixel_ratio_from
31050#pragma mapbox: initialize lowp float pixel_ratio_to
31051vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`), fillPattern: wr(`#ifdef GL_ES
31052precision highp float;
31053#endif
31054uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;
31055#pragma mapbox: define lowp float opacity
31056#pragma mapbox: define lowp vec4 pattern_from
31057#pragma mapbox: define lowp vec4 pattern_to
31058void main() {
31059#pragma mapbox: initialize lowp float opacity
31060#pragma mapbox: initialize mediump vec4 pattern_from
31061#pragma mapbox: initialize mediump vec4 pattern_to
31062vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;
31063#ifdef OVERDRAW_INSPECTOR
31064gl_FragColor=vec4(1.0);
31065#endif
31066}`, `uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;
31067#pragma mapbox: define lowp float opacity
31068#pragma mapbox: define lowp vec4 pattern_from
31069#pragma mapbox: define lowp vec4 pattern_to
31070#pragma mapbox: define lowp float pixel_ratio_from
31071#pragma mapbox: define lowp float pixel_ratio_to
31072void main() {
31073#pragma mapbox: initialize lowp float opacity
31074#pragma mapbox: initialize mediump vec4 pattern_from
31075#pragma mapbox: initialize mediump vec4 pattern_to
31076#pragma mapbox: initialize lowp float pixel_ratio_from
31077#pragma mapbox: initialize lowp float pixel_ratio_to
31078vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`), fillExtrusion: wr(`varying vec4 v_color;void main() {gl_FragColor=v_color;
31079#ifdef OVERDRAW_INSPECTOR
31080gl_FragColor=vec4(1.0);
31081#endif
31082}`, `uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;
31083#ifdef TERRAIN3D
31084attribute vec2 a_centroid;
31085#endif
31086varying vec4 v_color;
31087#pragma mapbox: define highp float base
31088#pragma mapbox: define highp float height
31089#pragma mapbox: define highp vec4 color
31090void main() {
31091#pragma mapbox: initialize highp float base
31092#pragma mapbox: initialize highp float height
31093#pragma mapbox: initialize highp vec4 color
31094vec3 normal=a_normal_ed.xyz;
31095#ifdef TERRAIN3D
31096float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
31097#else
31098float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
31099#endif
31100base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientligh
31100t;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}`), fillExtrusionPattern: wr(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
31101#pragma mapbox: define lowp float base
31102#pragma mapbox: define lowp float height
31103#pragma mapbox: define lowp vec4 pattern_from
31104#pragma mapbox: define lowp vec4 pattern_to
31105#pragma mapbox: define lowp float pixel_ratio_from
31106#pragma mapbox: define lowp float pixel_ratio_to
31107void main() {
31108#pragma mapbox: initialize lowp float base
31109#pragma mapbox: initialize lowp float height
31110#pragma mapbox: initialize mediump vec4 pattern_from
31111#pragma mapbox: initialize mediump vec4 pattern_to
31112#pragma mapbox: initialize lowp float pixel_ratio_from
31113#pragma mapbox: initialize lowp float pixel_ratio_to
31114vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;
31115#ifdef OVERDRAW_INSPECTOR
31116gl_FragColor=vec4(1.0);
31117#endif
31118}`, `uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;
31119#ifdef TERRAIN3D
31120attribute vec2 a_centroid;
31121#endif
31122varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;
31123#pragma mapbox: define lowp float base
31124#pragma mapbox: define lowp float height
31125#pragma mapbox: define lowp vec4 pattern_from
31126#pragma mapbox: define lowp vec4 pattern_to
31127#pragma mapbox: define lowp float pixel_ratio_from
31128#pragma mapbox: define lowp float pixel_ratio_to
31129void main() {
31130#pragma mapbox: initialize lowp float base
31131#pragma mapbox: initialize lowp float height
31132#pragma mapbox: initialize mediump vec4 pattern_from
31133#pragma mapbox: initialize mediump vec4 pattern_to
31134#pragma mapbox: initialize lowp float pixel_ratio_from
31135#pragma mapbox: initialize lowp float pixel_ratio_to
31136vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;
31137#ifdef TERRAIN3D
31138float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0);
31139#else
31140float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0;
31141#endif
31142base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0
31143? a_pos
31144: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}`), hillshadePrepare: wr(`#ifdef GL_ES
31145precision highp float;
31146#endif
31147uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,exaggeration+(19.2562-u_zoom));gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);
31148#ifdef OVERDRAW_INSPECTOR
31149gl_FragColor=vec4(1.0);
31150#endif
31151}`, "uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"), hillshade: wr(`uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;
31152#define PI 3.141592653589793
31153void main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;
31153float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;
31154#ifdef OVERDRAW_INSPECTOR
31155gl_FragColor=vec4(1.0);
31156#endif
31157}`, "uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"), line: wr(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;
31158#pragma mapbox: define highp vec4 color
31159#pragma mapbox: define lowp float blur
31160#pragma mapbox: define lowp float opacity
31161void main() {
31162#pragma mapbox: initialize highp vec4 color
31163#pragma mapbox: initialize lowp float blur
31164#pragma mapbox: initialize lowp float opacity
31165float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);
31166#ifdef OVERDRAW_INSPECTOR
31167gl_FragColor=vec4(1.0);
31168#endif
31169}`, `
31170#define scale 0.015873016
31171attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;
31172#pragma mapbox: define highp vec4 color
31173#pragma mapbox: define lowp float blur
31174#pragma mapbox: define lowp float opacity
31175#pragma mapbox: define mediump float gapwidth
31176#pragma mapbox: define lowp float offset
31177#pragma mapbox: define mediump float width
31178void main() {
31179#pragma mapbox: initialize highp vec4 color
31180#pragma mapbox: initialize lowp float blur
31181#pragma mapbox: initialize lowp float opacity
31182#pragma mapbox: initialize mediump float gapwidth
31183#pragma mapbox: initialize lowp float offset
31184#pragma mapbox: initialize mediump float width
31185float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
31186#ifdef TERRAIN3D
31187v_gamma_scale=1.0;
31188#else
31189float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
31190#endif
31191v_width2=vec2(outset,inset);}`), lineGradient: wr(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp vec2 v_uv;
31192#pragma mapbox: define lowp float blur
31193#pragma mapbox: define lowp float opacity
31194void main() {
31195#pragma mapbox: initialize lowp float blur
31196#pragma mapbox: initialize lowp float opacity
31197float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity);
31198#ifdef OVERDRAW_INSPECTOR
31199gl_FragColor=vec4(1.0);
31200#endif
31201}`, `
31202#define scale 0.015873016
31203attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv;
31204#pragma mapbox: define lowp float blur
31205#pragma mapbox: define lowp float opacity
31206#pragma mapbox: define mediump float gapwidth
31207#pragma mapbox: define lowp float offset
31208#pragma mapbox: define mediump float width
31209void main() {
31210#pragma mapbox: initialize lowp float blur
31211#pragma mapbox: initialize lowp float opacity
31212#pragma mapbox: initialize mediump float gapwidth
31213#pragma mapbox: initialize lowp float offset
31214#pragma mapbox: initialize mediump float width
31215float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
31216#ifdef TERRAIN3D
31217v_gamma_scale=1.0;
31218#else
31219float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
31220#endif
31221v_width2=vec2(outset,inset);}`), linePattern: wr(`#ifdef GL_ES
31222precision highp float;
31223#endif
31224uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
31225#pragma mapbox: define lowp vec4 pattern_from
31226#pragma mapbox: define lowp vec4 pattern_to
31227#pragma mapbox: define lowp float pixel_ratio_from
31228#pragma mapbox: define lowp float pixel_ratio_to
31229#pragma mapbox: define lowp float blur
31230#pragma mapbox: define lowp float opacity
31231void main() {
31232#pragma mapbox: initialize mediump vec4 pattern_from
31233#pragma mapbox: initialize mediump vec4 pattern_to
31234#pragma mapbox: initialize lowp float pixel_ratio_from
31235#pragma mapbox: initialize lowp float pixel_ratio_to
31236#pragma mapbox: initialize lowp float blur
31237#pragma mapbox: initialize lowp float opacity
31238vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;
31239#ifdef OVERDRAW_INSPECTOR
31240gl_FragColor=vec4(1.0);
31241#endif
31242}`, `
31243#define scale 0.015873016
31244#define LINE_DISTANCE_SCALE 2.0
31245attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;
31246#pragma mapbox: define lowp float blur
31247#pragma mapbox: define lowp float opacity
31248#pragma mapbox: define lowp float offset
31249#pragma mapbox: define mediump float gapwidth
31250#pragma mapbox: define mediump float width
31251#pragma mapbox: define lowp float floorwidth
31252#pragma mapbox: define lowp vec4 pattern_from
31253#pragma mapbox: define lowp vec4 pattern_to
31254#pragma mapbox: define lowp float pixel_ratio_from
31255#pragma mapbox: define lowp float pixel_ratio_to
31256void main() {
31257#pragma mapbox: initialize lowp float blur
31258#pragma mapbox: initialize lowp float opacity
31259#pragma mapbox: initialize lowp float offset
31260#pragma mapbox: initialize mediump float gapwidth
31261#pragma mapbox: initialize mediump float width
31262#pragma mapbox: initialize lowp float floorwidth
31263#pragma mapbox: initialize mediump vec4 pattern_from
31264#pragma mapbox: initialize mediump vec4 pattern_to
31265#pragma mapbox: initialize lowp float pixel_ratio_from
31266#pragma mapbox: initialize lowp float pixel_ratio_to
31267float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
31268#ifdef TERRAIN3D
31269v_gamma_scale=1.0;
31270#else
31271float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
31272#endif
31273v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`), lineSDF: wr(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;
31273uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
31274#pragma mapbox: define highp vec4 color
31275#pragma mapbox: define lowp float blur
31276#pragma mapbox: define lowp float opacity
31277#pragma mapbox: define mediump float width
31278#pragma mapbox: define lowp float floorwidth
31279void main() {
31280#pragma mapbox: initialize highp vec4 color
31281#pragma mapbox: initialize lowp float blur
31282#pragma mapbox: initialize lowp float opacity
31283#pragma mapbox: initialize mediump float width
31284#pragma mapbox: initialize lowp float floorwidth
31285float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);
31286#ifdef OVERDRAW_INSPECTOR
31287gl_FragColor=vec4(1.0);
31288#endif
31289}`, `
31290#define scale 0.015873016
31291#define LINE_DISTANCE_SCALE 2.0
31292attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;
31293#pragma mapbox: define highp vec4 color
31294#pragma mapbox: define lowp float blur
31295#pragma mapbox: define lowp float opacity
31296#pragma mapbox: define mediump float gapwidth
31297#pragma mapbox: define lowp float offset
31298#pragma mapbox: define mediump float width
31299#pragma mapbox: define lowp float floorwidth
31300void main() {
31301#pragma mapbox: initialize highp vec4 color
31302#pragma mapbox: initialize lowp float blur
31303#pragma mapbox: initialize lowp float opacity
31304#pragma mapbox: initialize mediump float gapwidth
31305#pragma mapbox: initialize lowp float offset
31306#pragma mapbox: initialize mediump float width
31307#pragma mapbox: initialize lowp float floorwidth
31308float ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;
31309#ifdef TERRAIN3D
31310v_gamma_scale=1.0;
31311#else
31312float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;
31313#endif
31314v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}`), raster: wr(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);
31315#ifdef OVERDRAW_INSPECTOR
31316gl_FragColor=vec4(1.0);
31317#endif
31318}`, "uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"), symbolIcon: wr(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;
31319#pragma mapbox: define lowp float opacity
31320void main() {
31321#pragma mapbox: initialize lowp float opacity
31322lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;
31323#ifdef OVERDRAW_INSPECTOR
31324gl_FragColor=vec4(1.0);
31325#endif
31326}`, `attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}
31327#pragma mapbox: define lowp float opacity
31328void main() {
31329#pragma mapbox: initialize lowp float opacity
31330vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
31331camera_to_anchor_distance/u_camera_to_center_distance :
31332u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`), symbolSDF: wr(`#define SDF_PX 8.0
31333uniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;
31334#pragma mapbox: define highp vec4 fill_color
31335#pragma mapbox: define highp vec4 halo_color
31336#pragma mapbox: define lowp float opacity
31337#pragma mapbox: define lowp float halo_width
31338#pragma mapbox: define lowp float halo_blur
31339void main() {
31340#pragma mapbox: initialize highp vec4 fill_color
31341#pragma mapbox: initialize highp vec4 halo_color
31342#pragma mapbox: initialize lowp float opacity
31343#pragma mapbox: initialize lowp float halo_width
31344#pragma mapbox: initialize lowp float halo_blur
31345float EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity);
31346#ifdef OVERDRAW_INSPECTOR
31347gl_FragColor=vec4(1.0);
31348#endif
31349}`, `attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}
31350#pragma mapbox: define highp vec4 fill_color
31351#pragma mapbox: define highp vec4 halo_color
31352#pragma mapbox: define lowp float opacity
31353#pragma mapbox: define lowp float halo_width
31354#pragma mapbox: define lowp float halo_blur
31355void main() {
31356#pragma mapbox: initialize highp vec4 fill_color
31357#pragma mapbox: initialize highp vec4 halo_color
31358#pragma mapbox: initialize lowp float opacity
31359#pragma mapbox: initialize lowp float halo_width
31360#pragma mapbox: initialize lowp float halo_blur
31361vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
31362camera_to_anchor_distance/u_camera_to_center_distance :
31363u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`), symbolTextAndIcon: wr(`#define SDF_PX 8.0
31364#define SDF 1.0
31365#define ICON 0.0
31366uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;
31367#pragma mapbox: define highp vec4 fill_color
31368#pragma mapbox: define highp vec4 halo_color
31369#pragma mapbox: define lowp float opacity
31370#pragma mapbox: define lowp float halo_width
31371#pragma mapbox: define lowp float halo_blur
31372void main() {
31373#pragma mapbox: initialize highp vec4 fill_color
31374#pragma mapbox: initialize highp vec4 halo_color
31375#pragma mapbox: initialize lowp float opacity
31376#pragma mapbox: initialize lowp float halo_width
31377#pragma mapbox: initialize lowp float halo_blur
31378float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;
31378gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;
31379#ifdef OVERDRAW_INSPECTOR
31380gl_FragColor=vec4(1.0);
31381#endif
31382return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);
31383#ifdef OVERDRAW_INSPECTOR
31384gl_FragColor=vec4(1.0);
31385#endif
31386}`, `attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}
31387#pragma mapbox: define highp vec4 fill_color
31388#pragma mapbox: define highp vec4 halo_color
31389#pragma mapbox: define lowp float opacity
31390#pragma mapbox: define lowp float halo_width
31391#pragma mapbox: define lowp float halo_blur
31392void main() {
31393#pragma mapbox: initialize highp vec4 fill_color
31394#pragma mapbox: initialize highp vec4 halo_color
31395#pragma mapbox: initialize lowp float opacity
31396#pragma mapbox: initialize lowp float halo_width
31397#pragma mapbox: initialize lowp float halo_blur
31398vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?
31399camera_to_anchor_distance/u_camera_to_center_distance :
31400u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`), terrain: wr("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);
31400float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}", "attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"), terrainDepth: wr("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}", "attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"), terrainCoords: wr("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}", "attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"), sky: wr("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}", "attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}") };
31401      function wr(_, r) {
31402        const a = /#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g, f = r.match(/attribute ([\w]+) ([\w]+)/g), d = _.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), y = r.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g), S = y ? y.concat(d) : d, C = {};
31403        return { fragmentSource: _ = _.replace(a, (I, F, N, $, G) => (C[G] = !0, F === "define" ? `
31404#ifndef HAS_UNIFORM_u_${G}
31405varying ${N} ${$} ${G};
31406#else
31407uniform ${N} ${$} u_${G};
31408#endif
31409` : `
31410#ifdef HAS_UNIFORM_u_${G}
31411    ${N} ${$} ${G} = u_${G};
31412#endif
31413`)), vertexSource: r = r.replace(a, (I, F, N, $, G) => {
31414          const Q = $ === "float" ? "vec2" : "vec4", te = G.match(/color/) ? "color" : Q;
31415          return C[G] ? F === "define" ? `
31416#ifndef HAS_UNIFORM_u_${G}
31417uniform lowp float u_${G}_t;
31418attribute ${N} ${Q} a_${G};
31419varying ${N} ${$} ${G};
31420#else
31421uniform ${N} ${$} u_${G};
31422#endif
31423` : te === "vec4" ? `
31424#ifndef HAS_UNIFORM_u_${G}
31425    ${G} = a_${G};
31426#else
31427    ${N} ${$} ${G} = u_${G};
31428#endif
31429` : `
31430#ifndef HAS_UNIFORM_u_${G}
31431    ${G} = unpack_mix_${te}(a_${G}, u_${G}_t);
31432#else
31433    ${N} ${$} ${G} = u_${G};
31434#endif
31435` : F === "define" ? `
31436#ifndef HAS_UNIFORM_u_${G}
31437uniform lowp float u_${G}_t;
31438attribute ${N} ${Q} a_${G};
31439#else
31440uniform ${N} ${$} u_${G};
31441#endif
31442` : te === "vec4" ? `
31443#ifndef HAS_UNIFORM_u_${G}
31444    ${N} ${$} ${G} = a_${G};
31445#else
31446    ${N} ${$} ${G} = u_${G};
31447#endif
31448` : `
31449#ifndef HAS_UNIFORM_u_${G}
31450    ${N} ${$} ${G} = unpack_mix_${te}(a_${G}, u_${G}_t);
31451#else
31452    ${N} ${$} ${G} = u_${G};
31453#endif
31454`;
31455        }), staticAttributes: f, staticUniforms: S };
31456      }
31457      class T {
31458        constructor() {
31459          this.boundProgram = null, this.boundLayoutVertexBuffer = null, this.boundPaintVertexBuffers = [], this.boundIndexBuffer = null, this.boundVertexOffset = null, this.boundDynamicVertexBuffer = null, this.vao = null;
31460        }
31461        bind(r, a, f, d, y, S, C, I, F) {
31462          this.context = r;
31463          let N = this.boundPaintVertexBuffers.length !== d.length;
31464          for (let $ = 0; !N && $ < d.length; $++) this.boundPaintVertexBuffers[$] !== d[$] && (N = !0);
31465          !this.vao || this.boundProgram !== a || this.boundLayoutVertexBuffer !== f || N || this.boundIndexBuffer !== y || this.boundVertexOffset !== S || this.boundDynamicVertexBuffer !== C || this.boundDynamicVertexBuffer2 !== I || this.boundDynamicVertexBuffer3 !== F ? this.freshBind(a, f, d, y, S, C, I, F) : (r.bindVertexArray.set(this.vao), C && C.bind(), y && y.dynamicDraw && y.bind(), I && I.bind(), F && F.bind());
31466        }
31467        freshBind(r, a, f, d, y, S, C, I) {
31468          const F = r.numAttributes, N = this.context, $ = N.gl;
31469          this.vao && this.destroy(), this.vao = N.createVertexArray(), N.bindVertexArray.set(this.vao), this.boundProgram = r, this.boundLayoutVertexBuffer = a, this.boundPaintVertexBuffers = f, this.boundIndexBuffer = d, this.boundVertexOffset = y, this.boundDynamicVertexBuffer = S, this.boundDynamicVertexBuffer2 = C, this.boundDynamicVertexBuffer3 = I, a.enableAttributes($, r);
31470          for (const G of f) G.enableAttributes($, r);
31471          S && S.enableAttributes($, r), C && C.enableAttributes($, r), I && I.enableAttributes($, r), a.bind(), a.setVertexAttribPointers($, r, y);
31472          for (const G of f) G.bind(), G.setVertexAttribPointers($, r, y);
31473          S && (S.bind(), S.setVertexAttribPointers($, r, y)), d && d.bind(), C && (C.bind(), C.setVertexAttribPointers($, r, y)), I && (I.bind(), I.setVertexAttribPointers($, r, y)), N.currentNumAttributes = F;
31474        }
31475        destroy() {
31476          this.vao && (this.context.deleteVertexArray(this.vao), this.vao = null);
31477        }
31478      }
31479      const D = (_, r, a, f, d) => ({ u_matrix: _, u_texture: 0, u_ele_delta: r, u_fog_matrix: a, u_fog_color: f ? f.properties.get("fog-color") : c.aM.white, u_fog_ground_blend: f ? f.properties.get("fog-ground-blend") : 1, u_fog_ground_blend_opacity: f ? f.calculateFogBlendOpacity(d) : 0, u_horizon_color: f ? f.properties.get("horizon-color") : c.aM.white, u_horizon_fog_blend: f ? f.properties.get("horizon-fog-blend") : 1 });
31480      function Z(_) {
31481        const r = [];
31482        for (let a = 0; a < _.length; a++) {
31483          if (_[a] === null) continue;
31484          const f = _[a].split(" ");
31485          r.push(f.pop());
31486        }
31487        return r;
31488      }
31489      class ce {
31490        constructor(r, a, f, d, y, S) {
31491          const C = r.gl;
31492          this.program = C.createProgram();
31493          const I = Z(a.staticAttributes), F = f ? f.getBinderAttributes() : [], N = I.concat(F), $ = io.prelude.staticUniforms ? Z(io.prelude.staticUniforms) : [], G = a.staticUniforms ? Z(a.staticUniforms) : [], Q = f ? f.getBinderUniforms() : [], te = $.concat(G).concat(Q), ae = [];
31494          for (const Fe of te) ae.indexOf(Fe) < 0 && ae.push(Fe);
31495          const fe = f ? f.defines() : [];
31496          y && fe.push("#define OVERDRAW_INSPECTOR;"), S && fe.push("#define TERRAIN3D;");
31497          const pe = fe.concat(io.prelude.fragmentSource, a.fragmentSource).join(`
31498`), _e = fe.concat(io.prelude.vertexSource, a.vertexSource).join(`
31499`), se = C.createShader(C.FRAGMENT_SHADER);
31500          if (C.isContextLost()) return void (this.failedToCreate = !0);
31501          if (C.shaderSource(se, pe), C.compileShader(se), !C.getShaderParameter(se, C.COMPILE_STATUS)) throw new Error(`Could not compile fragment shader: ${C.getShaderInfoLog(se)}`);
31502          C.attachShader(this.program, se);
31503          const Te = C.createShader(C.VERTEX_SHADER);
31504          if (C.isContextLost()) return void (this.failedToCreate = !0);
31505          if (C.shaderSource(Te, _e), C.compileShader(Te), !C.getShaderParameter(Te, C.COMPILE_STATUS)) throw new Error(`Could not compile vertex shader: ${C.getShaderInfoLog(Te)}`);
31506          C.attachShader(this.program, Te), this.attributes = {};
31507          const Me = {};
31508          this.numAttributes = N.length;
31509          for (let Fe = 0; Fe < this.numAttributes; Fe++) N[Fe] && (C.bindAttribLocation(this.program, Fe, N[Fe]), this.attributes[N[Fe]] = Fe);
31510          if (C.linkProgram(this.program), !C.getProgramParameter(this.program, C.LINK_STATUS)) throw new Error(`Program failed to link: ${C.getProgramInfoLog(this.program)}`);
vendor: 14,410 bytes, lines 31511-31617
31511          C.deleteShader(Te), C.deleteShader(se);
31512          for (let Fe = 0; Fe < ae.length; Fe++) {
31513            const Je = ae[Fe];
31514            if (Je && !Me[Je]) {
31515              const lt = C.getUniformLocation(this.program, Je);
31516              lt && (Me[Je] = lt);
31517            }
31518          }
31519          this.fixedUniforms = d(r, Me), this.terrainUniforms = ((Fe, Je) => ({ u_depth: new c.aH(Fe, Je.u_depth), u_terrain: new c.aH(Fe, Je.u_terrain), u_terrain_dim: new c.aI(Fe, Je.u_terrain_dim), u_terrain_matrix: new c.aJ(Fe, Je.u_terrain_matrix), u_terrain_unpack: new c.aK(Fe, Je.u_terrain_unpack), u_terrain_exaggeration: new c.aI(Fe, Je.u_terrain_exaggeration) }))(r, Me), this.binderUniforms = f ? f.getUniforms(r, Me) : [];
31520        }
31521        draw(r, a, f, d, y, S, C, I, F, N, $, G, Q, te, ae, fe, pe, _e) {
31522          const se = r.gl;
31523          if (this.failedToCreate) return;
31524          if (r.program.set(this.program), r.setDepthMode(f), r.setStencilMode(d), r.setColorMode(y), r.setCullFace(S), I) {
31525            r.activeTexture.set(se.TEXTURE2), se.bindTexture(se.TEXTURE_2D, I.depthTexture), r.activeTexture.set(se.TEXTURE3), se.bindTexture(se.TEXTURE_2D, I.texture);
31526            for (const Me in this.terrainUniforms) this.terrainUniforms[Me].set(I[Me]);
31527          }
31528          for (const Me in this.fixedUniforms) this.fixedUniforms[Me].set(C[Me]);
31529          ae && ae.setUniforms(r, this.binderUniforms, Q, { zoom: te });
31530          let Te = 0;
31531          switch (a) {
31532            case se.LINES:
31533              Te = 2;
31534              break;
31535            case se.TRIANGLES:
31536              Te = 3;
31537              break;
31538            case se.LINE_STRIP:
31539              Te = 1;
31540          }
31541          for (const Me of G.get()) {
31542            const Fe = Me.vaos || (Me.vaos = {});
31543            (Fe[F] || (Fe[F] = new T())).bind(r, this, N, ae ? ae.getPaintVertexBuffers() : [], $, Me.vertexOffset, fe, pe, _e), se.drawElements(a, Me.primitiveLength * Te, se.UNSIGNED_SHORT, Me.primitiveOffset * Te * 2);
31544          }
31545        }
31546      }
31547      function ve(_, r, a) {
31548        const f = 1 / gr(a, 1, r.transform.tileZoom), d = Math.pow(2, a.tileID.overscaledZ), y = a.tileSize * Math.pow(2, r.transform.tileZoom) / d, S = y * (a.tileID.canonical.x + a.tileID.wrap * d), C = y * a.tileID.canonical.y;
31549        return { u_image: 0, u_texsize: a.imageAtlasTexture.size, u_scale: [f, _.fromScale, _.toScale], u_fade: _.t, u_pixel_coord_upper: [S >> 16, C >> 16], u_pixel_coord_lower: [65535 & S, 65535 & C] };
31550      }
31551      const we = (_, r, a, f) => {
31552        const d = r.style.light, y = d.properties.get("position"), S = [y.x, y.y, y.z], C = function() {
31553          var F = new c.A(9);
31554          return c.A != Float32Array && (F[1] = 0, F[2] = 0, F[3] = 0, F[5] = 0, F[6] = 0, F[7] = 0), F[0] = 1, F[4] = 1, F[8] = 1, F;
31555        }();
31556        d.properties.get("anchor") === "viewport" && function(F, N) {
31557          var $ = Math.sin(N), G = Math.cos(N);
31558          F[0] = G, F[1] = $, F[2] = 0, F[3] = -$, F[4] = G, F[5] = 0, F[6] = 0, F[7] = 0, F[8] = 1;
31559        }(C, -r.transform.angle), function(F, N, $) {
31560          var G = N[0], Q = N[1], te = N[2];
31561          F[0] = G * $[0] + Q * $[3] + te * $[6], F[1] = G * $[1] + Q * $[4] + te * $[7], F[2] = G * $[2] + Q * $[5] + te * $[8];
31562        }(S, S, C);
31563        const I = d.properties.get("color");
31564        return { u_matrix: _, u_lightpos: S, u_lightintensity: d.properties.get("intensity"), u_lightcolor: [I.r, I.g, I.b], u_vertical_gradient: +a, u_opacity: f };
31565      }, Pe = (_, r, a, f, d, y, S) => c.e(we(_, r, a, f), ve(y, r, S), { u_height_factor: -Math.pow(2, d.overscaledZ) / S.tileSize / 8 }), tt = (_) => ({ u_matrix: _ }), ht = (_, r, a, f) => c.e(tt(_), ve(a, r, f)), wt = (_, r) => ({ u_matrix: _, u_world: r }), xt = (_, r, a, f, d) => c.e(ht(_, r, a, f), { u_world: d }), mt = (_, r, a, f) => {
31566        const d = _.transform;
31567        let y, S;
31568        if (f.paint.get("circle-pitch-alignment") === "map") {
31569          const C = gr(a, 1, d.zoom);
31570          y = !0, S = [C, C];
31571        } else y = !1, S = d.pixelsToGLUnits;
31572        return { u_camera_to_center_distance: d.cameraToCenterDistance, u_scale_with_map: +(f.paint.get("circle-pitch-scale") === "map"), u_matrix: _.translatePosMatrix(r.posMatrix, a, f.paint.get("circle-translate"), f.paint.get("circle-translate-anchor")), u_pitch_with_map: +y, u_device_pixel_ratio: _.pixelRatio, u_extrude_scale: S };
31573      }, Yt = (_, r, a) => ({ u_matrix: _, u_inv_matrix: r, u_camera_to_center_distance: a.cameraToCenterDistance, u_viewport_size: [a.width, a.height] }), Xr = (_, r, a = 1) => ({ u_matrix: _, u_color: r, u_overlay: 0, u_overlay_scale: a }), Zt = (_) => ({ u_matrix: _ }), kr = (_, r, a, f) => ({ u_matrix: _, u_extrude_scale: gr(r, 1, a), u_intensity: f }), Ye = (_, r, a, f) => {
31574        const d = c.H();
31575        c.aP(d, 0, _.width, _.height, 0, 0, 1);
31576        const y = _.context.gl;
31577        return { u_matrix: d, u_world: [y.drawingBufferWidth, y.drawingBufferHeight], u_image: a, u_color_ramp: f, u_opacity: r.paint.get("heatmap-opacity") };
31578      };
31579      function Rt(_, r) {
31580        const a = Math.pow(2, r.canonical.z), f = r.canonical.y;
31581        return [new c.Z(0, f / a).toLngLat().lat, new c.Z(0, (f + 1) / a).toLngLat().lat];
31582      }
31583      const Rr = (_, r, a, f) => {
31584        const d = _.transform;
31585        return { u_matrix: nn(_, r, a, f), u_ratio: 1 / gr(r, 1, d.zoom), u_device_pixel_ratio: _.pixelRatio, u_units_to_pixels: [1 / d.pixelsToGLUnits[0], 1 / d.pixelsToGLUnits[1]] };
31586      }, $n = (_, r, a, f, d) => c.e(Rr(_, r, a, d), { u_image: 0, u_image_height: f }), ln = (_, r, a, f, d) => {
31587        const y = _.transform, S = pu(r, y);
31588        return { u_matrix: nn(_, r, a, d), u_texsize: r.imageAtlasTexture.size, u_ratio: 1 / gr(r, 1, y.zoom), u_device_pixel_ratio: _.pixelRatio, u_image: 0, u_scale: [S, f.fromScale, f.toScale], u_fade: f.t, u_units_to_pixels: [1 / y.pixelsToGLUnits[0], 1 / y.pixelsToGLUnits[1]] };
31589      }, uc = (_, r, a, f, d, y) => {
31590        const S = _.lineAtlas, C = pu(r, _.transform), I = a.layout.get("line-cap") === "round", F = S.getDash(f.from, I), N = S.getDash(f.to, I), $ = F.width * d.fromScale, G = N.width * d.toScale;
31591        return c.e(Rr(_, r, a, y), { u_patternscale_a: [C / $, -F.height / 2], u_patternscale_b: [C / G, -N.height / 2], u_sdfgamma: S.width / (256 * Math.min($, G) * _.pixelRatio) / 2, u_image: 0, u_tex_y_a: F.y, u_tex_y_b: N.y, u_mix: d.t });
31592      };
31593      function pu(_, r) {
31594        return 1 / gr(_, 1, r.tileZoom);
31595      }
31596      function nn(_, r, a, f) {
31597        return _.translatePosMatrix(f ? f.posMatrix : r.tileID.posMatrix, r, a.paint.get("line-translate"), a.paint.get("line-translate-anchor"));
31598      }
31599      const mu = (_, r, a, f, d) => {
31600        return { u_matrix: _, u_tl_parent: r, u_scale_parent: a, u_buffer_scale: 1, u_fade_t: f.mix, u_opacity: f.opacity * d.paint.get("raster-opacity"), u_image0: 0, u_image1: 1, u_brightness_low: d.paint.get("raster-brightness-min"), u_brightness_high: d.paint.get("raster-brightness-max"), u_saturation_factor: (S = d.paint.get("raster-saturation"), S > 0 ? 1 - 1 / (1.001 - S) : -S), u_contrast_factor: (y = d.paint.get("raster-contrast"), y > 0 ? 1 / (1 - y) : 1 + y), u_spin_weights: Nh(d.paint.get("raster-hue-rotate")) };
31601        var y, S;
31602      };
31603      function Nh(_) {
31604        _ *= Math.PI / 180;
31605        const r = Math.sin(_), a = Math.cos(_);
31606        return [(2 * a + 1) / 3, (-Math.sqrt(3) * r - a + 1) / 3, (Math.sqrt(3) * r - a + 1) / 3];
31607      }
31608      const ms = (_, r, a, f, d, y, S, C, I, F, N, $, G, Q) => {
31609        const te = S.transform;
31610        return { u_is_size_zoom_constant: +(_ === "constant" || _ === "source"), u_is_size_feature_constant: +(_ === "constant" || _ === "camera"), u_size_t: r ? r.uSizeT : 0, u_size: r ? r.uSize : 0, u_camera_to_center_distance: te.cameraToCenterDistance, u_pitch: te.pitch / 360 * 2 * Math.PI, u_rotate_symbol: +a, u_aspect_ratio: te.width / te.height, u_fade_change: S.options.fadeDuration ? S.symbolFadeChange : 1, u_matrix: C, u_label_plane_matrix: I, u_coord_matrix: F, u_is_text: +$, u_pitch_with_map: +f, u_is_along_line: d, u_is_variable_anchor: y, u_texsize: G, u_texture: 0, u_translation: N, u_pitched_scale: Q };
31611      }, Jo = (_, r, a, f, d, y, S, C, I, F, N, $, G, Q, te) => {
31612        const ae = S.transform;
31613        return c.e(ms(_, r, a, f, d, y, S, C, I, F, N, $, G, te), { u_gamma_scale: f ? Math.cos(ae._pitch) * ae.cameraToCenterDistance : 1, u_device_pixel_ratio: S.pixelRatio, u_is_halo: 1 });
31614      }, cl = (_, r, a, f, d, y, S, C, I, F, N, $, G, Q) => c.e(Jo(_, r, a, f, d, y, S, C, I, F, N, !0, $, !0, Q), { u_texsize_icon: G, u_texture_icon: 1 }), Pa = (_, r, a) => ({ u_matrix: _, u_opacity: r, u_color: a }), Ma = (_, r, a, f, d, y) => c.e(function(S, C, I, F) {
31615        const N = I.imageManager.getPattern(S.from.toString()), $ = I.imageManager.getPattern(S.to.toString()), { width: G, height: Q } = I.imageManager.getPixelSize(), te = Math.pow(2, F.tileID.overscaledZ), ae = F.tileSize * Math.pow(2, I.transform.tileZoom) / te, fe = ae * (F.tileID.canonical.x + F.tileID.wrap * te), pe = ae * F.tileID.canonical.y;
31616        return { u_image: 0, u_pattern_tl_a: N.tl, u_pattern_br_a: N.br, u_pattern_tl_b: $.tl, u_pattern_br_b: $.br, u_texsize: [G, Q], u_mix: C.t, u_pattern_size_a: N.displaySize, u_pattern_size_b: $.displaySize, u_scale_a: C.fromScale, u_scale_b: C.toScale, u_tile_units_to_pixels: 1 / gr(F, 1, I.transform.tileZoom), u_pixel_coord_upper: [fe >> 16, pe >> 16], u_pixel_coord_lower: [65535 & fe, 65535 & pe] };
31617      }(f, y, a, d), { u_matrix: _, u_opacity: r }), ul = { fillExtrusion: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_lightpos: new c.aN(_, r.u_lightpos), u_lightintensity: new c.aI(_, r.u_lightintensity), u_lightcolor: new c.aN(_, r.u_lightcolor), u_vertical_gradient: new c.aI(_, r.u_vertical_gradient), u_opacity: new c.aI(_, r.u_opacity) }), fillExtrusionPattern: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_lightpos: new c.aN(_, r.u_lightpos), u_lightintensity: new c.aI(_, r.u_lightintensity), u_lightcolor: new c.aN(_, r.u_lightcolor), u_vertical_gradient: new c.aI(_, r.u_vertical_gradient), u_height_factor: new c.aI(_, r.u_height_factor), u_image: new c.aH(_, r.u_image), u_texsize: new c.aO(_, r.u_texsize), u_pixel_coord_upper: new c.aO(_, r.u_pixel_coord_upper), u_pixel_coord_lower: new c.aO(_, r.u_pixel_coord_lower), u_scale: new c.aN(_, r.u_scale), u_fade: new c.aI(_, r.u_fade), u_opacity: new c.aI(_, r.u_opacity) }), fill: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix) }), fillPattern: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_image: new c.aH(_, r.u_image), u_texsize: new c.aO(_, r.u_texsize), u_pixel_coord_upper: new c.aO(_, r.u_pixel_coord_upper), u_pixel_coord_lower: new c.aO(_, r.u_pixel_coord_lower), u_scale: new c.aN(_, r.u_scale), u_fade: new c.aI(_, r.u_fade) }), fillOutline: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_world: new c.aO(_, r.u_world) }), fillOutlinePattern: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_world: new c.aO(_, r.u_world), u_image: new c.aH(_, r.u_image), u_texsize: new c.aO(_, r.u_texsize), u_pixel_coord_upper: new c.aO(_, r.u_pixel_coord_upper), u_pixel_coord_lower: new c.aO(_, r.u_pixel_coord_lower), u_scale: new c.aN(_, r.u_scale), u_fade: new c.aI(_, r.u_fade) }), circle: (_, r) => ({ u_camera_to_center_distance: new c.aI(_, r.u_camera_to_center_distance), u_scale_with_map: new c.aH(_, r.u_scale_with_map), u_pitch_with_map: new c.aH(_, r.u_pitch_with_map), u_extrude_scale: new c.aO(_, r.u_extrude_scale), u_device_pixel_ratio: new c.aI(_, r.u_device_pixel_ratio), u_matrix: new c.aJ(_, r.u_matrix) }), collisionBox: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_pixel_extrude_scale: new c.aO(_, r.u_pixel_extrude_scale) }), collisionCircle: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_inv_matrix: new c.aJ(_, r.u_inv_matrix), u_camera_to_center_distance: new c.aI(_, r.u_camera_to_center_distance), u_viewport_size: new c.aO(_, r.u_viewport_size) }), debug: (_, r) => ({ u_color: new c.aL(_, r.u_color), u_matrix: new c.aJ(_, r.u_matrix), u_overlay: new c.aH(_, r.u_overlay), u_overlay_scale: new c.aI(_, r.u_overlay_scale) }), clippingMask: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix) }), heatmap: (_, r) => ({ u_extrude_scale: new c.aI(_, r.u_extrude_scale), u_intensity: new c.aI(_, r.u_intensity), u_matrix: new c.aJ(_, r.u_matrix) }), heatmapTexture: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_world: new c.aO(_, r.u_world), u_image: new c.aH(_, r.u_image), u_color_ramp: new c.aH(_, r.u_color_ramp), u_opacity: new c.aI(_, r.u_opacity) }), hillshade: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_image: new c.aH(_, r.u_image), u_latrange: new c.aO(_, r.u_latrange), u_light: new c.aO(_, r.u_light), u_shadow: new c.aL(_, r.u_shadow), u_highlight: new c.aL(_, r.u_highlight), u_accent: new c.aL(_, r.u_accent) }), hillshadePrepare: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_image: new c.aH(_, r.u_image), u_dimension: new c.aO(_, r.u_dimension), u_zoom: new c.aI(_, r.u_zoom), u_unpack: new c.aK(_, r.u_unpack) }), line: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_ratio: new c.aI(_, r.u_ratio), u_device_pixel_ratio: new c.aI(_, r.u_device_pixel_ratio), u_units_to_pixels: new c.aO(_, r.u_units_to_pixels) }), lineGradient: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_ratio: new c.aI(_, r.u_ratio), u_device_pixel_ratio: new c.aI(_, r.u_device_pixel_ratio), u_units_to_pixels: new c.aO(_, r.u_units_to_pixels), u_image: new c.aH(_, r.u_image), u_image_height: new c.aI(_, r.u_image_height) }), linePattern: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_texsize: new c.aO(_, r.u_texsize), u_ratio: new c.aI(_, r.u_ratio), u_device_pixel_ratio: new c.aI(_, r.u_device_pixel_ratio), u_image: new c.aH(_, r.u_image), u_units_to_pixels: new c.aO(_, r.u_units_to_pixels), u_scale: new c.aN(_, r.u_scale), u_fade: new c.aI(_, r.u_fade) }), lineSDF: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_ratio: new c.aI(_, r.u_ratio), u_device_pixel_ratio: new c.aI(_, r.u_device_pixel_ratio), u_units_to_pixels: new c.aO(_, r.u_units_to_pixels), u_patternscale_a: new c.aO(_, r.u_patternscale_a), u_patternscale_b: new c.aO(_, r.u_patternscale_b), u_sdfgamma: new c.aI(_, r.u_sdfgamma), u_image: new c.aH(_, r.u_image), u_tex_y_a: new c.aI(_, r.u_tex_y_a), u_tex_y_b: new c.aI(_, r.u_tex_y_b), u_mi
vendor: 27,887 bytes, lines 31617-32123
31617x: new c.aI(_, r.u_mix) }), raster: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_tl_parent: new c.aO(_, r.u_tl_parent), u_scale_parent: new c.aI(_, r.u_scale_parent), u_buffer_scale: new c.aI(_, r.u_buffer_scale), u_fade_t: new c.aI(_, r.u_fade_t), u_opacity: new c.aI(_, r.u_opacity), u_image0: new c.aH(_, r.u_image0), u_image1: new c.aH(_, r.u_image1), u_brightness_low: new c.aI(_, r.u_brightness_low), u_brightness_high: new c.aI(_, r.u_brightness_high), u_saturation_factor: new c.aI(_, r.u_saturation_factor), u_contrast_factor: new c.aI(_, r.u_contrast_factor), u_spin_weights: new c.aN(_, r.u_spin_weights) }), symbolIcon: (_, r) => ({ u_is_size_zoom_constant: new c.aH(_, r.u_is_size_zoom_constant), u_is_size_feature_constant: new c.aH(_, r.u_is_size_feature_constant), u_size_t: new c.aI(_, r.u_size_t), u_size: new c.aI(_, r.u_size), u_camera_to_center_distance: new c.aI(_, r.u_camera_to_center_distance), u_pitch: new c.aI(_, r.u_pitch), u_rotate_symbol: new c.aH(_, r.u_rotate_symbol), u_aspect_ratio: new c.aI(_, r.u_aspect_ratio), u_fade_change: new c.aI(_, r.u_fade_change), u_matrix: new c.aJ(_, r.u_matrix), u_label_plane_matrix: new c.aJ(_, r.u_label_plane_matrix), u_coord_matrix: new c.aJ(_, r.u_coord_matrix), u_is_text: new c.aH(_, r.u_is_text), u_pitch_with_map: new c.aH(_, r.u_pitch_with_map), u_is_along_line: new c.aH(_, r.u_is_along_line), u_is_variable_anchor: new c.aH(_, r.u_is_variable_anchor), u_texsize: new c.aO(_, r.u_texsize), u_texture: new c.aH(_, r.u_texture), u_translation: new c.aO(_, r.u_translation), u_pitched_scale: new c.aI(_, r.u_pitched_scale) }), symbolSDF: (_, r) => ({ u_is_size_zoom_constant: new c.aH(_, r.u_is_size_zoom_constant), u_is_size_feature_constant: new c.aH(_, r.u_is_size_feature_constant), u_size_t: new c.aI(_, r.u_size_t), u_size: new c.aI(_, r.u_size), u_camera_to_center_distance: new c.aI(_, r.u_camera_to_center_distance), u_pitch: new c.aI(_, r.u_pitch), u_rotate_symbol: new c.aH(_, r.u_rotate_symbol), u_aspect_ratio: new c.aI(_, r.u_aspect_ratio), u_fade_change: new c.aI(_, r.u_fade_change), u_matrix: new c.aJ(_, r.u_matrix), u_label_plane_matrix: new c.aJ(_, r.u_label_plane_matrix), u_coord_matrix: new c.aJ(_, r.u_coord_matrix), u_is_text: new c.aH(_, r.u_is_text), u_pitch_with_map: new c.aH(_, r.u_pitch_with_map), u_is_along_line: new c.aH(_, r.u_is_along_line), u_is_variable_anchor: new c.aH(_, r.u_is_variable_anchor), u_texsize: new c.aO(_, r.u_texsize), u_texture: new c.aH(_, r.u_texture), u_gamma_scale: new c.aI(_, r.u_gamma_scale), u_device_pixel_ratio: new c.aI(_, r.u_device_pixel_ratio), u_is_halo: new c.aH(_, r.u_is_halo), u_translation: new c.aO(_, r.u_translation), u_pitched_scale: new c.aI(_, r.u_pitched_scale) }), symbolTextAndIcon: (_, r) => ({ u_is_size_zoom_constant: new c.aH(_, r.u_is_size_zoom_constant), u_is_size_feature_constant: new c.aH(_, r.u_is_size_feature_constant), u_size_t: new c.aI(_, r.u_size_t), u_size: new c.aI(_, r.u_size), u_camera_to_center_distance: new c.aI(_, r.u_camera_to_center_distance), u_pitch: new c.aI(_, r.u_pitch), u_rotate_symbol: new c.aH(_, r.u_rotate_symbol), u_aspect_ratio: new c.aI(_, r.u_aspect_ratio), u_fade_change: new c.aI(_, r.u_fade_change), u_matrix: new c.aJ(_, r.u_matrix), u_label_plane_matrix: new c.aJ(_, r.u_label_plane_matrix), u_coord_matrix: new c.aJ(_, r.u_coord_matrix), u_is_text: new c.aH(_, r.u_is_text), u_pitch_with_map: new c.aH(_, r.u_pitch_with_map), u_is_along_line: new c.aH(_, r.u_is_along_line), u_is_variable_anchor: new c.aH(_, r.u_is_variable_anchor), u_texsize: new c.aO(_, r.u_texsize), u_texsize_icon: new c.aO(_, r.u_texsize_icon), u_texture: new c.aH(_, r.u_texture), u_texture_icon: new c.aH(_, r.u_texture_icon), u_gamma_scale: new c.aI(_, r.u_gamma_scale), u_device_pixel_ratio: new c.aI(_, r.u_device_pixel_ratio), u_is_halo: new c.aH(_, r.u_is_halo), u_translation: new c.aO(_, r.u_translation), u_pitched_scale: new c.aI(_, r.u_pitched_scale) }), background: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_opacity: new c.aI(_, r.u_opacity), u_color: new c.aL(_, r.u_color) }), backgroundPattern: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_opacity: new c.aI(_, r.u_opacity), u_image: new c.aH(_, r.u_image), u_pattern_tl_a: new c.aO(_, r.u_pattern_tl_a), u_pattern_br_a: new c.aO(_, r.u_pattern_br_a), u_pattern_tl_b: new c.aO(_, r.u_pattern_tl_b), u_pattern_br_b: new c.aO(_, r.u_pattern_br_b), u_texsize: new c.aO(_, r.u_texsize), u_mix: new c.aI(_, r.u_mix), u_pattern_size_a: new c.aO(_, r.u_pattern_size_a), u_pattern_size_b: new c.aO(_, r.u_pattern_size_b), u_scale_a: new c.aI(_, r.u_scale_a), u_scale_b: new c.aI(_, r.u_scale_b), u_pixel_coord_upper: new c.aO(_, r.u_pixel_coord_upper), u_pixel_coord_lower: new c.aO(_, r.u_pixel_coord_lower), u_tile_units_to_pixels: new c.aI(_, r.u_tile_units_to_pixels) }), terrain: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_texture: new c.aH(_, r.u_texture), u_ele_delta: new c.aI(_, r.u_ele_delta), u_fog_matrix: new c.aJ(_, r.u_fog_matrix), u_fog_color: new c.aL(_, r.u_fog_color), u_fog_ground_blend: new c.aI(_, r.u_fog_ground_blend), u_fog_ground_blend_opacity: new c.aI(_, r.u_fog_ground_blend_opacity), u_horizon_color: new c.aL(_, r.u_horizon_color), u_horizon_fog_blend: new c.aI(_, r.u_horizon_fog_blend) }), terrainDepth: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_ele_delta: new c.aI(_, r.u_ele_delta) }), terrainCoords: (_, r) => ({ u_matrix: new c.aJ(_, r.u_matrix), u_texture: new c.aH(_, r.u_texture), u_terrain_coords_id: new c.aI(_, r.u_terrain_coords_id), u_ele_delta: new c.aI(_, r.u_ele_delta) }), sky: (_, r) => ({ u_sky_color: new c.aL(_, r.u_sky_color), u_horizon_color: new c.aL(_, r.u_horizon_color), u_horizon: new c.aI(_, r.u_horizon), u_sky_horizon_blend: new c.aI(_, r.u_sky_horizon_blend) }) };
31618      class ns {
31619        constructor(r, a, f) {
31620          this.context = r;
31621          const d = r.gl;
31622          this.buffer = d.createBuffer(), this.dynamicDraw = !!f, this.context.unbindVAO(), r.bindElementBuffer.set(this.buffer), d.bufferData(d.ELEMENT_ARRAY_BUFFER, a.arrayBuffer, this.dynamicDraw ? d.DYNAMIC_DRAW : d.STATIC_DRAW), this.dynamicDraw || delete a.arrayBuffer;
31623        }
31624        bind() {
31625          this.context.bindElementBuffer.set(this.buffer);
31626        }
31627        updateData(r) {
31628          const a = this.context.gl;
31629          if (!this.dynamicDraw) throw new Error("Attempted to update data while not in dynamic mode.");
31630          this.context.unbindVAO(), this.bind(), a.bufferSubData(a.ELEMENT_ARRAY_BUFFER, 0, r.arrayBuffer);
31631        }
31632        destroy() {
31633          this.buffer && (this.context.gl.deleteBuffer(this.buffer), delete this.buffer);
31634        }
31635      }
31636      const $h = { Int8: "BYTE", Uint8: "UNSIGNED_BYTE", Int16: "SHORT", Uint16: "UNSIGNED_SHORT", Int32: "INT", Uint32: "UNSIGNED_INT", Float32: "FLOAT" };
31637      class hc {
31638        constructor(r, a, f, d) {
31639          this.length = a.length, this.attributes = f, this.itemSize = a.bytesPerElement, this.dynamicDraw = d, this.context = r;
31640          const y = r.gl;
31641          this.buffer = y.createBuffer(), r.bindVertexBuffer.set(this.buffer), y.bufferData(y.ARRAY_BUFFER, a.arrayBuffer, this.dynamicDraw ? y.DYNAMIC_DRAW : y.STATIC_DRAW), this.dynamicDraw || delete a.arrayBuffer;
31642        }
31643        bind() {
31644          this.context.bindVertexBuffer.set(this.buffer);
31645        }
31646        updateData(r) {
31647          if (r.length !== this.length) throw new Error(`Length of new data is ${r.length}, which doesn't match current length of ${this.length}`);
31648          const a = this.context.gl;
31649          this.bind(), a.bufferSubData(a.ARRAY_BUFFER, 0, r.arrayBuffer);
31650        }
31651        enableAttributes(r, a) {
31652          for (let f = 0; f < this.attributes.length; f++) {
31653            const d = a.attributes[this.attributes[f].name];
31654            d !== void 0 && r.enableVertexAttribArray(d);
31655          }
31656        }
31657        setVertexAttribPointers(r, a, f) {
31658          for (let d = 0; d < this.attributes.length; d++) {
31659            const y = this.attributes[d], S = a.attributes[y.name];
31660            S !== void 0 && r.vertexAttribPointer(S, y.components, r[$h[y.type]], !1, this.itemSize, y.offset + this.itemSize * (f || 0));
31661          }
31662        }
31663        destroy() {
31664          this.buffer && (this.context.gl.deleteBuffer(this.buffer), delete this.buffer);
31665        }
31666      }
31667      const Io = /* @__PURE__ */ new WeakMap();
31668      function Fs(_) {
31669        var r;
31670        if (Io.has(_)) return Io.get(_);
31671        {
31672          const a = (r = _.getParameter(_.VERSION)) === null || r === void 0 ? void 0 : r.startsWith("WebGL 2.0");
31673          return Io.set(_, a), a;
31674        }
31675      }
31676      class Or {
31677        constructor(r) {
31678          this.gl = r.gl, this.default = this.getDefault(), this.current = this.default, this.dirty = !1;
31679        }
31680        get() {
31681          return this.current;
31682        }
31683        set(r) {
31684        }
31685        getDefault() {
31686          return this.default;
31687        }
31688        setDefault() {
31689          this.set(this.default);
31690        }
31691      }
31692      class ka extends Or {
31693        getDefault() {
31694          return c.aM.transparent;
31695        }
31696        set(r) {
31697          const a = this.current;
31698          (r.r !== a.r || r.g !== a.g || r.b !== a.b || r.a !== a.a || this.dirty) && (this.gl.clearColor(r.r, r.g, r.b, r.a), this.current = r, this.dirty = !1);
31699        }
31700      }
31701      class jh extends Or {
31702        getDefault() {
31703          return 1;
31704        }
31705        set(r) {
31706          (r !== this.current || this.dirty) && (this.gl.clearDepth(r), this.current = r, this.dirty = !1);
31707        }
31708      }
31709      class Yo extends Or {
31710        getDefault() {
31711          return 0;
31712        }
31713        set(r) {
31714          (r !== this.current || this.dirty) && (this.gl.clearStencil(r), this.current = r, this.dirty = !1);
31715        }
31716      }
31717      class hl extends Or {
31718        getDefault() {
31719          return [!0, !0, !0, !0];
31720        }
31721        set(r) {
31722          const a = this.current;
31723          (r[0] !== a[0] || r[1] !== a[1] || r[2] !== a[2] || r[3] !== a[3] || this.dirty) && (this.gl.colorMask(r[0], r[1], r[2], r[3]), this.current = r, this.dirty = !1);
31724        }
31725      }
31726      class fl extends Or {
31727        getDefault() {
31728          return !0;
31729        }
31730        set(r) {
31731          (r !== this.current || this.dirty) && (this.gl.depthMask(r), this.current = r, this.dirty = !1);
31732        }
31733      }
31734      class gu extends Or {
31735        getDefault() {
31736          return 255;
31737        }
31738        set(r) {
31739          (r !== this.current || this.dirty) && (this.gl.stencilMask(r), this.current = r, this.dirty = !1);
31740        }
31741      }
31742      class is extends Or {
31743        getDefault() {
31744          return { func: this.gl.ALWAYS, ref: 0, mask: 255 };
31745        }
31746        set(r) {
31747          const a = this.current;
31748          (r.func !== a.func || r.ref !== a.ref || r.mask !== a.mask || this.dirty) && (this.gl.stencilFunc(r.func, r.ref, r.mask), this.current = r, this.dirty = !1);
31749        }
31750      }
31751      class dl extends Or {
31752        getDefault() {
31753          const r = this.gl;
31754          return [r.KEEP, r.KEEP, r.KEEP];
31755        }
31756        set(r) {
31757          const a = this.current;
31758          (r[0] !== a[0] || r[1] !== a[1] || r[2] !== a[2] || this.dirty) && (this.gl.stencilOp(r[0], r[1], r[2]), this.current = r, this.dirty = !1);
31759        }
31760      }
31761      class fc extends Or {
31762        getDefault() {
31763          return !1;
31764        }
31765        set(r) {
31766          if (r === this.current && !this.dirty) return;
31767          const a = this.gl;
31768          r ? a.enable(a.STENCIL_TEST) : a.disable(a.STENCIL_TEST), this.current = r, this.dirty = !1;
31769        }
31770      }
31771      class yu extends Or {
31772        getDefault() {
31773          return [0, 1];
31774        }
31775        set(r) {
31776          const a = this.current;
31777          (r[0] !== a[0] || r[1] !== a[1] || this.dirty) && (this.gl.depthRange(r[0], r[1]), this.current = r, this.dirty = !1);
31778        }
31779      }
31780      class dc extends Or {
31781        getDefault() {
31782          return !1;
31783        }
31784        set(r) {
31785          if (r === this.current && !this.dirty) return;
31786          const a = this.gl;
31787          r ? a.enable(a.DEPTH_TEST) : a.disable(a.DEPTH_TEST), this.current = r, this.dirty = !1;
31788        }
31789      }
31790      class Oa extends Or {
31791        getDefault() {
31792          return this.gl.LESS;
31793        }
31794        set(r) {
31795          (r !== this.current || this.dirty) && (this.gl.depthFunc(r), this.current = r, this.dirty = !1);
31796        }
31797      }
31798      class so extends Or {
31799        getDefault() {
31800          return !1;
31801        }
31802        set(r) {
31803          if (r === this.current && !this.dirty) return;
31804          const a = this.gl;
31805          r ? a.enable(a.BLEND) : a.disable(a.BLEND), this.current = r, this.dirty = !1;
31806        }
31807      }
31808      class pc extends Or {
31809        getDefault() {
31810          const r = this.gl;
31811          return [r.ONE, r.ZERO];
31812        }
31813        set(r) {
31814          const a = this.current;
31815          (r[0] !== a[0] || r[1] !== a[1] || this.dirty) && (this.gl.blendFunc(r[0], r[1]), this.current = r, this.dirty = !1);
31816        }
31817      }
31818      class Vh extends Or {
31819        getDefault() {
31820          return c.aM.transparent;
31821        }
31822        set(r) {
31823          const a = this.current;
31824          (r.r !== a.r || r.g !== a.g || r.b !== a.b || r.a !== a.a || this.dirty) && (this.gl.blendColor(r.r, r.g, r.b, r.a), this.current = r, this.dirty = !1);
31825        }
31826      }
31827      class oo extends Or {
31828        getDefault() {
31829          return this.gl.FUNC_ADD;
31830        }
31831        set(r) {
31832          (r !== this.current || this.dirty) && (this.gl.blendEquation(r), this.current = r, this.dirty = !1);
31833        }
31834      }
31835      class Qo extends Or {
31836        getDefault() {
31837          return !1;
31838        }
31839        set(r) {
31840          if (r === this.current && !this.dirty) return;
31841          const a = this.gl;
31842          r ? a.enable(a.CULL_FACE) : a.disable(a.CULL_FACE), this.current = r, this.dirty = !1;
31843        }
31844      }
31845      class Uh extends Or {
31846        getDefault() {
31847          return this.gl.BACK;
31848        }
31849        set(r) {
31850          (r !== this.current || this.dirty) && (this.gl.cullFace(r), this.current = r, this.dirty = !1);
31851        }
31852      }
31853      class pl extends Or {
31854        getDefault() {
31855          return this.gl.CCW;
31856        }
31857        set(r) {
31858          (r !== this.current || this.dirty) && (this.gl.frontFace(r), this.current = r, this.dirty = !1);
31859        }
31860      }
31861      class mc extends Or {
31862        getDefault() {
31863          return null;
31864        }
31865        set(r) {
31866          (r !== this.current || this.dirty) && (this.gl.useProgram(r), this.current = r, this.dirty = !1);
31867        }
31868      }
31869      class Da extends Or {
31870        getDefault() {
31871          return this.gl.TEXTURE0;
31872        }
31873        set(r) {
31874          (r !== this.current || this.dirty) && (this.gl.activeTexture(r), this.current = r, this.dirty = !1);
31875        }
31876      }
31877      class ml extends Or {
31878        getDefault() {
31879          const r = this.gl;
31880          return [0, 0, r.drawingBufferWidth, r.drawingBufferHeight];
31881        }
31882        set(r) {
31883          const a = this.current;
31884          (r[0] !== a[0] || r[1] !== a[1] || r[2] !== a[2] || r[3] !== a[3] || this.dirty) && (this.gl.viewport(r[0], r[1], r[2], r[3]), this.current = r, this.dirty = !1);
31885        }
31886      }
31887      class gl extends Or {
31888        getDefault() {
31889          return null;
31890        }
31891        set(r) {
31892          if (r === this.current && !this.dirty) return;
31893          const a = this.gl;
31894          a.bindFramebuffer(a.FRAMEBUFFER, r), this.current = r, this.dirty = !1;
31895        }
31896      }
31897      class yl extends Or {
31898        getDefault() {
31899          return null;
31900        }
31901        set(r) {
31902          if (r === this.current && !this.dirty) return;
31903          const a = this.gl;
31904          a.bindRenderbuffer(a.RENDERBUFFER, r), this.current = r, this.dirty = !1;
31905        }
31906      }
31907      class Po extends Or {
31908        getDefault() {
31909          return null;
31910        }
31911        set(r) {
31912          if (r === this.current && !this.dirty) return;
31913          const a = this.gl;
31914          a.bindTexture(a.TEXTURE_2D, r), this.current = r, this.dirty = !1;
31915        }
31916      }
31917      class _u extends Or {
31918        getDefault() {
31919          return null;
31920        }
31921        set(r) {
31922          if (r === this.current && !this.dirty) return;
31923          const a = this.gl;
31924          a.bindBuffer(a.ARRAY_BUFFER, r), this.current = r, this.dirty = !1;
31925        }
31926      }
31927      class _l extends Or {
31928        getDefault() {
31929          return null;
31930        }
31931        set(r) {
31932          const a = this.gl;
31933          a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, r), this.current = r, this.dirty = !1;
31934        }
31935      }
31936      class zs extends Or {
31937        getDefault() {
31938          return null;
31939        }
31940        set(r) {
31941          var a;
31942          if (r === this.current && !this.dirty) return;
31943          const f = this.gl;
31944          Fs(f) ? f.bindVertexArray(r) : (a = f.getExtension("OES_vertex_array_object")) === null || a === void 0 || a.bindVertexArrayOES(r), this.current = r, this.dirty = !1;
31945        }
31946      }
31947      class gc extends Or {
31948        getDefault() {
31949          return 4;
31950        }
31951        set(r) {
31952          if (r === this.current && !this.dirty) return;
31953          const a = this.gl;
31954          a.pixelStorei(a.UNPACK_ALIGNMENT, r), this.current = r, this.dirty = !1;
31955        }
31956      }
31957      class yc extends Or {
31958        getDefault() {
31959          return !1;
31960        }
31961        set(r) {
31962          if (r === this.current && !this.dirty) return;
31963          const a = this.gl;
31964          a.pixelStorei(a.UNPACK_PREMULTIPLY_ALPHA_WEBGL, r), this.current = r, this.dirty = !1;
31965        }
31966      }
31967      class vl extends Or {
31968        getDefault() {
31969          return !1;
31970        }
31971        set(r) {
31972          if (r === this.current && !this.dirty) return;
31973          const a = this.gl;
31974          a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL, r), this.current = r, this.dirty = !1;
31975        }
31976      }
31977      class ea extends Or {
31978        constructor(r, a) {
31979          super(r), this.context = r, this.parent = a;
31980        }
31981        getDefault() {
31982          return null;
31983        }
31984      }
31985      class Bs extends ea {
31986        setDirty() {
31987          this.dirty = !0;
31988        }
31989        set(r) {
31990          if (r === this.current && !this.dirty) return;
31991          this.context.bindFramebuffer.set(this.parent);
31992          const a = this.gl;
31993          a.framebufferTexture2D(a.FRAMEBUFFER, a.COLOR_ATTACHMENT0, a.TEXTURE_2D, r, 0), this.current = r, this.dirty = !1;
31994        }
31995      }
31996      class ii extends ea {
31997        set(r) {
31998          if (r === this.current && !this.dirty) return;
31999          this.context.bindFramebuffer.set(this.parent);
32000          const a = this.gl;
32001          a.framebufferRenderbuffer(a.FRAMEBUFFER, a.DEPTH_ATTACHMENT, a.RENDERBUFFER, r), this.current = r, this.dirty = !1;
32002        }
32003      }
32004      class Ns extends ea {
32005        set(r) {
32006          if (r === this.current && !this.dirty) return;
32007          this.context.bindFramebuffer.set(this.parent);
32008          const a = this.gl;
32009          a.framebufferRenderbuffer(a.FRAMEBUFFER, a.DEPTH_STENCIL_ATTACHMENT, a.RENDERBUFFER, r), this.current = r, this.dirty = !1;
32010        }
32011      }
32012      class bl {
32013        constructor(r, a, f, d, y) {
32014          this.context = r, this.width = a, this.height = f;
32015          const S = r.gl, C = this.framebuffer = S.createFramebuffer();
32016          if (this.colorAttachment = new Bs(r, C), d) this.depthAttachment = y ? new Ns(r, C) : new ii(r, C);
32017          else if (y) throw new Error("Stencil cannot be set without depth");
32018          if (S.checkFramebufferStatus(S.FRAMEBUFFER) !== S.FRAMEBUFFER_COMPLETE) throw new Error("Framebuffer is not complete");
32019        }
32020        destroy() {
32021          const r = this.context.gl, a = this.colorAttachment.get();
32022          if (a && r.deleteTexture(a), this.depthAttachment) {
32023            const f = this.depthAttachment.get();
32024            f && r.deleteRenderbuffer(f);
32025          }
32026          r.deleteFramebuffer(this.framebuffer);
32027        }
32028      }
32029      class Gr {
32030        constructor(r, a, f) {
32031          this.blendFunction = r, this.blendColor = a, this.mask = f;
32032        }
32033      }
32034      Gr.Replace = [1, 0], Gr.disabled = new Gr(Gr.Replace, c.aM.transparent, [!1, !1, !1, !1]), Gr.unblended = new Gr(Gr.Replace, c.aM.transparent, [!0, !0, !0, !0]), Gr.alphaBlended = new Gr([1, 771], c.aM.transparent, [!0, !0, !0, !0]);
32035      class qh {
32036        constructor(r) {
32037          var a, f;
32038          if (this.gl = r, this.clearColor = new ka(this), this.clearDepth = new jh(this), this.clearStencil = new Yo(this), this.colorMask = new hl(this), this.depthMask = new fl(this), this.stencilMask = new gu(this), this.stencilFunc = new is(this), this.stencilOp = new dl(this), this.stencilTest = new fc(this), this.depthRange = new yu(this), this.depthTest = new dc(this), this.depthFunc = new Oa(this), this.blend = new so(this), this.blendFunc = new pc(this), this.blendColor = new Vh(this), this.blendEquation = new oo(this), this.cullFace = new Qo(this), this.cullFaceSide = new Uh(this), this.frontFace = new pl(this), this.program = new mc(this), this.activeTexture = new Da(this), this.viewport = new ml(this), this.bindFramebuffer = new gl(this), this.bindRenderbuffer = new yl(this), this.bindTexture = new Po(this), this.bindVertexBuffer = new _u(this), this.bindElementBuffer = new _l(this), this.bindVertexArray = new zs(this), this.pixelStoreUnpack = new gc(this), this.pixelStoreUnpackPremultiplyAlpha = new yc(this), this.pixelStoreUnpackFlipY = new vl(this), this.extTextureFilterAnisotropic = r.getExtension("EXT_texture_filter_anisotropic") || r.getExtension("MOZ_EXT_texture_filter_anisotropic") || r.getExtension("WEBKIT_EXT_texture_filter_anisotropic"), this.extTextureFilterAnisotropic && (this.extTextureFilterAnisotropicMax = r.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)), this.maxTextureSize = r.getParameter(r.MAX_TEXTURE_SIZE), Fs(r)) {
32039            this.HALF_FLOAT = r.HALF_FLOAT;
32040            const d = r.getExtension("EXT_color_buffer_half_float");
32041            this.RGBA16F = (a = r.RGBA16F) !== null && a !== void 0 ? a : d == null ? void 0 : d.RGBA16F_EXT, this.RGB16F = (f = r.RGB16F) !== null && f !== void 0 ? f : d == null ? void 0 : d.RGB16F_EXT, r.getExtension("EXT_color_buffer_float");
32042          } else {
32043            r.getExtension("EXT_color_buffer_half_float"), r.getExtension("OES_texture_half_float_linear");
32044            const d = r.getExtension("OES_texture_half_float");
32045            this.HALF_FLOAT = d == null ? void 0 : d.HALF_FLOAT_OES;
32046          }
32047        }
32048        setDefault() {
32049          this.unbindVAO(), this.clearColor.setDefault(), this.clearDepth.setDefault(), this.clearStencil.setDefault(), this.colorMask.setDefault(), this.depthMask.setDefault(), this.stencilMask.setDefault(), this.stencilFunc.setDefault(), this.stencilOp.setDefault(), this.stencilTest.setDefault(), this.depthRange.setDefault(), this.depthTest.setDefault(), this.depthFunc.setDefault(), this.blend.setDefault(), this.blendFunc.setDefault(), this.blendColor.setDefault(), this.blendEquation.setDefault(), this.cullFace.setDefault(), this.cullFaceSide.setDefault(), this.frontFace.setDefault(), this.program.setDefault(), this.activeTexture.setDefault(), this.bindFramebuffer.setDefault(), this.pixelStoreUnpack.setDefault(), this.pixelStoreUnpackPremultiplyAlpha.setDefault(), this.pixelStoreUnpackFlipY.setDefault();
32050        }
32051        setDirty() {
32052          this.clearColor.dirty = !0, this.clearDepth.dirty = !0, this.clearStencil.dirty = !0, this.colorMask.dirty = !0, this.depthMask.dirty = !0, this.stencilMask.dirty = !0, this.stencilFunc.dirty = !0, this.stencilOp.dirty = !0, this.stencilTest.dirty = !0, this.depthRange.dirty = !0, this.depthTest.dirty = !0, this.depthFunc.dirty = !0, this.blend.dirty = !0, this.blendFunc.dirty = !0, this.blendColor.dirty = !0, this.blendEquation.dirty = !0, this.cullFace.dirty = !0, this.cullFaceSide.dirty = !0, this.frontFace.dirty = !0, this.program.dirty = !0, this.activeTexture.dirty = !0, this.viewport.dirty = !0, this.bindFramebuffer.dirty = !0, this.bindRenderbuffer.dirty = !0, this.bindTexture.dirty = !0, this.bindVertexBuffer.dirty = !0, this.bindElementBuffer.dirty = !0, this.bindVertexArray.dirty = !0, this.pixelStoreUnpack.dirty = !0, this.pixelStoreUnpackPremultiplyAlpha.dirty = !0, this.pixelStoreUnpackFlipY.dirty = !0;
32053        }
32054        createIndexBuffer(r, a) {
32055          return new ns(this, r, a);
32056        }
32057        createVertexBuffer(r, a, f) {
32058          return new hc(this, r, a, f);
32059        }
32060        createRenderbuffer(r, a, f) {
32061          const d = this.gl, y = d.createRenderbuffer();
32062          return this.bindRenderbuffer.set(y), d.renderbufferStorage(d.RENDERBUFFER, r, a, f), this.bindRenderbuffer.set(null), y;
32063        }
32064        createFramebuffer(r, a, f, d) {
32065          return new bl(this, r, a, f, d);
32066        }
32067        clear({ color: r, depth: a, stencil: f }) {
32068          const d = this.gl;
32069          let y = 0;
32070          r && (y |= d.COLOR_BUFFER_BIT, this.clearColor.set(r), this.colorMask.set([!0, !0, !0, !0])), a !== void 0 && (y |= d.DEPTH_BUFFER_BIT, this.depthRange.set([0, 1]), this.clearDepth.set(a), this.depthMask.set(!0)), f !== void 0 && (y |= d.STENCIL_BUFFER_BIT, this.clearStencil.set(f), this.stencilMask.set(255)), d.clear(y);
32071        }
32072        setCullFace(r) {
32073          r.enable === !1 ? this.cullFace.set(!1) : (this.cullFace.set(!0), this.cullFaceSide.set(r.mode), this.frontFace.set(r.frontFace));
32074        }
32075        setDepthMode(r) {
32076          r.func !== this.gl.ALWAYS || r.mask ? (this.depthTest.set(!0), this.depthFunc.set(r.func), this.depthMask.set(r.mask), this.depthRange.set(r.range)) : this.depthTest.set(!1);
32077        }
32078        setStencilMode(r) {
32079          r.test.func !== this.gl.ALWAYS || r.mask ? (this.stencilTest.set(!0), this.stencilMask.set(r.mask), this.stencilOp.set([r.fail, r.depthFail, r.pass]), this.stencilFunc.set({ func: r.test.func, ref: r.ref, mask: r.test.mask })) : this.stencilTest.set(!1);
32080        }
32081        setColorMode(r) {
32082          c.aE(r.blendFunction, Gr.Replace) ? this.blend.set(!1) : (this.blend.set(!0), this.blendFunc.set(r.blendFunction), this.blendColor.set(r.blendColor)), this.colorMask.set(r.mask);
32083        }
32084        createVertexArray() {
32085          var r;
32086          return Fs(this.gl) ? this.gl.createVertexArray() : (r = this.gl.getExtension("OES_vertex_array_object")) === null || r === void 0 ? void 0 : r.createVertexArrayOES();
32087        }
32088        deleteVertexArray(r) {
32089          var a;
32090          return Fs(this.gl) ? this.gl.deleteVertexArray(r) : (a = this.gl.getExtension("OES_vertex_array_object")) === null || a === void 0 ? void 0 : a.deleteVertexArrayOES(r);
32091        }
32092        unbindVAO() {
32093          this.bindVertexArray.set(null);
32094        }
32095      }
32096      class cr {
32097        constructor(r, a, f) {
32098          this.func = r, this.mask = a, this.range = f;
32099        }
32100      }
32101      cr.ReadOnly = !1, cr.ReadWrite = !0, cr.disabled = new cr(519, cr.ReadOnly, [0, 1]);
32102      const ao = 7680;
32103      class Wr {
32104        constructor(r, a, f, d, y, S) {
32105          this.test = r, this.ref = a, this.mask = f, this.fail = d, this.depthFail = y, this.pass = S;
32106        }
32107      }
32108      Wr.disabled = new Wr({ func: 519, mask: 0 }, 0, 0, ao, ao, ao);
32109      class jr {
32110        constructor(r, a, f) {
32111          this.enable = r, this.mode = a, this.frontFace = f;
32112        }
32113      }
32114      let Mo;
32115      function Ra(_, r, a, f, d) {
32116        const y = _.context, S = y.gl, C = _.useProgram("collisionBox"), I = [];
32117        let F = 0, N = 0;
32118        for (let pe = 0; pe < f.length; pe++) {
32119          const _e = f[pe], se = r.getTile(_e).getBucket(a);
32120          if (!se) continue;
32121          const Te = d ? se.textCollisionBox : se.iconCollisionBox, Me = se.collisionCircleArray;
32122          if (Me.length > 0) {
32123            const Fe = c
vendor: 6,236 bytes, lines 32123-32215
32123.H();
32124            c.aQ(Fe, se.placementInvProjMatrix, _.transform.glCoordMatrix), c.aQ(Fe, Fe, se.placementViewportMatrix), I.push({ circleArray: Me, circleOffset: N, transform: _e.posMatrix, invTransform: Fe, coord: _e }), F += Me.length / 4, N = F;
32125          }
32126          Te && C.draw(y, S.LINES, cr.disabled, Wr.disabled, _.colorModeForRenderPass(), jr.disabled, { u_matrix: _e.posMatrix, u_pixel_extrude_scale: [1 / ($ = _.transform).width, 1 / $.height] }, _.style.map.terrain && _.style.map.terrain.getTerrainData(_e), a.id, Te.layoutVertexBuffer, Te.indexBuffer, Te.segments, null, _.transform.zoom, null, null, Te.collisionVertexBuffer);
32127        }
32128        var $;
32129        if (!d || !I.length) return;
32130        const G = _.useProgram("collisionCircle"), Q = new c.aR();
32131        Q.resize(4 * F), Q._trim();
32132        let te = 0;
32133        for (const pe of I) for (let _e = 0; _e < pe.circleArray.length / 4; _e++) {
32134          const se = 4 * _e, Te = pe.circleArray[se + 0], Me = pe.circleArray[se + 1], Fe = pe.circleArray[se + 2], Je = pe.circleArray[se + 3];
32135          Q.emplace(te++, Te, Me, Fe, Je, 0), Q.emplace(te++, Te, Me, Fe, Je, 1), Q.emplace(te++, Te, Me, Fe, Je, 2), Q.emplace(te++, Te, Me, Fe, Je, 3);
32136        }
32137        (!Mo || Mo.length < 2 * F) && (Mo = function(pe) {
32138          const _e = 2 * pe, se = new c.aT();
32139          se.resize(_e), se._trim();
32140          for (let Te = 0; Te < _e; Te++) {
32141            const Me = 6 * Te;
32142            se.uint16[Me + 0] = 4 * Te + 0, se.uint16[Me + 1] = 4 * Te + 1, se.uint16[Me + 2] = 4 * Te + 2, se.uint16[Me + 3] = 4 * Te + 2, se.uint16[Me + 4] = 4 * Te + 3, se.uint16[Me + 5] = 4 * Te + 0;
32143          }
32144          return se;
32145        }(F));
32146        const ae = y.createIndexBuffer(Mo, !0), fe = y.createVertexBuffer(Q, c.aS.members, !0);
32147        for (const pe of I) {
32148          const _e = Yt(pe.transform, pe.invTransform, _.transform);
32149          G.draw(y, S.TRIANGLES, cr.disabled, Wr.disabled, _.colorModeForRenderPass(), jr.disabled, _e, _.style.map.terrain && _.style.map.terrain.getTerrainData(pe.coord), a.id, fe, ae, c.a0.simpleSegment(0, 2 * pe.circleOffset, pe.circleArray.length, pe.circleArray.length / 2), null, _.transform.zoom, null, null, null);
32150        }
32151        fe.destroy(), ae.destroy();
32152      }
32153      jr.disabled = new jr(!1, 1029, 2305), jr.backCCW = new jr(!0, 1029, 2305);
32154      const ta = c.an(new Float32Array(16));
32155      function xl(_, r, a, f, d, y) {
32156        const { horizontalAlign: S, verticalAlign: C } = c.au(_);
32157        return new c.P((-(S - 0.5) * r / d + f[0]) * y, (-(C - 0.5) * a / d + f[1]) * y);
32158      }
32159      function gs(_, r, a, f, d, y) {
32160        const S = r.tileAnchorPoint.add(new c.P(r.translation[0], r.translation[1]));
32161        if (r.pitchWithMap) {
32162          let C = f.mult(y);
32163          a || (C = C.rotate(-d));
32164          const I = S.add(C);
32165          return le(I.x, I.y, r.labelPlaneMatrix, r.getElevation).point;
32166        }
32167        if (a) {
32168          const C = Be(r.tileAnchorPoint.x + 1, r.tileAnchorPoint.y, r).point.sub(_), I = Math.atan(C.y / C.x) + (C.x < 0 ? Math.PI : 0);
32169          return _.add(f.rotate(I));
32170        }
32171        return _.add(f);
32172      }
32173      function ss(_, r, a, f, d, y, S, C, I, F, N, $, G, Q) {
32174        const te = _.text.placedSymbolArray, ae = _.text.dynamicLayoutVertexArray, fe = _.icon.dynamicLayoutVertexArray, pe = {};
32175        ae.clear();
32176        for (let _e = 0; _e < te.length; _e++) {
32177          const se = te.get(_e), Te = se.hidden || !se.crossTileID || _.allowVerticalPlacement && !se.placedOrientation ? null : f[se.crossTileID];
32178          if (Te) {
32179            const Me = new c.P(se.anchorX, se.anchorY), Fe = { getElevation: Q, width: d.width, height: d.height, labelPlaneMatrix: y, pitchWithMap: a, projection: N, tileAnchorPoint: Me, translation: $, unwrappedTileID: G }, Je = a ? le(Me.x, Me.y, S, Q) : Be(Me.x, Me.y, Fe), lt = U(d.cameraToCenterDistance, Je.signedDistanceFromCamera);
32180            let vt = c.ai(_.textSizeData, I, se) * lt / c.ap;
32181            a && (vt *= _.tilePixelRatio / C);
32182            const { width: Ct, height: gt, anchor: pt, textOffset: Ft, textBoxScale: ir } = Te, yt = xl(pt, Ct, gt, Ft, ir, vt), Et = N.getPitchedTextCorrection(d, Me.add(new c.P($[0], $[1])), G), rr = gs(Je.point, Fe, r, yt, d.angle, Et), yn = _.allowVerticalPlacement && se.placedOrientation === c.ah.vertical ? Math.PI / 2 : 0;
32183            for (let pr = 0; pr < se.numGlyphs; pr++) c.aj(ae, rr, yn);
32184            F && se.associatedIconIndex >= 0 && (pe[se.associatedIconIndex] = { shiftedAnchor: rr, angle: yn });
32185          } else zt(se.numGlyphs, ae);
32186        }
32187        if (F) {
32188          fe.clear();
32189          const _e = _.icon.placedSymbolArray;
32190          for (let se = 0; se < _e.length; se++) {
32191            const Te = _e.get(se);
32192            if (Te.hidden) zt(Te.numGlyphs, fe);
32193            else {
32194              const Me = pe[se];
32195              if (Me) for (let Fe = 0; Fe < Te.numGlyphs; Fe++) c.aj(fe, Me.shiftedAnchor, Me.angle);
32196              else zt(Te.numGlyphs, fe);
32197            }
32198          }
32199          _.icon.dynamicLayoutVertexBuffer.updateData(fe);
32200        }
32201        _.text.dynamicLayoutVertexBuffer.updateData(ae);
32202      }
32203      function ji(_, r, a) {
32204        return a.iconsInText && r ? "symbolTextAndIcon" : _ ? "symbolSDF" : "symbolIcon";
32205      }
32206      function ys(_, r, a, f, d, y, S, C, I, F, N, $) {
32207        const G = _.context, Q = G.gl, te = _.transform, ae = Pi(), fe = C === "map", pe = I === "map", _e = C !== "viewport" && a.layout.get("symbol-placement") !== "point", se = fe && !pe && !_e, Te = !pe && _e, Me = !a.layout.get("symbol-sort-key").isConstant();
32208        let Fe = !1;
32209        const Je = _.depthModeForSublayer(0, cr.ReadOnly), lt = a._unevaluatedLayout.hasValue("text-variable-anchor") || a._unevaluatedLayout.hasValue("text-variable-anchor-offset"), vt = [], Ct = ae.getCircleRadiusCorrection(te);
32210        for (const gt of f) {
32211          const pt = r.getTile(gt), Ft = pt.getBucket(a);
32212          if (!Ft) continue;
32213          const ir = d ? Ft.text : Ft.icon;
32214          if (!ir || !ir.segments.get().length || !ir.hasVisibleVertices) continue;
32215          const yt = ir.programConfigurations.get(a.id), Et = d || Ft.sdfIcons, rr = d ? Ft.textSizeData : Ft.
vendor: 9,218 bytes, lines 32215-32324
32215iconSizeData, yn = pe || te.pitch !== 0, pr = _.useProgram(ji(Et, d, Ft), yt), xr = c.ag(rr, te.zoom), _n = _.style.map.terrain && _.style.map.terrain.getTerrainData(gt);
32216          let _i, qs, vn, Hi, Mi = [0, 0], vi = null;
32217          if (d) qs = pt.glyphAtlasTexture, vn = Q.LINEAR, _i = pt.glyphAtlasTexture.size, Ft.iconsInText && (Mi = pt.imageAtlasTexture.size, vi = pt.imageAtlasTexture, Hi = yn || _.options.rotating || _.options.zooming || rr.kind === "composite" || rr.kind === "camera" ? Q.LINEAR : Q.NEAREST);
32218          else {
32219            const Tr = a.layout.get("icon-size").constantOr(0) !== 1 || Ft.iconsNeedLinear;
32220            qs = pt.imageAtlasTexture, vn = Et || _.options.rotating || _.options.zooming || Tr || yn ? Q.LINEAR : Q.NEAREST, _i = pt.imageAtlasTexture.size;
32221          }
32222          const ki = gr(pt, 1, _.transform.zoom), _o = Te ? gt.posMatrix : ta, Pl = Bi(_o, pe, fe, _.transform, ki), Cu = mn(_o, pe, fe, _.transform, ki), Ml = mn(gt.posMatrix, pe, fe, _.transform, ki), ws = ae.translatePosition(_.transform, pt, y, S), Iu = lt && Ft.hasTextData(), lf = a.layout.get("icon-text-fit") !== "none" && Iu && Ft.hasIconData();
32223          if (_e) {
32224            const Tr = _.style.map.terrain ? (kl, Ol) => _.style.map.terrain.getElevation(gt, kl, Ol) : null, $a = a.layout.get("text-rotation-alignment") === "map";
32225            M(Ft, gt.posMatrix, _, d, Pl, Ml, pe, F, $a, ae, gt.toUnwrapped(), te.width, te.height, ws, Tr);
32226          }
32227          const Ss = gt.posMatrix, Ts = d && lt || lf, sa = _e || Ts ? ta : Pl, Hs = Cu, oi = Et && a.paint.get(d ? "text-halo-width" : "icon-halo-width").constantOr(1) !== 0;
32228          let bi;
32229          bi = Et ? Ft.iconsInText ? cl(rr.kind, xr, se, pe, _e, Ts, _, Ss, sa, Hs, ws, _i, Mi, Ct) : Jo(rr.kind, xr, se, pe, _e, Ts, _, Ss, sa, Hs, ws, d, _i, !0, Ct) : ms(rr.kind, xr, se, pe, _e, Ts, _, Ss, sa, Hs, ws, d, _i, Ct);
32230          const us = { program: pr, buffers: ir, uniformValues: bi, atlasTexture: qs, atlasTextureIcon: vi, atlasInterpolation: vn, atlasInterpolationIcon: Hi, isSDF: Et, hasHalo: oi };
32231          if (Me && Ft.canOverlap) {
32232            Fe = !0;
32233            const Tr = ir.segments.get();
32234            for (const $a of Tr) vt.push({ segments: new c.a0([$a]), sortKey: $a.sortKey, state: us, terrainData: _n });
32235          } else vt.push({ segments: ir.segments, sortKey: 0, state: us, terrainData: _n });
32236        }
32237        Fe && vt.sort((gt, pt) => gt.sortKey - pt.sortKey);
32238        for (const gt of vt) {
32239          const pt = gt.state;
32240          if (G.activeTexture.set(Q.TEXTURE0), pt.atlasTexture.bind(pt.atlasInterpolation, Q.CLAMP_TO_EDGE), pt.atlasTextureIcon && (G.activeTexture.set(Q.TEXTURE1), pt.atlasTextureIcon && pt.atlasTextureIcon.bind(pt.atlasInterpolationIcon, Q.CLAMP_TO_EDGE)), pt.isSDF) {
32241            const Ft = pt.uniformValues;
32242            pt.hasHalo && (Ft.u_is_halo = 1, _c(pt.buffers, gt.segments, a, _, pt.program, Je, N, $, Ft, gt.terrainData)), Ft.u_is_halo = 0;
32243          }
32244          _c(pt.buffers, gt.segments, a, _, pt.program, Je, N, $, pt.uniformValues, gt.terrainData);
32245        }
32246      }
32247      function _c(_, r, a, f, d, y, S, C, I, F) {
32248        const N = f.context;
32249        d.draw(N, N.gl.TRIANGLES, y, S, C, jr.disabled, I, F, a.id, _.layoutVertexBuffer, _.indexBuffer, r, a.paint, f.transform.zoom, _.programConfigurations.get(a.id), _.dynamicLayoutVertexBuffer, _.opacityVertexBuffer);
32250      }
32251      function $s(_, r, a, f) {
32252        const d = _.context, y = d.gl, S = Wr.disabled, C = new Gr([y.ONE, y.ONE], c.aM.transparent, [!0, !0, !0, !0]), I = r.getBucket(a);
32253        if (!I) return;
32254        const F = f.key;
32255        let N = a.heatmapFbos.get(F);
32256        N || (N = La(d, r.tileSize, r.tileSize), a.heatmapFbos.set(F, N)), d.bindFramebuffer.set(N.framebuffer), d.viewport.set([0, 0, r.tileSize, r.tileSize]), d.clear({ color: c.aM.transparent });
32257        const $ = I.programConfigurations.get(a.id), G = _.useProgram("heatmap", $), Q = _.style.map.terrain.getTerrainData(f);
32258        G.draw(d, y.TRIANGLES, cr.disabled, S, C, jr.disabled, kr(f.posMatrix, r, _.transform.zoom, a.paint.get("heatmap-intensity")), Q, a.id, I.layoutVertexBuffer, I.indexBuffer, I.segments, a.paint, _.transform.zoom, $);
32259      }
32260      function lo(_, r, a) {
32261        const f = _.context, d = f.gl;
32262        f.setColorMode(_.colorModeForRenderPass());
32263        const y = co(f, r), S = a.key, C = r.heatmapFbos.get(S);
32264        C && (f.activeTexture.set(d.TEXTURE0), d.bindTexture(d.TEXTURE_2D, C.colorAttachment.get()), f.activeTexture.set(d.TEXTURE1), y.bind(d.LINEAR, d.CLAMP_TO_EDGE), _.useProgram("heatmapTexture").draw(f, d.TRIANGLES, cr.disabled, Wr.disabled, _.colorModeForRenderPass(), jr.disabled, Ye(_, r, 0, 1), null, r.id, _.rasterBoundsBuffer, _.quadTriangleIndexBuffer, _.rasterBoundsSegments, r.paint, _.transform.zoom), C.destroy(), r.heatmapFbos.delete(S));
32265      }
32266      function La(_, r, a) {
32267        var f, d;
32268        const y = _.gl, S = y.createTexture();
32269        y.bindTexture(y.TEXTURE_2D, S), y.texParameteri(y.TEXTURE_2D, y.TEXTURE_WRAP_S, y.CLAMP_TO_EDGE), y.texParameteri(y.TEXTURE_2D, y.TEXTURE_WRAP_T, y.CLAMP_TO_EDGE), y.texParameteri(y.TEXTURE_2D, y.TEXTURE_MIN_FILTER, y.LINEAR), y.texParameteri(y.TEXTURE_2D, y.TEXTURE_MAG_FILTER, y.LINEAR);
32270        const C = (f = _.HALF_FLOAT) !== null && f !== void 0 ? f : y.UNSIGNED_BYTE, I = (d = _.RGBA16F) !== null && d !== void 0 ? d : y.RGBA;
32271        y.texImage2D(y.TEXTURE_2D, 0, I, r, a, 0, y.RGBA, C, null);
32272        const F = _.createFramebuffer(r, a, !1, !1);
32273        return F.colorAttachment.set(S), F;
32274      }
32275      function co(_, r) {
32276        return r.colorRampTexture || (r.colorRampTexture = new He(_, r.colorRamp, _.gl.RGBA)), r.colorRampTexture;
32277      }
32278      function uo(_, r, a, f, d) {
32279        if (!a || !f || !f.imageAtlas) return;
32280        const y = f.imageAtlas.patternPositions;
32281        let S = y[a.to.toString()], C = y[a.from.toString()];
32282        if (!S && C && (S = C), !C && S && (C = S), !S || !C) {
32283          const I = d.getPaintProperty(r);
32284          S = y[I], C = y[I];
32285        }
32286        S && C && _.setConstantPatternPositions(S, C);
32287      }
32288      function ra(_, r, a, f, d, y, S) {
32289        const C = _.context.gl, I = "fill-pattern", F = a.paint.get(I), N = F && F.constantOr(1), $ = a.getCrossfadeParameters();
32290        let G, Q, te, ae, fe;
32291        S ? (Q = N && !a.getPaintProperty("fill-outline-color") ? "fillOutlinePattern" : "fillOutline", G = C.LINES) : (Q = N ? "fillPattern" : "fill", G = C.TRIANGLES);
32292        const pe = F.constantOr(null);
32293        for (const _e of f) {
32294          const se = r.getTile(_e);
32295          if (N && !se.patternsLoaded()) continue;
32296          const Te = se.getBucket(a);
32297          if (!Te) continue;
32298          const Me = Te.programConfigurations.get(a.id), Fe = _.useProgram(Q, Me), Je = _.style.map.terrain && _.style.map.terrain.getTerrainData(_e);
32299          N && (_.context.activeTexture.set(C.TEXTURE0), se.imageAtlasTexture.bind(C.LINEAR, C.CLAMP_TO_EDGE), Me.updatePaintBuffers($)), uo(Me, I, pe, se, a);
32300          const lt = Je ? _e : null, vt = _.translatePosMatrix(lt ? lt.posMatrix : _e.posMatrix, se, a.paint.get("fill-translate"), a.paint.get("fill-translate-anchor"));
32301          if (S) {
32302            ae = Te.indexBuffer2, fe = Te.segments2;
32303            const Ct = [C.drawingBufferWidth, C.drawingBufferHeight];
32304            te = Q === "fillOutlinePattern" && N ? xt(vt, _, $, se, Ct) : wt(vt, Ct);
32305          } else ae = Te.indexBuffer, fe = Te.segments, te = N ? ht(vt, _, $, se) : tt(vt);
32306          Fe.draw(_.context, G, d, _.stencilModeForClipping(_e), y, jr.disabled, te, Je, a.id, Te.layoutVertexBuffer, ae, fe, a.paint, _.transform.zoom, Me);
32307        }
32308      }
32309      function Fa(_, r, a, f, d, y, S) {
32310        const C = _.context, I = C.gl, F = "fill-extrusion-pattern", N = a.paint.get(F), $ = N.constantOr(1), G = a.getCrossfadeParameters(), Q = a.paint.get("fill-extrusion-opacity"), te = N.constantOr(null);
32311        for (const ae of f) {
32312          const fe = r.getTile(ae), pe = fe.getBucket(a);
32313          if (!pe) continue;
32314          const _e = _.style.map.terrain && _.style.map.terrain.getTerrainData(ae), se = pe.programConfigurations.get(a.id), Te = _.useProgram($ ? "fillExtrusionPattern" : "fillExtrusion", se);
32315          $ && (_.context.activeTexture.set(I.TEXTURE0), fe.imageAtlasTexture.bind(I.LINEAR, I.CLAMP_TO_EDGE), se.updatePaintBuffers(G)), uo(se, F, te, fe, a);
32316          const Me = _.translatePosMatrix(ae.posMatrix, fe, a.paint.get("fill-extrusion-translate"), a.paint.get("fill-extrusion-translate-anchor")), Fe = a.paint.get("fill-extrusion-vertical-gradient"), Je = $ ? Pe(Me, _, Fe, Q, ae, G, fe) : we(Me, _, Fe, Q);
32317          Te.draw(C, C.gl.TRIANGLES, d, y, S, jr.backCCW, Je, _e, a.id, pe.layoutVertexBuffer, pe.indexBuffer, pe.segments, a.paint, _.transform.zoom, se, _.style.map.terrain && pe.centroidVertexBuffer);
32318        }
32319      }
32320      function ko(_, r, a, f, d, y, S) {
32321        const C = _.context, I = C.gl, F = a.fbo;
32322        if (!F) return;
32323        const N = _.useProgram("hillshade"), $ = _.style.map.terrain && _.style.map.terrain.getTerrainData(r);
32324        C.activeTexture.set(I.TEXTURE0), I.bindTexture(I.TEXTURE_2D, F.
vendor: 6,928 bytes, lines 32324-32408
32324colorAttachment.get()), N.draw(C, I.TRIANGLES, d, y, S, jr.disabled, ((G, Q, te, ae) => {
32325          const fe = te.paint.get("hillshade-shadow-color"), pe = te.paint.get("hillshade-highlight-color"), _e = te.paint.get("hillshade-accent-color");
32326          let se = te.paint.get("hillshade-illumination-direction") * (Math.PI / 180);
32327          te.paint.get("hillshade-illumination-anchor") === "viewport" && (se -= G.transform.angle);
32328          const Te = !G.options.moving;
32329          return { u_matrix: ae ? ae.posMatrix : G.transform.calculatePosMatrix(Q.tileID.toUnwrapped(), Te), u_image: 0, u_latrange: Rt(0, Q.tileID), u_light: [te.paint.get("hillshade-exaggeration"), se], u_shadow: fe, u_highlight: pe, u_accent: _e };
32330        })(_, a, f, $ ? r : null), $, f.id, _.rasterBoundsBuffer, _.quadTriangleIndexBuffer, _.rasterBoundsSegments);
32331      }
32332      function _s(_, r, a, f, d, y) {
32333        const S = _.context, C = S.gl, I = r.dem;
32334        if (I && I.data) {
32335          const F = I.dim, N = I.stride, $ = I.getPixels();
32336          if (S.activeTexture.set(C.TEXTURE1), S.pixelStoreUnpackPremultiplyAlpha.set(!1), r.demTexture = r.demTexture || _.getTileTexture(N), r.demTexture) {
32337            const Q = r.demTexture;
32338            Q.update($, { premultiply: !1 }), Q.bind(C.NEAREST, C.CLAMP_TO_EDGE);
32339          } else r.demTexture = new He(S, $, C.RGBA, { premultiply: !1 }), r.demTexture.bind(C.NEAREST, C.CLAMP_TO_EDGE);
32340          S.activeTexture.set(C.TEXTURE0);
32341          let G = r.fbo;
32342          if (!G) {
32343            const Q = new He(S, { width: F, height: F, data: null }, C.RGBA);
32344            Q.bind(C.LINEAR, C.CLAMP_TO_EDGE), G = r.fbo = S.createFramebuffer(F, F, !0, !1), G.colorAttachment.set(Q.texture);
32345          }
32346          S.bindFramebuffer.set(G.framebuffer), S.viewport.set([0, 0, F, F]), _.useProgram("hillshadePrepare").draw(S, C.TRIANGLES, f, d, y, jr.disabled, ((Q, te) => {
32347            const ae = te.stride, fe = c.H();
32348            return c.aP(fe, 0, c.X, -c.X, 0, 0, 1), c.J(fe, fe, [0, -c.X, 0]), { u_matrix: fe, u_image: 1, u_dimension: [ae, ae], u_zoom: Q.overscaledZ, u_unpack: te.getUnpackVector() };
32349          })(r.tileID, I), null, a.id, _.rasterBoundsBuffer, _.quadTriangleIndexBuffer, _.rasterBoundsSegments), r.needsHillshadePrepare = !1;
32350        }
32351      }
32352      function vc(_, r, a, f, d, y) {
32353        const S = f.paint.get("raster-fade-duration");
32354        if (!y && S > 0) {
32355          const C = R.now(), I = (C - _.timeAdded) / S, F = r ? (C - r.timeAdded) / S : -1, N = a.getSource(), $ = d.coveringZoomLevel({ tileSize: N.tileSize, roundZoom: N.roundZoom }), G = !r || Math.abs(r.tileID.overscaledZ - $) > Math.abs(_.tileID.overscaledZ - $), Q = G && _.refreshedUponExpiration ? 1 : c.ac(G ? I : 1 - F, 0, 1);
32356          return _.refreshedUponExpiration && I >= 1 && (_.refreshedUponExpiration = !1), r ? { opacity: 1, mix: 1 - Q } : { opacity: Q, mix: 0 };
32357        }
32358        return { opacity: 1, mix: 0 };
32359      }
32360      const bc = new c.aM(1, 0, 0, 1), be = new c.aM(0, 1, 0, 1), Ue = new c.aM(0, 0, 1, 1), bt = new c.aM(1, 0, 1, 1), qt = new c.aM(0, 1, 1, 1);
32361      function Vr(_, r, a, f) {
32362        cn(_, 0, r + a / 2, _.transform.width, a, f);
32363      }
32364      function br(_, r, a, f) {
32365        cn(_, r - a / 2, 0, a, _.transform.height, f);
32366      }
32367      function cn(_, r, a, f, d, y) {
32368        const S = _.context, C = S.gl;
32369        C.enable(C.SCISSOR_TEST), C.scissor(r * _.pixelRatio, a * _.pixelRatio, f * _.pixelRatio, d * _.pixelRatio), S.clear({ color: y }), C.disable(C.SCISSOR_TEST);
32370      }
32371      function In(_, r, a) {
32372        const f = _.context, d = f.gl, y = a.posMatrix, S = _.useProgram("debug"), C = cr.disabled, I = Wr.disabled, F = _.colorModeForRenderPass(), N = "$debug", $ = _.style.map.terrain && _.style.map.terrain.getTerrainData(a);
32373        f.activeTexture.set(d.TEXTURE0);
32374        const G = r.getTileByID(a.key).latestRawTileData, Q = Math.floor((G && G.byteLength || 0) / 1024), te = r.getTile(a).tileSize, ae = 512 / Math.min(te, 512) * (a.overscaledZ / _.transform.zoom) * 0.5;
32375        let fe = a.canonical.toString();
32376        a.overscaledZ !== a.canonical.z && (fe += ` => ${a.overscaledZ}`), function(pe, _e) {
32377          pe.initDebugOverlayCanvas();
32378          const se = pe.debugOverlayCanvas, Te = pe.context.gl, Me = pe.debugOverlayCanvas.getContext("2d");
32379          Me.clearRect(0, 0, se.width, se.height), Me.shadowColor = "white", Me.shadowBlur = 2, Me.lineWidth = 1.5, Me.strokeStyle = "white", Me.textBaseline = "top", Me.font = "bold 36px Open Sans, sans-serif", Me.fillText(_e, 5, 5), Me.strokeText(_e, 5, 5), pe.debugOverlayTexture.update(se), pe.debugOverlayTexture.bind(Te.LINEAR, Te.CLAMP_TO_EDGE);
32380        }(_, `${fe} ${Q}kB`), S.draw(f, d.TRIANGLES, C, I, Gr.alphaBlended, jr.disabled, Xr(y, c.aM.transparent, ae), null, N, _.debugBuffer, _.quadTriangleIndexBuffer, _.debugSegments), S.draw(f, d.LINE_STRIP, C, I, F, jr.disabled, Xr(y, c.aM.red), $, N, _.debugBuffer, _.tileBorderIndexBuffer, _.debugSegments);
32381      }
32382      function Vi(_, r, a) {
32383        const f = _.context, d = f.gl, y = _.colorModeForRenderPass(), S = new cr(d.LEQUAL, cr.ReadWrite, _.depthRangeFor3D), C = _.useProgram("terrain"), I = r.getTerrainMesh();
32384        f.bindFramebuffer.set(null), f.viewport.set([0, 0, _.width, _.height]);
32385        for (const F of a) {
32386          const N = _.renderToTexture.getTexture(F), $ = r.getTerrainData(F.tileID);
32387          f.activeTexture.set(d.TEXTURE0), d.bindTexture(d.TEXTURE_2D, N.texture);
32388          const G = _.transform.calculatePosMatrix(F.tileID.toUnwrapped()), Q = r.getMeshFrameDelta(_.transform.zoom), te = _.transform.calculateFogMatrix(F.tileID.toUnwrapped()), ae = D(G, Q, te, _.style.sky, _.transform.pitch);
32389          C.draw(f, d.TRIANGLES, S, Wr.disabled, y, jr.backCCW, ae, $, "terrain", I.vertexBuffer, I.indexBuffer, I.segments);
32390        }
32391      }
32392      class Tn {
32393        constructor(r, a, f) {
32394          this.vertexBuffer = r, this.indexBuffer = a, this.segments = f;
32395        }
32396        destroy() {
32397          this.vertexBuffer.destroy(), this.indexBuffer.destroy(), this.segments.destroy(), this.vertexBuffer = null, this.indexBuffer = null, this.segments = null;
32398        }
32399      }
32400      class En {
32401        constructor(r, a) {
32402          this.context = new qh(r), this.transform = a, this._tileTextures = {}, this.terrainFacilitator = { dirty: !0, matrix: c.an(new Float64Array(16)), renderTime: 0 }, this.setup(), this.numSublayers = Ut.maxUnderzooming + Ut.maxOverzooming + 1, this.depthEpsilon = 1 / Math.pow(2, 16), this.crossTileSymbolIndex = new Ia();
32403        }
32404        resize(r, a, f) {
32405          if (this.width = Math.floor(r * f), this.height = Math.floor(a * f), this.pixelRatio = f, this.context.viewport.set([0, 0, this.width, this.height]), this.style) for (const d of this.style._order) this.style._layers[d].resize();
32406        }
32407        setup() {
32408          const r = this.context, a = new c.aX();
vendor: 4,487 bytes, lines 32409-32466
32409          a.emplaceBack(0, 0), a.emplaceBack(c.X, 0), a.emplaceBack(0, c.X), a.emplaceBack(c.X, c.X), this.tileExtentBuffer = r.createVertexBuffer(a, Co.members), this.tileExtentSegments = c.a0.simpleSegment(0, 0, 4, 2);
32410          const f = new c.aX();
32411          f.emplaceBack(0, 0), f.emplaceBack(c.X, 0), f.emplaceBack(0, c.X), f.emplaceBack(c.X, c.X), this.debugBuffer = r.createVertexBuffer(f, Co.members), this.debugSegments = c.a0.simpleSegment(0, 0, 4, 5);
32412          const d = new c.$();
32413          d.emplaceBack(0, 0, 0, 0), d.emplaceBack(c.X, 0, c.X, 0), d.emplaceBack(0, c.X, 0, c.X), d.emplaceBack(c.X, c.X, c.X, c.X), this.rasterBoundsBuffer = r.createVertexBuffer(d, nt.members), this.rasterBoundsSegments = c.a0.simpleSegment(0, 0, 4, 2);
32414          const y = new c.aX();
32415          y.emplaceBack(0, 0), y.emplaceBack(1, 0), y.emplaceBack(0, 1), y.emplaceBack(1, 1), this.viewportBuffer = r.createVertexBuffer(y, Co.members), this.viewportSegments = c.a0.simpleSegment(0, 0, 4, 2);
32416          const S = new c.aZ();
32417          S.emplaceBack(0), S.emplaceBack(1), S.emplaceBack(3), S.emplaceBack(2), S.emplaceBack(0), this.tileBorderIndexBuffer = r.createIndexBuffer(S);
32418          const C = new c.aY();
32419          C.emplaceBack(0, 1, 2), C.emplaceBack(2, 1, 3), this.quadTriangleIndexBuffer = r.createIndexBuffer(C);
32420          const I = this.context.gl;
32421          this.stencilClearMode = new Wr({ func: I.ALWAYS, mask: 0 }, 0, 255, I.ZERO, I.ZERO, I.ZERO);
32422        }
32423        clearStencil() {
32424          const r = this.context, a = r.gl;
32425          this.nextStencilID = 1, this.currentStencilSource = void 0;
32426          const f = c.H();
32427          c.aP(f, 0, this.width, this.height, 0, 0, 1), c.K(f, f, [a.drawingBufferWidth, a.drawingBufferHeight, 0]), this.useProgram("clippingMask").draw(r, a.TRIANGLES, cr.disabled, this.stencilClearMode, Gr.disabled, jr.disabled, Zt(f), null, "$clipping", this.viewportBuffer, this.quadTriangleIndexBuffer, this.viewportSegments);
32428        }
32429        _renderTileClippingMasks(r, a) {
32430          if (this.currentStencilSource === r.source || !r.isTileClipped() || !a || !a.length) return;
32431          this.currentStencilSource = r.source;
32432          const f = this.context, d = f.gl;
32433          this.nextStencilID + a.length > 256 && this.clearStencil(), f.setColorMode(Gr.disabled), f.setDepthMode(cr.disabled);
32434          const y = this.useProgram("clippingMask");
32435          this._tileClippingMaskIDs = {};
32436          for (const S of a) {
32437            const C = this._tileClippingMaskIDs[S.key] = this.nextStencilID++, I = this.style.map.terrain && this.style.map.terrain.getTerrainData(S);
32438            y.draw(f, d.TRIANGLES, cr.disabled, new Wr({ func: d.ALWAYS, mask: 0 }, C, 255, d.KEEP, d.KEEP, d.REPLACE), Gr.disabled, jr.disabled, Zt(S.posMatrix), I, "$clipping", this.tileExtentBuffer, this.quadTriangleIndexBuffer, this.tileExtentSegments);
32439          }
32440        }
32441        stencilModeFor3D() {
32442          this.currentStencilSource = void 0, this.nextStencilID + 1 > 256 && this.clearStencil();
32443          const r = this.nextStencilID++, a = this.context.gl;
32444          return new Wr({ func: a.NOTEQUAL, mask: 255 }, r, 255, a.KEEP, a.KEEP, a.REPLACE);
32445        }
32446        stencilModeForClipping(r) {
32447          const a = this.context.gl;
32448          return new Wr({ func: a.EQUAL, mask: 255 }, this._tileClippingMaskIDs[r.key], 0, a.KEEP, a.KEEP, a.REPLACE);
32449        }
32450        stencilConfigForOverlap(r) {
32451          const a = this.context.gl, f = r.sort((S, C) => C.overscaledZ - S.overscaledZ), d = f[f.length - 1].overscaledZ, y = f[0].overscaledZ - d + 1;
32452          if (y > 1) {
32453            this.currentStencilSource = void 0, this.nextStencilID + y > 256 && this.clearStencil();
32454            const S = {};
32455            for (let C = 0; C < y; C++) S[C + d] = new Wr({ func: a.GEQUAL, mask: 255 }, C + this.nextStencilID, 255, a.KEEP, a.KEEP, a.REPLACE);
32456            return this.nextStencilID += y, [S, f];
32457          }
32458          return [{ [d]: Wr.disabled }, f];
32459        }
32460        colorModeForRenderPass() {
32461          const r = this.context.gl;
32462          return this._showOverdrawInspector ? new Gr([r.CONSTANT_COLOR, r.ONE], new c.aM(0.125, 0.125, 0.125, 0), [!0, !0, !0, !0]) : this.renderPass === "opaque" ? Gr.unblended : Gr.alphaBlended;
32463        }
32464        depthModeForSublayer(r, a, f) {
32465          if (!this.opaquePassEnabledForLayer()) return cr.disabled;
32466          const d = 1 - ((1 + this.currentLayer) * this.numSublayers + r) * this.depthEpsilon;
vendor: 4,680 bytes, lines 32467-32524
32467          return new cr(f || this.context.gl.LEQUAL, a, [d, d]);
32468        }
32469        opaquePassEnabledForLayer() {
32470          return this.currentLayer < this.opaquePassCutoff;
32471        }
32472        render(r, a) {
32473          this.style = r, this.options = a, this.lineAtlas = r.lineAtlas, this.imageManager = r.imageManager, this.glyphManager = r.glyphManager, this.symbolFadeChange = r.placement.symbolFadeChange(R.now()), this.imageManager.beginFrame();
32474          const f = this.style._order, d = this.style.sourceCaches, y = {}, S = {}, C = {};
32475          for (const I in d) {
32476            const F = d[I];
32477            F.used && F.prepare(this.context), y[I] = F.getVisibleCoordinates(), S[I] = y[I].slice().reverse(), C[I] = F.getVisibleCoordinates(!0).reverse();
32478          }
32479          this.opaquePassCutoff = 1 / 0;
32480          for (let I = 0; I < f.length; I++) if (this.style._layers[f[I]].is3D()) {
32481            this.opaquePassCutoff = I;
32482            break;
32483          }
32484          this.maybeDrawDepthAndCoords(!1), this.renderToTexture && (this.renderToTexture.prepareForRender(this.style, this.transform.zoom), this.opaquePassCutoff = 0), this.renderPass = "offscreen";
32485          for (const I of f) {
32486            const F = this.style._layers[I];
32487            if (!F.hasOffscreenPass() || F.isHidden(this.transform.zoom)) continue;
32488            const N = S[F.source];
32489            (F.type === "custom" || N.length) && this.renderLayer(this, d[F.source], F, N);
32490          }
32491          if (this.context.bindFramebuffer.set(null), this.context.clear({ color: a.showOverdrawInspector ? c.aM.black : c.aM.transparent, depth: 1 }), this.clearStencil(), this.style.sky && function(I, F) {
32492            const N = I.context, $ = N.gl, G = ((pe, _e, se) => ({ u_sky_color: pe.properties.get("sky-color"), u_horizon_color: pe.properties.get("horizon-color"), u_horizon: (_e.height / 2 + _e.getHorizon()) * se, u_sky_horizon_blend: pe.properties.get("sky-horizon-blend") * _e.height / 2 * se }))(F, I.style.map.transform, I.pixelRatio), Q = new cr($.LEQUAL, cr.ReadWrite, [0, 1]), te = Wr.disabled, ae = I.colorModeForRenderPass(), fe = I.useProgram("sky");
32493            if (!F.mesh) {
32494              const pe = new c.aX();
32495              pe.emplaceBack(-1, -1), pe.emplaceBack(1, -1), pe.emplaceBack(1, 1), pe.emplaceBack(-1, 1);
32496              const _e = new c.aY();
32497              _e.emplaceBack(0, 1, 2), _e.emplaceBack(0, 2, 3), F.mesh = new Tn(N.createVertexBuffer(pe, Co.members), N.createIndexBuffer(_e), c.a0.simpleSegment(0, 0, pe.length, _e.length));
32498            }
32499            fe.draw(N, $.TRIANGLES, Q, te, ae, jr.disabled, G, void 0, "sky", F.mesh.vertexBuffer, F.mesh.indexBuffer, F.mesh.segments);
32500          }(this, this.style.sky), this._showOverdrawInspector = a.showOverdrawInspector, this.depthRangeFor3D = [0, 1 - (r._order.length + 2) * this.numSublayers * this.depthEpsilon], !this.renderToTexture) for (this.renderPass = "opaque", this.currentLayer = f.length - 1; this.currentLayer >= 0; this.currentLayer--) {
32501            const I = this.style._layers[f[this.currentLayer]], F = d[I.source], N = y[I.source];
32502            this._renderTileClippingMasks(I, N), this.renderLayer(this, F, I, N);
32503          }
32504          for (this.renderPass = "translucent", this.currentLayer = 0; this.currentLayer < f.length; this.currentLayer++) {
32505            const I = this.style._layers[f[this.currentLayer]], F = d[I.source];
32506            if (this.renderToTexture && this.renderToTexture.renderLayer(I)) continue;
32507            const N = (I.type === "symbol" ? C : S)[I.source];
32508            this._renderTileClippingMasks(I, y[I.source]), this.renderLayer(this, F, I, N);
32509          }
32510          if (this.options.showTileBoundaries) {
32511            const I = function(F, N) {
32512              let $ = null;
32513              const G = Object.values(F._layers).flatMap((fe) => fe.source && !fe.isHidden(N) ? [F.sourceCaches[fe.source]] : []), Q = G.filter((fe) => fe.getSource().type === "vector"), te = G.filter((fe) => fe.getSource().type !== "vector"), ae = (fe) => {
32514                (!$ || $.getSource().maxzoom < fe.getSource().maxzoom) && ($ = fe);
32515              };
32516              return Q.forEach((fe) => ae(fe)), $ || te.forEach((fe) => ae(fe)), $;
32517            }(this.style, this.transform.zoom);
32518            I && function(F, N, $) {
32519              for (let G = 0; G < $.length; G++) In(F, N, $[G]);
32520            }(this, I, I.getVisibleCoordinates());
32521          }
32522          this.options.showPadding && function(I) {
32523            const F = I.transform.padding;
32524            Vr(I, I.transform.height - (F.top || 0), 3, bc), Vr(I, F.bottom || 0, 3, be), br(I, F.left || 0, 3, Ue), br(I, I.transform.width - (F.right || 0
32524), 3, bt);
32525            const N = I.transform.centerPoint;
32526            (function($, G, Q, te) {
32527              cn($, G - 1, Q - 10, 2, 20, te), cn($, G - 10, Q - 1, 20, 2, te);
32528            })(I, N.x, I.transform.height - N.y, qt);
32529          }(this), this.context.setDefault();
32530        }
32531        maybeDrawDepthAndCoords(r) {
32532          if (!this.style || !this.style.map || !this.style.map.terrain) return;
32533          const a = this.terrainFacilitator.matrix, f = this.transform.modelViewProjectionMatrix;
32534          let d = this.terrainFacilitator.dirty;
32535          d || (d = r ? !c.a_(a, f) : !c.a$(a, f)), d || (d = this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length > 0), d && (c.b0(a, f), this.terrainFacilitator.renderTime = Date.now(), this.terrainFacilitator.dirty = !1, function(y, S) {
32536            const C = y.context, I = C.gl, F = Gr.unblended, N = new cr(I.LEQUAL, cr.ReadWrite, [0, 1]), $ = S.getTerrainMesh(), G = S.sourceCache.getRenderableTiles(), Q = y.useProgram("terrainDepth");
32537            C.bindFramebuffer.set(S.getFramebuffer("depth").framebuffer), C.viewport.set([0, 0, y.width / devicePixelRatio, y.height / devicePixelRatio]), C.clear({ color: c.aM.transparent, depth: 1 });
32538            for (const te of G) {
32539              const ae = S.getTerrainData(te.tileID), fe = { u_matrix: y.transform.calculatePosMatrix(te.tileID.toUnwrapped()), u_ele_delta: S.getMeshFrameDelta(y.transform.zoom) };
32540              Q.draw(C, I.TRIANGLES, N, Wr.disabled, F, jr.backCCW, fe, ae, "terrain", $.vertexBuffer, $.indexBuffer, $.segments);
32541            }
32542            C.bindFramebuffer.set(null), C.viewport.set([0, 0, y.width, y.height]);
32543          }(this, this.style.map.terrain), function(y, S) {
32544            const C = y.context, I = C.gl, F = Gr.unblended, N = new cr(I.LEQUAL, cr.ReadWrite, [0, 1]), $ = S.getTerrainMesh(), G = S.getCoordsTexture(), Q = S.sourceCache.getRenderableTiles(), te = y.useProgram("terrainCoords");
32545            C.bindFramebuffer.set(S.getFramebuffer("coords").framebuffer), C.viewport.set([0, 0, y.width / devicePixelRatio, y.height / devicePixelRatio]), C.clear({ color: c.aM.transparent, depth: 1 }), S.coordsIndex = [];
32546            for (const ae of Q) {
32547              const fe = S.getTerrainData(ae.tileID);
32548              C.activeTexture.set(I.TEXTURE0), I.bindTexture(I.TEXTURE_2D, G.texture);
32549              const pe = { u_matrix: y.transform.calculatePosMatrix(ae.tileID.toUnwrapped()), u_terrain_coords_id: (255 - S.coordsIndex.length) / 255, u_texture: 0, u_ele_delta: S.getMeshFrameDelta(y.transform.zoom) };
32550              te.draw(C, I.TRIANGLES, N, Wr.disabled, F, jr.backCCW, pe, fe, "terrain", $.vertexBuffer, $.indexBuffer, $.segments), S.coordsIndex.push(ae.tileID.key);
32551            }
32552            C.bindFramebuffer.set(null), C.viewport.set([0, 0, y.width, y.height]);
32553          }(this, this.style.map.terrain));
32554        }
32555        renderLayer(r, a, f, d) {
32556          if (!f.isHidden(this.transform.zoom) && (f.type === "background" || f.type === "custom" || (d || []).length)) switch (this.id = f.id, f.type) {
32557            case "symbol":
32558              (function(y, S, C, I, F) {
32559                if (y.renderPass !== "translucent") return;
32560                const N = Wr.disabled, $ = y.colorModeForRenderPass();
32561                (C._unevaluatedLayout.hasValue("text-variable-anchor") || C._unevaluatedLayout.hasValue("text-variable-anchor-offset")) && function(G, Q, te, ae, fe, pe, _e, se, Te) {
32562                  const Me = Q.transform, Fe = Pi(), Je = fe === "map", lt = pe === "map";
32563                  for (const vt of G) {
32564                    const Ct = ae.getTile(vt), gt = Ct.getBucket(te);
32565                    if (!gt || !gt.text || !gt.text.segments.get().length) continue;
32566                    const pt = c.ag(gt.textSizeData, Me.zoom), Ft = gr(Ct, 1, Q.transform.zoom), ir = Bi(vt.posMatrix, lt, Je, Q.transform, Ft), yt = te.layout.get("icon-text-fit") !== "none" && gt.hasIconData();
32567                    if (pt) {
32568                      const Et = Math.pow(2, Me.zoom - Ct.tileID.overscaledZ), rr = Q.style.map.terrain ? (pr, xr) => Q.style.map.terrain.getElevation(vt, pr, xr) : null, yn = Fe.translatePosition(Me, Ct, _e, se);
32569                      ss(gt, Je, lt, Te, Me, ir, vt.posMatrix, Et, pt, yt, Fe, yn, vt.toUnwrapped(), rr);
32570                    }
32571                  }
32572                }(I, y, C, S, C.layout.get("text-rotation-alignment"), C.layout.get("text-pitch-alignment"), C.paint.get("text-translate"), C.paint.get("text-translate-anchor"), F), C.paint.get("icon-opacity").constantOr(1) !== 0 && ys(y, S, C, I, !1, C.paint.get("icon-translate"), C.paint.get("icon-translate-anchor"), C.layout.get("icon-rotation-alignment"), C.layout.get("icon-pitch-alignment"), C.layout.get("icon-keep-upright"), N, $), C.paint.get("text-opacity").constantOr(1) !== 0 && ys(y, S, C, I, !0, C.paint.get("text-translate"), C.paint.get("text-translate-anchor"), C.layout.get("text-rotation-alignment"), C.layout.get("text-pitch-alignment"), C.layout.get("text-keep-upright"), N, $), S.map.showCollisionBoxes && (Ra(y, S, C, I, !0), Ra(y, S, C, I, !1));
32573              })(r, a, f, d, this.style.placement.variableOffsets);
32574              break;
32575            case "circle":
32576              (function(y, S, C, I) {
32577                if (y.renderPass !== "translucent") return;
32578                const F = C.paint.get("circle-opacity"), N = C.paint.get("circle-stroke-width"), $ = C.paint.get("circle-stroke-opacity"), G = !C.layout.get("
32578circle-sort-key").isConstant();
32579                if (F.constantOr(1) === 0 && (N.constantOr(1) === 0 || $.constantOr(1) === 0)) return;
32580                const Q = y.context, te = Q.gl, ae = y.depthModeForSublayer(0, cr.ReadOnly), fe = Wr.disabled, pe = y.colorModeForRenderPass(), _e = [];
32581                for (let se = 0; se < I.length; se++) {
32582                  const Te = I[se], Me = S.getTile(Te), Fe = Me.getBucket(C);
32583                  if (!Fe) continue;
32584                  const Je = Fe.programConfigurations.get(C.id), lt = y.useProgram("circle", Je), vt = Fe.layoutVertexBuffer, Ct = Fe.indexBuffer, gt = y.style.map.terrain && y.style.map.terrain.getTerrainData(Te), pt = { programConfiguration: Je, program: lt, layoutVertexBuffer: vt, indexBuffer: Ct, uniformValues: mt(y, Te, Me, C), terrainData: gt };
32585                  if (G) {
32586                    const Ft = Fe.segments.get();
32587                    for (const ir of Ft) _e.push({ segments: new c.a0([ir]), sortKey: ir.sortKey, state: pt });
32588                  } else _e.push({ segments: Fe.segments, sortKey: 0, state: pt });
32589                }
32590                G && _e.sort((se, Te) => se.sortKey - Te.sortKey);
32591                for (const se of _e) {
32592                  const { programConfiguration: Te, program: Me, layoutVertexBuffer: Fe, indexBuffer: Je, uniformValues: lt, terrainData: vt } = se.state;
32593                  Me.draw(Q, te.TRIANGLES, ae, fe, pe, jr.disabled, lt, vt, C.id, Fe, Je, se.segments, C.paint, y.transform.zoom, Te);
32594                }
32595              })(r, a, f, d);
32596              break;
32597            case "heatmap":
32598              (function(y, S, C, I) {
32599                if (C.paint.get("heatmap-opacity") === 0) return;
32600                const F = y.context;
32601                if (y.style.map.terrain) {
32602                  for (const N of I) {
32603                    const $ = S.getTile(N);
32604                    S.hasRenderableParent(N) || (y.renderPass === "offscreen" ? $s(y, $, C, N) : y.renderPass === "translucent" && lo(y, C, N));
32605                  }
32606                  F.viewport.set([0, 0, y.width, y.height]);
32607                } else y.renderPass === "offscreen" ? function(N, $, G, Q) {
32608                  const te = N.context, ae = te.gl, fe = Wr.disabled, pe = new Gr([ae.ONE, ae.ONE], c.aM.transparent, [!0, !0, !0, !0]);
32609                  (function(_e, se, Te) {
32610                    const Me = _e.gl;
32611                    _e.activeTexture.set(Me.TEXTURE1), _e.viewport.set([0, 0, se.width / 4, se.height / 4]);
32612                    let Fe = Te.heatmapFbos.get(c.aU);
32613                    Fe ? (Me.bindTexture(Me.TEXTURE_2D, Fe.colorAttachment.get()), _e.bindFramebuffer.set(Fe.framebuffer)) : (Fe = La(_e, se.width / 4, se.height / 4), Te.heatmapFbos.set(c.aU, Fe));
32614                  })(te, N, G), te.clear({ color: c.aM.transparent });
32615                  for (let _e = 0; _e < Q.length; _e++) {
32616                    const se = Q[_e];
32617                    if ($.hasRenderableParent(se)) continue;
32618                    const Te = $.getTile(se), Me = Te.getBucket(G);
32619                    if (!Me) continue;
32620                    const Fe = Me.programConfigurations.get(G.id), Je = N.useProgram("heatmap", Fe), { zoom: lt } = N.transform;
32621                    Je.draw(te, ae.TRIANGLES, cr.disabled, fe, pe, jr.disabled, kr(se.posMatrix, Te, lt, G.paint.get("heatmap-intensity")), null, G.id, Me.layoutVertexBuffer, Me.indexBuffer, Me.segments, G.paint, N.transform.zoom, Fe);
32622                  }
32623                  te.viewport.set([0, 0, N.width, N.height]);
32624                }(y, S, C, I) : y.renderPass === "translucent" && function(N, $) {
32625                  const G = N.context, Q = G.gl;
32626                  G.setColorMode(N.colorModeForRenderPass());
32627                  const te = $.heatmapFbos.get(c.aU);
32628                  te && (G.activeTexture.set(Q.TEXTURE0), Q.bindTexture(Q.TEXTURE_2D, te.colorAttachment.get()), G.activeTexture.set(Q.TEXTURE1), co(G, $).bind(Q.LINEAR, Q.CLAMP_TO_EDGE), N.useProgram("heatmapTexture").draw(G, Q.TRIANGLES, cr.disabled, Wr.disabled, N.colorModeForRenderPass(), jr.disabled, Ye(N, $, 0, 1), null, $.id, N.viewportBuffer, N.quadTriangleIndexBuffer, N.viewportSegments, $.paint, N.transform.zoom));
32629                }(y, C);
32630              })(r, a, f, d);
32631              break;
32632            case "line":
32633              (function(y, S, C, I) {
32634                if (y.renderPass !== "translucent") return;
32635                const F = C.paint.get("line-opacity"), N = C.paint.get("line-width");
32636                if (F.constantOr(1) === 0 || N.constantOr(1) === 0) return;
32637                const $ = y.depthModeForSublayer(0, cr.ReadOnly), G = y.colorModeForRenderPass(), Q = C.paint.get("line-dasharray"), te = C.paint.get("line-pattern"), ae = te.constantOr(1), fe = C.paint.get("line-gradient"), pe = C.getCrossfadeParameters(), _e = ae ? "linePattern" : Q ? "lineSDF" : fe ? "lineGradient" : "line", se = y.context, Te = se.gl;
32638                let Me = !0;
32639                for (const Fe of I) {
32640                  const Je = S.getTile(Fe);
32641                  if (ae && !Je.patternsLoaded()) continue;
32642                  const lt = Je.getBucket(C);
32643                  if (!lt) continue;
32644                  const vt = lt.programConfigurations.get(C.id), Ct = y.context.program.get(), gt = y.useProgram(_e, vt), pt = Me || gt.program !== Ct, Ft = y.style.map.terrain && y.style.map.terrain.getTerrainData(Fe), ir = te.constantOr(null);
32645                  if (ir && Je.imageAtlas) {
32646                    const rr = Je.imageAtlas, yn = rr.patternPositions[ir.to.toString()], pr = rr.patternPositions[ir.from.toString()];
32647                    yn && pr && vt.setConstantPatternPositions(yn, pr);
32648                  }
32649                  const yt = Ft ? Fe : null, Et = ae ? ln(y, Je, C, pe, yt) : Q ? uc(y, Je, C, Q, pe, yt) : fe ? $n(y, Je, C, lt.lineClipsArray.length, yt) : Rr(y, Je, C, yt);
32650                  if (ae) se.activeTexture.set(Te.TEXTURE0), Je.imageAtlasTexture.bind(Te.LINEAR, Te.CLAMP_TO_EDGE), vt.updatePaintBuffers(pe);
32651                  else if (Q && (pt || y.lineAtlas.dirty)) se.activeTexture.set(Te.TEXTURE0), y.lineAtlas.bind(se);
32652                  else if (fe) {
32653                    const rr = lt.gradients[C.id];
32654                    let yn = rr.texture;
32655                    if (C.gradientVersion !== rr.version) {
32656                      let pr = 256;
32657                      if (C.stepInterpolant) {
32658                        const xr = S.getSource().maxzoom, _n = Fe.canonical.z === xr ? Math.ceil(1 << y.transform.maxZoom - Fe.canonical.z) : 1;
32659                        pr = c.ac(c.aV(lt.maxLineLength / c.X * 1024 * _n), 256, se.maxTextureSize);
32660                      }
32661                      rr.gradient = c.aW({ expression: C.gradientExpression(), evaluationKey: "lineProgress", resolution: pr, image: rr.gradient || void 0, clips: lt.lineClipsArray }), rr.texture ? rr.texture.update(rr.gradient) : rr.texture = new He(se, rr.gradient, Te.RGBA), rr.version = C.gradientVersion, yn = rr.texture;
32662                    }
32663                    se.activeTexture.set(Te.TEXTURE0), yn.bind(C.stepInterpolant ? Te.NEAREST : Te.LINEAR, Te.CLAMP_TO_EDGE);
32664                  }
32665                  gt.draw(se, Te.TRIANGLES, $, y.stencilModeForClipping(Fe), G, jr.disabled, Et, Ft, C.id, lt.layoutVertexBuffer, lt.indexBuffer, lt.segments, C.paint, y.transform.zoom, vt, lt.layoutVertexBuffer2), Me = !1;
32666                }
32667              })(r, a, f, d);
32668              break;
32669            case "fill":
32670              (function(y, S, C, I) {
32671                const F = C.paint.get("fill-color"), N = C.paint.get("fill-opacity");
32672                if (N.constantOr(1) === 0) return;
32673                const $ = y.colorModeForRenderPass(), G = C.paint.get("fill-pattern"), Q = y.opaquePassEnabledForLayer() && !G.constantOr(1) && F.constantOr(c.aM.transparent).a === 1 && N.constantOr(0) === 1 ? "opaque" : "translucent";
32674                if (y.renderPass === Q) {
32675                  const te = y.depthModeForSublayer(1, y.renderPass === "opaque" ? cr.ReadWrite : cr.ReadOnly);
32676                  ra(y, S, C, I, te, $, !1);
32677                }
32678                if (y.renderPass === "translucent" && C.paint.get("fill-antialias")) {
32679                  const te = y.depthModeForSublayer(C.getPaintProperty("fill-outline-color") ? 2 : 0, cr.ReadOnly);
32680                  ra(y, S, C, I, te, $, !0);
32681                }
32682              })(r, a, f, d);
32683              break;
32684            case "fill-extrusion":
32685              (function(y, S, C, I) {
32686                const F = C.paint.get("fill-extrusion-opacity");
32687                if (F !== 0 && y.renderPass === "translucent") {
32688                  const N = new cr(y.context.gl.LEQUAL, cr.ReadWrite, y.depthRangeFor3D);
32689                  if (F !== 1 || C.paint.get("fill-extrusion-pattern").constantOr(1)) Fa(y, S, C, I, N, Wr.disabled, Gr.disabled), Fa(y, S, C, I, N, y.stencilModeFor3D(), y.colorModeForRenderPass());
32690                  else {
32691                    const $ = y.colorModeForRenderPass();
32692                    Fa(y, S, C, I, N, Wr.disabled, $);
32693                  }
32694                }
32695              })(r, a, f, d);
32696              break;
32697            case "hillshade":
32698              (function(y, S, C, I) {
32699                if (y.renderPass !== "offscreen" && y.renderPass !== "translucent") return;
32700                const F = y.context, N = y.depthModeForSublayer(0, cr.ReadOnly), $ = y.colorModeForRenderPass(), [G, Q] = y.renderPass === "translucent" ? y.stencilConfigForOverlap(I) : [{}, I];
32701                for (const te of Q) {
32702                  const ae = S.getTile(te);
32703                  ae.needsHillshadePrepare !== void 0 && ae.needsHillshadePrepare && y.renderPass === "offscreen" ? _s(y, ae, C, N, Wr.disabled, $) : y.renderPass === "translucent" && ko(y, te, ae, C, N, G[te.overscaledZ], $);
32704                }
32705                F.viewport.set([0, 0, y.width, y.height]);
32706              })(r, a, f, d);
32707              break;
32708            case "raster":
32709              (function(y, S, C, I) {
32710                if (y.renderPass !== "translucent" || C.paint.get("raster-opacity") === 0 || !I.length) return;
32711                const F = y.context, N = F.gl, $ = S.getSource(), G = y.useProgram("raster"), Q = y.colorModeForRenderPass(), [te, ae] = $ instanceof Tt ? [{}, I] : y.stencilConfigForOverlap(I), fe = ae[ae.length - 1].overscaledZ, pe = !y.options.moving;
32712                for (const _e of ae) {
32713                  const se = y.depthModeForSublayer(_e.overscaledZ - fe, C.paint.get("raster-opacity") === 1 ? cr.ReadWrite : cr.ReadOnly, N.LESS), Te = S.getTile(_e);
32714                  Te.registerFadeDuration(C.paint.get("raster-fade-duration"));
32715                  const Me = S.findLoadedParent(_e, 0), Fe = S.findLoadedSibling(_e), Je = vc(Te, Me || Fe || null, S, C, y.transform, y.style.map.terrain);
32716                  let lt, vt;
32717                  const Ct = C.paint.get("raster-resampling") === "nearest" ? N.NEAREST : N.LINEAR;
32718                  F.activeTexture.set(N.TEXTURE0), Te.texture.bind(Ct, N.CLAMP_TO_EDGE, N.LINEAR_MIPMAP_NEAREST), F.activeTexture.set(N.TEXTURE1), Me ? (Me.texture.bind(Ct, N.CLAMP_TO_EDGE, N.LINEAR_MIPMAP_NEAREST), lt = Math.pow(2, Me.tileID.overscaledZ - Te.tileID.overscaledZ
32718), vt = [Te.tileID.canonical.x * lt % 1, Te.tileID.canonical.y * lt % 1]) : Te.texture.bind(Ct, N.CLAMP_TO_EDGE, N.LINEAR_MIPMAP_NEAREST), Te.texture.useMipmap && F.extTextureFilterAnisotropic && y.transform.pitch > 20 && N.texParameterf(N.TEXTURE_2D, F.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT, F.extTextureFilterAnisotropicMax);
32719                  const gt = y.style.map.terrain && y.style.map.terrain.getTerrainData(_e), pt = gt ? _e : null, Ft = pt ? pt.posMatrix : y.transform.calculatePosMatrix(_e.toUnwrapped(), pe), ir = mu(Ft, vt || [0, 0], lt || 1, Je, C);
32720                  $ instanceof Tt ? G.draw(F, N.TRIANGLES, se, Wr.disabled, Q, jr.disabled, ir, gt, C.id, $.boundsBuffer, y.quadTriangleIndexBuffer, $.boundsSegments) : G.draw(F, N.TRIANGLES, se, te[_e.overscaledZ], Q, jr.disabled, ir, gt, C.id, y.rasterBoundsBuffer, y.quadTriangleIndexBuffer, y.rasterBoundsSegments);
32721                }
32722              })(r, a, f, d);
32723              break;
32724            case "background":
32725              (function(y, S, C, I) {
32726                const F = C.paint.get("background-color"), N = C.paint.get("background-opacity");
32727                if (N === 0) return;
32728                const $ = y.context, G = $.gl, Q = y.transform, te = Q.tileSize, ae = C.paint.get("background-pattern");
32729                if (y.isPatternMissing(ae)) return;
32730                const fe = !ae && F.a === 1 && N === 1 && y.opaquePassEnabledForLayer() ? "opaque" : "translucent";
32731                if (y.renderPass !== fe) return;
32732                const pe = Wr.disabled, _e = y.depthModeForSublayer(0, fe === "opaque" ? cr.ReadWrite : cr.ReadOnly), se = y.colorModeForRenderPass(), Te = y.useProgram(ae ? "backgroundPattern" : "background"), Me = I || Q.coveringTiles({ tileSize: te, terrain: y.style.map.terrain });
32733                ae && ($.activeTexture.set(G.TEXTURE0), y.imageManager.bind(y.context));
32734                const Fe = C.getCrossfadeParameters();
32735                for (const Je of Me) {
32736                  const lt = I ? Je.posMatrix : y.transform.calculatePosMatrix(Je.toUnwrapped()), vt = ae ? Ma(lt, N, y, ae, { tileID: Je, tileSize: te }, Fe) : Pa(lt, N, F), Ct = y.style.map.terrain && y.style.map.terrain.getTerrainData(Je);
32737                  Te.draw($, G.TRIANGLES, _e, pe, se, jr.disabled, vt, Ct, C.id, y.tileExtentBuffer, y.quadTriangleIndexBuffer, y.tileExtentSegments);
32738                }
32739              })(r, 0, f, d);
32740              break;
32741            case "custom":
32742              (function(y, S, C) {
32743                const I = y.context, F = C.implementation;
32744                if (y.renderPass === "offscreen") {
32745                  const N = F.prerender;
32746                  N && (y.setCustomLayerDefaults(), I.setColorMode(y.colorModeForRenderPass()), N.call(F, I.gl, y.transform.customLayerMatrix()), I.setDirty(), y.setBaseState());
32747                } else if (y.renderPass === "translucent") {
32748                  y.setCustomLayerDefaults(), I.setColorMode(y.colorModeForRenderPass()), I.setStencilMode(Wr.disabled);
32749                  const N = F.renderingMode === "3d" ? new cr(y.context.gl.LEQUAL, cr.ReadWrite, y.depthRangeFor3D) : y.depthModeForSublayer(0, cr.ReadOnly);
32750                  I.setDepthMode(N), F.render(I.gl, y.transform.customLayerMatrix(), { farZ: y.transform.farZ, nearZ: y.transform.nearZ, fov: y.transform._fov, modelViewProjectionMatrix: y.transform.modelViewProjectionMatrix, projectionMatrix: y.transform.projectionMatrix }), I.setDirty(), y.setBaseState(), I.bindFramebuffer.set(null);
32751                }
32752              })(r, 0, f);
32753          }
32754        }
32755        translatePosMatrix(r, a, f, d, y) {
32756          if (!f[0] && !f[1]) return r;
32757          const S = y ? d === "map" ? this.transform.angle : 0 : d === "viewport" ? -this.transform.angle : 0;
32758          if (S) {
32759            const F = Math.sin(S), N = Math.cos(S);
32760            f = [f[0] * N - f[1] * F, f[0] * F + f[1] * N];
32761          }
32762          const C = [y ? f[0] : gr(a, f[0], this.transform.zoom), y ? f[1] : gr(a, f[1], this.transform.zoom), 0], I = new Float32Array(16);
32763          return c.J(I, r, C), I;
32764        }
32765        saveTileTexture(r) {
32766          const a = this._tileTextures[r.size[0]];
32767          a ? a.push(r) : this._tileTextures[r.size[0]] = [r];
32768        }
32769        getTileTexture(r) {
32770          const a = this._tileTextures[r];
32771          return a && a.length > 0 ? a.pop() : null;
32772        }
32773        isPatternMissing(r) {
32774          if (!r) return !1;
32775          if (!r.from || !r.to) return !0;
32776          const a = this.imageManager.getPattern(r.from.toString()), f = this.imageManager.getPattern(r.to.toString());
32777          return !a || !f;
32778        }
32779        useProgram(r, a) {
32780          this.cache = this.cache || {};
32781          const f = r + (a ? a.cacheKey : "") + (this._showOverdrawInspector ? "/overdraw" : "") + (this.style.map.terrain ? "/terrain" : "");
32782          return this.cache[f] || (this.cache[f] = new ce(this.context, io[r], a, ul[r], this._showOverdrawInspector, this.style.map.terrain)), this.cache[f];
32783        }
32784        setCustomLayerDefaults() {
32785          this.context.unbindVAO(), this.context.cullFace.setDefault(), this.context.activeTexture.setDefault(), this.context.pixelStoreUnpack.setDefault(), this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(), this.context.pixelStoreUnpackFlipY.setDefault();
32786        }
32787        setBaseState() {
32788          const r = this.context.gl;
32789          this.context.cullFace.set(!1), this.context.viewport.set([0, 0, this.width, this.height]), this.context.blendEquation.set(r.FUNC_ADD);
32790        }
32791        initDebugOverlayCanvas() {
32792          this.debugOverlayCanvas == null && (this.debugOverlayCanvas = document.createElement("canvas"), this.debugOverlayCanvas.width = 512, this.debugOverlayCanvas.height = 512, this.debugOverlayTexture = new He(this.context, this.debugOverlayCanvas, this.context.gl.RGBA));
32793        }
32794        destroy() {
32795          this.debugOverlayTexture && this.debugOverlayTexture.destroy();
32796        }
32797        overLimit() {
32798          const { drawingBufferWidth: r, drawingBufferHeight: a } = this.context.gl;
32799          return this.width !== r || this.height !== a;
32800        }
32801      }
32802      class si {
32803        constructor(r, a) {
32804          this.points = r, this.planes = a;
32805        }
32806        static fromInvProjectionMatrix(r, a, f) {
32807          const d = Math.pow(2, f), y = [[-1, 1, -1, 1], [1, 1, -1, 1], [1, -1, -1, 1], [-1, -1, -1, 1], [-1, 1, 1, 1], [1, 1, 1, 1], [1, -1, 1, 1], [-1, -1, 1, 1]].map((C) => {
32808            const I = 1 / (C = c.af([], C, r))[3] / a * d;
32809            return c.b1(C, C, [I, I, 1 / C[3], I]);
32810          }
32810), S = [[0, 1, 2], [6, 5, 4], [0, 3, 7], [2, 1, 5], [3, 2, 6], [0, 4, 5]].map((C) => {
32811            const I = function(G, Q) {
32812              var te = Q[0], ae = Q[1], fe = Q[2], pe = te * te + ae * ae + fe * fe;
32813              return pe > 0 && (pe = 1 / Math.sqrt(pe)), G[0] = Q[0] * pe, G[1] = Q[1] * pe, G[2] = Q[2] * pe, G;
32814            }([], function(G, Q, te) {
32815              var ae = Q[0], fe = Q[1], pe = Q[2], _e = te[0], se = te[1], Te = te[2];
32816              return G[0] = fe * Te - pe * se, G[1] = pe * _e - ae * Te, G[2] = ae * se - fe * _e, G;
32817            }([], je([], y[C[0]], y[C[1]]), je([], y[C[2]], y[C[1]]))), F = -((N = I)[0] * ($ = y[C[1]])[0] + N[1] * $[1] + N[2] * $[2]);
32818            var N, $;
32819            return I.concat(F);
32820          });
32821          return new si(y, S);
32822        }
32823      }
32824      class gi {
32825        constructor(r, a) {
32826          this.min = r, this.max = a, this.center = function(f, d, y) {
32827            return f[0] = 0.5 * d[0], f[1] = 0.5 * d[1], f[2] = 0.5 * d[2], f;
32828          }([], function(f, d, y) {
32829            return f[0] = d[0] + y[0], f[1] = d[1] + y[1], f[2] = d[2] + y[2], f;
32830          }([], this.min, this.max));
32831        }
32832        quadrant(r) {
32833          const a = [r % 2 == 0, r < 2], f = Ae(this.min), d = Ae(this.max);
32834          for (let y = 0; y < a.length; y++) f[y] = a[y] ? this.min[y] : this.center[y], d[y] = a[y] ? this.center[y] : this.max[y];
32835          return d[2] = this.max[2], new gi(f, d);
32836        }
32837        distanceX(r) {
32838          return Math.max(Math.min(this.max[0], r[0]), this.min[0]) - r[0];
32839        }
32840        distanceY(r) {
32841          return Math.max(Math.min(this.max[1], r[1]), this.min[1]) - r[1];
32842        }
32843        intersects(r) {
32844          const a = [[this.min[0], this.min[1], this.min[2], 1], [this.max[0], this.min[1], this.min[2], 1], [this.max[0], this.max[1], this.min[2], 1], [this.min[0], this.max[1], this.min[2], 1], [this.min[0], this.min[1], this.max[2], 1], [this.max[0], this.min[1], this.max[2], 1], [this.max[0], this.max[1], this.max[2], 1], [this.min[0], this.max[1], this.max[2], 1]];
32845          let f = !0;
32846          for (let d = 0; d < r.planes.length; d++) {
32847            const y = r.planes[d];
32848            let S = 0;
32849            for (let C = 0; C < a.length; C++) c.b2(y, a[C]) >= 0 && S++;
32850            if (S === 0) return 0;
32851            S !== a.length && (f = !1);
32852          }
32853          if (f) return 2;
32854          for (let d = 0; d < 3; d++) {
32855            let y = Number.MAX_VALUE, S = -Number.MAX_VALUE;
32856            for (let C = 0; C < r.points.length; C++) {
32857              const I = r.points[C][d] - this.min[d];
32858              y = Math.min(y, I), S = Math.max(S, I);
32859            }
32860            if (S < 0 || y > this.max[d] - this.min[d]) return 0;
32861          }
32862          return 1;
32863        }
32864      }
32865      class On {
32866        constructor(r = 0, a = 0, f = 0, d = 0) {
32867          if (isNaN(r) || r < 0 || isNaN(a) || a < 0 || isNaN(f) || f < 0 || isNaN(d) || d < 0) throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");
32868          this.top = r, this.bottom = a, this.left = f, this.right = d;
32869        }
32870        interpolate(r, a, f) {
32871          return a.top != null && r.top != null && (this.top = c.y.number(r.top, a.top, f)), a.bottom != null && r.bottom != null && (this.bottom = c.y.number(r.bottom, a.bottom, f)), a.left != null && r.left != null && (this.left = c.y.number(r.left, a.left, f)), a.right != null && r.right != null && (this.right = c.y.number(r.right, a.right, f)), this;
32872        }
32873        getCenter(r, a) {
32874          const f = c.ac((this.left + r - this.right) / 2, 0, r), d = c.ac((this.top + a - this.bottom) / 2, 0, a);
32875          return new c.P(f, d);
32876        }
32877        equals(r) {
32878          return this.top === r.top && this.bottom === r.bottom && this.left === r.left && this.right === r.right;
32879        }
32880        clone() {
32881          return new On(this.top, this.bottom, this.left, this.right);
32882        }
32883        toJSON() {
32884          return { top: this.top, bottom: this.bottom, left: this.left, right: this.right };
32885        }
32886      }
32887      const os = 85.051129;
32888      class as {
32889        constructor(r, a, f, d, y) {
32890          this.tileSize = 512, this._renderWorldCopies = y === void 0 || !!y, this._minZoom = r || 0, this._maxZoom = a || 22, this._minPitch = f ?? 0, this._maxPitch = d ?? 60, this.setMaxBounds(), this.width = 0, this.height = 0, this._center = new c.N(0, 0), this._elevation = 0, this.zoom = 0, this.angle = 0, this._fov = 0.6435011087932844, this._pitch = 0, this._unmodified = !0, this._edgeInsets = new On(), this._posMatrixCache = {}, this._alignedPosMatrixCache = {}, this._fogMatrixCache = {}, this.minElevationForCurrentTile = 0;
32891        }
32892        clone() {
32893          const r = new as(this._minZoom, this._maxZoom, this._minPitch, this.maxPitch, this._renderWorldCopies);
32894          return r.apply(this), r;
32895        }
32896        apply(r) {
32897          this.tileSize = r.tileSize, this.latRange = r.latRange, this.lngRange = r.lngRange, this.width = r.width, this.height = r.height, this._center = r._center, this._elevation = r._elevation, this.minElevationForCurrentTile = r.minElevationForCurrentTile, this.zoom = r.zoom, this.angle = r.angle, this._fov = r._fov, this._pitch = r._pitch, this._unmodified = r._unmodified, this._edgeInsets = r._edgeInsets.clone(), this._calcMatrices();
32898        }
32899        get minZoom() {
32900          return this._minZoom;
32901        }
32902        set minZoom(r) {
32903          this._minZoom !== r && (this._minZoom = r, this.zoom = Math.max(this.zoom, r));
32904        }
32905        get maxZoom() {
32906          return this._maxZoom;
32907        }
32908        set maxZoom(r) {
32909          this._maxZoom !== r && (this._maxZoom = r, this.zoom = Math.min(this.zoom, r));
32910        }
32911        get minPitch() {
32912          return this._minPitch;
32913        }
32914        set minPitch(r) {
32915          this._minPitch !== r && (this._minPitch = r, this.pitch = Math.max(this.pitch, r));
32916        }
32917        get maxPitch() {
32918          return this._maxPitch;
32919        }
32920        set maxPitch(r) {
32921          this._maxPitch !== r && (this._maxPitch = r, this.pitch = Math.min(this.pitch, r));
32922        }
32923        get renderWorldCopies() {
32924          return this._renderWorldCopies;
32925        }
32926        set renderWorldCopies(r) {
32927          r === void 0 ? r = !0 : r === null && (r = !1), this._renderWorldCopies = r;
32928        }
32929        get worldSize() {
32930          return this.tileSize * this.scale;
32931        }
32932        get centerOffset() {
32933          return this.centerPoint._sub(this.size._div(2));
32934        }
32935        get size() {
32936          return new c.P(this.width, this.height);
32937        }
32938        get bearing() {
32939          return -this.angle / Math.PI * 180;
32940        }
32941        set bearing(r) {
32942          const a = -c.b3(r, -180, 180) * Math.PI / 180;
32943          this.angle !== a && (this._unmodified = !1, this.angle = a, this._calcMatrices(), this.rotationMatrix = function() {
32944            var f = new c.A(4);
32945            return c.A != Float32Array && (f[1] = 0, f[2] = 0), f[0] = 1, f[3] = 1, f;
32946          }(), function(f, d, y) {
32947            var S = d[0], C = d[1], I = d[2], F = d[3], N = Math.sin(y), $ = Math.
32947cos(y);
32948            f[0] = S * $ + I * N, f[1] = C * $ + F * N, f[2] = S * -N + I * $, f[3] = C * -N + F * $;
32949          }(this.rotationMatrix, this.rotationMatrix, this.angle));
32950        }
32951        get pitch() {
32952          return this._pitch / Math.PI * 180;
32953        }
32954        set pitch(r) {
32955          const a = c.ac(r, this.minPitch, this.maxPitch) / 180 * Math.PI;
32956          this._pitch !== a && (this._unmodified = !1, this._pitch = a, this._calcMatrices());
32957        }
32958        get fov() {
32959          return this._fov / Math.PI * 180;
32960        }
32961        set fov(r) {
32962          r = Math.max(0.01, Math.min(60, r)), this._fov !== r && (this._unmodified = !1, this._fov = r / 180 * Math.PI, this._calcMatrices());
32963        }
32964        get zoom() {
32965          return this._zoom;
32966        }
32967        set zoom(r) {
32968          const a = Math.min(Math.max(r, this.minZoom), this.maxZoom);
32969          this._zoom !== a && (this._unmodified = !1, this._zoom = a, this.tileZoom = Math.max(0, Math.floor(a)), this.scale = this.zoomScale(a), this._constrain(), this._calcMatrices());
32970        }
32971        get center() {
32972          return this._center;
32973        }
32974        set center(r) {
32975          r.lat === this._center.lat && r.lng === this._center.lng || (this._unmodified = !1, this._center = r, this._constrain(), this._calcMatrices());
32976        }
32977        get elevation() {
32978          return this._elevation;
32979        }
32980        set elevation(r) {
32981          r !== this._elevation && (this._elevation = r, this._constrain(), this._calcMatrices());
32982        }
32983        get padding() {
32984          return this._edgeInsets.toJSON();
32985        }
32986        set padding(r) {
32987          this._edgeInsets.equals(r) || (this._unmodified = !1, this._edgeInsets.interpolate(this._edgeInsets, r, 1), this._calcMatrices());
32988        }
32989        get centerPoint() {
32990          return this._edgeInsets.getCenter(this.width, this.height);
32991        }
32992        isPaddingEqual(r) {
32993          return this._edgeInsets.equals(r);
32994        }
32995        interpolatePadding(r, a, f) {
32996          this._unmodified = !1, this._edgeInsets.interpolate(r, a, f), this._constrain(), this._calcMatrices();
32997        }
32998        coveringZoomLevel(r) {
32999          const a = (r.roundZoom ? Math.round : Math.floor)(this.zoom + this.scaleZoom(this.tileSize / r.tileSize));
33000          return Math.max(0, a);
33001        }
33002        getVisibleUnwrappedCoordinates(r) {
33003          const a = [new c.b4(0, r)];
33004          if (this._renderWorldCopies) {
33005            const f = this.pointCoordinate(new c.P(0, 0)), d = this.pointCoordinate(new c.P(this.width, 0)), y = this.pointCoordinate(new c.P(this.width, this.height)), S = this.pointCoordinate(new c.P(0, this.height)), C = Math.floor(Math.min(f.x, d.x, y.x, S.x)), I = Math.floor(Math.max(f.x, d.x, y.x, S.x)), F = 1;
33006            for (let N = C - F; N <= I + F; N++) N !== 0 && a.push(new c.b4(N, r));
33007          }
33008          return a;
33009        }
33010        coveringTiles(r) {
33011          var a, f;
33012          let d = this.coveringZoomLevel(r);
33013          const y = d;
33014          if (r.minzoom !== void 0 && d < r.minzoom) return [];
33015          r.maxzoom !== void 0 && d > r.maxzoom && (d = r.maxzoom);
33016          const S = this.pointCoordinate(this.getCameraPoint()), C = c.Z.fromLngLat(this.center), I = Math.pow(2, d), F = [I * S.x, I * S.y, 0], N = [I * C.x, I * C.y, 0], $ = si.fromInvProjectionMatrix(this.invModelViewProjectionMatrix, this.worldSize, d);
33017          let G = r.minzoom || 0;
33018          !r.terrain && this.pitch <= 60 && this._edgeInsets.top < 0.1 && (G = d);
33019          const Q = r.terrain ? 2 / Math.min(this.tileSize, r.tileSize) * this.tileSize : 3, te = (se) => ({ aabb: new gi([se * I, 0, 0], [(se + 1) * I, I, 0]), zoom: 0, x: 0, y: 0, wrap: se, fullyVisible: !1 }), ae = [], fe = [], pe = d, _e = r.reparseOverscaled ? y : d;
33020          if (this._renderWorldCopies) for (let se = 1; se <= 3; se++) ae.push(te(-se)), ae.push(te(se));
33021          for (ae.push(te(0)); ae.length > 0; ) {
33022            const se = ae.pop(), Te = se.x, Me = se.y;
33023            let Fe = se.fullyVisible;
33024            if (!Fe) {
33025              const gt = se.aabb.intersects($);
33026              if (gt === 0) continue;
33027              Fe = gt === 2;
33028            }
33029            const Je = r.terrain ? F : N, lt = se.aabb.distanceX(Je), vt = se.aabb.distanceY(Je), Ct = Math.max(Math.abs(lt), Math.abs(vt));
33030            if (se.zoom === pe || Ct > Q + (1 << pe - se.zoom) - 2 && se.zoom >= G) {
33031              const gt = pe - se.zoom, pt = F[0] - 0.5 - (Te << gt), Ft = F[1] - 0.5 - (Me << gt);
33032              fe.push({ tileID: new c.S(se.zoom === pe ? _e : se.zoom, se.wrap, se.zoom, Te, Me), distanceSq: Ne([N[0] - 0.5 - Te, N[1] - 0.5 - Me]), tileDistanceToCamera: Math.sqrt(pt * pt + Ft * Ft) });
33033            } else for (let gt = 0; gt < 4; gt++) {
33034              const pt = (Te << 1) + gt % 2, Ft = (Me << 1) + (gt >> 1), ir = se.zoom + 1;
33035              let yt = se.aabb.quadrant(gt);
33036              if (r.terrain) {
33037                const Et = new c.S(ir, se.wrap, ir, pt, Ft), rr = r.terrain.getMinMaxElevation(Et), yn = (a = rr.minElevation) !== null && a !== void 0 ? a : this.elevation, pr = (f = rr.maxElevation) !== null && f !== void 0 ? f : this.elevation;
33038                yt = new gi([yt.min[0], yt.min[1], yn], [yt.max[0], yt.max[1], pr]);
33039              }
33040              ae.push({ aabb: yt, zoom: ir, x: pt, y: Ft, wrap: se.wrap, fullyVisible: Fe });
33041            }
33042          }
33043          return fe.sort((se, Te) => se.distanceSq - Te.distanceSq).map((se) => se.tileID);
33044        }
33045        resize(r, a) {
33046          this.width = r, this.height = a, this.pixelsToGLUnits = [2 / r, -2 / a], this._constrain(), this._calcMatrices();
33047        }
33048        get unmodified() {
33049          return this._unmodified;
33050        }
33051        zoomScale(r) {
33052          return Math.pow(2, r);
33053        }
33054        scaleZoom(r) {
33055          return Math.log(r) / Math.LN2;
33056        }
33057        project(r) {
33058          const a = c.ac(r.lat, -85.051129, os);
33059          return new c.P(c.O(r.lng) * this.worldSize, c.Q(a) * this.worldSize);
33060        }
33061        unproject(r) {
33062          return new c.Z(r.x / this.worldSize, r.y / this.worldSize).toLngLat();
33063        }
33064        get point() {
33065          return this.project(this.center);
33066        }
33067        getCameraPosition() {
33068          return { lngLat: this.pointLocation(this.getCameraPoint()), altitude: Math.cos(this._pitch) * this.cameraToCenterDistance / this._pixelPerMeter + this.elevation };
33069        }
33070        recalculateZoom(r) {
vendor: 5,300 bytes, lines 33071-33167
33071          const a = this.elevation, f = Math.cos(this._pitch) * this.cameraToCenterDistance / this._pixelPerMeter, d = this.pointLocation(this.centerPoint, r), y = r.getElevationForLngLatZoom(d, this.tileZoom);
33072          if (!(this.elevation - y)) return;
33073          const S = f + a - y, C = Math.cos(this._pitch) * this.cameraToCenterDistance / S / c.b5(1, d.lat), I = this.scaleZoom(C / this.tileSize);
33074          this._elevation = y, this._center = d, this.zoom = I;
33075        }
33076        setLocationAtPoint(r, a) {
33077          const f = this.pointCoordinate(a), d = this.pointCoordinate(this.centerPoint), y = this.locationCoordinate(r), S = new c.Z(y.x - (f.x - d.x), y.y - (f.y - d.y));
33078          this.center = this.coordinateLocation(S), this._renderWorldCopies && (this.center = this.center.wrap());
33079        }
33080        locationPoint(r, a) {
33081          return a ? this.coordinatePoint(this.locationCoordinate(r), a.getElevationForLngLatZoom(r, this.tileZoom), this.pixelMatrix3D) : this.coordinatePoint(this.locationCoordinate(r));
33082        }
33083        pointLocation(r, a) {
33084          return this.coordinateLocation(this.pointCoordinate(r, a));
33085        }
33086        locationCoordinate(r) {
33087          return c.Z.fromLngLat(r);
33088        }
33089        coordinateLocation(r) {
33090          return r && r.toLngLat();
33091        }
33092        pointCoordinate(r, a) {
33093          if (a) {
33094            const G = a.pointCoordinate(r);
33095            if (G != null) return G;
33096          }
33097          const f = [r.x, r.y, 0, 1], d = [r.x, r.y, 1, 1];
33098          c.af(f, f, this.pixelMatrixInverse), c.af(d, d, this.pixelMatrixInverse);
33099          const y = f[3], S = d[3], C = f[1] / y, I = d[1] / S, F = f[2] / y, N = d[2] / S, $ = F === N ? 0 : (0 - F) / (N - F);
33100          return new c.Z(c.y.number(f[0] / y, d[0] / S, $) / this.worldSize, c.y.number(C, I, $) / this.worldSize);
33101        }
33102        coordinatePoint(r, a = 0, f = this.pixelMatrix) {
33103          const d = [r.x * this.worldSize, r.y * this.worldSize, a, 1];
33104          return c.af(d, d, f), new c.P(d[0] / d[3], d[1] / d[3]);
33105        }
33106        getBounds() {
33107          const r = Math.max(0, this.height / 2 - this.getHorizon());
33108          return new re().extend(this.pointLocation(new c.P(0, r))).extend(this.pointLocation(new c.P(this.width, r))).extend(this.pointLocation(new c.P(this.width, this.height))).extend(this.pointLocation(new c.P(0, this.height)));
33109        }
33110        getMaxBounds() {
33111          return this.latRange && this.latRange.length === 2 && this.lngRange && this.lngRange.length === 2 ? new re([this.lngRange[0], this.latRange[0]], [this.lngRange[1], this.latRange[1]]) : null;
33112        }
33113        getHorizon() {
33114          return Math.tan(Math.PI / 2 - this._pitch) * this.cameraToCenterDistance * 0.85;
33115        }
33116        setMaxBounds(r) {
33117          r ? (this.lngRange = [r.getWest(), r.getEast()], this.latRange = [r.getSouth(), r.getNorth()], this._constrain()) : (this.lngRange = null, this.latRange = [-85.051129, os]);
33118        }
33119        calculateTileMatrix(r) {
33120          const a = r.canonical, f = this.worldSize / this.zoomScale(a.z), d = a.x + Math.pow(2, a.z) * r.wrap, y = c.an(new Float64Array(16));
33121          return c.J(y, y, [d * f, a.y * f, 0]), c.K(y, y, [f / c.X, f / c.X, 1]), y;
33122        }
33123        calculatePosMatrix(r, a = !1) {
33124          const f = r.key, d = a ? this._alignedPosMatrixCache : this._posMatrixCache;
33125          if (d[f]) return d[f];
33126          const y = this.calculateTileMatrix(r);
33127          return c.L(y, a ? this.alignedModelViewProjectionMatrix : this.modelViewProjectionMatrix, y), d[f] = new Float32Array(y), d[f];
33128        }
33129        calculateFogMatrix(r) {
33130          const a = r.key, f = this._fogMatrixCache;
33131          if (f[a]) return f[a];
33132          const d = this.calculateTileMatrix(r);
33133          return c.L(d, this.fogMatrix, d), f[a] = new Float32Array(d), f[a];
33134        }
33135        customLayerMatrix() {
33136          return this.mercatorMatrix.slice();
33137        }
33138        getConstrained(r, a) {
33139          a = c.ac(+a, this.minZoom, this.maxZoom);
33140          const f = { center: new c.N(r.lng, r.lat), zoom: a };
33141          let d = this.lngRange;
33142          if (!this._renderWorldCopies && d === null) {
33143            const se = 179.9999999999;
33144            d = [-se, se];
33145          }
33146          const y = this.tileSize * this.zoomScale(f.zoom);
33147          let S = 0, C = y, I = 0, F = y, N = 0, $ = 0;
33148          const { x: G, y: Q } = this.size;
33149          if (this.latRange) {
33150            const se = this.latRange;
33151            S = c.Q(se[1]) * y, C = c.Q(se[0]) * y, C - S < Q && (N = Q / (C - S));
33152          }
33153          d && (I = c.b3(c.O(d[0]) * y, 0, y), F = c.b3(c.O(d[1]) * y, 0, y), F < I && (F += y), F - I < G && ($ = G / (F - I)));
33154          const { x: te, y: ae } = this.project.call({ worldSize: y }, r);
33155          let fe, pe;
33156          const _e = Math.max($ || 0, N || 0);
33157          if (_e) {
33158            const se = new c.P($ ? (F + I) / 2 : te, N ? (C + S) / 2 : ae);
33159            return f.center = this.unproject.call({ worldSize: y }, se).wrap(), f.zoom += this.scaleZoom(_e), f;
33160          }
33161          if (this.latRange) {
33162            const se = Q / 2;
33163            ae - se < S && (pe = S + se), ae + se > C && (pe = C - se);
33164          }
33165          if (d) {
33166            const se = (I + F) / 2;
33167            let Te = te;
vendor: 4,182 bytes, lines 33168-33198
33168            this._renderWorldCopies && (Te = c.b3(te, se - y / 2, se + y / 2));
33169            const Me = G / 2;
33170            Te - Me < I && (fe = I + Me), Te + Me > F && (fe = F - Me);
33171          }
33172          if (fe !== void 0 || pe !== void 0) {
33173            const se = new c.P(fe ?? te, pe ?? ae);
33174            f.center = this.unproject.call({ worldSize: y }, se).wrap();
33175          }
33176          return f;
33177        }
33178        _constrain() {
33179          if (!this.center || !this.width || !this.height || this._constraining) return;
33180          this._constraining = !0;
33181          const r = this._unmodified, { center: a, zoom: f } = this.getConstrained(this.center, this.zoom);
33182          this.center = a, this.zoom = f, this._unmodified = r, this._constraining = !1;
33183        }
33184        _calcMatrices() {
33185          if (!this.height) return;
33186          const r = this.centerOffset, a = this.point.x, f = this.point.y;
33187          this.cameraToCenterDistance = 0.5 / Math.tan(this._fov / 2) * this.height, this._pixelPerMeter = c.b5(1, this.center.lat) * this.worldSize;
33188          let d = c.an(new Float64Array(16));
33189          c.K(d, d, [this.width / 2, -this.height / 2, 1]), c.J(d, d, [1, -1, 0]), this.labelPlaneMatrix = d, d = c.an(new Float64Array(16)), c.K(d, d, [1, -1, 1]), c.J(d, d, [-1, -1, 0]), c.K(d, d, [2 / this.width, 2 / this.height, 1]), this.glCoordMatrix = d;
33190          const y = this.cameraToCenterDistance + this._elevation * this._pixelPerMeter / Math.cos(this._pitch), S = Math.min(this.elevation, this.minElevationForCurrentTile), C = y - S * this._pixelPerMeter / Math.cos(this._pitch), I = S < 0 ? C : y, F = Math.PI / 2 + this._pitch, N = this._fov * (0.5 + r.y / this.height), $ = Math.sin(N) * I / Math.sin(c.ac(Math.PI - F - N, 0.01, Math.PI - 0.01)), G = this.getHorizon(), Q = 2 * Math.atan(G / this.cameraToCenterDistance) * (0.5 + r.y / (2 * G)), te = Math.sin(Q) * I / Math.sin(c.ac(Math.PI - F - Q, 0.01, Math.PI - 0.01)), ae = Math.min($, te);
33191          this.farZ = 1.01 * (Math.cos(Math.PI / 2 - this._pitch) * ae + I), this.nearZ = this.height / 50, d = new Float64Array(16), c.b6(d, this._fov, this.width / this.height, this.nearZ, this.farZ), d[8] = 2 * -r.x / this.width, d[9] = 2 * r.y / this.height, this.projectionMatrix = c.ae(d), c.K(d, d, [1, -1, 1]), c.J(d, d, [0, 0, -this.cameraToCenterDistance]), c.b7(d, d, this._pitch), c.ad(d, d, this.angle), c.J(d, d, [-a, -f, 0]), this.mercatorMatrix = c.K([], d, [this.worldSize, this.worldSize, this.worldSize]), c.K(d, d, [1, 1, this._pixelPerMeter]), this.pixelMatrix = c.L(new Float64Array(16), this.labelPlaneMatrix, d), c.J(d, d, [0, 0, -this.elevation]), this.modelViewProjectionMatrix = d, this.invModelViewProjectionMatrix = c.as([], d), this.fogMatrix = new Float64Array(16), c.b6(this.fogMatrix, this._fov, this.width / this.height, y, this.farZ), this.fogMatrix[8] = 2 * -r.x / this.width, this.fogMatrix[9] = 2 * r.y / this.height, c.K(this.fogMatrix, this.fogMatrix, [1, -1, 1]), c.J(this.fogMatrix, this.fogMatrix, [0, 0, -this.cameraToCenterDistance]), c.b7(this.fogMatrix, this.fogMatrix, this._pitch), c.ad(this.fogMatrix, this.fogMatrix, this.angle), c.J(this.fogMatrix, this.fogMatrix, [-a, -f, 0]), c.K(this.fogMatrix, this.fogMatrix, [1, 1, this._pixelPerMeter]), c.J(this.fogMatrix, this.fogMatrix, [0, 0, -this.elevation]), this.pixelMatrix3D = c.L(new Float64Array(16), this.labelPlaneMatrix, d);
33192          const fe = this.width % 2 / 2, pe = this.height % 2 / 2, _e = Math.cos(this.angle), se = Math.sin(this.angle), Te = a - Math.round(a) + _e * fe + se * pe, Me = f - Math.round(f) + _e * pe + se * fe, Fe = new Float64Array(d);
33193          if (c.J(Fe, Fe, [Te > 0.5 ? Te - 1 : Te, Me > 0.5 ? Me - 1 : Me, 0]), this.alignedModelViewProjectionMatrix = Fe, d = c.as(new Float64Array(16), this.pixelMatrix), !d) throw new Error("failed to invert matrix");
33194          this.pixelMatrixInverse = d, this._posMatrixCache = {}, this._alignedPosMatrixCache = {}, this._fogMatrixCache = {};
33195        }
33196        maxPitchScaleFactor() {
33197          if (!this.pixelMatrixInverse) return 1;
33198          const r = this.pointCoordinate(new c.P(0, 0)), a = [r.x * this.worldSize, r.y * this.worldSize, 0, 1];
vendor: 55,792 bytes, lines 33199-34425
33199          return c.af(a, a, this.pixelMatrix)[3] / this.cameraToCenterDistance;
33200        }
33201        getCameraPoint() {
33202          const r = Math.tan(this._pitch) * (this.cameraToCenterDistance || 1);
33203          return this.centerPoint.add(new c.P(0, r));
33204        }
33205        getCameraQueryGeometry(r) {
33206          const a = this.getCameraPoint();
33207          if (r.length === 1) return [r[0], a];
33208          {
33209            let f = a.x, d = a.y, y = a.x, S = a.y;
33210            for (const C of r) f = Math.min(f, C.x), d = Math.min(d, C.y), y = Math.max(y, C.x), S = Math.max(S, C.y);
33211            return [new c.P(f, d), new c.P(y, d), new c.P(y, S), new c.P(f, S), new c.P(f, d)];
33212          }
33213        }
33214        lngLatToCameraDepth(r, a) {
33215          const f = this.locationCoordinate(r), d = [f.x * this.worldSize, f.y * this.worldSize, a, 1];
33216          return c.af(d, d, this.modelViewProjectionMatrix), d[2] / d[3];
33217        }
33218      }
33219      function ho(_, r) {
33220        let a, f = !1, d = null, y = null;
33221        const S = () => {
33222          d = null, f && (_.apply(y, a), d = setTimeout(S, r), f = !1);
33223        };
33224        return (...C) => (f = !0, y = this, a = C, d || S(), d);
33225      }
33226      class js {
33227        constructor(r) {
33228          this._getCurrentHash = () => {
33229            const a = window.location.hash.replace("#", "");
33230            if (this._hashName) {
33231              let f;
33232              return a.split("&").map((d) => d.split("=")).forEach((d) => {
33233                d[0] === this._hashName && (f = d);
33234              }), (f && f[1] || "").split("/");
33235            }
33236            return a.split("/");
33237          }, this._onHashChange = () => {
33238            const a = this._getCurrentHash();
33239            if (a.length >= 3 && !a.some((f) => isNaN(f))) {
33240              const f = this._map.dragRotate.isEnabled() && this._map.touchZoomRotate.isEnabled() ? +(a[3] || 0) : this._map.getBearing();
33241              return this._map.jumpTo({ center: [+a[2], +a[1]], zoom: +a[0], bearing: f, pitch: +(a[4] || 0) }), !0;
33242            }
33243            return !1;
33244          }, this._updateHashUnthrottled = () => {
33245            const a = window.location.href.replace(/(#.*)?$/, this.getHashString());
33246            window.history.replaceState(window.history.state, null, a);
33247          }, this._removeHash = () => {
33248            const a = this._getCurrentHash();
33249            if (a.length === 0) return;
33250            const f = a.join("/");
33251            let d = f;
33252            d.split("&").length > 0 && (d = d.split("&")[0]), this._hashName && (d = `${this._hashName}=${f}`);
33253            let y = window.location.hash.replace(d, "");
33254            y.startsWith("#&") ? y = y.slice(0, 1) + y.slice(2) : y === "#" && (y = "");
33255            let S = window.location.href.replace(/(#.+)?$/, y);
33256            S = S.replace("&&", "&"), window.history.replaceState(window.history.state, null, S);
33257          }, this._updateHash = ho(this._updateHashUnthrottled, 300), this._hashName = r && encodeURIComponent(r);
33258        }
33259        addTo(r) {
33260          return this._map = r, addEventListener("hashchange", this._onHashChange, !1), this._map.on("moveend", this._updateHash), this;
33261        }
33262        remove() {
33263          return removeEventListener("hashchange", this._onHashChange, !1), this._map.off("moveend", this._updateHash), clearTimeout(this._updateHash()), this._removeHash(), delete this._map, this;
33264        }
33265        getHashString(r) {
33266          const a = this._map.getCenter(), f = Math.round(100 * this._map.getZoom()) / 100, d = Math.ceil((f * Math.LN2 + Math.log(512 / 360 / 0.5)) / Math.LN10), y = Math.pow(10, d), S = Math.round(a.lng * y) / y, C = Math.round(a.lat * y) / y, I = this._map.getBearing(), F = this._map.getPitch();
33267          let N = "";
33268          if (N += r ? `/${S}/${C}/${f}` : `${f}/${C}/${S}`, (I || F) && (N += "/" + Math.round(10 * I) / 10), F && (N += `/${Math.round(F)}`), this._hashName) {
33269            const $ = this._hashName;
33270            let G = !1;
33271            const Q = window.location.hash.slice(1).split("&").map((te) => {
33272              const ae = te.split("=")[0];
33273              return ae === $ ? (G = !0, `${ae}=${N}`) : te;
33274            }).filter((te) => te);
33275            return G || Q.push(`${$}=${N}`), `#${Q.join("&")}`;
33276          }
33277          return `#${N}`;
33278        }
33279      }
33280      const fo = { linearity: 0.3, easing: c.b8(0, 0, 0.3, 1) }, wl = c.e({ deceleration: 2500, maxSpeed: 1400 }, fo), Hh = c.e({ deceleration: 20, maxSpeed: 1400 }, fo), vu = c.e({ deceleration: 1e3, maxSpeed: 360 }, fo), Ur = c.e({ deceleration: 1e3, maxSpeed: 90 }, fo);
33281      class Br {
33282        constructor(r) {
33283          this._map = r, this.clear();
33284        }
33285        clear() {
33286          this._inertiaBuffer = [];
33287        }
33288        record(r) {
33289          this._drainInertiaBuffer(), this._inertiaBuffer.push({ time: R.now(), settings: r });
33290        }
33291        _drainInertiaBuffer() {
33292          const r = this._inertiaBuffer, a = R.now();
33293          for (; r.length > 0 && a - r[0].time > 160; ) r.shift();
33294        }
33295        _onMoveEnd(r) {
33296          if (this._drainInertiaBuffer(), this._inertiaBuffer.length < 2) return;
33297          const a = { zoom: 0, bearing: 0, pitch: 0, pan: new c.P(0, 0), pinchAround: void 0, around: void 0 };
33298          for (const { settings: y } of this._inertiaBuffer) a.zoom += y.zoomDelta || 0, a.bearing += y.bearingDelta || 0, a.pitch += y.pitchDelta || 0, y.panDelta && a.pan._add(y.panDelta), y.around && (a.around = y.around), y.pinchAround && (a.pinchAround = y.pinchAround);
33299          const f = this._inertiaBuffer[this._inertiaBuffer.length - 1].time - this._inertiaBuffer[0].time, d = {};
33300          if (a.pan.mag()) {
33301            const y = Ui(a.pan.mag(), f, c.e({}, wl, r || {}));
33302            d.offset = a.pan.mult(y.amount / a.pan.mag()), d.center = this._map.transform.center, po(d, y);
33303          }
33304          if (a.zoom) {
33305            const y = Ui(a.zoom, f, Hh);
33306            d.zoom = this._map.transform.zoom + y.amount, po(d, y);
33307          }
33308          if (a.bearing) {
33309            const y = Ui(a.bearing, f, vu);
33310            d.bearing = this._map.transform.bearing + c.ac(y.amount, -179, 179), po(d, y);
33311          }
33312          if (a.pitch) {
33313            const y = Ui(a.pitch, f, Ur);
33314            d.pitch = this._map.transform.pitch + y.amount, po(d, y);
33315          }
33316          if (d.zoom || d.bearing) {
33317            const y = a.pinchAround === void 0 ? a.around : a.pinchAround;
33318            d.around = y ? this._map.unproject(y) : this._map.getCenter();
33319          }
33320          return this.clear(), c.e(d, { noMoveStart: !0 });
33321        }
33322      }
33323      function po(_, r) {
33324        (!_.duration || _.duration < r.duration) && (_.duration = r.duration, _.easing = r.easing);
33325      }
33326      function Ui(_, r, a) {
33327        const { maxSpeed: f, linearity: d, deceleration: y } = a, S = c.ac(_ * d / (r / 1e3), -f, f), C = Math.abs(S) / (y * d);
33328        return { easing: a.easing, duration: 1e3 * C, amount: S * (C / 2) };
33329      }
33330      class Vn extends c.k {
33331        preventDefault() {
33332          this._defaultPrevented = !0;
33333        }
33334        get defaultPrevented() {
33335          return this._defaultPrevented;
33336        }
33337        constructor(r, a, f, d = {}) {
33338          const y = z.mousePos(a.getCanvas(), f), S = a.unproject(y);
33339          super(r, c.e({ point: y, lngLat: S, originalEvent: f }, d)), this._defaultPrevented = !1, this.target = a;
33340        }
33341      }
33342      class Un extends c.k {
33343        preventDefault() {
33344          this._defaultPrevented = !0;
33345        }
33346        get defaultPrevented() {
33347          return this._defaultPrevented;
33348        }
33349        constructor(r, a, f) {
33350          const d = r === "touchend" ? f.changedTouches : f.touches, y = z.touchPos(a.getCanvasContainer(), d), S = y.map((I) => a.unproject(I)), C = y.reduce((I, F, N, $) => I.add(F.div($.length)), new c.P(0, 0));
33351          super(r, { points: y, point: C, lngLats: S, lngLat: a.unproject(C), originalEvent: f }), this._defaultPrevented = !1;
33352        }
33353      }
33354      class vs extends c.k {
33355        preventDefault() {
33356          this._defaultPrevented = !0;
33357        }
33358        get defaultPrevented() {
33359          return this._defaultPrevented;
33360        }
33361        constructor(r, a, f) {
33362          super(r, { originalEvent: f }), this._defaultPrevented = !1;
33363        }
33364      }
33365      class Vs {
33366        constructor(r, a) {
33367          this._map = r, this._clickTolerance = a.clickTolerance;
33368        }
33369        reset() {
33370          delete this._mousedownPos;
33371        }
33372        wheel(r) {
33373          return this._firePreventable(new vs(r.type, this._map, r));
33374        }
33375        mousedown(r, a) {
33376          return this._mousedownPos = a, this._firePreventable(new Vn(r.type, this._map, r));
33377        }
33378        mouseup(r) {
33379          this._map.fire(new Vn(r.type, this._map, r));
33380        }
33381        click(r, a) {
33382          this._mousedownPos && this._mousedownPos.dist(a) >= this._clickTolerance || this._map.fire(new Vn(r.type, this._map, r));
33383        }
33384        dblclick(r) {
33385          return this._firePreventable(new Vn(r.type, this._map, r));
33386        }
33387        mouseover(r) {
33388          this._map.fire(new Vn(r.type, this._map, r));
33389        }
33390        mouseout(r) {
33391          this._map.fire(new Vn(r.type, this._map, r));
33392        }
33393        touchstart(r) {
33394          return this._firePreventable(new Un(r.type, this._map, r));
33395        }
33396        touchmove(r) {
33397          this._map.fire(new Un(r.type, this._map, r));
33398        }
33399        touchend(r) {
33400          this._map.fire(new Un(r.type, this._map, r));
33401        }
33402        touchcancel(r) {
33403          this._map.fire(new Un(r.type, this._map, r));
33404        }
33405        _firePreventable(r) {
33406          if (this._map.fire(r), r.defaultPrevented) return {};
33407        }
33408        isEnabled() {
33409          return !0;
33410        }
33411        isActive() {
33412          return !1;
33413        }
33414        enable() {
33415        }
33416        disable() {
33417        }
33418      }
33419      class sn {
33420        constructor(r) {
33421          this._map = r;
33422        }
33423        reset() {
33424          this._delayContextMenu = !1, this._ignoreContextMenu = !0, delete this._contextMenuEvent;
33425        }
33426        mousemove(r) {
33427          this._map.fire(new Vn(r.type, this._map, r));
33428        }
33429        mousedown() {
33430          this._delayContextMenu = !0, this._ignoreContextMenu = !1;
33431        }
33432        mouseup() {
33433          this._delayContextMenu = !1, this._contextMenuEvent && (this._map.fire(new Vn("contextmenu", this._map, this._contextMenuEvent)), delete this._contextMenuEvent);
33434        }
33435        contextmenu(r) {
33436          this._delayContextMenu ? this._contextMenuEvent = r : this._ignoreContextMenu || this._map.fire(new Vn(r.type, this._map, r)), this._map.listens("contextmenu") && r.preventDefault();
33437        }
33438        isEnabled() {
33439          return !0;
33440        }
33441        isActive() {
33442          return !1;
33443        }
33444        enable() {
33445        }
33446        disable() {
33447        }
33448      }
33449      class yi {
33450        constructor(r) {
33451          this._map = r;
33452        }
33453        get transform() {
33454          return this._map._requestedCameraState || this._map.transform;
33455        }
33456        get center() {
33457          return { lng: this.transform.center.lng, lat: this.transform.center.lat };
33458        }
33459        get zoom() {
33460          return this.transform.zoom;
33461        }
33462        get pitch() {
33463          return this.transform.pitch;
33464        }
33465        get bearing() {
33466          return this.transform.bearing;
33467        }
33468        unproject(r) {
33469          return this.transform.pointLocation(c.P.convert(r), this._map.terrain);
33470        }
33471      }
33472      class qn {
33473        constructor(r, a) {
33474          this._map = r, this._tr = new yi(r), this._el = r.getCanvasContainer(), this._container = r.getContainer(), this._clickTolerance = a.clickTolerance || 1;
33475        }
33476        isEnabled() {
33477          return !!this._enabled;
33478        }
33479        isActive() {
33480          return !!this._active;
33481        }
33482        enable() {
33483          this.isEnabled() || (this._enabled = !0);
33484        }
33485        disable() {
33486          this.isEnabled() && (this._enabled = !1);
33487        }
33488        mousedown(r, a) {
33489          this.isEnabled() && r.shiftKey && r.button === 0 && (z.disableDrag(), this._startPos = this._lastPos = a, this._active = !0);
33490        }
33491        mousemoveWindow(r, a) {
33492          if (!this._active) return;
33493          const f = a;
33494          if (this._lastPos.equals(f) || !this._box && f.dist(this._startPos) < this._clickTolerance) return;
33495          const d = this._startPos;
33496          this._lastPos = f, this._box || (this._box = z.create("div", "maplibregl-boxzoom", this._container), this._container.classList.add("maplibregl-crosshair"), this._fireEvent("boxzoomstart", r));
33497          const y = Math.min(d.x, f.x), S = Math.max(d.x, f.x), C = Math.min(d.y, f.y), I = Math.max(d.y, f.y);
33498          z.setTransform(this._box, `translate(${y}px,${C}px)`), this._box.style.width = S - y + "px", this._box.style.height = I - C + "px";
33499        }
33500        mouseupWindow(r, a) {
33501          if (!this._active || r.button !== 0) return;
33502          const f = this._startPos, d = a;
33503          if (this.reset(), z.suppressClick(), f.x !== d.x || f.y !== d.y) return this._map.fire(new c.k("boxzoomend", { originalEvent: r })), { cameraAnimation: (y) => y.fitScreenCoordinates(f, d, this._tr.bearing, { linear: !0 }) };
33504          this._fireEvent("boxzoomcancel", r);
33505        }
33506        keydown(r) {
33507          this._active && r.keyCode === 27 && (this.reset(), this._fireEvent("boxzoomcancel", r));
33508        }
33509        reset() {
33510          this._active = !1, this._container.classList.remove("maplibregl-crosshair"), this._box && (z.remove(this._box), this._box = null), z.enableDrag(), delete this._startPos, delete this._lastPos;
33511        }
33512        _fireEvent(r, a) {
33513          return this._map.fire(new c.k(r, { originalEvent: a }));
33514        }
33515      }
33516      function ls(_, r) {
33517        if (_.length !== r.length) throw new Error(`The number of touches and points are not equal - touches ${_.length}, points ${r.length}`);
33518        const a = {};
33519        for (let f = 0; f < _.length; f++) a[_[f].identifier] = r[f];
33520        return a;
33521      }
33522      class Sl {
33523        constructor(r) {
33524          this.reset(), this.numTouches = r.numTouches;
33525        }
33526        reset() {
33527          delete this.centroid, delete this.startTime, delete this.touches, this.aborted = !1;
33528        }
33529        touchstart(r, a, f) {
33530          (this.centroid || f.length > this.numTouches) && (this.aborted = !0), this.aborted || (this.startTime === void 0 && (this.startTime = r.timeStamp), f.length === this.numTouches && (this.centroid = function(d) {
33531            const y = new c.P(0, 0);
33532            for (const S of d) y._add(S);
33533            return y.div(d.length);
33534          }(a), this.touches = ls(f, a)));
33535        }
33536        touchmove(r, a, f) {
33537          if (this.aborted || !this.centroid) return;
33538          const d = ls(f, a);
33539          for (const y in this.touches) {
33540            const S = d[y];
33541            (!S || S.dist(this.touches[y]) > 30) && (this.aborted = !0);
33542          }
33543        }
33544        touchend(r, a, f) {
33545          if ((!this.centroid || r.timeStamp - this.startTime > 500) && (this.aborted = !0), f.length === 0) {
33546            const d = !this.aborted && this.centroid;
33547            if (this.reset(), d) return d;
33548          }
33549        }
33550      }
33551      class Oo {
33552        constructor(r) {
33553          this.singleTap = new Sl(r), this.numTaps = r.numTaps, this.reset();
33554        }
33555        reset() {
33556          this.lastTime = 1 / 0, delete this.lastTap, this.count = 0, this.singleTap.reset();
33557        }
33558        touchstart(r, a, f) {
33559          this.singleTap.touchstart(r, a, f);
33560        }
33561        touchmove(r, a, f) {
33562          this.singleTap.touchmove(r, a, f);
33563        }
33564        touchend(r, a, f) {
33565          const d = this.singleTap.touchend(r, a, f);
33566          if (d) {
33567            const y = r.timeStamp - this.lastTime < 500, S = !this.lastTap || this.lastTap.dist(d) < 30;
33568            if (y && S || this.reset(), this.count++, this.lastTime = r.timeStamp, this.lastTap = d, this.count === this.numTaps) return this.reset(), d;
33569          }
33570        }
33571      }
33572      class mo {
33573        constructor(r) {
33574          this._tr = new yi(r), this._zoomIn = new Oo({ numTouches: 1, numTaps: 2 }), this._zoomOut = new Oo({ numTouches: 2, numTaps: 1 }), this.reset();
33575        }
33576        reset() {
33577          this._active = !1, this._zoomIn.reset(), this._zoomOut.reset();
33578        }
33579        touchstart(r, a, f) {
33580          this._zoomIn.touchstart(r, a, f), this._zoomOut.touchstart(r, a, f);
33581        }
33582        touchmove(r, a, f) {
33583          this._zoomIn.touchmove(r, a, f), this._zoomOut.touchmove(r, a, f);
33584        }
33585        touchend(r, a, f) {
33586          const d = this._zoomIn.touchend(r, a, f), y = this._zoomOut.touchend(r, a, f), S = this._tr;
33587          return d ? (this._active = !0, r.preventDefault(), setTimeout(() => this.reset(), 0), { cameraAnimation: (C) => C.easeTo({ duration: 300, zoom: S.zoom + 1, around: S.unproject(d) }, { originalEvent: r }) }) : y ? (this._active = !0, r.preventDefault(), setTimeout(() => this.reset(), 0), { cameraAnimation: (C) => C.easeTo({ duration: 300, zoom: S.zoom - 1, around: S.unproject(y) }, { originalEvent: r }) }) : void 0;
33588        }
33589        touchcancel() {
33590          this.reset();
33591        }
33592        enable() {
33593          this._enabled = !0;
33594        }
33595        disable() {
33596          this._enabled = !1, this.reset();
33597        }
33598        isEnabled() {
33599          return this._enabled;
33600        }
33601        isActive() {
33602          return this._active;
33603        }
33604      }
33605      class qi {
33606        constructor(r) {
33607          this._enabled = !!r.enable, this._moveStateManager = r.moveStateManager, this._clickTolerance = r.clickTolerance || 1, this._moveFunction = r.move, this._activateOnStart = !!r.activateOnStart, r.assignEvents(this), this.reset();
33608        }
33609        reset(r) {
33610          this._active = !1, this._moved = !1, delete this._lastPoint, this._moveStateManager.endMove(r);
33611        }
33612        _move(...r) {
33613          const a = this._moveFunction(...r);
33614          if (a.bearingDelta || a.pitchDelta || a.around || a.panDelta) return this._active = !0, a;
33615        }
33616        dragStart(r, a) {
33617          this.isEnabled() && !this._lastPoint && this._moveStateManager.isValidStartEvent(r) && (this._moveStateManager.startMove(r), this._lastPoint = a.length ? a[0] : a, this._activateOnStart && this._lastPoint && (this._active = !0));
33618        }
33619        dragMove(r, a) {
33620          if (!this.isEnabled()) return;
33621          const f = this._lastPoint;
33622          if (!f) return;
33623          if (r.preventDefault(), !this._moveStateManager.isValidMoveEvent(r)) return void this.reset(r);
33624          const d = a.length ? a[0] : a;
33625          return !this._moved && d.dist(f) < this._clickTolerance ? void 0 : (this._moved = !0, this._lastPoint = d, this._move(f, d));
33626        }
33627        dragEnd(r) {
33628          this.isEnabled() && this._lastPoint && this._moveStateManager.isValidEndEvent(r) && (this._moved && z.suppressClick(), this.reset(r));
33629        }
33630        enable() {
33631          this._enabled = !0;
33632        }
33633        disable() {
33634          this._enabled = !1, this.reset();
33635        }
33636        isEnabled() {
33637          return this._enabled;
33638        }
33639        isActive() {
33640          return this._active;
33641        }
33642        getClickTolerance() {
33643          return this._clickTolerance;
33644        }
33645      }
33646      const na = { 0: 1, 2: 2 };
33647      class za {
33648        constructor(r) {
33649          this._correctEvent = r.checkCorrectEvent;
33650        }
33651        startMove(r) {
33652          const a = z.mouseButton(r);
33653          this._eventButton = a;
33654        }
33655        endMove(r) {
33656          delete this._eventButton;
33657        }
33658        isValidStartEvent(r) {
33659          return this._correctEvent(r);
33660        }
33661        isValidMoveEvent(r) {
33662          return !function(a, f) {
33663            const d = na[f];
33664            return a.buttons === void 0 || (a.buttons & d) !== d;
33665          }(r, this._eventButton);
33666        }
33667        isValidEndEvent(r) {
33668          return z.mouseButton(r) === this._eventButton;
33669        }
33670      }
33671      class ia {
33672        constructor() {
33673          this._firstTouch = void 0;
33674        }
33675        _isOneFingerTouch(r) {
33676          return r.targetTouches.length === 1;
33677        }
33678        _isSameTouchEvent(r) {
33679          return r.targetTouches[0].identifier === this._firstTouch;
33680        }
33681        startMove(r) {
33682          this._firstTouch = r.targetTouches[0].identifier;
33683        }
33684        endMove(r) {
33685          delete this._firstTouch;
33686        }
33687        isValidStartEvent(r) {
33688          return this._isOneFingerTouch(r);
33689        }
33690        isValidMoveEvent(r) {
33691          return this._isOneFingerTouch(r) && this._isSameTouchEvent(r);
33692        }
33693        isValidEndEvent(r) {
33694          return this._isOneFingerTouch(r) && this._isSameTouchEvent(r);
33695        }
33696      }
33697      const Do = (_) => {
33698        _.mousedown = _.dragStart, _.mousemoveWindow = _.dragMove, _.mouseup = _.dragEnd, _.contextmenu = (r) => {
33699          r.preventDefault();
33700        };
33701      }, Gh = ({ enable: _, clickTolerance: r, bearingDegreesPerPixelMoved: a = 0.8 }) => {
33702        const f = new za({ checkCorrectEvent: (d) => z.mouseButton(d) === 0 && d.ctrlKey || z.mouseButton(d) === 2 });
33703        return new qi({ clickTolerance: r, move: (d, y) => ({ bearingDelta: (y.x - d.x) * a }), moveStateManager: f, enable: _, assignEvents: Do });
33704      }, Zh = ({ enable: _, clickTolerance: r, pitchDegreesPerPixelMoved: a = -0.5 }) => {
33705        const f = new za({ checkCorrectEvent: (d) => z.mouseButton(d) === 0 && d.ctrlKey || z.mouseButton(d) === 2 });
33706        return new qi({ clickTolerance: r, move: (d, y) => ({ pitchDelta: (y.y - d.y) * a }), moveStateManager: f, enable: _, assignEvents: Do });
33707      };
33708      class Ba {
33709        constructor(r, a) {
33710          this._clickTolerance = r.clickTolerance || 1, this._map = a, this.reset();
33711        }
33712        reset() {
33713          this._active = !1, this._touches = {}, this._sum = new c.P(0, 0);
33714        }
33715        _shouldBePrevented(r) {
33716          return r < (this._map.cooperativeGestures.isEnabled() ? 2 : 1);
33717        }
33718        touchstart(r, a, f) {
33719          return this._calculateTransform(r, a, f);
33720        }
33721        touchmove(r, a, f) {
33722          if (this._active) {
33723            if (!this._shouldBePrevented(f.length)) return r.preventDefault(), this._calculateTransform(r, a, f);
33724            this._map.cooperativeGestures.notifyGestureBlocked("touch_pan", r);
33725          }
33726        }
33727        touchend(r, a, f) {
33728          this._calculateTransform(r, a, f), this._active && this._shouldBePrevented(f.length) && this.reset();
33729        }
33730        touchcancel() {
33731          this.reset();
33732        }
33733        _calculateTransform(r, a, f) {
33734          f.length > 0 && (this._active = !0);
33735          const d = ls(f, a), y = new c.P(0, 0), S = new c.P(0, 0);
33736          let C = 0;
33737          for (const F in d) {
33738            const N = d[F], $ = this._touches[F];
33739            $ && (y._add(N), S._add(N.sub($)), C++, d[F] = N);
33740          }
33741          if (this._touches = d, this._shouldBePrevented(C) || !S.mag()) return;
33742          const I = S.div(C);
33743          return this._sum._add(I), this._sum.mag() < this._clickTolerance ? void 0 : { around: y.div(C), panDelta: I };
33744        }
33745        enable() {
33746          this._enabled = !0;
33747        }
33748        disable() {
33749          this._enabled = !1, this.reset();
33750        }
33751        isEnabled() {
33752          return this._enabled;
33753        }
33754        isActive() {
33755          return this._active;
33756        }
33757      }
33758      class bu {
33759        constructor() {
33760          this.reset();
33761        }
33762        reset() {
33763          this._active = !1, delete this._firstTwoTouches;
33764        }
33765        touchstart(r, a, f) {
33766          this._firstTwoTouches || f.length < 2 || (this._firstTwoTouches = [f[0].identifier, f[1].identifier], this._start([a[0], a[1]]));
33767        }
33768        touchmove(r, a, f) {
33769          if (!this._firstTwoTouches) return;
33770          r.preventDefault();
33771          const [d, y] = this._firstTwoTouches, S = xc(f, a, d), C = xc(f, a, y);
33772          if (!S || !C) return;
33773          const I = this._aroundCenter ? null : S.add(C).div(2);
33774          return this._move([S, C], I, r);
33775        }
33776        touchend(r, a, f) {
33777          if (!this._firstTwoTouches) return;
33778          const [d, y] = this._firstTwoTouches, S = xc(f, a, d), C = xc(f, a, y);
33779          S && C || (this._active && z.suppressClick(), this.reset());
33780        }
33781        touchcancel() {
33782          this.reset();
33783        }
33784        enable(r) {
33785          this._enabled = !0, this._aroundCenter = !!r && r.around === "center";
33786        }
33787        disable() {
33788          this._enabled = !1, this.reset();
33789        }
33790        isEnabled() {
33791          return !!this._enabled;
33792        }
33793        isActive() {
33794          return !!this._active;
33795        }
33796      }
33797      function xc(_, r, a) {
33798        for (let f = 0; f < _.length; f++) if (_[f].identifier === a) return r[f];
33799      }
33800      function Wh(_, r) {
33801        return Math.log(_ / r) / Math.LN2;
33802      }
33803      class Kh extends bu {
33804        reset() {
33805          super.reset(), delete this._distance, delete this._startDistance;
33806        }
33807        _start(r) {
33808          this._startDistance = this._distance = r[0].dist(r[1]);
33809        }
33810        _move(r, a) {
33811          const f = this._distance;
33812          if (this._distance = r[0].dist(r[1]), this._active || !(Math.abs(Wh(this._distance, this._startDistance)) < 0.1)) return this._active = !0, { zoomDelta: Wh(this._distance, f), pinchAround: a };
33813        }
33814      }
33815      function Xh(_, r) {
33816        return 180 * _.angleWith(r) / Math.PI;
33817      }
33818      class Jh extends bu {
33819        reset() {
33820          super.reset(), delete this._minDiameter, delete this._startVector, delete this._vector;
33821        }
33822        _start(r) {
33823          this._startVector = this._vector = r[0].sub(r[1]), this._minDiameter = r[0].dist(r[1]);
33824        }
33825        _move(r, a, f) {
33826          const d = this._vector;
33827          if (this._vector = r[0].sub(r[1]), this._active || !this._isBelowThreshold(this._vector)) return this._active = !0, { bearingDelta: Xh(this._vector, d), pinchAround: a };
33828        }
33829        _isBelowThreshold(r) {
33830          this._minDiameter = Math.min(this._minDiameter, r.mag());
33831          const a = 25 / (Math.PI * this._minDiameter) * 360, f = Xh(r, this._startVector);
33832          return Math.abs(f) < a;
33833        }
33834      }
33835      function xu(_) {
33836        return Math.abs(_.y) > Math.abs(_.x);
33837      }
33838      class wc extends bu {
33839        constructor(r) {
33840          super(), this._currentTouchCount = 0, this._map = r;
33841        }
33842        reset() {
33843          super.reset(), this._valid = void 0, delete this._firstMove, delete this._lastPoints;
33844        }
33845        touchstart(r, a, f) {
33846          super.touchstart(r, a, f), this._currentTouchCount = f.length;
33847        }
33848        _start(r) {
33849          this._lastPoints = r, xu(r[0].sub(r[1])) && (this._valid = !1);
33850        }
33851        _move(r, a, f) {
33852          if (this._map.cooperativeGestures.isEnabled() && this._currentTouchCount < 3) return;
33853          const d = r[0].sub(this._lastPoints[0]), y = r[1].sub(this._lastPoints[1]);
33854          return this._valid = this.gestureBeginsVertically(d, y, f.timeStamp), this._valid ? (this._lastPoints = r, this._active = !0, { pitchDelta: (d.y + y.y) / 2 * -0.5 }) : void 0;
33855        }
33856        gestureBeginsVertically(r, a, f) {
33857          if (this._valid !== void 0) return this._valid;
33858          const d = r.mag() >= 2, y = a.mag() >= 2;
33859          if (!d && !y) return;
33860          if (!d || !y) return this._firstMove === void 0 && (this._firstMove = f), f - this._firstMove < 100 && void 0;
33861          const S = r.y > 0 == a.y > 0;
33862          return xu(r) && xu(a) && S;
33863        }
33864      }
33865      const Vd = { panStep: 100, bearingStep: 15, pitchStep: 10 };
33866      class bs {
33867        constructor(r) {
33868          this._tr = new yi(r);
33869          const a = Vd;
33870          this._panStep = a.panStep, this._bearingStep = a.bearingStep, this._pitchStep = a.pitchStep, this._rotationDisabled = !1;
33871        }
33872        reset() {
33873          this._active = !1;
33874        }
33875        keydown(r) {
33876          if (r.altKey || r.ctrlKey || r.metaKey) return;
33877          let a = 0, f = 0, d = 0, y = 0, S = 0;
33878          switch (r.keyCode) {
33879            case 61:
33880            case 107:
33881            case 171:
33882            case 187:
33883              a = 1;
33884              break;
33885            case 189:
33886            case 109:
33887            case 173:
33888              a = -1;
33889              break;
33890            case 37:
33891              r.shiftKey ? f = -1 : (r.preventDefault(), y = -1);
33892              break;
33893            case 39:
33894              r.shiftKey ? f = 1 : (r.preventDefault(), y = 1);
33895              break;
33896            case 38:
33897              r.shiftKey ? d = 1 : (r.preventDefault(), S = -1);
33898              break;
33899            case 40:
33900              r.shiftKey ? d = -1 : (r.preventDefault(), S = 1);
33901              break;
33902            default:
33903              return;
33904          }
33905          return this._rotationDisabled && (f = 0, d = 0), { cameraAnimation: (C) => {
33906            const I = this._tr;
33907            C.easeTo({ duration: 300, easeId: "keyboardHandler", easing: go, zoom: a ? Math.round(I.zoom) + a * (r.shiftKey ? 2 : 1) : I.zoom, bearing: I.bearing + f * this._bearingStep, pitch: I.pitch + d * this._pitchStep, offset: [-y * this._panStep, -S * this._panStep], center: I.center }, { originalEvent: r });
33908          } };
33909        }
33910        enable() {
33911          this._enabled = !0;
33912        }
33913        disable() {
33914          this._enabled = !1, this.reset();
33915        }
33916        isEnabled() {
33917          return this._enabled;
33918        }
33919        isActive() {
33920          return this._active;
33921        }
33922        disableRotation() {
33923          this._rotationDisabled = !0;
33924        }
33925        enableRotation() {
33926          this._rotationDisabled = !1;
33927        }
33928      }
33929      function go(_) {
33930        return _ * (2 - _);
33931      }
33932      const Yh = 4.000244140625;
33933      class Us {
33934        constructor(r, a) {
33935          this._onTimeout = (f) => {
33936            this._type = "wheel", this._delta -= this._lastValue, this._active || this._start(f);
33937          }, this._map = r, this._tr = new yi(r), this._triggerRenderFrame = a, this._delta = 0, this._defaultZoomRate = 0.01, this._wheelZoomRate = 0.0022222222222222222;
33938        }
33939        setZoomRate(r) {
33940          this._defaultZoomRate = r;
33941        }
33942        setWheelZoomRate(r) {
33943          this._wheelZoomRate = r;
33944        }
33945        isEnabled() {
33946          return !!this._enabled;
33947        }
33948        isActive() {
33949          return !!this._active || this._finishTimeout !== void 0;
33950        }
33951        isZooming() {
33952          return !!this._zooming;
33953        }
33954        enable(r) {
33955          this.isEnabled() || (this._enabled = !0, this._aroundCenter = !!r && r.around === "center");
33956        }
33957        disable() {
33958          this.isEnabled() && (this._enabled = !1);
33959        }
33960        _shouldBePrevented(r) {
33961          return !!this._map.cooperativeGestures.isEnabled() && !(r.ctrlKey || this._map.cooperativeGestures.isBypassed(r));
33962        }
33963        wheel(r) {
33964          if (!this.isEnabled()) return;
33965          if (this._shouldBePrevented(r)) return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom", r);
33966          let a = r.deltaMode === WheelEvent.DOM_DELTA_LINE ? 40 * r.deltaY : r.deltaY;
33967          const f = R.now(), d = f - (this._lastWheelEventTime || 0);
33968          this._lastWheelEventTime = f, a !== 0 && a % Yh == 0 ? this._type = "wheel" : a !== 0 && Math.abs(a) < 4 ? this._type = "trackpad" : d > 400 ? (this._type = null, this._lastValue = a, this._timeout = setTimeout(this._onTimeout, 40, r)) : this._type || (this._type = Math.abs(d * a) < 200 ? "trackpad" : "wheel", this._timeout && (clearTimeout(this._timeout), this._timeout = null, a += this._lastValue)), r.shiftKey && a && (a /= 4), this._type && (this._lastWheelEvent = r, this._delta -= a, this._active || this._start(r)), r.preventDefault();
33969        }
33970        _start(r) {
33971          if (!this._delta) return;
33972          this._frameId && (this._frameId = null), this._active = !0, this.isZooming() || (this._zooming = !0), this._finishTimeout && (clearTimeout(this._finishTimeout), delete this._finishTimeout);
33973          const a = z.mousePos(this._map.getCanvas(), r), f = this._tr;
33974          this._around = a.y > f.transform.height / 2 - f.transform.getHorizon() ? c.N.convert(this._aroundCenter ? f.center : f.unproject(a)) : c.N.convert(f.center), this._aroundPoint = f.transform.locationPoint(this._around), this._frameId || (this._frameId = !0, this._triggerRenderFrame());
33975        }
33976        renderFrame() {
33977          if (!this._frameId || (this._frameId = null, !this.isActive())) return;
33978          const r = this._tr.transform;
33979          if (this._delta !== 0) {
33980            const I = this._type === "wheel" && Math.abs(this._delta) > Yh ? this._wheelZoomRate : this._defaultZoomRate;
33981            let F = 2 / (1 + Math.exp(-Math.abs(this._delta * I)));
33982            this._delta < 0 && F !== 0 && (F = 1 / F);
33983            const N = typeof this._targetZoom == "number" ? r.zoomScale(this._targetZoom) : r.scale;
33984            this._targetZoom = Math.min(r.maxZoom, Math.max(r.minZoom, r.scaleZoom(N * F))), this._type === "wheel" && (this._startZoom = r.zoom, this._easing = this._smoothOutEasing(200)), this._delta = 0;
33985          }
33986          const a = typeof this._targetZoom == "number" ? this._targetZoom : r.zoom, f = this._startZoom, d = this._easing;
33987          let y, S = !1;
33988          const C = R.now() - this._lastWheelEventTime;
33989          if (this._type === "wheel" && f && d && C) {
33990            const I = Math.min(C / 200, 1), F = d(I);
33991            y = c.y.number(f, a, F), I < 1 ? this._frameId || (this._frameId = !0) : S = !0;
33992          } else y = a, S = !0;
33993          return this._active = !0, S && (this._active = !1, this._finishTimeout = setTimeout(() => {
33994            this._zooming = !1, this._triggerRenderFrame(), delete this._targetZoom, delete this._finishTimeout;
33995          }, 200)), { noInertia: !0, needsRenderFrame: !S, zoomDelta: y - r.zoom, around: this._aroundPoint, originalEvent: this._lastWheelEvent };
33996        }
33997        _smoothOutEasing(r) {
33998          let a = c.b9;
33999          if (this._prevEase) {
34000            const f = this._prevEase, d = (R.now() - f.start) / f.duration, y = f.easing(d + 0.01) - f.easing(d), S = 0.27 / Math.sqrt(y * y + 1e-4) * 0.01, C = Math.sqrt(0.0729 - S * S);
34001            a = c.b8(S, C, 0.25, 1);
34002          }
34003          return this._prevEase = { start: R.now(), duration: r, easing: a }, a;
34004        }
34005        reset() {
34006          this._active = !1, this._zooming = !1, delete this._targetZoom, this._finishTimeout && (clearTimeout(this._finishTimeout), delete this._finishTimeout);
34007        }
34008      }
34009      class Na {
34010        constructor(r, a) {
34011          this._clickZoom = r, this._tapZoom = a;
34012        }
34013        enable() {
34014          this._clickZoom.enable(), this._tapZoom.enable();
34015        }
34016        disable() {
34017          this._clickZoom.disable(), this._tapZoom.disable();
34018        }
34019        isEnabled() {
34020          return this._clickZoom.isEnabled() && this._tapZoom.isEnabled();
34021        }
34022        isActive() {
34023          return this._clickZoom.isActive() || this._tapZoom.isActive();
34024        }
34025      }
34026      class Xg {
34027        constructor(r) {
34028          this._tr = new yi(r), this.reset();
34029        }
34030        reset() {
34031          this._active = !1;
34032        }
34033        dblclick(r, a) {
34034          return r.preventDefault(), { cameraAnimation: (f) => {
34035            f.easeTo({ duration: 300, zoom: this._tr.zoom + (r.shiftKey ? -1 : 1), around: this._tr.unproject(a) }, { originalEvent: r });
34036          } };
34037        }
34038        enable() {
34039          this._enabled = !0;
34040        }
34041        disable() {
34042          this._enabled = !1, this.reset();
34043        }
34044        isEnabled() {
34045          return this._enabled;
34046        }
34047        isActive() {
34048          return this._active;
34049        }
34050      }
34051      class Jg {
34052        constructor() {
34053          this._tap = new Oo({ numTouches: 1, numTaps: 1 }), this.reset();
34054        }
34055        reset() {
34056          this._active = !1, delete this._swipePoint, delete this._swipeTouch, delete this._tapTime, delete this._tapPoint, this._tap.reset();
34057        }
34058        touchstart(r, a, f) {
34059          if (!this._swipePoint) if (this._tapTime) {
34060            const d = a[0], y = r.timeStamp - this._tapTime < 500, S = this._tapPoint.dist(d) < 30;
34061            y && S ? f.length > 0 && (this._swipePoint = d, this._swipeTouch = f[0].identifier) : this.reset();
34062          } else this._tap.touchstart(r, a, f);
34063        }
34064        touchmove(r, a, f) {
34065          if (this._tapTime) {
34066            if (this._swipePoint) {
34067              if (f[0].identifier !== this._swipeTouch) return;
34068              const d = a[0], y = d.y - this._swipePoint.y;
34069              return this._swipePoint = d, r.preventDefault(), this._active = !0, { zoomDelta: y / 128 };
34070            }
34071          } else this._tap.touchmove(r, a, f);
34072        }
34073        touchend(r, a, f) {
34074          if (this._tapTime) this._swipePoint && f.length === 0 && this.reset();
34075          else {
34076            const d = this._tap.touchend(r, a, f);
34077            d && (this._tapTime = r.timeStamp, this._tapPoint = d);
34078          }
34079        }
34080        touchcancel() {
34081          this.reset();
34082        }
34083        enable() {
34084          this._enabled = !0;
34085        }
34086        disable() {
34087          this._enabled = !1, this.reset();
34088        }
34089        isEnabled() {
34090          return this._enabled;
34091        }
34092        isActive() {
34093          return this._active;
34094        }
34095      }
34096      class Ud {
34097        constructor(r, a, f) {
34098          this._el = r, this._mousePan = a, this._touchPan = f;
34099        }
34100        enable(r) {
34101          this._inertiaOptions = r || {}, this._mousePan.enable(), this._touchPan.enable(), this._el.classList.add("maplibregl-touch-drag-pan");
34102        }
34103        disable() {
34104          this._mousePan.disable(), this._touchPan.disable(), this._el.classList.remove("maplibregl-touch-drag-pan");
34105        }
34106        isEnabled() {
34107          return this._mousePan.isEnabled() && this._touchPan.isEnabled();
34108        }
34109        isActive() {
34110          return this._mousePan.isActive() || this._touchPan.isActive();
34111        }
34112      }
34113      class qd {
34114        constructor(r, a, f) {
34115          this._pitchWithRotate = r.pitchWithRotate, this._mouseRotate = a, this._mousePitch = f;
34116        }
34117        enable() {
34118          this._mouseRotate.enable(), this._pitchWithRotate && this._mousePitch.enable();
34119        }
34120        disable() {
34121          this._mouseRotate.disable(), this._mousePitch.disable();
34122        }
34123        isEnabled() {
34124          return this._mouseRotate.isEnabled() && (!this._pitchWithRotate || this._mousePitch.isEnabled());
34125        }
34126        isActive() {
34127          return this._mouseRotate.isActive() || this._mousePitch.isActive();
34128        }
34129      }
34130      class Qh {
34131        constructor(r, a, f, d) {
34132          this._el = r, this._touchZoom = a, this._touchRotate = f, this._tapDragZoom = d, this._rotationDisabled = !1, this._enabled = !0;
34133        }
34134        enable(r) {
34135          this._touchZoom.enable(r), this._rotationDisabled || this._touchRotate.enable(r), this._tapDragZoom.enable(), this._el.classList.add("maplibregl-touch-zoom-rotate");
34136        }
34137        disable() {
34138          this._touchZoom.disable(), this._touchRotate.disable(), this._tapDragZoom.disable(), this._el.classList.remove("maplibregl-touch-zoom-rotate");
34139        }
34140        isEnabled() {
34141          return this._touchZoom.isEnabled() && (this._rotationDisabled || this._touchRotate.isEnabled()) && this._tapDragZoom.isEnabled();
34142        }
34143        isActive() {
34144          return this._touchZoom.isActive() || this._touchRotate.isActive() || this._tapDragZoom.isActive();
34145        }
34146        disableRotation() {
34147          this._rotationDisabled = !0, this._touchRotate.disable();
34148        }
34149        enableRotation() {
34150          this._rotationDisabled = !1, this._touchZoom.isEnabled() && this._touchRotate.enable();
34151        }
34152      }
34153      class Tl {
34154        constructor(r, a) {
34155          this._bypassKey = navigator.userAgent.indexOf("Mac") !== -1 ? "metaKey" : "ctrlKey", this._map = r, this._options = a, this._enabled = !1;
34156        }
34157        isActive() {
34158          return !1;
34159        }
34160        reset() {
34161        }
34162        _setupUI() {
34163          if (this._container) return;
34164          const r = this._map.getCanvasContainer();
34165          r.classList.add("maplibregl-cooperative-gestures"), this._container = z.create("div", "maplibregl-cooperative-gesture-screen", r);
34166          let a = this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");
34167          this._bypassKey === "metaKey" && (a = this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));
34168          const f = this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"), d = document.createElement("div");
34169          d.className = "maplibregl-desktop-message", d.textContent = a, this._container.appendChild(d);
34170          const y = document.createElement("div");
34171          y.className = "maplibregl-mobile-message", y.textContent = f, this._container.appendChild(y), this._container.setAttribute("aria-hidden", "true");
34172        }
34173        _destroyUI() {
34174          this._container && (z.remove(this._container), this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")), delete this._container;
34175        }
34176        enable() {
34177          this._setupUI(), this._enabled = !0;
34178        }
34179        disable() {
34180          this._enabled = !1, this._destroyUI();
34181        }
34182        isEnabled() {
34183          return this._enabled;
34184        }
34185        isBypassed(r) {
34186          return r[this._bypassKey];
34187        }
34188        notifyGestureBlocked(r, a) {
34189          this._enabled && (this._map.fire(new c.k("cooperativegestureprevented", { gestureType: r, originalEvent: a })), this._container.classList.add("maplibregl-show"), setTimeout(() => {
34190            this._container.classList.remove("maplibregl-show");
34191          }, 100));
34192        }
34193      }
34194      const xs = (_) => _.zoom || _.drag || _.pitch || _.rotate;
34195      class Mt extends c.k {
34196      }
34197      function wu(_) {
34198        return _.panDelta && _.panDelta.mag() || _.zoomDelta || _.bearingDelta || _.pitchDelta;
34199      }
34200      class ef {
34201        constructor(r, a) {
34202          this.handleWindowEvent = (d) => {
34203            this.handleEvent(d, `${d.type}Window`);
34204          }, this.handleEvent = (d, y) => {
34205            if (d.type === "blur") return void this.stop(!0);
34206            this._updatingCamera = !0;
34207            const S = d.type === "renderFrame" ? void 0 : d, C = { needsRenderFrame: !1 }, I = {}, F = {}, N = d.touches, $ = N ? this._getMapTouches(N) : void 0, G = $ ? z.touchPos(this._map.getCanvas(), $) : z.mousePos(this._map.getCanvas(), d);
34208            for (const { handlerName: ae, handler: fe, allowed: pe } of this._handlers) {
34209              if (!fe.isEnabled()) continue;
34210              let _e;
34211              this._blockedByActive(F, pe, ae) ? fe.reset() : fe[y || d.type] && (_e = fe[y || d.type](d, G, $), this.mergeHandlerResult(C, I, _e, ae, S), _e && _e.needsRenderFrame && this._triggerRenderFrame()), (_e || fe.isActive()) && (F[ae] = fe);
34212            }
34213            const Q = {};
34214            for (const ae in this._previousActiveHandlers) F[ae] || (Q[ae] = S);
34215            this._previousActiveHandlers = F, (Object.keys(Q).length || wu(C)) && (this._changes.push([C, I, Q]), this._triggerRenderFrame()), (Object.keys(F).length || wu(C)) && this._map._stop(!0), this._updatingCamera = !1;
34216            const { cameraAnimation: te } = C;
34217            te && (this._inertia.clear(), this._fireEvents({}, {}, !0), this._changes = [], te(this._map));
34218          }, this._map = r, this._el = this._map.getCanvasContainer(), this._handlers = [], this._handlersById = {}, this._changes = [], this._inertia = new Br(r), this._bearingSnap = a.bearingSnap, this._previousActiveHandlers = {}, this._eventsInProgress = {}, this._addDefaultHandlers(a);
34219          const f = this._el;
34220          this._listeners = [[f, "touchstart", { passive: !0 }], [f, "touchmove", { passive: !1 }], [f, "touchend", void 0], [f, "touchcancel", void 0], [f, "mousedown", void 0], [f, "mousemove", void 0], [f, "mouseup", void 0], [document, "mousemove", { capture: !0 }], [document, "mouseup", void 0], [f, "mouseover", void 0], [f, "mouseout", void 0], [f, "dblclick", void 0], [f, "click", void 0], [f, "keydown", { capture: !1 }], [f, "keyup", void 0], [f, "wheel", { passive: !1 }], [f, "contextmenu", void 0], [window, "blur", void 0]];
34221          for (const [d, y, S] of this._listeners) z.addEventListener(d, y, d === document ? this.handleWindowEvent : this.handleEvent, S);
34222        }
34223        destroy() {
34224          for (const [r, a, f] of this._listeners) z.removeEventListener(r, a, r === document ? this.handleWindowEvent : this.handleEvent, f);
34225        }
34226        _addDefaultHandlers(r) {
34227          const a = this._map, f = a.getCanvasContainer();
34228          this._add("mapEvent", new Vs(a, r));
34229          const d = a.boxZoom = new qn(a, r);
34230          this._add("boxZoom", d), r.interactive && r.boxZoom && d.enable();
34231          const y = a.cooperativeGestures = new Tl(a, r.cooperativeGestures);
34232          this._add("cooperativeGestures", y), r.cooperativeGestures && y.enable();
34233          const S = new mo(a), C = new Xg(a);
34234          a.doubleClickZoom = new Na(C, S), this._add("tapZoom", S), this._add("clickZoom", C), r.interactive && r.doubleClickZoom && a.doubleClickZoom.enable();
34235          const I = new Jg();
34236          this._add("tapDragZoom", I);
34237          const F = a.touchPitch = new wc(a);
34238          this._add("touchPitch", F), r.interactive && r.touchPitch && a.touchPitch.enable(r.touchPitch);
34239          const N = Gh(r), $ = Zh(r);
34240          a.dragRotate = new qd(r, N, $), this._add("mouseRotate", N, ["mousePitch"]), this._add("mousePitch", $, ["mouseRotate"]), r.interactive && r.dragRotate && a.dragRotate.enable();
34241          const G = (({ enable: _e, clickTolerance: se }) => {
34242            const Te = new za({ checkCorrectEvent: (Me) => z.mouseButton(Me) === 0 && !Me.ctrlKey });
34243            return new qi({ clickTolerance: se, move: (Me, Fe) => ({ around: Fe, panDelta: Fe.sub(Me) }), activateOnStart: !0, moveStateManager: Te, enable: _e, assignEvents: Do });
34244          })(r), Q = new Ba(r, a);
34245          a.dragPan = new Ud(f, G, Q), this._add("mousePan", G), this._add("touchPan", Q, ["touchZoom", "touchRotate"]), r.interactive && r.dragPan && a.dragPan.enable(r.dragPan);
34246          const te = new Jh(), ae = new Kh();
34247          a.touchZoomRotate = new Qh(f, ae, te, I), this._add("touchRotate", te, ["touchPan", "touchZoom"]), this._add("touchZoom", ae, ["touchPan", "touchRotate"]), r.interactive && r.touchZoomRotate && a.touchZoomRotate.enable(r.touchZoomRotate);
34248          const fe = a.scrollZoom = new Us(a, () => this._triggerRenderFrame());
34249          this._add("scrollZoom", fe, ["mousePan"]), r.interactive && r.scrollZoom && a.scrollZoom.enable(r.scrollZoom);
34250          const pe = a.keyboard = new bs(a);
34251          this._add("keyboard", pe), r.interactive && r.keyboard && a.keyboard.enable(), this._add("blockableMapEvent", new sn(a));
34252        }
34253        _add(r, a, f) {
34254          this._handlers.push({ handlerName: r, handler: a, allowed: f }), this._handlersById[r] = a;
34255        }
34256        stop(r) {
34257          if (!this._updatingCamera) {
34258            for (const { handler: a } of this._handlers) a.reset();
34259            this._inertia.clear(), this._fireEvents({}, {}, r), this._changes = [];
34260          }
34261        }
34262        isActive() {
34263          for (const { handler: r } of this._handlers) if (r.isActive()) return !0;
34264          return !1;
34265        }
34266        isZooming() {
34267          return !!this._eventsInProgress.zoom || this._map.scrollZoom.isZooming();
34268        }
34269        isRotating() {
34270          return !!this._eventsInProgress.rotate;
34271        }
34272        isMoving() {
34273          return !!xs(this._eventsInProgress) || this.isZooming();
34274        }
34275        _blockedByActive(r, a, f) {
34276          for (const d in r) if (d !== f && (!a || a.indexOf(d) < 0)) return !0;
34277          return !1;
34278        }
34279        _getMapTouches(r) {
34280          const a = [];
34281          for (const f of r) this._el.contains(f.target) && a.push(f);
34282          return a;
34283        }
34284        mergeHandlerResult(r, a, f, d, y) {
34285          if (!f) return;
34286          c.e(r, f);
34287          const S = { handlerName: d, originalEvent: f.originalEvent || y };
34288          f.zoomDelta !== void 0 && (a.zoom = S), f.panDelta !== void 0 && (a.drag = S), f.pitchDelta !== void 0 && (a.pitch = S), f.bearingDelta !== void 0 && (a.rotate = S);
34289        }
34290        _applyChanges() {
34291          const r = {}, a = {}, f = {};
34292          for (const [d, y, S] of this._changes) d.panDelta && (r.panDelta = (r.panDelta || new c.P(0, 0))._add(d.panDelta)), d.zoomDelta && (r.zoomDelta = (r.zoomDelta || 0) + d.zoomDelta), d.bearingDelta && (r.bearingDelta = (r.bearingDelta || 0) + d.bearingDelta), d.pitchDelta && (r.pitchDelta = (r.pitchDelta || 0) + d.pitchDelta), d.around !== void 0 && (r.around = d.around), d.pinchAround !== void 0 && (r.pinchAround = d.pinchAround), d.noInertia && (r.noInertia = d.noInertia), c.e(a, y), c.e(f, S);
34293          this._updateMapTransform(r, a, f), this._changes = [];
34294        }
34295        _updateMapTransform(r, a, f) {
34296          const d = this._map, y = d._getTransformForUpdate(), S = d.terrain;
34297          if (!(wu(r) || S && this._terrainMovement)) return this._fireEvents(a, f, !0);
34298          let { panDelta: C, zoomDelta: I, bearingDelta: F, pitchDelta: N, around: $, pinchAround: G } = r;
34299          G !== void 0 && ($ = G), d._stop(!0), $ = $ || d.transform.centerPoint;
34300          const Q = y.pointLocation(C ? $.sub(C) : $);
34301          F && (y.bearing += F), N && (y.pitch += N), I && (y.zoom += I), S ? this._terrainMovement || !a.drag && !a.zoom ? a.drag && this._terrainMovement ? y.center = y.pointLocation(y.centerPoint.sub(C)) : y.setLocationAtPoint(Q, $) : (this._terrainMovement = !0, this._map._elevationFreeze = !0, y.setLocationAtPoint(Q, $)) : y.setLocationAtPoint(Q, $), d._applyUpdatedTransform(y), this._map._update(), r.noInertia || this._inertia.record(r), this._fireEvents(a, f, !0);
34302        }
34303        _fireEvents(r, a, f) {
34304          const d = xs(this._eventsInProgress), y = xs(r), S = {};
34305          for (const $ in r) {
34306            const { originalEvent: G } = r[$];
34307            this._eventsInProgress[$] || (S[`${$}start`] = G), this._eventsInProgress[$] = r[$];
34308          }
34309          !d && y && this._fireEvent("movestart", y.originalEvent);
34310          for (const $ in S) this._fireEvent($, S[$]);
34311          y && this._fireEvent("move", y.originalEvent);
34312          for (const $ in r) {
34313            const { originalEvent: G } = r[$];
34314            this._fireEvent($, G);
34315          }
34316          const C = {};
34317          let I;
34318          for (const $ in this._eventsInProgress) {
34319            const { handlerName: G, originalEvent: Q } = this._eventsInProgress[$];
34320            this._handlersById[G].isActive() || (delete this._eventsInProgress[$], I = a[G] || Q, C[`${$}end`] = I);
34321          }
34322          for (const $ in C) this._fireEvent($, C[$]);
34323          const F = xs(this._eventsInProgress), N = (d || y) && !F;
34324          if (N && this._terrainMovement) {
34325            this._map._elevationFreeze = !1, this._terrainMovement = !1;
34326            const $ = this._map._getTransformForUpdate();
34327            $.recalculateZoom(this._map.terrain), this._map._applyUpdatedTransform($);
34328          }
34329          if (f && N) {
34330            this._updatingCamera = !0;
34331            const $ = this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions), G = (Q) => Q !== 0 && -this._bearingSnap < Q && Q < this._bearingSnap;
34332            !$ || !$.essential && R.prefersReducedMotion ? (this._map.fire(new c.k("moveend", { originalEvent: I })), G(this._map.getBearing()) && this._map.resetNorth()) : (G($.bearing || this._map.getBearing()) && ($.bearing = 0), $.freezeElevation = !0, this._map.easeTo($, { originalEvent: I })), this._updatingCamera = !1;
34333          }
34334        }
34335        _fireEvent(r, a) {
34336          this._map.fire(new c.k(r, a ? { originalEvent: a } : {}));
34337        }
34338        _requestFrame() {
34339          return this._map.triggerRepaint(), this._map._renderTaskQueue.add((r) => {
34340            delete this._frameId, this.handleEvent(new Mt("renderFrame", { timeStamp: r })), this._applyChanges();
34341          });
34342        }
34343        _triggerRenderFrame() {
34344          this._frameId === void 0 && (this._frameId = this._requestFrame());
34345        }
34346      }
34347      class Hd extends c.E {
34348        constructor(r, a) {
34349          super(), this._renderFrameCallback = () => {
34350            const f = Math.min((R.now() - this._easeStart) / this._easeOptions.duration, 1);
34351            this._onEaseFrame(this._easeOptions.easing(f)), f < 1 && this._easeFrameId ? this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback) : this.stop();
34352          }, this._moving = !1, this._zooming = !1, this.transform = r, this._bearingSnap = a.bearingSnap, this.on("moveend", () => {
34353            delete this._requestedCameraState;
34354          });
34355        }
34356        getCenter() {
34357          return new c.N(this.transform.center.lng, this.transform.center.lat);
34358        }
34359        setCenter(r, a) {
34360          return this.jumpTo({ center: r }, a);
34361        }
34362        panBy(r, a, f) {
34363          return r = c.P.convert(r).mult(-1), this.panTo(this.transform.center, c.e({ offset: r }, a), f);
34364        }
34365        panTo(r, a, f) {
34366          return this.easeTo(c.e({ center: r }, a), f);
34367        }
34368        getZoom() {
34369          return this.transform.zoom;
34370        }
34371        setZoom(r, a) {
34372          return this.jumpTo({ zoom: r }, a), this;
34373        }
34374        zoomTo(r, a, f) {
34375          return this.easeTo(c.e({ zoom: r }, a), f);
34376        }
34377        zoomIn(r, a) {
34378          return this.zoomTo(this.getZoom() + 1, r, a), this;
34379        }
34380        zoomOut(r, a) {
34381          return this.zoomTo(this.getZoom() - 1, r, a), this;
34382        }
34383        getBearing() {
34384          return this.transform.bearing;
34385        }
34386        setBearing(r, a) {
34387          return this.jumpTo({ bearing: r }, a), this;
34388        }
34389        getPadding() {
34390          return this.transform.padding;
34391        }
34392        setPadding(r, a) {
34393          return this.jumpTo({ padding: r }, a), this;
34394        }
34395        rotateTo(r, a, f) {
34396          return this.easeTo(c.e({ bearing: r }, a), f);
34397        }
34398        resetNorth(r, a) {
34399          return this.rotateTo(0, c.e({ duration: 1e3 }, r), a), this;
34400        }
34401        resetNorthPitch(r, a) {
34402          return this.easeTo(c.e({ bearing: 0, pitch: 0, duration: 1e3 }, r), a), this;
34403        }
34404        snapToNorth(r, a) {
34405          return Math.abs(this.getBearing()) < this._bearingSnap ? this.resetNorth(r, a) : this;
34406        }
34407        getPitch() {
34408          return this.transform.pitch;
34409        }
34410        setPitch(r, a) {
34411          return this.jumpTo({ pitch: r }, a), this;
34412        }
34413        cameraForBounds(r, a) {
34414          r = re.convert(r).adjustAntiMeridian();
34415          const f = a && a.bearing || 0;
34416          return this._cameraForBoxAndBearing(r.getNorthWest(), r.getSouthEast(), f, a);
34417        }
34418        _cameraForBoxAndBearing(r, a, f, d) {
34419          const y = { top: 0, bottom: 0, right: 0, left: 0 };
34420          if (typeof (d = c.e({ padding: y, offset: [0, 0], maxZoom: this.transform.maxZoom }, d)).padding == "number") {
34421            const gt = d.padding;
34422            d.padding = { top: gt, bottom: gt, right: gt, left: gt };
34423          }
34424          d.padding = c.e(y, d.padding);
34425          const S = this.transform, C = S.padding, I = new re(r, a), F = S.project(I.getNorthWest()), N = S.project(I.getNorthEast()), $ = S.project(I.getSouthEast()), G = S.project(I.getSouthWest
vendor: 10,964 bytes, lines 34425-34563
34425()), Q = c.ba(-f), te = F.rotate(Q), ae = N.rotate(Q), fe = $.rotate(Q), pe = G.rotate(Q), _e = new c.P(Math.max(te.x, ae.x, pe.x, fe.x), Math.max(te.y, ae.y, pe.y, fe.y)), se = new c.P(Math.min(te.x, ae.x, pe.x, fe.x), Math.min(te.y, ae.y, pe.y, fe.y)), Te = _e.sub(se), Me = (S.width - (C.left + C.right + d.padding.left + d.padding.right)) / Te.x, Fe = (S.height - (C.top + C.bottom + d.padding.top + d.padding.bottom)) / Te.y;
34426          if (Fe < 0 || Me < 0) return void c.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.");
34427          const Je = Math.min(S.scaleZoom(S.scale * Math.min(Me, Fe)), d.maxZoom), lt = c.P.convert(d.offset), vt = new c.P((d.padding.left - d.padding.right) / 2, (d.padding.top - d.padding.bottom) / 2).rotate(c.ba(f)), Ct = lt.add(vt).mult(S.scale / S.zoomScale(Je));
34428          return { center: S.unproject(F.add($).div(2).sub(Ct)), zoom: Je, bearing: f };
34429        }
34430        fitBounds(r, a, f) {
34431          return this._fitInternal(this.cameraForBounds(r, a), a, f);
34432        }
34433        fitScreenCoordinates(r, a, f, d, y) {
34434          return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(c.P.convert(r)), this.transform.pointLocation(c.P.convert(a)), f, d), d, y);
34435        }
34436        _fitInternal(r, a, f) {
34437          return r ? (delete (a = c.e(r, a)).padding, a.linear ? this.easeTo(a, f) : this.flyTo(a, f)) : this;
34438        }
34439        jumpTo(r, a) {
34440          this.stop();
34441          const f = this._getTransformForUpdate();
34442          let d = !1, y = !1, S = !1;
34443          return "zoom" in r && f.zoom !== +r.zoom && (d = !0, f.zoom = +r.zoom), r.center !== void 0 && (f.center = c.N.convert(r.center)), "bearing" in r && f.bearing !== +r.bearing && (y = !0, f.bearing = +r.bearing), "pitch" in r && f.pitch !== +r.pitch && (S = !0, f.pitch = +r.pitch), r.padding == null || f.isPaddingEqual(r.padding) || (f.padding = r.padding), this._applyUpdatedTransform(f), this.fire(new c.k("movestart", a)).fire(new c.k("move", a)), d && this.fire(new c.k("zoomstart", a)).fire(new c.k("zoom", a)).fire(new c.k("zoomend", a)), y && this.fire(new c.k("rotatestart", a)).fire(new c.k("rotate", a)).fire(new c.k("rotateend", a)), S && this.fire(new c.k("pitchstart", a)).fire(new c.k("pitch", a)).fire(new c.k("pitchend", a)), this.fire(new c.k("moveend", a));
34444        }
34445        calculateCameraOptionsFromTo(r, a, f, d = 0) {
34446          const y = c.Z.fromLngLat(r, a), S = c.Z.fromLngLat(f, d), C = S.x - y.x, I = S.y - y.y, F = S.z - y.z, N = Math.hypot(C, I, F);
34447          if (N === 0) throw new Error("Can't calculate camera options with same From and To");
34448          const $ = Math.hypot(C, I), G = this.transform.scaleZoom(this.transform.cameraToCenterDistance / N / this.transform.tileSize), Q = 180 * Math.atan2(C, -I) / Math.PI;
34449          let te = 180 * Math.acos($ / N) / Math.PI;
34450          return te = F < 0 ? 90 - te : 90 + te, { center: S.toLngLat(), zoom: G, pitch: te, bearing: Q };
34451        }
34452        easeTo(r, a) {
34453          var f;
34454          this._stop(!1, r.easeId), ((r = c.e({ offset: [0, 0], duration: 500, easing: c.b9 }, r)).animate === !1 || !r.essential && R.prefersReducedMotion) && (r.duration = 0);
34455          const d = this._getTransformForUpdate(), y = d.zoom, S = d.bearing, C = d.pitch, I = d.padding, F = "bearing" in r ? this._normalizeBearing(r.bearing, S) : S, N = "pitch" in r ? +r.pitch : C, $ = "padding" in r ? r.padding : d.padding, G = c.P.convert(r.offset);
34456          let Q = d.centerPoint.add(G);
34457          const te = d.pointLocation(Q), { center: ae, zoom: fe } = d.getConstrained(c.N.convert(r.center || te), (f = r.zoom) !== null && f !== void 0 ? f : y);
34458          this._normalizeCenter(ae, d);
34459          const pe = d.project(te), _e = d.project(ae).sub(pe), se = d.zoomScale(fe - y);
34460          let Te, Me;
34461          r.around && (Te = c.N.convert(r.around), Me = d.locationPoint(Te));
34462          const Fe = { moving: this._moving, zooming: this._zooming, rotating: this._rotating, pitching: this._pitching };
34463          return this._zooming = this._zooming || fe !== y, this._rotating = this._rotating || S !== F, this._pitching = this._pitching || N !== C, this._padding = !d.isPaddingEqual($), this._easeId = r.easeId, this._prepareEase(a, r.noMoveStart, Fe), this.terrain && this._prepareElevation(ae), this._ease((Je) => {
34464            if (this._zooming && (d.zoom = c.y.number(y, fe, Je)), this._rotating && (d.bearing = c.y.number(S, F, Je)), this._pitching && (d.pitch = c.y.number(C, N, Je)), this._padding && (d.interpolatePadding(I, $, Je), Q = d.centerPoint.add(G)), this.terrain && !r.freezeElevation && this._updateElevation(Je), Te) d.setLocationAtPoint(Te, Me);
34465            else {
34466              const lt = d.zoomScale(d.zoom - y), vt = fe > y ? Math.min(2, se) : Math.max(0.5, se), Ct = Math.pow(vt, 1 - Je), gt = d.unproject(pe.add(_e.mult(Je * Ct)).mult(lt));
34467              d.setLocationAtPoint(d.renderWorldCopies ? gt.wrap() : gt, Q);
34468            }
34469            this._applyUpdatedTransform(d), this._fireMoveEvents(a);
34470          }, (Je) => {
34471            this.terrain && r.freezeElevation && this._finalizeElevation(), this._afterEase(a, Je);
34472          }, r), this;
34473        }
34474        _prepareEase(r, a, f = {}) {
34475          this._moving = !0, a || f.moving || this.fire(new c.k("movestart", r)), this._zooming && !f.zooming && this.fire(new c.k("zoomstart", r)), this._rotating && !f.rotating && this.fire(new c.k("rotatestart", r)), this._pitching && !f.pitching && this.fire(new c.k("pitchstart", r));
34476        }
34477        _prepareElevation(r) {
34478          this._elevationCenter = r, this._elevationStart = this.transform.elevation, this._elevationTarget = this.terrain.getElevationForLngLatZoom(r, this.transform.tileZoom), this._elevationFreeze = !0;
34479        }
34480        _updateElevation(r) {
34481          this.transform.minElevationForCurrentTile = this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter, this.transform.tileZoom);
34482          const a = this.terrain.getElevationForLngLatZoom(this._elevationCenter, this.transform.tileZoom);
34483          if (r < 1 && a !== this._elevationTarget) {
34484            const f = this._elevationTarget - this._elevationStart;
34485            this._elevationStart += r * (f - (a - (f * r + this._elevationStart)) / (1 - r)), this._elevationTarget = a;
34486          }
34487          this.transform.elevation = c.y.number(this._elevationStart, this._elevationTarget, r);
34488        }
34489        _finalizeElevation() {
34490          this._elevationFreeze = !1, this.transform.recalculateZoom(this.terrain);
34491        }
34492        _getTransformForUpdate() {
34493          return this.transformCameraUpdate || this.terrain ? (this._requestedCameraState || (this._requestedCameraState = this.transform.clone()), this._requestedCameraState) : this.transform;
34494        }
34495        _elevateCameraIfInsideTerrain(r) {
34496          const a = r.getCameraPosition(), f = this.terrain.getElevationForLngLatZoom(a.lngLat, r.zoom);
34497          if (a.altitude < f) {
34498            const d = this.calculateCameraOptionsFromTo(a.lngLat, f, r.center, r.elevation);
34499            return { pitch: d.pitch, zoom: d.zoom };
34500          }
34501          return {};
34502        }
34503        _applyUpdatedTransform(r) {
34504          const a = [];
34505          if (this.terrain && a.push((d) => this._elevateCameraIfInsideTerrain(d)), this.transformCameraUpdate && a.push((d) => this.transformCameraUpdate(d)), !a.length) return;
34506          const f = r.clone();
34507          for (const d of a) {
34508            const y = f.clone(), { center: S, zoom: C, pitch: I, bearing: F, elevation: N } = d(y);
34509            S && (y.center = S), C !== void 0 && (y.zoom = C), I !== void 0 && (y.pitch = I), F !== void 0 && (y.bearing = F), N !== void 0 && (y.elevation = N), f.apply(y);
34510          }
34511          this.transform.apply(f);
34512        }
34513        _fireMoveEvents(r) {
34514          this.fire(new c.k("move", r)), this._zooming && this.fire(new c.k("zoom", r)), this._rotating && this.fire(new c.k("rotate", r)), this._pitching && this.fire(new c.k("pitch", r));
34515        }
34516        _afterEase(r, a) {
34517          if (this._easeId && a && this._easeId === a) return;
34518          delete this._easeId;
34519          const f = this._zooming, d = this._rotating, y = this._pitching;
34520          this._moving = !1, this._zooming = !1, this._rotating = !1, this._pitching = !1, this._padding = !1, f && this.fire(new c.k("zoomend", r)), d && this.fire(new c.k("rotateend", r)), y && this.fire(new c.k("pitchend", r)), this.fire(new c.k("moveend", r));
34521        }
34522        flyTo(r, a) {
34523          var f;
34524          if (!r.essential && R.prefersReducedMotion) {
34525            const Et = c.M(r, ["center", "zoom", "bearing", "pitch", "around"]);
34526            return this.jumpTo(Et, a);
34527          }
34528          this.stop(), r = c.e({ offset: [0, 0], speed: 1.2, curve: 1.42, easing: c.b9 }, r);
34529          const d = this._getTransformForUpdate(), y = d.zoom, S = d.bearing, C = d.pitch, I = d.padding, F = "bearing" in r ? this._normalizeBearing(r.bearing, S) : S, N = "pitch" in r ? +r.pitch : C, $ = "padding" in r ? r.padding : d.padding, G = c.P.convert(r.offset);
34530          let Q = d.centerPoint.add(G);
34531          const te = d.pointLocation(Q), { center: ae, zoom: fe } = d.getConstrained(c.N.convert(r.center || te), (f = r.zoom) !== null && f !== void 0 ? f : y);
34532          this._normalizeCenter(ae, d);
34533          const pe = d.zoomScale(fe - y), _e = d.project(te), se = d.project(ae).sub(_e);
34534          let Te = r.curve;
34535          const Me = Math.max(d.width, d.height), Fe = Me / pe, Je = se.mag();
34536          if ("minZoom" in r) {
34537            const Et = c.ac(Math.min(r.minZoom, y, fe), d.minZoom, d.maxZoom), rr = Me / d.zoomScale(Et - y);
34538            Te = Math.sqrt(rr / Je * 2);
34539          }
34540          const lt = Te * Te;
34541          function vt(Et) {
34542            const rr = (Fe * Fe - Me * Me + (Et ? -1 : 1) * lt * lt * Je * Je) / (2 * (Et ? Fe : Me) * lt * Je);
34543            return Math.log(Math.sqrt(rr * rr + 1) - rr);
34544          }
34545          function Ct(Et) {
34546            return (Math.exp(Et) - Math.exp(-Et)) / 2;
34547          }
34548          function gt(Et) {
34549            return (Math.exp(Et) + Math.exp(-Et)) / 2;
34550          }
34551          const pt = vt(!1);
34552          let Ft = function(Et) {
34553            return gt(pt) / gt(pt + Te * Et);
34554          }, ir = function(Et) {
34555            return Me * ((gt(pt) * (Ct(rr = pt + Te * Et) / gt(rr)) - Ct(pt)) / lt) / Je;
34556            var rr;
34557          }, yt = (vt(!0) - pt) / Te;
34558          if (Math.abs(Je) < 1e-6 || !isFinite(yt)) {
34559            if (Math.abs(Me - Fe) < 1e-6) return this.easeTo(r, a);
34560            const Et = Fe < Me ? -1 : 1;
34561            yt = Math.abs(Math.log(Fe / Me)) / Te, ir = () => 0, Ft = (rr) => Math.exp(Et * Te * rr);
34562          }
34563          return r.duration = "duration" in r ? +r.duration : 1e3 * yt / ("screenSpeed" in r ? +r.screenSpeed / Te : +r.speed), r.maxDuration && r.duration > r.maxDuration && (r.duration = 0), this._zooming = !0, this._rotating = 
vendor: 27,581 bytes, lines 34563-34952
34563S !== F, this._pitching = N !== C, this._padding = !d.isPaddingEqual($), this._prepareEase(a, !1), this.terrain && this._prepareElevation(ae), this._ease((Et) => {
34564            const rr = Et * yt, yn = 1 / Ft(rr);
34565            d.zoom = Et === 1 ? fe : y + d.scaleZoom(yn), this._rotating && (d.bearing = c.y.number(S, F, Et)), this._pitching && (d.pitch = c.y.number(C, N, Et)), this._padding && (d.interpolatePadding(I, $, Et), Q = d.centerPoint.add(G)), this.terrain && !r.freezeElevation && this._updateElevation(Et);
34566            const pr = Et === 1 ? ae : d.unproject(_e.add(se.mult(ir(rr))).mult(yn));
34567            d.setLocationAtPoint(d.renderWorldCopies ? pr.wrap() : pr, Q), this._applyUpdatedTransform(d), this._fireMoveEvents(a);
34568          }, () => {
34569            this.terrain && r.freezeElevation && this._finalizeElevation(), this._afterEase(a);
34570          }, r), this;
34571        }
34572        isEasing() {
34573          return !!this._easeFrameId;
34574        }
34575        stop() {
34576          return this._stop();
34577        }
34578        _stop(r, a) {
34579          var f;
34580          if (this._easeFrameId && (this._cancelRenderFrame(this._easeFrameId), delete this._easeFrameId, delete this._onEaseFrame), this._onEaseEnd) {
34581            const d = this._onEaseEnd;
34582            delete this._onEaseEnd, d.call(this, a);
34583          }
34584          return r || (f = this.handlers) === null || f === void 0 || f.stop(!1), this;
34585        }
34586        _ease(r, a, f) {
34587          f.animate === !1 || f.duration === 0 ? (r(1), a()) : (this._easeStart = R.now(), this._easeOptions = f, this._onEaseFrame = r, this._onEaseEnd = a, this._easeFrameId = this._requestRenderFrame(this._renderFrameCallback));
34588        }
34589        _normalizeBearing(r, a) {
34590          r = c.b3(r, -180, 180);
34591          const f = Math.abs(r - a);
34592          return Math.abs(r - 360 - a) < f && (r -= 360), Math.abs(r + 360 - a) < f && (r += 360), r;
34593        }
34594        _normalizeCenter(r, a) {
34595          if (!a.renderWorldCopies || a.lngRange) return;
34596          const f = r.lng - a.center.lng;
34597          r.lng += f > 180 ? -360 : f < -180 ? 360 : 0;
34598        }
34599        queryTerrainElevation(r) {
34600          return this.terrain ? this.terrain.getElevationForLngLatZoom(c.N.convert(r), this.transform.tileZoom) - this.transform.elevation : null;
34601        }
34602      }
34603      const El = { compact: !0, customAttribution: '<a href="https://maplibre.org/" target="_blank">MapLibre</a>' };
34604      class Al {
34605        constructor(r = El) {
34606          this._toggleAttribution = () => {
34607            this._container.classList.contains("maplibregl-compact") && (this._container.classList.contains("maplibregl-compact-show") ? (this._container.setAttribute("open", ""), this._container.classList.remove("maplibregl-compact-show")) : (this._container.classList.add("maplibregl-compact-show"), this._container.removeAttribute("open")));
34608          }, this._updateData = (a) => {
34609            !a || a.sourceDataType !== "metadata" && a.sourceDataType !== "visibility" && a.dataType !== "style" && a.type !== "terrain" || this._updateAttributions();
34610          }, this._updateCompact = () => {
34611            this._map.getCanvasContainer().offsetWidth <= 640 || this._compact ? this._compact === !1 ? this._container.setAttribute("open", "") : this._container.classList.contains("maplibregl-compact") || this._container.classList.contains("maplibregl-attrib-empty") || (this._container.setAttribute("open", ""), this._container.classList.add("maplibregl-compact", "maplibregl-compact-show")) : (this._container.setAttribute("open", ""), this._container.classList.contains("maplibregl-compact") && this._container.classList.remove("maplibregl-compact", "maplibregl-compact-show"));
34612          }, this._updateCompactMinimize = () => {
34613            this._container.classList.contains("maplibregl-compact") && this._container.classList.contains("maplibregl-compact-show") && this._container.classList.remove("maplibregl-compact-show");
34614          }, this.options = r;
34615        }
34616        getDefaultPosition() {
34617          return "bottom-right";
34618        }
34619        onAdd(r) {
34620          return this._map = r, this._compact = this.options.compact, this._container = z.create("details", "maplibregl-ctrl maplibregl-ctrl-attrib"), this._compactButton = z.create("summary", "maplibregl-ctrl-attrib-button", this._container), this._compactButton.addEventListener("click", this._toggleAttribution), this._setElementTitle(this._compactButton, "ToggleAttribution"), this._innerContainer = z.create("div", "maplibregl-ctrl-attrib-inner", this._container), this._updateAttributions(), this._updateCompact(), this._map.on("styledata", this._updateData), this._map.on("sourcedata", this._updateData), this._map.on("terrain", this._updateData), this._map.on("resize", this._updateCompact), this._map.on("drag", this._updateCompactMinimize), this._container;
34621        }
34622        onRemove() {
34623          z.remove(this._container), this._map.off("styledata", this._updateData), this._map.off("sourcedata", this._updateData), this._map.off("terrain", this._updateData), this._map.off("resize", this._updateCompact), this._map.off("drag", this._updateCompactMinimize), this._map = void 0, this._compact = void 0, this._attribHTML = void 0;
34624        }
34625        _setElementTitle(r, a) {
34626          const f = this._map._getUIString(`AttributionControl.${a}`);
34627          r.title = f, r.setAttribute("aria-label", f);
34628        }
34629        _updateAttributions() {
34630          if (!this._map.style) return;
34631          let r = [];
34632          if (this.options.customAttribution && (Array.isArray(this.options.customAttribution) ? r = r.concat(this.options.customAttribution.map((d) => typeof d != "string" ? "" : d)) : typeof this.options.customAttribution == "string" && r.push(this.options.customAttribution)), this._map.style.stylesheet) {
34633            const d = this._map.style.stylesheet;
34634            this.styleOwner = d.owner, this.styleId = d.id;
34635          }
34636          const a = this._map.style.sourceCaches;
34637          for (const d in a) {
34638            const y = a[d];
34639            if (y.used || y.usedForTerrain) {
34640              const S = y.getSource();
34641              S.attribution && r.indexOf(S.attribution) < 0 && r.push(S.attribution);
34642            }
34643          }
34644          r = r.filter((d) => String(d).trim()), r.sort((d, y) => d.length - y.length), r = r.filter((d, y) => {
34645            for (let S = y + 1; S < r.length; S++) if (r[S].indexOf(d) >= 0) return !1;
34646            return !0;
34647          });
34648          const f = r.join(" | ");
34649          f !== this._attribHTML && (this._attribHTML = f, r.length ? (this._innerContainer.innerHTML = f, this._container.classList.remove("maplibregl-attrib-empty")) : this._container.classList.add("maplibregl-attrib-empty"), this._updateCompact(), this._editLink = null);
34650        }
34651      }
34652      class tf {
34653        constructor(r = {}) {
34654          this._updateCompact = () => {
34655            const a = this._container.children;
34656            if (a.length) {
34657              const f = a[0];
34658              this._map.getCanvasContainer().offsetWidth <= 640 || this._compact ? this._compact !== !1 && f.classList.add("maplibregl-compact") : f.classList.remove("maplibregl-compact");
34659            }
34660          }, this.options = r;
34661        }
34662        getDefaultPosition() {
34663          return "bottom-left";
34664        }
34665        onAdd(r) {
34666          this._map = r, this._compact = this.options && this.options.compact, this._container = z.create("div", "maplibregl-ctrl");
34667          const a = z.create("a", "maplibregl-ctrl-logo");
34668          return a.target = "_blank", a.rel = "noopener nofollow", a.href = "https://maplibre.org/", a.setAttribute("aria-label", this._map._getUIString("LogoControl.Title")), a.setAttribute("rel", "noopener nofollow"), this._container.appendChild(a), this._container.style.display = "block", this._map.on("resize", this._updateCompact), this._updateCompact(), this._container;
34669        }
34670        onRemove() {
34671          z.remove(this._container), this._map.off("resize", this._updateCompact), this._map = void 0, this._compact = void 0;
34672        }
34673      }
34674      class Sr {
34675        constructor() {
34676          this._queue = [], this._id = 0, this._cleared = !1, this._currentlyRunning = !1;
34677        }
34678        add(r) {
34679          const a = ++this._id;
34680          return this._queue.push({ callback: r, id: a, cancelled: !1 }), a;
34681        }
34682        remove(r) {
34683          const a = this._currentlyRunning, f = a ? this._queue.concat(a) : this._queue;
34684          for (const d of f) if (d.id === r) return void (d.cancelled = !0);
34685        }
34686        run(r = 0) {
34687          if (this._currentlyRunning) throw new Error("Attempting to run(), but is already running.");
34688          const a = this._currentlyRunning = this._queue;
34689          this._queue = [];
34690          for (const f of a) if (!f.cancelled && (f.callback(r), this._cleared)) break;
34691          this._cleared = !1, this._currentlyRunning = !1;
34692        }
34693        clear() {
34694          this._currentlyRunning && (this._cleared = !0), this._queue = [];
34695        }
34696      }
34697      var rf = c.Y([{ name: "a_pos3d", type: "Int16", components: 3 }]);
34698      class Yg extends c.E {
34699        constructor(r) {
34700          super(), this.sourceCache = r, this._tiles = {}, this._renderableTilesKeys = [], this._sourceTileCache = {}, this.minzoom = 0, this.maxzoom = 22, this.tileSize = 512, this.deltaZoom = 1, r.usedForTerrain = !0, r.tileSize = this.tileSize * 2 ** this.deltaZoom;
34701        }
34702        destruct() {
34703          this.sourceCache.usedForTerrain = !1, this.sourceCache.tileSize = null;
34704        }
34705        update(r, a) {
34706          this.sourceCache.update(r, a), this._renderableTilesKeys = [];
34707          const f = {};
34708          for (const d of r.coveringTiles({ tileSize: this.tileSize, minzoom: this.minzoom, maxzoom: this.maxzoom, reparseOverscaled: !1, terrain: a })) f[d.key] = !0, this._renderableTilesKeys.push(d.key), this._tiles[d.key] || (d.posMatrix = new Float64Array(16), c.aP(d.posMatrix, 0, c.X, 0, c.X, 0, 1), this._tiles[d.key] = new wn(d, this.tileSize));
34709          for (const d in this._tiles) f[d] || delete this._tiles[d];
34710        }
34711        freeRtt(r) {
34712          for (const a in this._tiles) {
34713            const f = this._tiles[a];
34714            (!r || f.tileID.equals(r) || f.tileID.isChildOf(r) || r.isChildOf(f.tileID)) && (f.rtt = []);
34715          }
34716        }
34717        getRenderableTiles() {
34718          return this._renderableTilesKeys.map((r) => this.getTileByID(r));
34719        }
34720        getTileByID(r) {
34721          return this._tiles[r];
34722        }
34723        getTerrainCoords(r) {
34724          const a = {};
34725          for (const f of this._renderableTilesKeys) {
34726            const d = this._tiles[f].tileID;
34727            if (d.canonical.equals(r.canonical)) {
34728              const y = r.clone();
34729              y.posMatrix = new Float64Array(16), c.aP(y.posMatrix, 0, c.X, 0, c.X, 0, 1), a[f] = y;
34730            } else if (d.canonical.isChildOf(r.canonical)) {
34731              const y = r.clone();
34732              y.posMatrix = new Float64Array(16);
34733              const S = d.canonical.z - r.canonical.z, C = d.canonical.x - (d.canonical.x >> S << S), I = d.canonical.y - (d.canonical.y >> S << S), F = c.X >> S;
34734              c.aP(y.posMatrix, 0, F, 0, F, 0, 1), c.J(y.posMatrix, y.posMatrix, [-C * F, -I * F, 0]), a[f] = y;
34735            } else if (r.canonical.isChildOf(d.canonical)) {
34736              const y = r.clone();
34737              y.posMatrix = new Float64Array(16);
34738              const S = r.canonical.z - d.canonical.z, C = r.canonical.x - (r.canonical.x >> S << S), I = r.canonical.y - (r.canonical.y >> S << S), F = c.X >> S;
34739              c.aP(y.posMatrix, 0, c.X, 0, c.X, 0, 1), c.J(y.posMatrix, y.posMatrix, [C * F, I * F, 0]), c.K(y.posMatrix, y.posMatrix, [1 / 2 ** S, 1 / 2 ** S, 0]), a[f] = y;
34740            }
34741          }
34742          return a;
34743        }
34744        getSourceTile(r, a) {
34745          const f = this.sourceCache._source;
34746          let d = r.overscaledZ - this.deltaZoom;
34747          if (d > f.maxzoom && (d = f.maxzoom), d < f.minzoom) return null;
34748          this._sourceTileCache[r.key] || (this._sourceTileCache[r.key] = r.scaledTo(d).key);
34749          let y = this.sourceCache.getTileByID(this._sourceTileCache[r.key]);
34750          if ((!y || !y.dem) && a) for (; d >= f.minzoom && (!y || !y.dem); ) y = this.sourceCache.getTileByID(r.scaledTo(d--).key);
34751          return y;
34752        }
34753        tilesAfterTime(r = Date.now()) {
34754          return Object.values(this._tiles).filter((a) => a.timeAdded >= r);
34755        }
34756      }
34757      class nf {
34758        constructor(r, a, f) {
34759          this.painter = r, this.sourceCache = new Yg(a), this.options = f, this.exaggeration = typeof f.exaggeration == "number" ? f.exaggeration : 1, this.qualityFactor = 2, this.meshSize = 128, this._demMatrixCache = {}, this.coordsIndex = [], this._coordsTextureSize = 1024;
34760        }
34761        getDEMElevation(r, a, f, d = c.X) {
34762          var y;
34763          if (!(a >= 0 && a < d && f >= 0 && f < d)) return 0;
34764          const S = this.getTerrainData(r), C = (y = S.tile) === null || y === void 0 ? void 0 : y.dem;
34765          if (!C) return 0;
34766          const I = function(te, ae, fe) {
34767            var pe = ae[0], _e = ae[1];
34768            return te[0] = fe[0] * pe + fe[4] * _e + fe[12], te[1] = fe[1] * pe + fe[5] * _e + fe[13], te;
34769          }([], [a / d * c.X, f / d * c.X], S.u_terrain_matrix), F = [I[0] * C.dim, I[1] * C.dim], N = Math.floor(F[0]), $ = Math.floor(F[1]), G = F[0] - N, Q = F[1] - $;
34770          return C.get(N, $) * (1 - G) * (1 - Q) + C.get(N + 1, $) * G * (1 - Q) + C.get(N, $ + 1) * (1 - G) * Q + C.get(N + 1, $ + 1) * G * Q;
34771        }
34772        getElevationForLngLatZoom(r, a) {
34773          if (!c.bb(a, r.wrap())) return 0;
34774          const { tileID: f, mercatorX: d, mercatorY: y } = this._getOverscaledTileIDFromLngLatZoom(r, a);
34775          return this.getElevation(f, d % c.X, y % c.X, c.X);
34776        }
34777        getElevation(r, a, f, d = c.X) {
34778          return this.getDEMElevation(r, a, f, d) * this.exaggeration;
34779        }
34780        getTerrainData(r) {
34781          if (!this._emptyDemTexture) {
34782            const d = this.painter.context, y = new c.R({ width: 1, height: 1 }, new Uint8Array(4));
34783            this._emptyDepthTexture = new He(d, y, d.gl.RGBA, { premultiply: !1 }), this._emptyDemUnpack = [0, 0, 0, 0], this._emptyDemTexture = new He(d, new c.R({ width: 1, height: 1 }), d.gl.RGBA, { premultiply: !1 }), this._emptyDemTexture.bind(d.gl.NEAREST, d.gl.CLAMP_TO_EDGE), this._emptyDemMatrix = c.an([]);
34784          }
34785          const a = this.sourceCache.getSourceTile(r, !0);
34786          if (a && a.dem && (!a.demTexture || a.needsTerrainPrepare)) {
34787            const d = this.painter.context;
34788            a.demTexture = this.painter.getTileTexture(a.dem.stride), a.demTexture ? a.demTexture.update(a.dem.getPixels(), { premultiply: !1 }) : a.demTexture = new He(d, a.dem.getPixels(), d.gl.RGBA, { premultiply: !1 }), a.demTexture.bind(d.gl.NEAREST, d.gl.CLAMP_TO_EDGE), a.needsTerrainPrepare = !1;
34789          }
34790          const f = a && a + a.tileID.key + r.key;
34791          if (f && !this._demMatrixCache[f]) {
34792            const d = this.sourceCache.sourceCache._source.maxzoom;
34793            let y = r.canonical.z - a.tileID.canonical.z;
34794            r.overscaledZ > r.canonical.z && (r.canonical.z >= d ? y = r.canonical.z - d : c.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));
34795            const S = r.canonical.x - (r.canonical.x >> y << y), C = r.canonical.y - (r.canonical.y >> y << y), I = c.bc(new Float64Array(16), [1 / (c.X << y), 1 / (c.X << y), 0]);
34796            c.J(I, I, [S * c.X, C * c.X, 0]), this._demMatrixCache[r.key] = { matrix: I, coord: r };
34797          }
34798          return { u_depth: 2, u_terrain: 3, u_terrain_dim: a && a.dem && a.dem.dim || 1, u_terrain_matrix: f ? this._demMatrixCache[r.key].matrix : this._emptyDemMatrix, u_terrain_unpack: a && a.dem && a.dem.getUnpackVector() || this._emptyDemUnpack, u_terrain_exaggeration: this.exaggeration, texture: (a && a.demTexture || this._emptyDemTexture).texture, depthTexture: (this._fboDepthTexture || this._emptyDepthTexture).texture, tile: a };
34799        }
34800        getFramebuffer(r) {
34801          const a = this.painter, f = a.width / devicePixelRatio, d = a.height / devicePixelRatio;
34802          return !this._fbo || this._fbo.width === f && this._fbo.height === d || (this._fbo.destroy(), this._fboCoordsTexture.destroy(), this._fboDepthTexture.destroy(), delete this._fbo, delete this._fboDepthTexture, delete this._fboCoordsTexture), this._fboCoordsTexture || (this._fboCoordsTexture = new He(a.context, { width: f, height: d, data: null }, a.context.gl.RGBA, { premultiply: !1 }), this._fboCoordsTexture.bind(a.context.gl.NEAREST, a.context.gl.CLAMP_TO_EDGE)), this._fboDepthTexture || (this._fboDepthTexture = new He(a.context, { width: f, height: d, data: null }, a.context.gl.RGBA, { premultiply: !1 }), this._fboDepthTexture.bind(a.context.gl.NEAREST, a.context.gl.CLAMP_TO_EDGE)), this._fbo || (this._fbo = a.context.createFramebuffer(f, d, !0, !1), this._fbo.depthAttachment.set(a.context.createRenderbuffer(a.context.gl.DEPTH_COMPONENT16, f, d))), this._fbo.colorAttachment.set(r === "coords" ? this._fboCoordsTexture.texture : this._fboDepthTexture.texture), this._fbo;
34803        }
34804        getCoordsTexture() {
34805          const r = this.painter.context;
34806          if (this._coordsTexture) return this._coordsTexture;
34807          const a = new Uint8Array(this._coordsTextureSize * this._coordsTextureSize * 4);
34808          for (let y = 0, S = 0; y < this._coordsTextureSize; y++) for (let C = 0; C < this._coordsTextureSize; C++, S += 4) a[S + 0] = 255 & C, a[S + 1] = 255 & y, a[S + 2] = C >> 8 << 4 | y >> 8, a[S + 3] = 0;
34809          const f = new c.R({ width: this._coordsTextureSize, height: this._coordsTextureSize }, new Uint8Array(a.buffer)), d = new He(r, f, r.gl.RGBA, { premultiply: !1 });
34810          return d.bind(r.gl.NEAREST, r.gl.CLAMP_TO_EDGE), this._coordsTexture = d, d;
34811        }
34812        pointCoordinate(r) {
34813          this.painter.maybeDrawDepthAndCoords(!0);
34814          const a = new Uint8Array(4), f = this.painter.context, d = f.gl, y = Math.round(r.x * this.painter.pixelRatio / devicePixelRatio), S = Math.round(r.y * this.painter.pixelRatio / devicePixelRatio), C = Math.round(this.painter.height / devicePixelRatio);
34815          f.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer), d.readPixels(y, C - S - 1, 1, 1, d.RGBA, d.UNSIGNED_BYTE, a), f.bindFramebuffer.set(null);
34816          const I = a[0] + (a[2] >> 4 << 8), F = a[1] + ((15 & a[2]) << 8), N = this.coordsIndex[255 - a[3]], $ = N && this.sourceCache.getTileByID(N);
34817          if (!$) return null;
34818          const G = this._coordsTextureSize, Q = (1 << $.tileID.canonical.z) * G;
34819          return new c.Z(($.tileID.canonical.x * G + I) / Q + $.tileID.wrap, ($.tileID.canonical.y * G + F) / Q, this.getElevation($.tileID, I, F, G));
34820        }
34821        depthAtPoint(r) {
34822          const a = new Uint8Array(4), f = this.painter.context, d = f.gl;
34823          return f.bindFramebuffer.set(this.getFramebuffer("depth").framebuffer), d.readPixels(r.x, this.painter.height / devicePixelRatio - r.y - 1, 1, 1, d.RGBA, d.UNSIGNED_BYTE, a), f.bindFramebuffer.set(null), (a[0] / 16777216 + a[1] / 65536 + a[2] / 256 + a[3]) / 256;
34824        }
34825        getTerrainMesh() {
34826          if (this._mesh) return this._mesh;
34827          const r = this.painter.context, a = new c.bd(), f = new c.aY(), d = this.meshSize, y = c.X / d, S = d * d;
34828          for (let $ = 0; $ <= d; $++) for (let G = 0; G <= d; G++) a.emplaceBack(G * y, $ * y, 0);
34829          for (let $ = 0; $ < S; $ += d + 1) for (let G = 0; G < d; G++) f.emplaceBack(G + $, d + G + $ + 1, d + G + $ + 2), f.emplaceBack(G + $, d + G + $ + 2, G + $ + 1);
34830          const C = a.length, I = C + 2 * (d + 1);
34831          for (const $ of [0, 1]) for (let G = 0; G <= d; G++) for (const Q of [0, 1]) a.emplaceBack(G * y, $ * c.X, Q);
34832          for (let $ = 0; $ < 2 * d; $ += 2) f.emplaceBack(I + $, I + $ + 1, I + $ + 3), f.emplaceBack(I + $, I + $ + 3, I + $ + 2), f.emplaceBack(C + $, C + $ + 3, C + $ + 1), f.emplaceBack(C + $, C + $ + 2, C + $ + 3);
34833          const F = a.length, N = F + 2 * (d + 1);
34834          for (const $ of [0, 1]) for (let G = 0; G <= d; G++) for (const Q of [0, 1]) a.emplaceBack($ * c.X, G * y, Q);
34835          for (let $ = 0; $ < 2 * d; $ += 2) f.emplaceBack(F + $, F + $ + 1, F + $ + 3), f.emplaceBack(F + $, F + $ + 3, F + $ + 2), f.emplaceBack(N + $, N + $ + 3, N + $ + 1), f.emplaceBack(N + $, N + $ + 2, N + $ + 3);
34836          return this._mesh = new Tn(r.createVertexBuffer(a, rf.members), r.createIndexBuffer(f), c.a0.simpleSegment(0, 0, a.length, f.length)), this._mesh;
34837        }
34838        getMeshFrameDelta(r) {
34839          return 2 * Math.PI * c.be / Math.pow(2, r) / 5;
34840        }
34841        getMinTileElevationForLngLatZoom(r, a) {
34842          var f;
34843          const { tileID: d } = this._getOverscaledTileIDFromLngLatZoom(r, a);
34844          return (f = this.getMinMaxElevation(d).minElevation) !== null && f !== void 0 ? f : 0;
34845        }
34846        getMinMaxElevation(r) {
34847          const a = this.getTerrainData(r).tile, f = { minElevation: null, maxElevation: null };
34848          return a && a.dem && (f.minElevation = a.dem.min * this.exaggeration, f.maxElevation = a.dem.max * this.exaggeration), f;
34849        }
34850        _getOverscaledTileIDFromLngLatZoom(r, a) {
34851          const f = c.Z.fromLngLat(r.wrap()), d = (1 << a) * c.X, y = f.x * d, S = f.y * d, C = Math.floor(y / c.X), I = Math.floor(S / c.X);
34852          return { tileID: new c.S(a, 0, a, C, I), mercatorX: y, mercatorY: S };
34853        }
34854      }
34855      class Qg {
34856        constructor(r, a, f) {
34857          this._context = r, this._size = a, this._tileSize = f, this._objects = [], this._recentlyUsed = [], this._stamp = 0;
34858        }
34859        destruct() {
34860          for (const r of this._objects) r.texture.destroy(), r.fbo.destroy();
34861        }
34862        _createObject(r) {
34863          const a = this._context.createFramebuffer(this._tileSize, this._tileSize, !0, !0), f = new He(this._context, { width: this._tileSize, height: this._tileSize, data: null }, this._context.gl.RGBA);
34864          return f.bind(this._context.gl.LINEAR, this._context.gl.CLAMP_TO_EDGE), a.depthAttachment.set(this._context.createRenderbuffer(this._context.gl.DEPTH_STENCIL, this._tileSize, this._tileSize)), a.colorAttachment.set(f.texture), { id: r, fbo: a, texture: f, stamp: -1, inUse: !1 };
34865        }
34866        getObjectForId(r) {
34867          return this._objects[r];
34868        }
34869        useObject(r) {
34870          r.inUse = !0, this._recentlyUsed = this._recentlyUsed.filter((a) => r.id !== a), this._recentlyUsed.push(r.id);
34871        }
34872        stampObject(r) {
34873          r.stamp = ++this._stamp;
34874        }
34875        getOrCreateFreeObject() {
34876          for (const a of this._recentlyUsed) if (!this._objects[a].inUse) return this._objects[a];
34877          if (this._objects.length >= this._size) throw new Error("No free RenderPool available, call freeAllObjects() required!");
34878          const r = this._createObject(this._objects.length);
34879          return this._objects.push(r), r;
34880        }
34881        freeObject(r) {
34882          r.inUse = !1;
34883        }
34884        freeAllObjects() {
34885          for (const r of this._objects) this.freeObject(r);
34886        }
34887        isFull() {
34888          return !(this._objects.length < this._size) && this._objects.some((r) => !r.inUse) === !1;
34889        }
34890      }
34891      const Cl = { background: !0, fill: !0, line: !0, raster: !0, hillshade: !0 };
34892      class Gd {
34893        constructor(r, a) {
34894          this.painter = r, this.terrain = a, this.pool = new Qg(r.context, 30, a.sourceCache.tileSize * a.qualityFactor);
34895        }
34896        destruct() {
34897          this.pool.destruct();
34898        }
34899        getTexture(r) {
34900          return this.pool.getObjectForId(r.rtt[this._stacks.length - 1].id).texture;
34901        }
34902        prepareForRender(r, a) {
34903          this._stacks = [], this._prevType = null, this._rttTiles = [], this._renderableTiles = this.terrain.sourceCache.getRenderableTiles(), this._renderableLayerIds = r._order.filter((f) => !r._layers[f].isHidden(a)), this._coordsDescendingInv = {};
34904          for (const f in r.sourceCaches) {
34905            this._coordsDescendingInv[f] = {};
34906            const d = r.sourceCaches[f].getVisibleCoordinates();
34907            for (const y of d) {
34908              const S = this.terrain.sourceCache.getTerrainCoords(y);
34909              for (const C in S) this._coordsDescendingInv[f][C] || (this._coordsDescendingInv[f][C] = []), this._coordsDescendingInv[f][C].push(S[C]);
34910            }
34911          }
34912          this._coordsDescendingInvStr = {};
34913          for (const f of r._order) {
34914            const d = r._layers[f], y = d.source;
34915            if (Cl[d.type] && !this._coordsDescendingInvStr[y]) {
34916              this._coordsDescendingInvStr[y] = {};
34917              for (const S in this._coordsDescendingInv[y]) this._coordsDescendingInvStr[y][S] = this._coordsDescendingInv[y][S].map((C) => C.key).sort().join();
34918            }
34919          }
34920          for (const f of this._renderableTiles) for (const d in this._coordsDescendingInvStr) {
34921            const y = this._coordsDescendingInvStr[d][f.tileID.key];
34922            y && y !== f.rttCoords[d] && (f.rtt = []);
34923          }
34924        }
34925        renderLayer(r) {
34926          if (r.isHidden(this.painter.transform.zoom)) return !1;
34927          const a = r.type, f = this.painter, d = this._renderableLayerIds[this._renderableLayerIds.length - 1] === r.id;
34928          if (Cl[a] && (this._prevType && Cl[this._prevType] || this._stacks.push([]), this._prevType = a, this._stacks[this._stacks.length - 1].push(r.id), !d)) return !0;
34929          if (Cl[this._prevType] || Cl[a] && d) {
34930            this._prevType = a;
34931            const y = this._stacks.length - 1, S = this._stacks[y] || [];
34932            for (const C of this._renderableTiles) {
34933              if (this.pool.isFull() && (Vi(this.painter, this.terrain, this._rttTiles), this._rttTiles = [], this.pool.freeAllObjects()), this._rttTiles.push(C), C.rtt[y]) {
34934                const F = this.pool.getObjectForId(C.rtt[y].id);
34935                if (F.stamp === C.rtt[y].stamp) {
34936                  this.pool.useObject(F);
34937                  continue;
34938                }
34939              }
34940              const I = this.pool.getOrCreateFreeObject();
34941              this.pool.useObject(I), this.pool.stampObject(I), C.rtt[y] = { id: I.id, stamp: I.stamp }, f.context.bindFramebuffer.set(I.fbo.framebuffer), f.context.clear({ color: c.aM.transparent, stencil: 0 }), f.currentStencilSource = void 0;
34942              for (let F = 0; F < S.length; F++) {
34943                const N = f.style._layers[S[F]], $ = N.source ? this._coordsDescendingInv[N.source][C.tileID.key] : [C.tileID];
34944                f.context.viewport.set([0, 0, I.fbo.width, I.fbo.height]), f._renderTileClippingMasks(N, $), f.renderLayer(f, f.style.sourceCaches[N.source], N, $), N.source && (C.rttCoords[N.source] = this._coordsDescendingInvStr[N.source][C.tileID.key]);
34945              }
34946            }
34947            return Vi(this.painter, this.terrain, this._rttTiles), this._rttTiles = [], this.pool.freeAllObjects(), Cl[a];
34948          }
34949          return !1;
34950        }
34951      }
34952      const sf = { "AttributionControl.ToggleAttribution": "Toggle attribution", "AttributionControl.MapFeedback": "Map feedback", "FullscreenControl.Enter": "Enter fullscreen", "FullscreenControl.Exit": "Exit fullscreen", "GeolocateControl.FindMyLocation": "Find my location", "GeolocateControl.LocationNotAvailable": "Location not available", "LogoControl.Title": "MapLibre logo", "Map.Title": "Map", "Mar
34952ker.Title": "Map marker", "NavigationControl.ResetBearing": "Reset bearing to north", "NavigationControl.ZoomIn": "Zoom in", "NavigationControl.ZoomOut": "Zoom out", "Popup.Close": "Close popup", "ScaleControl.Feet": "ft", "ScaleControl.Meters": "m", "ScaleControl.Kilometers": "km", "ScaleControl.Miles": "mi", "ScaleControl.NauticalMiles": "nm", "TerrainControl.Enable": "Enable terrain", "TerrainControl.Disable": "Disable terrain", "CooperativeGesturesHandler.WindowsHelpText": "Use Ctrl + scroll to zoom the map", "CooperativeGesturesHandler.MacHelpText": "Use ⌘ + scroll to zoom the map", "CooperativeGesturesHandler.MobileHelpText": "Use two fingers to move the map" }, Zd = w, ey = { hash: !1, interactive: !0, bearingSnap: 7, attributionControl: El, maplibreLogo: !1, failIfMajorPerformanceCaveat: !1, preserveDrawingBuffer: !1, refreshExpiredTiles: !0, scrollZoom: !0, minZoom: -2, maxZoom: 22, minPitch: 0, maxPitch: 60, boxZoom: !0, dragRotate: !0, dragPan: !0, keyboard: !0, doubleClickZoom: !0, touchZoomRotate: !0, touchPitch: !0, cooperativeGestures: !1, trackResize: !0, center: [0, 0], zoom: 0, bearing: 0, pitch: 0, renderWorldCopies: !0, maxTileCacheSize: null, maxTileCacheZoomLevels: c.a.MAX_TILE_CACHE_ZOOM_LEVELS, transformRequest: null, transformCameraUpdate: null, fadeDuration: 300, crossSourceCollisions: !0, clickTolerance: 3, localIdeographFontFamily: "sans-serif", pitchWithRotate: !0, validateStyle: !0, maxCanvasSize: [4096, 4096], cancelPendingTileRequestsWhileZooming: !0 }, of = (_) => {
34953        _.touchstart = _.dragStart, _.touchmoveWindow = _.dragMove, _.touchend = _.dragEnd;
34954      }, ty = { showCompass: !0, showZoom: !0, visualizePitch: !1 };
34955      class ry {
34956        constructor(r, a, f = !1) {
34957          this.mousedown = (S) => {
34958            this.startMouse(c.e({}, S, { ctrlKey: !0, preventDefault: () => S.preventDefault() }), z.mousePos(this.element, S)), z.addEventListener(window, "mousemove", this.mousemove), z.addEventListener(window, "mouseup", this.mouseup);
34959          }, this.mousemove = (S) => {
34960            this.moveMouse(S, z.mousePos(this.element, S));
34961          }, this.mouseup = (S) => {
34962            this.mouseRotate.dragEnd(S), this.mousePitch && this.mousePitch.dragEnd(S), this.offTemp();
34963          }, this.touchstart = (S) => {
34964            S.targetTouches.length !== 1 ? this.reset() : (this._startPos = this._lastPos = z.touchPos(this.element, S.targetTouches)[0], this.startTouch(S, this._startPos), z.addEventListener(window, "touchmove", this.touchmove, { passive: !1 }), z.addEventListener(window, "touchend", this.touchend));
34965          }, this.touchmove = (S) => {
34966            S.targetTouches.length !== 1 ? this.reset() : (this._lastPos = z.touchPos(this.element, S.targetTouches)[0], this.moveTouch(S, this._lastPos));
34967          }, this.touchend = (S) => {
34968            S.targetTouches.length === 0 && this._startPos && this._lastPos && this._startPos.dist(this._lastPos) < this._clickTolerance && this.element.click(), delete this._startPos, delete this._lastPos, this.offTemp();
34969          }, this.reset = () => {
34970            this.mouseRotate.reset(), this.mousePitch && this.mousePitch.reset(), this.touchRotate.reset(), this.touchPitch && this.touchPitch.reset(), delete this._startPos, delete this._lastPos, this.offTemp();
34971          }, this._clickTolerance = 10;
34972          const d = r.dragRotate._mouseRotate.getClickTolerance(), y = r.dragRotate._mousePitch.getClickTolerance();
34973          this.element = a, this.mouseRotate = Gh({ clickTolerance: d, enable: !0 }), this.touchRotate = (({ enable: S, clickTolerance: C, bearingDegreesPerPixelMoved: I = 0.8 }) => {
34974            const F = new ia();
34975            return new qi({ clickTolerance: C, move: (N, $) => ({ bearingDelta: ($.x - N.x) * I }), moveStateManager: F, enable: S, assignEvents: of });
34976          })({ clickTolerance: d, enable: !0 }), this.map = r, f && (this.mousePitch = Zh({ clickTolerance: y, enable: !0 }), this.touchPitch = (({ enable: S, clickTolerance: C, pitchDegreesPerPixelMoved: I = -0.5 }) => {
34977            const F = new ia();
34978            return new qi({ clickTolerance: C, move: (N, $) => ({ pitchDelta: ($.y - N.y) * I }), moveStateManager: F, enable: S, assignEvents: of });
34979          })({ clickTolerance: y, enable: !0 })), z.addEventListener(a, "mousedown", this.mousedown), z.addEventListener(a, "touchstart", this.touchstart, { passive: !1 }), z.addEventListener(a, "touchcancel", this.reset);
34980        }
34981        startMouse(r, a) {
34982          this.mouseRotate.dragStart(r, a), this.mousePitch && this.mousePitch.dragStart(r, a), z.disableDrag();
34983        }
34984        startTouch(r, a) {
34985          this.touchRotate.dragStart(r, a), this.touchPitch && this.touchPitch.dragStart(r, a), z.disableDrag();
34986        }
34987        moveMouse(r, a) {
34988          const f = this.map, { bearingDelta: d } = this.mouseRotate.dragMove(r, a) || {};
34989          if (d && f.setBearing(f.getBearing() + d), this.mousePitch) {
34990            const { pitchDelta: y } = this.mousePitch.dragMove(r, a) || {};
34991            y && f.setPitch(f.getPitch() + y);
34992          }
34993        }
34994        moveTouch(r, a) {
34995          const f = this.map, { bearingDelta: d } = this.touchRotate.dragMove(r, a) || {};
34996          if (d && f.setBearing(f.getBearing() + d), this.touchPitch) {
34997            const { pitchDelta: y } = this.touchPitch.dragMove(r, a) || {};
34998            y && f.setPitch(f.getPitch() + y);
34999          }
35000        }
35001        off() {
35002          const r = this.element;
35003          z.removeEventListener(r, "mousedown", this.mousedown), z.removeEventListener(r, "touchstart", this.touchstart, { passive: !1 }), z.removeEventListener(window, "touchmove", this.touchmove, { passive: !1 }), z.removeEventListener(window, "touchend", this.touchend), z.removeEventListener(r, "touchcancel", this.reset), this.offTemp();
35004        }
35005        offTemp() {
35006          z.enableDrag(), z.removeEventListener(window, "mousemove", this.mousemove), z.removeEventListener(window, "mouseup", this.mouseup), z.removeEventListener(window, "touchmove", this.touchmove, { passive: !1 }), z.removeEventListener(window, "touchend", this.touchend);
35007        }
35008      }
35009      let cs;
35010      function gn(_, r, a) {
35011        const f = new c.N(_.lng, _.lat);
35012        if (_ = new c.N(_.lng, _.lat), r) {
35013          const d = new c.N(_.lng - 360, _.lat), y = new c.N(_.lng + 360, _.lat), S = a.locationPoint(_).distSqr(r);
vendor: 36,605 bytes, lines 35014-35434
35014          a.locationPoint(d).distSqr(r) < S ? _ = d : a.locationPoint(y).distSqr(r) < S && (_ = y);
35015        }
35016        for (; Math.abs(_.lng - a.center.lng) > 180; ) {
35017          const d = a.locationPoint(_);
35018          if (d.x >= 0 && d.y >= 0 && d.x <= a.width && d.y <= a.height) break;
35019          _.lng > a.center.lng ? _.lng -= 360 : _.lng += 360;
35020        }
35021        return _.lng !== f.lng && a.locationPoint(_).y > a.height / 2 - a.getHorizon() ? _ : f;
35022      }
35023      const Il = { center: "translate(-50%,-50%)", top: "translate(-50%,0)", "top-left": "translate(0,0)", "top-right": "translate(-100%,0)", bottom: "translate(-50%,-100%)", "bottom-left": "translate(0,-100%)", "bottom-right": "translate(-100%,-100%)", left: "translate(0,-50%)", right: "translate(-100%,-50%)" };
35024      function Su(_, r, a) {
35025        const f = _.classList;
35026        for (const d in Il) f.remove(`maplibregl-${a}-anchor-${d}`);
35027        f.add(`maplibregl-${a}-anchor-${r}`);
35028      }
35029      class Tu extends c.E {
35030        constructor(r) {
35031          if (super(), this._onKeyPress = (a) => {
35032            const f = a.code, d = a.charCode || a.keyCode;
35033            f !== "Space" && f !== "Enter" && d !== 32 && d !== 13 || this.togglePopup();
35034          }, this._onMapClick = (a) => {
35035            const f = a.originalEvent.target, d = this._element;
35036            this._popup && (f === d || d.contains(f)) && this.togglePopup();
35037          }, this._update = (a) => {
35038            var f;
35039            if (!this._map) return;
35040            const d = this._map.loaded() && !this._map.isMoving();
35041            ((a == null ? void 0 : a.type) === "terrain" || (a == null ? void 0 : a.type) === "render" && !d) && this._map.once("render", this._update), this._lngLat = this._map.transform.renderWorldCopies ? gn(this._lngLat, this._flatPos, this._map.transform) : (f = this._lngLat) === null || f === void 0 ? void 0 : f.wrap(), this._flatPos = this._pos = this._map.project(this._lngLat)._add(this._offset), this._map.terrain && (this._flatPos = this._map.transform.locationPoint(this._lngLat)._add(this._offset));
35042            let y = "";
35043            this._rotationAlignment === "viewport" || this._rotationAlignment === "auto" ? y = `rotateZ(${this._rotation}deg)` : this._rotationAlignment === "map" && (y = `rotateZ(${this._rotation - this._map.getBearing()}deg)`);
35044            let S = "";
35045            this._pitchAlignment === "viewport" || this._pitchAlignment === "auto" ? S = "rotateX(0deg)" : this._pitchAlignment === "map" && (S = `rotateX(${this._map.getPitch()}deg)`), this._subpixelPositioning || a && a.type !== "moveend" || (this._pos = this._pos.round()), z.setTransform(this._element, `${Il[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${S} ${y}`), R.frameAsync(new AbortController()).then(() => {
35046              this._updateOpacity(a && a.type === "moveend");
35047            }).catch(() => {
35048            });
35049          }, this._onMove = (a) => {
35050            if (!this._isDragging) {
35051              const f = this._clickTolerance || this._map._clickTolerance;
35052              this._isDragging = a.point.dist(this._pointerdownPos) >= f;
35053            }
35054            this._isDragging && (this._pos = a.point.sub(this._positionDelta), this._lngLat = this._map.unproject(this._pos), this.setLngLat(this._lngLat), this._element.style.pointerEvents = "none", this._state === "pending" && (this._state = "active", this.fire(new c.k("dragstart"))), this.fire(new c.k("drag")));
35055          }, this._onUp = () => {
35056            this._element.style.pointerEvents = "auto", this._positionDelta = null, this._pointerdownPos = null, this._isDragging = !1, this._map.off("mousemove", this._onMove), this._map.off("touchmove", this._onMove), this._state === "active" && this.fire(new c.k("dragend")), this._state = "inactive";
35057          }, this._addDragHandler = (a) => {
35058            this._element.contains(a.originalEvent.target) && (a.preventDefault(), this._positionDelta = a.point.sub(this._pos).add(this._offset), this._pointerdownPos = a.point, this._state = "pending", this._map.on("mousemove", this._onMove), this._map.on("touchmove", this._onMove), this._map.once("mouseup", this._onUp), this._map.once("touchend", this._onUp));
35059          }, this._anchor = r && r.anchor || "center", this._color = r && r.color || "#3FB1CE", this._scale = r && r.scale || 1, this._draggable = r && r.draggable || !1, this._clickTolerance = r && r.clickTolerance || 0, this._subpixelPositioning = r && r.subpixelPositioning || !1, this._isDragging = !1, this._state = "inactive", this._rotation = r && r.rotation || 0, this._rotationAlignment = r && r.rotationAlignment || "auto", this._pitchAlignment = r && r.pitchAlignment && r.pitchAlignment !== "auto" ? r.pitchAlignment : this._rotationAlignment, this.setOpacity(), this.setOpacity(r == null ? void 0 : r.opacity, r == null ? void 0 : r.opacityWhenCovered), r && r.element) this._element = r.element, this._offset = c.P.convert(r && r.offset || [0, 0]);
35060          else {
35061            this._defaultMarker = !0, this._element = z.create("div");
35062            const a = z.createNS("http://www.w3.org/2000/svg", "svg"), f = 41, d = 27;
35063            a.setAttributeNS(null, "display", "block"), a.setAttributeNS(null, "height", `${f}px`), a.setAttributeNS(null, "width", `${d}px`), a.setAttributeNS(null, "viewBox", `0 0 ${d} ${f}`);
35064            const y = z.createNS("http://www.w3.org/2000/svg", "g");
35065            y.setAttributeNS(null, "stroke", "none"), y.setAttributeNS(null, "stroke-width", "1"), y.setAttributeNS(null, "fill", "none"), y.setAttributeNS(null, "fill-rule", "evenodd");
35066            const S = z.createNS("http://www.w3.org/2000/svg", "g");
35067            S.setAttributeNS(null, "fill-rule", "nonzero");
35068            const C = z.createNS("http://www.w3.org/2000/svg", "g");
35069            C.setAttributeNS(null, "transform", "translate(3.0, 29.0)"), C.setAttributeNS(null, "fill", "#000000");
35070            const I = [{ rx: "10.5", ry: "5.25002273" }, { rx: "10.5", ry: "5.25002273" }, { rx: "9.5", ry: "4.77275007" }, { rx: "8.5", ry: "4.29549936" }, { rx: "7.5", ry: "3.81822308" }, { rx: "6.5", ry: "3.34094679" }, { rx: "5.5", ry: "2.86367051" }, { rx: "4.5", ry: "2.38636864" }];
35071            for (const pe of I) {
35072              const _e = z.createNS("http://www.w3.org/2000/svg", "ellipse");
35073              _e.setAttributeNS(null, "opacity", "0.04"), _e.setAttributeNS(null, "cx", "10.5"), _e.setAttributeNS(null, "cy", "5.80029008"), _e.setAttributeNS(null, "rx", pe.rx), _e.setAttributeNS(null, "ry", pe.ry), C.appendChild(_e);
35074            }
35075            const F = z.createNS("http://www.w3.org/2000/svg", "g");
35076            F.setAttributeNS(null, "fill", this._color);
35077            const N = z.createNS("http://www.w3.org/2000/svg", "path");
35078            N.setAttributeNS(null, "d", "M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"), F.appendChild(N);
35079            const $ = z.createNS("http://www.w3.org/2000/svg", "g");
35080            $.setAttributeNS(null, "opacity", "0.25"), $.setAttributeNS(null, "fill", "#000000");
35081            const G = z.createNS("http://www.w3.org/2000/svg", "path");
35082            G.setAttributeNS(null, "d", "M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"), $.appendChild(G);
35083            const Q = z.createNS("http://www.w3.org/2000/svg", "g");
35084            Q.setAttributeNS(null, "transform", "translate(6.0, 7.0)"), Q.setAttributeNS(null, "fill", "#FFFFFF");
35085            const te = z.createNS("http://www.w3.org/2000/svg", "g");
35086            te.setAttributeNS(null, "transform", "translate(8.0, 8.0)");
35087            const ae = z.createNS("http://www.w3.org/2000/svg", "circle");
35088            ae.setAttributeNS(null, "fill", "#000000"), ae.setAttributeNS(null, "opacity", "0.25"), ae.setAttributeNS(null, "cx", "5.5"), ae.setAttributeNS(null, "cy", "5.5"), ae.setAttributeNS(null, "r", "5.4999962");
35089            const fe = z.createNS("http://www.w3.org/2000/svg", "circle");
35090            fe.setAttributeNS(null, "fill", "#FFFFFF"), fe.setAttributeNS(null, "cx", "5.5"), fe.setAttributeNS(null, "cy", "5.5"), fe.setAttributeNS(null, "r", "5.4999962"), te.appendChild(ae), te.appendChild(fe), S.appendChild(C), S.appendChild(F), S.appendChild($), S.appendChild(Q), S.appendChild(te), a.appendChild(S), a.setAttributeNS(null, "height", f * this._scale + "px"), a.setAttributeNS(null, "width", d * this._scale + "px"), this._element.appendChild(a), this._offset = c.P.convert(r && r.offset || [0, -14]);
35091          }
35092          if (this._element.classList.add("maplibregl-marker"), this._element.addEventListener("dragstart", (a) => {
35093            a.preventDefault();
35094          }), this._element.addEventListener("mousedown", (a) => {
35095            a.preventDefault();
35096          }), Su(this._element, this._anchor, "marker"), r && r.className) for (const a of r.className.split(" ")) this._element.classList.add(a);
35097          this._popup = null;
35098        }
35099        addTo(r) {
35100          return this.remove(), this._map = r, this._element.setAttribute("aria-label", r._getUIString("Marker.Title")), r.getCanvasContainer().appendChild(this._element), r.on("move", this._update), r.on("moveend", this._update), r.on("terrain", this._update), this.setDraggable(this._draggable), this._update(), this._map.on("click", this._onMapClick), this;
35101        }
35102        remove() {
35103          return this._opacityTimeout && (clearTimeout(this._opacityTimeout), delete this._opacityTimeout), this._map && (this._map.off("click", this._onMapClick), this._map.off("move", this._update), this._map.off("moveend", this._update), this._map.off("terrain", this._update), this._map.off("mousedown", this._addDragHandler), this._map.off("touchstart", this._addDragHandler), this._map.off("mouseup", this._onUp), this._map.off("touchend", this._onUp), this._map.off("mousemove", this._onMove), this._map.off("touchmove", this._onMove), delete this._map), z.remove(this._element), this._popup && this._popup.remove(), this;
35104        }
35105        getLngLat() {
35106          return this._lngLat;
35107        }
35108        setLngLat(r) {
35109          return this._lngLat = c.N.convert(r), this._pos = null, this._popup && this._popup.setLngLat(this._lngLat), this._update(), this;
35110        }
35111        getElement() {
35112          return this._element;
35113        }
35114        setPopup(r) {
35115          if (this._popup && (this._popup.remove(), this._popup = null, this._element.removeEventListener("keypress", this._onKeyPress), this._originalTabIndex || this._element.removeAttribute("tabindex")), r) {
35116            if (!("offset" in r.options)) {
35117              const d = Math.abs(13.5) / Math.SQRT2;
35118              r.options.offset = this._defaultMarker ? { top: [0, 0], "top-left": [0, 0], "top-right": [0, 0], bottom: [0, -38.1], "bottom-left": [d, -1 * (38.1 - 13.5 + d)], "bottom-right": [-d, -1 * (38.1 - 13.5 + d)], left: [13.5, -1 * (38.1 - 13.5)], right: [-13.5, -1 * (38.1 - 13.5)] } : this._offset;
35119            }
35120            this._popup = r, this._originalTabIndex = this._element.getAttribute("tabindex"), this._originalTabIndex || this._element.setAttribute("tabindex", "0"), this._element.addEventListener("keypress", this._onKeyPress);
35121          }
35122          return this;
35123        }
35124        setSubpixelPositioning(r) {
35125          return this._subpixelPositioning = r, this;
35126        }
35127        getPopup() {
35128          return this._popup;
35129        }
35130        togglePopup() {
35131          const r = this._popup;
35132          return this._element.style.opacity === this._opacityWhenCovered ? this : r ? (r.isOpen() ? r.remove() : (r.setLngLat(this._lngLat), r.addTo(this._map)), this) : this;
35133        }
35134        _updateOpacity(r = !1) {
35135          var a, f;
35136          if (!(!((a = this._map) === null || a === void 0) && a.terrain)) return void (this._element.style.opacity !== this._opacity && (this._element.style.opacity = this._opacity));
35137          if (r) this._opacityTimeout = null;
35138          else {
35139            if (this._opacityTimeout) return;
35140            this._opacityTimeout = setTimeout(() => {
35141              this._opacityTimeout = null;
35142            }, 100);
35143          }
35144          const d = this._map, y = d.terrain.depthAtPoint(this._pos), S = d.terrain.getElevationForLngLatZoom(this._lngLat, d.transform.tileZoom);
35145          if (d.transform.lngLatToCameraDepth(this._lngLat, S) - y < 6e-3) return void (this._element.style.opacity = this._opacity);
35146          const C = -this._offset.y / d.transform._pixelPerMeter, I = Math.sin(d.getPitch() * Math.PI / 180) * C, F = d.terrain.depthAtPoint(new c.P(this._pos.x, this._pos.y - this._offset.y)), N = d.transform.lngLatToCameraDepth(this._lngLat, S + I) - F > 6e-3;
35147          !((f = this._popup) === null || f === void 0) && f.isOpen() && N && this._popup.remove(), this._element.style.opacity = N ? this._opacityWhenCovered : this._opacity;
35148        }
35149        getOffset() {
35150          return this._offset;
35151        }
35152        setOffset(r) {
35153          return this._offset = c.P.convert(r), this._update(), this;
35154        }
35155        addClassName(r) {
35156          this._element.classList.add(r);
35157        }
35158        removeClassName(r) {
35159          this._element.classList.remove(r);
35160        }
35161        toggleClassName(r) {
35162          return this._element.classList.toggle(r);
35163        }
35164        setDraggable(r) {
35165          return this._draggable = !!r, this._map && (r ? (this._map.on("mousedown", this._addDragHandler), this._map.on("touchstart", this._addDragHandler)) : (this._map.off("mousedown", this._addDragHandler), this._map.off("touchstart", this._addDragHandler))), this;
35166        }
35167        isDraggable() {
35168          return this._draggable;
35169        }
35170        setRotation(r) {
35171          return this._rotation = r || 0, this._update(), this;
35172        }
35173        getRotation() {
35174          return this._rotation;
35175        }
35176        setRotationAlignment(r) {
35177          return this._rotationAlignment = r || "auto", this._update(), this;
35178        }
35179        getRotationAlignment() {
35180          return this._rotationAlignment;
35181        }
35182        setPitchAlignment(r) {
35183          return this._pitchAlignment = r && r !== "auto" ? r : this._rotationAlignment, this._update(), this;
35184        }
35185        getPitchAlignment() {
35186          return this._pitchAlignment;
35187        }
35188        setOpacity(r, a) {
35189          return r === void 0 && a === void 0 && (this._opacity = "1", this._opacityWhenCovered = "0.2"), r !== void 0 && (this._opacity = r), a !== void 0 && (this._opacityWhenCovered = a), this._map && this._updateOpacity(!0), this;
35190        }
35191      }
35192      const Wd = { positionOptions: { enableHighAccuracy: !1, maximumAge: 0, timeout: 6e3 }, fitBoundsOptions: { maxZoom: 15 }, trackUserLocation: !1, showAccuracyCircle: !0, showUserLocation: !0 };
35193      let Sc = 0, Tc = !1;
35194      const yo = { maxWidth: 100, unit: "metric" };
35195      function Ec(_, r, a) {
35196        const f = a && a.maxWidth || 100, d = _._container.clientHeight / 2, y = _.unproject([0, d]), S = _.unproject([f, d]), C = y.distanceTo(S);
35197        if (a && a.unit === "imperial") {
35198          const I = 3.2808 * C;
35199          I > 5280 ? Lt(r, f, I / 5280, _._getUIString("ScaleControl.Miles")) : Lt(r, f, I, _._getUIString("ScaleControl.Feet"));
35200        } else a && a.unit === "nautical" ? Lt(r, f, C / 1852, _._getUIString("ScaleControl.NauticalMiles")) : C >= 1e3 ? Lt(r, f, C / 1e3, _._getUIString("ScaleControl.Kilometers")) : Lt(r, f, C, _._getUIString("ScaleControl.Meters"));
35201      }
35202      function Lt(_, r, a, f) {
35203        const d = function(y) {
35204          const S = Math.pow(10, `${Math.floor(y)}`.length - 1);
35205          let C = y / S;
35206          return C = C >= 10 ? 10 : C >= 5 ? 5 : C >= 3 ? 3 : C >= 2 ? 2 : C >= 1 ? 1 : function(I) {
35207            const F = Math.pow(10, Math.ceil(-Math.log(I) / Math.LN10));
35208            return Math.round(I * F) / F;
35209          }(C), S * C;
35210        }(a);
35211        _.style.width = r * (d / a) + "px", _.innerHTML = `${d}&nbsp;${f}`;
35212      }
35213      const Xt = { closeButton: !0, closeOnClick: !0, focusAfterOpen: !0, className: "", maxWidth: "240px", subpixelPositioning: !1 }, Eu = ["a[href]", "[tabindex]:not([tabindex='-1'])", "[contenteditable]:not([contenteditable='false'])", "button:not([disabled])", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].join(", ");
35214      function Au(_) {
35215        if (_) {
35216          if (typeof _ == "number") {
35217            const r = Math.round(Math.abs(_) / Math.SQRT2);
35218            return { center: new c.P(0, 0), top: new c.P(0, _), "top-left": new c.P(r, r), "top-right": new c.P(-r, r), bottom: new c.P(0, -_), "bottom-left": new c.P(r, -r), "bottom-right": new c.P(-r, -r), left: new c.P(_, 0), right: new c.P(-_, 0) };
35219          }
35220          if (_ instanceof c.P || Array.isArray(_)) {
35221            const r = c.P.convert(_);
35222            return { center: r, top: r, "top-left": r, "top-right": r, bottom: r, "bottom-left": r, "bottom-right": r, left: r, right: r };
35223          }
35224          return { center: c.P.convert(_.center || [0, 0]), top: c.P.convert(_.top || [0, 0]), "top-left": c.P.convert(_["top-left"] || [0, 0]), "top-right": c.P.convert(_["top-right"] || [0, 0]), bottom: c.P.convert(_.bottom || [0, 0]), "bottom-left": c.P.convert(_["bottom-left"] || [0, 0]), "bottom-right": c.P.convert(_["bottom-right"] || [0, 0]), left: c.P.convert(_.left || [0, 0]), right: c.P.convert(_.right || [0, 0]) };
35225        }
35226        return Au(new c.P(0, 0));
35227      }
35228      const af = w;
35229      m.AJAXError = c.bh, m.Evented = c.E, m.LngLat = c.N, m.MercatorCoordinate = c.Z, m.Point = c.P, m.addProtocol = c.bi, m.config = c.a, m.removeProtocol = c.bj, m.AttributionControl = Al, m.BoxZoomHandler = qn, m.CanvasSource = Dt, m.CooperativeGesturesHandler = Tl, m.DoubleClickZoomHandler = Na, m.DragPanHandler = Ud, m.DragRotateHandler = qd, m.EdgeInsets = On, m.FullscreenControl = class extends c.E {
35230        constructor(_ = {}) {
35231          super(), this._onFullscreenChange = () => {
35232            var r;
35233            let a = window.document.fullscreenElement || window.document.mozFullScreenElement || window.document.webkitFullscreenElement || window.document.msFullscreenElement;
35234            for (; !((r = a == null ? void 0 : a.shadowRoot) === null || r === void 0) && r.fullscreenElement; ) a = a.shadowRoot.fullscreenElement;
35235            a === this._container !== this._fullscreen && this._handleFullscreenChange();
35236          }, this._onClickFullscreen = () => {
35237            this._isFullscreen() ? this._exitFullscreen() : this._requestFullscreen();
35238          }, this._fullscreen = !1, _ && _.container && (_.container instanceof HTMLElement ? this._container = _.container : c.w("Full screen control 'container' must be a DOM element.")), "onfullscreenchange" in document ? this._fullscreenchange = "fullscreenchange" : "onmozfullscreenchange" in document ? this._fullscreenchange = "mozfullscreenchange" : "onwebkitfullscreenchange" in document ? this._fullscreenchange = "webkitfullscreenchange" : "onmsfullscreenchange" in document && (this._fullscreenchange = "MSFullscreenChange");
35239        }
35240        onAdd(_) {
35241          return this._map = _, this._container || (this._container = this._map.getContainer()), this._controlContainer = z.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), this._controlContainer;
35242        }
35243        onRemove() {
35244          z.remove(this._controlContainer), this._map = null, window.document.removeEventListener(this._fullscreenchange, this._onFullscreenChange);
35245        }
35246        _setupUI() {
35247          const _ = this._fullscreenButton = z.create("button", "maplibregl-ctrl-fullscreen", this._controlContainer);
35248          z.create("span", "maplibregl-ctrl-icon", _).setAttribute("aria-hidden", "true"), _.type = "button", this._updateTitle(), this._fullscreenButton.addEventListener("click", this._onClickFullscreen), window.document.addEventListener(this._fullscreenchange, this._onFullscreenChange);
35249        }
35250        _updateTitle() {
35251          const _ = this._getTitle();
35252          this._fullscreenButton.setAttribute("aria-label", _), this._fullscreenButton.title = _;
35253        }
35254        _getTitle() {
35255          return this._map._getUIString(this._isFullscreen() ? "FullscreenControl.Exit" : "FullscreenControl.Enter");
35256        }
35257        _isFullscreen() {
35258          return this._fullscreen;
35259        }
35260        _handleFullscreenChange() {
35261          this._fullscreen = !this._fullscreen, this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"), this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"), this._updateTitle(), this._fullscreen ? (this.fire(new c.k("fullscreenstart")), this._prevCooperativeGesturesEnabled = this._map.cooperativeGestures.isEnabled(), this._map.cooperativeGestures.disable()) : (this.fire(new c.k("fullscreenend")), this._prevCooperativeGesturesEnabled && this._map.cooperativeGestures.enable());
35262        }
35263        _exitFullscreen() {
35264          window.document.exitFullscreen ? window.document.exitFullscreen() : window.document.mozCancelFullScreen ? window.document.mozCancelFullScreen() : window.document.msExitFullscreen ? window.document.msExitFullscreen() : window.document.webkitCancelFullScreen ? window.document.webkitCancelFullScreen() : this._togglePseudoFullScreen();
35265        }
35266        _requestFullscreen() {
35267          this._container.requestFullscreen ? this._container.requestFullscreen() : this._container.mozRequestFullScreen ? this._container.mozRequestFullScreen() : this._container.msRequestFullscreen ? this._container.msRequestFullscreen() : this._container.webkitRequestFullscreen ? this._container.webkitRequestFullscreen() : this._togglePseudoFullScreen();
35268        }
35269        _togglePseudoFullScreen() {
35270          this._container.classList.toggle("maplibregl-pseudo-fullscreen"), this._handleFullscreenChange(), this._map.resize();
35271        }
35272      }, m.GeoJSONSource = dt, m.GeolocateControl = class extends c.E {
35273        constructor(_) {
35274          super(), this._onSuccess = (r) => {
35275            if (this._map) {
35276              if (this._isOutOfMapMaxBounds(r)) return this._setErrorState(), this.fire(new c.k("outofmaxbounds", r)), this._updateMarker(), void this._finish();
35277              if (this.options.trackUserLocation) switch (this._lastKnownPosition = r, this._watchState) {
35278                case "WAITING_ACTIVE":
35279                case "ACTIVE_LOCK":
35280                case "ACTIVE_ERROR":
35281                  this._watchState = "ACTIVE_LOCK", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"), this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");
35282                  break;
35283                case "BACKGROUND":
35284                case "BACKGROUND_ERROR":
35285                  this._watchState = "BACKGROUND", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"), this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");
35286                  break;
35287                default:
35288                  throw new Error(`Unexpected watchState ${this._watchState}`);
35289              }
35290              this.options.showUserLocation && this._watchState !== "OFF" && this._updateMarker(r), this.options.trackUserLocation && this._watchState !== "ACTIVE_LOCK" || this._updateCamera(r), this.options.showUserLocation && this._dotElement.classList.remove("maplibregl-user-location-dot-stale"), this.fire(new c.k("geolocate", r)), this._finish();
35291            }
35292          }, this._updateCamera = (r) => {
35293            const a = new c.N(r.coords.longitude, r.coords.latitude), f = r.coords.accuracy, d = this._map.getBearing(), y = c.e({ bearing: d }, this.options.fitBoundsOptions), S = re.fromLngLat(a, f);
35294            this._map.fitBounds(S, y, { geolocateSource: !0 });
35295          }, this._updateMarker = (r) => {
35296            if (r) {
35297              const a = new c.N(r.coords.longitude, r.coords.latitude);
35298              this._accuracyCircleMarker.setLngLat(a).addTo(this._map), this._userLocationDotMarker.setLngLat(a).addTo(this._map), this._accuracy = r.coords.accuracy, this.options.showUserLocation && this.options.showAccuracyCircle && this._updateCircleRadius();
35299            } else this._userLocationDotMarker.remove(), this._accuracyCircleMarker.remove();
35300          }, this._onZoom = () => {
35301            this.options.showUserLocation && this.options.showAccuracyCircle && this._updateCircleRadius();
35302          }, this._onError = (r) => {
35303            if (this._map) {
35304              if (this.options.trackUserLocation) if (r.code === 1) {
35305                this._watchState = "OFF", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"), this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"), this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"), this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"), this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"), this._geolocateButton.disabled = !0;
35306                const a = this._map._getUIString("GeolocateControl.LocationNotAvailable");
35307                this._geolocateButton.title = a, this._geolocateButton.setAttribute("aria-label", a), this._geolocationWatchID !== void 0 && this._clearWatch();
35308              } else {
35309                if (r.code === 3 && Tc) return;
35310                this._setErrorState();
35311              }
35312              this._watchState !== "OFF" && this.options.showUserLocation && this._dotElement.classList.add("maplibregl-user-location-dot-stale"), this.fire(new c.k("error", r)), this._finish();
35313            }
35314          }, this._finish = () => {
35315            this._timeoutId && clearTimeout(this._timeoutId), this._timeoutId = void 0;
35316          }, this._setupUI = () => {
35317            this._map && (this._container.addEventListener("contextmenu", (r) => r.preventDefault()), this._geolocateButton = z.create("button", "maplibregl-ctrl-geolocate", this._container), z.create("span", "maplibregl-ctrl-icon", this._geolocateButton).setAttribute("aria-hidden", "true"), this._geolocateButton.type = "button", this._geolocateButton.disabled = !0);
35318          }, this._finishSetupUI = (r) => {
35319            if (this._map) {
35320              if (r === !1) {
35321                c.w("Geolocation support is not available so the GeolocateControl will be disabled.");
35322                const a = this._map._getUIString("GeolocateControl.LocationNotAvailable");
35323                this._geolocateButton.disabled = !0, this._geolocateButton.title = a, this._geolocateButton.setAttribute("aria-label", a);
35324              } else {
35325                const a = this._map._getUIString("GeolocateControl.FindMyLocation");
35326                this._geolocateButton.disabled = !1, this._geolocateButton.title = a, this._geolocateButton.setAttribute("aria-label", a);
35327              }
35328              this.options.trackUserLocation && (this._geolocateButton.setAttribute("aria-pressed", "false"), this._watchState = "OFF"), this.options.showUserLocation && (this._dotElement = z.create("div", "maplibregl-user-location-dot"), this._userLocationDotMarker = new Tu({ element: this._dotElement }), this._circleElement = z.create("div", "maplibregl-user-location-accuracy-circle"), this._accuracyCircleMarker = new Tu({ element: this._circleElement, pitchAlignment: "map" }), this.options.trackUserLocation && (this._watchState = "OFF"), this._map.on("zoom", this._onZoom)), this._geolocateButton.addEventListener("click", () => this.trigger()), this._setup = !0, this.options.trackUserLocation && this._map.on("movestart", (a) => {
35329                a.geolocateSource || this._watchState !== "ACTIVE_LOCK" || a.originalEvent && a.originalEvent.type === "resize" || (this._watchState = "BACKGROUND", this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"), this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"), this.fire(new c.k("trackuserlocationend")), this.fire(new c.k("userlocationlostfocus")));
35330              });
35331            }
35332          }, this.options = c.e({}, Wd, _);
35333        }
35334        onAdd(_) {
35335          return this._map = _, this._container = z.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._setupUI(), function() {
35336            return c._(this, arguments, void 0, function* (r = !1) {
35337              if (cs !== void 0 && !r) return cs;
35338              if (window.navigator.permissions === void 0) return cs = !!window.navigator.geolocation, cs;
35339              try {
35340                cs = (yield window.navigator.permissions.query({ name: "geolocation" })).state !== "denied";
35341              } catch {
35342                cs = !!window.navigator.geolocation;
35343              }
35344              return cs;
35345            });
35346          }().then((r) => this._finishSetupUI(r)), this._container;
35347        }
35348        onRemove() {
35349          this._geolocationWatchID !== void 0 && (window.navigator.geolocation.clearWatch(this._geolocationWatchID), this._geolocationWatchID = void 0), this.options.showUserLocation && this._userLocationDotMarker && this._userLocationDotMarker.remove(), this.options.showAccuracyCircle && this._accuracyCircleMarker && this._accuracyCircleMarker.remove(), z.remove(this._container), this._map.off("zoom", this._onZoom), this._map = void 0, Sc = 0, Tc = !1;
35350        }
35351        _isOutOfMapMaxBounds(_) {
35352          const r = this._map.getMaxBounds(), a = _.coords;
35353          return r && (a.longitude < r.getWest() || a.longitude > r.getEast() || a.latitude < r.getSouth() || a.latitude > r.getNorth());
35354        }
35355        _setErrorState() {
35356          switch (this._watchState) {
35357            case "WAITING_ACTIVE":
35358              this._watchState = "ACTIVE_ERROR", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");
35359              break;
35360            case "ACTIVE_LOCK":
35361              this._watchState = "ACTIVE_ERROR", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");
35362              break;
35363            case "BACKGROUND":
35364              this._watchState = "BACKGROUND_ERROR", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");
35365              break;
35366            case "ACTIVE_ERROR":
35367              break;
35368            default:
35369              throw new Error(`Unexpected watchState ${this._watchState}`);
35370          }
35371        }
35372        _updateCircleRadius() {
35373          const _ = this._map.getBounds(), r = _.getSouthEast(), a = _.getNorthEast(), f = r.distanceTo(a), d = Math.ceil(this._accuracy / (f / this._map._container.clientHeight) * 2);
35374          this._circleElement.style.width = `${d}px`, this._circleElement.style.height = `${d}px`;
35375        }
35376        trigger() {
35377          if (!this._setup) return c.w("Geolocate control triggered before added to a map"), !1;
35378          if (this.options.trackUserLocation) {
35379            switch (this._watchState) {
35380              case "OFF":
35381                this._watchState = "WAITING_ACTIVE", this.fire(new c.k("trackuserlocationstart"));
35382                break;
35383              case "WAITING_ACTIVE":
35384              case "ACTIVE_LOCK":
35385              case "ACTIVE_ERROR":
35386              case "BACKGROUND_ERROR":
35387                Sc--, Tc = !1, this._watchState = "OFF", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"), this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"), this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"), this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"), this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"), this.fire(new c.k("trackuserlocationend"));
35388                break;
35389              case "BACKGROUND":
35390                this._watchState = "ACTIVE_LOCK", this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"), this._lastKnownPosition && this._updateCamera(this._lastKnownPosition), this.fire(new c.k("trackuserlocationstart")), this.fire(new c.k("userlocationfocus"));
35391                break;
35392              default:
35393                throw new Error(`Unexpected watchState ${this._watchState}`);
35394            }
35395            switch (this._watchState) {
35396              case "WAITING_ACTIVE":
35397                this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"), this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");
35398                break;
35399              case "ACTIVE_LOCK":
35400                this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");
35401                break;
35402              case "OFF":
35403                break;
35404              default:
35405                throw new Error(`Unexpected watchState ${this._watchState}`);
35406            }
35407            if (this._watchState === "OFF" && this._geolocationWatchID !== void 0) this._clearWatch();
35408            else if (this._geolocationWatchID === void 0) {
35409              let _;
35410              this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"), this._geolocateButton.setAttribute("aria-pressed", "true"), Sc++, Sc > 1 ? (_ = { maximumAge: 6e5, timeout: 0 }, Tc = !0) : (_ = this.options.positionOptions, Tc = !1), this._geolocationWatchID = window.navigator.geolocation.watchPosition(this._onSuccess, this._onError, _);
35411            }
35412          } else window.navigator.geolocation.getCurrentPosition(this._onSuccess, this._onError, this.options.positionOptions), this._timeoutId = setTimeout(this._finish, 1e4);
35413          return !0;
35414        }
35415        _clearWatch() {
35416          window.navigator.geolocation.clearWatch(this._geolocationWatchID), this._geolocationWatchID = void 0, this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"), this._geolocateButton.setAttribute("aria-pressed", "false"), this.options.showUserLocation && this._updateMarker(null);
35417        }
35418      }, m.Hash = js, m.ImageSource = Tt, m.KeyboardHandler = bs, m.LngLatBounds = re, m.LogoControl = tf, m.Map = class extends Hd {
35419        constructor(_) {
35420          c.bf.mark(c.bg.create);
35421          const r = Object.assign(Object.assign({}, ey), _);
35422          if (r.minZoom != null && r.maxZoom != null && r.minZoom > r.maxZoom) throw new Error("maxZoom must be greater than or equal to minZoom");
35423          if (r.minPitch != null && r.maxPitch != null && r.minPitch > r.maxPitch) throw new Error("maxPitch must be greater than or equal to minPitch");
35424          if (r.minPitch != null && r.minPitch < 0) throw new Error("minPitch must be greater than or equal to 0");
35425          if (r.maxPitch != null && r.maxPitch > 85) throw new Error("maxPitch must be less than or equal to 85");
35426          if (super(new as(r.minZoom, r.maxZoom, r.minPitch, r.maxPitch, r.renderWorldCopies), { bearingSnap: r.bearingSnap }), this._idleTriggered = !1, this._crossFadingFactor = 1, this._renderTaskQueue = new Sr(), this._controls = [], this._mapId = c.a4(), this._contextLost = (a) => {
35427            a.preventDefault(), this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this.fire(new c.k("webglcontextlost", { originalEvent: a }));
35428          }, this._contextRestored = (a) => {
35429            this._setupPainter(), this.resize(), this._update(), this.fire(new c.k("webglcontextrestored", { originalEvent: a }));
35430          }, this._onMapScroll = (a) => {
35431            if (a.target === this._container) return this._container.scrollTop = 0, this._container.scrollLeft = 0, !1;
35432          }, this._onWindowOnline = () => {
35433            this._update();
35434          }
35434, this._interactive = r.interactive, this._maxTileCacheSize = r.maxTileCacheSize, this._maxTileCacheZoomLevels = r.maxTileCacheZoomLevels, this._failIfMajorPerformanceCaveat = r.failIfMajorPerformanceCaveat === !0, this._preserveDrawingBuffer = r.preserveDrawingBuffer === !0, this._antialias = r.antialias === !0, this._trackResize = r.trackResize === !0, this._bearingSnap = r.bearingSnap, this._refreshExpiredTiles = r.refreshExpiredTiles === !0, this._fadeDuration = r.fadeDuration, this._crossSourceCollisions = r.crossSourceCollisions === !0, this._collectResourceTiming = r.collectResourceTiming === !0, this._locale = Object.assign(Object.assign({}, sf), r.locale), this._clickTolerance = r.clickTolerance, this._overridePixelRatio = r.pixelRatio, this._maxCanvasSize = r.maxCanvasSize, this.transformCameraUpdate = r.transformCameraUpdate, this.cancelPendingTileRequestsWhileZooming = r.cancelPendingTileRequestsWhileZooming === !0, this._imageQueueHandle = X.addThrottleControl(() => this.isMoving()), this._requestManager = new ye(r.transformRequest), typeof r.container == "string") {
35435            if (this._container = document.getElementById(r.container), !this._container) throw new Error(`Container '${r.container}' not found.`);
35436          } else {
35437            if (!(r.container instanceof HTMLElement)) throw new Error("Invalid type: 'container' must be a String or HTMLElement.");
35438            this._container = r.container;
35439          }
35440          if (r.maxBounds && this.setMaxBounds(r.maxBounds), this._setupContainer(), this._setupPainter(), this.on("move", () => this._update(!1)).on("moveend", () => this._update(!1)).on("zoom", () => this._update(!0)).on("terrain", () => {
35441            this.painter.terrainFacilitator.dirty = !0, this._update(!0);
35442          }).once("idle", () => {
35443            this._idleTriggered = !0;
35444          }), typeof window < "u") {
35445            addEventListener("online", this._onWindowOnline, !1);
35446            let a = !1;
35447            const f = ho((d) => {
35448              this._trackResize && !this._removed && (this.resize(d), this.redraw());
35449            }, 50);
35450            this._resizeObserver = new ResizeObserver((d) => {
35451              a ? f(d) : a = !0;
35452            }), this._resizeObserver.observe(this._container);
35453          }
35454          this.handlers = new ef(this, r), this._hash = r.hash && new js(typeof r.hash == "string" && r.hash || void 0).addTo(this), this._hash && this._hash._onHashChange() || (this.jumpTo({ center: r.center, zoom: r.zoom, bearing: r.bearing, pitch: r.pitch }), r.bounds && (this.resize(), this.fitBounds(r.bounds, c.e({}, r.fitBoundsOptions, { duration: 0 })))), this.resize(), this._localIdeographFontFamily = r.localIdeographFontFamily, this._validateStyle = r.validateStyle, r.style && this.setStyle(r.style, { localIdeographFontFamily: r.localIdeographFontFamily }), r.attributionControl && this.addControl(new Al(typeof r.attributionControl == "boolean" ? void 0 : r.attributionControl)), r.maplibreLogo && this.addControl(new tf(), r.logoPosition), this.on("style.load", () => {
35455            this.transform.unmodified && this.jumpTo(this.style.stylesheet);
35456          }), this.on("data", (a) => {
35457            this._update(a.dataType === "style"), this.fire(new c.k(`${a.dataType}data`, a));
35458          }), this.on("dataloading", (a) => {
35459            this.fire(new c.k(`${a.dataType}dataloading`, a));
35460          }), this.on("dataabort", (a) => {
35461            this.fire(new c.k("sourcedataabort", a));
35462          });
35463        }
35464        _getMapId() {
35465          return this._mapId;
35466        }
35467        addControl(_, r) {
35468          if (r === void 0 && (r = _.getDefaultPosition ? _.getDefaultPosition() : "top-right"), !_ || !_.onAdd) return this.fire(new c.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));
35469          const a = _.onAdd(this);
35470          this._controls.push(_);
35471          const f = this._controlPositions[r];
35472          return r.indexOf("bottom") !== -1 ? f.insertBefore(a, f.firstChild) : f.appendChild(a), this;
35473        }
35474        removeControl(_) {
35475          if (!_ || !_.onRemove) return this.fire(new c.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));
35476          const r = this._controls.indexOf(_);
35477          return r > -1 && this._controls.splice(r, 1), _.onRemove(this), this;
35478        }
35479        hasControl(_) {
35480          return this._controls.indexOf(_) > -1;
35481        }
35482        calculateCameraOptionsFromTo(_, r, a, f) {
35483          return f == null && this.terrain && (f = this.terrain.getElevationForLngLatZoom(a, this.transform.tileZoom)), super.calculateCameraOptionsFromTo(_, r, a, f);
35484        }
35485        resize(_) {
35486          var r;
35487          const a = this._containerDimensions(), f = a[0], d = a[1], y = this._getClampedPixelRatio(f, d);
35488          if (this._resizeCanvas(f, d, y), this.painter.resize(f, d, y), this.painter.overLimit()) {
35489            const C = this.painter.context.gl;
35490            this._maxCanvasSize = [C.drawingBufferWidth, C.drawingBufferHeight];
35491            const I = this._getClampedPixelRatio(f, d);
35492            this._resizeCanvas(f, d, I), this.painter.resize(f, d, I);
35493          }
35494          this.transform.resize(f, d), (r = this._requestedCameraState) === null || r === void 0 || r.resize(f, d);
35495          const S = !this._moving;
35496          return S && (this.stop(), this.fire(new c.k("movestart", _)).fire(new c.k("move", _))), this.fire(new c.k("resize", _)), S && this.fire(new c.k("moveend", _)), this;
35497        }
35498        _getClampedPixelRatio(_, r) {
35499          const { 0: a, 1: f } = this._maxCanvasSize, d = this.getPixelRatio(), y = _ * d, S = r * d;
35500          return Math.min(y > a ? a / y : 1, S > f ? f / S : 1) * d;
35501        }
35502        getPixelRatio() {
35503          var _;
35504          return (_ = this._overridePixelRatio) !== null && _ !== void 0 ? _ : devicePixelRatio;
35505        }
35506        setPixelRatio(_) {
35507          this._overridePixelRatio = _, this.resize();
35508        }
35509        getBounds() {
35510          return this.transform.getBounds();
35511        }
35512        getMaxBounds() {
35513          return this.transform.getMaxBounds();
35514        }
vendor: 34,085 bytes, lines 35515-36066
35515        setMaxBounds(_) {
35516          return this.transform.setMaxBounds(re.convert(_)), this._update();
35517        }
35518        setMinZoom(_) {
35519          if ((_ = _ ?? -2) >= -2 && _ <= this.transform.maxZoom) return this.transform.minZoom = _, this._update(), this.getZoom() < _ && this.setZoom(_), this;
35520          throw new Error("minZoom must be between -2 and the current maxZoom, inclusive");
35521        }
35522        getMinZoom() {
35523          return this.transform.minZoom;
35524        }
35525        setMaxZoom(_) {
35526          if ((_ = _ ?? 22) >= this.transform.minZoom) return this.transform.maxZoom = _, this._update(), this.getZoom() > _ && this.setZoom(_), this;
35527          throw new Error("maxZoom must be greater than the current minZoom");
35528        }
35529        getMaxZoom() {
35530          return this.transform.maxZoom;
35531        }
35532        setMinPitch(_) {
35533          if ((_ = _ ?? 0) < 0) throw new Error("minPitch must be greater than or equal to 0");
35534          if (_ >= 0 && _ <= this.transform.maxPitch) return this.transform.minPitch = _, this._update(), this.getPitch() < _ && this.setPitch(_), this;
35535          throw new Error("minPitch must be between 0 and the current maxPitch, inclusive");
35536        }
35537        getMinPitch() {
35538          return this.transform.minPitch;
35539        }
35540        setMaxPitch(_) {
35541          if ((_ = _ ?? 60) > 85) throw new Error("maxPitch must be less than or equal to 85");
35542          if (_ >= this.transform.minPitch) return this.transform.maxPitch = _, this._update(), this.getPitch() > _ && this.setPitch(_), this;
35543          throw new Error("maxPitch must be greater than the current minPitch");
35544        }
35545        getMaxPitch() {
35546          return this.transform.maxPitch;
35547        }
35548        getRenderWorldCopies() {
35549          return this.transform.renderWorldCopies;
35550        }
35551        setRenderWorldCopies(_) {
35552          return this.transform.renderWorldCopies = _, this._update();
35553        }
35554        project(_) {
35555          return this.transform.locationPoint(c.N.convert(_), this.style && this.terrain);
35556        }
35557        unproject(_) {
35558          return this.transform.pointLocation(c.P.convert(_), this.terrain);
35559        }
35560        isMoving() {
35561          var _;
35562          return this._moving || ((_ = this.handlers) === null || _ === void 0 ? void 0 : _.isMoving());
35563        }
35564        isZooming() {
35565          var _;
35566          return this._zooming || ((_ = this.handlers) === null || _ === void 0 ? void 0 : _.isZooming());
35567        }
35568        isRotating() {
35569          var _;
35570          return this._rotating || ((_ = this.handlers) === null || _ === void 0 ? void 0 : _.isRotating());
35571        }
35572        _createDelegatedListener(_, r, a) {
35573          if (_ === "mouseenter" || _ === "mouseover") {
35574            let f = !1;
35575            return { layers: r, listener: a, delegates: { mousemove: (y) => {
35576              const S = r.filter((I) => this.getLayer(I)), C = S.length !== 0 ? this.queryRenderedFeatures(y.point, { layers: S }) : [];
35577              C.length ? f || (f = !0, a.call(this, new Vn(_, this, y.originalEvent, { features: C }))) : f = !1;
35578            }, mouseout: () => {
35579              f = !1;
35580            } } };
35581          }
35582          if (_ === "mouseleave" || _ === "mouseout") {
35583            let f = !1;
35584            return { layers: r, listener: a, delegates: { mousemove: (S) => {
35585              const C = r.filter((I) => this.getLayer(I));
35586              (C.length !== 0 ? this.queryRenderedFeatures(S.point, { layers: C }) : []).length ? f = !0 : f && (f = !1, a.call(this, new Vn(_, this, S.originalEvent)));
35587            }, mouseout: (S) => {
35588              f && (f = !1, a.call(this, new Vn(_, this, S.originalEvent)));
35589            } } };
35590          }
35591          {
35592            const f = (d) => {
35593              const y = r.filter((C) => this.getLayer(C)), S = y.length !== 0 ? this.queryRenderedFeatures(d.point, { layers: y }) : [];
35594              S.length && (d.features = S, a.call(this, d), delete d.features);
35595            };
35596            return { layers: r, listener: a, delegates: { [_]: f } };
35597          }
35598        }
35599        _saveDelegatedListener(_, r) {
35600          this._delegatedListeners = this._delegatedListeners || {}, this._delegatedListeners[_] = this._delegatedListeners[_] || [], this._delegatedListeners[_].push(r);
35601        }
35602        _removeDelegatedListener(_, r, a) {
35603          if (!this._delegatedListeners || !this._delegatedListeners[_]) return;
35604          const f = this._delegatedListeners[_];
35605          for (let d = 0; d < f.length; d++) {
35606            const y = f[d];
35607            if (y.listener === a && y.layers.length === r.length && y.layers.every((S) => r.includes(S))) {
35608              for (const S in y.delegates) this.off(S, y.delegates[S]);
35609              return void f.splice(d, 1);
35610            }
35611          }
35612        }
35613        on(_, r, a) {
35614          if (a === void 0) return super.on(_, r);
35615          const f = this._createDelegatedListener(_, typeof r == "string" ? [r] : r, a);
35616          this._saveDelegatedListener(_, f);
35617          for (const d in f.delegates) this.on(d, f.delegates[d]);
35618          return this;
35619        }
35620        once(_, r, a) {
35621          if (a === void 0) return super.once(_, r);
35622          const f = typeof r == "string" ? [r] : r, d = this._createDelegatedListener(_, f, a);
35623          for (const y in d.delegates) {
35624            const S = d.delegates[y];
35625            d.delegates[y] = (...C) => {
35626              this._removeDelegatedListener(_, f, a), S(...C);
35627            };
35628          }
35629          this._saveDelegatedListener(_, d);
35630          for (const y in d.delegates) this.once(y, d.delegates[y]);
35631          return this;
35632        }
35633        off(_, r, a) {
35634          return a === void 0 ? super.off(_, r) : (this._removeDelegatedListener(_, typeof r == "string" ? [r] : r, a), this);
35635        }
35636        queryRenderedFeatures(_, r) {
35637          if (!this.style) return [];
35638          let a;
35639          const f = _ instanceof c.P || Array.isArray(_), d = f ? _ : [[0, 0], [this.transform.width, this.transform.height]];
35640          if (r = r || (f ? {} : _) || {}, d instanceof c.P || typeof d[0] == "number") a = [c.P.convert(d)];
35641          else {
35642            const y = c.P.convert(d[0]), S = c.P.convert(d[1]);
35643            a = [y, new c.P(S.x, y.y), S, new c.P(y.x, S.y), y];
35644          }
35645          return this.style.queryRenderedFeatures(a, r, this.transform);
35646        }
35647        querySourceFeatures(_, r) {
35648          return this.style.querySourceFeatures(_, r);
35649        }
35650        setStyle(_, r) {
35651          return (r = c.e({}, { localIdeographFontFamily: this._localIdeographFontFamily, validate: this._validateStyle }, r)).diff !== !1 && r.localIdeographFontFamily === this._localIdeographFontFamily && this.style && _ ? (this._diffStyle(_, r), this) : (this._localIdeographFontFamily = r.localIdeographFontFamily, this._updateStyle(_, r));
35652        }
35653        setTransformRequest(_) {
35654          return this._requestManager.setTransformRequest(_), this;
35655        }
35656        _getUIString(_) {
35657          const r = this._locale[_];
35658          if (r == null) throw new Error(`Missing UI string '${_}'`);
35659          return r;
35660        }
35661        _updateStyle(_, r) {
35662          if (r.transformStyle && this.style && !this.style._loaded) return void this.style.once("style.load", () => this._updateStyle(_, r));
35663          const a = this.style && r.transformStyle ? this.style.serialize() : void 0;
35664          return this.style && (this.style.setEventedParent(null), this.style._remove(!_)), _ ? (this.style = new ll(this, r || {}), this.style.setEventedParent(this, { style: this.style }), typeof _ == "string" ? this.style.loadURL(_, r, a) : this.style.loadJSON(_, r, a), this) : (delete this.style, this);
35665        }
35666        _lazyInitEmptyStyle() {
35667          this.style || (this.style = new ll(this, {}), this.style.setEventedParent(this, { style: this.style }), this.style.loadEmpty());
35668        }
35669        _diffStyle(_, r) {
35670          if (typeof _ == "string") {
35671            const a = this._requestManager.transformRequest(_, "Style");
35672            c.h(a, new AbortController()).then((f) => {
35673              this._updateDiff(f.data, r);
35674            }).catch((f) => {
35675              f && this.fire(new c.j(f));
35676            });
35677          } else typeof _ == "object" && this._updateDiff(_, r);
35678        }
35679        _updateDiff(_, r) {
35680          try {
35681            this.style.setState(_, r) && this._update(!0);
35682          } catch (a) {
35683            c.w(`Unable to perform style diff: ${a.message || a.error || a}.  Rebuilding the style from scratch.`), this._updateStyle(_, r);
35684          }
35685        }
35686        getStyle() {
35687          if (this.style) return this.style.serialize();
35688        }
35689        isStyleLoaded() {
35690          return this.style ? this.style.loaded() : c.w("There is no style added to the map.");
35691        }
35692        addSource(_, r) {
35693          return this._lazyInitEmptyStyle(), this.style.addSource(_, r), this._update(!0);
35694        }
35695        isSourceLoaded(_) {
35696          const r = this.style && this.style.sourceCaches[_];
35697          if (r !== void 0) return r.loaded();
35698          this.fire(new c.j(new Error(`There is no source with ID '${_}'`)));
35699        }
35700        setTerrain(_) {
35701          if (this.style._checkLoaded(), this._terrainDataCallback && this.style.off("data", this._terrainDataCallback), _) {
35702            const r = this.style.sourceCaches[_.source];
35703            if (!r) throw new Error(`cannot load terrain, because there exists no source with ID: ${_.source}`);
35704            this.terrain === null && r.reload();
35705            for (const a in this.style._layers) {
35706              const f = this.style._layers[a];
35707              f.type === "hillshade" && f.source === _.source && c.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.");
35708            }
35709            this.terrain = new nf(this.painter, r, _), this.painter.renderToTexture = new Gd(this.painter, this.terrain), this.transform.minElevationForCurrentTile = this.terrain.getMinTileElevationForLngLatZoom(this.transform.center, this.transform.tileZoom), this.transform.elevation = this.terrain.getElevationForLngLatZoom(this.transform.center, this.transform.tileZoom), this._terrainDataCallback = (a) => {
35710              a.dataType === "style" ? this.terrain.sourceCache.freeRtt() : a.dataType === "source" && a.tile && (a.sourceId !== _.source || this._elevationFreeze || (this.transform.minElevationForCurrentTile = this.terrain.getMinTileElevationForLngLatZoom(this.transform.center, this.transform.tileZoom), this.transform.elevation = this.terrain.getElevationForLngLatZoom(this.transform.center, this.transform.tileZoom)), this.terrain.sourceCache.freeRtt(a.tile.tileID));
35711            }, this.style.on("data", this._terrainDataCallback);
35712          } else this.terrain && this.terrain.sourceCache.destruct(), this.terrain = null, this.painter.renderToTexture && this.painter.renderToTexture.destruct(), this.painter.renderToTexture = null, this.transform.minElevationForCurrentTile = 0, this.transform.elevation = 0;
35713          return this.fire(new c.k("terrain", { terrain: _ })), this;
35714        }
35715        getTerrain() {
35716          var _, r;
35717          return (r = (_ = this.terrain) === null || _ === void 0 ? void 0 : _.options) !== null && r !== void 0 ? r : null;
35718        }
35719        areTilesLoaded() {
35720          const _ = this.style && this.style.sourceCaches;
35721          for (const r in _) {
35722            const a = _[r]._tiles;
35723            for (const f in a) {
35724              const d = a[f];
35725              if (d.state !== "loaded" && d.state !== "errored") return !1;
35726            }
35727          }
35728          return !0;
35729        }
35730        removeSource(_) {
35731          return this.style.removeSource(_), this._update(!0);
35732        }
35733        getSource(_) {
35734          return this.style.getSource(_);
35735        }
35736        addImage(_, r, a = {}) {
35737          const { pixelRatio: f = 1, sdf: d = !1, stretchX: y, stretchY: S, content: C, textFitWidth: I, textFitHeight: F } = a;
35738          if (this._lazyInitEmptyStyle(), !(r instanceof HTMLImageElement || c.b(r))) {
35739            if (r.width === void 0 || r.height === void 0) return this.fire(new c.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));
35740            {
35741              const { width: N, height: $, data: G } = r, Q = r;
35742              return this.style.addImage(_, { data: new c.R({ width: N, height: $ }, new Uint8Array(G)), pixelRatio: f, stretchX: y, stretchY: S, content: C, textFitWidth: I, textFitHeight: F, sdf: d, version: 0, userImage: Q }), Q.onAdd && Q.onAdd(this, _), this;
35743            }
35744          }
35745          {
35746            const { width: N, height: $, data: G } = R.getImageData(r);
35747            this.style.addImage(_, { data: new c.R({ width: N, height: $ }, G), pixelRatio: f, stretchX: y, stretchY: S, content: C, textFitWidth: I, textFitHeight: F, sdf: d, version: 0 });
35748          }
35749        }
35750        updateImage(_, r) {
35751          const a = this.style.getImage(_);
35752          if (!a) return this.fire(new c.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));
35753          const f = r instanceof HTMLImageElement || c.b(r) ? R.getImageData(r) : r, { width: d, height: y, data: S } = f;
35754          if (d === void 0 || y === void 0) return this.fire(new c.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));
35755          if (d !== a.data.width || y !== a.data.height) return this.fire(new c.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));
35756          const C = !(r instanceof HTMLImageElement || c.b(r));
35757          return a.data.replace(S, C), this.style.updateImage(_, a), this;
35758        }
35759        getImage(_) {
35760          return this.style.getImage(_);
35761        }
35762        hasImage(_) {
35763          return _ ? !!this.style.getImage(_) : (this.fire(new c.j(new Error("Missing required image id"))), !1);
35764        }
35765        removeImage(_) {
35766          this.style.removeImage(_);
35767        }
35768        loadImage(_) {
35769          return X.getImage(this._requestManager.transformRequest(_, "Image"), new AbortController());
35770        }
35771        listImages() {
35772          return this.style.listImages();
35773        }
35774        addLayer(_, r) {
35775          return this._lazyInitEmptyStyle(), this.style.addLayer(_, r), this._update(!0);
35776        }
35777        moveLayer(_, r) {
35778          return this.style.moveLayer(_, r), this._update(!0);
35779        }
35780        removeLayer(_) {
35781          return this.style.removeLayer(_), this._update(!0);
35782        }
35783        getLayer(_) {
35784          return this.style.getLayer(_);
35785        }
35786        getLayersOrder() {
35787          return this.style.getLayersOrder();
35788        }
35789        setLayerZoomRange(_, r, a) {
35790          return this.style.setLayerZoomRange(_, r, a), this._update(!0);
35791        }
35792        setFilter(_, r, a = {}) {
35793          return this.style.setFilter(_, r, a), this._update(!0);
35794        }
35795        getFilter(_) {
35796          return this.style.getFilter(_);
35797        }
35798        setPaintProperty(_, r, a, f = {}) {
35799          return this.style.setPaintProperty(_, r, a, f), this._update(!0);
35800        }
35801        getPaintProperty(_, r) {
35802          return this.style.getPaintProperty(_, r);
35803        }
35804        setLayoutProperty(_, r, a, f = {}) {
35805          return this.style.setLayoutProperty(_, r, a, f), this._update(!0);
35806        }
35807        getLayoutProperty(_, r) {
35808          return this.style.getLayoutProperty(_, r);
35809        }
35810        setGlyphs(_, r = {}) {
35811          return this._lazyInitEmptyStyle(), this.style.setGlyphs(_, r), this._update(!0);
35812        }
35813        getGlyphs() {
35814          return this.style.getGlyphsUrl();
35815        }
35816        addSprite(_, r, a = {}) {
35817          return this._lazyInitEmptyStyle(), this.style.addSprite(_, r, a, (f) => {
35818            f || this._update(!0);
35819          }), this;
35820        }
35821        removeSprite(_) {
35822          return this._lazyInitEmptyStyle(), this.style.removeSprite(_), this._update(!0);
35823        }
35824        getSprite() {
35825          return this.style.getSprite();
35826        }
35827        setSprite(_, r = {}) {
35828          return this._lazyInitEmptyStyle(), this.style.setSprite(_, r, (a) => {
35829            a || this._update(!0);
35830          }), this;
35831        }
35832        setLight(_, r = {}) {
35833          return this._lazyInitEmptyStyle(), this.style.setLight(_, r), this._update(!0);
35834        }
35835        getLight() {
35836          return this.style.getLight();
35837        }
35838        setSky(_) {
35839          return this._lazyInitEmptyStyle(), this.style.setSky(_), this._update(!0);
35840        }
35841        getSky() {
35842          return this.style.getSky();
35843        }
35844        setFeatureState(_, r) {
35845          return this.style.setFeatureState(_, r), this._update();
35846        }
35847        removeFeatureState(_, r) {
35848          return this.style.removeFeatureState(_, r), this._update();
35849        }
35850        getFeatureState(_) {
35851          return this.style.getFeatureState(_);
35852        }
35853        getContainer() {
35854          return this._container;
35855        }
35856        getCanvasContainer() {
35857          return this._canvasContainer;
35858        }
35859        getCanvas() {
35860          return this._canvas;
35861        }
35862        _containerDimensions() {
35863          let _ = 0, r = 0;
35864          return this._container && (_ = this._container.clientWidth || 400, r = this._container.clientHeight || 300), [_, r];
35865        }
35866        _setupContainer() {
35867          const _ = this._container;
35868          _.classList.add("maplibregl-map");
35869          const r = this._canvasContainer = z.create("div", "maplibregl-canvas-container", _);
35870          this._interactive && r.classList.add("maplibregl-interactive"), this._canvas = z.create("canvas", "maplibregl-canvas", r), this._canvas.addEventListener("webglcontextlost", this._contextLost, !1), this._canvas.addEventListener("webglcontextrestored", this._contextRestored, !1), this._canvas.setAttribute("tabindex", this._interactive ? "0" : "-1"), this._canvas.setAttribute("aria-label", this._getUIString("Map.Title")), this._canvas.setAttribute("role", "region");
35871          const a = this._containerDimensions(), f = this._getClampedPixelRatio(a[0], a[1]);
35872          this._resizeCanvas(a[0], a[1], f);
35873          const d = this._controlContainer = z.create("div", "maplibregl-control-container", _), y = this._controlPositions = {};
35874          ["top-left", "top-right", "bottom-left", "bottom-right"].forEach((S) => {
35875            y[S] = z.create("div", `maplibregl-ctrl-${S} `, d);
35876          }), this._container.addEventListener("scroll", this._onMapScroll, !1);
35877        }
35878        _resizeCanvas(_, r, a) {
35879          this._canvas.width = Math.floor(a * _), this._canvas.height = Math.floor(a * r), this._canvas.style.width = `${_}px`, this._canvas.style.height = `${r}px`;
35880        }
35881        _setupPainter() {
35882          const _ = { alpha: !0, stencil: !0, depth: !0, failIfMajorPerformanceCaveat: this._failIfMajorPerformanceCaveat, preserveDrawingBuffer: this._preserveDrawingBuffer, antialias: this._antialias || !1 };
35883          let r = null;
35884          this._canvas.addEventListener("webglcontextcreationerror", (f) => {
35885            r = { requestedAttributes: _ }, f && (r.statusMessage = f.statusMessage, r.type = f.type);
35886          }, { once: !0 });
35887          const a = this._canvas.getContext("webgl2", _) || this._canvas.getContext("webgl", _);
35888          if (!a) {
35889            const f = "Failed to initialize WebGL";
35890            throw r ? (r.message = f, new Error(JSON.stringify(r))) : new Error(f);
35891          }
35892          this.painter = new En(a, this.transform), J.testSupport(a);
35893        }
35894        loaded() {
35895          return !this._styleDirty && !this._sourcesDirty && !!this.style && this.style.loaded();
35896        }
35897        _update(_) {
35898          return this.style && this.style._loaded ? (this._styleDirty = this._styleDirty || _, this._sourcesDirty = !0, this.triggerRepaint(), this) : this;
35899        }
35900        _requestRenderFrame(_) {
35901          return this._update(), this._renderTaskQueue.add(_);
35902        }
35903        _cancelRenderFrame(_) {
35904          this._renderTaskQueue.remove(_);
35905        }
35906        _render(_) {
35907          const r = this._idleTriggered ? this._fadeDuration : 0;
35908          if (this.painter.context.setDirty(), this.painter.setBaseState(), this._renderTaskQueue.run(_), this._removed) return;
35909          let a = !1;
35910          if (this.style && this._styleDirty) {
35911            this._styleDirty = !1;
35912            const d = this.transform.zoom, y = R.now();
35913            this.style.zoomHistory.update(d, y);
35914            const S = new c.z(d, { now: y, fadeDuration: r, zoomHistory: this.style.zoomHistory, transition: this.style.getTransition() }), C = S.crossFadingFactor();
35915            C === 1 && C === this._crossFadingFactor || (a = !0, this._crossFadingFactor = C), this.style.update(S);
35916          }
35917          this.style && this._sourcesDirty && (this._sourcesDirty = !1, this.style._updateSources(this.transform)), this.terrain ? (this.terrain.sourceCache.update(this.transform, this.terrain), this.transform.minElevationForCurrentTile = this.terrain.getMinTileElevationForLngLatZoom(this.transform.center, this.transform.tileZoom), this._elevationFreeze || (this.transform.elevation = this.terrain.getElevationForLngLatZoom(this.transform.center, this.transform.tileZoom))) : (this.transform.minElevationForCurrentTile = 0, this.transform.elevation = 0), this._placementDirty = this.style && this.style._updatePlacement(this.painter.transform, this.showCollisionBoxes, r, this._crossSourceCollisions), this.painter.render(this.style, { showTileBoundaries: this.showTileBoundaries, showOverdrawInspector: this._showOverdrawInspector, rotating: this.isRotating(), zooming: this.isZooming(), moving: this.isMoving(), fadeDuration: r, showPadding: this.showPadding }), this.fire(new c.k("render")), this.loaded() && !this._loaded && (this._loaded = !0, c.bf.mark(c.bg.load), this.fire(new c.k("load"))), this.style && (this.style.hasTransitions() || a) && (this._styleDirty = !0), this.style && !this._placementDirty && this.style._releaseSymbolFadeTiles();
35918          const f = this._sourcesDirty || this._styleDirty || this._placementDirty;
35919          return f || this._repaint ? this.triggerRepaint() : !this.isMoving() && this.loaded() && this.fire(new c.k("idle")), !this._loaded || this._fullyLoaded || f || (this._fullyLoaded = !0, c.bf.mark(c.bg.fullLoad)), this;
35920        }
35921        redraw() {
35922          return this.style && (this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this._render(0)), this;
35923        }
35924        remove() {
35925          var _;
35926          this._hash && this._hash.remove();
35927          for (const a of this._controls) a.onRemove(this);
35928          this._controls = [], this._frameRequest && (this._frameRequest.abort(), this._frameRequest = null), this._renderTaskQueue.clear(), this.painter.destroy(), this.handlers.destroy(), delete this.handlers, this.setStyle(null), typeof window < "u" && removeEventListener("online", this._onWindowOnline, !1), X.removeThrottleControl(this._imageQueueHandle), (_ = this._resizeObserver) === null || _ === void 0 || _.disconnect();
35929          const r = this.painter.context.gl.getExtension("WEBGL_lose_context");
35930          r != null && r.loseContext && r.loseContext(), this._canvas.removeEventListener("webglcontextrestored", this._contextRestored, !1), this._canvas.removeEventListener("webglcontextlost", this._contextLost, !1), z.remove(this._canvasContainer), z.remove(this._controlContainer), this._container.classList.remove("maplibregl-map"), c.bf.clearMetrics(), this._removed = !0, this.fire(new c.k("remove"));
35931        }
35932        triggerRepaint() {
35933          this.style && !this._frameRequest && (this._frameRequest = new AbortController(), R.frameAsync(this._frameRequest).then((_) => {
35934            c.bf.frame(_), this._frameRequest = null, this._render(_);
35935          }).catch(() => {
35936          }));
35937        }
35938        get showTileBoundaries() {
35939          return !!this._showTileBoundaries;
35940        }
35941        set showTileBoundaries(_) {
35942          this._showTileBoundaries !== _ && (this._showTileBoundaries = _, this._update());
35943        }
35944        get showPadding() {
35945          return !!this._showPadding;
35946        }
35947        set showPadding(_) {
35948          this._showPadding !== _ && (this._showPadding = _, this._update());
35949        }
35950        get showCollisionBoxes() {
35951          return !!this._showCollisionBoxes;
35952        }
35953        set showCollisionBoxes(_) {
35954          this._showCollisionBoxes !== _ && (this._showCollisionBoxes = _, _ ? this.style._generateCollisionBoxes() : this._update());
35955        }
35956        get showOverdrawInspector() {
35957          return !!this._showOverdrawInspector;
35958        }
35959        set showOverdrawInspector(_) {
35960          this._showOverdrawInspector !== _ && (this._showOverdrawInspector = _, this._update());
35961        }
35962        get repaint() {
35963          return !!this._repaint;
35964        }
35965        set repaint(_) {
35966          this._repaint !== _ && (this._repaint = _, this.triggerRepaint());
35967        }
35968        get vertices() {
35969          return !!this._vertices;
35970        }
35971        set vertices(_) {
35972          this._vertices = _, this._update();
35973        }
35974        get version() {
35975          return Zd;
35976        }
35977        getCameraTargetElevation() {
35978          return this.transform.elevation;
35979        }
35980      }, m.MapMouseEvent = Vn, m.MapTouchEvent = Un, m.MapWheelEvent = vs, m.Marker = Tu, m.NavigationControl = class {
35981        constructor(_) {
35982          this._updateZoomButtons = () => {
35983            const r = this._map.getZoom(), a = r === this._map.getMaxZoom(), f = r === this._map.getMinZoom();
35984            this._zoomInButton.disabled = a, this._zoomOutButton.disabled = f, this._zoomInButton.setAttribute("aria-disabled", a.toString()), this._zoomOutButton.setAttribute("aria-disabled", f.toString());
35985          }, this._rotateCompassArrow = () => {
35986            const r = this.options.visualizePitch ? `scale(${1 / Math.pow(Math.cos(this._map.transform.pitch * (Math.PI / 180)), 0.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${this._map.transform.angle * (180 / Math.PI)}deg)` : `rotate(${this._map.transform.angle * (180 / Math.PI)}deg)`;
35987            this._compassIcon.style.transform = r;
35988          }, this._setButtonTitle = (r, a) => {
35989            const f = this._map._getUIString(`NavigationControl.${a}`);
35990            r.title = f, r.setAttribute("aria-label", f);
35991          }, this.options = c.e({}, ty, _), this._container = z.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._container.addEventListener("contextmenu", (r) => r.preventDefault()), this.options.showZoom && (this._zoomInButton = this._createButton("maplibregl-ctrl-zoom-in", (r) => this._map.zoomIn({}, { originalEvent: r })), z.create("span", "maplibregl-ctrl-icon", this._zoomInButton).setAttribute("aria-hidden", "true"), this._zoomOutButton = this._createButton("maplibregl-ctrl-zoom-out", (r) => this._map.zoomOut({}, { originalEvent: r })), z.create("span", "maplibregl-ctrl-icon", this._zoomOutButton).setAttribute("aria-hidden", "true")), this.options.showCompass && (this._compass = this._createButton("maplibregl-ctrl-compass", (r) => {
35992            this.options.visualizePitch ? this._map.resetNorthPitch({}, { originalEvent: r }) : this._map.resetNorth({}, { originalEvent: r });
35993          }), this._compassIcon = z.create("span", "maplibregl-ctrl-icon", this._compass), this._compassIcon.setAttribute("aria-hidden", "true"));
35994        }
35995        onAdd(_) {
35996          return this._map = _, this.options.showZoom && (this._setButtonTitle(this._zoomInButton, "ZoomIn"), this._setButtonTitle(this._zoomOutButton, "ZoomOut"), this._map.on("zoom", this._updateZoomButtons), this._updateZoomButtons()), this.options.showCompass && (this._setButtonTitle(this._compass, "ResetBearing"), this.options.visualizePitch && this._map.on("pitch", this._rotateCompassArrow), this._map.on("rotate", this._rotateCompassArrow), this._rotateCompassArrow(), this._handler = new ry(this._map, this._compass, this.options.visualizePitch)), this._container;
35997        }
35998        onRemove() {
35999          z.remove(this._container), this.options.showZoom && this._map.off("zoom", this._updateZoomButtons), this.options.showCompass && (this.options.visualizePitch && this._map.off("pitch", this._rotateCompassArrow), this._map.off("rotate", this._rotateCompassArrow), this._handler.off(), delete this._handler), delete this._map;
36000        }
36001        _createButton(_, r) {
36002          const a = z.create("button", _, this._container);
36003          return a.type = "button", a.addEventListener("click", r), a;
36004        }
36005      }, m.Popup = class extends c.E {
36006        constructor(_) {
36007          super(), this.remove = () => (this._content && z.remove(this._content), this._container && (z.remove(this._container), delete this._container), this._map && (this._map.off("move", this._update), this._map.off("move", this._onClose), this._map.off("click", this._onClose), this._map.off("remove", this.remove), this._map.off("mousemove", this._onMouseMove), this._map.off("mouseup", this._onMouseUp), this._map.off("drag", this._onDrag), this._map._canvasContainer.classList.remove("maplibregl-track-pointer"), delete this._map, this.fire(new c.k("close"))), this), this._onMouseUp = (r) => {
36008            this._update(r.point);
36009          }, this._onMouseMove = (r) => {
36010            this._update(r.point);
36011          }, this._onDrag = (r) => {
36012            this._update(r.point);
36013          }, this._update = (r) => {
36014            var a;
36015            if (!this._map || !this._lngLat && !this._trackPointer || !this._content) return;
36016            if (!this._container) {
36017              if (this._container = z.create("div", "maplibregl-popup", this._map.getContainer()), this._tip = z.create("div", "maplibregl-popup-tip", this._container), this._container.appendChild(this._content), this.options.className) for (const C of this.options.className.split(" ")) this._container.classList.add(C);
36018              this._closeButton && this._closeButton.setAttribute("aria-label", this._map._getUIString("Popup.Close")), this._trackPointer && this._container.classList.add("maplibregl-popup-track-pointer");
36019            }
36020            if (this.options.maxWidth && this._container.style.maxWidth !== this.options.maxWidth && (this._container.style.maxWidth = this.options.maxWidth), this._lngLat = this._map.transform.renderWorldCopies && !this._trackPointer ? gn(this._lngLat, this._flatPos, this._map.transform) : (a = this._lngLat) === null || a === void 0 ? void 0 : a.wrap(), this._trackPointer && !r) return;
36021            const f = this._flatPos = this._pos = this._trackPointer && r ? r : this._map.project(this._lngLat);
36022            this._map.terrain && (this._flatPos = this._trackPointer && r ? r : this._map.transform.locationPoint(this._lngLat));
36023            let d = this.options.anchor;
36024            const y = Au(this.options.offset);
36025            if (!d) {
36026              const C = this._container.offsetWidth, I = this._container.offsetHeight;
36027              let F;
36028              F = f.y + y.bottom.y < I ? ["top"] : f.y > this._map.transform.height - I ? ["bottom"] : [], f.x < C / 2 ? F.push("left") : f.x > this._map.transform.width - C / 2 && F.push("right"), d = F.length === 0 ? "bottom" : F.join("-");
36029            }
36030            let S = f.add(y[d]);
36031            this.options.subpixelPositioning || (S = S.round()), z.setTransform(this._container, `${Il[d]} translate(${S.x}px,${S.y}px)`), Su(this._container, d, "popup");
36032          }, this._onClose = () => {
36033            this.remove();
36034          }, this.options = c.e(Object.create(Xt), _);
36035        }
36036        addTo(_) {
36037          return this._map && this.remove(), this._map = _, this.options.closeOnClick && this._map.on("click", this._onClose), this.options.closeOnMove && this._map.on("move", this._onClose), this._map.on("remove", this.remove), this._update(), this._focusFirstElement(), this._trackPointer ? (this._map.on("mousemove", this._onMouseMove), this._map.on("mouseup", this._onMouseUp), this._container && this._container.classList.add("maplibregl-popup-track-pointer"), this._map._canvasContainer.classList.add("maplibregl-track-pointer")) : this._map.on("move", this._update), this.fire(new c.k("open")), this;
36038        }
36039        isOpen() {
36040          return !!this._map;
36041        }
36042        getLngLat() {
36043          return this._lngLat;
36044        }
36045        setLngLat(_) {
36046          return this._lngLat = c.N.convert(_), this._pos = null, this._flatPos = null, this._trackPointer = !1, this._update(), this._map && (this._map.on("move", this._update), this._map.off("mousemove", this._onMouseMove), this._container && this._container.classList.remove("maplibregl-popup-track-pointer"), this._map._canvasContainer.classList.remove("maplibregl-track-pointer")), this;
36047        }
36048        trackPointer() {
36049          return this._trackPointer = !0, this._pos = null, this._flatPos = null, this._update(), this._map && (this._map.off("move", this._update), this._map.on("mousemove", this._onMouseMove), this._map.on("drag", this._onDrag), this._container && this._container.classList.add("maplibregl-popup-track-pointer"), this._map._canvasContainer.classList.add("maplibregl-track-pointer")), this;
36050        }
36051        getElement() {
36052          return this._container;
36053        }
36054        setText(_) {
36055          return this.setDOMContent(document.createTextNode(_));
36056        }
36057        setHTML(_) {
36058          const r = document.createDocumentFragment(), a = document.createElement("body");
36059          let f;
36060          for (a.innerHTML = _; f = a.firstChild, f; ) r.appendChild(f);
36061          return this.setDOMContent(r);
36062        }
36063        getMaxWidth() {
36064          var _;
36065          return (_ = this._container) === null || _ === void 0 ? void 0 : _.style.maxWidth;
36066        }
vendor: 6,235 bytes, lines 36067-36178
36067        setMaxWidth(_) {
36068          return this.options.maxWidth = _, this._update(), this;
36069        }
36070        setDOMContent(_) {
36071          if (this._content) for (; this._content.hasChildNodes(); ) this._content.firstChild && this._content.removeChild(this._content.firstChild);
36072          else this._content = z.create("div", "maplibregl-popup-content", this._container);
36073          return this._content.appendChild(_), this._createCloseButton(), this._update(), this._focusFirstElement(), this;
36074        }
36075        addClassName(_) {
36076          return this._container && this._container.classList.add(_), this;
36077        }
36078        removeClassName(_) {
36079          return this._container && this._container.classList.remove(_), this;
36080        }
36081        setOffset(_) {
36082          return this.options.offset = _, this._update(), this;
36083        }
36084        toggleClassName(_) {
36085          if (this._container) return this._container.classList.toggle(_);
36086        }
36087        setSubpixelPositioning(_) {
36088          this.options.subpixelPositioning = _;
36089        }
36090        _createCloseButton() {
36091          this.options.closeButton && (this._closeButton = z.create("button", "maplibregl-popup-close-button", this._content), this._closeButton.type = "button", this._closeButton.innerHTML = "&#215;", this._closeButton.addEventListener("click", this._onClose));
36092        }
36093        _focusFirstElement() {
36094          if (!this.options.focusAfterOpen || !this._container) return;
36095          const _ = this._container.querySelector(Eu);
36096          _ && _.focus();
36097        }
36098      }, m.RasterDEMTileSource = Qe, m.RasterTileSource = rt, m.ScaleControl = class {
36099        constructor(_) {
36100          this._onMove = () => {
36101            Ec(this._map, this._container, this.options);
36102          }, this.setUnit = (r) => {
36103            this.options.unit = r, Ec(this._map, this._container, this.options);
36104          }, this.options = Object.assign(Object.assign({}, yo), _);
36105        }
36106        getDefaultPosition() {
36107          return "bottom-left";
36108        }
36109        onAdd(_) {
36110          return this._map = _, this._container = z.create("div", "maplibregl-ctrl maplibregl-ctrl-scale", _.getContainer()), this._map.on("move", this._onMove), this._onMove(), this._container;
36111        }
36112        onRemove() {
36113          z.remove(this._container), this._map.off("move", this._onMove), this._map = void 0;
36114        }
36115      }, m.ScrollZoomHandler = Us, m.Style = ll, m.TerrainControl = class {
36116        constructor(_) {
36117          this._toggleTerrain = () => {
36118            this._map.getTerrain() ? this._map.setTerrain(null) : this._map.setTerrain(this.options), this._updateTerrainIcon();
36119          }, this._updateTerrainIcon = () => {
36120            this._terrainButton.classList.remove("maplibregl-ctrl-terrain"), this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"), this._map.terrain ? (this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"), this._terrainButton.title = this._map._getUIString("TerrainControl.Disable")) : (this._terrainButton.classList.add("maplibregl-ctrl-terrain"), this._terrainButton.title = this._map._getUIString("TerrainControl.Enable"));
36121          }, this.options = _;
36122        }
36123        onAdd(_) {
36124          return this._map = _, this._container = z.create("div", "maplibregl-ctrl maplibregl-ctrl-group"), this._terrainButton = z.create("button", "maplibregl-ctrl-terrain", this._container), z.create("span", "maplibregl-ctrl-icon", this._terrainButton).setAttribute("aria-hidden", "true"), this._terrainButton.type = "button", this._terrainButton.addEventListener("click", this._toggleTerrain), this._updateTerrainIcon(), this._map.on("terrain", this._updateTerrainIcon), this._container;
36125        }
36126        onRemove() {
36127          z.remove(this._container), this._map.off("terrain", this._updateTerrainIcon), this._map = void 0;
36128        }
36129      }, m.TwoFingersTouchPitchHandler = wc, m.TwoFingersTouchRotateHandler = Jh, m.TwoFingersTouchZoomHandler = Kh, m.TwoFingersTouchZoomRotateHandler = Qh, m.VectorTileSource = ft, m.VideoSource = Nt, m.addSourceType = (_, r) => c._(void 0, void 0, void 0, function* () {
36130        if (sr(_)) throw new Error(`A source type called "${_}" already exists.`);
36131        ((a, f) => {
36132          Gt[a] = f;
36133        })(_, r);
36134      }), m.clearPrewarmedResources = function() {
36135        const _ = dn;
36136        _ && (_.isPreloaded() && _.numActive() === 1 ? (_.release(en), dn = null) : console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"));
36137      }, m.getMaxParallelImageRequests = function() {
36138        return c.a.MAX_PARALLEL_IMAGE_REQUESTS;
36139      }, m.getRTLTextPluginStatus = function() {
36140        return Cr().getRTLTextPluginStatus();
36141      }, m.getVersion = function() {
36142        return af;
36143      }, m.getWorkerCount = function() {
36144        return $r.workerCount;
36145      }, m.getWorkerUrl = function() {
36146        return c.a.WORKER_URL;
36147      }, m.importScriptInWorkers = function(_) {
36148        return Fi().broadcast("IS", _);
36149      }, m.prewarm = function() {
36150        tn().acquire(en);
36151      }, m.setMaxParallelImageRequests = function(_) {
36152        c.a.MAX_PARALLEL_IMAGE_REQUESTS = _;
36153      }, m.setRTLTextPlugin = function(_, r) {
36154        return Cr().setRTLTextPlugin(_, r);
36155      }, m.setWorkerCount = function(_) {
36156        $r.workerCount = _;
36157      }, m.setWorkerUrl = function(_) {
36158        c.a.WORKER_URL = _;
36159      };
36160    });
36161    var g = s;
36162    return g;
36163  });
36164})(HP);
36165var GH = HP.exports;
36166const CX = /* @__PURE__ */ xa(GH);
36167var bT = Object.prototype.toString, ZP = function(t) {
36168  var s = bT.call(t), l = s === "[object Arguments]";
36169  return l || (l = s !== "[object Array]" && t !== null && typeof t == "object" && typeof t.length == "number" && t.length >= 0 && bT.call(t.callee) === "[object Function]"), l;
36170}, M_, xT;
36171function ZH() {
36172  if (xT) return M_;
36173  xT = 1;
36174  var e;
36175  if (!Object.keys) {
36176    var t = Object.prototype.hasOwnProperty, s = Object.prototype.toString, l = ZP, h = Object.prototype.propertyIsEnumerable, g = !h.call({ toString: null }, "toString"), m = h.call(function() {
36177    }, "prototype"), c = [
36178      "toString",
vendor: 1,256 bytes, lines 36179-36229
36179      "toLocaleString",
36180      "valueOf",
36181      "hasOwnProperty",
36182      "isPrototypeOf",
36183      "propertyIsEnumerable",
36184      "constructor"
36185    ], w = function(z) {
36186      var J = z.constructor;
36187      return J && J.prototype === z;
36188    }, O = {
36189      $applicationCache: !0,
36190      $console: !0,
36191      $external: !0,
36192      $frame: !0,
36193      $frameElement: !0,
36194      $frames: !0,
36195      $innerHeight: !0,
36196      $innerWidth: !0,
36197      $onmozfullscreenchange: !0,
36198      $onmozfullscreenerror: !0,
36199      $outerHeight: !0,
36200      $outerWidth: !0,
36201      $pageXOffset: !0,
36202      $pageYOffset: !0,
36203      $parent: !0,
36204      $scrollLeft: !0,
36205      $scrollTop: !0,
36206      $scrollX: !0,
36207      $scrollY: !0,
36208      $self: !0,
36209      $webkitIndexedDB: !0,
36210      $webkitStorageInfo: !0,
36211      $window: !0
36212    }, P = function() {
36213      if (typeof window > "u")
36214        return !1;
36215      for (var z in window)
36216        try {
36217          if (!O["$" + z] && t.call(window, z) && window[z] !== null && typeof window[z] == "object")
36218            try {
36219              w(window[z]);
36220            } catch {
36221              return !0;
36222            }
36223        } catch {
36224          return !0;
36225        }
36226      return !1;
36227    }(), R = function(z) {
36228      if (typeof window > "u" || !P)
36229        return w(z);
36230      try {
36231        return w(z);
36232      } catch {
36233        return !1;
36234      }
36235    };
36236    e = function(J) {
36237      var K = J !== null && typeof J == "object", ee = s.call(J) === "[object Function]", ue = l(J), Ce = K && s.call(J) === "[object String]", ge = [];
36238      if (!K && !ee && !ue)
36239        throw new TypeError("Object.keys called on a non-object");
36240      var X = m && ee;
36241      if (Ce && J.length > 0 && !t.call(J, 0))
36242        for (var ye = 0; ye < J.length; ++ye)
36243          ge.push(String(ye));
36244      if (ue && J.length > 0)
36245        for (var Ae = 0; Ae < J.length; ++Ae)
36246          ge.push(String(Ae));
36247      else
36248        for (var Se in J)
36249          !(X && Se === "prototype") && t.call(J, Se) && ge.push(String(Se));
36250      if (g)
36251        for (var je = R(J), Ne = 0; Ne < c.length; ++Ne)
36252          !(je && c[Ne] === "constructor") && t.call(J, c[Ne]) && ge.push(c[Ne]);
36253      return ge;
36254    };
36255  }
36256  return M_ = e, M_;
36257}
36258var WH = Array.prototype.slice, KH = ZP, wT = Object.keys, Yp = wT ? function(t) {
36259  return wT(t);
36260} : ZH(), ST = Object.keys;
36261Yp.shim = function() {
36262  if (Object.keys) {
36263    var t = function() {
36264      var s = Object.keys(arguments);
36265      return s && s.length === arguments.length;
36266    }(1, 2);
36267    t || (Object.keys = function(l) {
36268      return KH(l) ? ST(WH.call(l)) : ST(l);
36269    });
36270  } else
36271    Object.keys = Yp;
36272  return Object.keys || Yp;
36273};
36274var Ux = Yp, TT = zg, XH = lP, Xu = Ao, ET = Fd, qx = function(t, s, l) {
36275  if (!t || typeof t != "object" && typeof t != "function")
36276    throw new Xu("`obj` must be an object or a function`");
36277  if (typeof s != "string" && typeof s != "symbol")
36278    throw new Xu("`property` must be a string or a symbol`");
36279  if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
36280    throw new Xu("`nonEnumerable`, if provided, must be a boolean or null");
36281  if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
36282    throw new Xu("`nonWritable`, if provided, must be a boolean or null");
36283  if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
36284    throw new Xu("`nonConfigurable`, if provided, must be a boolean or null");
36285  if (arguments.length > 6 && typeof arguments[6] != "boolean")
36286    throw new Xu("`loose`, if provided, must be a boolean");
36287  var h = arguments.length > 3 ? arguments[3] : null, g = arguments.length > 4 ? arguments[4] : null, m = arguments.length > 5 ? arguments[5] : null, c = arguments.length > 6 ? arguments[6] : !1, w = !!ET && ET(t, s);
36288  if (TT)
36289    TT(t, s, {
36290      configurable: m === null && w ? w.configurable : !m,
36291      enumerable: h === null && w ? w.enumerable : !h,
36292      value: l,
36293      writable: g === null && w ? w.writable : !g
36294    });
36295  else if (c || !h && !g && !m)
36296    t[s] = l;
36297  else
36298    throw new XH("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
36299}, Lv = zg, WP = function() {
36300  return !!Lv;
36301};
36302WP.hasArrayLengthDefineBug = function() {
36303  if (!Lv)
36304    return null;
36305  try {
36306    return Lv([], "length", { value: 1 }).length !== 1;
36307  } catch {
36308    return !0;
36309  }
36310};
36311var Hx = WP, JH = Ux, YH = typeof Symbol == "function" && typeof Symbol("foo") == "symbol", QH = Object.prototype.toString, eG = Array.prototype.concat, AT = qx, tG = function(e) {
36312  return typeof e == "function" && QH.call(e) === "[object Function]";
36313}, KP = Hx(), rG = function(e, t, s, l) {
36314  if (t in e) {
36315    if (l === !0) {
36316      if (e[t] === s)
36317        return;
36318    } else if (!tG(l) || !l())
36319      return;
36320  }
36321  KP ? AT(e, t, s, !0) : AT(e, t, s);
36322}, XP = function(e, t) {
36323  var s = arguments.length > 2 ? arguments[2] : {}, l = JH(t);
36324  YH && (l = eG.call(l, Object.getOwnPropertySymbols(t)));
36325  for (var h = 0; h < l.length; h += 1)
36326    rG(e, l[h], t[l[h]], s[l[h]]);
36327};
36328XP.supportsDescriptors = !!KP;
36329var uu = XP, JP = { exports: {} }, nG = Sa, CT = qx, iG = Hx(), IT = Fd, PT = Ao, sG = nG("%Math.floor%"), oG = function(t, s) {
36330  if (typeof t != "function")
36331    throw new PT("`fn` is not a function");
36332  if (typeof s != "number" || s < 0 || s > 4294967295 || sG(s) !== s)
36333    throw new PT("`length` must be a positive 32-bit integer");
36334  var l = arguments.length > 2 && !!arguments[2], h = !0, g = !0;
36335  if ("length" in t && IT) {
36336    var m = IT(t, "length");
36337    m && !m.configurable && (h = !1), m && !m.writable && (g = !1);
36338  }
36339  return (h || g || !l) && (iG ? CT(
36340    /** @type {Parameters<define>[0]} */
36341    t,
36342    "length",
36343    s,
36344    !0,
36345    !0
36346  ) : CT(
36347    /** @type {Parameters<define>[0]} */
36348    t,
36349    "length",
36350    s
36351  )), t;
36352};
36353(function(e) {
36354  var t = zd, s = Sa, l = oG, h = Ao, g = s("%Function.prototype.apply%"), m = s("%Function.prototype.call%"), c = s("%Reflect.apply%", !0) || t.call(m, g), w = zg, O = s("%Math.max%");
36355  e.exports = function(z) {
36356    if (typeof z != "function")
36357      throw new h("a function is required");
36358    var J = c(t, m, arguments);
36359    return l(
36360      J,
36361      1 + O(0, z.length - (arguments.length - 1)),
36362      !0
36363    );
36364  };
36365  var P = function() {
36366    return c(t, g, arguments);
36367  };
36368  w ? w(e.exports, "apply", { value: P }) : e.exports.apply = P;
36369})(JP);
36370var zh = JP.exports, YP = Sa, QP = zh, aG = QP(YP("String.prototype.indexOf")), Wo = function(t, s) {
36371  var l = YP(t, !!s);
36372  return typeof l == "function" && aG(t, ".prototype.") > -1 ? QP(l) : l;
36373}, lG = Ux, eM = Bg()(), tM = Wo, MT = Object, cG = tM("Array.prototype.push"), kT = tM("Object.prototype.propertyIsEnumerable"), uG = eM ? Object.getOwnPropertySymbols : null, rM = function(t, s) {
36374  if (t == null)
36375    throw new TypeError("target must be an object");
36376  var l = MT(t);
36377  if (arguments.length === 1)
36378    return l;
36379  for (var h = 1; h < arguments.length; ++h) {
36380    var g = MT(arguments[h]), m = lG(g), c = eM && (Object.getOwnPropertySymbols || uG);
36381    if (c)
36382      for (var w = c(g), O = 0; O < w.length; ++O) {
36383        var P = w[O];
36384        kT(g, P) && cG(m, P);
36385      }
36386    for (var R = 0; R < m.length; ++R) {
36387      var z = m[R];
36388      if (kT(g, z)) {
36389        var J = g[z];
36390        l[z] = J;
36391      }
36392    }
36393  }
36394  return l;
36395}, k_ = rM, hG = function() {
36396  if (!Object.assign)
36397    return !1;
36398  for (var e = "abcdefghijklmnopqrst", t = e.split(""), s = {}, l = 0; l < t.length; ++l)
36399    s[t[l]] = t[l];
36400  var h = Object.assign({}, s), g = "";
36401  for (var m in h)
36402    g += m;
36403  return e !== g;
36404}, fG = function() {
36405  if (!Object.assign || !Object.preventExtensions)
36406    return !1;
36407  var e = Object.preventExtensions({ 1: 2 });
36408  try {
36409    Object.assign(e, "xy");
36410  } catch {
36411    return e[1] === "y";
36412  }
36413  return !1;
36414}, nM = function() {
36415  return !Object.assign || hG() || fG() ? k_ : Object.assign;
36416}, dG = uu, pG = nM, mG = function() {
36417  var t = pG();
36418  return dG(
36419    Object,
36420    { assign: t },
36421    { assign: function() {
36422      return Object.assign !== t;
36423    } }
36424  ), t;
36425}, gG = uu, yG = zh, _G = rM, iM = nM, vG = mG, bG = yG.apply(iM()), sM = function(t, s) {
36426  return bG(Object, arguments);
36427};
36428gG(sM, {
36429  getPolyfill: iM,
36430  implementation: _G,
36431  shim: vG
36432});
36433var xG = sM, ud = function() {
36434  return typeof (function() {
36435  }).name == "string";
36436}, Zf = Object.getOwnPropertyDescriptor;
36437if (Zf)
36438  try {
36439    Zf([], "length");
36440  } catch {
36441    Zf = null;
36442  }
36443ud.functionsHaveConfigurableNames = function() {
36444  if (!ud() || !Zf)
36445    return !1;
36446  var t = Zf(function() {
36447  }, "name");
36448  return !!t && !!t.configurable;
36449};
36450var wG = Function.prototype.bind;
36451ud.boundFunctionsHaveNames = function() {
36452  return ud() && typeof wG == "function" && (function() {
36453  }).bind().name !== "";
36454};
36455var SG = ud, OT = qx, TG = Hx(), EG = SG.functionsHaveConfigurableNames(), AG = Ao, CG = function(t, s) {
36456  if (typeof t != "function")
36457    throw new AG("`fn` is not a function");
36458  var l = arguments.length > 2 && !!arguments[2];
36459  return (!l || EG) && (TG ? OT(
36460    /** @type {Parameters<define>[0]} */
36461    t,
36462    "name",
36463    s,
36464    !0,
36465    !0
36466  ) : OT(
36467    /** @type {Parameters<define>[0]} */
36468    t,
36469    "name",
36470    s
36471  )), t;
36472}, IG = CG, PG = Ao, MG = Object, oM = IG(function() {
36473  if (this == null || this !== MG(this))
36474    throw new PG("RegExp.prototype.flags getter called on non-object");
36475  var t = "";
36476  return this.hasIndices && (t += "d"), this.global && (t += "g"), this.ignoreCase && (t += "i"), this.multiline && (t += "m"), this.dotAll && (t += "s"), this.unicode && (t += "u"), this.unicodeSets && (t += "v"), this.sticky && (t += "y"), t;
36477}, "get flags", !0), kG = oM, OG = uu.supportsDescriptors, DG = Object.getOwnPropertyDescriptor, aM = function() {
36478  if (OG && /a/mig.flags === "gim") {
36479    var t = DG(RegExp.prototype, "flags");
36480    if (t && typeof t.get == "function" && typeof RegExp.prototype.dotAll == "boolean" && typeof RegExp.prototype.hasIndices == "boolean") {
36481      var s = "", l = {};
36482      if (Object.defineProperty(l, "hasIndices", {
36483        get: function() {
36484          s += "d";
36485        }
36486      }), Object.defineProperty(l, "sticky", {
36487        get: function() {
36488          s += "y";
36489        }
36490      }), s === "dy")
36491        return t.get;
36492    }
36493  }
36494  return kG;
36495}, RG = uu.supportsDescriptors, LG = aM, FG = Object.getOwnPropertyDescriptor, zG = Object.defineProperty, BG = TypeError, DT = Object.getPrototypeOf, NG = /a/, $G = function() {
36496  if (!RG || !DT)
36497    throw new BG("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");
36498  var t = LG(), s = DT(NG), l = FG(s, "flags");
36499  return (!l || l.get !== t) && zG(s, "flags", {
36500    configurable: !0,
36501    enumerable: !1,
36502    get: t
36503  }), t;
36504}, jG = uu, VG = zh, UG = oM, lM = aM, qG = $G, cM = VG(lM());
36505jG(cM, {
36506  getPolyfill: lM,
36507  implementation: UG,
36508  shim: qG
36509});
36510var HG = cM, Qp = { exports: {} }, GG = Bg(), hu = function() {
36511  return GG() && !!Symbol.toStringTag;
36512}, ZG = hu(), WG = Wo, Fv = WG("Object.prototype.toString"), Ug = function(t) {
36513  return ZG && t && typeof t == "object" && Symbol.toStringTag in t ? !1 : Fv(t) === "[object Arguments]";
36514}, uM = function(t) {
36515  return Ug(t) ? !0 : t !== null && typeof t == "object" && typeof t.length == "number" && t.length >= 0 && Fv(t) !== "[object Array]" && Fv(t.callee) === "[object Function]";
36516}, KG = function() {
36517  return Ug(arguments);
36518}();
36519Ug.isLegacyArguments = uM;
36520var hM = KG ? Ug : uM, XG = dP(), Of = kx(), Ga = Ao, Gx = {
36521  assert: function(e, t) {
36522    if (!e || typeof e != "object" && typeof e != "function")
36523      throw new Ga("`O` is not an object");
36524    if (typeof t != "string")
36525      throw new Ga("`slot` must be a string");
36526    if (Of.assert(e), !Gx.has(e, t))
36527      throw new Ga("`" + t + "` is not present on `O`");
36528  },
36529  get: function(e, t) {
36530    if (!e || typeof e != "object" && typeof e != "function")
36531      throw new Ga("`O` is not an object");
36532    if (typeof t != "string")
36533      throw new Ga("`slot` must be a string");
36534    var s = Of.get(e);
36535    return s && s["$" + t];
36536  },
36537  has: function(e, t) {
36538    if (!e || typeof e != "object" && typeof e != "function")
36539      throw new Ga("`O` is not an object");
36540    if (typeof t != "string")
36541      throw new Ga("`slot` must be a string");
36542    var s = Of.get(e);
36543    return !!s && XG(s, "$" + t);
36544  },
36545  set: function(e, t, s) {
36546    if (!e || typeof e != "object" && typeof e != "function")
36547      throw new Ga("`O` is not an object");
36548    if (typeof t != "string")
36549      throw new Ga("`slot` must be a string");
36550    var l = Of.get(e);
36551    l || (l = {}, Of.set(e, l)), l["$" + t] = s;
36552  }
36553};
36554Object.freeze && Object.freeze(Gx);
36555var JG = Gx, Df = JG, YG = SyntaxError, RT = typeof StopIteration == "object" ? StopIteration : null, QG = function(t) {
36556  if (!RT)
36557    throw new YG("this environment lacks StopIteration");
36558  Df.set(t, "[[Done]]", !1);
36559  var s = {
36560    next: function() {
36561      var h = Df.get(this, "[[Iterator]]"), g = Df.get(h, "[[Done]]");
36562      try {
36563        return {
36564          done: g,
36565          value: g ? void 0 : h.next()
36566        };
36567      } catch (m) {
36568        if (Df.set(h, "[[Done]]", !0), m !== RT)
36569          throw m;
36570        return {
36571          done: !0,
36572          value: void 0
36573        };
36574      }
36575    }
36576  };
36577  return Df.set(s, "[[Iterator]]", t), s;
36578}, e9 = {}.toString, fM = Array.isArray || function(e) {
36579  return e9.call(e) == "[object Array]";
36580}, t9 = String.prototype.valueOf, r9 = function(t) {
36581  try {
36582    return t9.call(t), !0;
36583  } catch {
36584    return !1;
36585  }
36586}, n9 = Object.prototype.toString, i9 = "[object String]", s9 = hu(), dM = function(t) {
36587  return typeof t == "string" ? !0 : typeof t != "object" ? !1 : s9 ? r9(t) : n9.call(t) === i9;
36588}, Zx = typeof Map == "function" && Map.prototype ? Map : null, o9 = typeof Set == "function" && Set.prototype ? Set : null, Bm;
36589Zx || (Bm = function(t) {
36590  return !1;
36591});
36592var pM = Zx ? Map.prototype.has : null, LT = o9 ? Set.prototype.has : null;
36593!Bm && !pM && (Bm = function(t) {
36594  return !1;
36595});
36596var mM = Bm || function(t) {
36597  if (!t || typeof t != "object")
36598    return !1;
36599  try {
36600    if (pM.call(t), LT)
36601      try {
36602        LT.call(t);
36603      } catch {
36604        return !0;
36605      }
36606    return t instanceof Zx;
36607  } catch {
36608  }
36609  return !1;
36610}, a9 = typeof Map == "function" && Map.prototype ? Map : null, Wx = typeof Set == "function" && Set.prototype ? Set : null, Nm;
36611Wx || (Nm = function(t) {
36612  return !1;
36613});
36614var FT = a9 ? Map.prototype.has : null, gM = Wx ? Set.prototype.has : null;
36615!Nm && !gM && (Nm = function(t) {
36616  return !1;
36617});
36618var yM = Nm || function(t) {
36619  if (!t || typeof t != "object")
36620    return !1;
36621  try {
36622    if (gM.call(t), FT)
36623      try {
36624        FT.call(t);
36625      } catch {
36626        return !0;
36627      }
36628    return t instanceof Wx;
36629  } catch {
36630  }
36631  return !1;
36632}, zT = hM, BT = QG;
36633if (Px()() || Bg()()) {
36634  var O_ = Symbol.iterator;
36635  Qp.exports = function(t) {
36636    if (t != null && typeof t[O_] < "u")
36637      return t[O_]();
36638    if (zT(t))
36639      return Array.prototype[O_].call(t);
36640  };
36641} else {
36642  var l9 = fM, c9 = dM, NT = Sa, u9 = NT("%Map%", !0), h9 = NT("%Set%", !0), zo = Wo, $T = zo("Array.prototype.push"), jT = zo("String.prototype.charCodeAt"), f9 = zo("String.prototype.slice"), d9 = function(t, s) {
36643    var l = t.length;
36644    if (s + 1 >= l)
36645      return s + 1;
36646    var h = jT(t, s);
36647    if (h < 55296 || h > 56319)
36648      return s + 1;
36649    var g = jT(t, s + 1);
36650    return g < 56320 || g > 57343 ? s + 1 : s + 2;
36651  }, D_ = function(t) {
36652    var s = 0;
36653    return {
36654      next: function() {
36655        var h = s >= t.length, g;
36656        return h || (g = t[s], s += 1), {
36657          done: h,
36658          value: g
36659        };
36660      }
36661    };
36662  }, VT = function(t, s) {
36663    if (l9(t) || zT(t))
36664      return D_(t);
36665    if (c9(t)) {
36666      var l = 0;
36667      return {
36668        next: function() {
36669          var g = d9(t, l), m = f9(t, l, g);
36670          return l = g, {
36671            done: g > t.length,
36672            value: m
36673          };
36674        }
36675      };
36676    }
36677    if (s && typeof t["_es6-shim iterator_"] < "u")
36678      return t["_es6-shim iterator_"]();
36679  };
36680  if (!u9 && !h9)
36681    Qp.exports = function(t) {
36682      if (t != null)
36683        return VT(t, !0);
36684    };
36685  else {
36686    var p9 = mM, m9 = yM, UT = zo("Map.prototype.forEach", !0), qT = zo("Set.prototype.forEach", !0);
36687    if (typeof process > "u" || !process.versions || !process.versions.node)
36688      var HT = zo("Map.prototype.iterator", !0), GT = zo("Set.prototype.iterator", !0);
36689    var ZT = zo("Map.prototype.@@iterator", !0) || zo("Map.prototype._es6-shim iterator_", !0), WT = zo("Set.prototype.@@iterator", !0) || zo("Set.prototype._es6-shim iterator_", !0), g9 = function(t) {
36690      if (p9(t)) {
36691        if (HT)
36692          return BT(HT(t));
36693        if (ZT)
36694          return ZT(t);
36695        if (UT) {
36696          var s = [];
36697          return UT(t, function(h, g) {
36698            $T(s, [g, h]);
36699          }), D_(s);
36700        }
36701      }
36702      if (m9(t)) {
36703        if (GT)
36704          return BT(GT(t));
36705        if (WT)
36706          return WT(t);
36707        if (qT) {
36708          var l = [];
36709          return qT(t, function(h) {
36710            $T(l, h);
36711          }), D_(l);
36712        }
36713      }
36714    };
36715    Qp.exports = function(t) {
36716      return g9(t) || VT(t);
36717    };
36718  }
36719}
36720var y9 = Qp.exports, KT = function(e) {
36721  return e !== e;
36722}, _M = function(t, s) {
36723  return t === 0 && s === 0 ? 1 / t === 1 / s : !!(t === s || KT(t) && KT(s));
36724}, _9 = _M, vM = function() {
36725  return typeof Object.is == "function" ? Object.is : _9;
36726}, v9 = vM, b9 = uu, x9 = function() {
36727  var t = v9();
36728  return b9(Object, { is: t }, {
36729    is: function() {
36730      return Object.is !== t;
36731    }
36732  }), t;
36733}, w9 = uu, S9 = zh, T9 = _M, bM = vM, E9 = x9, xM = S9(bM(), Object);
36734w9(xM, {
36735  getPolyfill: bM,
36736  implementation: T9,
36737  shim: E9
36738});
36739var A9 = xM, C9 = zh, wM = Wo, I9 = Sa, zv = I9("%ArrayBuffer%", !0), em = wM("ArrayBuffer.prototype.byteLength", !0), P9 = wM("Object.prototype.toString"), XT = !!zv && !em && new zv(0).slice, JT = !!XT && C9(XT), SM = em || JT ? function(t) {
36740  if (!t || typeof t != "object")
36741    return !1;
36742  try {
36743    return em ? em(t) : JT(t, 0), !0;
36744  } catch {
36745    return !1;
36746  }
36747} : zv ? function(t) {
36748  return P9(t) === "[object ArrayBuffer]";
36749} : function(t) {
36750  return !1;
36751}, M9 = Date.prototype.getDay, k9 = function(t) {
36752  try {
36753    return M9.call(t), !0;
36754  } catch {
36755    return !1;
36756  }
36757}, O9 = Object.prototype.toString, D9 = "[object Date]", R9 = hu(), L9 = function(t) {
36758  return typeof t != "object" || t === null ? !1 : R9 ? k9(t) : O9.call(t) === D9;
36759}, Bv = Wo, TM = hu(), EM, AM, Nv, $v;
36760if (TM) {
36761  EM = Bv("Object.prototype.hasOwnProperty"), AM = Bv("RegExp.prototype.exec"), Nv = {};
36762  var R_ = function() {
36763    throw Nv;
36764  };
36765  $v = {
36766    toString: R_,
36767    valueOf: R_
36768  }, typeof Symbol.toPrimitive == "symbol" && ($v[Symbol.toPrimitive] = R_);
36769}
36770var F9 = Bv("Object.prototype.toString"), z9 = Object.getOwnPropertyDescriptor, B9 = "[object RegExp]", N9 = TM ? function(t) {
36771  if (!t || typeof t != "object")
36772    return !1;
36773  var s = z9(t, "lastIndex"), l = s && EM(s, "value");
36774  if (!l)
36775    return !1;
36776  try {
36777    AM(t, $v);
36778  } catch (h) {
36779    return h === Nv;
36780  }
36781} : function(t) {
36782  return !t || typeof t != "object" && typeof t != "function" ? !1 : F9(t) === B9;
36783}, $9 = Wo, YT = $9("SharedArrayBuffer.prototype.byteLength", !0), j9 = YT ? function(t) {
36784  if (!t || typeof t != "object")
36785    return !1;
36786  try {
36787    return YT(t), !0;
36788  } catch {
36789    return !1;
36790  }
36791} : function(t) {
36792  return !1;
36793}, V9 = Number.prototype.toString, U9 = function(t) {
36794  try {
36795    return V9.call(t), !0;
36796  } catch {
36797    return !1;
36798  }
36799}, q9 = Object.prototype.toString, H9 = "[object Number]", G9 = hu(), Z9 = function(t) {
36800  return typeof t == "number" ? !0 : typeof t != "object" ? !1 : G9 ? U9(t) : q9.call(t) === H9;
36801}, CM = Wo, W9 = CM("Boolean.prototype.toString"), K9 = CM("Object.prototype.toString"), X9 = function(t) {
36802  try {
36803    return W9(t), !0;
36804  } catch {
36805    return !1;
36806  }
36807}, J9 = "[object Boolean]", Y9 = hu(), Q9 = function(t) {
36808  return typeof t == "boolean" ? !0 : t === null || typeof t != "object" ? !1 : Y9 && Symbol.toStringTag in t ? X9(t) : K9(t) === J9;
36809}, jv = { exports: {} }, eZ = Object.prototype.toString, tZ = Px()();
36810if (tZ) {
36811  var rZ = Symbol.prototype.toString, nZ = /^Symbol\(.*\)$/, iZ = function(t) {
36812    return typeof t.valueOf() != "symbol" ? !1 : nZ.test(rZ.call(t));
36813  };
36814  jv.exports = function(t) {
36815    if (typeof t == "symbol")
36816      return !0;
36817    if (eZ.call(t) !== "[object Symbol]")
36818      return !1;
36819    try {
36820      return iZ(t);
36821    } catch {
36822      return !1;
36823    }
36824  };
36825} else
36826  jv.exports = function(t) {
36827    return !1;
36828  };
36829var sZ = jv.exports, Vv = { exports: {} }, QT = typeof BigInt < "u" && BigInt, oZ = function() {
36830  return typeof QT == "function" && typeof BigInt == "function" && typeof QT(42) == "bigint" && typeof BigInt(42) == "bigint";
36831}, aZ = oZ();
36832if (aZ) {
36833  var lZ = BigInt.prototype.valueOf, cZ = function(t) {
36834    try {
36835      return lZ.call(t), !0;
36836    } catch {
36837    }
36838    return !1;
36839  };
36840  Vv.exports = function(t) {
36841    return t === null || typeof t > "u" || typeof t == "boolean" || typeof t == "string" || typeof t == "number" || typeof t == "symbol" || typeof t == "function" ? !1 : typeof t == "bigint" ? !0 : cZ(t);
36842  };
36843} else
36844  Vv.exports = function(t) {
36845    return !1;
36846  };
36847var uZ = Vv.exports, hZ = dM, fZ = Z9, dZ = Q9, pZ = sZ, mZ = uZ, gZ = function(t) {
36848  if (t == null || typeof t != "object" && typeof t != "function")
36849    return null;
36850  if (hZ(t))
36851    return "String";
36852  if (fZ(t))
36853    return "Number";
36854  if (dZ(t))
36855    return "Boolean";
36856  if (pZ(t))
36857    return "Symbol";
36858  if (mZ(t))
36859    return "BigInt";
36860}, $m = typeof WeakMap == "function" && WeakMap.prototype ? WeakMap : null, eE = typeof WeakSet == "function" && WeakSet.prototype ? WeakSet : null, jm;
36861$m || (jm = function(t) {
36862  return !1;
36863});
36864var Uv = $m ? $m.prototype.has : null, L_ = eE ? eE.prototype.has : null;
36865!jm && !Uv && (jm = function(t) {
36866  return !1;
36867});
36868var yZ = jm || function(t) {
36869  if (!t || typeof t != "object")
36870    return !1;
36871  try {
36872    if (Uv.call(t, Uv), L_)
36873      try {
36874        L_.call(t, L_);
36875      } catch {
36876        return !0;
36877      }
36878    return t instanceof $m;
36879  } catch {
36880  }
36881  return !1;
36882}, qv = { exports: {} }, _Z = Sa, IM = Wo, vZ = _Z("%WeakSet%", !0), F_ = IM("WeakSet.prototype.has", !0);
36883if (F_) {
36884  var z_ = IM("WeakMap.prototype.has", !0);
36885  qv.exports = function(t) {
36886    if (!t || typeof t != "object")
36887      return !1;
36888    try {
36889      if (F_(t, F_), z_)
36890        try {
36891          z_(t, z_);
36892        } catch {
36893          return !0;
36894        }
36895      return t instanceof vZ;
36896    } catch {
36897    }
36898    return !1;
36899  };
36900} else
36901  qv.exports = function(t) {
36902    return !1;
36903  };
36904var bZ = qv.exports, xZ = mM, wZ = yM, SZ = yZ, TZ = bZ, EZ = function(t) {
36905  if (t && typeof t == "object") {
36906    if (xZ(t))
36907      return "Map";
36908    if (wZ(t))
36909      return "Set";
36910    if (SZ(t))
36911      return "WeakMap";
36912    if (TZ(t))
36913      return "WeakSet";
36914  }
36915  return !1;
36916}, PM = Function.prototype.toString, eh = typeof Reflect == "object" && Reflect !== null && Reflect.apply, Hv, tm;
36917if (typeof eh == "function" && typeof Object.defineProperty == "function")
36918  try {
36919    Hv = Object.defineProperty({}, "length", {
36920      get: function() {
36921        throw tm;
36922      }
36923    }), tm = {}, eh(function() {
36924      throw 42;
36925    }, null, Hv);
36926  } catch (e) {
36927    e !== tm && (eh = null);
36928  }
36929else
36930  eh = null;
36931var AZ = /^\s*class\b/, Gv = function(t) {
36932  try {
36933    var s = PM.call(t);
36934    return AZ.test(s);
36935  } catch {
36936    return !1;
36937  }
36938}, B_ = function(t) {
36939  try {
36940    return Gv(t) ? !1 : (PM.call(t), !0);
36941  } catch {
36942    return !1;
36943  }
36944}, rm = Object.prototype.toString, CZ = "[object Object]", IZ = "[object Function]", PZ = "[object GeneratorFunction]", MZ = "[object HTMLAllCollection]", kZ = "[object HTML document.all class]", OZ = "[object HTMLCollection]", DZ = typeof Symbol == "function" && !!Symbol.toStringTag, RZ = !(0 in [,]), Zv = function() {
36945  return !1;
36946};
36947if (typeof document == "object") {
36948  var LZ = document.all;
36949  rm.call(LZ) === rm.call(document.all) && (Zv = function(t) {
36950    if ((RZ || !t) && (typeof t > "u" || typeof t == "object"))
36951      try {
36952        var s = rm.call(t);
36953        return (s === MZ || s === kZ || s === OZ || s === CZ) && t("") == null;
36954      } catch {
36955      }
36956    return !1;
36957  });
36958}
36959var FZ = eh ? function(t) {
36960  if (Zv(t))
36961    return !0;
36962  if (!t || typeof t != "function" && typeof t != "object")
36963    return !1;
36964  try {
36965    eh(t, null, Hv);
36966  } catch (s) {
36967    if (s !== tm)
36968      return !1;
36969  }
36970  return !Gv(t) && B_(t);
36971} : function(t) {
36972  if (Zv(t))
36973    return !0;
36974  if (!t || typeof t != "function" && typeof t != "object")
36975    return !1;
36976  if (DZ)
36977    return B_(t);
36978  if (Gv(t))
36979    return !1;
36980  var s = rm.call(t);
36981  return s !== IZ && s !== PZ && !/^\[object HTML/.test(s) ? !1 : B_(t);
36982}, zZ = FZ, BZ = Object.prototype.toString, MM = Object.prototype.hasOwnProperty, NZ = function(t, s, l) {
36983  for (var h = 0, g = t.length; h < g; h++)
36984    MM.call(t, h) && (l == null ? s(t[h], h, t) : s.call(l, t[h], h, t));
36985}, $Z = function(t, s, l) {
36986  for (var h = 0, g = t.length; h < g; h++)
36987    l == null ? s(t.charAt(h), h, t) : s.call(l, t.charAt(h), h, t);
36988}, jZ = function(t, s, l) {
36989  for (var h in t)
36990    MM.call(t, h) && (l == null ? s(t[h], h, t) : s.call(l, t[h], h, t));
36991}, VZ = function(t, s, l) {
36992  if (!zZ(s))
36993    throw new TypeError("iterator must be a function");
36994  var h;
36995  arguments.length >= 3 && (h = l), BZ.call(t) === "[object Array]" ? NZ(t, s, h) : typeof t == "string" ? $Z(t, s, h) : jZ(t, s, h);
36996}, UZ = VZ, qZ = [
36997  "Float32Array",
36998  "Float64Array",
36999  "Int8Array",
37000  "Int16Array",
37001  "Int32Array",
37002  "Uint8Array",
37003  "Uint8ClampedArray",
37004  "Uint16Array",
37005  "Uint32Array",
37006  "BigInt64Array",
37007  "BigUint64Array"
37008], N_ = qZ, HZ = typeof globalThis > "u" ? ps : globalThis, GZ = function() {
37009  for (var t = [], s = 0; s < N_.length; s++)
37010    typeof HZ[N_[s]] == "function" && (t[t.length] = N_[s]);
37011  return t;
37012}, Vm = UZ, ZZ = GZ, tE = zh, Kx = Wo, nm = Fd, WZ = Kx("Object.prototype.toString"), kM = hu(), rE = typeof globalThis > "u" ? ps : globalThis, Wv = ZZ(), Xx = Kx("String.prototype.slice"), $_ = Object.getPrototypeOf, KZ = Kx("Array.prototype.indexOf", !0) || function(t, s) {
37013  for (var l = 0; l < t.length; l += 1)
37014    if (t[l] === s)
37015      return l;
37016  return -1;
37017}, Um = { __proto__: null };
37018kM && nm && $_ ? Vm(Wv, function(e) {
37019  var t = new rE[e]();
37020  if (Symbol.toStringTag in t) {
37021    var s = $_(t), l = nm(s, Symbol.toStringTag);
37022    if (!l) {
37023      var h = $_(s);
37024      l = nm(h, Symbol.toStringTag);
37025    }
37026    Um["$" + e] = tE(l.get);
37027  }
37028}) : Vm(Wv, function(e) {
37029  var t = new rE[e](), s = t.slice || t.set;
37030  s && (Um["$" + e] = tE(s));
37031});
37032var XZ = function(t) {
37033  var s = !1;
37034  return Vm(
37035    // eslint-disable-next-line no-extra-parens
37036    /** @type {Record<`\$${TypedArrayName}`, Getter>} */
37037    /** @type {any} */
37038    Um,
37039    /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
37040    function(l, h) {
37041      if (!s)
37042        try {
37043          "$" + l(t) === h && (s = Xx(h, 1));
37044        } catch {
37045        }
37046    }
37047  ), s;
37048}, JZ = function(t) {
37049  var s = !1;
37050  return Vm(
37051    // eslint-disable-next-line no-extra-parens
37052    /** @type {Record<`\$${TypedArrayName}`, Getter>} */
37053    /** @type {any} */
37054    Um,
37055    /** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
37056    function(l, h) {
37057      if (!s)
37058        try {
37059          l(t), s = Xx(h, 1);
37060        } catch {
37061        }
37062    }
37063  ), s;
37064}, YZ = function(t) {
37065  if (!t || typeof t != "object")
37066    return !1;
37067  if (!kM) {
37068    var s = Xx(WZ(t), 8, -1);
37069    return KZ(Wv, s) > -1 ? s : s !== "Object" ? !1 : JZ(t);
37070  }
37071  return nm ? XZ(t) : null;
37072}, QZ = Wo, nE = QZ("ArrayBuffer.prototype.byteLength", !0), eW = SM, tW = function(t) {
37073  return eW(t) ? nE ? nE(t) : t.byteLength : NaN;
37074}, OM = xG, Ta = Wo, iE = HG, rW = Sa, xh = y9, nW = kx, sE = A9, oE = hM, aE = fM, lE = SM, cE = L9, uE = N9, hE = j9, fE = Ux, dE = gZ, pE = EZ, mE = YZ, gE = tW, yE = Ta("SharedArrayBuffer.prototype.byteLength", !0), _E = Ta("Date.prototype.getTime"), j_ = Object.getPrototypeOf, vE = Ta("Object.prototype.toString"), qm = rW("%Set%", !0), Kv = Ta("Map.prototype.has", !0), Hm = Ta("Map.prototype.get", !0), bE = Ta("Map.prototype.size", !0), Gm = Ta("Set.prototype.add", !0), DM = Ta("Set.prototype.delete", !0), Zm = Ta("Set.prototype.has", !0), im = Ta("Set.prototype.size", !0);
37075function xE(e, t, s, l) {
37076  for (var h = xh(e), g; (g = h.next()) && !g.done; )
37077    if (Vo(t, g.value, s, l))
37078      return DM(e, g.value), !0;
37079  return !1;
37080}
37081function RM(e) {
37082  if (typeof e > "u")
37083    return null;
37084  if (typeof e != "object")
37085    return typeof e == "symbol" ? !1 : typeof e == "string" || typeof e == "number" ? +e == +e : !0;
37086}
37087function iW(e, t, s, l, h, g) {
37088  var m = RM(s);
37089  if (m != null)
37090    return m;
37091  var c = Hm(t, m), w = OM({}, h, { strict: !1 });
37092  return typeof c > "u" && !Kv(t, m) || !Vo(l, c, w, g) ? !1 : !Kv(e, m) && Vo(l, c, w, g);
37093}
37094function sW(e, t, s) {
37095  var l = RM(s);
37096  return l ?? (Zm(t, l) && !Zm(e, l));
37097}
37098function wE(e, t, s, l, h, g) {
37099  for (var m = xh(e), c, w; (c = m.next()) && !c.done; )
37100    if (w = c.value, // eslint-disable-next-line no-use-before-define
37101    Vo(s, w, h, g) && Vo(l, Hm(t, w), h, g))
37102      return DM(e, w), !0;
37103  return !1;
37104}
37105function Vo(e, t, s, l) {
37106  var h = s || {};
37107  if (h.strict ? sE(e, t) : e === t)
37108    return !0;
37109  var g = dE(e), m = dE(t);
37110  if (g !== m)
37111    return !1;
37112  if (!e || !t || typeof e != "object" && typeof t != "object")
37113    return h.strict ? sE(e, t) : e == t;
37114  var c = l.has(e), w = l.has(t), O;
37115  if (c && w) {
37116    if (l.get(e) === l.get(t))
37117      return !0;
37118  } else
37119    O = {};
37120  return c || l.set(e, O), w || l.set(t, O), lW(e, t, h, l);
37121}
37122function SE(e) {
37123  return !e || typeof e != "object" || typeof e.length != "number" || typeof e.copy != "function" || typeof e.slice != "function" || e.length > 0 && typeof e[0] != "number" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e));
37124}
37125function oW(e, t, s, l) {
37126  if (im(e) !== im(t))
37127    return !1;
37128  for (var h = xh(e), g = xh(t), m, c, w; (m = h.next()) && !m.done; )
37129    if (m.value && typeof m.value == "object")
37130      w || (w = new qm()), Gm(w, m.value);
37131    else if (!Zm(t, m.value)) {
37132      if (s.strict || !sW(e, t, m.value))
37133        return !1;
37134      w || (w = new qm()), Gm(w, m.value);
37135    }
37136  if (w) {
37137    for (; (c = g.next()) && !c.done; )
37138      if (c.value && typeof c.value == "object") {
37139        if (!xE(w, c.value, s.strict, l))
37140          return !1;
37141      } else if (!s.strict && !Zm(e, c.value) && !xE(w, c.value, s.strict, l))
37142        return !1;
37143    return im(w) === 0;
37144  }
37145  return !0;
37146}
37147function aW(e, t, s, l) {
37148  if (bE(e) !== bE(t))
37149    return !1;
37150  for (var h = xh(e), g = xh(t), m, c, w, O, P, R; (m = h.next()) && !m.done; )
37151    if (O = m.value[0], P = m.value[1], O && typeof O == "object")
37152      w || (w = new qm()), Gm(w, O);
37153    else if (R = Hm(t, O), typeof R > "u" && !Kv(t, O) || !Vo(P, R, s, l)) {
37154      if (s.strict || !iW(e, t, O, P, s, l))
37155        return !1;
37156      w || (w = new qm()), Gm(w, O);
37157    }
37158  if (w) {
37159    for (; (c = g.next()) && !c.done; )
37160      if (O = c.value[0], R = c.value[1], O && typeof O == "object") {
37161        if (!wE(w, e, O, R, s, l))
37162          return !1;
37163      } else if (!s.strict && (!e.has(O) || !Vo(Hm(e, O), R, s, l)) && !wE(w, e, O, R, OM({}, s, { strict: !1 }), l))
37164        return !1;
37165    return im(w) === 0;
37166  }
37167  return !0;
37168}
37169function lW(e, t, s, l) {
37170  var h, g;
37171  if (typeof e != typeof t || e == null || t == null || vE(e) !== vE(t) || oE(e) !== oE(t))
37172    return !1;
37173  var m = aE(e), c = aE(t);
37174  if (m !== c)
37175    return !1;
37176  var w = e instanceof Error, O = t instanceof Error;
37177  if (w !== O || (w || O) && (e.name !== t.name || e.message !== t.message))
37178    return !1;
37179  var P = uE(e), R = uE(t);
37180  if (P !== R || (P || R) && (e.source !== t.source || iE(e) !== iE(t)))
37181    return !1;
37182  var z = cE(e), J = cE(t);
37183  if (z !== J || (z || J) && _E(e) !== _E(t) || s.strict && j_ && j_(e) !== j_(t))
37184    return !1;
37185  var K = mE(e), ee = mE(t);
37186  if (K !== ee)
37187    return !1;
37188  if (K || ee) {
37189    if (e.length !== t.length)
37190      return !1;
37191    for (h = 0; h < e.length; h++)
37192      if (e[h] !== t[h])
37193        return !1;
37194    return !0;
37195  }
37196  var ue = SE(e), Ce = SE(t);
37197  if (ue !== Ce)
37198    return !1;
37199  if (ue || Ce) {
37200    if (e.length !== t.length)
37201      return !1;
37202    for (h = 0; h < e.length; h++)
37203      if (e[h] !== t[h])
37204        return !1;
37205    return !0;
37206  }
37207  var ge = lE(e), X = lE(t);
37208  if (ge !== X)
37209    return !1;
37210  if (ge || X)
37211    return gE(e) !== gE(t) ? !1 : typeof Uint8Array == "function" && Vo(new Uint8Array(e), new Uint8Array(t), s, l);
37212  var ye = hE(e), Ae = hE(t);
37213  if (ye !== Ae)
37214    return !1;
37215  if (ye || Ae)
37216    return yE(e) !== yE(t) ? !1 : typeof Uint8Array == "function" && Vo(new Uint8Array(e), new Uint8Array(t), s, l);
37217  if (typeof e != typeof t)
37218    return !1;
37219  var Se = fE(e), je = fE(t);
37220  if (Se.length !== je.length)
37221    return !1;
37222  for (Se.sort(), je.sort(), h = Se.length - 1; h >= 0; h--)
37223    if (Se[h] != je[h])
37224      return !1;
37225  for (h = Se.length - 1; h >= 0; h--)
37226    if (g = Se[h], !Vo(e[g], t[g], s, l))
37227      return !1;
37228  var Ne = pE(e), Oe = pE(t);
37229  return Ne !== Oe ? !1 : Ne === "Set" || Oe === "Set" ? oW(e, t, s, l) : Ne === "Map" ? aW(e, t, s, l) : !0;
37230}
37231var cW = function(t, s, l) {
37232  return Vo(t, s, l, nW());
37233};
37234const uW = /* @__PURE__ */ xa(cW);
37235var hW = Object.defineProperty, fn = (e, t) => hW(e, "name", { value: t, configurable: !0 }), fW = class {
37236  constructor(t) {
37237    this.direction = !1, this.compareProperties = !0;
37238    var s, l, h;
37239    this.precision = 10 ** -((s = t == null ? void 0 : t.precision) != null ? s : 17), this.direction = (l = t == null ? void 0 : t.direction) != null ? l : !1, this.compareProperties = (h = t == null ? void 0 : t.compareProperties) != null ? h : !0;
37240  }
37241  compare(t, s) {
37242    if (t.type !== s.type || !Ff(t, s))
37243      return !1;
37244    switch (t.type) {
37245      case "Point":
37246        return this.compareCoord(t.coordinates, s.coordinates);
37247      case "LineString":
37248        return this.compareLine(t.coordinates, s.coordinates);
37249      case "Polygon":
37250        return this.comparePolygon(t, s);
37251      case "GeometryCollection":
37252        return this.compareGeometryCollection(t, s);
37253      case "Feature":
37254        return this.compareFeature(t, s);
37255      case "FeatureCollection":
37256        return this.compareFeatureCollection(t, s);
37257      default:
37258        if (t.type.startsWith("Multi")) {
37259          const l = Xv(t), h = Xv(
37260            s
37261          );
37262          return l.every(
37263            (g) => h.some((m) => this.compare(g, m))
37264          );
37265        }
37266    }
37267    return !1;
37268  }
37269  compareCoord(t, s) {
37270    return t.length === s.length && t.every((l, h) => Math.abs(l - s[h]) < this.precision);
37271  }
37272  compareLine(t, s, l = 0, h = !1) {
37273    if (!Ff(t, s))
37274      return !1;
37275    const g = t;
37276    let m = s;
37277    if (h && !this.compareCoord(g[0], m[0])) {
37278      const w = this.fixStartIndex(m, g);
37279      if (w)
37280        m = w;
37281      else
37282        return !1;
37283    }
37284    const c = this.compareCoord(g[l], m[l]);
37285    return this.direction || c ? this.comparePath(g, m) : this.compareCoord(g[l], m[m.length - (1 + l)]) ? this.comparePath(g.slice().reverse(), m) : !1;
37286  }
37287  fixStartIndex(t, s) {
37288    let l, h = -1;
37289    for (let g = 0; g < t.length; g++)
37290      if (this.compareCoord(t[g], s[0])) {
37291        h = g;
37292        break;
37293      }
37294    return h >= 0 && (l = [].concat(
37295      t.slice(h, t.length),
37296      t.slice(1, h + 1)
37297    )), l;
37298  }
37299  comparePath(t, s) {
37300    return t.every((l, h) => this.compareCoord(l, s[h]));
37301  }
37302  comparePolygon(t, s) {
37303    if (this.compareLine(t.coordinates[0], s.coordinates[0], 1, !0)) {
37304      const l = t.coordinates.slice(1, t.coordinates.length), h = s.coordinates.slice(1, s.coordinates.length);
37305      return l.every(
37306        (g) => h.some((m) => this.compareLine(g, m, 1, !0))
37307      );
37308    }
37309    return !1;
37310  }
37311  compareGeometryCollection(t, s) {
37312    return Ff(t.geometries, s.geometries) && this.compareBBox(t, s) && t.geometries.every((l, h) => this.compare(l, s.geometries[h]));
37313  }
37314  compareFeature(t, s) {
37315    return t.id === s.id && (this.compareProperties ? uW(t.properties, s.properties) : !0) && this.compareBBox(t, s) && this.compare(t.geometry, s.geometry);
37316  }
37317  compareFeatureCollection(t, s) {
37318    return Ff(t.features, s.features) && this.compareBBox(t, s) && t.features.every((l, h) => this.compare(l, s.features[h]));
37319  }
37320  compareBBox(t, s) {
37321    return !t.bbox && !s.bbox || (t.bbox && s.bbox ? this.compareCoord(t.bbox, s.bbox) : !1);
37322  }
37323};
37324fn(fW, "GeojsonEquality");
37325function Ff(e, t) {
37326  return e.coordinates ? e.coordinates.length === t.coordinates.length : e.length === t.length;
37327}
37328fn(Ff, "sameLength");
37329function Xv(e) {
37330  return e.coordinates.map((t) => ({
37331    type: e.type.replace("Multi", ""),
37332    coordinates: t
37333  }));
37334}
37335fn(Xv, "explode");
37336var Js = 63710088e-1, LM = {
37337  centimeters: Js * 100,
37338  centimetres: Js * 100,
37339  degrees: 360 / (2 * Math.PI),
37340  feet: Js * 3.28084,
37341  inches: Js * 39.37,
37342  kilometers: Js / 1e3,
37343  kilometres: Js / 1e3,
37344  meters: Js,
37345  metres: Js,
37346  miles: Js / 1609.344,
37347  millimeters: Js * 1e3,
37348  millimetres: Js * 1e3,
37349  nauticalmiles: Js / 1852,
37350  radians: 1,
37351  yards: Js * 1.0936
37352}, TE = {
37353  acres: 247105e-9,
37354  centimeters: 1e4,
37355  centimetres: 1e4,
37356  feet: 10.763910417,
37357  hectares: 1e-4,
37358  inches: 1550.003100006,
37359  kilometers: 1e-6,
37360  kilometres: 1e-6,
37361  meters: 1,
37362  metres: 1,
37363  miles: 386e-9,
37364  nauticalmiles: 29155334959812285e-23,
37365  millimeters: 1e6,
37366  millimetres: 1e6,
37367  yards: 1.195990046
37368};
37369function Ho(e, t, s = {}) {
37370  const l = { type: "Feature" };
37371  return (s.id === 0 || s.id) && (l.id = s.id), s.bbox && (l.bbox = s.bbox), l.properties = t || {}, l.geometry = e, l;
37372}
37373fn(Ho, "feature");
37374function dW(e, t, s = {}) {
37375  switch (e) {
37376    case "Point":
37377      return Ja(t).geometry;
37378    case "LineString":
37379      return Qa(t).geometry;
37380    case "Polygon":
37381      return Jx(t).geometry;
37382    case "MultiPoint":
37383      return zM(t).geometry;
37384    case "MultiLineString":
37385      return FM(t).geometry;
37386    case "MultiPolygon":
37387      return BM(t).geometry;
37388    default:
37389      throw new Error(e + " is invalid");
37390  }
37391}
37392fn(dW, "geometry");
37393function Ja(e, t, s = {}) {
37394  if (!e)
37395    throw new Error("coordinates is required");
37396  if (!Array.isArray(e))
37397    throw new Error("coordinates must be an Array");
37398  if (e.length < 2)
37399    throw new Error("coordinates must be at least 2 numbers long");
37400  if (!wh(e[0]) || !wh(e[1]))
37401    throw new Error("coordinates must contain numbers");
37402  return Ho({
37403    type: "Point",
37404    coordinates: e
37405  }, t, s);
37406}
37407fn(Ja, "point");
37408function pW(e, t, s = {}) {
37409  return qg(
37410    e.map((l) => Ja(l, t)),
37411    s
37412  );
37413}
37414fn(pW, "points");
37415function Jx(e, t, s = {}) {
37416  for (const h of e) {
37417    if (h.length < 4)
37418      throw new Error(
37419        "Each LinearRing of a Polygon must have 4 or more Positions."
37420      );
37421    if (h[h.length - 1].length !== h[0].length)
37422      throw new Error("First and last Position are not equivalent.");
37423    for (let g = 0; g < h[h.length - 1].length; g++)
37424      if (h[h.length - 1][g] !== h[0][g])
37425        throw new Error("First and last Position are not equivalent.");
37426  }
37427  return Ho({
37428    type: "Polygon",
37429    coordinates: e
37430  }, t, s);
37431}
37432fn(Jx, "polygon");
37433function mW(e, t, s = {}) {
37434  return qg(
37435    e.map((l) => Jx(l, t)),
37436    s
37437  );
37438}
37439fn(mW, "polygons");
37440function Qa(e, t, s = {}) {
37441  if (e.length < 2)
37442    throw new Error("coordinates must be an array of two or more positions");
37443  return Ho({
37444    type: "LineString",
37445    coordinates: e
37446  }, t, s);
37447}
37448fn(Qa, "lineString");
37449function gW(e, t, s = {}) {
37450  return qg(
37451    e.map((l) => Qa(l, t)),
37452    s
37453  );
37454}
37455fn(gW, "lineStrings");
37456function qg(e, t = {}) {
37457  const s = { type: "FeatureCollection" };
37458  return t.id && (s.id = t.id), t.bbox && (s.bbox = t.bbox), s.features = e, s;
37459}
37460fn(qg, "featureCollection");
37461function FM(e, t, s = {}) {
37462  return Ho({
37463    type: "MultiLineString",
37464    coordinates: e
37465  }, t, s);
37466}
37467fn(FM, "multiLineString");
37468function zM(e, t, s = {}) {
37469  return Ho({
37470    type: "MultiPoint",
37471    coordinates: e
37472  }, t, s);
37473}
37474fn(zM, "multiPoint");
37475function BM(e, t, s = {}) {
37476  return Ho({
37477    type: "MultiPolygon",
37478    coordinates: e
37479  }, t, s);
37480}
37481fn(BM, "multiPolygon");
37482function yW(e, t, s = {}) {
37483  return Ho({
37484    type: "GeometryCollection",
37485    geometries: e
37486  }, t, s);
37487}
37488fn(yW, "geometryCollection");
37489function _W(e, t = 0) {
37490  if (t && !(t >= 0))
37491    throw new Error("precision must be a positive number");
37492  const s = Math.pow(10, t || 0);
37493  return Math.round(e * s) / s;
37494}
37495fn(_W, "round");
37496function NM(e, t = "kilometers") {
37497  const s = LM[t];
37498  if (!s)
37499    throw new Error(t + " units is invalid");
37500  return e * s;
37501}
37502fn(NM, "radiansToLength");
37503function Yx(e, t = "kilometers") {
37504  const s = LM[t];
37505  if (!s)
37506    throw new Error(t + " units is invalid");
37507  return e / s;
37508}
37509fn(Yx, "lengthToRadians");
37510function vW(e, t) {
37511  return $M(Yx(e, t));
37512}
37513fn(vW, "lengthToDegrees");
37514function bW(e) {
37515  let t = e % 360;
37516  return t < 0 && (t += 360), t;
37517}
37518fn(bW, "bearingToAzimuth");
37519function $M(e) {
37520  return e % (2 * Math.PI) * 180 / Math.PI;
37521}
37522fn($M, "radiansToDegrees");
37523function xW(e) {
37524  return e % 360 * Math.PI / 180;
37525}
37526fn(xW, "degreesToRadians");
37527function wW(e, t = "kilometers", s = "kilometers") {
37528  if (!(e >= 0))
37529    throw new Error("length must be a positive number");
37530  return NM(Yx(e, t), s);
37531}
37532fn(wW, "convertLength");
37533function SW(e, t = "meters", s = "kilometers") {
37534  if (!(e >= 0))
37535    throw new Error("area must be a positive number");
37536  const l = TE[t];
37537  if (!l)
37538    throw new Error("invalid original units");
37539  const h = TE[s];
37540  if (!h)
37541    throw new Error("invalid final units");
37542  return e / l * h;
37543}
37544fn(SW, "convertArea");
37545function wh(e) {
37546  return !isNaN(e) && e !== null && !Array.isArray(e);
37547}
37548fn(wh, "isNumber");
37549function Hg(e) {
37550  return e !== null && typeof e == "object" && !Array.isArray(e);
37551}
37552fn(Hg, "isObject");
37553function TW(e) {
37554  if (!e)
37555    throw new Error("bbox is required");
37556  if (!Array.isArray(e))
37557    throw new Error("bbox must be an Array");
37558  if (e.length !== 4 && e.length !== 6)
37559    throw new Error("bbox must be an Array of 4 or 6 numbers");
37560  e.forEach((t) => {
37561    if (!wh(t))
37562      throw new Error("bbox must only contain numbers");
37563  });
37564}
37565fn(TW, "validateBBox");
37566function EW(e) {
37567  if (!e)
37568    throw new Error("id is required");
37569  if (["string", "number"].indexOf(typeof e) === -1)
37570    throw new Error("id must be a number or a string");
37571}
37572fn(EW, "validateId");
37573var AW = Object.defineProperty, cc = (e, t) => AW(e, "name", { value: t, configurable: !0 });
37574function CW(e) {
37575  if (!e)
37576    throw new Error("coord is required");
37577  if (!Array.isArray(e)) {
37578    if (e.type === "Feature" && e.geometry !== null && e.geometry.type === "Point")
37579      return [...e.geometry.coordinates];
37580    if (e.type === "Point")
37581      return [...e.coordinates];
37582  }
37583  if (Array.isArray(e) && e.length >= 2 && !Array.isArray(e[0]) && !Array.isArray(e[1]))
37584    return [...e];
37585  throw new Error("coord must be GeoJSON Point or an Array of numbers");
37586}
37587cc(CW, "getCoord");
37588function Wf(e) {
37589  if (Array.isArray(e))
37590    return e;
37591  if (e.type === "Feature") {
37592    if (e.geometry !== null)
37593      return e.geometry.coordinates;
37594  } else if (e.coordinates)
37595    return e.coordinates;
37596  throw new Error(
37597    "coords must be GeoJSON Feature, Geometry Object or an Array"
37598  );
37599}
37600cc(Wf, "getCoords");
37601function jM(e) {
37602  if (e.length > 1 && wh(e[0]) && wh(e[1]))
37603    return !0;
37604  if (Array.isArray(e[0]) && e[0].length)
37605    return jM(e[0]);
37606  throw new Error("coordinates must only contain numbers");
37607}
37608cc(jM, "containsNumber");
37609function IW(e, t, s) {
37610  if (!t || !s)
37611    throw new Error("type and name required");
37612  if (!e || e.type !== t)
37613    throw new Error(
37614      "Invalid input to " + s + ": must be a " + t + ", given " + e.type
37615    );
37616}
37617cc(IW, "geojsonType");
37618function PW(e, t, s) {
37619  if (!e)
37620    throw new Error("No feature passed");
37621  if (!s)
37622    throw new Error(".featureOf() requires a name");
37623  if (!e || e.type !== "Feature" || !e.geometry)
37624    throw new Error(
37625      "Invalid input to " + s + ", Feature with geometry required"
37626    );
37627  if (!e.geometry || e.geometry.type !== t)
37628    throw new Error(
37629      "Invalid input to " + s + ": must be a " + t + ", given " + e.geometry.type
37630    );
37631}
37632cc(PW, "featureOf");
37633function MW(e, t, s) {
37634  if (!e)
37635    throw new Error("No featureCollection passed");
37636  if (!s)
37637    throw new Error(".collectionOf() requires a name");
37638  if (!e || e.type !== "FeatureCollection")
37639    throw new Error(
37640      "Invalid input to " + s + ", FeatureCollection required"
37641    );
37642  for (const l of e.features) {
37643    if (!l || l.type !== "Feature" || !l.geometry)
37644      throw new Error(
37645        "Invalid input to " + s + ", Feature with geometry required"
37646      );
37647    if (!l.geometry || l.geometry.type !== t)
37648      throw new Error(
37649        "Invalid input to " + s + ": must be a " + t + ", given " + l.geometry.type
37650      );
37651  }
37652}
37653cc(MW, "collectionOf");
37654function kW(e) {
37655  return e.type === "Feature" ? e.geometry : e;
37656}
37657cc(kW, "getGeom");
37658function VM(e, t) {
37659  return e.type === "FeatureCollection" ? "FeatureCollection" : e.type === "GeometryCollection" ? "GeometryCollection" : e.type === "Feature" && e.geometry !== null ? e.geometry.type : e.type;
37660}
37661cc(VM, "getType");
37662var OW = Object.defineProperty, Gg = (e, t) => OW(e, "name", { value: t, configurable: !0 });
37663function UM(e, t = {}) {
37664  var s = typeof t == "object" ? t.mutate : t;
37665  if (!e)
37666    throw new Error("geojson is required");
37667  var l = VM(e), h = [];
37668  switch (l) {
37669    case "LineString":
37670      h = sm(e, l);
37671      break;
37672    case "MultiLineString":
37673    case "Polygon":
37674      Wf(e).forEach(function(m) {
37675        h.push(sm(m, l));
37676      });
37677      break;
37678    case "MultiPolygon":
37679      Wf(e).forEach(function(m) {
37680        var c = [];
37681        m.forEach(function(w) {
37682          c.push(sm(w, l));
37683        }), h.push(c);
37684      });
37685      break;
37686    case "Point":
37687      return e;
37688    case "MultiPoint":
37689      var g = {};
37690      Wf(e).forEach(function(m) {
37691        var c = m.join("-");
37692        Object.prototype.hasOwnProperty.call(g, c) || (h.push(m), g[c] = !0);
37693      });
37694      break;
37695    default:
37696      throw new Error(l + " geometry not supported");
37697  }
37698  return e.coordinates ? s === !0 ? (e.coordinates = h, e) : { type: l, coordinates: h } : s === !0 ? (e.geometry.coordinates = h, e) : Ho({ type: l, coordinates: h }, e.properties, {
37699    bbox: e.bbox,
37700    id: e.id
37701  });
37702}
37703Gg(UM, "cleanCoords");
37704function sm(e, t) {
37705  var s = Wf(e);
37706  if (s.length === 2 && !Jv(s[0], s[1]))
37707    return s;
37708  var l = [], h = s.length - 1, g = l.length;
37709  l.push(s[0]);
37710  for (var m = 1; m < h; m++) {
37711    var c = l[l.length - 1];
37712    s[m][0] === c[0] && s[m][1] === c[1] || (l.push(s[m]), g = l.length, g > 2 && Yv(
37713      l[g - 3],
37714      l[g - 1],
37715      l[g - 2]
37716    ) && l.splice(l.length - 2, 1));
37717  }
37718  if (l.push(s[s.length - 1]), g = l.length, (t === "Polygon" || t === "MultiPolygon") && Jv(s[0], s[s.length - 1]) && g < 4)
37719    throw new Error("invalid polygon");
37720  return t === "LineString" && g < 3 || Yv(
37721    l[g - 3],
37722    l[g - 1],
37723    l[g - 2]
37724  ) && l.splice(l.length - 2, 1), l;
37725}
37726Gg(sm, "cleanLine");
37727function Jv(e, t) {
37728  return e[0] === t[0] && e[1] === t[1];
37729}
37730Gg(Jv, "equals");
37731function Yv(e, t, s) {
37732  var l = s[0], h = s[1], g = e[0], m = e[1], c = t[0], w = t[1], O = l - g, P = h - m, R = c - g, z = w - m, J = O * z - P * R;
37733  return J !== 0 ? !1 : Math.abs(R) >= Math.abs(z) ? R > 0 ? g <= l && l <= c : c <= l && l <= g : z > 0 ? m <= h && h <= w : w <= h && h <= m;
37734}
37735Gg(Yv, "isPointOnLineSegment");
37736var DW = Object.defineProperty, Bh = (e, t) => DW(e, "name", { value: t, configurable: !0 });
37737function qM(e) {
37738  if (!e)
37739    throw new Error("geojson is required");
37740  switch (e.type) {
37741    case "Feature":
37742      return Qx(e);
37743    case "FeatureCollection":
37744      return HM(e);
37745    case "Point":
37746    case "LineString":
37747    case "Polygon":
37748    case "MultiPoint":
37749    case "MultiLineString":
37750    case "MultiPolygon":
37751    case "GeometryCollection":
37752      return Zg(e);
37753    default:
37754      throw new Error("unknown GeoJSON type");
37755  }
37756}
37757Bh(qM, "clone");
37758function Qx(e) {
37759  const t = { type: "Feature" };
37760  return Object.keys(e).forEach((s) => {
37761    switch (s) {
37762      case "type":
37763      case "properties":
37764      case "geometry":
37765        return;
37766      default:
37767        t[s] = e[s];
37768    }
37769  }), t.properties = e0(e.properties), e.geometry == null ? t.geometry = null : t.geometry = Zg(e.geometry), t;
37770}
37771Bh(Qx, "cloneFeature");
37772function e0(e) {
37773  const t = {};
37774  return e && Object.keys(e).forEach((s) => {
37775    const l = e[s];
37776    typeof l == "object" ? l === null ? t[s] = null : Array.isArray(l) ? t[s] = l.map((h) => h) : t[s] = e0(l) : t[s] = l;
37777  }), t;
37778}
37779Bh(e0, "cloneProperties");
37780function HM(e) {
37781  const t = { type: "FeatureCollection" };
37782  return Object.keys(e).forEach((s) => {
37783    switch (s) {
37784      case "type":
37785      case "features":
37786        return;
37787      default:
37788        t[s] = e[s];
37789    }
37790  }), t.features = e.features.map((s) => Qx(s)), t;
37791}
37792Bh(HM, "cloneFeatureCollection");
37793function Zg(e) {
37794  const t = { type: e.type };
37795  return e.bbox && (t.bbox = e.bbox), e.type === "GeometryCollection" ? (t.geometries = e.geometries.map((s) => Zg(s)), t) : (t.coordinates = t0(e.coordinates), t);
37796}
37797Bh(Zg, "cloneGeometry");
37798function t0(e) {
37799  const t = e;
37800  return typeof t[0] != "object" ? t.slice() : t.map((s) => t0(s));
37801}
37802Bh(t0, "deepSlice");
37803var RW = Object.defineProperty, Li = (e, t) => RW(e, "name", { value: t, configurable: !0 });
37804function jd(e, t, s) {
37805  if (e !== null)
37806    for (var l, h, g, m, c, w, O, P = 0, R = 0, z, J = e.type, K = J === "FeatureCollection", ee = J === "Feature", ue = K ? e.features.length : 1, Ce = 0; Ce < ue; Ce++) {
37807      O = K ? e.features[Ce].geometry : ee ? e.geometry : e, z = O ? O.type === "GeometryCollection" : !1, c = z ? O.geometries.length : 1;
37808      for (var ge = 0; ge < c; ge++) {
37809        var X = 0, ye = 0;
37810        if (m = z ? O.geometries[ge] : O, m !== null) {
37811          w = m.coordinates;
37812          var Ae = m.type;
37813          switch (P = s && (Ae === "Polygon" || Ae === "MultiPolygon") ? 1 : 0, Ae) {
37814            case null:
37815              break;
37816            case "Point":
37817              if (t(
37818                w,
37819                R,
37820                Ce,
37821                X,
37822                ye
37823              ) === !1)
37824                return !1;
37825              R++, X++;
37826              break;
37827            case "LineString":
37828            case "MultiPoint":
37829              for (l = 0; l < w.length; l++) {
37830                if (t(
37831                  w[l],
37832                  R,
37833                  Ce,
37834                  X,
37835                  ye
37836                ) === !1)
37837                  return !1;
37838                R++, Ae === "MultiPoint" && X++;
37839              }
37840              Ae === "LineString" && X++;
37841              break;
37842            case "Polygon":
37843            case "MultiLineString":
37844              for (l = 0; l < w.length; l++) {
37845                for (h = 0; h < w[l].length - P; h++) {
37846                  if (t(
37847                    w[l][h],
37848                    R,
37849                    Ce,
37850                    X,
37851                    ye
37852                  ) === !1)
37853                    return !1;
37854                  R++;
37855                }
37856                Ae === "MultiLineString" && X++, Ae === "Polygon" && ye++;
37857              }
37858              Ae === "Polygon" && X++;
37859              break;
37860            case "MultiPolygon":
37861              for (l = 0; l < w.length; l++) {
37862                for (ye = 0, h = 0; h < w[l].length; h++) {
37863                  for (g = 0; g < w[l][h].length - P; g++) {
37864                    if (t(
37865                      w[l][h][g],
37866                      R,
37867                      Ce,
37868                      X,
37869                      ye
37870                    ) === !1)
37871                      return !1;
37872                    R++;
37873                  }
37874                  ye++;
37875                }
37876                X++;
37877              }
37878              break;
37879            case "GeometryCollection":
37880              for (l = 0; l < m.geometries.length; l++)
37881                if (jd(m.geometries[l], t, s) === !1)
37882                  return !1;
37883              break;
37884            default:
37885              throw new Error("Unknown Geometry Type");
37886          }
37887        }
37888      }
37889    }
37890}
37891Li(jd, "coordEach");
37892function LW(e, t, s, l) {
37893  var h = s;
37894  return jd(
37895    e,
37896    function(g, m, c, w, O) {
37897      m === 0 && s === void 0 ? h = g : h = t(
37898        h,
37899        g,
37900        m,
37901        c,
37902        w,
37903        O
37904      );
37905    },
37906    l
37907  ), h;
37908}
37909Li(LW, "coordReduce");
37910function GM(e, t) {
37911  var s;
37912  switch (e.type) {
37913    case "FeatureCollection":
37914      for (s = 0; s < e.features.length && t(e.features[s].properties, s) !== !1; s++)
37915        ;
37916      break;
37917    case "Feature":
37918      t(e.properties, 0);
37919      break;
37920  }
37921}
37922Li(GM, "propEach");
37923function FW(e, t, s) {
37924  var l = s;
37925  return GM(e, function(h, g) {
37926    g === 0 && s === void 0 ? l = h : l = t(l, h, g);
37927  }), l;
37928}
37929Li(FW, "propReduce");
37930function ZM(e, t) {
37931  if (e.type === "Feature")
37932    t(e, 0);
37933  else if (e.type === "FeatureCollection")
37934    for (var s = 0; s < e.features.length && t(e.features[s], s) !== !1; s++)
37935      ;
37936}
vendor: 4,909 bytes, lines 37937-38168
37937Li(ZM, "featureEach");
37938function zW(e, t, s) {
37939  var l = s;
37940  return ZM(e, function(h, g) {
37941    g === 0 && s === void 0 ? l = h : l = t(l, h, g);
37942  }), l;
37943}
37944Li(zW, "featureReduce");
37945function BW(e) {
37946  var t = [];
37947  return jd(e, function(s) {
37948    t.push(s);
37949  }), t;
37950}
37951Li(BW, "coordAll");
37952function Wg(e, t) {
37953  var s, l, h, g, m, c, w, O, P, R, z = 0, J = e.type === "FeatureCollection", K = e.type === "Feature", ee = J ? e.features.length : 1;
37954  for (s = 0; s < ee; s++) {
37955    for (c = J ? e.features[s].geometry : K ? e.geometry : e, O = J ? e.features[s].properties : K ? e.properties : {}, P = J ? e.features[s].bbox : K ? e.bbox : void 0, R = J ? e.features[s].id : K ? e.id : void 0, w = c ? c.type === "GeometryCollection" : !1, m = w ? c.geometries.length : 1, h = 0; h < m; h++) {
37956      if (g = w ? c.geometries[h] : c, g === null) {
37957        if (t(
37958          null,
37959          z,
37960          O,
37961          P,
37962          R
37963        ) === !1)
37964          return !1;
37965        continue;
37966      }
37967      switch (g.type) {
37968        case "Point":
37969        case "LineString":
37970        case "MultiPoint":
37971        case "Polygon":
37972        case "MultiLineString":
37973        case "MultiPolygon": {
37974          if (t(
37975            g,
37976            z,
37977            O,
37978            P,
37979            R
37980          ) === !1)
37981            return !1;
37982          break;
37983        }
37984        case "GeometryCollection": {
37985          for (l = 0; l < g.geometries.length; l++)
37986            if (t(
37987              g.geometries[l],
37988              z,
37989              O,
37990              P,
37991              R
37992            ) === !1)
37993              return !1;
37994          break;
37995        }
37996        default:
37997          throw new Error("Unknown Geometry Type");
37998      }
37999    }
38000    z++;
38001  }
38002}
38003Li(Wg, "geomEach");
38004function NW(e, t, s) {
38005  var l = s;
38006  return Wg(
38007    e,
38008    function(h, g, m, c, w) {
38009      g === 0 && s === void 0 ? l = h : l = t(
38010        l,
38011        h,
38012        g,
38013        m,
38014        c,
38015        w
38016      );
38017    }
38018  ), l;
38019}
38020Li(NW, "geomReduce");
38021function Kg(e, t) {
38022  Wg(e, function(s, l, h, g, m) {
38023    var c = s === null ? null : s.type;
38024    switch (c) {
38025      case null:
38026      case "Point":
38027      case "LineString":
38028      case "Polygon":
38029        return t(
38030          Ho(s, h, { bbox: g, id: m }),
38031          l,
38032          0
38033        ) === !1 ? !1 : void 0;
38034    }
38035    var w;
38036    switch (c) {
38037      case "MultiPoint":
38038        w = "Point";
38039        break;
38040      case "MultiLineString":
38041        w = "LineString";
38042        break;
38043      case "MultiPolygon":
38044        w = "Polygon";
38045        break;
38046    }
38047    for (var O = 0; O < s.coordinates.length; O++) {
38048      var P = s.coordinates[O], R = {
38049        type: w,
38050        coordinates: P
38051      };
38052      if (t(Ho(R, h), l, O) === !1)
38053        return !1;
38054    }
38055  });
38056}
38057Li(Kg, "flattenEach");
38058function $W(e, t, s) {
38059  var l = s;
38060  return Kg(
38061    e,
38062    function(h, g, m) {
38063      g === 0 && m === 0 && s === void 0 ? l = h : l = t(
38064        l,
38065        h,
38066        g,
38067        m
38068      );
38069    }
38070  ), l;
38071}
38072Li($W, "flattenReduce");
38073function WM(e, t) {
38074  Kg(e, function(s, l, h) {
38075    var g = 0;
38076    if (s.geometry) {
38077      var m = s.geometry.type;
38078      if (!(m === "Point" || m === "MultiPoint")) {
38079        var c, w = 0, O = 0, P = 0;
38080        if (jd(
38081          s,
38082          function(R, z, J, K, ee) {
38083            if (c === void 0 || l > w || K > O || ee > P) {
38084              c = R, w = l, O = K, P = ee, g = 0;
38085              return;
38086            }
38087            var ue = Qa(
38088              [c, R],
38089              s.properties
38090            );
38091            if (t(
38092              ue,
38093              l,
38094              h,
38095              ee,
38096              g
38097            ) === !1)
38098              return !1;
38099            g++, c = R;
38100          }
38101        ) === !1)
38102          return !1;
38103      }
38104    }
38105  });
38106}
38107Li(WM, "segmentEach");
38108function jW(e, t, s) {
38109  var l = s, h = !1;
38110  return WM(
38111    e,
38112    function(g, m, c, w, O) {
38113      h === !1 && s === void 0 ? l = g : l = t(
38114        l,
38115        g,
38116        m,
38117        c,
38118        w,
38119        O
38120      ), h = !0;
38121    }
38122  ), l;
38123}
38124Li(jW, "segmentReduce");
38125function KM(e, t) {
38126  if (!e)
38127    throw new Error("geojson is required");
38128  Kg(e, function(s, l, h) {
38129    if (s.geometry !== null) {
38130      var g = s.geometry.type, m = s.geometry.coordinates;
38131      switch (g) {
38132        case "LineString":
38133          if (t(s, l, h, 0, 0) === !1)
38134            return !1;
38135          break;
38136        case "Polygon":
38137          for (var c = 0; c < m.length; c++)
38138            if (t(
38139              Qa(m[c], s.properties),
38140              l,
38141              h,
38142              c
38143            ) === !1)
38144              return !1;
38145          break;
38146      }
38147    }
38148  });
38149}
38150Li(KM, "lineEach");
38151function VW(e, t, s) {
38152  var l = s;
38153  return KM(
38154    e,
38155    function(h, g, m, c) {
38156      g === 0 && s === void 0 ? l = h : l = t(
38157        l,
38158        h,
38159        g,
38160        m,
38161        c
38162      );
38163    }
38164  ), l;
38165}
38166Li(VW, "lineReduce");
38167function UW(e, t) {
38168  if (t = t || {}, !Hg(t))
38169    throw new Error("options is invalid");
38170  var s = t.featureIndex || 0, l = t.multiFeatureIndex || 0, h = t.geometryIndex || 0, g = t.segmentIndex || 0, m = t.properties, c;
38171  switch (e.type) {
38172    case "FeatureCollection":
38173      s < 0 && (s = e.features.length + s), m = m || e.features[s].properties, c = e.features[s].geometry;
38174      break;
38175    case "Feature":
38176      m = m || e.properties, c = e.geometry;
38177      break;
38178    case "Point":
38179    case "MultiPoint":
38180      return null;
38181    case "LineString":
38182    case "Polygon":
38183    case "MultiLineString":
38184    case "MultiPolygon":
38185      c = e;
38186      break;
38187    default:
38188      throw new Error("geojson is invalid");
38189  }
38190  if (c === null)
38191    return null;
38192  var w = c.coordinates;
38193  switch (c.type) {
38194    case "Point":
38195    case "MultiPoint":
38196      return null;
38197    case "LineString":
38198      return g < 0 && (g = w.length + g - 1), Qa(
38199        [w[g], w[g + 1]],
38200        m,
38201        t
38202      );
38203    case "Polygon":
38204      return h < 0 && (h = w.length + h), g < 0 && (g = w[h].length + g - 1), Qa(
38205        [
38206          w[h][g],
38207          w[h][g + 1]
38208        ],
38209        m,
38210        t
38211      );
38212    case "MultiLineString":
38213      return l < 0 && (l = w.length + l), g < 0 && (g = w[l].length + g - 1), Qa(
38214        [
38215          w[l][g],
38216          w[l][g + 1]
38217        ],
38218        m,
38219        t
38220      );
38221    case "MultiPolygon":
38222      return l < 0 && (l = w.length + l), h < 0 && (h = w[l].length + h), g < 0 && (g = w[l][h].length - g - 1), Qa(
38223        [
38224          w[l][h][g],
38225          w[l][h][g + 1]
38226        ],
38227        m,
38228        t
38229      );
38230  }
38231  throw new Error("geojson is invalid");
38232}
38233Li(UW, "findSegment");
38234function qW(e, t) {
38235  if (t = t || {}, !Hg(t))
38236    throw new Error("options is invalid");
38237  var s = t.featureIndex || 0, l = t.multiFeatureIndex || 0, h = t.geometryIndex || 0, g = t.coordIndex || 0, m = t.properties, c;
38238  switch (e.type) {
38239    case "FeatureCollection":
38240      s < 0 && (s = e.features.length + s), m = m || e.features[s].properties, c = e.features[s].geometry;
38241      break;
38242    case "Feature":
38243      m = m || e.properties, c = e.geometry;
38244      break;
38245    case "Point":
38246    case "MultiPoint":
38247      return null;
38248    case "LineString":
38249    case "Polygon":
38250    case "MultiLineString":
38251    case "MultiPolygon":
38252      c = e;
38253      break;
38254    default:
38255      throw new Error("geojson is invalid");
38256  }
38257  if (c === null)
38258    return null;
38259  var w = c.coordinates;
38260  switch (c.type) {
38261    case "Point":
38262      return Ja(w, m, t);
38263    case "MultiPoint":
38264      return l < 0 && (l = w.length + l), Ja(w[l], m, t);
38265    case "LineString":
38266      return g < 0 && (g = w.length + g), Ja(w[g], m, t);
38267    case "Polygon":
38268      return h < 0 && (h = w.length + h), g < 0 && (g = w[h].length + g), Ja(w[h][g], m, t);
38269    case "MultiLineString":
38270      return l < 0 && (l = w.length + l), g < 0 && (g = w[l].length + g), Ja(w[l][g], m, t);
38271    case "MultiPolygon":
38272      return l < 0 && (l = w.length + l), h < 0 && (h = w[l].length + h), g < 0 && (g = w[l][h].length - g), Ja(
38273        w[l][h][g],
38274        m,
38275        t
38276      );
38277  }
38278  throw new Error("geojson is invalid");
38279}
38280Li(qW, "findPoint");
38281var HW = Object.defineProperty, Ea = (e, t) => HW(e, "name", { value: t, configurable: !0 });
38282function XM(e, t) {
38283  var s = e[0] - t[0], l = e[1] - t[1];
38284  return s * s + l * l;
38285}
38286Ea(XM, "getSqDist");
38287function JM(e, t, s) {
38288  var l = t[0], h = t[1], g = s[0] - l, m = s[1] - h;
38289  if (g !== 0 || m !== 0) {
38290    var c = ((e[0] - l) * g + (e[1] - h) * m) / (g * g + m * m);
38291    c > 1 ? (l = s[0], h = s[1]) : c > 0 && (l += g * c, h += m * c);
38292  }
38293  return g = e[0] - l, m = e[1] - h, g * g + m * m;
38294}
38295Ea(JM, "getSqSegDist");
38296function YM(e, t) {
38297  for (var s = e[0], l = [s], h, g = 1, m = e.length; g < m; g++)
38298    h = e[g], XM(h, s) > t && (l.push(h), s = h);
38299  return s !== h && l.push(h), l;
38300}
38301Ea(YM, "simplifyRadialDist");
38302function Wm(e, t, s, l, h) {
38303  for (var g = l, m, c = t + 1; c < s; c++) {
38304    var w = JM(e[c], e[t], e[s]);
38305    w > g && (m = c, g = w);
38306  }
38307  g > l && (m - t > 1 && Wm(e, t, m, l, h), h.push(e[m]), s - m > 1 && Wm(e, m, s, l, h));
38308}
38309Ea(Wm, "simplifyDPStep");
38310function QM(e, t) {
38311  var s = e.length - 1, l = [e[0]];
38312  return Wm(e, 0, s, t, l), l.push(e[s]), l;
38313}
38314Ea(QM, "simplifyDouglasPeucker");
38315function hd(e, t, s) {
38316  if (e.length <= 2)
38317    return e;
38318  var l = t !== void 0 ? t * t : 1;
38319  return e = s ? e : YM(e, l), e = QM(e, l), e;
38320}
38321Ea(hd, "simplify");
38322function ek(e, t = {}) {
38323  var s, l, h;
38324  if (t = t ?? {}, !Hg(t))
38325    throw new Error("options is invalid");
38326  const g = (s = t.tolerance) != null ? s : 1, m = (l = t.highQuality) != null ? l : !1, c = (h = t.mutate) != null ? h : !1;
38327  if (!e)
38328    throw new Error("geojson is required");
38329  if (g && g < 0)
38330    throw new Error("invalid tolerance");
38331  return c !== !0 && (e = qM(e)), Wg(e, function(w) {
38332    tk(w, g, m);
38333  }), e;
38334}
38335Ea(ek, "simplify");
38336function tk(e, t, s) {
38337  const l = e.type;
38338  if (l === "Point" || l === "MultiPoint")
38339    return e;
38340  if (UM(e, { mutate: !0 }), l !== "GeometryCollection")
38341    switch (l) {
38342      case "LineString":
38343        e.coordinates = hd(
38344          e.coordinates,
38345          t,
38346          s
38347        );
38348        break;
38349      case "MultiLineString":
38350        e.coordinates = e.coordinates.map(
38351          (h) => hd(h, t, s)
38352        );
38353        break;
38354      case "Polygon":
38355        e.coordinates = Qv(
38356          e.coordinates,
38357          t,
38358          s
38359        );
38360        break;
38361      case "MultiPolygon":
38362        e.coordinates = e.coordinates.map(
38363          (h) => Qv(h, t, s)
38364        );
38365    }
38366  return e;
38367}
38368Ea(tk, "simplifyGeom");
38369function Qv(e, t, s) {
38370  return e.map(function(l) {
38371    if (l.length < 4)
38372      throw new Error("invalid polygon");
38373    let h = t, g = hd(l, h, s);
38374    for (; !rk(g); )
38375      h -= h * 0.01, g = hd(l, h, s);
38376    return (g[g.length - 1][0] !== g[0][0] || g[g.length - 1][1] !== g[0][1]) && g.push(g[0]), g;
38377  });
38378}
38379Ea(Qv, "simplifyPolygon");
38380function rk(e) {
38381  return e.length < 3 ? !1 : !(e.length === 3 && e[2][0] === e[0][0] && e[2][1] === e[0][1]);
38382}
38383Ea(rk, "checkValidity");
38384var PX = ek;
38385function GW(e, t, s) {
38386  var l = -1, h = e.length;
38387  t < 0 && (t = -t > h ? 0 : h + t), s = s > h ? h : s, s < 0 && (s += h), h = t > s ? 0 : s - t >>> 0, t >>>= 0;
38388  for (var g = Array(h); ++l < h; )
38389    g[l] = e[l + t];
38390  return g;
38391}
38392var ZW = GW, WW = ZW;
38393function KW(e, t, s) {
38394  var l = e.length;
38395  return s = s === void 0 ? l : s, !t && s >= l ? e : WW(e, t, s);
38396}
38397var XW = KW, JW = "\\ud800-\\udfff", YW = "\\u0300-\\u036f", QW = "\\ufe20-\\ufe2f", e7 = "\\u20d0-\\u20ff", t7 = YW + QW + e7, r7 = "\\ufe0e\\ufe0f", n7 = "\\u200d", i7 = RegExp("[" + n7 + JW + t7 + r7 + "]");
38398function s7(e) {
38399  return i7.test(e);
38400}
38401var nk = s7;
38402function o7(e) {
38403  return e.split("");
38404}
38405var a7 = o7, ik = "\\ud800-\\udfff", l7 = "\\u0300-\\u036f", c7 = "\\ufe20-\\ufe2f", u7 = "\\u20d0-\\u20ff", h7 = l7 + c7 + u7, f7 = "\\ufe0e\\ufe0f", d7 = "[" + ik + "]", eb = "[" + h7 + "]", tb = "\\ud83c[\\udffb-\\udfff]", p7 = "(?:" + eb + "|" + tb + ")", sk = "[^" + ik + "]", ok = "(?:\\ud83c[\\udde6-\\uddff]){2}", ak = "[\\ud800-\\udbff][\\udc00-\\udfff]", m7 = "\\u200d", lk = p7 + "?", ck = "[" + f7 + "]?", g7 = "(?:" + m7 + "(?:" + [sk, ok, ak].join("|") + ")" + ck + lk + ")*", y7 = ck + lk + g7, _7 = "(?:" + [sk + eb + "?", eb, ok, ak, d7].join("|") + ")", v7 = RegExp(tb + "(?=" + tb + ")|" + _7 + y7, "g");
38406function b7(e) {
38407  return e.match(v7) || [];
38408}
38409var x7 = b7, w7 = a7, S7 = nk, T7 = x7;
38410function E7(e) {
38411  return S7(e) ? T7(e) : w7(e);
38412}
38413var A7 = E7, C7 = XW, I7 = nk, P7 = A7, M7 = Ld;
38414function k7(e) {
38415  return function(t) {
38416    t = M7(t);
38417    var s = I7(t) ? P7(t) : void 0, l = s ? s[0] : t.charAt(0), h = s ? C7(s, 1).join("") : t.slice(1);
38418    return l[e]() + h;
38419  };
38420}
38421var O7 = k7, D7 = O7, R7 = D7("toUpperCase"), L7 = R7, F7 = Ld, z7 = L7;
38422function B7(e) {
38423  return z7(F7(e).toLowerCase());
38424}
38425var N7 = B7;
38426function $7(e, t, s, l) {
38427  var h = -1, g = e == null ? 0 : e.length;
38428  for (l && g && (s = e[++h]); ++h < g; )
38429    s = t(s, e[h], h, e);
38430  return s;
38431}
38432var j7 = $7;
38433function V7(e) {
38434  return function(t) {
38435    return e == null ? void 0 : e[t];
38436  };
38437}
38438var U7 = V7, q7 = U7, H7 = {
38439  // Latin-1 Supplement block.
38440  À: "A",
38441  Á: "A",
38442  Â: "A",
38443  Ã: "A",
38444  Ä: "A",
38445  Å: "A",
38446  à: "a",
38447  á: "a",
38448  â: "a",
38449  ã: "a",
38450  ä: "a",
38451  å: "a",
38452  Ç: "C",
38453  ç: "c",
38454  Ð: "D",
38455  ð: "d",
38456  È: "E",
38457  É: "E",
38458  Ê: "E",
38459  Ë: "E",
38460  è: "e",
38461  é: "e",
38462  ê: "e",
38463  ë: "e",
38464  Ì: "I",
38465  Í: "I",
38466  Î: "I",
38467  Ï: "I",
38468  ì: "i",
38469  í: "i",
38470  î: "i",
38471  ï: "i",
38472  Ñ: "N",
38473  ñ: "n",
38474  Ò: "O",
38475  Ó: "O",
38476  Ô: "O",
38477  Õ: "O",
38478  Ö: "O",
38479  Ø: "O",
38480  ò: "o",
38481  ó: "o",
38482  ô: "o",
38483  õ: "o",
38484  ö: "o",
38485  ø: "o",
38486  Ù: "U",
38487  Ú: "U",
38488  Û: "U",
38489  Ü: "U",
38490  ù: "u",
38491  ú: "u",
38492  û: "u",
38493  ü: "u",
38494  Ý: "Y",
38495  ý: "y",
38496  ÿ: "y",
38497  Æ: "Ae",
38498  æ: "ae",
38499  Þ: "Th",
38500  þ: "th",
38501  ß: "ss",
38502  // Latin Extended-A block.
38503  Ā: "A",
38504  Ă: "A",
38505  Ą: "A",
38506  ā: "a",
38507  ă: "a",
38508  ą: "a",
38509  Ć: "C",
38510  Ĉ: "C",
38511  Ċ: "C",
38512  Č: "C",
38513  ć: "c",
38514  ĉ: "c",
38515  ċ: "c",
38516  č: "c",
38517  Ď: "D",
38518  Đ: "D",
38519  ď: "d",
38520  đ: "d",
38521  Ē: "E",
38522  Ĕ: "E",
38523  Ė: "E",
38524  Ę: "E",
38525  Ě: "E",
38526  ē: "e",
38527  ĕ: "e",
38528  ė: "e",
38529  ę: "e",
38530  ě: "e",
38531  Ĝ: "G",
38532  Ğ: "G",
38533  Ä : "G",
38534  Ģ: "G",
38535  ĝ: "g",
38536  ğ: "g",
38537  Ä¡: "g",
38538  ģ: "g",
38539  Ĥ: "H",
38540  Ħ: "H",
38541  ĥ: "h",
38542  ħ: "h",
38543  Ĩ: "I",
38544  Ī: "I",
38545  Ĭ: "I",
38546  Ä®: "I",
38547  İ: "I",
38548  Ä©: "i",
38549  Ä«: "i",
38550  Ä­: "i",
38551  į: "i",
38552  ı: "i",
38553  Ä´: "J",
38554  ĵ: "j",
38555  Ķ: "K",
38556  Ä·: "k",
38557  ĸ: "k",
38558  Ĺ: "L",
38559  Ä»: "L",
38560  Ľ: "L",
38561  Ä¿: "L",
38562  Ł: "L",
38563  ĺ: "l",
38564  ļ: "l",
38565  ľ: "l",
38566  ŀ: "l",
38567  ł: "l",
38568  Ń: "N",
38569  Ņ: "N",
38570  Ň: "N",
38571  Ŋ: "N",
38572  ń: "n",
38573  ņ: "n",
38574  ň: "n",
vendor: 3,893 bytes, lines 38575-38724
38575  ŋ: "n",
38576  Ō: "O",
38577  Ŏ: "O",
38578  Ő: "O",
38579  ō: "o",
38580  ŏ: "o",
38581  ő: "o",
38582  Ŕ: "R",
38583  Ŗ: "R",
38584  Ř: "R",
38585  ŕ: "r",
38586  ŗ: "r",
38587  ř: "r",
38588  Ś: "S",
38589  Ŝ: "S",
38590  Ş: "S",
38591  Å : "S",
38592  ś: "s",
38593  ŝ: "s",
38594  ş: "s",
38595  Å¡: "s",
38596  Ţ: "T",
38597  Ť: "T",
38598  Ŧ: "T",
38599  ţ: "t",
38600  ť: "t",
38601  ŧ: "t",
38602  Ũ: "U",
38603  Ū: "U",
38604  Ŭ: "U",
38605  Å®: "U",
38606  Ű: "U",
38607  Ų: "U",
38608  Å©: "u",
38609  Å«: "u",
38610  Å­: "u",
38611  ů: "u",
38612  ű: "u",
38613  ų: "u",
38614  Å´: "W",
38615  ŵ: "w",
38616  Ŷ: "Y",
38617  Å·: "y",
38618  Ÿ: "Y",
38619  Ź: "Z",
38620  Å»: "Z",
38621  Ž: "Z",
38622  ź: "z",
38623  ż: "z",
38624  ž: "z",
38625  IJ: "IJ",
38626  ij: "ij",
38627  Œ: "Oe",
38628  œ: "oe",
38629  ʼn: "'n",
38630  Å¿: "s"
38631}, G7 = q7(H7), Z7 = G7, W7 = Z7, K7 = Ld, X7 = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, J7 = "\\u0300-\\u036f", Y7 = "\\ufe20-\\ufe2f", Q7 = "\\u20d0-\\u20ff", eK = J7 + Y7 + Q7, tK = "[" + eK + "]", rK = RegExp(tK, "g");
38632function nK(e) {
38633  return e = K7(e), e && e.replace(X7, W7).replace(rK, "");
38634}
38635var iK = nK, sK = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
38636function oK(e) {
38637  return e.match(sK) || [];
38638}
38639var aK = oK, lK = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
38640function cK(e) {
38641  return lK.test(e);
38642}
38643var uK = cK, uk = "\\ud800-\\udfff", hK = "\\u0300-\\u036f", fK = "\\ufe20-\\ufe2f", dK = "\\u20d0-\\u20ff", pK = hK + fK + dK, hk = "\\u2700-\\u27bf", fk = "a-z\\xdf-\\xf6\\xf8-\\xff", mK = "\\xac\\xb1\\xd7\\xf7", gK = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", yK = "\\u2000-\\u206f", _K = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", dk = "A-Z\\xc0-\\xd6\\xd8-\\xde", vK = "\\ufe0e\\ufe0f", pk = mK + gK + yK + _K, mk = "['’]", EE = "[" + pk + "]", bK = "[" + pK + "]", gk = "\\d+", xK = "[" + hk + "]", yk = "[" + fk + "]", _k = "[^" + uk + pk + gk + hk + fk + dk + "]", wK = "\\ud83c[\\udffb-\\udfff]", SK = "(?:" + bK + "|" + wK + ")", TK = "[^" + uk + "]", vk = "(?:\\ud83c[\\udde6-\\uddff]){2}", bk = "[\\ud800-\\udbff][\\udc00-\\udfff]", Qu = "[" + dk + "]", EK = "\\u200d", AE = "(?:" + yk + "|" + _k + ")", AK = "(?:" + Qu + "|" + _k + ")", CE = "(?:" + mk + "(?:d|ll|m|re|s|t|ve))?", IE = "(?:" + mk + "(?:D|LL|M|RE|S|T|VE))?", xk = SK + "?", wk = "[" + vK + "]?", CK = "(?:" + EK + "(?:" + [TK, vk, bk].join("|") + ")" + wk + xk + ")*", IK = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", PK = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", MK = wk + xk + CK, kK = "(?:" + [xK, vk, bk].join("|") + ")" + MK, OK = RegExp([
38644  Qu + "?" + yk + "+" + CE + "(?=" + [EE, Qu, "$"].join("|") + ")",
38645  AK + "+" + IE + "(?=" + [EE, Qu + AE, "$"].join("|") + ")",
38646  Qu + "?" + AE + "+" + CE,
38647  Qu + "+" + IE,
38648  PK,
38649  IK,
38650  gk,
38651  kK
38652].join("|"), "g");
38653function DK(e) {
38654  return e.match(OK) || [];
38655}
38656var RK = DK, LK = aK, FK = uK, zK = Ld, BK = RK;
38657function NK(e, t, s) {
38658  return e = zK(e), t = s ? void 0 : t, t === void 0 ? FK(e) ? BK(e) : LK(e) : e.match(t) || [];
38659}
38660var $K = NK, jK = j7, VK = iK, UK = $K, qK = "['’]", HK = RegExp(qK, "g");
38661function GK(e) {
38662  return function(t) {
38663    return jK(UK(VK(t).replace(HK, "")), e, "");
38664  };
38665}
38666var ZK = GK, WK = N7, KK = ZK, XK = KK(function(e, t, s) {
38667  return t = t.toLowerCase(), e + (s ? WK(t) : t);
38668}), JK = XK;
38669const MX = /* @__PURE__ */ xa(JK);
38670export {
38671  Vb as A,
38672  I2 as B,
38673  FE as C,
38674  Zb as D,
38675  pg as E,
38676  Ci as F,
38677  QK as G,
38678  pd as H,
38679  nC as I,
38680  w2 as J,
38681  eX as K,
38682  rd as L,
38683  E2 as M,
38684  Kb as N,
38685  EX as O,
38686  AX as P,
38687  PX as Q,
38688  CX as R,
38689  Th as S,
38690  gg as T,
38691  aC as U,
38692  TX as V,
38693  wX as W,
38694  _g as X,
38695  W2 as Y,
38696  MX as Z,
38697  SX as _,
38698  ni as a,
38699  vA as b,
38700  YK as c,
38701  tX as d,
38702  dg as e,
38703  wA as f,
38704  xX as g,
38705  An as h,
38706  rX as i,
38707  Ah as j,
38708  md as k,
38709  qb as l,
38710  fg as m,
38711  SA as n,
38712  bd as o,
38713  rC as p,
38714  Eh as q,
38715  sh as r,
38716  O2 as s,
38717  mA as t,
38718  ng as u,
38719  au as v,
38720  lg as w,
38721  hb as x,
38722  P2 as y,
38723  T2 as z
38724};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.